mirror of
https://github.com/photonstorm/phaser
synced 2024-12-14 23:32:52 +00:00
1 line
No EOL
278 KiB
JavaScript
1 line
No EOL
278 KiB
JavaScript
window.SpinePlugin=function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=61)}([function(t,e){function s(t,e,n,i){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,d=f=void 0,d=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&d.value&&"object"==typeof d.value&&(d=d.value),!(!d||!((f=d).get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===d.enumerable&&(d.enumerable=!0),void 0===d.configurable&&(d.configurable=!0),d));if(!1!==s){if(a=(i||t).prototype,o=r,h=void 0,(h=Object.getOwnPropertyDescriptor(a,o))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var a,o,h,l,u,c,f,d}function a(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)s(t,e[n].prototype||e[n])}}function p(t){var e,n,i;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");i=t.initialize,delete t.initialize}else{i=t.Extends?(n=t.Extends,function(){n.apply(this,arguments)}):function(){}}t.Extends?(i.prototype=Object.create(t.Extends.prototype),i.prototype.constructor=i,e=t.Extends,delete t.Extends):i.prototype.constructor=i;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),a(i,r),s(i,t,!0,e),i}p.extend=s,p.mixin=a,p.ignoreFinals=!1,t.exports=p},function(t,e){t.exports=function(){}},function(t,e,n){var i=n(0),r=n(31),s=new i({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,n=t*t+e*e;return 0<n&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this},transformMat3:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},transformMat4:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[4]*n+i[12],this.y=i[1]*e+i[5]*n+i[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e*this.x-n*this.y,n*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){var n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=n},function(t,e){t.exports=function(t,e,n,i){var r=t.length;if(e<0||r<e||n<=e||r<n||r<e+n){if(i)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return n;for(var i=e.split("."),r=t,s=n,a=0;a<i.length;a++){if(!r.hasOwnProperty(i[a])){s=n;break}s=r[i[a]],r=r[i[a]]}return s}return n}},function(t,e){t.exports=function(t,e,n){var i=typeof t;return t&&"number"!=i&&"string"!=i&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:n}},function(t,e,n){var i=n(0),r=n(25),s=new i({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},function(t,e){t.exports=function(t,e,n){var i=n-e;return e+((t-e)%i+i)%i}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new i(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0),this},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0<i&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i,this.z=n*i),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z;return this.x=n*a-i*s,this.y=i*r-e*a,this.z=e*s-n*r,this},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this},applyMatrix3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[3]*n+r[6]*i,this.y=r[1]*e+r[4]*n+r[7]*i,this.z=r[2]*e+r[5]*n+r[8]*i,this},applyMatrix4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=1/(r[3]*e+r[7]*n+r[11]*i+r[15]);return this.x=(r[0]*e+r[4]*n+r[8]*i+r[12])*s,this.y=(r[1]*e+r[5]*n+r[9]*i+r[13])*s,this.z=(r[2]*e+r[6]*n+r[10]*i+r[14])*s,this},transformMat3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=e*r[0]+n*r[3]+i*r[6],this.y=e*r[1]+n*r[4]+i*r[7],this.z=e*r[2]+n*r[5]+i*r[8],this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[4]*n+r[8]*i+r[12],this.y=r[1]*e+r[5]*n+r[9]*i+r[13],this.z=r[2]*e+r[6]*n+r[10]*i+r[14],this},transformCoordinates:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=e*r[0]+n*r[4]+i*r[8]+r[12],a=e*r[1]+n*r[5]+i*r[9]+r[13],o=e*r[2]+n*r[6]+i*r[10]+r[14],h=e*r[3]+n*r[7]+i*r[11]+r[15];return this.x=s/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*i-a*n,l=o*n+a*e-r*i,u=o*i+r*n-s*e,c=-r*e-s*n-a*i;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},project:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],g=r[10],m=r[11],v=r[12],y=r[13],x=r[14],M=1/(e*h+n*f+i*m+r[15]);return this.x=(e*s+n*l+i*d+v)*M,this.y=(e*a+n*u+i*p+y)*M,this.z=(e*o+n*c+i*g+x)*M,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,a=this.x-n,o=s-this.y-1-i,h=this.z;return this.x=2*a/r-1,this.y=2*o/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),t.exports=i},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,n){var i=n(23),r=n(55);t.exports=function(t,e){if(void 0===e&&(e=90),!i(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var n=0;n<t.length;n++)t[n].reverse();t.reverse()}return t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var n=t.length-1,i=t[e],r=e;r<n;r++)t[r]=t[r+1];return t.length=n,i}}},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,n){var i=n(3);t.exports=function(t){return t>Math.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,n){var i=n(3);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var i=n(0),r=n(11),s=new i({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},setValues:function(t,e,n,i,r,s,a,o,h,l,u,c,f,d,p,g){var m=this.val;return m[0]=t,m[1]=e,m[2]=n,m[3]=i,m[4]=r,m[5]=s,m[6]=a,m[7]=o,m[8]=h,m[9]=l,m[10]=u,m[11]=c,m[12]=f,m[13]=d,m[14]=p,m[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,n){var i=h.fromQuat(n).val,r=e.x,s=e.y,a=e.z;return this.setValues(i[0]*r,i[1]*r,i[2]*r,0,i[4]*s,i[5]*s,i[6]*s,0,i[8]*a,i[9]*a,i[10]*a,0,t.x,t.y,t.z,1)},xyz:function(t,e,n){this.identity();var i=this.val;return i[12]=t,i[13]=e,i[14]=n,this},scaling:function(t,e,n){this.zero();var i=this.val;return i[0]=t,i[5]=e,i[10]=n,i[15]=1,this},identity:function(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[3],r=t[6],s=t[7],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=n,t[9]=r,t[11]=t[14],t[12]=i,t[13]=s,t[14]=a,this},getInverse:function(t){return this.copy(t),this.invert()},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],g=t[14],m=t[15],v=e*a-n*s,y=e*o-i*s,x=e*h-r*s,M=n*o-i*a,w=n*h-r*a,E=i*h-r*o,T=l*p-u*d,A=l*g-c*d,b=l*m-f*d,R=u*g-c*p,S=u*m-f*p,I=c*m-f*g,C=v*I-y*S+x*R+M*b-w*A+E*T;return C?(C=1/C,this.setValues((a*I-o*S+h*R)*C,(i*S-n*I-r*R)*C,(p*E-g*w+m*M)*C,(c*w-u*E-f*M)*C,(o*b-s*I-h*A)*C,(e*I-i*b+r*A)*C,(g*x-d*E-m*y)*C,(l*E-c*x+f*y)*C,(s*S-a*b+h*T)*C,(n*b-e*S-r*T)*C,(d*w-p*x+m*v)*C,(u*x-l*w-f*v)*C,(a*A-s*R-o*T)*C,(e*R-n*A+i*T)*C,(p*y-d*M-g*v)*C,(l*M-u*y+c*v)*C)):this},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],g=t[14],m=t[15];return this.setValues(a*(c*m-f*g)-u*(o*m-h*g)+p*(o*f-h*c),-(n*(c*m-f*g)-u*(i*m-r*g)+p*(i*f-r*c)),n*(o*m-h*g)-a*(i*m-r*g)+p*(i*h-r*o),-(n*(o*f-h*c)-a*(i*f-r*c)+u*(i*h-r*o)),-(s*(c*m-f*g)-l*(o*m-h*g)+d*(o*f-h*c)),e*(c*m-f*g)-l*(i*m-r*g)+d*(i*f-r*c),-(e*(o*m-h*g)-s*(i*m-r*g)+d*(i*h-r*o)),e*(o*f-h*c)-s*(i*f-r*c)+l*(i*h-r*o),s*(u*m-f*p)-l*(a*m-h*p)+d*(a*f-h*u),-(e*(u*m-f*p)-l*(n*m-r*p)+d*(n*f-r*u)),e*(a*m-h*p)-s*(n*m-r*p)+d*(n*h-r*a),-(e*(a*f-h*u)-s*(n*f-r*u)+l*(n*h-r*a)),-(s*(u*g-c*p)-l*(a*g-o*p)+d*(a*c-o*u)),e*(u*g-c*p)-l*(n*g-i*p)+d*(n*c-i*u),-(e*(a*g-o*p)-s*(n*g-i*p)+d*(n*o-i*a)),e*(a*c-o*u)-s*(n*c-i*u)+l*(n*o-i*a))},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],g=t[14],m=t[15];return(e*a-n*s)*(c*m-f*g)-(e*o-i*s)*(u*m-f*p)+(e*h-r*s)*(u*g-c*p)+(n*o-i*a)*(l*m-f*d)-(n*h-r*a)*(l*g-c*d)+(i*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],g=e[13],m=e[14],v=e[15],y=t.val,x=y[0],M=y[1],w=y[2],E=y[3];return e[0]=x*n+M*a+w*u+E*p,e[1]=x*i+M*o+w*c+E*g,e[2]=x*r+M*h+w*f+E*m,e[3]=x*s+M*l+w*d+E*v,x=y[4],M=y[5],w=y[6],E=y[7],e[4]=x*n+M*a+w*u+E*p,e[5]=x*i+M*o+w*c+E*g,e[6]=x*r+M*h+w*f+E*m,e[7]=x*s+M*l+w*d+E*v,x=y[8],M=y[9],w=y[10],E=y[11],e[8]=x*n+M*a+w*u+E*p,e[9]=x*i+M*o+w*c+E*g,e[10]=x*r+M*h+w*f+E*m,e[11]=x*s+M*l+w*d+E*v,x=y[12],M=y[13],w=y[14],E=y[15],e[12]=x*n+M*a+w*u+E*p,e[13]=x*i+M*o+w*c+E*g,e[14]=x*r+M*h+w*f+E*m,e[15]=x*s+M*l+w*d+E*v,this},multiplyLocal:function(t){var e=this.val,n=t.val;return this.setValues(e[0]*n[0]+e[1]*n[4]+e[2]*n[8]+e[3]*n[12],e[0]*n[1]+e[1]*n[5]+e[2]*n[9]+e[3]*n[13],e[0]*n[2]+e[1]*n[6]+e[2]*n[10]+e[3]*n[14],e[0]*n[3]+e[1]*n[7]+e[2]*n[11]+e[3]*n[15],e[4]*n[0]+e[5]*n[4]+e[6]*n[8]+e[7]*n[12],e[4]*n[1]+e[5]*n[5]+e[6]*n[9]+e[7]*n[13],e[4]*n[2]+e[5]*n[6]+e[6]*n[10]+e[7]*n[14],e[4]*n[3]+e[5]*n[7]+e[6]*n[11]+e[7]*n[15],e[8]*n[0]+e[9]*n[4]+e[10]*n[8]+e[11]*n[12],e[8]*n[1]+e[9]*n[5]+e[10]*n[9]+e[11]*n[13],e[8]*n[2]+e[9]*n[6]+e[10]*n[10]+e[11]*n[14],e[8]*n[3]+e[9]*n[7]+e[10]*n[11]+e[11]*n[15],e[12]*n[0]+e[13]*n[4]+e[14]*n[8]+e[15]*n[12],e[12]*n[1]+e[13]*n[5]+e[14]*n[9]+e[15]*n[13],e[12]*n[2]+e[13]*n[6]+e[14]*n[10]+e[15]*n[14],e[12]*n[3]+e[13]*n[7]+e[14]*n[11]+e[15]*n[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var n=t.val,i=e.val,r=n[0],s=n[4],a=n[8],o=n[12],h=n[1],l=n[5],u=n[9],c=n[13],f=n[2],d=n[6],p=n[10],g=n[14],m=n[3],v=n[7],y=n[11],x=n[15],M=i[0],w=i[4],E=i[8],T=i[12],A=i[1],b=i[5],R=i[9],S=i[13],I=i[2],C=i[6],P=i[10],k=i[14],_=i[3],O=i[7],F=i[11],L=i[15];return this.setValues(r*M+s*A+a*I+o*_,h*M+l*A+u*I+c*_,f*M+d*A+p*I+g*_,m*M+v*A+y*I+x*_,r*w+s*b+a*C+o*O,h*w+l*b+u*C+c*O,f*w+d*b+p*C+g*O,m*w+v*b+y*C+x*O,r*E+s*R+a*P+o*F,h*E+l*R+u*P+c*F,f*E+d*R+p*P+g*F,m*E+v*R+y*P+x*F,r*T+s*S+a*k+o*L,h*T+l*S+u*k+c*L,f*T+d*S+p*k+g*L,m*T+v*S+y*k+x*L)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},translateXYZ:function(t,e,n){var i=this.val;return i[12]=i[0]*t+i[4]*e+i[8]*n+i[12],i[13]=i[1]*t+i[5]*e+i[9]*n+i[13],i[14]=i[2]*t+i[6]*e+i[10]*n+i[14],i[15]=i[3]*t+i[7]*e+i[11]*n+i[15],this},scale:function(t){return this.scaleXYZ(t.x,t.y,t.z)},scaleXYZ:function(t,e,n){var i=this.val;return i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*t,i[3]=i[3]*t,i[4]=i[4]*e,i[5]=i[5]*e,i[6]=i[6]*e,i[7]=i[7]*e,i[8]=i[8]*n,i[9]=i[9]*n,i[10]=i[10]*n,i[11]=i[11]*n,this},makeRotationAxis:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,a=t.y,o=t.z,h=r*s,l=r*a;return this.setValues(h*s+n,h*a-i*o,h*o+i*a,0,h*a+i*o,l*a+n,l*o-i*s,0,h*o-i*a,l*o+i*s,r*o*o+n,0,0,0,0,1)},rotate:function(t,e){var n=this.val,i=e.x,r=e.y,s=e.z,a=Math.sqrt(i*i+r*r+s*s);if(Math.abs(a)<1e-6)return this;i*=a=1/a,r*=a,s*=a;var o=Math.sin(t),h=Math.cos(t),l=1-h,u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],g=n[5],m=n[6],v=n[7],y=n[8],x=n[9],M=n[10],w=n[11],E=n[12],T=n[13],A=n[14],b=n[15],R=i*i*l+h,S=r*i*l+s*o,I=s*i*l-r*o,C=i*r*l-s*o,P=r*r*l+h,k=s*r*l+i*o,_=i*s*l+r*o,O=r*s*l-i*o,F=s*s*l+h;return this.setValues(u*R+p*S+y*I,c*R+g*S+x*I,f*R+m*S+M*I,d*R+v*S+w*I,u*C+p*P+y*k,c*C+g*P+x*k,f*C+m*P+M*k,d*C+v*P+w*k,u*_+p*O+y*F,c*_+g*O+x*F,f*_+m*O+M*F,d*_+v*O+w*F,E,T,A,b)},rotateX:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[4],s=e[5],a=e[6],o=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*i+h*n,e[5]=s*i+l*n,e[6]=a*i+u*n,e[7]=o*i+c*n,e[8]=h*i-r*n,e[9]=l*i-s*n,e[10]=u*i-a*n,e[11]=c*i-o*n,this},rotateY:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*i-h*n,e[1]=s*i-l*n,e[2]=a*i-u*n,e[3]=o*i-c*n,e[8]=r*n+h*i,e[9]=s*n+l*i,e[10]=a*n+u*i,e[11]=o*n+c*i,this},rotateZ:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*i+h*n,e[1]=s*i+l*n,e[2]=a*i+u*n,e[3]=o*i+c*n,e[4]=h*i-r*n,e[5]=l*i-s*n,e[6]=u*i-a*n,e[7]=c*i-o*n,this},fromRotationTranslation:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,a=n+n,o=i+i,h=r+r,l=n*a,u=n*o,c=n*h,f=i*o,d=i*h,p=r*h,g=s*a,m=s*o,v=s*h;return this.setValues(1-(f+p),u+v,c-m,0,u-v,1-(l+p),d+g,0,c+m,d-g,1-(l+f),0,e.x,e.y,e.z,1)},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,a=n+n,o=i+i,h=e*s,l=e*a,u=e*o,c=n*a,f=n*o,d=i*o,p=r*s,g=r*a,m=r*o;return this.setValues(1-(c+d),l+m,u-g,0,l-m,1-(h+d),f+p,0,u+g,f-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,n,i,r,s){var a=1/(e-t),o=1/(i-n),h=1/(r-s);return this.setValues(2*r*a,0,0,0,0,2*r*o,0,0,(e+t)*a,(i+n)*o,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,n,i){var r=1/Math.tan(t/2),s=1/(n-i);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(i+n)*s,-1,0,0,2*i*n*s,0)},perspectiveLH:function(t,e,n,i){return this.setValues(2*n/t,0,0,0,0,2*n/e,0,0,0,0,-i/(n-i),1,0,0,n*i/(n-i),0)},ortho:function(t,e,n,i,r,s){var a=0===(a=t-e)?a:1/a,o=0===(o=n-i)?o:1/o,h=0===(h=r-s)?h:1/h;return this.setValues(-2*a,0,0,0,0,-2*o,0,0,0,0,2*h,0,(t+e)*a,(i+n)*o,(s+r)*h,1)},lookAtRH:function(t,e,n){var i=this.val;return u.subVectors(t,e),0===u.getLengthSquared()&&(u.z=1),u.normalize(),a.crossVectors(n,u),0===a.getLengthSquared()&&(1===Math.abs(n.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),a.crossVectors(n,u)),a.normalize(),o.crossVectors(u,a),i[0]=a.x,i[1]=a.y,i[2]=a.z,i[4]=o.x,i[5]=o.y,i[6]=o.z,i[8]=u.x,i[9]=u.y,i[10]=u.z,this},lookAt:function(t,e,n){var i=t.x,r=t.y,s=t.z,a=n.x,o=n.y,h=n.z,l=e.x,u=e.y,c=e.z;if(Math.abs(i-l)<1e-6&&Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6)return this.identity();var f=i-l,d=r-u,p=s-c,g=1/Math.sqrt(f*f+d*d+p*p),m=o*(p*=g)-h*(d*=g),v=h*(f*=g)-a*p,y=a*d-o*f;(g=Math.sqrt(m*m+v*v+y*y))?(m*=g=1/g,v*=g,y*=g):y=v=m=0;var x=d*y-p*v,M=p*m-f*y,w=f*v-d*m;return(g=Math.sqrt(x*x+M*M+w*w))?(x*=g=1/g,M*=g,w*=g):w=M=x=0,this.setValues(m,x,f,0,v,M,d,0,y,w,p,0,-(m*i+v*r+y*s),-(x*i+M*r+w*s),-(f*i+d*r+p*s),1)},yawPitchRoll:function(t,e,n){this.zero(),h.zero(),l.zero();var i=this.val,r=h.val,s=l.val,a=Math.sin(n),o=Math.cos(n);return i[10]=1,i[15]=1,i[0]=o,i[1]=a,i[4]=-a,i[5]=o,a=Math.sin(e),o=Math.cos(e),r[0]=1,r[15]=1,r[5]=o,r[10]=o,r[9]=-a,r[6]=a,a=Math.sin(t),o=Math.cos(t),s[5]=1,s[15]=1,s[0]=o,s[2]=-a,s[8]=a,s[10]=o,this.multiplyLocal(h),this.multiplyLocal(l),this},setWorldMatrix:function(t,e,n,i,r){return this.yawPitchRoll(t.y,t.x,t.z),h.scaling(n.x,n.y,n.z),l.xyz(e.x,e.y,e.z),this.multiplyLocal(h),this.multiplyLocal(l),i&&this.multiplyLocal(i),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var n=this.val,i=t.val,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5],u=n[6],c=n[7],f=n[8],d=n[9],p=n[10],g=n[11],m=n[12],v=n[13],y=n[14],x=n[15],M=i[0],w=i[1],E=i[2],T=i[3],A=i[4],b=i[5],R=i[6],S=i[7],I=i[8],C=i[9],P=i[10],k=i[11],_=i[12],O=i[13],F=i[14],L=i[15];return e.setValues(M*r+w*h+E*f+T*m,w*s+w*l+E*d+T*v,E*a+w*u+E*p+T*y,T*o+w*c+E*g+T*x,A*r+b*h+R*f+S*m,A*s+b*l+R*d+S*v,A*a+b*u+R*p+S*y,A*o+b*c+R*g+S*x,I*r+C*h+P*f+k*m,I*s+C*l+P*d+k*v,I*a+C*u+P*p+k*y,I*o+C*c+P*g+k*x,_*r+O*h+F*f+L*m,_*s+O*l+F*d+L*v,_*a+O*u+F*p+L*y,_*o+O*c+F*g+L*x)},fromRotationXYTranslation:function(t,e,n){var i=e.x,r=e.y,s=e.z,a=Math.sin(t.x),o=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=i,c=r,f=s,d=-a,p=0-d*h,g=0-o*h,m=d*l,v=o*l;return n||(u=l*i+h*s,c=p*i+o*r+m*s,f=g*i+a*r+v*s),this.setValues(l,p,g,0,0,o,a,0,h,m,v,0,u,c,f,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],i=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,i))}}),h=new s,l=new s,a=new r,o=new r,u=new r;t.exports=s},function(t,e,n){var i=n(3);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=n(0),r=n(12),s=n(202),a=n(8),o=n(213),h=n(43),l=n(214),u=n(44),c=new i({initialize:function(t,e){this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),this.key=a(e,"key",!1);var n=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+n),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var i=a(e,"url");void 0===i?i=t.path+n+"."+a(e,"extension",""):"string"!=typeof i||i.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)||(i=t.path+i),this.url=i,this.src="",this.xhrSettings=u(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var n=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,i=!(e.target&&200!==e.target.status)||n;4===t.readyState&&400<=t.status&&t.status<=599&&(i=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,i)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,n=this.type;this.loader.emit(s.FILE_COMPLETE,e,n,t),this.loader.emit(s.FILE_KEY_COMPLETE+n+"-"+e,e,n,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,n){var i;"function"==typeof URL?t.src=URL.createObjectURL(e):((i=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||n)+";base64,"+i.result.split(",")[1]},i.onerror=t.onerror,i.readAsDataURL(e))},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var n={},i={install:function(t){for(var e in n)t[e]=n[e]},register:function(t,e){n[t]=e},destroy:function(){n={}}};t.exports=i},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,n=1;n<t.length;n++)if(t[n].length!==e)return!1;return!0}},function(t,e,n){var i=n(0),r=n(294),s=n(59),a=n(295),o=n(25),h=n(296),l=n(301),u=new i({initialize:function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=n,this.height=i},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,n){return a(this,t,e,n)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,n){var u=n(6),c=function(){var t,e,n,i,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);o<h;o++)if(null!=(t=arguments[o]))for(e in t)n=a[e],a!==(i=t[e])&&(l&&i&&(u(i)||(r=Array.isArray(i)))?(s=r?(r=!1,n&&Array.isArray(n)?n:[]):n&&u(n)?n:{},a[e]=c(l,s,i)):void 0!==i&&(a[e]=i));return a};t.exports=c},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(i-e,n-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,n){var i=n(10);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){var i=n(10);t.exports=function(t){return i(t,-180,180)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e)<n}},function(t,e,n){var i=n(33);t.exports=function(t,e){return i(t)/i(e)/i(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,n,i,r){var s=.5*(i-e),a=.5*(r-n),o=t*t;return(2*n-2*i+s+a)*(t*o)+(-3*n+3*i-2*s-a)*o+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:n<=t?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,n,i){var r=Math.cos(i),s=Math.sin(i),a=t.x-e,o=t.y-n;return t.x=a*r-o*s+e,t.y=a*s+o*r+n,t}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,n){var g=n(2);t.exports=function(t,e,n,i,r,s,a,o){void 0===o&&(o=new g);var h=Math.sin(r),l=Math.cos(r),u=l*s,c=h*s,f=-h*a,d=l*a,p=1/(u*d+f*-c);return o.x=d*p*t+-f*p*e+(i*f-n*d)*p,o.y=u*p*e+-c*p*t+(-i*u+n*c)*p,o}},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},fromMat4:function(t){var e=t.val,n=this.val;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=n,t[7]=i,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*s-a*h,c=-l*r+a*o,f=h*r-s*o,d=e*u+n*c+i*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*n+i*h)*d,t[2]=(a*n-i*s)*d,t[3]=c*d,t[4]=(l*e-i*o)*d,t[5]=(-a*e+i*r)*d,t[6]=f*d,t[7]=(-h*e+n*o)*d,t[8]=(s*e-n*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=s*l-a*h,t[1]=i*h-n*l,t[2]=n*a-i*s,t[3]=a*o-r*l,t[4]=e*l-i*o,t[5]=i*r-e*a,t[6]=r*h-s*o,t[7]=n*o-e*h,t[8]=e*s-n*r,this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*s-a*h)+n*(-l*r+a*o)+i*(h*r-s*o)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],g=c[3],m=c[4],v=c[5],y=c[6],x=c[7],M=c[8];return e[0]=f*n+d*s+p*h,e[1]=f*i+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=g*n+m*s+v*h,e[4]=g*i+m*a+v*l,e[5]=g*r+m*o+v*u,e[6]=y*n+x*s+M*h,e[7]=y*i+x*a+M*l,e[8]=y*r+x*o+M*u,this},translate:function(t){var e=this.val,n=t.x,i=t.y;return e[6]=n*e[0]+i*e[3]+e[6],e[7]=n*e[1]+i*e[4]+e[7],e[8]=n*e[2]+i*e[5]+e[8],this},rotate:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*n+h*s,e[1]=l*i+h*a,e[2]=l*r+h*o,e[3]=l*s-h*n,e[4]=l*a-h*i,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,n=t.x,i=t.y;return e[0]=n*e[0],e[1]=n*e[1],e[2]=n*e[2],e[3]=i*e[3],e[4]=i*e[4],e[5]=i*e[5],this},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,a=n+n,o=i+i,h=e*s,l=e*a,u=e*o,c=n*a,f=n*o,d=i*o,p=r*s,g=r*a,m=r*o,v=this.val;return v[0]=1-(c+d),v[3]=l+m,v[6]=u-g,v[1]=l-m,v[4]=1-(h+d),v[7]=f+p,v[2]=u+g,v[5]=f-p,v[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,n=this.val,i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],g=e[12],m=e[13],v=e[14],y=e[15],x=i*h-r*o,M=i*l-s*o,w=i*u-a*o,E=r*l-s*h,T=r*u-a*h,A=s*u-a*l,b=c*m-f*g,R=c*v-d*g,S=c*y-p*g,I=f*v-d*m,C=f*y-p*m,P=d*y-p*v,k=x*P-M*C+w*I+E*S-T*R+A*b;return k?(k=1/k,n[0]=(h*P-l*C+u*I)*k,n[1]=(l*S-o*P-u*R)*k,n[2]=(o*C-h*S+u*b)*k,n[3]=(s*C-r*P-a*I)*k,n[4]=(i*P-s*S+a*R)*k,n[5]=(r*S-i*C-a*b)*k,n[6]=(m*A-v*T+y*E)*k,n[7]=(v*w-g*A-y*M)*k,n[8]=(g*T-m*w+y*x)*k,this):null}});t.exports=i},function(t,e,n){var i=n(0),r=n(41),s=n(1),a=n(11),o=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new a(1,0,0),u=new a(0,1,0),c=new a,f=new r,d=new i({initialize:function(t,e,n,i){this.onChangeCallback=s,this.set(t,e,n,i)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,n,i,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=n||0,this._w=i||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return 0<r&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=n*r,this._w=i*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z,s=this.w;return this.set(n+e*(t.x-n),i+e*(t.y-i),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var n=t.x*e.x+t.y*e.y+t.z*e.z;return n<-.999999?(c.copy(l).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):.999999<n?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+n,this.normalize())},setAxes:function(t,e,n){var i=f.val;return i[0]=e.x,i[3]=e.y,i[6]=e.z,i[1]=n.x,i[4]=n.y,i[7]=n.z,i[2]=-t.x,i[5]=-t.y,i[8]=-t.z,this.fromMat3(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var n=Math.sin(e);return this.set(n*t.x,n*t.y,n*t.z,Math.cos(e))},multiply:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.x,a=t.y,o=t.z,h=t.w;return this.set(e*h+r*s+n*o-i*a,n*h+r*a+i*s-e*o,i*h+r*o+e*a-n*s,r*h-e*s-n*a-i*o)},slerp:function(t,e){var n=this.x,i=this.y,r=this.z,s=this.w,a=t.x,o=t.y,h=t.z,l=t.w,u=n*a+i*o+r*h+s*l;u<0&&(u=-u,a=-a,o=-o,h=-h,l=-l);var c,f,d=1-e,p=e;return 1e-6<1-u&&(c=Math.acos(u),f=Math.sin(c),d=Math.sin((1-e)*c)/f,p=Math.sin(e*c)/f),this.set(d*n+p*a,d*i+p*o,d*r+p*h,d*s+p*l)},invert:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i,s=r?1/r:0;return this.set(-t*s,-e*s,-n*s,i*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+r*s,n*a+i*s,i*a-n*s,r*a-e*s)},rotateY:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a-i*s,n*a+r*s,i*a+e*s,r*a-n*s)},rotateZ:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),a=Math.cos(t);return this.set(e*a+n*s,n*a-e*s,i*a+r*s,r*a-i*s)},calculateW:function(){var t=this.x,e=this.y,n=this.z;return this.w=-Math.sqrt(1-t*t-e*e-n*n),this},setFromEuler:function(t,e){var n=t.x/2,i=t.y/2,r=t.z/2,s=Math.cos(n),a=Math.cos(i),o=Math.cos(r),h=Math.sin(n),l=Math.sin(i),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"YXZ":this.set(h*a*o+s*l*u,s*l*o-h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"ZXY":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u+h*l*o,s*a*o-h*l*u,e);break;case"ZYX":this.set(h*a*o-s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o+h*l*u,e);break;case"YZX":this.set(h*a*o+s*l*u,s*l*o+h*a*u,s*a*u-h*l*o,s*a*o-h*l*u,e);break;case"XZY":this.set(h*a*o-s*l*u,s*l*o-h*a*u,s*a*u+h*l*o,s*a*o+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,n=t.val,i=n[0],r=n[4],s=n[8],a=n[1],o=n[5],h=n[9],l=n[2],u=n[6],c=n[10],f=i+o+c;return 0<f?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(a-r)*e,.25/e)):o<i&&c<i?(e=2*Math.sqrt(1+i-o-c),this.set(.25*e,(r+a)/e,(s+l)/e,(u-h)/e)):c<o?(e=2*Math.sqrt(1+o-i-c),this.set((r+a)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-i-o),this.set((s+l)/e,(h+u)/e,.25*e,(a-r)/e)),this},fromMat3:function(t){var e,n,i,r,s=t.val,a=s[0]+s[4]+s[8];return 0<a?(r=Math.sqrt(a+1),this.w=.5*r,r=.5/r,this._x=(s[7]-s[5])*r,this._y=(s[2]-s[6])*r,this._z=(s[3]-s[1])*r):(e=0,s[4]>s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=o[e],i=o[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(s[3*i+n]-s[3*n+i])*r),this.onChangeCallback(this),this}});t.exports=d},function(t,e,n){var r=n(26),s=n(44);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){var n={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=n},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var n={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=n},function(t,e,n){var i=n(3),r=n(50),h=n(40),s=n(29),a=n(30),l=n(2),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*i.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*i.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.z=n,this.w=i,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=this.scene.sys.scale.width),void 0===i&&(i=this.scene.sys.scale.height),this.x=t+Math.random()*n,this.y=e+Math.random()*i,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var n=this.parentContainer;if(!n)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);n;)e.applyITRS(n.x,n.y,n._rotation,n._scaleX,n._scaleY),e.multiply(t,t),n=n.parentContainer;return t},getLocalPoint:function(t,e,n,i){n=n||new l;var r=(i=i||this.scene.sys.cameras.main).scrollX,s=i.scrollY,a=t+r*this.scrollFactorX-r,o=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,o,n):h(a,o,this.x,this.y,this.rotation,this.scaleX,this.scaleY,n),this._originComponent&&(n.x+=this._displayOriginX,n.y+=this._displayOriginY),n},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=o},function(t,e,n){var i=n(0),s=n(3),c=n(2),r=new i({initialize:function(t,e,n,i,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,n,i,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3];return e||n?0<n?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):i||r?s.TAU-(0<r?Math.acos(-i/this.scaleY):-Math.acos(i/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var n=this.matrix;return n[4]=n[0]*t+n[2]*e+n[4],n[5]=n[1]*t+n[3]*e+n[5],this},scale:function(t,e){var n=this.matrix;return n[0]*=t,n[1]*=t,n[2]*=e,n[3]*=e,this},rotate:function(t){var e=Math.sin(t),n=Math.cos(t),i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3];return i[0]=r*n+a*e,i[1]=s*n+o*e,i[2]=r*-e+a*n,i[3]=s*-e+o*n,this},multiply:function(t,e){var n=this.matrix,i=t.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5],u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],g=i[5],m=void 0===e?this:e;return m.a=u*r+c*a,m.b=u*s+c*o,m.c=f*r+d*a,m.d=f*s+d*o,m.e=p*r+g*a+h,m.f=p*s+g*o+l,m},multiplyWithOffset:function(t,e,n){var i=this.matrix,r=t.matrix,s=i[0],a=i[1],o=i[2],h=i[3],l=e*s+n*o+i[4],u=e*a+n*h+i[5],c=r[0],f=r[1],d=r[2],p=r[3],g=r[4],m=r[5];return i[0]=c*s+f*o,i[1]=c*a+f*h,i[2]=d*s+p*o,i[3]=d*a+p*h,i[4]=g*s+m*o+l,i[5]=g*a+m*h+u,this},transform:function(t,e,n,i,r,s){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],f=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=n*o+i*l,a[3]=n*h+i*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,n){void 0===n&&(n={x:0,y:0});var i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5];return n.x=t*r+e*a+h,n.y=t*s+e*o+l,n},invert:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=e*r-n*i;return t[0]=r/o,t[1]=-n/o,t[2]=-i/o,t[3]=e/o,t[4]=(i*a-r*s)/o,t[5]=-(e*a-n*s)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,n,i,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=n,a[3]=i,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t,e,n=this.decomposedMatrix,i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=r*o-s*a;return n.translateX=i[4],n.translateY=i[5],r||s?(t=Math.sqrt(r*r+s*s),n.rotation=0<s?Math.acos(r/t):-Math.acos(r/t),n.scaleX=t,n.scaleY=h/t):a||o?(e=Math.sqrt(a*a+o*o),n.rotation=.5*Math.PI-(0<o?Math.acos(-a/e):-Math.acos(a/e)),n.scaleX=h/e,n.scaleY=e):(n.rotation=0,n.scaleX=0,n.scaleY=0),n},applyITRS:function(t,e,n,i,r){var s=this.matrix,a=Math.sin(n),o=Math.cos(n);return s[4]=t,s[5]=e,s[0]=o*i,s[1]=a*i,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,n){void 0===n&&(n=new c);var i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=1/(r*o+a*-s);return n.x=o*u*t+-a*u*e+(l*a-h*o)*u,n.y=r*u*e+-s*u*t+(-l*r+h*s)*u,n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,n){var i=this.getX(t,e);return n&&(i=Math.round(i)),i},getYRound:function(t,e,n){var i=this.getY(t,e);return n&&(i=Math.round(i)),i},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e){var n={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=n},function(t,e,n){var i=n(0),r=n(53),s=n(219),a=n(226),o=n(54),h=new i({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,n){return this.scene.sys.input.enable(this,t,e,n),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return n.unshift(this.scene.sys.displayList.getIndex(t)),n},destroy:function(t){var e;void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this),e=this.scene.sys,t||e.displayList.remove(this),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners())}});h.RENDER_MASK=15,t.exports=h},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,n){t.exports={ADDED_TO_SCENE:n(227),DESTROY:n(228),REMOVED_FROM_SCENE:n(229),VIDEO_COMPLETE:n(230),VIDEO_CREATED:n(231),VIDEO_ERROR:n(232),VIDEO_LOOP:n(233),VIDEO_PLAY:n(234),VIDEO_SEEKED:n(235),VIDEO_SEEKING:n(236),VIDEO_STOP:n(237),VIDEO_TIMEOUT:n(238),VIDEO_UNLOCKED:n(239)}},function(t,e){t.exports=function(t){for(var e=t.length,n=t[0].length,i=new Array(n),r=0;r<n;r++){i[r]=new Array(e);for(var s=e-1;-1<s;s--)i[r][s]=t[s][r]}return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var n=null,i=0;i<e;i++)n=t.shift(),t.push(n);return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var n=null,i=0;i<e;i++)n=t.pop(),t.unshift(n);return n}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var n=Math.floor(Math.random()*(e+1)),i=t[e];t[e]=t[n],t[n]=i}return t}},function(t,e,n){var r=n(60),s=n(9);t.exports=function(t,e,n){if(void 0===n&&(n=new s),e<=0||1<=e)return n.x=t.x,n.y=t.y,n;var i=r(t)*e;return.5<e?(i-=t.width+t.height)<=t.width?(n.x=t.right-i,n.y=t.bottom):(n.x=t.x,n.y=t.bottom-(i-t.width)):i<=t.width?(n.x=t.x+i,n.y=t.y):(n.x=t.right,n.y=t.y+(i-t.width)),n}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,n){var i,u=n(62),r=n(0),p=n(7),s=n(174),a=n(175),g=n(199),h=n(200),c=n(218),o=n(249),f=n(1),l=new r({Extends:a,initialize:function(t,e){a.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=g,this.temp1,this.temp2,this.isWebGL?(this.runtime=g.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=g.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:n.scale.width,height:n.scale.height,preRender:f,postRender:f,render:f,destroy:f});var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var a=p(t,"skinName",!1);a&&s.setSkinByName(a);var o=p(t,"slotName",!1),h=p(t,"attachmentName",null);return o&&s.setAttachment(o,h),s.refresh()}),e.registerGameObject("spineContainer",function(t,e,n){var i=new o(this.scene,l,t,e,n);return this.displayList.add(i),i},function(t,e){void 0===t&&(t={});var n=p(t,"x",0),i=p(t,"y",0),r=p(t,"children",null),s=new o(this.scene,l,n,i,r);return void 0!==e&&(t.add=e),u(this.scene,s,t),s})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(s,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new g.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}i||((i=new g.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,i.shapes.setBlendMode=t),this.sceneRenderer=i,this.skeletonRenderer=i.skeletonRenderer,this.skeletonDebugRenderer=i.skeletonDebugRenderer,this.temp1=new g.webgl.Vector3(0,0,0),this.temp2=new g.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new g.TextureAtlas(e.data,function(t){return new g.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new g.TextureAtlas(e.data,function(t){return new g.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var a;if(Array.isArray(t))for(var o=0;o<t.length;o++)a=new h(this,t[o]),this.addFile(a.files);else a=new h(this,t,e,n,i,r,s),this.addFile(a.files);return this},worldToLocal:function(t,e,n,i){var r=this.temp1,s=this.temp2,a=this.sceneRenderer.camera;r.set(t+n.x,e-n.y,0);var o=a.viewportWidth,h=a.viewportHeight;return a.screenToWorld(r,o,h),i&&null!==i.parent?(i.parent.worldToLocal(s.set(r.x-n.x,r.y-n.y,0)),new g.Vector2(s.x,s.y)):i?new g.Vector2(r.x-n.x,r.y-n.y):new g.Vector2(r.x,r.y)},getVector2:function(t,e){return new g.Vector2(t,e)},getVector3:function(t,e,n){return new g.webgl.Vector3(t,e,n)},setDebugBones:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBones=t,this},setDebugRegionAttachments:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawRegionAttachments=t,this},setDebugBoundingBoxes:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBoundingBoxes=t,this},setDebugMeshHull:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshHull=t,this},setDebugMeshTriangles:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshTriangles=t,this},setDebugPaths:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawPaths=t,this},setDebugSkeletonXY:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawSkeletonXY=t,this},setDebugClipping:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawClipping=t,this},setEffect:function(t){return this.sceneRenderer.skeletonRenderer.vertexEffect=t,this},createSkeleton:function(t,e){var n,i=t,r=t,s=-1!==t.indexOf(".");s&&(i=(n=t.split(".")).shift(),r=n.join("."));var a=this.cache.get(i),o=this.getAtlas(i);if(!o)return null;this.spineTextures.has(i)||this.spineTextures.add(i,o);var h,l,u=a.preMultipliedAlpha,c=new g.AtlasAttachmentLoader(o),f=new g.SkeletonJson(c);if(l=e||(h=this.json.get(i),s?p(h,r):h)){var d=f.readSkeletonData(l);return{skeletonData:d,skeleton:new g.Skeleton(d),preMultipliedAlpha:u}}return null},createAnimationState:function(t){var e=new g.AnimationStateData(t.data);return{stateData:e,state:new g.AnimationState(e)}},getBounds:function(t){var e=new g.Vector2,n=new g.Vector2;return t.getBounds(e,n,[]),{offset:e,size:n}},onResize:function(){var t=this.renderer,e=this.sceneRenderer,n=t.width,i=t.height;e.camera.position.x=n/2,e.camera.position.y=i/2,e.camera.setViewport(n,i)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this),this.isWebGL&&this.game.scale.off(s,this.onResize,this)},destroy:function(){this.shutdown(),this.game=null,this.scene=null,this.systems=null,this.cache=null,this.spineTextures=null,this.json=null,this.textures=null,this.skeletonRenderer=null,this.gl=null},gameDestroy:function(){this.destroy(),i&&i.dispose(),this.sceneRenderer=null,this.pluginManager=null,this.pluginManager.removeGameObject("spine",!0,!0),this.pluginManager.removeGameObject("spineContainer",!0,!0)}});l.SpineGameObject=c,l.SpineContainer=o,t.exports=l},function(t,e,n){var l=n(15),u=n(63);t.exports=function(t,e,n){e.x=u(n,"x",0),e.y=u(n,"y",0),e.depth=u(n,"depth",0),e.flipX=u(n,"flipX",!1),e.flipY=u(n,"flipY",!1);var i=u(n,"scale",null);"number"==typeof i?e.setScale(i):null!==i&&(e.scaleX=u(i,"x",1),e.scaleY=u(i,"y",1));var r=u(n,"scrollFactor",null);"number"==typeof r?e.setScrollFactor(r):null!==r&&(e.scrollFactorX=u(r,"x",1),e.scrollFactorY=u(r,"y",1)),e.rotation=u(n,"rotation",0);var s=u(n,"angle",null);null!==s&&(e.angle=s),e.alpha=u(n,"alpha",1);var a,o,h=u(n,"origin",null);return"number"==typeof h?e.setOrigin(h):null!==h&&(a=u(h,"x",.5),o=u(h,"y",.5),e.setOrigin(a,o)),e.blendMode=u(n,"blendMode",l.NORMAL),e.visible=u(n,"visible",!0),u(n,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,n){var r=n(64),s=n(7);t.exports=function(t,e,n){var i=s(t,e,null);if(null===i)return n;if(Array.isArray(i))return r.RND.pick(i);if("object"==typeof i){if(i.hasOwnProperty("randInt"))return r.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return r.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if("function"==typeof i)return i(e);return i}},function(t,e,n){var i=n(3),r=n(26)(!1,r={Angle:n(65),Distance:n(74),Easing:n(82),Fuzzy:n(127),Interpolation:n(132),Pow2:n(140),Snap:n(144),RandomDataGenerator:n(148),Average:n(149),Bernstein:n(32),Between:n(150),CatmullRom:n(34),CeilTo:n(151),Clamp:n(5),DegToRad:n(18),Difference:n(152),Euler:n(153),Factorial:n(33),FloatBetween:n(17),FloorTo:n(154),FromPercent:n(155),GetSpeed:n(156),IsEven:n(157),IsEvenStrict:n(158),Linear:n(35),MaxAdd:n(159),MinSub:n(160),Percent:n(161),RadToDeg:n(20),RandomXY:n(162),RandomXYZ:n(163),RandomXYZW:n(164),Rotate:n(165),RotateAround:n(38),RotateAroundDistance:n(166),RotateTo:n(167),RoundAwayFromZero:n(39),RoundTo:n(168),SinCosTableGenerator:n(169),SmootherStep:n(37),SmoothStep:n(36),ToXY:n(170),TransformXY:n(40),Within:n(171),Wrap:n(10),Vector2:n(2),Vector3:n(11),Vector4:n(172),Matrix3:n(41),Matrix4:n(19),Quaternion:n(42),RotateVec3:n(173)},i);t.exports=r},function(t,e,n){t.exports={Between:n(27),BetweenPoints:n(66),BetweenPointsY:n(67),BetweenY:n(68),CounterClockwise:n(16),Normalize:n(28),Random:n(69),RandomDegrees:n(70),Reverse:n(71),RotateTo:n(72),ShortestBetween:n(73),Wrap:n(29),WrapDegrees:n(30)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(n-t,i-e)}},function(t,e,n){var i=n(17);t.exports=function(){return i(-Math.PI,Math.PI)}},function(t,e,n){var i=n(17);t.exports=function(){return i(-180,180)}},function(t,e,n){var i=n(28);t.exports=function(t){return i(t+Math.PI)}},function(t,e,n){var i=n(3);t.exports=function(t,e,n){return void 0===n&&(n=.05),t===e||(Math.abs(e-t)<=n||Math.abs(e-t)>=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=i.PI2:e-=i.PI2),t<e?t+=n:e<t&&(t-=n))),t}},function(t,e){t.exports=function(t,e){var n=e-t;return 0==n?0:n-360*Math.floor((n+180)/360)}},function(t,e,n){t.exports={Between:n(75),BetweenPoints:n(76),BetweenPointsSquared:n(77),Chebyshev:n(78),Power:n(79),Snake:n(80),Squared:n(81)}},function(t,e){t.exports=function(t,e,n,i){var r=t-n,s=e-i;return Math.sqrt(r*r+s*s)}},function(t,e){t.exports=function(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}},function(t,e){t.exports=function(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}},function(t,e){t.exports=function(t,e,n,i){return Math.max(Math.abs(t-n),Math.abs(e-i))}},function(t,e){t.exports=function(t,e,n,i,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(n-t,r)+Math.pow(i-e,r))}},function(t,e){t.exports=function(t,e,n,i){return Math.abs(t-n)+Math.abs(e-i)}},function(t,e){t.exports=function(t,e,n,i){var r=t-n,s=e-i;return r*r+s*s}},function(t,e,n){t.exports={Back:n(83),Bounce:n(87),Circular:n(91),Cubic:n(95),Elastic:n(99),Expo:n(103),Linear:n(107),Quadratic:n(109),Quartic:n(113),Quintic:n(117),Sine:n(121),Stepped:n(125)}},function(t,e,n){t.exports={In:n(84),Out:n(85),InOut:n(86)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var n=1.525*e;return(t*=2)<1?t*t*((1+n)*t-n)*.5:.5*((t-=2)*t*((1+n)*t+n)+2)}},function(t,e,n){t.exports={In:n(88),Out:n(89),InOut:n(90)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,n){t.exports={In:n(92),Out:n(93),InOut:n(94)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,n){t.exports={In:n(96),Out:n(97),InOut:n(98)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,n){t.exports={In:n(100),Out:n(101),InOut:n(102)}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*--t)*Math.sin((t-i)*(2*Math.PI)/n))}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/n)+1}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-i)*(2*Math.PI)/n)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-i)*(2*Math.PI)/n)*.5+1}},function(t,e,n){t.exports={In:n(104),Out:n(105),InOut:n(106)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,n){t.exports=n(108)},function(t,e){t.exports=function(t){return t}},function(t,e,n){t.exports={In:n(110),Out:n(111),InOut:n(112)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,n){t.exports={In:n(114),Out:n(115),InOut:n(116)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,n){t.exports={In:n(118),Out:n(119),InOut:n(120)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,n){t.exports={In:n(122),Out:n(123),InOut:n(124)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,n){t.exports=n(126)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,n){t.exports={Ceil:n(128),Equal:n(31),Floor:n(129),GreaterThan:n(130),LessThan:n(131)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),e-n<t}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t<e+n}},function(t,e,n){t.exports={Bezier:n(133),CatmullRom:n(134),CubicBezier:n(135),Linear:n(136),QuadraticBezier:n(137),SmoothStep:n(138),SmootherStep:n(139)}},function(t,e,n){var s=n(32);t.exports=function(t,e){for(var n=0,i=t.length-1,r=0;r<=i;r++)n+=Math.pow(1-e,i-r)*Math.pow(e,r)*t[r]*s(i,r);return n}},function(t,e,n){var s=n(34);t.exports=function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i);return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(i-r,t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n])):e<0?t[0]-(s(-i,t[0],t[0],t[1],t[1])-t[0]):1<e?t[n]-(s(i-n,t[n],t[n],t[n-1],t[n-1])-t[n]):s(i-r,t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2])}},function(t,e){t.exports=function(t,e,n,i,r){return(l=1-t)*l*l*e+3*(h=1-(o=t))*h*o*n+3*(1-(a=t))*a*a*i+(s=t)*s*s*r;var s,a,o,h,l}},function(t,e,n){var s=n(35);t.exports=function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i);return e<0?s(t[0],t[1],i):1<e?s(t[n],t[n-1],n-i):s(t[r],t[n<r+1?n:r+1],i-r)}},function(t,e){t.exports=function(t,e,n,i){return(a=1-t)*a*e+2*(1-(s=t))*s*n+(r=t)*r*i;var r,s,a}},function(t,e,n){var i=n(36);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){var i=n(37);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){t.exports={GetNext:n(141),IsSize:n(142),IsValue:n(143)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,n){t.exports={Ceil:n(145),Floor:n(146),To:n(147)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.ceil(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.floor(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.round(t/e),i?(n+t)/e:n+t)}},function(t,e,n){var i=new(n(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,n=this.n;t=t.toString();for(var i=0;i<t.length;i++)e=.02519603282416938*(n+=t.charCodeAt(i)),e-=n=e>>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var n=t[e];this.s0-=this.hash(n),this.s0+=~~(this.s0<0),this.s1-=this.hash(n),this.s1+=~~(this.s1<0),this.s2-=this.hash(n),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){for(var t="",e="",e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;0<e;e--){var n=Math.floor(this.frac()*(e+1)),i=t[n];t[n]=t[e],t[e]=i}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,n=0;n<t.length;n++)e+=+t[n];return e/t.length}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.ceil(t*i)/i}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e,n){var v=n(5),i=n(0),r=n(19),s=n(1),a=new r,o=new i({initialize:function t(e,n,i,r){void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=n,this._z=i,this._order=r,this.onChangeCallback=s},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,n,i){return void 0===i&&(i=this._order),this._x=t,this._y=e,this._z=n,this._order=i,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,n){return void 0===e&&(e=this._order),void 0===n&&(n=!1),a.fromQuat(t),this.setFromRotationMatrix(a,e,n)},setFromRotationMatrix:function(t,e,n){void 0===e&&(e=this._order),void 0===n&&(n=!1);var i=t.val,r=i[0],s=i[4],a=i[8],o=i[1],h=i[5],l=i[9],u=i[2],c=i[6],f=i[10],d=0,p=0,g=0,m=.99999;switch(e){case"XYZ":p=Math.asin(v(a,-1,1)),Math.abs(a)<m?(d=Math.atan2(-l,f),g=Math.atan2(-s,r)):d=Math.atan2(c,h);break;case"YXZ":d=Math.asin(-v(l,-1,1)),Math.abs(l)<m?(p=Math.atan2(a,f),g=Math.atan2(o,h)):p=Math.atan2(-u,r);break;case"ZXY":d=Math.asin(v(c,-1,1)),g=Math.abs(c)<m?(p=Math.atan2(-u,f),Math.atan2(-s,h)):Math.atan2(o,r);break;case"ZYX":p=Math.asin(-v(u,-1,1)),g=Math.abs(u)<m?(d=Math.atan2(c,f),Math.atan2(o,r)):Math.atan2(-s,h);break;case"YZX":g=Math.asin(v(o,-1,1)),p=Math.abs(o)<m?(d=Math.atan2(-l,h),Math.atan2(-u,r)):Math.atan2(a,f);break;case"XZY":g=Math.asin(-v(s,-1,1)),Math.abs(s)<m?(d=Math.atan2(c,h),p=Math.atan2(a,r)):d=Math.atan2(-l,f)}return this._x=d,this._y=p,this._z=g,this._order=e,n&&this.onChangeCallback(this),this}});o.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],o.DefaultOrder="XYZ",t.exports=o},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.floor(t*i)/i}},function(t,e,n){var i=n(5);t.exports=function(t,e,n){return(n-e)*(t=i(t,0,1))}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,n){return Math.min(t+e,n)}},function(t,e){t.exports=function(t,e,n){return Math.max(t-e,n)}},function(t,e){t.exports=function(t,e,n,i){void 0===n&&(n=e+1);var r=(t-e)/(n-e);return 1<r?void 0!==i?(r=(i-t)/(i-n))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI;return t.x=Math.cos(n)*e,t.y=Math.sin(n)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t.x=Math.cos(n)*r,t.y=Math.sin(n)*r,t.z=i*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e){var n=t.x,i=t.y;return t.x=n*Math.cos(e)-i*Math.sin(e),t.y=n*Math.sin(e)+i*Math.cos(e),t}},function(t,e){t.exports=function(t,e,n,i,r){var s=i+Math.atan2(t.y-n,t.x-e);return t.x=e+r*Math.cos(s),t.y=n+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,n,i,r){return t.x=e+r*Math.cos(i),t.y=n+r*Math.sin(i),t}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=1),i*=Math.PI/t;for(var r=[],s=[],a=0;a<t;a++)e+=(n-=e*i)*i,r[a]=n,s[a]=e;return{sin:s,cos:r,length:t}}},function(t,e,n){var a=n(2);t.exports=function(t,e,n,i){void 0===i&&(i=new a);var r=0,s=0;return 0<t&&t<=e*n&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t,i.set(r,s)),i}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0)},clone:function(){return new i(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,n,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+n*n+i*i+r*r)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return e*e+n*n+i*i+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*i-a*n,l=o*n+a*e-r*i,u=o*i+r*n-s*e,c=-r*e-s*n-a*i;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,t.exports=i},function(t,e,n){var i=n(11),r=n(19),s=n(42),a=new r,o=new s,h=new i;t.exports=function(t,e,n){return o.setAxisAngle(e,n),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(176),r=n(0),s=n(177),a=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},function(t,e,n){var i=new(n(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,n){t.exports={ADDED_TO_SCENE:n(178),BOOT:n(179),CREATE:n(180),DESTROY:n(181),PAUSE:n(182),POST_UPDATE:n(183),PRE_UPDATE:n(184),READY:n(185),REMOVED_FROM_SCENE:n(186),RENDER:n(187),RESUME:n(188),SHUTDOWN:n(189),SLEEP:n(190),START:n(191),TRANSITION_COMPLETE:n(192),TRANSITION_INIT:n(193),TRANSITION_OUT:n(194),TRANSITION_START:n(195),TRANSITION_WAKE:n(196),UPDATE:n(197),WAKE:n(198)}},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(le,t){(function(){var i,t,e,d,n,s,r,a,o,k,h,l,u,c,ht,f,p,g,m,j,v,y,x,M,w,E,T,A,b,R,S,I,C,P,Z,_,O,F,L,V,D,N,Y,X,B,U,z,W,q,G,H,K,Q,J,$,tt,et,nt,it,rt,st,at,ot,lt,ut,ct,ft,dt,pt,gt,mt,vt,yt,xt,Mt,wt,Et,Tt,At,bt,Rt,St,It,Ct,Pt,kt=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function _t(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function Ot(t,e){void 0===e&&(e=""),this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.rawDataUris={},this.textureLoader=t,this.pathPrefix=e}function Ft(t){this.atlas=t}function Lt(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}function Vt(t,e,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=u.Normal,this.skinRequired=!1,this.color=new l.Color,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function Dt(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n<t.bones.length;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)}function Nt(t){var e=g.call(this,t,0,!1)||this;return e.bones=new Array,e.bendDirection=1,e.compress=!1,e.stretch=!1,e.uniform=!1,e.mix=1,e.softness=0,e}function Yt(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,i=t.bones.length;n<i;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}function Xt(t){var e=x.call(this,t,0,!1)||this;return e.bones=new Array,e}function Bt(t){this.toLoad=new Array,this.assets={},this.clientId=t}function Ut(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function zt(t){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==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var n,i=t.bones[e],r=void 0;null==i.parent?r=new S.Bone(i,this,null):(n=this.bones[i.parent.index],r=new S.Bone(i,this,n),n.children.push(r)),this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var s=t.slots[e],r=this.bones[s.boneData.index],a=new S.Slot(s,r);this.slots.push(a),this.drawOrder.push(a)}this.ikConstraints=new Array;for(e=0;e<t.ikConstraints.length;e++){var o=t.ikConstraints[e];this.ikConstraints.push(new S.IkConstraint(o,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var h=t.transformConstraints[e];this.transformConstraints.push(new S.TransformConstraint(h,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var l=t.pathConstraints[e];this.pathConstraints.push(new S.PathConstraint(l,this))}this.color=new S.Color(1,1,1,1),this.updateCache()}function Wt(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new C.Pool(function(){return C.Utils.newFloatArray(16)})}function qt(){this.triangulator=new Z.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}function Gt(){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}function Ht(t,e){if(this.deform=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new L.Color,this.darkColor=null==t.darkColor?null:new L.Color,this.setToSetupPose()}function jt(t,e,n){if(this.color=new D.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Zt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,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)}function Kt(t){var e=B.call(this,t,0,!1)||this;return e.bones=new Array,e.rotateMix=0,e.translateMix=0,e.scaleMix=0,e.shearMix=0,e.offsetRotation=0,e.offsetX=0,e.offsetY=0,e.offsetScaleX=0,e.offsetScaleY=0,e.offsetShearY=0,e.relative=!1,e.local=!1,e}function Qt(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new z.Pool(function(){return new Array}),this.polygonIndicesPool=new z.Pool(function(){return new Array})}function Jt(t){var e=Q.call(this,t)||this;return e.color=new K.Color(1,1,1,1),e}function $t(t){var e=tt.call(this,t)||this;return e.color=new $.Color(.2275,.2275,.8078,1),e}function te(t){var e=it.call(this,t)||this;return e.color=new nt.Color(1,1,1,1),e.tempColor=new nt.Color(0,0,0,0),e}function ee(t){var e=at.call(this,t)||this;return e.closed=!1,e.constantSpeed=!1,e.color=new st.Color(1,1,1,1),e}function ne(t){var e=ut.call(this,t)||this;return e.color=new lt.Color(.38,.94,0,1),e}function ie(t){var e=dt.call(this,t)||this;return e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.rotation=0,e.width=0,e.height=0,e.color=new ft.Color(1,1,1,1),e.offset=ft.Utils.newFloatArray(8),e.uvs=ft.Utils.newFloatArray(8),e.tempColor=new ft.Color(1,1,1,1),e}function re(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}function se(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}function ae(t){return void 0===t&&(t=""),wt.call(this,function(t){return new xt.canvas.CanvasTexture(t)},t)||this}function oe(t){return bt.call(this,t)||this}function he(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=It.Utils.newFloatArray(8192),this.tempColor=new It.Color,this.ctx=t}!function(B){var U,t,m,e,n,i,z=(r.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},r.prototype.apply=function(t,e,n,i,r,s,a,o){if(null==t)throw new Error("skeleton cannot be null.");i&&0!=this.duration&&(n%=this.duration,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l<u;l++)h[l].apply(t,e,n,r,s,a,o)},r.binarySearch=function(t,e,n){void 0===n&&(n=1);var i=0,r=t.length/n-2;if(0==r)return n;for(var s=r>>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(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.timelineIds=[];for(var i=0;i<e.length;i++)this.timelineIds[e[i].getPropertyId()]=!0;this.duration=n}B.Animation=z,(t=U=B.MixBlend||(B.MixBlend={}))[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",(e=m=B.MixDirection||(B.MixDirection={}))[e.mixIn=0]="mixIn",e[e.mixOut=1]="mixOut",(i=n=B.TimelineType||(B.TimelineType={}))[i.rotate=0]="rotate",i[i.translate=1]="translate",i[i.scale=2]="scale",i[i.shear=3]="shear",i[i.attachment=4]="attachment",i[i.color=5]="color",i[i.deform=6]="deform",i[i.event=7]="event",i[i.drawOrder=8]="drawOrder",i[i.ikConstraint=9]="ikConstraint",i[i.transformConstraint=10]="transformConstraint",i[i.pathConstraintPosition=11]="pathConstraintPosition",i[i.pathConstraintSpacing=12]="pathConstraintSpacing",i[i.pathConstraintMix=13]="pathConstraintMix",i[i.twoColor=14]="twoColor";var s=(y.prototype.getFrameCount=function(){return this.curves.length/y.BEZIER_SIZE+1},y.prototype.setLinear=function(t){this.curves[t*y.BEZIER_SIZE]=y.LINEAR},y.prototype.setStepped=function(t){this.curves[t*y.BEZIER_SIZE]=y.STEPPED},y.prototype.getCurveType=function(t){var e=t*y.BEZIER_SIZE;if(e==this.curves.length)return y.LINEAR;var n=this.curves[e];return n==y.LINEAR?y.LINEAR:n==y.STEPPED?y.STEPPED:y.BEZIER},y.prototype.setCurve=function(t,e,n,i,r){var s=.03*(2*-e+i),a=.03*(2*-n+r),o=.006*(3*(e-i)+1),h=.006*(3*(n-r)+1),l=2*s+o,u=2*a+h,c=.3*e+s+.16666667*o,f=.3*n+a+.16666667*h,d=t*y.BEZIER_SIZE,p=this.curves;p[d++]=y.BEZIER;for(var g=c,m=f,v=d+y.BEZIER_SIZE-1;d<v;d+=2)p[d]=g,p[d+1]=m,c+=l,f+=u,l+=o,u+=h,g+=c,m+=f},y.prototype.getCurvePercent=function(t,e){e=B.MathUtils.clamp(e,0,1);var n=this.curves,i=t*y.BEZIER_SIZE,r=n[i];if(r==y.LINEAR)return e;if(r==y.STEPPED)return 0;for(var s=0,a=++i,o=i+y.BEZIER_SIZE-1;i<o;i+=2)if(e<=(s=n[i])){var h=void 0,l=void 0;return(l=i==a?h=0:(h=n[i-2],n[i-1]))+(n[i+1]-l)*(e-h)/(s-h)}var u=n[i-1];return u+(1-u)*(e-s)/(1-s)},y.LINEAR=0,y.STEPPED=1,y.BEZIER=2,y.BEZIER_SIZE=19,y);function y(t){if(t<=0)throw new Error("frameCount must be > 0: "+t);this.curves=B.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}B.CurveTimeline=s;var a,o=(kt(v,a=s),v.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=n},v.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return void(h.rotation=h.data.rotation);case U.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(n>=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case U.setup:h.rotation=h.data.rotation+u*r;break;case U.first:case U.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case U.add:h.rotation+=u*r}}else{var c=z.binarySearch(o,n,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(n-d)/(o[c+v.PREV_TIME]-d)),g=f+((g=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-g/360|0)))*p;switch(s){case U.setup:h.rotation=h.data.rotation+(g-360*(16384-(16384.499999999996-g/360|0)))*r;break;case U.first:case U.replace:g+=h.data.rotation-h.rotation;case U.add:h.rotation+=(g-360*(16384-(16384.499999999996-g/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t<<1),e}B.RotateTimeline=o;var h,l=(kt(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.x=h.data.x,void(h.y=h.data.y);case U.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,u,c,f=0,d=0;switch(n>=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=z.binarySearch(o,n,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case U.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case U.first:case U.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case U.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*p.ENTRIES),e}B.TranslateTimeline=l;var u,c=(kt(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case U.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,u,c,f=0,d=0;if(d=n>=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=z.binarySearch(o,n,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==U.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,g=0;if(a==m.mixOut)switch(s){case U.setup:p=h.data.scaleX,g=h.data.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(d)*B.MathUtils.signum(g)-g)*r;break;case U.first:case U.replace:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(d)*B.MathUtils.signum(g)-g)*r;break;case U.add:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=g+(Math.abs(d)*B.MathUtils.signum(g)-h.data.scaleY)*r}else switch(s){case U.setup:p=Math.abs(h.data.scaleX)*B.MathUtils.signum(f),g=Math.abs(h.data.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=g+(d-g)*r;break;case U.first:case U.replace:p=Math.abs(h.scaleX)*B.MathUtils.signum(f),g=Math.abs(h.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=g+(d-g)*r;break;case U.add:p=B.MathUtils.signum(f),g=B.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*g+(d-Math.abs(h.data.scaleY)*g)*r}}}},x);function x(t){return u.call(this,t)||this}B.ScaleTimeline=c;var f,d=(kt(g,f=l),g.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},g.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case U.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,u,c,f=0,d=0;switch(n>=o[o.length-g.ENTRIES]?(f=o[o.length+g.PREV_X],d=o[o.length+g.PREV_Y]):(f=o[(l=z.binarySearch(o,n,g.ENTRIES))+g.PREV_X],d=o[l+g.PREV_Y],u=o[l],c=this.getCurvePercent(l/g.ENTRIES-1,1-(n-u)/(o[l+g.PREV_TIME]-u)),f+=(o[l+g.X]-f)*c,d+=(o[l+g.Y]-d)*c),s){case U.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case U.first:case U.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case U.add:h.shearX+=f*r,h.shearY+=d*r}}},g);function g(t){return f.call(this,t)||this}B.ShearTimeline=d;var M,w=(kt(E,M=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n<h[0])switch(s){case U.setup:return void o.color.setFromColor(o.data.color);case U.first:var l=o.color,u=o.data.color;l.add((u.r-l.r)*r,(u.g-l.g)*r,(u.b-l.b)*r,(u.a-l.a)*r)}else{var c,f,d,p,g=0,m=0,v=0,y=0;n>=h[h.length-E.ENTRIES]?(g=h[(c=h.length)+E.PREV_R],m=h[c+E.PREV_G],v=h[c+E.PREV_B],y=h[c+E.PREV_A]):(g=h[(f=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],m=h[f+E.PREV_G],v=h[f+E.PREV_B],y=h[f+E.PREV_A],d=h[f],p=this.getCurvePercent(f/E.ENTRIES-1,1-(n-d)/(h[f+E.PREV_TIME]-d)),g+=(h[f+E.R]-g)*p,m+=(h[f+E.G]-m)*p,v+=(h[f+E.B]-v)*p,y+=(h[f+E.A]-y)*p),1==r?o.color.set(g,m,v,y):(l=o.color,s==U.setup&&l.setFromColor(o.data.color),l.add((g-l.r)*r,(m-l.g)*r,(v-l.b)*r,(y-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=M.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*E.ENTRIES),e}B.ColorTimeline=w;var T,A=(kt(b,T=s),b.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,n,i,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=n,this.frames[t+b.G]=i,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n<h[0])switch(s){case U.setup:return o.color.setFromColor(o.data.color),void o.darkColor.setFromColor(o.data.darkColor);case U.first:var l=o.color,u=o.darkColor,c=o.data.color,f=o.data.darkColor;l.add((c.r-l.r)*r,(c.g-l.g)*r,(c.b-l.b)*r,(c.a-l.a)*r),u.add((f.r-u.r)*r,(f.g-u.g)*r,(f.b-u.b)*r,0)}else{var d,p,g,m,v=0,y=0,x=0,M=0,w=0,E=0,T=0;n>=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],y=h[d+b.PREV_G],x=h[d+b.PREV_B],M=h[d+b.PREV_A],w=h[d+b.PREV_R2],E=h[d+b.PREV_G2],T=h[d+b.PREV_B2]):(v=h[(p=z.binarySearch(h,n,b.ENTRIES))+b.PREV_R],y=h[p+b.PREV_G],x=h[p+b.PREV_B],M=h[p+b.PREV_A],w=h[p+b.PREV_R2],E=h[p+b.PREV_G2],T=h[p+b.PREV_B2],g=h[p],m=this.getCurvePercent(p/b.ENTRIES-1,1-(n-g)/(h[p+b.PREV_TIME]-g)),v+=(h[p+b.R]-v)*m,y+=(h[p+b.G]-y)*m,x+=(h[p+b.B]-x)*m,M+=(h[p+b.A]-M)*m,w+=(h[p+b.R2]-w)*m,E+=(h[p+b.G2]-E)*m,T+=(h[p+b.B2]-T)*m),1==r?(o.color.set(v,y,x,M),o.darkColor.set(w,E,T,1)):(l=o.color,u=o.darkColor,s==U.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(y-l.g)*r,(x-l.b)*r,(M-l.a)*r),u.add((w-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=T.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*b.ENTRIES),e}B.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=m.mixOut?n<(o=this.frames)[0]?s!=U.setup&&s!=U.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=o[o.length-1]?o.length-1:z.binarySearch(o,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==U.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=B.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}B.AttachmentTimeline=R;var I,C=null,P=(kt(k,I=s),k.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},k.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},k.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof B.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=U.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(n<f[0]){var d=h;switch(s){case U.setup:return void(l.length=0);case U.first:if(1==r){l.length=0;break}var p=B.Utils.setArraySize(l,c);if(null==d.bones)for(var g=d.vertices,m=0;m<c;m++)p[m]+=(g[m]-p[m])*r;else for(r=1-r,m=0;m<c;m++)p[m]*=r}}else{var v=B.Utils.setArraySize(l,c);if(n>=f[f.length-1]){var y=u[f.length-1];if(1==r)if(s==U.add)if(null==(d=h).bones)for(var g=d.vertices,x=0;x<c;x++)v[x]+=y[x]-g[x];else for(var M=0;M<c;M++)v[M]+=y[M];else B.Utils.arrayCopy(y,0,v,0,c);else switch(s){case U.setup:if(null==h.bones)for(var g=h.vertices,w=0;w<c;w++){var E=g[w];v[w]=E+(y[w]-E)*r}else for(var T=0;T<c;T++)v[T]=y[T]*r;break;case U.first:case U.replace:for(var A=0;A<c;A++)v[A]+=(y[A]-v[A])*r;break;case U.add:if(null==(d=h).bones)for(var g=d.vertices,b=0;b<c;b++)v[b]+=(y[b]-g[b])*r;else for(var R=0;R<c;R++)v[R]+=y[R]*r}}else{var S=z.binarySearch(f,n),I=u[S-1],C=u[S],P=f[S],k=this.getCurvePercent(S-1,1-(n-P)/(f[S-1]-P));if(1==r)if(s==U.add)if(null==(d=h).bones)for(var g=d.vertices,_=0;_<c;_++){var O=I[_];v[_]+=O+(C[_]-O)*k-g[_]}else for(var F=0;F<c;F++)O=I[F],v[F]+=O+(C[F]-O)*k;else for(var L=0;L<c;L++)O=I[L],v[L]=O+(C[L]-O)*k;else switch(s){case U.setup:if(null==h.bones)for(var g=h.vertices,V=0;V<c;V++)O=I[V],E=g[V],v[V]=E+(O+(C[V]-O)*k-E)*r;else for(var D=0;D<c;D++)O=I[D],v[D]=(O+(C[D]-O)*k)*r;break;case U.first:case U.replace:for(var N=0;N<c;N++)O=I[N],v[N]+=(O+(C[N]-O)*k-v[N])*r;break;case U.add:if(null==(d=h).bones)for(var g=d.vertices,Y=0;Y<c;Y++)O=I[Y],v[Y]+=(O+(C[Y]-O)*k-g[Y])*r;else for(var X=0;X<c;X++)O=I[X],v[X]+=(O+(C[X]-O)*k)*r}}}}}},k);function k(t){var e=I.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==C&&(C=B.Utils.newFloatArray(64)),e}B.DeformTimeline=P;var _=(O.prototype.getPropertyId=function(){return n.event<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},O.prototype.apply=function(t,e,n,i,r,s,a){if(null!=i){var o=this.frames,h=this.frames.length;if(n<e)this.apply(t,e,Number.MAX_VALUE,i,r,s,a),e=-1;else if(e>=o[h-1])return;if(!(n<o[0])){var l=0;if(e<o[0])l=0;else for(var u=o[l=z.binarySearch(o,e)];0<l&&o[l-1]==u;)l--;for(;l<h&&n>=o[l];l++)i.push(this.events[l])}}},O);function O(t){this.frames=B.Utils.newFloatArray(t),this.events=new Array(t)}B.EventTimeline=_;var F=(L.prototype.getPropertyId=function(){return n.drawOrder<<24},L.prototype.getFrameCount=function(){return this.frames.length},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},L.prototype.apply=function(t,e,n,i,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=m.mixOut){var l=this.frames;if(n<l[0])s!=U.setup&&s!=U.first||B.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var u=0,u=n>=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)B.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f<d;f++)o[f]=h[c[f]]}}else s==U.setup&&B.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},L);function L(t){this.frames=B.Utils.newFloatArray(t),this.drawOrders=new Array(t)}B.DrawOrderTimeline=F;var V,D=(kt(N,V=s),N.prototype.getPropertyId=function(){return(n.ikConstraint<<24)+this.ikConstraintIndex},N.prototype.setFrame=function(t,e,n,i,r,s,a){t*=N.ENTRIES,this.frames[t]=e,this.frames[t+N.MIX]=n,this.frames[t+N.SOFTNESS]=i,this.frames[t+N.BEND_DIRECTION]=r,this.frames[t+N.COMPRESS]=s?1:0,this.frames[t+N.STRETCH]=a?1:0},N.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u,c,f=this.frames,d=t.ikConstraints[this.ikConstraintIndex];if(d.active)if(n<f[0])switch(s){case U.setup:return d.mix=d.data.mix,d.softness=d.data.softness,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,void(d.stretch=d.data.stretch);case U.first:d.mix+=(d.data.mix-d.mix)*r,d.softness+=(d.data.softness-d.softness)*r,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch}else n>=f[f.length-N.ENTRIES]?s==U.setup?(d.mix=d.data.mix+(f[f.length+N.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+N.PREV_SOFTNESS]-d.data.softness)*r,a==m.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(d.mix+=(f[f.length+N.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+N.PREV_SOFTNESS]-d.softness)*r,a==m.mixIn&&(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(h=f[(o=z.binarySearch(f,n,N.ENTRIES))+N.PREV_MIX],l=f[o+N.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/N.ENTRIES-1,1-(n-u)/(f[o+N.PREV_TIME]-u)),s==U.setup?(d.mix=d.data.mix+(h+(f[o+N.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+N.SOFTNESS]-l)*c-d.data.softness)*r,a==m.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])):(d.mix+=(h+(f[o+N.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+N.SOFTNESS]-l)*c-d.softness)*r,a==m.mixIn&&(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*N.ENTRIES),e}B.IkConstraintTimeline=D;var Y,X=(kt(W,Y=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n<o[0]){var l=h.data;switch(s){case U.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case U.first:h.rotateMix+=(l.rotateMix-h.rotateMix)*r,h.translateMix+=(l.translateMix-h.translateMix)*r,h.scaleMix+=(l.scaleMix-h.scaleMix)*r,h.shearMix+=(l.shearMix-h.shearMix)*r}}else{var u,c,f,d,p=0,g=0,m=0,v=0;n>=o[o.length-W.ENTRIES]?(p=o[(u=o.length)+W.PREV_ROTATE],g=o[u+W.PREV_TRANSLATE],m=o[u+W.PREV_SCALE],v=o[u+W.PREV_SHEAR]):(p=o[(c=z.binarySearch(o,n,W.ENTRIES))+W.PREV_ROTATE],g=o[c+W.PREV_TRANSLATE],m=o[c+W.PREV_SCALE],v=o[c+W.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(n-f)/(o[c+W.PREV_TIME]-f)),p+=(o[c+W.ROTATE]-p)*d,g+=(o[c+W.TRANSLATE]-g)*d,m+=(o[c+W.SCALE]-m)*d,v+=(o[c+W.SHEAR]-v)*d),s==U.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(g-l.translateMix)*r,h.scaleMix=l.scaleMix+(m-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(g-h.translateMix)*r,h.scaleMix+=(m-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=Y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*W.ENTRIES),e}B.TransformConstraintTimeline=X;var q,G=(kt(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return void(h.position=h.data.position);case U.first:h.position+=(h.data.position-h.position)*r}else{var l,u,c,f=0;n>=o[o.length-H.ENTRIES]?f=o[o.length+H.PREV_VALUE]:(f=o[(l=z.binarySearch(o,n,H.ENTRIES))+H.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(o[l+H.PREV_TIME]-u)),f+=(o[l+H.VALUE]-f)*c),s==U.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*H.ENTRIES),e}B.PathConstraintPositionTimeline=G;var j,Z=(kt(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return void(h.spacing=h.data.spacing);case U.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,u,c,f=0;n>=o[o.length-K.ENTRIES]?f=o[o.length+K.PREV_VALUE]:(f=o[(l=z.binarySearch(o,n,K.ENTRIES))+K.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(o[l+K.PREV_TIME]-u)),f+=(o[l+K.VALUE]-f)*c),s==U.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}B.PathConstraintSpacingTimeline=Z;var Q,J=(kt($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case U.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,u,c,f=0,d=0;n>=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=z.binarySearch(o,n,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==U.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*$.ENTRIES),e}B.PathConstraintMixTimeline=J}(St=St||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n<i;n++){var r=e[n];if(null!=r){r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var s=t*r.timeScale;if(0<r.delay){if(r.delay-=s,0<r.delay)continue;s=-r.delay,r.delay=0}var a=r.next;if(null!=a){var o=r.trackLast-a.delay;if(0<=o){for(a.delay=0,a.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*a.timeScale,r.trackTime+=s,this.setCurrent(n,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0<t.mixTime&&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)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r<s;r++){var a=n[r];if(!(null==a||0<a.delay)){i=!0;var o=0==r?R.MixBlend.first:a.mixBlend,h=a.alpha;null!=a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d<c;d++){R.Utils.webkit602BugfixHelper(h,o);var p=f[d];p instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(p,t,u,o,!0):p.apply(t,l,u,e,h,o,R.MixDirection.mixIn)}else{var g=a.timelineMode,m=0==a.timelinesRotation.length;m&&R.Utils.setArraySize(a.timelinesRotation,c<<1,null);for(var v=a.timelinesRotation,d=0;d<c;d++){var y=f[d],x=g[d]==S.SUBSEQUENT?o:R.MixBlend.setup;y instanceof R.RotateTimeline?this.applyRotateTimeline(y,t,u,h,x,v,d<<1,m):y instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(y,t,u,o,!0):(R.Utils.webkit602BugfixHelper(h,o),y.apply(t,l,u,e,h,x,R.MixDirection.mixIn))}}this.queueEvents(a,u),e.length=0,a.nextAnimationLast=u,a.nextTrackLast=a.trackTime}}for(var M=this.unkeyedState+S.SETUP,w=t.slots,E=0,T=t.slots.length;E<T;E++){var A,b=w[E];b.attachmentState==M&&(A=b.data.attachmentName,b.attachment=null==A?null:t.getAttachment(b.data.index,A))}return this.unkeyedState+=2,this.queue.drain(),i},S.prototype.applyMixingFrom=function(t,e,n){var i=t.mixingFrom;null!=i.mixingFrom&&this.applyMixingFrom(i,e,n);var r=0;0==t.mixDuration?(r=1,n==R.MixBlend.first&&(n=R.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),n!=R.MixBlend.first&&(n=i.mixBlend));var s=r<i.eventThreshold?this.events:null,a=r<i.attachmentThreshold,o=r<i.drawOrderThreshold,h=i.animationLast,l=i.getAnimationTime(),u=i.animation.timelines.length,c=i.animation.timelines,f=i.alpha*t.interruptAlpha,d=f*(1-r);if(n==R.MixBlend.add)for(var p=0;p<u;p++)c[p].apply(e,h,l,s,d,n,R.MixDirection.mixOut);else{var g=i.timelineMode,m=i.timelineHoldMix,v=0==i.timelinesRotation.length;v&&R.Utils.setArraySize(i.timelinesRotation,u<<1,null);for(var y=i.timelinesRotation,p=i.totalAlpha=0;p<u;p++){var x=c[p],M=R.MixDirection.mixOut,w=void 0,E=0;switch(g[p]){case S.SUBSEQUENT:if(!o&&x instanceof R.DrawOrderTimeline)continue;w=n,E=d;break;case S.FIRST:w=R.MixBlend.setup,E=d;break;case S.HOLD_SUBSEQUENT:w=n,E=f;break;case S.HOLD_FIRST:w=R.MixBlend.setup,E=f;break;default:w=R.MixBlend.setup;var T=m[p],E=f*Math.max(0,1-T.mixTime/T.mixDuration)}i.totalAlpha+=E,x instanceof R.RotateTimeline?this.applyRotateTimeline(x,e,l,E,w,y,p<<1,v):x instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,w,a):(R.Utils.webkit602BugfixHelper(E,n),o&&x instanceof R.DrawOrderTimeline&&w==R.MixBlend.setup&&(M=R.MixDirection.mixIn),x.apply(e,h,l,s,E,w,M))}}return 0<t.mixDuration&&this.queueEvents(i,l),this.events.length=0,i.nextAnimationLast=l,i.nextTrackLast=i.trackTime,r},S.prototype.applyAttachmentTimeline=function(t,e,n,i,r){var s,a,o=e.slots[t.slotIndex];o.bone.active&&(n<(s=t.frames)[0]?i!=R.MixBlend.setup&&i!=R.MixBlend.first||this.setAttachment(e,o,o.data.attachmentName,r):(a=n>=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,a,o){if(o&&(s[a]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(n<l[0])switch(r){case R.MixBlend.setup:u.rotation=u.data.rotation;default:return;case R.MixBlend.first:c=u.rotation,f=u.data.rotation}else{var d,p,g,m,c=r==R.MixBlend.setup?u.data.rotation:u.rotation;n>=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],g=l[d],m=h.getCurvePercent((d>>1)-1,1-(n-g)/(l[d+R.RotateTimeline.PREV_TIME]-g)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*m+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,y,x,M,w=0,E=f-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[a]:(y=v=0,y=o?(v=0,E):(v=s[a],s[a+1]),x=0<E,M=0<=v,R.MathUtils.signum(y)!=R.MathUtils.signum(E)&&Math.abs(y)<=90&&(180<Math.abs(v)&&(v+=360*R.MathUtils.signum(v)),M=x),w=E+v-v%360,M!=x&&(w+=360*R.MathUtils.signum(v)),s[a]=w),s[a+1]=E,c+=w*i,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}}else t.apply(e,0,n,null,1,r,R.MixDirection.mixIn)},S.prototype.queueEvents=function(t,e){for(var n=t.animationStart,i=t.animationEnd,r=i-n,s=t.trackLast%r,a=this.events,o=0,h=a.length;o<h;o++){var l=a[o];if(l.time<s)break;l.time>i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast<i)&&this.queue.complete(t);o<h;o++)a[o].time<n||this.queue.event(t,a[o])},S.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()},S.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 i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0<i.mixDuration&&(e.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(e)},S.prototype.setAnimation=function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,i,n)},S.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var i=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,i=!1):this.disposeNext(r));var s=this.trackEntry(t,e,n,r);return this.setCurrent(t,s,i),this.queue.drain(),s},S.prototype.addAnimation=function(t,e,n,i){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,i)},S.prototype.addAnimationWith=function(t,e,n,i){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s,a=this.trackEntry(t,e,n,r);return null==r?(this.setCurrent(t,a,!0),this.queue.drain()):(r.next=a,i<=0&&(0!=(s=r.animationEnd-r.animationStart)?(r.loop?i+=s*(1+(r.trackTime/s|0)):i+=Math.max(s,r.trackTime),i-=this.data.getMix(r.animation,e)):i=r.trackTime)),a.delay=i,a},S.prototype.setEmptyAnimation=function(t,e){var n=this.setAnimationWith(t,S.emptyAnimation,!1);return n.mixDuration=e,n.trackEnd=e,n},S.prototype.addEmptyAnimation=function(t,e,n){n<=0&&(n-=e);var i=this.addAnimationWith(t,S.emptyAnimation,!1,n);return i.mixDuration=e,i.trackEnd=e,i},S.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n<i;n++){var r=this.tracks[n];null!=r&&this.setEmptyAnimation(r.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},S.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(R.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},S.prototype.trackEntry=function(t,e,n,i){var r=this.trackEntryPool.obtain();return r.trackIndex=t,r.animation=e,r.loop=n,r.holdPrevious=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.interruptAlpha=1,r.mixTime=0,r.mixDuration=null==i?0:this.data.getMix(i.animation,e),r.mixBlend=R.MixBlend.replace,r},S.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},S.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var t=0,e=this.tracks.length;t<e;t++){var n=this.tracks[t];if(null!=n){for(;null!=n.mixingFrom;)n=n.mixingFrom;for(;null!=n.mixingFrom&&n.mixBlend==R.MixBlend.add||this.computeHold(n),null!=(n=n.mixingTo););}}},S.prototype.computeHold=function(t){var e=t.mixingTo,n=t.animation.timelines,i=t.animation.timelines.length,r=R.Utils.setArraySize(t.timelineMode,i);t.timelineHoldMix.length=0;var s=R.Utils.setArraySize(t.timelineHoldMix,i),a=this.propertyIDs;if(null!=e&&e.holdPrevious)for(var o=0;o<i;o++)r[o]=a.add(n[o].getPropertyId())?S.HOLD_FIRST:S.HOLD_SUBSEQUENT;else t:for(o=0;o<i;o++){var h=n[o],l=h.getPropertyId();if(a.add(l))if(null==e||h instanceof R.AttachmentTimeline||h instanceof R.DrawOrderTimeline||h instanceof R.EventTimeline||!e.animation.hasTimeline(l))r[o]=S.FIRST;else{for(var u=e.mixingTo;null!=u;u=u.mixingTo)if(!u.animation.hasTimeline(l)){if(0<t.mixDuration){r[o]=S.HOLD_MIX,s[o]=u;continue t}break}r[o]=S.HOLD_FIRST}else r[o]=S.SUBSEQUENT}},S.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("<empty>",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.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},n.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)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,i,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n<t.length;n+=2){var i=t[n],r=t[n+1];switch(i){case o.start:null!=r.listener&&r.listener.start&&r.listener.start(r);for(var s=0;s<e.length;s++)e[s].start&&e[s].start(r);break;case o.interrupt:for(null!=r.listener&&r.listener.interrupt&&r.listener.interrupt(r),s=0;s<e.length;s++)e[s].interrupt&&e[s].interrupt(r);break;case o.end:for(null!=r.listener&&r.listener.end&&r.listener.end(r),s=0;s<e.length;s++)e[s].end&&e[s].end(r);case o.dispose:for(null!=r.listener&&r.listener.dispose&&r.listener.dispose(r),s=0;s<e.length;s++)e[s].dispose&&e[s].dispose(r);this.animState.trackEntryPool.free(r);break;case o.complete:for(null!=r.listener&&r.listener.complete&&r.listener.complete(r),s=0;s<e.length;s++)e[s].complete&&e[s].complete(r);break;case o.event:var a=t[2+n++];for(null!=r.listener&&r.listener.event&&r.listener.event(r,a),s=0;s<e.length;s++)e[s].event&&e[s].event(r,a)}}this.clear(),this.drainDisabled=!1}},s.prototype.clear=function(){this.objects.length=0},s);function s(t){this.objects=[],this.drainDisabled=!1,this.animState=t}R.EventQueue=r,(i=o=R.EventType||(R.EventType={}))[i.start=0]="start",i[i.interrupt=1]="interrupt",i[i.end=2]="end",i[i.dispose=3]="dispose",i[i.complete=4]="complete",i[i.event=5]="event";var a=(h.prototype.start=function(t){},h.prototype.interrupt=function(t){},h.prototype.end=function(t){},h.prototype.dispose=function(t){},h.prototype.complete=function(t){},h.prototype.event=function(t,e){},h);function h(){}R.AnimationStateAdapter=a}(St=St||{}),t=St=St||{},_t.prototype.setMix=function(t,e,n){var i=this.skeletonData.findAnimation(t);if(null==i)throw new Error("Animation not found: "+t);var r=this.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);this.setMixWith(i,r,n)},_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 i=t.name+"."+e.name;this.animationToMixTime[i]=n},_t.prototype.getMix=function(t,e){var n=t.name+"."+e.name,i=this.animationToMixTime[n];return void 0===i?this.defaultMix:i},e=_t,t.AnimationStateData=e,d=St=St||{},Ot.prototype.downloadText=function(t,e,n){var i=new XMLHttpRequest;i.overrideMimeType("text/html"),this.rawDataUris[t]&&(t=this.rawDataUris[t]),i.open("GET",t,!0),i.onload=function(){200==i.status?e(i.responseText):n(i.status,i.responseText)},i.onerror=function(){n(i.status,i.responseText)},i.send()},Ot.prototype.downloadBinary=function(t,e,n){var i=new XMLHttpRequest;this.rawDataUris[t]&&(t=this.rawDataUris[t]),i.open("GET",t,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status?e(new Uint8Array(i.response)):n(i.status,i.responseText)},i.onerror=function(){n(i.status,i.responseText)},i.send()},Ot.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},Ot.prototype.loadBinary=function(n,e,i){var r=this;void 0===e&&(e=null),void 0===i&&(i=null),n=this.pathPrefix+n,this.toLoad++,this.downloadBinary(n,function(t){r.assets[n]=t,e&&e(n,t),r.toLoad--,r.loaded++},function(t,e){r.errors[n]="Couldn't load binary "+n+": status "+status+", "+e,i&&i(n,"Couldn't load binary "+n+": status "+status+", "+e),r.toLoad--,r.loaded++})},Ot.prototype.loadText=function(n,e,i){var r=this;void 0===e&&(e=null),void 0===i&&(i=null),n=this.pathPrefix+n,this.toLoad++,this.downloadText(n,function(t){r.assets[n]=t,e&&e(n,t),r.toLoad--,r.loaded++},function(t,e){r.errors[n]="Couldn't load text "+n+": status "+status+", "+e,i&&i(n,"Couldn't load text "+n+": status "+status+", "+e),r.toLoad--,r.loaded++})},Ot.prototype.loadTexture=function(n,i,e){var r=this;void 0===i&&(i=null),void 0===e&&(e=null);var s=n=this.pathPrefix+n;this.toLoad++;var a=new Image;a.crossOrigin="anonymous",a.onload=function(t){var e=r.textureLoader(a);r.assets[s]=e,r.toLoad--,r.loaded++,i&&i(n,a)},a.onerror=function(t){r.errors[n]="Couldn't load image "+n,r.toLoad--,r.loaded++,e&&e(n,"Couldn't load image "+n)},this.rawDataUris[n]&&(n=this.rawDataUris[n]),a.src=n},Ot.prototype.loadTextureAtlas=function(h,l,u){var c=this;void 0===l&&(l=null),void 0===u&&(u=null);var f=0<=h.lastIndexOf("/")?h.substring(0,h.lastIndexOf("/")):"";h=this.pathPrefix+h,this.toLoad++,this.downloadText(h,function(s){var a={count:0},o=new Array;try{new d.TextureAtlas(s,function(t){o.push(""==f?t:f+"/"+t);var e=document.createElement("img");return e.width=16,e.height=16,new d.FakeTexture(e)})}catch(t){var e=t;return c.errors[h]="Couldn't load texture atlas "+h+": "+e.message,u&&u(h,"Couldn't load texture atlas "+h+": "+e.message),c.toLoad--,void c.loaded++}for(var t=0,n=o;t<n.length;t++)!function(t){var r=!1;c.loadTexture(t,function(t,e){if(a.count++,a.count==o.length)if(r)c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++;else try{var n=new d.TextureAtlas(s,function(t){return c.get(""==f?t:f+"/"+t)});c.assets[h]=n,l&&l(h,n),c.toLoad--,c.loaded++}catch(t){var i=t;c.errors[h]="Couldn't load texture atlas "+h+": "+i.message,u&&u(h,"Couldn't load texture atlas "+h+": "+i.message),c.toLoad--,c.loaded++}},function(t,e){r=!0,a.count++,a.count==o.length&&(c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++)})}(n[t])},function(t,e){c.errors[h]="Couldn't load texture atlas "+h+": status "+status+", "+e,u&&u(h,"Couldn't load texture atlas "+h+": status "+status+", "+e),c.toLoad--,c.loaded++})},Ot.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},Ot.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},Ot.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},Ot.prototype.isLoadingComplete=function(){return 0==this.toLoad},Ot.prototype.getToLoad=function(){return this.toLoad},Ot.prototype.getLoaded=function(){return this.loaded},Ot.prototype.dispose=function(){this.removeAll()},Ot.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Ot.prototype.getErrors=function(){return this.errors},n=Ot,d.AssetManager=n,s=St=St||{},Ft.prototype.newRegionAttachment=function(t,e,n){var i=this.atlas.findRegion(n);if(null==i)throw new Error("Region not found in atlas: "+n+" (region attachment: "+e+")");i.renderObject=i;var r=new s.RegionAttachment(e);return r.setRegion(i),r},Ft.prototype.newMeshAttachment=function(t,e,n){var i=this.atlas.findRegion(n);if(null==i)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+e+")");i.renderObject=i;var r=new s.MeshAttachment(e);return r.region=i,r},Ft.prototype.newBoundingBoxAttachment=function(t,e){return new s.BoundingBoxAttachment(e)},Ft.prototype.newPathAttachment=function(t,e){return new s.PathAttachment(e)},Ft.prototype.newPointAttachment=function(t,e){return new s.PointAttachment(e)},Ft.prototype.newClippingAttachment=function(t,e){return new s.ClippingAttachment(e)},r=Ft,s.AtlasAttachmentLoader=r,a=St=St||{},(o=a.BlendMode||(a.BlendMode={}))[o.Normal=0]="Normal",o[o.Additive=1]="Additive",o[o.Multiply=2]="Multiply",o[o.Screen=3]="Screen",k=St=St||{},Lt.prototype.isActive=function(){return this.active},Lt.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},Lt.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},Lt.prototype.updateWorldTransformWith=function(t,e,n,i,r,s,a){this.ax=t,this.ay=e,this.arotation=n,this.ascaleX=i,this.ascaleY=r,this.ashearX=s,this.ashearY=a,this.appliedValid=!0;var o=this.parent;if(null==o){var h=this.skeleton,l=n+90+a,u=h.scaleX,c=h.scaleY;return this.a=k.MathUtils.cosDeg(n+s)*i*u,this.b=k.MathUtils.cosDeg(l)*r*u,this.c=k.MathUtils.sinDeg(n+s)*i*c,this.d=k.MathUtils.sinDeg(l)*r*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var f=o.a,d=o.b,p=o.c,g=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=p*t+g*e+o.worldY,this.data.transformMode){case k.TransformMode.Normal:var l=n+90+a,m=k.MathUtils.cosDeg(n+s)*i,v=k.MathUtils.cosDeg(l)*r,y=k.MathUtils.sinDeg(n+s)*i,x=k.MathUtils.sinDeg(l)*r;return this.a=f*m+d*y,this.b=f*v+d*x,this.c=p*m+g*y,void(this.d=p*v+g*x);case k.TransformMode.OnlyTranslation:l=n+90+a,this.a=k.MathUtils.cosDeg(n+s)*i,this.b=k.MathUtils.cosDeg(l)*r,this.c=k.MathUtils.sinDeg(n+s)*i,this.d=k.MathUtils.sinDeg(l)*r;break;case k.TransformMode.NoRotationOrReflection:var M=0,w=n+s-(M=1e-4<(T=f*f+p*p)?(T=Math.abs(f*g-d*p)/T,f/=this.skeleton.scaleX,d=(p/=this.skeleton.scaleY)*T,g=f*T,Math.atan2(p,f)*k.MathUtils.radDeg):(p=f=0,90-Math.atan2(g,d)*k.MathUtils.radDeg)),E=n+a-M+90,m=k.MathUtils.cosDeg(w)*i,v=k.MathUtils.cosDeg(E)*r,y=k.MathUtils.sinDeg(w)*i,x=k.MathUtils.sinDeg(E)*r;this.a=f*m-d*y,this.b=f*v-d*x,this.c=p*m+g*y,this.d=p*v+g*x;break;case k.TransformMode.NoScale:case k.TransformMode.NoScaleOrReflection:var T,A=k.MathUtils.cosDeg(n),b=k.MathUtils.sinDeg(n),R=(f*A+d*b)/this.skeleton.scaleX,S=(p*A+g*b)/this.skeleton.scaleY;1e-5<(T=Math.sqrt(R*R+S*S))&&(T=1/T),R*=T,S*=T,T=Math.sqrt(R*R+S*S),this.data.transformMode==k.TransformMode.NoScale&&f*g-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T);var I=Math.PI/2+Math.atan2(S,R),C=Math.cos(I)*T,P=Math.sin(I)*T,m=k.MathUtils.cosDeg(s)*i,v=k.MathUtils.cosDeg(90+a)*r,y=k.MathUtils.sinDeg(s)*i,x=k.MathUtils.sinDeg(90+a)*r;this.a=R*m+C*y,this.b=R*v+C*x,this.c=S*m+P*y,this.d=S*v+P*x}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},Lt.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},Lt.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*k.MathUtils.radDeg},Lt.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*k.MathUtils.radDeg},Lt.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},Lt.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},Lt.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t=this.parent;if(null==t)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*k.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*k.MathUtils.radDeg);var e=t.a,n=t.b,i=t.c,r=t.d,s=1/(e*r-n*i),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*s-o*n*s,this.ay=o*e*s-a*i*s;var h,l=s*r,u=s*e,c=s*n,f=s*i,d=l*this.a-c*this.c,p=l*this.b-c*this.d,g=u*this.c-f*this.a,m=u*this.d-f*this.b;this.ashearX=0,this.ascaleX=Math.sqrt(d*d+g*g),1e-4<this.ascaleX?(h=d*m-p*g,this.ascaleY=h/this.ascaleX,this.ashearY=Math.atan2(d*p+g*m,h)*k.MathUtils.radDeg,this.arotation=Math.atan2(g,d)*k.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+m*m),this.ashearY=0,this.arotation=90-Math.atan2(m,p)*k.MathUtils.radDeg)},Lt.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*n*s,t.y=o*e*s-a*i*s,t},Lt.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},Lt.prototype.worldToLocalRotation=function(t){var e=k.MathUtils.sinDeg(t),n=k.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*k.MathUtils.radDeg+this.rotation-this.shearX},Lt.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=k.MathUtils.sinDeg(t),n=k.MathUtils.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*k.MathUtils.radDeg},Lt.prototype.rotateWorld=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=k.MathUtils.cosDeg(t),a=k.MathUtils.sinDeg(t);this.a=s*e-a*i,this.b=s*n-a*r,this.c=a*e+s*i,this.d=a*n+s*r,this.appliedValid=!1},h=Lt,k.Bone=h,(l=St=St||{}).BoneData=Vt,(c=u=l.TransformMode||(l.TransformMode={}))[c.Normal=0]="Normal",c[c.OnlyTranslation=1]="OnlyTranslation",c[c.NoRotationOrReflection=2]="NoRotationOrReflection",c[c.NoScale=3]="NoScale",c[c.NoScaleOrReflection=4]="NoScaleOrReflection",(St||(St={})).ConstraintData=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n},(St||(St={})).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(St||(St={})).EventData=function(t){this.name=t},ht=St=St||{},Dt.prototype.isActive=function(){return this.active},Dt.prototype.apply=function(){this.update()},Dt.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.softness,this.mix)}},Dt.prototype.apply1=function(t,e,n,i,r,s,a){t.appliedValid||t.updateAppliedTransform();var o=t.parent,h=o.a,l=o.b,u=o.c,c=o.d,f=-t.ashearX-t.arotation,d=0,p=0;switch(t.data.transformMode){case ht.TransformMode.OnlyTranslation:d=e-t.worldX,p=n-t.worldY;break;case ht.TransformMode.NoRotationOrReflection:var g=Math.abs(h*c-l*u)/(h*h+u*u),m=h/t.skeleton.scaleX,v=u/t.skeleton.scaleY,l=-v*g*t.skeleton.scaleX,c=m*g*t.skeleton.scaleY;f+=Math.atan2(v,m)*ht.MathUtils.radDeg;default:var y=e-o.worldX,x=n-o.worldY,M=h*c-l*u,d=(y*c-x*l)/M-t.ax,p=(x*h-y*u)/M-t.ay}f+=Math.atan2(p,d)*ht.MathUtils.radDeg,t.ascaleX<0&&(f+=180),180<f?f-=360:f<-180&&(f+=360);var w=t.ascaleX,E=t.ascaleY;if(i||r){switch(t.data.transformMode){case ht.TransformMode.NoScale:case ht.TransformMode.NoScaleOrReflection:d=e-t.worldX,p=n-t.worldY}var T=t.data.length*w,A=Math.sqrt(d*d+p*p);(i&&A<T||r&&T<A&&1e-4<T)&&(w*=g=(A/T-1)*a+1,s&&(E*=g))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,w,E,t.ashearX,t.ashearY)},Dt.prototype.apply2=function(t,e,n,i,r,s,a,o){if(0!=o){t.appliedValid||t.updateAppliedTransform(),e.appliedValid||e.updateAppliedTransform();var h=t.ax,l=t.ay,u=t.ascaleX,c=u,f=t.ascaleY,d=e.ascaleX,p=0,g=0,m=0,m=u<0?(u=-u,p=180,-1):(p=0,1);f<0&&(f=-f,m=-m),g=d<0?(d=-d,180):0;var v=e.ax,y=0,x=0,M=0,w=t.a,E=t.b,T=t.c,A=t.d,b=Math.abs(u-f)<=1e-4,M=b?(x=w*v+E*(y=e.ay)+t.worldX,T*v+A*y+t.worldY):(y=0,x=w*v+t.worldX,T*v+t.worldY),R=t.parent,w=R.a,E=R.b;T=R.c;var S,I=1/(w*(A=R.d)-E*T),C=x-R.worldX,P=M-R.worldY,k=(C*A-P*E)*I-h,_=(P*w-C*T)*I-l,O=Math.sqrt(k*k+_*_),F=e.data.length*d;if(O<1e-4)return this.apply1(t,n,i,!1,s,!1,o),void e.updateWorldTransformWith(v,y,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var L,V,D,N=((C=n-R.worldX)*A-(P=i-R.worldY)*E)*I-h,Y=(P*w-C*T)*I-l,X=N*N+Y*Y;0!=a&&(a*=u*(d+1)/2,0<(V=(L=Math.sqrt(X))-O-F*u+a)&&(X=(N-=(D=(V-a*(1-(D=Math.min(1,V/(2*a))-1)*D))/L)*N)*N+(Y-=D*Y)*Y));t:if(b){var B=(X-O*O-(F*=u)*F)/(2*O*F);B<-1?B=-1:1<B&&(B=1,s&&(c*=(Math.sqrt(X)/(O+F)-1)*o+1)),S=Math.acos(B)*r,w=O+F*B,E=F*Math.sin(S),st=Math.atan2(Y*w-N*E,N*w+Y*E)}else{var U=(w=u*F)*w,z=(E=f*F)*E,W=Math.atan2(Y,N),q=-2*z*O,G=z-U;if(0<=(A=q*q-4*G*(T=z*O*O+U*X-U*z))){var H=Math.sqrt(A);q<0&&(H=-H);var j=(H=-(q+H)/2)/G,Z=T/H,K=Math.abs(j)<Math.abs(Z)?j:Z;if(K*K<=X){P=Math.sqrt(X-K*K)*r,st=W-Math.atan2(P,K),S=Math.atan2(P/f,(K-O)/u);break t}}var Q=ht.MathUtils.PI,J=O-w,$=J*J,tt=0,et=0,nt=O+w,it=nt*nt,rt=0;-1<=(T=-w*O/(U-z))&&T<=1&&(T=Math.acos(T),(A=(C=w*Math.cos(T)+O)*C+(P=E*Math.sin(T))*P)<$&&(Q=T,$=A,J=C,tt=P),it<A&&(et=T,it=A,nt=C,rt=P)),S=X<=($+it)/2?(st=W-Math.atan2(tt*r,J),Q*r):(st=W-Math.atan2(rt*r,nt),et*r)}var st,at=Math.atan2(y,v)*m,ot=t.arotation;180<(st=(st-at)*ht.MathUtils.radDeg+p-ot)?st-=360:st<-180&&(st+=360),t.updateWorldTransformWith(h,l,ot+st*o,c,t.ascaleY,0,0),ot=e.arotation,180<(S=((S+at)*ht.MathUtils.radDeg-e.ashearX)*m+g-ot)?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(v,y,ot+S*o,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}else e.updateWorldTransform()},f=Dt,ht.IkConstraint=f,p=St=St||{},g=p.ConstraintData,kt(Nt,g),m=Nt,p.IkConstraintData=m,j=St=St||{},Yt.prototype.isActive=function(){return this.active},Yt.prototype.apply=function(){this.update()},Yt.prototype.update=function(){var t=this.target.getAttachment();if(t instanceof j.PathAttachment){var e=this.rotateMix,n=this.translateMix,i=0<e;if(0<n||i){var r=this.data,s=r.spacingMode==j.SpacingMode.Percent,a=r.rotateMode,o=a==j.RotateMode.Tangent,h=a==j.RotateMode.ChainScale,l=this.bones.length,u=o?l:l+1,c=this.bones,f=j.Utils.setArraySize(this.spaces,u),d=null,p=this.spacing;if(h||!s){h&&(d=j.Utils.setArraySize(this.lengths,l));for(var g=r.spacingMode==j.SpacingMode.Length,m=0,v=u-1;m<v;){var y,x,M=(R=c[m]).data.length;M<Yt.epsilon?(h&&(d[m]=0),f[++m]=0):s?(h&&(I=M*R.a,C=M*R.c,y=Math.sqrt(I*I+C*C),d[m]=y),f[++m]=p):(I=M*R.a,C=M*R.c,x=Math.sqrt(I*I+C*C),h&&(d[m]=x),f[++m]=(g?M+p:p)*x/M)}}else for(m=1;m<u;m++)f[m]=p;var w=this.computeWorldPositions(t,u,o,r.positionMode==j.PositionMode.Percent,s),E=w[0],T=w[1],A=r.offsetRotation,b=!1;0==A?b=a==j.RotateMode.Chain:(b=!1,A*=0<(S=this.target.bone).a*S.d-S.b*S.c?j.MathUtils.degRad:-j.MathUtils.degRad);for(var R,m=0,S=3;m<l;m++,S+=3){(R=c[m]).worldX+=(E-R.worldX)*n,R.worldY+=(T-R.worldY)*n;var I,C,P,k,_,O,F,L,V,D,N,Y,X=(I=w[S])-E,B=(C=w[S+1])-T;!h||0!=(P=d[m])&&(k=(Math.sqrt(X*X+B*B)/P-1)*e+1,R.a*=k,R.c*=k),E=I,T=C,i&&(_=R.a,O=R.b,F=R.c,L=R.d,D=V=Y=0,Y=o?w[S-1]:0==f[m+1]?w[S+2]:Math.atan2(B,X),Y-=Math.atan2(F,_),b?(V=Math.cos(Y),D=Math.sin(Y),E+=((N=R.data.length)*(V*_-D*F)-X)*e,T+=(N*(D*_+V*F)-B)*e):Y+=A,Y>j.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,V=Math.cos(Y),D=Math.sin(Y),R.a=V*_-D*F,R.b=V*O-D*L,R.c=D*_+V*F,R.d=D*O+V*L),R.appliedValid=!1}}}},Yt.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=Yt.NONE;if(!t.constantSpeed){var p=t.lengths,g=p[f-=u?1:2];if(i&&(a*=g),r)for(var m=1;m<e;m++)o[m]*=g;l=j.Utils.setArraySize(this.world,8);for(var m=0,v=0,y=0;m<e;m++,v+=3){var x=a+=z=o[m];if(u)(x%=g)<0&&(x+=g),y=0;else{if(x<0){d!=Yt.BEFORE&&(d=Yt.BEFORE,t.computeWorldVertices(s,2,4,l,0,2)),this.addBeforePosition(x,l,0,h,v);continue}if(g<x){d!=Yt.AFTER&&(d=Yt.AFTER,t.computeWorldVertices(s,c-6,4,l,0,2)),this.addAfterPosition(x-g,l,0,h,v);continue}}for(;;y++){var M=p[y];if(!(M<x)){0==y?x/=M:x=(x-(G=p[y-1]))/(M-G);break}}y!=d&&(d=y,u&&y==f?(t.computeWorldVertices(s,c-4,4,l,0,2),t.computeWorldVertices(s,0,4,l,4,2)):t.computeWorldVertices(s,6*y+2,8,l,0,2)),this.addCurvePosition(x,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],h,v,n||0<m&&0==z)}return h}u?(c+=2,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c-4,l,0,2),t.computeWorldVertices(s,0,2,l,c-4,2),l[c-2]=l[0],l[c-1]=l[1]):(f--,c-=4,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c,l,0,2));for(var w=j.Utils.setArraySize(this.curves,f),E=0,T=l[0],A=l[1],b=0,R=0,S=0,I=0,C=0,P=0,k=0,_=0,O=0,F=0,L=0,V=0,D=0,N=0,m=0,Y=2;m<f;m++,Y+=6)b=l[Y],R=l[Y+1],S=l[Y+2],I=l[Y+3],L=2*(k=.1875*(T-2*b+S))+(O=.09375*(3*(b-S)-T+(C=l[Y+4]))),V=2*(_=.1875*(A-2*R+I))+(F=.09375*(3*(R-I)-A+(P=l[Y+5]))),D=.75*(b-T)+k+.16666667*O,N=.75*(R-A)+_+.16666667*F,E+=Math.sqrt(D*D+N*N),D+=L,N+=V,L+=O,V+=F,E+=Math.sqrt(D*D+N*N),D+=L,N+=V,E+=Math.sqrt(D*D+N*N),D+=L+O,N+=V+F,E+=Math.sqrt(D*D+N*N),w[m]=E,T=C,A=P;if(a*=i?E:E/t.lengths[f-1],r)for(m=1;m<e;m++)o[m]*=E;for(var X=this.segments,B=0,m=0,v=0,y=0,U=0;m<e;m++,v+=3){var z,x=a+=z=o[m];if(u)(x%=E)<0&&(x+=E),y=0;else{if(x<0){this.addBeforePosition(x,l,0,h,v);continue}if(E<x){this.addAfterPosition(x-E,l,c-4,h,v);continue}}for(;;y++){var W=w[y];if(!(W<x)){0==y?x/=W:x=(x-(G=w[y-1]))/(W-G);break}}if(y!=d){var q=6*(d=y),T=l[q],A=l[q+1],b=l[q+2],R=l[q+3],S=l[q+4],I=l[q+5],L=2*(k=.03*(T-2*b+S))+(O=.006*(3*(b-S)-T+(C=l[q+6]))),V=2*(_=.03*(A-2*R+I))+(F=.006*(3*(R-I)-A+(P=l[q+7]))),D=.3*(b-T)+k+.16666667*O,N=.3*(R-A)+_+.16666667*F,B=Math.sqrt(D*D+N*N);for(X[0]=B,q=1;q<8;q++)D+=L,N+=V,L+=O,V+=F,B+=Math.sqrt(D*D+N*N),X[q]=B;D+=L,N+=V,B+=Math.sqrt(D*D+N*N),X[8]=B,D+=L+O,N+=V+F,B+=Math.sqrt(D*D+N*N),X[9]=B,U=0}for(x*=B;;U++){var G,H=X[U];if(!(H<x)){0==U?x/=H:x=U+(x-(G=X[U-1]))/(H-G);break}}this.addCurvePosition(.1*x,T,A,b,R,S,I,C,P,h,v,n||0<m&&0==z)}return h},Yt.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],a=e[n+1],o=e[n+2]-s,h=e[n+3]-a,l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},Yt.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],a=e[n+3],o=s-e[n],h=a-e[n+1],l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},Yt.prototype.addCurvePosition=function(t,e,n,i,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var f=t*t,d=f*t,p=1-t,g=p*p,m=g*p,v=p*t,y=3*v,x=p*y,M=y*t,w=e*m+i*x+s*M+o*d,E=n*m+r*x+a*M+h*d;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(E-(n*g+r*v*2+a*f),w-(e*g+i*v*2+s*f)))},Yt.NONE=-1,Yt.BEFORE=-2,Yt.AFTER=-3,Yt.epsilon=1e-5,v=Yt,j.PathConstraint=v,y=St=St||{},x=y.ConstraintData,kt(Xt,x),T=Xt,y.PathConstraintData=T,(M=y.PositionMode||(y.PositionMode={}))[M.Fixed=0]="Fixed",M[M.Percent=1]="Percent",(w=y.SpacingMode||(y.SpacingMode={}))[w.Length=0]="Length",w[w.Fixed=1]="Fixed",w[w.Percent=2]="Percent",(E=y.RotateMode||(y.RotateMode={}))[E.Tangent=0]="Tangent",E[E.Chain=1]="Chain",E[E.ChainScale=2]="ChainScale",A=St=St||{},Bt.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},b=Bt,Ut.prototype.queueAsset=function(t,e,n){var i=this.clientAssets[t];return null==i&&(i=new b(t),this.clientAssets[t]=i),null!==e&&(i.textureLoader=e),i.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},Ut.prototype.loadText=function(t,e){var n,i=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((n=new XMLHttpRequest).overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(200<=n.status&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send())},Ut.prototype.loadJson=function(t,e){var n,i=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((n=new XMLHttpRequest).overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(200<=n.status&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send())},Ut.prototype.loadTexture=function(t,e,n){var i,r=this;n=this.pathPrefix+n,this.queueAsset(t,e,n)&&((i=new Image).crossOrigin="anonymous",i.onload=function(t){r.rawAssets[n]=i},i.onerror=function(t){r.errors[n]="Couldn't load image "+n},i.src=n)},Ut.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},Ut.prototype.updateClientAssets=function(t){for(var e=0;e<t.toLoad.length;e++){var n=t.toLoad[e],i=t.assets[n];if(null==i){var r=this.rawAssets[n];if(null==r)continue;r instanceof HTMLImageElement?t.assets[n]=t.textureLoader(r):t.assets[n]=r}}},Ut.prototype.isLoadingComplete=function(t){var e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())},Ut.prototype.dispose=function(){},Ut.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Ut.prototype.getErrors=function(){return this.errors},R=Ut,A.SharedAssetManager=R,S=St=St||{},zt.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var i=this.skin.bones,e=0,n=this.skin.bones.length;e<n;e++)for(var r=this.bones[i[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,a=this.transformConstraints,o=this.pathConstraints,h=s.length,l=a.length,u=o.length,c=h+l+u;t:for(e=0;e<c;e++){for(var f=0;f<h;f++)if((d=s[f]).data.order==e){this.sortIkConstraint(d);continue t}for(f=0;f<l;f++)if((d=a[f]).data.order==e){this.sortTransformConstraint(d);continue t}for(var d,f=0;f<u;f++)if((d=o[f]).data.order==e){this.sortPathConstraint(d);continue t}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},zt.prototype.sortIkConstraint=function(t){var e,n,i,r;t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active&&(e=t.target,this.sortBone(e),i=(n=t.bones)[0],this.sortBone(i),1<n.length&&(r=n[n.length-1],-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)),this._updateCache.push(t),this.sortReset(i.children),n[n.length-1].sorted=!0)},zt.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,n=e.data.index,i=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var r=0,s=this.data.skins.length;r<s;r++)this.sortPathConstraintAttachment(this.data.skins[r],n,i);var a=e.getAttachment();a instanceof S.PathAttachment&&this.sortPathConstraintAttachmentWith(a,i);for(var o=t.bones,h=o.length,r=0;r<h;r++)this.sortBone(o[r]);for(this._updateCache.push(t),r=0;r<h;r++)this.sortReset(o[r].children);for(r=0;r<h;r++)o[r].sorted=!0}},zt.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,n=e.length;if(t.data.local)for(var i=0;i<n;i++){var r=e[i];this.sortBone(r.parent),-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)}else for(i=0;i<n;i++)this.sortBone(e[i]);this._updateCache.push(t);for(var s=0;s<n;s++)this.sortReset(e[s].children);for(s=0;s<n;s++)e[s].sorted=!0}},zt.prototype.sortPathConstraintAttachment=function(t,e,n){var i=t.attachments[e];if(i)for(var r in i)this.sortPathConstraintAttachmentWith(i[r],n)},zt.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof S.PathAttachment){var n=t.bones;if(null==n)this.sortBone(e);else for(var i=this.bones,r=0;r<n.length;)for(var s=n[r++],a=r+s;r<a;r++){var o=n[r];this.sortBone(i[o])}}},zt.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},zt.prototype.sortReset=function(t){for(var e=0,n=t.length;e<n;e++){var i=t[e];i.active&&(i.sorted&&this.sortReset(i.children),i.sorted=!1)}},zt.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,n=t.length;e<n;e++){var i=t[e];i.ax=i.x,i.ay=i.y,i.arotation=i.rotation,i.ascaleX=i.scaleX,i.ascaleY=i.scaleY,i.ashearX=i.shearX,i.ashearY=i.shearY,i.appliedValid=!0}for(var r=this._updateCache,e=0,n=r.length;e<n;e++)r[e].update()},zt.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},zt.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;e<n;e++)(o=i[e]).mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch;for(var r=this.transformConstraints,e=0,n=r.length;e<n;e++){var s=(o=r[e]).data;o.rotateMix=s.rotateMix,o.translateMix=s.translateMix,o.scaleMix=s.scaleMix,o.shearMix=s.shearMix}for(var a=this.pathConstraints,e=0,n=a.length;e<n;e++){var o,s=(o=a[e]).data;o.position=s.position,o.spacing=s.spacing,o.rotateMix=s.rotateMix,o.translateMix=s.translateMix}},zt.prototype.setSlotsToSetupPose=function(){var t=this.slots;S.Utils.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,n=t.length;e<n;e++)t[e].setToSetupPose()},zt.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},zt.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++)if(e[n].data.name==t)return n;return-1},zt.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++)if(e[n].data.name==t)return n;return-1},zt.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},zt.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;n<i;n++){var r,s=e[n],a=s.data.attachmentName;null==a||null!=(r=t.getAttachment(n,a))&&s.setAttachment(r)}this.skin=t,this.updateCache()}},zt.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},zt.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},zt.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var n=this.slots,i=0,r=n.length;i<r;i++){var s=n[i];if(s.data.name==t){var a=null;if(null!=e&&null==(a=this.getAttachment(i,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(a)}}throw new Error("Slot not found: "+t)},zt.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.getBounds=function(t,e,n){if(void 0===n&&(n=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var i=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=i.length;h<l;h++){var u=i[h];if(u.bone.active){var c,f=0,d=null,p=u.getAttachment();if(p instanceof S.RegionAttachment?(f=8,d=S.Utils.setArraySize(n,f,0),p.computeWorldVertices(u.bone,d,0,2)):p instanceof S.MeshAttachment&&(f=(c=p).worldVerticesLength,d=S.Utils.setArraySize(n,f,0),c.computeWorldVertices(u,0,f,d,0,2)),null!=d)for(var g=0,m=d.length;g<m;g+=2)var v=d[g],y=d[g+1],r=Math.min(r,v),s=Math.min(s,y),a=Math.max(a,v),o=Math.max(o,y)}}t.set(r,s),e.set(a-r,o-s)},zt.prototype.update=function(t){this.time+=t},I=zt,S.Skeleton=I,function(W){var t=(q.prototype.readSkeletonData=function(t){var e=this.scale,n=new W.SkeletonData;n.name="";var i=new x(t);if(n.hash=i.readString(),n.version=i.readString(),"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=i.readFloat(),n.y=i.readFloat(),n.width=i.readFloat(),n.height=i.readFloat();var r=i.readBoolean();r&&(n.fps=i.readFloat(),n.imagesPath=i.readString(),n.audioPath=i.readString());for(var s=0,s=i.readInt(!0),a=0;a<s;a++)i.strings.push(i.readString());for(s=i.readInt(!0),a=0;a<s;a++){var o=i.readString(),h=0==a?null:n.bones[i.readInt(!0)];(c=new W.BoneData(a,o,h)).rotation=i.readFloat(),c.x=i.readFloat()*e,c.y=i.readFloat()*e,c.scaleX=i.readFloat(),c.scaleY=i.readFloat(),c.shearX=i.readFloat(),c.shearY=i.readFloat(),c.length=i.readFloat()*e,c.transformMode=q.TransformModeValues[i.readInt(!0)],c.skinRequired=i.readBoolean(),r&&W.Color.rgba8888ToColor(c.color,i.readInt32()),n.bones.push(c)}for(s=i.readInt(!0),a=0;a<s;a++){var l=i.readString(),u=n.bones[i.readInt(!0)],c=new W.SlotData(a,l,u);W.Color.rgba8888ToColor(c.color,i.readInt32());var f=i.readInt32();-1!=f&&W.Color.rgb888ToColor(c.darkColor=new W.Color,f),c.attachmentName=i.readStringRef(),c.blendMode=q.BlendModeValues[i.readInt(!0)],n.slots.push(c)}s=i.readInt(!0);for(var a=0,d=void 0;a<s;a++){(c=new W.IkConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0);for(var p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.mix=i.readFloat(),c.softness=i.readFloat()*e,c.bendDirection=i.readByte(),c.compress=i.readBoolean(),c.stretch=i.readBoolean(),c.uniform=i.readBoolean(),n.ikConstraints.push(c)}for(s=i.readInt(!0),d=void(a=0);a<s;a++){for((c=new W.TransformConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0),p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.local=i.readBoolean(),c.relative=i.readBoolean(),c.offsetRotation=i.readFloat(),c.offsetX=i.readFloat()*e,c.offsetY=i.readFloat()*e,c.offsetScaleX=i.readFloat(),c.offsetScaleY=i.readFloat(),c.offsetShearY=i.readFloat(),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),c.scaleMix=i.readFloat(),c.shearMix=i.readFloat(),n.transformConstraints.push(c)}for(s=i.readInt(!0),d=void(a=0);a<s;a++){for((c=new W.PathConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0),p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.slots[i.readInt(!0)],c.positionMode=q.PositionModeValues[i.readInt(!0)],c.spacingMode=q.SpacingModeValues[i.readInt(!0)],c.rotateMode=q.RotateModeValues[i.readInt(!0)],c.offsetRotation=i.readFloat(),c.position=i.readFloat(),c.positionMode==W.PositionMode.Fixed&&(c.position*=e),c.spacing=i.readFloat(),c.spacingMode!=W.SpacingMode.Length&&c.spacingMode!=W.SpacingMode.Fixed||(c.spacing*=e),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),n.pathConstraints.push(c)}var g=this.readSkin(i,n,!0,r);for(null!=g&&(n.defaultSkin=g,n.skins.push(g)),a=n.skins.length,W.Utils.setArraySize(n.skins,s=a+i.readInt(!0));a<s;a++)n.skins[a]=this.readSkin(i,n,!1,r);for(s=this.linkedMeshes.length,a=0;a<s;a++){var m=this.linkedMeshes[a],v=null==m.skin?n.defaultSkin:n.findSkin(m.skin);if(null==v)throw new Error("Skin not found: "+m.skin);var y=v.getAttachment(m.slotIndex,m.parent);if(null==y)throw new Error("Parent mesh not found: "+m.parent);m.mesh.deformAttachment=m.inheritDeform?y:m.mesh,m.mesh.setParentMesh(y),m.mesh.updateUVs()}for(this.linkedMeshes.length=0,s=i.readInt(!0),a=0;a<s;a++)(c=new W.EventData(i.readStringRef())).intValue=i.readInt(!1),c.floatValue=i.readFloat(),c.stringValue=i.readString(),c.audioPath=i.readString(),null!=c.audioPath&&(c.volume=i.readFloat(),c.balance=i.readFloat()),n.events.push(c);for(s=i.readInt(!0),a=0;a<s;a++)n.animations.push(this.readAnimation(i,i.readString(),n));return n},q.prototype.readSkin=function(t,e,n,i){var r=null,s=0;if(n){if(0==(s=t.readInt(!0)))return null;r=new W.Skin("default")}else{(r=new W.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var a=0,o=r.bones.length;a<o;a++)r.bones[a]=e.bones[t.readInt(!0)];for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);s=t.readInt(!0)}for(a=0;a<s;a++)for(var h=t.readInt(!0),l=0,u=t.readInt(!0);l<u;l++){var c=t.readStringRef(),f=this.readAttachment(t,e,r,h,c,i);null!=f&&r.setAttachment(h,c,f)}return r},q.prototype.readAttachment=function(t,e,n,i,r,s){var a=this.scale,o=t.readStringRef();null==o&&(o=r);var h=t.readByte();switch(q.AttachmentTypeValues[h]){case W.AttachmentType.Region:var l=t.readStringRef(),u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),d=t.readFloat(),p=t.readFloat(),g=t.readFloat(),m=t.readFloat(),v=t.readInt32();null==l&&(l=o);var y=this.attachmentLoader.newRegionAttachment(n,o,l);return null==y?null:(y.path=l,y.x=c*a,y.y=f*a,y.scaleX=d,y.scaleY=p,y.rotation=u,y.width=g*a,y.height=m*a,W.Color.rgba8888ToColor(y.color,v),y.updateOffset(),y);case W.AttachmentType.BoundingBox:var x=t.readInt(!0),M=this.readVertices(t,x),v=s?t.readInt32():0,w=this.attachmentLoader.newBoundingBoxAttachment(n,o);return null==w?null:(w.worldVerticesLength=x<<1,w.vertices=M.vertices,w.bones=M.bones,s&&W.Color.rgba8888ToColor(w.color,v),w);case W.AttachmentType.Mesh:var l=t.readStringRef(),v=t.readInt32(),x=t.readInt(!0),E=this.readFloatArray(t,x<<1,1),T=this.readShortArray(t),M=this.readVertices(t,x),A=t.readInt(!0),b=null,g=0,m=0;return s&&(b=this.readShortArray(t),g=t.readFloat(),m=t.readFloat()),null==l&&(l=o),null==(R=this.attachmentLoader.newMeshAttachment(n,o,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,v),R.bones=M.bones,R.vertices=M.vertices,R.worldVerticesLength=x<<1,R.triangles=T,R.regionUVs=E,R.updateUVs(),R.hullLength=A<<1,s&&(R.edges=b,R.width=g*a,R.height=m*a),R);case W.AttachmentType.LinkedMesh:var R,l=t.readStringRef(),v=t.readInt32(),S=t.readStringRef(),I=t.readStringRef(),C=t.readBoolean(),g=0,m=0;return s&&(g=t.readFloat(),m=t.readFloat()),null==l&&(l=o),null==(R=this.attachmentLoader.newMeshAttachment(n,o,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,v),s&&(R.width=g*a,R.height=m*a),this.linkedMeshes.push(new N(R,S,i,I,C)),R);case W.AttachmentType.Path:for(var P=t.readBoolean(),k=t.readBoolean(),x=t.readInt(!0),M=this.readVertices(t,x),_=W.Utils.newArray(x/3,0),O=0,F=_.length;O<F;O++)_[O]=t.readFloat()*a;return v=s?t.readInt32():0,null==(l=this.attachmentLoader.newPathAttachment(n,o))?null:(l.closed=P,l.constantSpeed=k,l.worldVerticesLength=x<<1,l.vertices=M.vertices,l.bones=M.bones,l.lengths=_,s&&W.Color.rgba8888ToColor(l.color,v),l);case W.AttachmentType.Point:var u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),v=s?t.readInt32():0,L=this.attachmentLoader.newPointAttachment(n,o);return null==L?null:(L.x=c*a,L.y=f*a,L.rotation=u,s&&W.Color.rgba8888ToColor(L.color,v),L);case W.AttachmentType.Clipping:var V=t.readInt(!0),x=t.readInt(!0),M=this.readVertices(t,x),v=s?t.readInt32():0,D=this.attachmentLoader.newClippingAttachment(n,o);return null==D?null:(D.endSlot=e.slots[V],D.worldVerticesLength=x<<1,D.vertices=M.vertices,D.bones=M.bones,s&&W.Color.rgba8888ToColor(D.color,v),D)}return null},q.prototype.readVertices=function(t,e){var n=e<<1,i=new u,r=this.scale;if(!t.readBoolean())return i.vertices=this.readFloatArray(t,n,r),i;for(var s=new Array,a=new Array,o=0;o<e;o++){var h=t.readInt(!0);a.push(h);for(var l=0;l<h;l++)a.push(t.readInt(!0)),s.push(t.readFloat()*r),s.push(t.readFloat()*r),s.push(t.readFloat())}return i.vertices=W.Utils.toFloatArray(s),i.bones=a,i},q.prototype.readFloatArray=function(t,e,n){var i=new Array(e);if(1==n)for(var r=0;r<e;r++)i[r]=t.readFloat();else for(r=0;r<e;r++)i[r]=t.readFloat()*n;return i},q.prototype.readShortArray=function(t){for(var e=t.readInt(!0),n=new Array(e),i=0;i<e;i++)n[i]=t.readShort();return n},q.prototype.readAnimation=function(t,e,n){for(var i=new Array,r=this.scale,s=0,a=new W.Color,o=new W.Color,h=0,l=t.readInt(!0);h<l;h++)for(var u=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++){var d=t.readByte(),p=t.readInt(!0);switch(d){case q.SLOT_ATTACHMENT:(y=new W.AttachmentTimeline(p)).slotIndex=u;for(var g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readStringRef());i.push(y),s=Math.max(s,y.frames[p-1]);break;case q.SLOT_COLOR:for((y=new W.ColorTimeline(p)).slotIndex=u,g=0;g<p;g++){var m=t.readFloat();W.Color.rgba8888ToColor(a,t.readInt32()),y.setFrame(g,m,a.r,a.g,a.b,a.a),g<p-1&&this.readCurve(t,g,y)}i.push(y),s=Math.max(s,y.frames[(p-1)*W.ColorTimeline.ENTRIES]);break;case q.SLOT_TWO_COLOR:for((y=new W.TwoColorTimeline(p)).slotIndex=u,g=0;g<p;g++)m=t.readFloat(),W.Color.rgba8888ToColor(a,t.readInt32()),W.Color.rgb888ToColor(o,t.readInt32()),y.setFrame(g,m,a.r,a.g,a.b,a.a,o.r,o.g,o.b),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.TwoColorTimeline.ENTRIES])}}for(h=0,l=t.readInt(!0);h<l;h++)for(var v=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case q.BONE_ROTATE:for((y=new W.RotateTimeline(p)).boneIndex=v,g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readFloat()),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.RotateTimeline.ENTRIES]);break;case q.BONE_TRANSLATE:case q.BONE_SCALE:case q.BONE_SHEAR:var y=void 0,x=1;for(d==q.BONE_SCALE?y=new W.ScaleTimeline(p):d==q.BONE_SHEAR?y=new W.ShearTimeline(p):(y=new W.TranslateTimeline(p),x=r),y.boneIndex=v,g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readFloat()*x,t.readFloat()*x),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.TranslateTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){var M=t.readInt(!0),p=t.readInt(!0);for((y=new W.IkConstraintTimeline(p)).ikConstraintIndex=M,g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readFloat(),t.readFloat()*r,t.readByte(),t.readBoolean(),t.readBoolean()),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.IkConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){for(M=t.readInt(!0),p=t.readInt(!0),(y=new W.TransformConstraintTimeline(p)).transformConstraintIndex=M,g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat()),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.TransformConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var M=t.readInt(!0),w=n.pathConstraints[M],c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case q.PATH_POSITION:case q.PATH_SPACING:var y=void 0,x=1;for(d==q.PATH_SPACING?(y=new W.PathConstraintSpacingTimeline(p),w.spacingMode!=W.SpacingMode.Length&&w.spacingMode!=W.SpacingMode.Fixed||(x=r)):(y=new W.PathConstraintPositionTimeline(p),w.positionMode==W.PositionMode.Fixed&&(x=r)),y.pathConstraintIndex=M,g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readFloat()*x),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.PathConstraintPositionTimeline.ENTRIES]);break;case q.PATH_MIX:for((y=new W.PathConstraintMixTimeline(p)).pathConstraintIndex=M,g=0;g<p;g++)y.setFrame(g,t.readFloat(),t.readFloat(),t.readFloat()),g<p-1&&this.readCurve(t,g,y);i.push(y),s=Math.max(s,y.frames[(p-1)*W.PathConstraintMixTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var E=n.skins[t.readInt(!0)],c=0,f=t.readInt(!0);c<f;c++)for(var u=t.readInt(!0),T=0,A=t.readInt(!0);T<A;T++){var b=E.getAttachment(u,t.readStringRef()),R=null!=b.bones,S=b.vertices,I=R?S.length/3*2:S.length,p=t.readInt(!0);for((y=new W.DeformTimeline(p)).slotIndex=u,y.attachment=b,g=0;g<p;g++){var m=t.readFloat(),C=void 0,P=t.readInt(!0);if(0==P)C=R?W.Utils.newFloatArray(I):S;else{C=W.Utils.newFloatArray(I);var k=t.readInt(!0);if(P+=k,1==r)for(var _=k;_<P;_++)C[_]=t.readFloat();else for(_=k;_<P;_++)C[_]=t.readFloat()*r;if(!R)for(var _=0,O=C.length;_<O;_++)C[_]+=S[_]}y.setFrame(g,m,C),g<p-1&&this.readCurve(t,g,y)}i.push(y),s=Math.max(s,y.frames[p-1])}var F=t.readInt(!0);if(0<F){for(var y=new W.DrawOrderTimeline(F),L=n.slots.length,h=0;h<F;h++){for(var m=t.readFloat(),V=t.readInt(!0),D=W.Utils.newArray(L,0),c=L-1;0<=c;c--)D[c]=-1;for(var N=W.Utils.newArray(L-V,0),Y=0,X=0,c=0;c<V;c++){for(u=t.readInt(!0);Y!=u;)N[X++]=Y++;D[Y+t.readInt(!0)]=Y++}for(;Y<L;)N[X++]=Y++;for(c=L-1;0<=c;c--)-1==D[c]&&(D[c]=N[--X]);y.setFrame(h,m,D)}i.push(y),s=Math.max(s,y.frames[F-1])}var B=t.readInt(!0);if(0<B){for(y=new W.EventTimeline(B),h=0;h<B;h++){var m=t.readFloat(),U=n.events[t.readInt(!0)],z=new W.Event(m,U);z.intValue=t.readInt(!1),z.floatValue=t.readFloat(),z.stringValue=t.readBoolean()?t.readString():U.stringValue,null!=z.data.audioPath&&(z.volume=t.readFloat(),z.balance=t.readFloat()),y.setFrame(h,z)}i.push(y),s=Math.max(s,y.frames[B-1])}return new W.Animation(e,i,s)},q.prototype.readCurve=function(t,e,n){switch(t.readByte()){case q.CURVE_STEPPED:n.setStepped(e);break;case q.CURVE_BEZIER:this.setCurve(n,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},q.prototype.setCurve=function(t,e,n,i,r,s){t.setCurve(e,n,i,r,s)},q.AttachmentTypeValues=[0,1,2,3,4,5,6],q.TransformModeValues=[W.TransformMode.Normal,W.TransformMode.OnlyTranslation,W.TransformMode.NoRotationOrReflection,W.TransformMode.NoScale,W.TransformMode.NoScaleOrReflection],q.PositionModeValues=[W.PositionMode.Fixed,W.PositionMode.Percent],q.SpacingModeValues=[W.SpacingMode.Length,W.SpacingMode.Fixed,W.SpacingMode.Percent],q.RotateModeValues=[W.RotateMode.Tangent,W.RotateMode.Chain,W.RotateMode.ChainScale],q.BlendModeValues=[W.BlendMode.Normal,W.BlendMode.Additive,W.BlendMode.Multiply,W.BlendMode.Screen],q.BONE_ROTATE=0,q.BONE_TRANSLATE=1,q.BONE_SCALE=2,q.BONE_SHEAR=3,q.SLOT_ATTACHMENT=0,q.SLOT_COLOR=1,q.SLOT_TWO_COLOR=2,q.PATH_POSITION=0,q.PATH_SPACING=1,q.PATH_MIX=2,q.CURVE_LINEAR=0,q.CURVE_STEPPED=1,q.CURVE_BEZIER=2,q);function q(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}W.SkeletonBinary=t;var x=(e.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},e.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},e.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},e.prototype.readInt=function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&this.readByte())<<28)))),t?n:n>>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n<t;){var i=this.readByte();switch(i>>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(St=St||{}),C=St=St||{},Wt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;n.length=0,r.freeAll(i);for(var o=i.length=0;o<a;o++){var h,l,u,c=s[o];c.bone.active&&(h=c.getAttachment())instanceof C.BoundingBoxAttachment&&(l=h,n.push(l),(u=r.obtain()).length!=l.worldVerticesLength&&(u=C.Utils.newFloatArray(l.worldVerticesLength)),i.push(u),l.computeWorldVertices(c,0,l.worldVerticesLength,u,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},Wt.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,a=r.length;s<a;s++)for(var o=r[s],h=o,l=0,u=o.length;l<u;l+=2)var c=h[l],f=h[l+1],t=Math.min(t,c),e=Math.min(e,f),n=Math.max(n,c),i=Math.max(i,f);this.minX=t,this.minY=e,this.maxX=n,this.maxY=i},Wt.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Wt.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||a<=t&&a<=n||o<=e&&o<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(s<l&&l<o)return!0;if(s<(l=h*(a-t)+e)&&l<o)return!0;var u=(s-e)/h+t;return r<u&&u<a||r<(u=(o-e)/h+t)&&u<a},Wt.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},Wt.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i<r;i++)if(this.containsPointPolygon(n[i],t,e))return this.boundingBoxes[i];return null},Wt.prototype.containsPointPolygon=function(t,e,n){for(var i=t,r=t.length,s=r-2,a=!1,o=0;o<r;o+=2){var h,l=i[o+1],u=i[s+1];!(l<n&&n<=u||u<n&&n<=l)||(h=i[o])+(n-l)/(u-l)*(i[s]-h)<e&&(a=!a),s=o}return a},Wt.prototype.intersectsSegment=function(t,e,n,i){for(var r=this.polygons,s=0,a=r.length;s<a;s++)if(this.intersectsSegmentPolygon(r[s],t,e,n,i))return this.boundingBoxes[s];return null},Wt.prototype.intersectsSegmentPolygon=function(t,e,n,i,r){for(var s=t,a=t.length,o=e-i,h=n-r,l=e*r-n*i,u=s[a-2],c=s[a-1],f=0;f<a;f+=2){var d=s[f],p=s[f+1],g=u*p-c*d,m=u-d,v=c-p,y=o*v-h*m,x=(l*m-o*g)/y;if((u<=x&&x<=d||d<=x&&x<=u)&&(e<=x&&x<=i||i<=x&&x<=e)){var M=(l*v-h*g)/y;if((c<=M&&M<=p||p<=M&&M<=c)&&(n<=M&&M<=r||r<=M&&M<=n))return!0}u=d,c=p}return!1},Wt.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]},Wt.prototype.getWidth=function(){return this.maxX-this.minX},Wt.prototype.getHeight=function(){return this.maxY-this.minY},P=Wt,C.SkeletonBounds=P,Z=St=St||{},qt.prototype.clipStart=function(t,e){if(null!=this.clipAttachment)return 0;var n=(this.clipAttachment=e).worldVerticesLength,i=Z.Utils.setArraySize(this.clippingPolygon,n);e.computeWorldVertices(t,0,n,i,0,2);var r=this.clippingPolygon;qt.makeClockwise(r);for(var s=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r)),a=0,o=s.length;a<o;a++){var h=s[a];qt.makeClockwise(h),h.push(h[0]),h.push(h[1])}return s.length},qt.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},qt.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},qt.prototype.isClipping=function(){return null!=this.clipAttachment},qt.prototype.clipTriangles=function(t,e,n,i,r,s,a,o){var h=this.clipOutput,l=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,f=this.clippingPolygons.length,d=o?12:8,p=0;l.length=0;t:for(var g=u.length=0;g<i;g+=3)for(var m=n[g]<<1,v=t[m],y=t[1+m],x=r[m],M=r[1+m],w=t[m=n[g+1]<<1],E=t[1+m],T=r[m],A=r[1+m],b=t[m=n[g+2]<<1],R=t[1+m],S=r[m],I=r[1+m],C=0;C<f;C++){var P=l.length;if(!this.clip(v,y,w,E,b,R,c[C],h)){(Y=Z.Utils.setArraySize(l,P+3*d))[P]=v,Y[P+1]=y,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a,o?(Y[P+6]=x,Y[P+7]=M,Y[P+8]=a.r,Y[P+9]=a.g,Y[P+10]=a.b,Y[P+11]=a.a,Y[P+12]=w,Y[P+13]=E,Y[P+14]=s.r,Y[P+15]=s.g,Y[P+16]=s.b,Y[P+17]=s.a,Y[P+18]=T,Y[P+19]=A,Y[P+20]=a.r,Y[P+21]=a.g,Y[P+22]=a.b,Y[P+23]=a.a,Y[P+24]=b,Y[P+25]=R,Y[P+26]=s.r,Y[P+27]=s.g,Y[P+28]=s.b,Y[P+29]=s.a,Y[P+30]=S,Y[P+31]=I,Y[P+32]=a.r,Y[P+33]=a.g,Y[P+34]=a.b,Y[P+35]=a.a):(Y[P+6]=x,Y[P+7]=M,Y[P+8]=w,Y[P+9]=E,Y[P+10]=s.r,Y[P+11]=s.g,Y[P+12]=s.b,Y[P+13]=s.a,Y[P+14]=T,Y[P+15]=A,Y[P+16]=b,Y[P+17]=R,Y[P+18]=s.r,Y[P+19]=s.g,Y[P+20]=s.b,Y[P+21]=s.a,Y[P+22]=S,Y[P+23]=I),P=u.length,(j=Z.Utils.setArraySize(u,P+3))[P]=p,j[P+1]=p+1,j[P+2]=p+2,p+=3;continue t}var k=h.length;if(0!=k){for(var _=E-R,O=b-w,F=v-b,L=R-y,V=1/(_*F+O*(y-R)),D=k>>1,N=this.clipOutput,Y=Z.Utils.setArraySize(l,P+D*d),X=0;X<k;X+=2){var B=N[X],U=N[X+1];Y[P]=B,Y[P+1]=U,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a;var z=B-b,W=U-R,q=(_*z+O*W)*V,G=(L*z+F*W)*V,H=1-q-G;Y[P+6]=x*q+T*G+S*H,Y[P+7]=M*q+A*G+I*H,o&&(Y[P+8]=a.r,Y[P+9]=a.g,Y[P+10]=a.b,Y[P+11]=a.a),P+=d}P=u.length;var j=Z.Utils.setArraySize(u,P+3*(D-2));for(D--,X=1;X<D;X++)j[P]=p,j[P+1]=p+X,j[P+2]=p+X+1,P+=3;p+=1+D}}},qt.prototype.clip=function(t,e,n,i,r,s,a,o){var h=o,l=!1,u=null;2<=a.length%4?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),o.length=0;for(var c=a,f=a.length-4,d=0;;d+=2){for(var p=c[d],g=c[d+1],m=c[d+2],v=c[d+3],y=p-m,x=g-v,M=u,w=u.length-2,E=o.length,T=0;T<w;T+=2){var A=M[T],b=M[T+1],R=M[T+2],S=M[T+3],I=0<y*(S-v)-x*(R-m);if(0<y*(b-v)-x*(A-m)){if(I){o.push(R),o.push(S);continue}var C,P,k,_=(C=S-b)*(m-p)-(P=R-A)*(v-g);1e-6<Math.abs(_)?(k=(P*(g-b)-C*(p-A))/_,o.push(p+(m-p)*k),o.push(g+(v-g)*k)):(o.push(p),o.push(g))}else I&&(_=(C=S-b)*(m-p)-(P=R-A)*(v-g),1e-6<Math.abs(_)?(k=(P*(g-b)-C*(p-A))/_,o.push(p+(m-p)*k),o.push(g+(v-g)*k)):(o.push(p),o.push(g)),o.push(R),o.push(S));l=!0}if(E==o.length)return!(h.length=0);if(o.push(o[0]),o.push(o[1]),d==f)break;var O=o;(o=u).length=0,u=O}if(h!=o)for(var d=h.length=0,F=o.length-2;d<F;d++)h[d]=o[d];else h.length=h.length-2;return l},qt.makeClockwise=function(t){for(var e,n,i,r=t,s=t.length,a=r[s-2]*r[1]-r[0]*r[s-1],o=0,h=s-3;o<h;o+=2)e=r[o],n=r[o+1],i=r[o+2],a+=e*r[o+3]-i*n;if(!(a<0))for(var o=0,l=s-2,h=s>>1;o<h;o+=2){var u=r[o],c=r[o+1],f=l-o;r[o]=r[f],r[o+1]=r[1+f],r[f]=u,r[1+f]=c}},_=qt,Z.SkeletonClipping=_,O=St=St||{},Gt.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},Gt.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},Gt.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},F=Gt,O.SkeletonData=F,function(tt){var t=(F.prototype.readSkeletonData=function(t){var e=this.scale,n=new tt.SkeletonData,i="string"==typeof t?JSON.parse(t):t,r=i.skeleton;if(null!=r){if(n.hash=r.hash,n.version=r.spine,"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height,n.fps=r.fps,n.imagesPath=r.images}if(i.bones)for(var s=0;s<i.bones.length;s++){var a=i.bones[s],o=null,h=this.getValue(a,"parent",null);if(null!=h&&null==(o=n.findBone(h)))throw new Error("Parent bone not found: "+h);(f=new tt.BoneData(n.bones.length,a.name,o)).length=this.getValue(a,"length",0)*e,f.x=this.getValue(a,"x",0)*e,f.y=this.getValue(a,"y",0)*e,f.rotation=this.getValue(a,"rotation",0),f.scaleX=this.getValue(a,"scaleX",1),f.scaleY=this.getValue(a,"scaleY",1),f.shearX=this.getValue(a,"shearX",0),f.shearY=this.getValue(a,"shearY",0),f.transformMode=F.transformModeFromString(this.getValue(a,"transform","normal")),f.skinRequired=this.getValue(a,"skin",!1),n.bones.push(f)}if(i.slots)for(s=0;s<i.slots.length;s++){var l=(A=i.slots[s]).name,u=A.bone,c=n.findBone(u);if(null==c)throw new Error("Slot bone not found: "+u);var f=new tt.SlotData(n.slots.length,l,c),d=this.getValue(A,"color",null);null!=d&&f.color.setFromString(d);var p=this.getValue(A,"dark",null);null!=p&&(f.darkColor=new tt.Color(1,1,1,1),f.darkColor.setFromString(p)),f.attachmentName=this.getValue(A,"attachment",null),f.blendMode=F.blendModeFromString(this.getValue(A,"blend","normal")),n.slots.push(f)}if(i.ik)for(s=0;s<i.ik.length;s++){var g=i.ik[s];(f=new tt.IkConstraintData(g.name)).order=this.getValue(g,"order",0),f.skinRequired=this.getValue(g,"skin",!1);for(var m=0;m<g.bones.length;m++){if(u=g.bones[m],null==(M=n.findBone(u)))throw new Error("IK bone not found: "+u);f.bones.push(M)}var v=g.target;if(f.target=n.findBone(v),null==f.target)throw new Error("IK target bone not found: "+v);f.mix=this.getValue(g,"mix",1),f.softness=this.getValue(g,"softness",0)*e,f.bendDirection=this.getValue(g,"bendPositive",!0)?1:-1,f.compress=this.getValue(g,"compress",!1),f.stretch=this.getValue(g,"stretch",!1),f.uniform=this.getValue(g,"uniform",!1),n.ikConstraints.push(f)}if(i.transform)for(s=0;s<i.transform.length;s++){for(g=i.transform[s],(f=new tt.TransformConstraintData(g.name)).order=this.getValue(g,"order",0),f.skinRequired=this.getValue(g,"skin",!1),m=0;m<g.bones.length;m++){if(u=g.bones[m],null==(M=n.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(M)}if(v=g.target,f.target=n.findBone(v),null==f.target)throw new Error("Transform constraint target bone not found: "+v);f.local=this.getValue(g,"local",!1),f.relative=this.getValue(g,"relative",!1),f.offsetRotation=this.getValue(g,"rotation",0),f.offsetX=this.getValue(g,"x",0)*e,f.offsetY=this.getValue(g,"y",0)*e,f.offsetScaleX=this.getValue(g,"scaleX",0),f.offsetScaleY=this.getValue(g,"scaleY",0),f.offsetShearY=this.getValue(g,"shearY",0),f.rotateMix=this.getValue(g,"rotateMix",1),f.translateMix=this.getValue(g,"translateMix",1),f.scaleMix=this.getValue(g,"scaleMix",1),f.shearMix=this.getValue(g,"shearMix",1),n.transformConstraints.push(f)}if(i.path)for(s=0;s<i.path.length;s++){for(g=i.path[s],(f=new tt.PathConstraintData(g.name)).order=this.getValue(g,"order",0),f.skinRequired=this.getValue(g,"skin",!1),m=0;m<g.bones.length;m++){if(u=g.bones[m],null==(M=n.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(M)}if(v=g.target,f.target=n.findSlot(v),null==f.target)throw new Error("Path target slot not found: "+v);f.positionMode=F.positionModeFromString(this.getValue(g,"positionMode","percent")),f.spacingMode=F.spacingModeFromString(this.getValue(g,"spacingMode","length")),f.rotateMode=F.rotateModeFromString(this.getValue(g,"rotateMode","tangent")),f.offsetRotation=this.getValue(g,"rotation",0),f.position=this.getValue(g,"position",0),f.positionMode==tt.PositionMode.Fixed&&(f.position*=e),f.spacing=this.getValue(g,"spacing",0),f.spacingMode!=tt.SpacingMode.Length&&f.spacingMode!=tt.SpacingMode.Fixed||(f.spacing*=e),f.rotateMix=this.getValue(g,"rotateMix",1),f.translateMix=this.getValue(g,"translateMix",1),n.pathConstraints.push(f)}if(i.skins)for(s=0;s<i.skins.length;s++){var y=i.skins[s],x=new tt.Skin(y.name);if(y.bones)for(var M,w=0;w<y.bones.length;w++){if(null==(M=n.findBone(y.bones[w])))throw new Error("Skin bone not found: "+y.bones[s]);x.bones.push(M)}if(y.ik)for(w=0;w<y.ik.length;w++){if(null==(E=n.findIkConstraint(y.ik[w])))throw new Error("Skin IK constraint not found: "+y.ik[s]);x.constraints.push(E)}if(y.transform)for(w=0;w<y.transform.length;w++){if(null==(E=n.findTransformConstraint(y.transform[w])))throw new Error("Skin transform constraint not found: "+y.transform[s]);x.constraints.push(E)}if(y.path)for(var E,w=0;w<y.path.length;w++){if(null==(E=n.findPathConstraint(y.path[w])))throw new Error("Skin path constraint not found: "+y.path[s]);x.constraints.push(E)}for(var l in y.attachments){var T=n.findSlot(l);if(null==T)throw new Error("Slot not found: "+l);var A=y.attachments[l];for(var b in A){var R=this.readAttachment(A[b],x,T.index,b,n);null!=R&&x.setAttachment(T.index,b,R)}}n.skins.push(x),"default"==x.name&&(n.defaultSkin=x)}for(var s=0,S=this.linkedMeshes.length;s<S;s++){var I=this.linkedMeshes[s];if(null==(x=null==I.skin?n.defaultSkin:n.findSkin(I.skin)))throw new Error("Skin not found: "+I.skin);var C=x.getAttachment(I.slotIndex,I.parent);if(null==C)throw new Error("Parent mesh not found: "+I.parent);I.mesh.deformAttachment=I.inheritDeform?C:I.mesh,I.mesh.setParentMesh(C),I.mesh.updateUVs()}if(this.linkedMeshes.length=0,i.events)for(var P in i.events){var k=i.events[P];(f=new tt.EventData(P)).intValue=this.getValue(k,"int",0),f.floatValue=this.getValue(k,"float",0),f.stringValue=this.getValue(k,"string",""),f.audioPath=this.getValue(k,"audio",null),null!=f.audioPath&&(f.volume=this.getValue(k,"volume",1),f.balance=this.getValue(k,"balance",0)),n.events.push(f)}if(i.animations)for(var _ in i.animations){var O=i.animations[_];this.readAnimation(O,_,n)}return n},F.prototype.readAttachment=function(t,e,n,i,r){var s=this.scale;switch(i=this.getValue(t,"name",i),this.getValue(t,"type","region")){case"region":var a=this.getValue(t,"path",i),o=this.attachmentLoader.newRegionAttachment(e,i,a);return null==o?null:(o.path=a,o.x=this.getValue(t,"x",0)*s,o.y=this.getValue(t,"y",0)*s,o.scaleX=this.getValue(t,"scaleX",1),o.scaleY=this.getValue(t,"scaleY",1),o.rotation=this.getValue(t,"rotation",0),o.width=t.width*s,o.height=t.height*s,null!=(x=this.getValue(t,"color",null))&&o.color.setFromString(x),o.updateOffset(),o);case"boundingbox":var h=this.attachmentLoader.newBoundingBoxAttachment(e,i);return null==h?null:(this.readVertices(t,h,t.vertexCount<<1),null!=(x=this.getValue(t,"color",null))&&h.color.setFromString(x),h);case"mesh":case"linkedmesh":var a=this.getValue(t,"path",i),l=this.attachmentLoader.newMeshAttachment(e,i,a);if(null==l)return null;l.path=a,null!=(x=this.getValue(t,"color",null))&&l.color.setFromString(x),l.width=this.getValue(t,"width",0)*s,l.height=this.getValue(t,"height",0)*s;var u=this.getValue(t,"parent",null);if(null!=u)return this.linkedMeshes.push(new M(l,this.getValue(t,"skin",null),n,u,this.getValue(t,"deform",!0))),l;var c=t.uvs;return this.readVertices(t,l,c.length),l.triangles=t.triangles,l.regionUVs=c,l.updateUVs(),l.edges=this.getValue(t,"edges",null),l.hullLength=2*this.getValue(t,"hull",0),l;case"path":if(null==(a=this.attachmentLoader.newPathAttachment(e,i)))return null;a.closed=this.getValue(t,"closed",!1),a.constantSpeed=this.getValue(t,"constantSpeed",!0);var f=t.vertexCount;this.readVertices(t,a,f<<1);for(var d=tt.Utils.newArray(f/3,0),p=0;p<t.lengths.length;p++)d[p]=t.lengths[p]*s;return a.lengths=d,null!=(x=this.getValue(t,"color",null))&&a.color.setFromString(x),a;case"point":var g=this.attachmentLoader.newPointAttachment(e,i);return null==g?null:(g.x=this.getValue(t,"x",0)*s,g.y=this.getValue(t,"y",0)*s,g.rotation=this.getValue(t,"rotation",0),null!=(x=this.getValue(t,"color",null))&&g.color.setFromString(x),g);case"clipping":var m=this.attachmentLoader.newClippingAttachment(e,i);if(null==m)return null;var v=this.getValue(t,"end",null);if(null!=v){var y=r.findSlot(v);if(null==y)throw new Error("Clipping end slot not found: "+v);m.endSlot=y}var x,f=t.vertexCount;return this.readVertices(t,m,f<<1),null!=(x=this.getValue(t,"color",null))&&m.color.setFromString(x),m}return null},F.prototype.readVertices=function(t,e,n){var i=this.scale;e.worldVerticesLength=n;var r=t.vertices;if(n!=r.length){for(var s=new Array,a=new Array,o=0,h=r.length;o<h;){var l=r[o++];a.push(l);for(var u=o+4*l;o<u;o+=4)a.push(r[o]),s.push(r[o+1]*i),s.push(r[o+2]*i),s.push(r[o+3])}e.bones=a,e.vertices=tt.Utils.toFloatArray(s)}else{var c=tt.Utils.toFloatArray(r);if(1!=i)for(var o=0,h=r.length;o<h;o++)c[o]*=i;e.vertices=c}},F.prototype.readAnimation=function(t,e,n){var i=this.scale,r=new Array,s=0;if(t.slots)for(var a in t.slots){var o=t.slots[a];if(-1==(Z=n.findSlotIndex(a)))throw new Error("Slot not found: "+a);for(var h in o){var l=o[h];if("attachment"==h){(x=new tt.AttachmentTimeline(l.length)).slotIndex=Z;for(var u=0,c=0;c<l.length;c++){var f=l[c];x.setFrame(u++,this.getValue(f,"time",0),f.name)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}else if("color"==h){for((x=new tt.ColorTimeline(l.length)).slotIndex=Z,c=u=0;c<l.length;c++){var f=l[c],d=new tt.Color;d.setFromString(f.color),x.setFrame(u,this.getValue(f,"time",0),d.r,d.g,d.b,d.a),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.ColorTimeline.ENTRIES])}else{if("twoColor"!=h)throw new Error("Invalid timeline type for a slot: "+h+" ("+a+")");for((x=new tt.TwoColorTimeline(l.length)).slotIndex=Z,c=u=0;c<l.length;c++){var f=l[c],p=new tt.Color,g=new tt.Color;p.setFromString(f.light),g.setFromString(f.dark),x.setFrame(u,this.getValue(f,"time",0),p.r,p.g,p.b,p.a,g.r,g.g,g.b),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TwoColorTimeline.ENTRIES])}}}if(t.bones)for(var m in t.bones){var v=t.bones[m],y=n.findBoneIndex(m);if(-1==y)throw new Error("Bone not found: "+m);for(var h in v)if(l=v[h],"rotate"===h){for((x=new tt.RotateTimeline(l.length)).boneIndex=y,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"angle",0)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.RotateTimeline.ENTRIES])}else{if("translate"!==h&&"scale"!==h&&"shear"!==h)throw new Error("Invalid timeline type for a bone: "+h+" ("+m+")");var x=null,M=1,w=0;for("scale"===h?(x=new tt.ScaleTimeline(l.length),w=1):"shear"===h?x=new tt.ShearTimeline(l.length):(x=new tt.TranslateTimeline(l.length),M=i),x.boneIndex=y,c=u=0;c<l.length;c++){var f=l[c],E=this.getValue(f,"x",w),T=this.getValue(f,"y",w);x.setFrame(u,this.getValue(f,"time",0),E*M,T*M),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TranslateTimeline.ENTRIES])}}if(t.ik)for(var A in t.ik){var b=t.ik[A],R=n.findIkConstraint(A);for((x=new tt.IkConstraintTimeline(b.length)).ikConstraintIndex=n.ikConstraints.indexOf(R),c=u=0;c<b.length;c++)f=b[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"mix",1),this.getValue(f,"softness",0)*i,this.getValue(f,"bendPositive",!0)?1:-1,this.getValue(f,"compress",!1),this.getValue(f,"stretch",!1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.IkConstraintTimeline.ENTRIES])}if(t.transform)for(var A in t.transform){for(b=t.transform[A],R=n.findTransformConstraint(A),(x=new tt.TransformConstraintTimeline(b.length)).transformConstraintIndex=n.transformConstraints.indexOf(R),c=u=0;c<b.length;c++)f=b[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1),this.getValue(f,"scaleMix",1),this.getValue(f,"shearMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TransformConstraintTimeline.ENTRIES])}if(t.path)for(var A in t.path){var b=t.path[A],S=n.findPathConstraintIndex(A);if(-1==S)throw new Error("Path constraint not found: "+A);var I=n.pathConstraints[S];for(var h in b)if(l=b[h],"position"===h||"spacing"===h){var x=null,M=1;for("spacing"===h?(x=new tt.PathConstraintSpacingTimeline(l.length),I.spacingMode!=tt.SpacingMode.Length&&I.spacingMode!=tt.SpacingMode.Fixed||(M=i)):(x=new tt.PathConstraintPositionTimeline(l.length),I.positionMode==tt.PositionMode.Fixed&&(M=i)),x.pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,h,0)*M),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===h){for((x=new tt.PathConstraintMixTimeline(l.length)).pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintMixTimeline.ENTRIES])}}if(t.deform)for(var C in t.deform){var P=t.deform[C],k=n.findSkin(C);if(null==k)throw new Error("Skin not found: "+C);for(var a in P){if(o=P[a],-1==(Z=n.findSlotIndex(a)))throw new Error("Slot not found: "+o.name);for(var h in o){var l=o[h],_=k.getAttachment(Z,h);if(null==_)throw new Error("Deform attachment not found: "+l.name);var O=null!=_.bones,F=_.vertices,L=O?F.length/3*2:F.length;(x=new tt.DeformTimeline(l.length)).slotIndex=Z,x.attachment=_;for(var u=0,V=0;V<l.length;V++){var f=l[V],D=void 0,N=this.getValue(f,"vertices",null);if(null==N)D=O?tt.Utils.newFloatArray(L):F;else{D=tt.Utils.newFloatArray(L);var Y=this.getValue(f,"offset",0);if(tt.Utils.arrayCopy(N,0,D,Y,N.length),1!=i)for(var X=(c=Y)+N.length;c<X;c++)D[c]*=i;if(!O)for(c=0;c<L;c++)D[c]+=F[c]}x.setFrame(u,this.getValue(f,"time",0),D),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}}}var B=t.drawOrder;if(null==B&&(B=t.draworder),null!=B){for(var x=new tt.DrawOrderTimeline(B.length),U=n.slots.length,u=0,V=0;V<B.length;V++){var z=B[V],W=null,q=this.getValue(z,"offsets",null);if(null!=q){W=tt.Utils.newArray(U,-1);for(var G=tt.Utils.newArray(U-q.length,0),H=0,j=0,c=0;c<q.length;c++){var Z,K=q[c];if(-1==(Z=n.findSlotIndex(K.slot)))throw new Error("Slot not found: "+K.slot);for(;H!=Z;)G[j++]=H++;W[H+K.offset]=H++}for(;H<U;)G[j++]=H++;for(c=U-1;0<=c;c--)-1==W[c]&&(W[c]=G[--j])}x.setFrame(u++,this.getValue(z,"time",0),W)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(t.events){for(x=new tt.EventTimeline(t.events.length),c=u=0;c<t.events.length;c++){var Q=t.events[c],J=n.findEvent(Q.name);if(null==J)throw new Error("Event not found: "+Q.name);var $=new tt.Event(tt.Utils.toSinglePrecision(this.getValue(Q,"time",0)),J);$.intValue=this.getValue(Q,"int",J.intValue),$.floatValue=this.getValue(Q,"float",J.floatValue),$.stringValue=this.getValue(Q,"string",J.stringValue),null!=$.data.audioPath&&($.volume=this.getValue(Q,"volume",1),$.balance=this.getValue(Q,"balance",0)),x.setFrame(u++,$)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(isNaN(s))throw new Error("Error while parsing animation, duration is NaN");n.animations.push(new tt.Animation(e,r,s))},F.prototype.readCurve=function(t,e,n){var i;t.hasOwnProperty("curve")&&("stepped"==t.curve?e.setStepped(n):(i=t.curve,e.setCurve(n,i,this.getValue(t,"c2",0),this.getValue(t,"c3",1),this.getValue(t,"c4",1))))},F.prototype.getValue=function(t,e,n){return void 0!==t[e]?t[e]:n},F.blendModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.BlendMode.Normal;if("additive"==t)return tt.BlendMode.Additive;if("multiply"==t)return tt.BlendMode.Multiply;if("screen"==t)return tt.BlendMode.Screen;throw new Error("Unknown blend mode: "+t)},F.positionModeFromString=function(t){if("fixed"==(t=t.toLowerCase()))return tt.PositionMode.Fixed;if("percent"==t)return tt.PositionMode.Percent;throw new Error("Unknown position mode: "+t)},F.spacingModeFromString=function(t){if("length"==(t=t.toLowerCase()))return tt.SpacingMode.Length;if("fixed"==t)return tt.SpacingMode.Fixed;if("percent"==t)return tt.SpacingMode.Percent;throw new Error("Unknown position mode: "+t)},F.rotateModeFromString=function(t){if("tangent"==(t=t.toLowerCase()))return tt.RotateMode.Tangent;if("chain"==t)return tt.RotateMode.Chain;if("chainscale"==t)return tt.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+t)},F.transformModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.TransformMode.Normal;if("onlytranslation"==t)return tt.TransformMode.OnlyTranslation;if("norotationorreflection"==t)return tt.TransformMode.NoRotationOrReflection;if("noscale"==t)return tt.TransformMode.NoScale;if("noscaleorreflection"==t)return tt.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+t)},F);function F(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}tt.SkeletonJson=t;var M=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r}}(St=St||{}),function(h){var s=function(t,e,n){this.slotIndex=t,this.name=e,this.attachment=n};h.SkinEntry=s;var t=(e.prototype.setAttachment=function(t,e,n){if(null==n)throw new Error("attachment cannot be null.");var i=this.attachments;t>=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],i=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==n){i=!0;break}i||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],i=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){i=!0;break}i||this.constraints.push(s)}for(var a=t.getAttachments(),e=0;e<a.length;e++){var o=a[e];this.setAttachment(o.slotIndex,o.name,o.attachment)}},e.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],i=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==n){i=!0;break}i||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],i=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){i=!0;break}i||this.constraints.push(s)}for(var a=t.getAttachments(),e=0;e<a.length;e++){var o=a[e];null!=o.attachment&&(o.attachment instanceof h.MeshAttachment?o.attachment=o.attachment.newLinkedMesh():o.attachment=o.attachment.copy(),this.setAttachment(o.slotIndex,o.name,o.attachment))}},e.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},e.prototype.removeAttachment=function(t,e){var n=this.attachments[t];n&&(n[e]=null)},e.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var n=this.attachments[e];if(n)for(var i in n){var r=n[i];r&&t.push(new s(e,i,r))}}return t},e.prototype.getAttachmentsForSlot=function(t,e){var n=this.attachments[t];if(n)for(var i in n){var r=n[i];r&&e.push(new s(t,i,r))}},e.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},e.prototype.attachAll=function(t,e){for(var n=0,i=0;i<t.slots.length;i++){var r=t.slots[i],s=r.getAttachment();if(s&&n<e.attachments.length){var a=e.attachments[n];for(var o in a)if(s==a[o]){var h=this.getAttachment(n,o);null!=h&&r.setAttachment(h);break}}n++}},e);function e(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}h.Skin=t}(St=St||{}),L=St=St||{},Ht.prototype.getSkeleton=function(){return this.bone.skeleton},Ht.prototype.getAttachment=function(){return this.attachment},Ht.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)},Ht.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},Ht.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},Ht.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)))},V=Ht,L.Slot=V,(D=St=St||{}).SlotData=jt,function(t){var e,n,i,r,s=(a.prototype.getImage=function(){return this._image},a.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)}},a.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},a);function a(t){this._image=t}t.Texture=s,(n=e=t.TextureFilter||(t.TextureFilter={}))[n.Nearest=9728]="Nearest",n[n.Linear=9729]="Linear",n[n.MipMap=9987]="MipMap",n[n.MipMapNearestNearest=9984]="MipMapNearestNearest",n[n.MipMapLinearNearest=9985]="MipMapLinearNearest",n[n.MipMapNearestLinear=9986]="MipMapNearestLinear",n[n.MipMapLinearLinear=9987]="MipMapLinearLinear",(r=i=t.TextureWrap||(t.TextureWrap={}))[r.MirroredRepeat=33648]="MirroredRepeat",r[r.ClampToEdge=33071]="ClampToEdge",r[r.Repeat=10497]="Repeat";function o(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}t.TextureRegion=o;var h,l=(kt(u,h=s),u.prototype.setFilters=function(t,e){},u.prototype.setWraps=function(t,e){},u.prototype.dispose=function(){},u);function u(){return null!==h&&h.apply(this,arguments)||this}t.FakeTexture=l}(St=St||{}),function(d){var t=(e.prototype.load=function(t,e){if(null==e)throw new Error("textureLoader cannot be null.");for(var n=new p(t),i=new Array(4),r=null;;){var s,a,o,h,l,u,c,f=n.readLine();if(null==f)break;0==(f=f.trim()).length?r=null:r?((s=new m).name=f,s.page=r,"true"==(a=n.readValue()).toLocaleLowerCase()?s.degrees=90:"false"==a.toLocaleLowerCase()?s.degrees=0:s.degrees=parseFloat(a),s.rotate=90==s.degrees,n.readTuple(i),o=parseInt(i[0]),h=parseInt(i[1]),n.readTuple(i),l=parseInt(i[0]),u=parseInt(i[1]),s.u=o/r.width,s.v=h/r.height,s.rotate?(s.u2=(o+u)/r.width,s.v2=(h+l)/r.height):(s.u2=(o+l)/r.width,s.v2=(h+u)/r.height),s.x=o,s.y=h,s.width=Math.abs(l),s.height=Math.abs(u),4==n.readTuple(i)&&4==n.readTuple(i)&&n.readTuple(i),s.originalWidth=parseInt(i[0]),s.originalHeight=parseInt(i[1]),n.readTuple(i),s.offsetX=parseInt(i[0]),s.offsetY=parseInt(i[1]),s.index=parseInt(n.readValue()),s.texture=r.texture,this.regions.push(s)):((r=new g).name=f,2==n.readTuple(i)&&(r.width=parseInt(i[0]),r.height=parseInt(i[1]),n.readTuple(i)),n.readTuple(i),r.minFilter=d.Texture.filterFromString(i[0]),r.magFilter=d.Texture.filterFromString(i[1]),c=n.readValue(),r.uWrap=d.TextureWrap.ClampToEdge,r.vWrap=d.TextureWrap.ClampToEdge,"x"==c?r.uWrap=d.TextureWrap.Repeat:"y"==c?r.vWrap=d.TextureWrap.Repeat:"xy"==c&&(r.uWrap=r.vWrap=d.TextureWrap.Repeat),r.texture=e(f),r.texture.setFilters(r.minFilter,r.magFilter),r.texture.setWraps(r.uWrap,r.vWrap),r.width=r.texture.getImage().width,r.height=r.texture.getImage().height,this.pages.push(r))}},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].texture.dispose()},e);function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}d.TextureAtlas=t;var p=(n.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},n.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()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var g=function(){};d.TextureAtlasPage=g;var i,m=(i=d.TextureRegion,kt(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}d.TextureAtlasRegion=m}(St=St||{}),N=St=St||{},Zt.prototype.isActive=function(){return this.active},Zt.prototype.apply=function(){this.update()},Zt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Zt.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0<s*h-a*o?N.MathUtils.degRad:-N.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var g,m,v,y,x,M,w,E,T,A,b,R=f[d],S=!1;0!=t&&(g=R.a,w=R.b,m=R.c,E=R.d,(A=Math.atan2(o,s)-Math.atan2(m,g)+u)>N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A*=t,v=Math.cos(A),y=Math.sin(A),R.a=v*g-y*m,R.b=v*w-y*E,R.c=y*g+v*m,R.d=y*w+v*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0<n&&(b=Math.sqrt(R.a*R.a+R.c*R.c),M=Math.sqrt(s*s+o*o),1e-5<b&&(b=(b+(M-b+this.data.offsetScaleX)*n)/b),R.a*=b,R.c*=b,b=Math.sqrt(R.b*R.b+R.d*R.d),M=Math.sqrt(a*a+h*h),1e-5<b&&(b=(b+(M-b+this.data.offsetScaleY)*n)/b),R.b*=b,R.d*=b,S=!0),0<i&&(w=R.b,E=R.d,T=Math.atan2(E,w),(A=Math.atan2(h,a)-Math.atan2(o,s)-(T-Math.atan2(R.c,R.a)))>N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A=T+(A+c)*i,b=Math.sqrt(w*w+E*E),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},Zt.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0<s*h-a*o?N.MathUtils.degRad:-N.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var g,m,v,y,x,M,w,E,T,A=f[d],b=!1;0!=t&&(g=A.a,w=A.b,m=A.c,E=A.d,(M=Math.atan2(o,s)+u)>N.MathUtils.PI?M-=N.MathUtils.PI2:M<-N.MathUtils.PI&&(M+=N.MathUtils.PI2),M*=t,v=Math.cos(M),y=Math.sin(M),A.a=v*g-y*m,A.b=v*w-y*E,A.c=y*g+v*m,A.d=y*w+v*E,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0<n&&(T=(Math.sqrt(s*s+o*o)-1+this.data.offsetScaleX)*n+1,A.a*=T,A.c*=T,T=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleY)*n+1,A.b*=T,A.d*=T,b=!0),0<i&&((M=Math.atan2(h,a)-Math.atan2(o,s))>N.MathUtils.PI?M-=N.MathUtils.PI2:M<-N.MathUtils.PI&&(M+=N.MathUtils.PI2),w=A.b,E=A.d,M=Math.atan2(E,w)+(M-N.MathUtils.PI/2+c)*i,T=Math.sqrt(w*w+E*E),A.b=Math.cos(M)*T,A.d=Math.sin(M)*T,b=!0),b&&(A.appliedValid=!1)}},Zt.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a<o;a++){var h=s[a];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(p=r.arotation-l+this.data.offsetRotation,l+=(p-=360*(16384-(16384.499999999996-p/360|0)))*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax-u+this.data.offsetX)*e,c+=(r.ay-c+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=n&&(1e-5<f&&(f=(f+(r.ascaleX-f+this.data.offsetScaleX)*n)/f),1e-5<d&&(d=(d+(r.ascaleY-d+this.data.offsetScaleY)*n)/d));var p,g=h.ashearY;0!=i&&(p=r.ashearY-g+this.data.offsetShearY,p-=360*(16384-(16384.499999999996-p/360|0)),h.shearY+=p*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,g)}},Zt.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a<o;a++){var h=s[a];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(l+=(r.arotation+this.data.offsetRotation)*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax+this.data.offsetX)*e,c+=(r.ay+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=n&&(1e-5<f&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*n+1),1e-5<d&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=i&&(p+=(r.ashearY+this.data.offsetShearY)*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},Y=Zt,N.TransformConstraint=Y,X=St=St||{},B=X.ConstraintData,kt(Kt,B),U=Kt,X.TransformConstraintData=U,z=St=St||{},Qt.prototype.triangulate=function(t){for(var e=t,n=t.length>>1,i=this.indicesArray,r=i.length=0;r<n;r++)i[r]=r;for(var s=this.isConcaveArray,r=s.length=0,a=n;r<a;++r)s[r]=Qt.isConcave(r,n,e,i);var o=this.triangles;for(o.length=0;3<n;){for(var h=n-1,r=0,l=1;;){t:if(!s[r]){for(var u=i[h]<<1,c=i[r]<<1,f=i[l]<<1,d=e[u],p=e[1+u],g=e[c],m=e[1+c],v=e[f],y=e[1+f],x=(l+1)%n;x!=h;x=(x+1)%n)if(s[x]){var M=i[x]<<1,w=e[M],E=e[1+M];if(Qt.positiveArea(v,y,d,p,w,E)&&Qt.positiveArea(d,p,g,m,w,E)&&Qt.positiveArea(g,m,v,y,w,E))break t}break}if(0==l){do{if(!s[r])break;r--}while(0<r);break}h=r,l=((r=l)+1)%n}o.push(i[(n+r-1)%n]),o.push(i[r]),o.push(i[(r+1)%n]),i.splice(r,1),s.splice(r,1);var T=(--n+r-1)%n,A=r==n?0:r;s[T]=Qt.isConcave(T,n,e,i),s[A]=Qt.isConcave(A,n,e,i)}return 3==n&&(o.push(i[2]),o.push(i[0]),o.push(i[1])),o},Qt.prototype.decompose=function(t,e){var n=t,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;for(var a=this.polygonPool.obtain(),o=-1,h=a.length=0,l=0,u=e.length;l<u;l+=3){var c=e[l]<<1,f=e[l+1]<<1,d=e[l+2]<<1,p=n[c],g=n[1+c],m=n[f],v=n[1+f],y=n[d],x=n[1+d],M=!1;o==c&&(w=a.length-4,S=Qt.winding(a[w],a[w+1],a[w+2],a[w+3],y,x),I=Qt.winding(y,x,a[0],a[1],a[2],a[3]),S==h&&I==h&&(a.push(y),a.push(x),s.push(d),M=!0)),M||(0<a.length?(i.push(a),r.push(s)):(this.polygonPool.free(a),this.polygonIndicesPool.free(s)),(a=this.polygonPool.obtain()).length=0,a.push(p),a.push(g),a.push(m),a.push(v),a.push(y),a.push(x),(s=this.polygonIndicesPool.obtain()).length=0,s.push(c),s.push(f),s.push(d),h=Qt.winding(p,g,m,v,y,x),o=c)}for(0<a.length&&(i.push(a),r.push(s)),l=0,u=i.length;l<u;l++)if(0!=(s=r[l]).length)for(var w,E,T,A,b,R,S,I,C=s[0],P=s[s.length-1],k=(a=i[l])[w=a.length-4],_=a[w+1],O=a[w+2],F=a[w+3],L=a[0],V=a[1],D=a[2],N=a[3],Y=Qt.winding(k,_,O,F,L,V),X=0;X<u;X++)X!=l&&3==(E=r[X]).length&&(T=E[0],A=E[1],b=E[2],y=(R=i[X])[R.length-2],x=R[R.length-1],T==C&&A==P&&(S=Qt.winding(k,_,O,F,y,x),I=Qt.winding(y,x,L,V,D,N),S==Y&&I==Y&&(R.length=0,E.length=0,a.push(y),a.push(x),s.push(b),k=O,_=F,O=y,F=x,X=0)));for(l=i.length-1;0<=l;l--)0==(a=i[l]).length&&(i.splice(l,1),this.polygonPool.free(a),s=r[l],r.splice(l,1),this.polygonIndicesPool.free(s));return i},Qt.isConcave=function(t,e,n,i){var r=i[(e+t-1)%e]<<1,s=i[t]<<1,a=i[(t+1)%e]<<1;return!this.positiveArea(n[r],n[1+r],n[s],n[1+s],n[a],n[1+a])},Qt.positiveArea=function(t,e,n,i,r,s){return 0<=t*(s-i)+n*(e-s)+r*(i-e)},Qt.winding=function(t,e,n,i,r,s){var a=n-t,o=i-e;return 0<=r*o-s*a+a*e-t*o?1:-1},W=Qt,z.Triangulator=W,function(t){var e=(n.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},n.prototype.contains=function(t){return null!=this.array[0|t]},n.prototype.remove=function(t){this.array[0|t]=void 0},n.prototype.clear=function(){this.array.length=0},n);function n(){this.array=new Array}t.IntSet=e;var i=(r.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},r.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},r.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},r.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},r.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},r.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(a.clamp=function(t,e,n){return t<e?e:n<t?n:t},a.cosDeg=function(t){return Math.cos(t*a.degRad)},a.sinDeg=function(t){return Math.sin(t*a.degRad)},a.signum=function(t){return 0<t?1:t<0?-1:0},a.toInt=function(t){return 0<t?Math.floor(t):Math.ceil(t)},a.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},a.randomTriangular=function(t,e){return a.randomTriangularWith(t,e,.5*(t+e))},a.randomTriangularWith=function(t,e,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},a.PI2=2*(a.PI=3.1415927),a.radDeg=a.radiansToDegrees=180/a.PI,a.degRad=a.degreesToRadians=a.PI/180,a);function a(){}t.MathUtils=s;var o=(h.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},h);function h(){}t.Interpolation=o;var l,u=(kt(c,l=o),c.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},c);function c(t){var e=l.call(this)||this;return e.power=2,e.power=t,e}t.Pow=u;var f,d=(kt(p,f=u),p.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},p);function p(t){return f.call(this,t)||this}t.PowOut=d;var g=(m.arrayCopy=function(t,e,n,i,r){for(var s=e,a=i;s<e+r;s++,a++)n[a]=t[s]},m.setArraySize=function(t,e,n){void 0===n&&(n=0);var i=t.length;if(i==e)return t;if(i<(t.length=e))for(var r=i;r<e;r++)t[r]=n;return t},m.ensureArrayCapacity=function(t,e,n){return void 0===n&&(n=0),t.length>=e?t:m.setArraySize(t,e,n)},m.newArray=function(t,e){for(var n=new Array(t),i=0;i<t;i++)n[i]=e;return n},m.newFloatArray=function(t){if(m.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=0;return e},m.newShortArray=function(t){if(m.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=0;return e},m.toFloatArray=function(t){return m.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t},m.toSinglePrecision=function(t){return m.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t},m.webkit602BugfixHelper=function(t,e){},m.contains=function(t,e,n){void 0===n&&(n=!0);for(var i=0;i<t.length;i++)if(t[i]==e)return!0;return!1},m.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,m);function m(){}t.Utils=g;var v=(y.logBones=function(t){for(var e=0;e<t.bones.length;e++){var n=t.bones[e];console.log(n.data.name+", "+n.a+", "+n.b+", "+n.c+", "+n.d+", "+n.worldX+", "+n.worldY)}},y);function y(){}t.DebugUtils=v;var x=(M.prototype.obtain=function(){return 0<this.items.length?this.items.pop():this.instantiator()},M.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},M.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},M.prototype.clear=function(){this.items.length=0},M);function M(t){this.items=new Array,this.instantiator=t}t.Pool=x;var w=(E.prototype.set=function(t,e){return this.x=t,this.y=e,this},E.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},E.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},E);function E(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}t.Vector2=w;var T=(A.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++,1<this.frameTime&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},A);function A(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}t.TimeKeeper=T;var b=(R.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},R.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},R.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},R);function R(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}t.WindowedMean=b}(St=St||{}),Math.fround||(Math.fround=(q=new Float32Array(1),function(t){return q[0]=t,q[0]})),function(e){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}e.Attachment=t;var n,i=(kt(r,n=t),r.prototype.computeWorldVertices=function(t,e,n,i,r,s){n=r+(n>>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f<e;f+=2)u+=(m=l[u])+1,c+=m;var d=a.bones;if(0==o.length)for(E=r,T=3*c;E<n;E+=s){var p=0,g=0,m=l[u++];for(m+=u;u<m;u++,T+=3){var v=d[l[u]],y=h[T],x=h[T+1],M=h[T+2];p+=(y*v.a+x*v.b+v.worldX)*M,g+=(y*v.c+x*v.d+v.worldY)*M}i[E]=p,i[E+1]=g}else for(var w=o,E=r,T=3*c,A=c<<1;E<n;E+=s){for(g=p=0,m=l[u++],m+=u;u<m;u++,T+=3,A+=2)v=d[l[u]],y=h[T]+w[A],x=h[T+1]+w[A+1],M=h[T+2],p+=(y*v.a+x*v.b+v.worldX)*M,g+=(y*v.c+x*v.d+v.worldY)*M;i[E]=p,i[E+1]=g}}else{0<o.length&&(h=o);for(var b=(v=t.bone).worldX,R=v.worldY,S=v.a,T=v.b,I=v.c,C=v.d,P=e,E=r;E<n;P+=2,E+=s){var y=h[P],x=h[P+1];i[E]=y*S+x*T+b,i[E+1]=y*I+x*C+R}}},r.prototype.copyTo=function(t){null!=this.bones?(t.bones=new Array(this.bones.length),e.Utils.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,null!=this.vertices?(t.vertices=e.Utils.newFloatArray(this.vertices.length),e.Utils.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)):t.vertices=null,t.worldVerticesLength=this.worldVerticesLength,t.deformAttachment=this.deformAttachment},r.nextID=0,r);function r(t){var e=n.call(this,t)||this;return e.id=(65535&r.nextID++)<<11,e.worldVerticesLength=0,e.deformAttachment=e}e.VertexAttachment=i}(St=St||{}),G=St=St||{},(H=G.AttachmentType||(G.AttachmentType={}))[H.Region=0]="Region",H[H.BoundingBox=1]="BoundingBox",H[H.Mesh=2]="Mesh",H[H.LinkedMesh=3]="LinkedMesh",H[H.Path=4]="Path",H[H.Point=5]="Point",H[H.Clipping=6]="Clipping",K=St=St||{},Q=K.VertexAttachment,kt(Jt,Q),Jt.prototype.copy=function(){var t=new Jt(name);return this.copyTo(t),t.color.setFromColor(this.color),t},J=Jt,K.BoundingBoxAttachment=J,$=St=St||{},tt=$.VertexAttachment,kt($t,tt),$t.prototype.copy=function(){var t=new $t(name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},et=$t,$.ClippingAttachment=et,nt=St=St||{},it=nt.VertexAttachment,kt(te,it),te.prototype.updateUVs=function(){var t=this.regionUVs;null!=this.uvs&&this.uvs.length==t.length||(this.uvs=nt.Utils.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,i=this.region.u,r=this.region.v,s=0,a=0;if(this.region instanceof nt.TextureAtlasRegion){var o=this.region,h=o.texture.getImage().width,l=o.texture.getImage().height;switch(o.degrees){case 90:i-=(o.originalHeight-o.offsetY-o.height)/h,r-=(o.originalWidth-o.offsetX-o.width)/l,s=o.originalHeight/h,a=o.originalWidth/l;for(var u=0;u<n;u+=2)e[u]=i+t[u+1]*s,e[u+1]=r+(1-t[u])*a;return;case 180:for(i-=(o.originalWidth-o.offsetX-o.width)/h,r-=o.offsetY/l,s=o.originalWidth/h,a=o.originalHeight/l,u=0;u<n;u+=2)e[u]=i+(1-t[u])*s,e[u+1]=r+(1-t[u+1])*a;return;case 270:for(i-=o.offsetY/h,r-=o.offsetX/l,s=o.originalHeight/h,a=o.originalWidth/l,u=0;u<n;u+=2)e[u]=i+(1-t[u+1])*s,e[u+1]=r+t[u]*a;return}i-=o.offsetX/h,r-=(o.originalHeight-o.offsetY-o.height)/l,s=o.originalWidth/h,a=o.originalHeight/l}else null==this.region?(i=r=0,s=a=1):(s=this.region.u2-i,a=this.region.v2-r);for(u=0;u<n;u+=2)e[u]=i+t[u]*s,e[u+1]=r+t[u+1]*a},te.prototype.getParentMesh=function(){return this.parentMesh},te.prototype.setParentMesh=function(t){null!=(this.parentMesh=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)},te.prototype.copy=function(){if(null!=this.parentMesh)return this.newLinkedMesh();var t=new te(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),nt.Utils.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),nt.Utils.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),nt.Utils.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,null!=this.edges&&(t.edges=new Array(this.edges.length),nt.Utils.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},te.prototype.newLinkedMesh=function(){var t=new te(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),t.deformAttachment=this.deformAttachment,t.setParentMesh(null!=this.parentMesh?this.parentMesh:this),t.updateUVs(),t},rt=te,nt.MeshAttachment=rt,st=St=St||{},at=st.VertexAttachment,kt(ee,at),ee.prototype.copy=function(){var t=new ee(name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),st.Utils.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},ot=ee,st.PathAttachment=ot,lt=St=St||{},ut=lt.VertexAttachment,kt(ne,ut),ne.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},ne.prototype.computeWorldRotation=function(t){var e=lt.MathUtils.cosDeg(this.rotation),n=lt.MathUtils.sinDeg(this.rotation),i=e*t.a+n*t.b,r=e*t.c+n*t.d;return Math.atan2(r,i)*lt.MathUtils.radDeg},ne.prototype.copy=function(){var t=new ne(name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},ct=ne,lt.PointAttachment=ct,ft=St=St||{},dt=ft.Attachment,kt(ie,dt),ie.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.region.offsetX*t,i=-this.height/2*this.scaleY+this.region.offsetY*e,r=n+this.region.width*t,s=i+this.region.height*e,a=this.rotation*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=n*o+this.x,u=n*h,c=i*o+this.y,f=i*h,d=r*o+this.x,p=r*h,g=s*o+this.y,m=s*h,v=this.offset;v[ie.OX1]=l-f,v[ie.OY1]=c+u,v[ie.OX2]=l-m,v[ie.OY2]=g+u,v[ie.OX3]=d-m,v[ie.OY3]=g+p,v[ie.OX4]=d-f,v[ie.OY4]=c+p},ie.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)},ie.prototype.computeWorldVertices=function(t,e,n,i){var r=this.offset,s=t.worldX,a=t.worldY,o=t.a,h=t.b,l=t.c,u=t.d,c=r[ie.OX1],f=r[ie.OY1];e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a,n+=i,c=r[ie.OX2],f=r[ie.OY2],e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a,n+=i,c=r[ie.OX3],f=r[ie.OY3],e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a,n+=i,c=r[ie.OX4],f=r[ie.OY4],e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a},ie.prototype.copy=function(){var t=new ie(this.name);return t.region=this.region,t.rendererObject=this.rendererObject,t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,ft.Utils.arrayCopy(this.uvs,0,t.uvs,0,8),ft.Utils.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t},ie.OX1=0,ie.OY1=1,ie.OX2=2,ie.OY2=3,ie.OX3=4,ie.OY3=5,ie.OX4=6,ie.OY4=7,ie.X1=0,ie.Y1=1,ie.C1R=2,ie.C1G=3,ie.C1B=4,ie.C1A=5,ie.U1=6,ie.V1=7,ie.X2=8,ie.Y2=9,ie.C2R=10,ie.C2G=11,ie.C2B=12,ie.C2A=13,ie.U2=14,ie.V2=15,ie.X3=16,ie.Y3=17,ie.C3R=18,ie.C3G=19,ie.C3B=20,ie.C3A=21,ie.U3=22,ie.V3=23,ie.X4=24,ie.Y4=25,ie.C4R=26,ie.C4G=27,ie.C4B=28,ie.C4A=29,ie.U4=30,ie.V4=31,pt=ie,ft.RegionAttachment=pt,gt=St=St||{},re.prototype.begin=function(t){},re.prototype.transform=function(t,e,n,i){t.x+=gt.MathUtils.randomTriangular(-this.jitterX,this.jitterY),t.y+=gt.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},re.prototype.end=function(){},mt=re,gt.JitterEffect=mt,vt=St=St||{},se.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},se.prototype.transform=function(t,e,n,i){var r,s,a,o=this.angle*vt.MathUtils.degreesToRadians,h=t.x-this.worldX,l=t.y-this.worldY,u=Math.sqrt(h*h+l*l);u<this.radius&&(r=se.interpolation.apply(0,o,(this.radius-u)/this.radius),s=Math.cos(r),a=Math.sin(r),t.x=s*h-a*l+this.worldX,t.y=a*h+s*l+this.worldY)},se.prototype.end=function(){},se.interpolation=new vt.PowOut(2),yt=se,vt.SwirlEffect=yt,xt=St=St||{},Mt=xt.canvas||(xt.canvas={}),wt=xt.AssetManager,kt(ae,wt),Et=ae,Mt.AssetManager=Et,Tt=St=St||{},At=Tt.canvas||(Tt.canvas={}),bt=Tt.Texture,kt(oe,bt),oe.prototype.setFilters=function(t,e){},oe.prototype.setWraps=function(t,e){},oe.prototype.dispose=function(){},Rt=oe,At.CanvasTexture=Rt,It=St=St||{},Ct=It.canvas||(It.canvas={}),he.prototype.draw=function(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)},he.prototype.drawImages=function(t){var e=this.ctx,n=t.drawOrder;this.debugRendering&&(e.strokeStyle="green"),e.save();for(var i=0,r=n.length;i<r;i++){var s,a,o,h,l,u,c,f,d,p,g,m,v,y,x,M=n[i];M.bone.active&&(h=o=a=null,(s=M.getAttachment())instanceof It.RegionAttachment&&(h=(o=(a=s).region).texture.getImage(),l=M.bone.skeleton.color,u=M.color,c=a.color,f=l.a*u.a*c.a,(d=this.tempColor).set(l.r*u.r*c.r,l.g*u.g*c.g,l.b*u.b*c.b,f),p=s,g=M.bone,y=o.width,x=o.height,e.save(),e.transform(g.a,g.c,g.b,g.d,g.worldX,g.worldY),e.translate(s.offset[0],s.offset[1]),e.rotate(s.rotation*Math.PI/180),m=p.width/y,e.scale(m*s.scaleX,m*s.scaleY),e.translate(y/2,x/2),s.region.rotate&&(v=y,y=x,x=v,e.rotate(-Math.PI/2)),e.scale(1,-1),e.translate(-y/2,-x/2),1==d.r&&1==d.g&&1==d.b&&1==d.a||(e.globalAlpha=d.a),e.drawImage(h,o.x,o.y,y,x,0,0,y,x),this.debugRendering&&e.strokeRect(0,0,y,x),e.restore()))}e.restore()},he.prototype.drawTriangles=function(t){for(var e=null,n=this.vertices,i=null,r=t.drawOrder,s=0,a=r.length;s<a;s++){var o=r[s],h=o.getAttachment(),l=null;if(h instanceof It.RegionAttachment)var u=h,n=this.computeRegionVertices(o,u,!1),i=he.QUAD_TRIANGLES,l=u.region.texture.getImage();else{if(!(h instanceof It.MeshAttachment))continue;var c=h;n=this.computeMeshVertices(o,c,!1),i=c.triangles,l=c.region.renderObject.texture.getImage()}if(null!=l){var f=o.data.blendMode;f!=e&&(e=f);var d=o.bone.skeleton.color,p=o.color,g=h.color,m=d.a*p.a*g.a,v=this.tempColor;v.set(d.r*p.r*g.r,d.g*p.g*g.g,d.b*p.b*g.b,m);var y=this.ctx;1==v.r&&1==v.g&&1==v.b&&1==v.a||(y.globalAlpha=v.a);for(var x=0;x<i.length;x+=3){var M=8*i[x],w=8*i[x+1],E=8*i[x+2],T=n[M],A=n[1+M],b=n[6+M],R=n[7+M],S=n[w],I=n[1+w],C=n[6+w],P=n[7+w],k=n[E],_=n[1+E],O=n[6+E],F=n[7+E];this.drawTriangle(l,T,A,b,R,S,I,C,P,k,_,O,F),this.debugRendering&&(y.strokeStyle="green",y.beginPath(),y.moveTo(T,A),y.lineTo(S,I),y.lineTo(k,_),y.lineTo(T,A),y.stroke())}}}this.ctx.globalAlpha=1},he.prototype.drawTriangle=function(t,e,n,i,r,s,a,o,h,l,u,c,f){var d=this.ctx;i*=t.width,r*=t.height,o*=t.width,h*=t.height,c*=t.width,f*=t.height,d.beginPath(),d.moveTo(e,n),d.lineTo(s,a),d.lineTo(l,u),d.closePath();var p=1/((o-=i)*(f-=r)-(c-=i)*(h-=r)),g=(f*(s-=e)-h*(l-=e))*p,m=(f*(a-=n)-h*(u-=n))*p,v=(o*l-c*s)*p,y=(o*u-c*a)*p,x=e-g*i-v*r,M=n-m*i-y*r;d.save(),d.transform(g,m,v,y,x,M),d.clip(),d.drawImage(t,0,0),d.restore()},he.prototype.computeRegionVertices=function(t,e,n){var i=t.bone.skeleton.color,r=t.color,s=e.color,a=i.a*r.a*s.a,o=n?a:1,h=this.tempColor;h.set(i.r*r.r*s.r*o,i.g*r.g*s.g*o,i.b*r.b*s.b*o,a),e.computeWorldVertices(t.bone,this.vertices,0,he.VERTEX_SIZE);var l=this.vertices,u=e.uvs;return l[It.RegionAttachment.C1R]=h.r,l[It.RegionAttachment.C1G]=h.g,l[It.RegionAttachment.C1B]=h.b,l[It.RegionAttachment.C1A]=h.a,l[It.RegionAttachment.U1]=u[0],l[It.RegionAttachment.V1]=u[1],l[It.RegionAttachment.C2R]=h.r,l[It.RegionAttachment.C2G]=h.g,l[It.RegionAttachment.C2B]=h.b,l[It.RegionAttachment.C2A]=h.a,l[It.RegionAttachment.U2]=u[2],l[It.RegionAttachment.V2]=u[3],l[It.RegionAttachment.C3R]=h.r,l[It.RegionAttachment.C3G]=h.g,l[It.RegionAttachment.C3B]=h.b,l[It.RegionAttachment.C3A]=h.a,l[It.RegionAttachment.U3]=u[4],l[It.RegionAttachment.V3]=u[5],l[It.RegionAttachment.C4R]=h.r,l[It.RegionAttachment.C4G]=h.g,l[It.RegionAttachment.C4B]=h.b,l[It.RegionAttachment.C4A]=h.a,l[It.RegionAttachment.U4]=u[6],l[It.RegionAttachment.V4]=u[7],l},he.prototype.computeMeshVertices=function(t,e,n){var i=t.bone.skeleton.color,r=t.color,s=e.color,a=i.a*r.a*s.a,o=n?a:1,h=this.tempColor;h.set(i.r*r.r*s.r*o,i.g*r.g*s.g*o,i.b*r.b*s.b*o,a);var l=e.worldVerticesLength/2;this.vertices.length<e.worldVerticesLength&&(this.vertices=It.Utils.newFloatArray(e.worldVerticesLength));var u=this.vertices;e.computeWorldVertices(t,0,e.worldVerticesLength,u,0,he.VERTEX_SIZE);for(var c=e.uvs,f=0,d=l,p=0,g=2;f<d;f++)u[g++]=h.r,u[g++]=h.g,u[g++]=h.b,u[g++]=h.a,u[g++]=c[p++],u[g++]=c[p++],g+=2;return u},he.QUAD_TRIANGLES=[0,1,2,2,3,0],he.VERTEX_SIZE=8,Pt=he,Ct.SkeletonRenderer=Pt,le.exports=St}).call(window)},function(t,e,n){var i=n(0),y=n(8),x=n(201),d=n(6),p=n(215),g=n(216),m=n(217),r=new i({Extends:g,initialize:function(t,e,n,i,r,s,a){var o,h,l,u=[],c=t.cacheManager.custom.spine;if(d(e)){var f=e;for(e=y(f,"key"),h=new p(t,{key:e,url:y(f,"jsonURL"),extension:y(f,"jsonExtension","json"),xhrSettings:y(f,"jsonXhrSettings")}),i=y(f,"atlasURL"),r=y(f,"preMultipliedAlpha"),Array.isArray(i)||(i=[i]),o=0;o<i.length;o++)(l=new m(t,{key:e+"!"+o,url:i[o],extension:y(f,"atlasExtension","atlas"),xhrSettings:y(f,"atlasXhrSettings")})).cache=c,u.push(l)}else for(h=new p(t,e,n,s),Array.isArray(i)||(i=[i]),o=0;o<i.length;o++)(l=new m(t,e+"!"+o,i[o],a)).cache=c,u.push(l);u.unshift(h),g.call(this,t,"spine",e,u),this.config.preMultipliedAlpha=r},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"text"===t.type)){for(var e=t.data.split("\n"),n=[],i=0;i<e.length;i++){var r=e[i];""===r.trim()&&i<e.length-1&&(r=e[i+1],n.push(r))}var s=this.config,a=this.loader,o=a.baseURL,h=a.path,l=a.prefix,u=y(s,"baseURL",this.baseURL),c=y(s,"path",t.src.match(/^.*\//))[0],f=y(s,"prefix",this.prefix),d=y(s,"textureXhrSettings");a.setBaseURL(u),a.setPath(c),a.setPrefix(f);for(var p=0;p<n.length;p++){var g=n[p],m=this.prefix+g,v=new x(a,m,g,d);a.keyExists(v)||(this.addToMultiFile(v),a.addFile(v))}a.setBaseURL(o),a.setPath(h),a.setPrefix(l)}},addToCache:function(){if(this.isReadyToProcess()){var t;this.files[0].addToCache();for(var e="",n="",i=!!this.config.preMultipliedAlpha,r=this.loader.textureManager,s=1;s<this.files.length;s++){var a,o,h,l=this.files[s];"text"===l.type?(e=l.key.replace(/![\d]$/,""),t=l.cache,n=n.concat(l.data)):(o=(a=l.key.trim()).indexOf("!"),h=a.substr(o+1),r.exists(h)||r.addImage(h,l.data)),l.pendingDestroy()}t.add(e,{preMultipliedAlpha:i,data:n,prefix:this.prefix}),this.complete=!0}}});t.exports=r},function(t,e,n){var i=n(0),r=n(12),c=n(21),s=n(22),f=n(8),d=n(6),a=new i({Extends:c,initialize:function t(e,n,i,r,s){var a,o,h="png";d(n)&&(n=f(o=n,"key"),i=f(o,"url"),a=f(o,"normalMap"),r=f(o,"xhrSettings"),h=f(o,"extension",h),s=f(o,"frameConfig")),Array.isArray(i)&&(a=i[1],i=i[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:n,url:i,xhrSettings:r,config:s};c.call(this,e,u),a&&((l=new t(e,this.key,a,r,s)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new a(this,t[i]));else this.addFile(new a(this,t,e,n));return this}),t.exports=a},function(t,e,n){t.exports={ADD:n(203),COMPLETE:n(204),FILE_COMPLETE:n(205),FILE_KEY_COMPLETE:n(206),FILE_LOAD_ERROR:n(207),FILE_LOAD:n(208),FILE_PROGRESS:n(209),POST_PROCESS:n(210),PROGRESS:n(211),START:n(212)}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,n){var s=n(43);t.exports=function(t,e){var n=s(e,t.xhrSettings),i=new XMLHttpRequest;if(i.open("GET",t.src,n.async,n.user,n.password),i.responseType=t.xhrSettings.responseType,i.timeout=n.timeout,n.headers)for(var r in n.headers)i.setRequestHeader(r,n.headers[r]);return n.header&&n.headerValue&&i.setRequestHeader(n.header,n.headerValue),n.requestedWith&&i.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&i.overrideMimeType(n.overrideMimeType),n.withCredentials&&(i.withCredentials=!0),i.onload=t.onLoad.bind(t,i),i.onerror=t.onError.bind(t,i),i.onprogress=t.onProgress.bind(t),i.send(),i}},function(t,e,n){var i=n(0),h=n(12),l=n(21),r=n(22),u=n(8),c=n(7),f=n(6),s=new i({Extends:l,initialize:function(t,e,n,i,r){var s,a="json";f(e)&&(e=u(s=e,"key"),n=u(s,"url"),i=u(s,"xhrSettings"),a=u(s,"extension",a),r=u(s,"dataKey",r));var o={type:"json",cache:t.cacheManager.json,extension:a,responseType:"text",key:e,url:n,xhrSettings:i,config:r};l.call(this,t,o),f(n)&&(this.data=r?c(n,r):n,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});r.register("json",function(t,e,n,i){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,i,n));return this}),t.exports=s},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){var r=[];i.forEach(function(t){t&&r.push(t)}),this.loader=t,this.type=e,this.key=n,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var s=0;s<r.length;s++)r[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=this).pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=i},function(t,e,n){var i=n(0),r=n(12),l=n(21),s=n(22),u=n(8),c=n(6),a=new i({Extends:l,initialize:function(t,e,n,i){var r,s="text",a="txt",o=t.cacheManager.text;c(e)&&(e=u(r=e,"key"),n=u(r,"url"),i=u(r,"xhrSettings"),a=u(r,"extension",a),s=u(r,"type",s),o=u(r,"cache",o));var h={type:s,cache:o,extension:a,responseType:"text",key:e,url:n,xhrSettings:i};l.call(this,t,h)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new a(this,t[i]));else this.addFile(new a(this,t,e,n));return this}),t.exports=a},function(t,e,n){var h=n(27),l=n(5),i=n(0),r=n(45),s=n(46),a=n(47),o=n(48),u=n(49),c=n(51),f=n(16),d=n(18),p=n(52),g=n(20),m=n(240),v=n(247),y=new i({Extends:p,Mixins:[r,s,a,o,u,c,v],initialize:function(t,e,n,i,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(n,i),r&&this.setSkeleton(r,s,a)},willRender:function(t){var e=this.skeleton;if(!e)return!1;var n=e.color.a;return!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id||0===n)},setAlpha:function(t,e){var n;return void 0===t&&(t=1),e?(n=this.findSlot(e))&&(n.color.a=l(t,0,1)):this.alpha=t,this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var n,i=(t>>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,a=16777215<t?(t>>>24)/255:null,o=this.skeleton;return!e||(n=this.findSlot(e))&&(o=n),o.color.r=i,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(m.COMPLETE,t)},onDispose:function(t){this.emit(m.DISPOSE,t)},onEnd:function(t){this.emit(m.END,t)},onEvent:function(t,e){this.emit(m.EVENT,t,e)},onInterrupted:function(t){this.emit(m.INTERRUPTED,t)},onStart:function(t){this.emit(m.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.bones.length;n++)t.push(e.bones[n].name);return t},getSkinList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.skins.length;n++)t.push(e.skins[n].name);return t},getSlotList:function(){for(var t=[],e=this.skeleton,n=0;n<e.slots.length;n++)t.push(e.slots[n].data.name);return t},getAnimationList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.animations.length;n++)t.push(e.animations[n].name);return t},getCurrentAnimation:function(t){void 0===t&&(t=0);var e=this.state.getCurrent(t);if(e)return e.animation},play:function(t,e,n){return this.setAnimation(0,t,e,n),this},setAnimation:function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=!1),i&&this.state){var r=this.state.getCurrent(t);if(r&&r.animation.name===e&&!r.isComplete())return}if(this.findAnimation(e))return this.state.setAnimation(t,e,n)},addAnimation:function(t,e,n,i){return void 0===n&&(n=!1),void 0===i&&(i=0),this.state.addAnimation(t,e,n,i)},setEmptyAnimation:function(t,e){return this.state.setEmptyAnimation(t,e)},clearTrack:function(t){return this.state.clearTrack(t),this},clearTracks:function(){return this.state.clearTracks(),this},setSkinByName:function(t){var e=this.skeleton;return e.setSkinByName(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setSkin:function(t){var e=this.skeleton;return e.setSkin(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setMix:function(t,e,n){return this.stateData.setMix(t,e,n),this},getAttachment:function(t,e){return this.skeleton.getAttachment(t,e)},getAttachmentByName:function(t,e){return this.skeleton.getAttachmentByName(t,e)},setAttachment:function(t,e){if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length)for(var n=0;n<t.length;n++)this.skeleton.setAttachment(t[n],e[n]);else this.skeleton.setAttachment(t,e);return this},setToSetupPose:function(){return this.skeleton.setToSetupPose(),this},setSlotsToSetupPose:function(){return this.skeleton.setSlotsToSetupPose(),this},setBonesToSetupPose:function(){return this.skeleton.setBonesToSetupPose(),this},getRootBone:function(){return this.skeleton.getRootBone()},angleBoneToXY:function(t,e,n,i,r,s){void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=360);var a=this.plugin.renderer.height,o=f(h(t.worldX,a-t.worldY,e,n)+d(i));return t.rotation=l(g(o),r,s),this},findBone:function(t){return this.skeleton.findBone(t)},findBoneIndex:function(t){return this.skeleton.findBoneIndex(t)},findSlot:function(t){return this.skeleton.findSlot(t)},findSlotIndex:function(t){return this.skeleton.findSlotIndex(t)},findSkin:function(t){return this.skeletonData.findSkin(t)},findEvent:function(t){return this.skeletonData.findEvent(t)},findAnimation:function(t){return this.skeletonData.findAnimation(t)},findIkConstraint:function(t){return this.skeletonData.findIkConstraint(t)},findTransformConstraint:function(t){return this.skeletonData.findTransformConstraint(t)},findPathConstraint:function(t){return this.skeletonData.findPathConstraint(t)},findPathConstraintIndex:function(t){return this.skeletonData.findPathConstraintIndex(t)},getBounds:function(){return this.plugin.getBounds(this.skeleton)},preUpdate:function(t,e){var n=this.skeleton;this.state.update(e/1e3*this.timeScale),this.state.apply(n)},preDestroy:function(){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.plugin=null,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null}});t.exports=y},function(t,e,n){var i=n(0),o=n(220),r=new i({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(o.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var n in this.list)this.list.hasOwnProperty(n)&&n.match(t)&&(e[n]=this.list[n]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var n in t)this.setValue(n,t[n]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var n=this.get(t);return void 0===n&&(n=0),this.set(t,n+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(n,t){return this._frozen||(this.has(n)?this.values[n]=t:(r=(i=this).list,s=this.events,a=this.parent,Object.defineProperty(this.values,n,{enumerable:!0,configurable:!0,get:function(){return r[n]},set:function(t){var e;i._frozen||(e=r[n],r[n]=t,s.emit(o.CHANGE_DATA,a,n,t,e),s.emit(o.CHANGE_DATA_KEY+n,a,t,e))}}),r[n]=t,s.emit(o.SET_DATA,a,n,t))),this;var i,r,s,a},each:function(t,e){for(var n=[this.parent,null,void 0],i=1;i<arguments.length;i++)n.push(arguments[i]);for(var r in this.list)n[1]=r,n[2]=this.list[r],t.apply(e,n);return this},merge:function(t,e){for(var n in void 0===e&&(e=!0),t)t.hasOwnProperty(n)&&(e||!e&&!this.has(n))&&this.setValue(n,t[n]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(o.CHANGE_DATA),this.events.off(o.SET_DATA),this.events.off(o.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=r},function(t,e,n){t.exports={CHANGE_DATA:n(221),CHANGE_DATA_KEY:n(222),DESTROY:n(223),REMOVE_DATA:n(224),SET_DATA:n(225)}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,d="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,i,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||t,r),a=d?d+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(d=!1)),a.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(d?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=d?d+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,s=new Array(r);i<r;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=d?d+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,r,s){var a=d?d+t:t;if(!this._events[a])return!1;var o,h=this._events[a],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,r),!0;case 6:return h.fn.call(h.context,e,n,i,r,s),!0}for(f=1,o=new Array(l-1);f<l;f++)o[f-1]=arguments[f];h.fn.apply(h.context,o)}else for(var u,c=h.length,f=0;f<c;f++)switch(h[f].once&&this.removeListener(t,h[f].fn,void 0,!0),l){case 1:h[f].fn.call(h[f].context);break;case 2:h[f].fn.call(h[f].context,e);break;case 3:h[f].fn.call(h[f].context,e,n);break;case 4:h[f].fn.call(h[f].context,e,n,i);break;default:if(!o)for(u=1,o=new Array(l-1);u<l;u++)o[u-1]=arguments[u];h[f].fn.apply(h[f].context,o)}return!0},a.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,i){var r=d?d+t:t;if(!this._events[r])return this;if(!e)return l(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,r);else{for(var a=0,o=[],h=s.length;a<h;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&o.push(s[a]);o.length?this._events[r]=1===o.length?o[0]:o:l(this,r)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=d?d+t:t,this._events[e]&&l(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=d,a.EventEmitter=a,t.exports=a},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,n){t.exports={COMPLETE:n(241),DISPOSE:n(242),END:n(243),EVENT:n(244),INTERRUPTED:n(245),START:n(246)}},function(t,e){t.exports="complete"},function(t,e){t.exports="dispose"},function(t,e){t.exports="end"},function(t,e){t.exports="event"},function(t,e){t.exports="interrupted"},function(t,e){t.exports="start"},function(t,e,n){var i=n(1),r=n(1);r=n(248),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e,n){var c=n(16),f=n(20),d=n(10);t.exports=function(t,e,n,i){var r=t.currentContext,s=e.plugin,a=e.skeleton,o=s.skeletonRenderer,h=t._tempMatrix1,l=t._tempMatrix2,u=t._tempMatrix3;l.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),h.copyFrom(n.matrix),i?(h.multiplyWithOffset(i,-n.scrollX*e.scrollFactorX,-n.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=n.scrollX*e.scrollFactorX,l.f-=n.scrollY*e.scrollFactorY),h.multiply(l,u),a.x=u.tx,a.y=u.ty,a.scaleX=u.scaleX,a.scaleY=-1*u.scaleY,e.scaleX<0?(a.scaleX*=-1,e.root.rotation=f(u.rotationNormalized)):e.root.rotation=d(f(c(u.rotationNormalized))+90,0,360),e.scaleY<0&&(a.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*f(u.rotationNormalized):e.root.rotation+=2*f(u.rotationNormalized)),n.renderToTexture&&(a.y=u.ty,a.scaleY*=-1),a.updateWorldTransform(),o.ctx=r,o.debugRendering=s.drawDebug||e.drawDebug,r.save(),o.draw(a),r.restore()}},function(t,e,n){var i=n(0),s=n(250),r=n(335),a=new i({Extends:s,Mixins:[r],initialize:function(t,e,n,i,r){s.call(this,t,n,i,r),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=a},function(t,e,n){var s=n(251),r=n(15),i=n(0),a=n(288),o=n(54),h=n(52),l=n(24),u=n(332),c=n(334),f=n(2),d=new i({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Transform,a.Visible,u],initialize:function(t,e,n,i){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,n),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),i&&this.add(i)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){var e;if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var n=this.list,i=new l,r=!1;t.setEmpty();for(var s=0;s<n.length;s++){var a=n[s];a.getBounds&&(a.getBounds(i),r?c(i,t,t):(t.setTo(i.x,i.y,i.width,i.height),r=!0))}}return t},addHandler:function(t){t.once(o.DESTROY,this.remove,this),this.exclusive&&(this._displayList.remove(t),t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this),this.scene.sys.displayList.exists(t)||t.emit(o.ADDED_TO_SCENE,t,this.scene)},removeHandler:function(t){t.off(o.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null),this.scene.sys.displayList.exists(t)||t.emit(o.REMOVED_FROM_SCENE,t,this.scene)},pointToContainer:function(t,e){void 0===e&&(e=new f),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new f(t.x,t.y);var n=this.tempTransformMatrix;return n.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),n.invert(),n.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(n,t){return n&&(void 0===t&&(t=function(t,e){return t[n]-e[n]}),s.StableSort(this.list,t)),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,n,i){return s.GetFirst(this.list,t,e,n,i)},getAll:function(t,e,n,i){return s.GetAll(this.list,t,e,n,i)},count:function(t,e,n,i){return s.CountAllMatching(this.list,t,e,n,i)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},remove:function(t,e){var n=s.Remove(this.list,t,this.removeHandler,this);if(e&&n){Array.isArray(n)||(n=[n]);for(var i=0;i<n.length;i++)n[i].destroy()}return this},removeAt:function(t,e){var n=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&n&&n.destroy(),this},removeBetween:function(t,e,n){var i=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(n)for(var r=0;r<i.length;r++)i[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var n=0;n<e.length;n++)e[n].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,n){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),n&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,n,i){return s.SetAll(this.list,t,e,n,i),this},each:function(t,e){for(var n=[null],i=this.list.slice(),r=i.length,s=2;s<arguments.length;s++)n.push(arguments[s]);for(s=0;s<r;s++)n[0]=i[s],t.apply(e,n);return this},iterate:function(t,e){for(var n=[null],i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<this.list.length;i++)n[0]=this.list[i],t.apply(e,n);return this},setScrollFactor:function(t,e,n){return void 0===e&&(e=t),void 0===n&&(n=!1),this.scrollFactorX=t,this.scrollFactorY=e,n&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=d},function(t,e,n){t.exports={Matrix:n(252),Add:n(261),AddAt:n(262),BringToTop:n(263),CountAllMatching:n(264),Each:n(265),EachInRange:n(266),FindClosestInSorted:n(267),GetAll:n(268),GetFirst:n(269),GetRandom:n(270),MoveDown:n(271),MoveTo:n(272),MoveUp:n(273),NumberArray:n(274),NumberArrayStep:n(275),QuickSelect:n(276),Range:n(277),Remove:n(278),RemoveAt:n(279),RemoveBetween:n(280),RemoveRandomElement:n(281),Replace:n(282),RotateLeft:n(56),RotateRight:n(57),SafeRange:n(4),SendToBack:n(283),SetAll:n(284),Shuffle:n(58),SortByDigits:n(285),SpliceOne:n(14),StableSort:n(286),Swap:n(287)}},function(t,e,n){t.exports={CheckMatrix:n(23),MatrixToString:n(253),ReverseColumns:n(255),ReverseRows:n(256),Rotate180:n(257),RotateLeft:n(258),RotateMatrix:n(13),RotateRight:n(259),Translate:n(260),TransposeMatrix:n(55)}},function(t,e,n){var a=n(254),o=n(23);t.exports=function(t){var e="";if(!o(t))return e;for(var n=0;n<t.length;n++){for(var i=0;i<t[n].length;i++){var r=t[n][i].toString();e+="undefined"!==r?a(r,2):"?",i<t[n].length-1&&(e+=" |")}if(n<t.length-1){e+="\n";for(var s=0;s<t[n].length;s++)e+="---",s<t[n].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=" "),void 0===i&&(i=3);var r;if(e+1>=(t=t.toString()).length)switch(i){case 1:t=new Array(e+1-t.length).join(n)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(n)+t+new Array(s+1).join(n);break;default:t+=new Array(e+1-t.length).join(n)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,n){var i=n(13);t.exports=function(t){return i(t,180)}},function(t,e,n){var i=n(13);t.exports=function(t){return i(t,90)}},function(t,e,n){var i=n(13);t.exports=function(t){return i(t,-90)}},function(t,e,n){var s=n(56),a=n(57);t.exports=function(t,e,n){if(void 0===e&&(e=0),void 0===n&&(n=0),0!==n&&(n<0?s(t,Math.abs(n)):a(t,n)),0!==e)for(var i=0;i<t.length;i++){var r=t[i];e<0?s(r,Math.abs(e)):a(r,e)}return t}},function(t,e){t.exports=function(t,e,n,i,r){if(void 0===r&&(r=t),0<n){var s=n-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),i&&i.call(r,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;0<n&&s<a&&(e.splice(s),a=s);for(var o=0;o<a;o++){var h=e[o];t.push(h),i&&i.call(r,h)}return e}},function(t,e){t.exports=function(t,e,n,i,r,s){if(void 0===n&&(n=0),void 0===s&&(s=t),0<i){var a=i-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(n,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;0<i&&a<o&&(e.splice(a),o=a);for(var h=o-1;0<=h;h--){var l=e[h];t.splice(n,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var n=t.indexOf(e);return-1!==n&&n<t.length&&(t.splice(n,1),t.push(e)),e}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);var s=0;if(o(t,i,r))for(var a=i;a<r;a++){t[a][e]===n&&s++}return s}},function(t,e){t.exports=function(t,e,n){for(var i=[null],r=3;r<arguments.length;r++)i.push(arguments[r]);for(r=0;r<t.length;r++)i[0]=t[r],e.apply(n,i);return t}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){if(void 0===i&&(i=0),void 0===r&&(r=t.length),o(t,i,r)){for(var s=[null],a=5;a<arguments.length;a++)s.push(arguments[a]);for(a=i;a<r;a++)s[0]=t[a],e.apply(n,s)}return t}},function(t,e){t.exports=function(t,e,n){if(!e.length)return NaN;if(1===e.length)return e[0];var i,r,s=1;if(n){if(t<e[0][n])return e[0];for(;e[s][n]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),n?(i=e[s-1][n],(r=e[s][n])-t<=t-i?e[s]:e[s-1]):(i=e[s-1],(r=e[s])-t<=t-i?r:i)}},function(t,e,n){var h=n(4);t.exports=function(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);var s=[];if(h(t,i,r))for(var a=i;a<r;a++){var o=t[a];(!e||e&&void 0===n&&o.hasOwnProperty(e)||e&&void 0!==n&&o[e]===n)&&s.push(o)}return s}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){if(void 0===i&&(i=0),void 0===r&&(r=t.length),o(t,i,r))for(var s=i;s<r;s++){var a=t[s];if(!e||e&&void 0===n&&a.hasOwnProperty(e)||e&&void 0!==n&&a[e]===n)return a}return null}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);var i=e+Math.floor(Math.random()*n);return void 0===t[i]?null:t[i]}},function(t,e){t.exports=function(t,e){var n,i,r=t.indexOf(e);return 0<r&&(n=t[r-1],i=t.indexOf(n),t[r]=n,t[i]=e),t}},function(t,e){t.exports=function(t,e,n){var i=t.indexOf(e);if(-1===i||n<0||n>=t.length)throw new Error("Supplied index out of bounds");return i!==n&&(t.splice(i,1),t.splice(n,0,e)),e}},function(t,e){t.exports=function(t,e){var n,i,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(n=t[r+1],i=t.indexOf(n),t[r]=n,t[i]=e),t}},function(t,e){t.exports=function(t,e,n,i){var r,s=[],a=!1;if((n||i)&&(a=!0,n=n||"",i=i||""),e<t)for(r=t;e<=r;r--)a?s.push(n+r.toString()+i):s.push(r);else for(r=t;r<=e;r++)a?s.push(n+r.toString()+i):s.push(r);return s}},function(t,e,n){var a=n(39);t.exports=function(t,e,n){void 0===t&&(t=0),void 0===e&&(e=null),void 0===n&&(n=1),null===e&&(e=t,t=0);for(var i=[],r=Math.max(a((e-t)/(n||1)),0),s=0;s<r;s++)i.push(t),t+=n;return i}},function(t,e){function g(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function m(t,e){return t<e?-1:e<t?1:0}var v=function(t,e,n,i,r){for(void 0===n&&(n=0),void 0===i&&(i=t.length-1),void 0===r&&(r=m);n<i;){var s,a,o,h,l,u,c;600<i-n&&(s=i-n+1,a=e-n+1,o=Math.log(s),h=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*h*(s-h)/s)*(a-s/2<0?-1:1),u=Math.max(n,Math.floor(e-a*h/s+l)),c=Math.min(i,Math.floor(e+(s-a)*h/s+l)),v(t,e,u,c,r));var f=t[e],d=n,p=i;for(g(t,n,e),0<r(t[i],f)&&g(t,n,i);d<p;){for(g(t,d,p),d++,p--;r(t[d],f)<0;)d++;for(;0<r(t[p],f);)p--}0===r(t[n],f)?g(t,n,p):g(t,++p,i),p<=e&&(n=p+1),e<=p&&(i=p-1)}};t.exports=v},function(t,e,n){var d=n(7),p=n(58);t.exports=function(t,e,n){var i,r=d(n,"max",0),s=d(n,"qty",1),a=d(n,"random",!1),o=d(n,"randomB",!1),h=d(n,"repeat",0),l=d(n,"yoyo",!1),u=[];o&&p(e),-1===h&&(h=0===r?0:(i=t.length*e.length*s,l&&(i*=2),Math.ceil(r/i)));for(var c=0;c<=h;c++){var f=function(t,e,n){for(var i=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var a=0;a<n;a++)i.push({a:t[r],b:e[s]});return i}(t,e,s);a&&p(f),u=u.concat(f),l&&(f.reverse(),u=u.concat(f))}return r&&u.splice(r),u}},function(t,e,n){var o=n(14);t.exports=function(t,e,n,i){if(void 0===i&&(i=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(o(t,s),n&&n.call(i,e),e):null;for(var r=e.length-1;0<=r;){var s,a=e[r];-1!==(s=t.indexOf(a))?(o(t,s),n&&n.call(i,a)):e.pop(),r--}return e}},function(t,e,n){var s=n(14);t.exports=function(t,e,n,i){if(void 0===i&&(i=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return n&&n.call(i,r),r}},function(t,e,n){var l=n(4);t.exports=function(t,e,n,i,r){if(void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===r&&(r=t),l(t,e,n)){var s=n-e,a=t.splice(e,s);if(i)for(var o=0;o<a.length;o++){var h=a[o];i.call(r,h)}return a}return[]}},function(t,e,n){var r=n(14);t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);var i=e+Math.floor(Math.random()*n);return r(t,i)}},function(t,e){t.exports=function(t,e,n){var i=t.indexOf(e),r=t.indexOf(n);return-1!==i&&-1===r&&(t[i]=n,!0)}},function(t,e){t.exports=function(t,e){var n=t.indexOf(e);return-1!==n&&0<n&&(t.splice(n,1),t.unshift(e)),e}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){if(void 0===i&&(i=0),void 0===r&&(r=t.length),o(t,i,r))for(var s=i;s<r;s++){var a=t[s];a.hasOwnProperty(e)&&(a[e]=n)}return t}},function(t,e){t.exports=function(t){var n=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(n,""),10)-parseInt(e.replace(n,""),10)}),t}},function(t,e){function i(t,e){return String(t).localeCompare(e)}function a(t,e,n,i){for(var r,s,a,o,h=t.length,l=0,u=2*n,c=0;c<h;c+=u)for(s=(r=c+n)+n,h<r&&(r=h),h<s&&(s=h),a=c,o=r;;)if(a<r&&o<s)e(t[a],t[o])<=0?i[l++]=t[a++]:i[l++]=t[o++];else if(a<r)i[l++]=t[a++];else{if(!(o<s))break;i[l++]=t[o++]}}t.exports=function(t,e){void 0===e&&(e=i);var n=function(t,e){var n=t.length;if(n<=1)return t;for(var i=new Array(n),r=1;r<n;r*=2){a(t,e,r,i);var s=t;t=i,i=s}return t}(t,e);return n!==t&&a(n,null,t.length,t),t}},function(t,e){t.exports=function(t,e,n){if(e!==n){var i=t.indexOf(e),r=t.indexOf(n);if(i<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[i]=n,t[r]=e,t}}},function(t,e,n){t.exports={Alpha:n(289),AlphaSingle:n(290),BlendMode:n(291),ComputedSize:n(45),Crop:n(292),Depth:n(46),Flip:n(47),GetBounds:n(293),Mask:n(302),Origin:n(322),PathFollower:n(323),Pipeline:n(326),ScrollFactor:n(48),Size:n(328),Texture:n(329),TextureCrop:n(330),Tint:n(331),ToJSON:n(53),Transform:n(49),TransformMatrix:n(50),Visible:n(51)}},function(t,e,n){var r=n(5),i={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,n,i){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(n,0,1),this._alphaBR=r(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=r(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,0===(this._alphaBR=e)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=r(t,0,1);0!==(this._alphaTL=e)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=r(t,0,1);0!==(this._alphaTR=e)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=r(t,0,1);0!==(this._alphaBL=e)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=r(t,0,1);0!==(this._alphaBR=e)&&(this.renderFlags|=2)}}};t.exports=i},function(t,e,n){var i=n(5),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=i(t,0,1);0===(this._alpha=e)?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,n){var i=n(15),r={_blendMode:i.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=i[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},function(t,e){var n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,n,i){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,n,i,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},function(t,e,n){var u=n(24),i=n(38),r=n(2),s={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&i(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,n,i,r,s,a,o,h,l;return void 0===t&&(t=new u),h=(o=(this.parentContainer?(l=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,n=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),i=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),s=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,n=t.y,this.getTopRight(t),i=t.x,r=t.y,this.getBottomLeft(t),s=t.x,a=t.y,this.getBottomRight(t)),t.x),t.y),t.x=Math.min(e,i,s,o),t.y=Math.min(n,r,a,h),t.width=Math.max(e,i,s,o)-t.x,t.height=Math.max(n,r,a,h)-t.y,t}};t.exports=s},function(t,e){t.exports=function(t,e,n){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=n&&t.y+t.height>=n)}},function(t,e,n){var a=n(59),o=n(60);t.exports=function(t,e,n,i){void 0===i&&(i=[]),!e&&0<n&&(e=o(t)/n);for(var r=0;r<e;r++){var s=r/e;i.push(a(t,s))}return i}},function(t,e,n){var i=n(0),r=n(297),s=n(298),a=n(25),o=n(300),h=n(2),l=new i({initialize:function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=n,this.y2=i},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,n){return s(this,t,e,n)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x1=t,this.y1=e,this.x2=n,this.y2=i,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,n){var i=n(9);t.exports=function(t,e,n){return void 0===n&&(n=new i),n.x=t.x1+(t.x2-t.x1)*e,n.y=t.y1+(t.y2-t.y1)*e,n}},function(t,e,n){var f=n(299),d=n(9);t.exports=function(t,e,n,i){void 0===i&&(i=[]),!e&&0<n&&(e=f(t)/n);for(var r=t.x1,s=t.y1,a=t.x2,o=t.y2,h=0;h<e;h++){var l=h/e,u=r+(a-r)*l,c=s+(o-s)*l;i.push(new d(u,c))}return i}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,n){var i=n(9);t.exports=function(t,e){void 0===e&&(e=new i);var n=Math.random();return e.x=t.x1+n*(t.x2-t.x1),e.y=t.y1+n*(t.y2-t.y1),e}},function(t,e,n){var i=n(9);t.exports=function(t,e){return void 0===e&&(e=new i),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,n){var i=n(303),r=n(321),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new i(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,n){var i=n(0),r=n(304),s=new i({initialize:function(t,e){var n=t.sys.game.renderer;this.renderer=n,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this)},createMask:function(){var t,e,n,i,r,s,a=this.renderer;a.gl&&(this.mainTexture&&this.clearMask(),t=a.width,e=a.height,n=0==(t&t-1)&&0==(e&e-1),i=a.gl,r=n?i.REPEAT:i.CLAMP_TO_EDGE,s=i.LINEAR,this.mainTexture=a.createTexture2D(0,s,s,r,r,i.RGBA,null,t,e),this.maskTexture=a.createTexture2D(0,s,s,r,r,i.RGBA,null,t,e),this.mainFramebuffer=a.createFramebuffer(t,e,this.mainTexture,!0),this.maskFramebuffer=a.createFramebuffer(t,e,this.maskTexture,!0))},clearMask:function(){var t=this.renderer;t.gl&&this.mainTexture&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,n){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,n)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=s},function(t,e,n){t.exports={BLUR:n(305),BOOT:n(306),CONTEXT_LOST:n(307),CONTEXT_RESTORED:n(308),DESTROY:n(309),FOCUS:n(310),HIDDEN:n(311),PAUSE:n(312),POST_RENDER:n(313),POST_STEP:n(314),PRE_RENDER:n(315),PRE_STEP:n(316),READY:n(317),RESUME:n(318),STEP:n(319),VISIBLE:n(320)}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e,n){var i=new(n(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,n){var i=t.gl;t.flush(),0===t.maskStack.length&&(i.enable(i.STENCIL_TEST),i.clear(i.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:n}),this.applyStencil(t,n,!0),t.maskCount++},applyStencil:function(t,e,n){var i=t.gl,r=this.geometryMask,s=t.maskCount;i.colorMask(!1,!1,!1,!1),n?(i.stencilFunc(i.EQUAL,s,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,s+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),r.renderWebGL(t,r,e),t.flush(),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),n?this.invertAlpha?i.stencilFunc(i.NOTEQUAL,s+1,255):i.stencilFunc(i.EQUAL,s+1,255):this.invertAlpha?i.stencilFunc(i.NOTEQUAL,s,255):i.stencilFunc(i.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var n,i=t.currentMask;0===t.maskStack.length?(i.mask=null,e.disable(e.STENCIL_TEST)):((n=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,n.camera,!1),t.currentCameraMask.mask!==n.mask?(i.mask=n.mask,i.camera=n.camera):i.mask=null)},preRenderCanvas:function(t,e,n){var i=this.geometryMask;t.currentContext.save(),i.renderCanvas(t,i,n,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=i},function(t,e){var n={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=n},function(t,e,n){var h=n(18),a=n(324),o=n(7),l=n(325),u=n(2),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:l.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var n=this.pathTween;return n&&n.isPlaying()&&n.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var n=this.pathTween;n&&n.isPlaying()&&n.stop(),"number"==typeof t&&(t={duration:t}),t.from=o(t,"from",0),t.to=o(t,"to",1);var i=a(t,"positionOnPath",!1);this.rotateToPath=a(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var r,s=o(t,"startAt",e);return s&&(t.onStart=function(t){var e=t.data[0];e.progress=s,e.elapsed=e.duration*s;var n=e.ease(e.progress);e.current=e.start+(e.end-e.start)*n,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new u(this.x,this.y)),this.pathVector||(this.pathVector=new u),this.pathDelta||(this.pathDelta=new u),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),i&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=l.PLAYING_FORWARD,this.rotateToPath&&(r=this.path.getPoint(.1),this.rotation=Math.atan2(r.y-this.y,r.x-this.x)+h(this.pathRotationOffset)),this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],n=this.pathDelta,i=this.pathVector;if(n.copy(i).negate(),e.state===l.COMPLETE)return this.path.getPoint(1,i),n.add(i),i.add(this.pathOffset),void this.setPosition(i.x,i.y);if(e.state!==l.PLAYING_FORWARD&&e.state!==l.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),i),n.add(i),i.add(this.pathOffset);var r=this.x,s=this.y;this.setPosition(i.x,i.y);var a=this.x-r,o=this.y-s;if(0==a&&0==o)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(o,a)+h(this.pathRotationOffset))}}};t.exports=i},function(t,e){t.exports=function(t,e,n){return t&&t.hasOwnProperty(e)?t[e]:n}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,n){var i=n(327),r={defaultPipeline:null,pipeline:null,initPipeline:function(t){void 0===t&&(t=i.MULTI_PIPELINE);var e=this.scene.sys.game.renderer.pipelines;return!(!e||!e.has(t))&&(this.defaultPipeline=e.get(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer.pipelines;return e&&e.has(t)&&(this.pipeline=e.get(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},function(t,e){t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline"}},function(t,e){var n={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=n},function(t,e){var n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},function(t,e){var n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,n,i){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,n,i,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},function(t,e){var n={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,n,i){return void 0===t&&(t=16777215),void 0===e&&(i=n=e=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=n,this.tintBottomRight=i,this.tintFill=!1,this},setTintFill:function(t,e,n,i){return this.setTint(t,e,n,i),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=n},function(t,e,n){var i=n(1),r=n(1);r=n(333),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e){t.exports=function(t,e,n,i){var r=e.list;if(0!==r.length){var s=e.localTransform;i?(s.loadIdentity(),s.multiply(i),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,n);for(var u=0;u<r.length;u++){var c,f,d,p=r[u];p.willRender(n)&&(c=p.alpha,f=p.scrollFactorX,d=p.scrollFactorY,a||p.blendMode===t.currentBlendMode||t.setBlendMode(p.blendMode),p.setScrollFactor(f*h,d*l),p.setAlpha(c*o),p.renderCanvas(t,p,n,s),p.setAlpha(c),p.setScrollFactor(f,d))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,n){var o=n(24);t.exports=function(t,e,n){void 0===n&&(n=new o);var i=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-i,a=Math.max(t.bottom,e.bottom)-r;return n.setTo(i,r,s,a)}},function(t,e,n){var i=n(1),r=n(1);r=n(336),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e){t.exports=function(t,e,n,i){var r=e.list;if(0!==r.length){var s=e.localTransform;i?(s.loadIdentity(),s.multiply(i),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var a=-1!==e.blendMode;a||t.setBlendMode(0);var o=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,n);for(var u=0;u<r.length;u++){var c,f,d,p=r[u];p.willRender(n)&&(c=p.alpha,f=p.scrollFactorX,d=p.scrollFactorY,a||p.blendMode===t.currentBlendMode||t.setBlendMode(p.blendMode),p.setScrollFactor(f*h,d*l),p.setAlpha(c*o),p.renderCanvas(t,p,n,s),p.setAlpha(c),p.setScrollFactor(f,d))}e.mask&&e.mask.postRenderCanvas(t)}}}]); |