window.SpinePlugin=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=32)}([function(t,e){function i(t,e,i){var n=i?t[e]:Object.getOwnPropertyDescriptor(t,e);return!i&&n.value&&"object"==typeof n.value&&(n=n.value),!(!n||!function(t){return!!t.get&&"function"==typeof t.get||!!t.set&&"function"==typeof t.set}(n))&&(void 0===n.enumerable&&(n.enumerable=!0),void 0===n.configurable&&(n.configurable=!0),n)}function n(t,e){var i=Object.getOwnPropertyDescriptor(t,e);return!!i&&(i.value&&"object"==typeof i.value&&(i=i.value),!1===i.configurable)}function r(t,e,r,s){for(var a in e)if(e.hasOwnProperty(a)){var h=i(e,a,r);if(!1!==h){if(n((s||t).prototype,a)){if(o.ignoreFinals)continue;throw new Error("cannot override final property '"+a+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,a,h)}else t.prototype[a]=e[a]}}function s(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i0&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=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 i=this.x,n=this.y;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this},transformMat3:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[3]*i+n[6],this.y=n[1]*e+n[4]*i+n[7],this},transformMat4:function(t){var e=this.x,i=this.y,n=t.val;return this.x=n[0]*e+n[4]*i+n[12],this.y=n[1]*e+n[5]*i+n[13],this},reset:function(){return this.x=0,this.y=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0),n.LEFT=new n(-1,0),n.UP=new n(0,-1),n.DOWN=new n(0,1),n.ONE=new n(1,1),t.exports=n},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,i){var n=i(1);t.exports=function(t){return t>Math.PI&&(t-=n.PI2),Math.abs(((t+n.TAU)%n.PI2-n.PI2)%n.PI2)}},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e,i){var n=i(1);t.exports=function(t){return t*n.RAD_TO_DEG}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i){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=i||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new n(this.x,this.y,this.z)},crossVectors:function(t,e){var i=t.x,n=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=n*a-r*o,this.y=r*s-i*a,this.z=i*o-n*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,i){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=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||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,i=t.y-this.y,n=t.z-this.z||0;return Math.sqrt(e*e+i*i+n*n)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0;return e*e+i*i+n*n},length:function(){var t=this.x,e=this.y,i=this.z;return Math.sqrt(t*t+e*e+i*i)},lengthSq:function(){var t=this.x,e=this.y,i=this.z;return t*t+e*e+i*i},normalize:function(){var t=this.x,e=this.y,i=this.z,n=t*t+e*e+i*i;return n>0&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n,this.z=i*n),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z;return this.x=i*o-n*s,this.y=n*r-e*o,this.z=e*s-i*r,this},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=e*r[0]+i*r[3]+n*r[6],this.y=e*r[1]+i*r[4]+n*r[7],this.z=e*r[2]+i*r[5]+n*r[8],this},transformMat4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[4]*i+r[8]*n+r[12],this.y=r[1]*e+r[5]*i+r[9]*n+r[13],this.z=r[2]*e+r[6]*i+r[10]*n+r[14],this},transformCoordinates:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=e*r[0]+i*r[4]+n*r[8]+r[12],o=e*r[1]+i*r[5]+n*r[9]+r[13],a=e*r[2]+i*r[6]+n*r[10]+r[14],h=e*r[3]+i*r[7]+n*r[11]+r[15];return this.x=s/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},project:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=r[0],o=r[1],a=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],v=r[10],M=r[11],m=r[12],g=r[13],x=r[14],y=1/(e*h+i*f+n*M+r[15]);return this.x=(e*s+i*l+n*d+m)*y,this.y=(e*o+i*u+n*p+g)*y,this.z=(e*a+i*c+n*v+x)*y,this},unproject:function(t,e){var i=t.x,n=t.y,r=t.z,s=t.w,o=this.x-i,a=s-this.y-1-n,h=this.z;return this.x=2*o/r-1,this.y=2*a/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});n.ZERO=new n,n.RIGHT=new n(1,0,0),n.LEFT=new n(-1,0,0),n.UP=new n(0,-1,0),n.DOWN=new n(0,1,0),n.FORWARD=new n(0,0,1),n.BACK=new n(0,0,-1),n.ONE=new n(1,1,1),t.exports=n},function(t,e){t.exports=function(t,e,i){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1!==e.indexOf(".")){for(var n=e.split("."),r=t,s=i,o=0;o=400&&t.status<=599&&(n=!1),this.resetXHR(),this.loader.nextFile(this,n)},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,i=this.type;this.loader.emit(s.FILE_COMPLETE,e,i,t),this.loader.emit(s.FILE_KEY_COMPLETE+i+"-"+e,e,i,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,i){if("function"==typeof URL)t.src=URL.createObjectURL(e);else{var n=new FileReader;n.onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||i)+";base64,"+n.result.split(",")[1]},n.onerror=t.onerror,n.readAsDataURL(e)}},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var i={},n={install:function(t){for(var e in i)t[e]=i[e]},register:function(t,e){i[t]=e},destroy:function(){i={}}};t.exports=n},function(t,e,i){var n=i(2),r=function(){var t,e,i,s,o,a,h=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof h&&(c=h,h=arguments[1]||{},l=2),u===l&&(h=this,--l);l=0?t:t+2*Math.PI}},function(t,e,i){var n=i(4);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(4);t.exports=function(t){return n(t,-180,180)}},function(t,e,i){var n=i(20);t.exports=function(t,e){return n(t)/n(e)/n(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,i,n,r){var s=.5*(n-e),o=.5*(r-i),a=t*t;return(2*i-2*n+s+o)*(t*a)+(-3*i+3*n-2*s-o)*a+s*t+i}},function(t,e){t.exports=function(t,e,i){return(e-t)*i+t}},function(t,e){t.exports=function(t,e,i){return t<=e?0:t>=i?1:(t=(t-e)/(i-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,i){return(t=Math.max(0,Math.min(1,(t-e)/(i-e))))*t*t*(t*(6*t-15)+10)}},function(t,e,i){var n=i(1);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],this},fromMat4:function(t){var e=t.val,i=this.val;return i[0]=e[0],i[1]=e[1],i[2]=e[2],i[3]=e[4],i[4]=e[5],i[5]=e[6],i[6]=e[8],i[7]=e[9],i[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],i=t[2],n=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=i,t[7]=n,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*s-o*h,c=-l*r+o*a,f=h*r-s*a,d=e*u+i*c+n*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*i+n*h)*d,t[2]=(o*i-n*s)*d,t[3]=c*d,t[4]=(l*e-n*a)*d,t[5]=(-o*e+n*r)*d,t[6]=f*d,t[7]=(-h*e+i*a)*d,t[8]=(s*e-i*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return t[0]=s*l-o*h,t[1]=n*h-i*l,t[2]=i*o-n*s,t[3]=o*a-r*l,t[4]=e*l-n*a,t[5]=n*r-e*o,t[6]=r*h-s*a,t[7]=i*a-e*h,t[8]=e*s-i*r,this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*s-o*h)+i*(-l*r+o*a)+n*(h*r-s*a)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],v=c[3],M=c[4],m=c[5],g=c[6],x=c[7],y=c[8];return e[0]=f*i+d*s+p*h,e[1]=f*n+d*o+p*l,e[2]=f*r+d*a+p*u,e[3]=v*i+M*s+m*h,e[4]=v*n+M*o+m*l,e[5]=v*r+M*a+m*u,e[6]=g*i+x*s+y*h,e[7]=g*n+x*o+y*l,e[8]=g*r+x*a+y*u,this},translate:function(t){var e=this.val,i=t.x,n=t.y;return e[6]=i*e[0]+n*e[3]+e[6],e[7]=i*e[1]+n*e[4]+e[7],e[8]=i*e[2]+n*e[5]+e[8],this},rotate:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*i+h*s,e[1]=l*n+h*o,e[2]=l*r+h*a,e[3]=l*s-h*i,e[4]=l*o-h*n,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,i=t.x,n=t.y;return e[0]=i*e[0],e[1]=i*e[1],e[2]=i*e[2],e[3]=n*e[3],e[4]=n*e[4],e[5]=n*e[5],this},fromQuat:function(t){var e=t.x,i=t.y,n=t.z,r=t.w,s=e+e,o=i+i,a=n+n,h=e*s,l=e*o,u=e*a,c=i*o,f=i*a,d=n*a,p=r*s,v=r*o,M=r*a,m=this.val;return m[0]=1-(c+d),m[3]=l+M,m[6]=u-v,m[1]=l-M,m[4]=1-(h+d),m[7]=f+p,m[2]=u+v,m[5]=f-p,m[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,i=this.val,n=e[0],r=e[1],s=e[2],o=e[3],a=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],v=e[12],M=e[13],m=e[14],g=e[15],x=n*h-r*a,y=n*l-s*a,w=n*u-o*a,b=r*l-s*h,A=r*u-o*h,E=s*u-o*l,R=c*M-f*v,T=c*m-d*v,I=c*g-p*v,S=f*m-d*M,C=f*g-p*M,P=d*g-p*m,L=x*P-y*C+w*S+b*I-A*T+E*R;return L?(L=1/L,i[0]=(h*P-l*C+u*S)*L,i[1]=(l*I-a*P-u*T)*L,i[2]=(a*C-h*I+u*R)*L,i[3]=(s*C-r*P-o*S)*L,i[4]=(n*P-s*I+o*T)*L,i[5]=(r*I-n*C-o*R)*L,i[6]=(M*E-m*A+g*b)*L,i[7]=(m*w-v*E-g*y)*L,i[8]=(v*A-M*w+g*x)*L,this):null}});t.exports=n},function(t,e,i){var n=new(i(0))({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new n(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,i=t.val;return e[0]=i[0],e[1]=i[1],e[2]=i[2],e[3]=i[3],e[4]=i[4],e[5]=i[5],e[6]=i[6],e[7]=i[7],e[8]=i[8],e[9]=i[9],e[10]=i[10],e[11]=i[11],e[12]=i[12],e[13]=i[13],e[14]=i[14],e[15]=i[15],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],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,i){this.identity();var n=this.val;return n[12]=t,n[13]=e,n[14]=i,this},scaling:function(t,e,i){this.zero();var n=this.val;return n[0]=t,n[5]=e,n[10]=i,n[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],i=t[2],n=t[3],r=t[6],s=t[7],o=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]=i,t[9]=r,t[11]=t[14],t[12]=n,t[13]=s,t[14]=o,this},invert:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],M=t[15],m=e*o-i*s,g=e*a-n*s,x=e*h-r*s,y=i*a-n*o,w=i*h-r*o,b=n*h-r*a,A=l*p-u*d,E=l*v-c*d,R=l*M-f*d,T=u*v-c*p,I=u*M-f*p,S=c*M-f*v,C=m*S-g*I+x*T+y*R-w*E+b*A;return C?(C=1/C,t[0]=(o*S-a*I+h*T)*C,t[1]=(n*I-i*S-r*T)*C,t[2]=(p*b-v*w+M*y)*C,t[3]=(c*w-u*b-f*y)*C,t[4]=(a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),this},determinant:function(){var t=this.val,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],v=t[14],M=t[15];return(e*o-i*s)*(c*M-f*v)-(e*a-n*s)*(u*M-f*p)+(e*h-r*s)*(u*v-c*p)+(i*a-n*o)*(l*M-f*d)-(i*h-r*o)*(l*v-c*d)+(n*h-r*a)*(l*p-u*d)},multiply:function(t){var e=this.val,i=e[0],n=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],v=e[13],M=e[14],m=e[15],g=t.val,x=g[0],y=g[1],w=g[2],b=g[3];return e[0]=x*i+y*o+w*u+b*p,e[1]=x*n+y*a+w*c+b*v,e[2]=x*r+y*h+w*f+b*M,e[3]=x*s+y*l+w*d+b*m,x=g[4],y=g[5],w=g[6],b=g[7],e[4]=x*i+y*o+w*u+b*p,e[5]=x*n+y*a+w*c+b*v,e[6]=x*r+y*h+w*f+b*M,e[7]=x*s+y*l+w*d+b*m,x=g[8],y=g[9],w=g[10],b=g[11],e[8]=x*i+y*o+w*u+b*p,e[9]=x*n+y*a+w*c+b*v,e[10]=x*r+y*h+w*f+b*M,e[11]=x*s+y*l+w*d+b*m,x=g[12],y=g[13],w=g[14],b=g[15],e[12]=x*i+y*o+w*u+b*p,e[13]=x*n+y*a+w*c+b*v,e[14]=x*r+y*h+w*f+b*M,e[15]=x*s+y*l+w*d+b*m,this},multiplyLocal:function(t){var e=[],i=this.val,n=t.val;return e[0]=i[0]*n[0]+i[1]*n[4]+i[2]*n[8]+i[3]*n[12],e[1]=i[0]*n[1]+i[1]*n[5]+i[2]*n[9]+i[3]*n[13],e[2]=i[0]*n[2]+i[1]*n[6]+i[2]*n[10]+i[3]*n[14],e[3]=i[0]*n[3]+i[1]*n[7]+i[2]*n[11]+i[3]*n[15],e[4]=i[4]*n[0]+i[5]*n[4]+i[6]*n[8]+i[7]*n[12],e[5]=i[4]*n[1]+i[5]*n[5]+i[6]*n[9]+i[7]*n[13],e[6]=i[4]*n[2]+i[5]*n[6]+i[6]*n[10]+i[7]*n[14],e[7]=i[4]*n[3]+i[5]*n[7]+i[6]*n[11]+i[7]*n[15],e[8]=i[8]*n[0]+i[9]*n[4]+i[10]*n[8]+i[11]*n[12],e[9]=i[8]*n[1]+i[9]*n[5]+i[10]*n[9]+i[11]*n[13],e[10]=i[8]*n[2]+i[9]*n[6]+i[10]*n[10]+i[11]*n[14],e[11]=i[8]*n[3]+i[9]*n[7]+i[10]*n[11]+i[11]*n[15],e[12]=i[12]*n[0]+i[13]*n[4]+i[14]*n[8]+i[15]*n[12],e[13]=i[12]*n[1]+i[13]*n[5]+i[14]*n[9]+i[15]*n[13],e[14]=i[12]*n[2]+i[13]*n[6]+i[14]*n[10]+i[15]*n[14],e[15]=i[12]*n[3]+i[13]*n[7]+i[14]*n[11]+i[15]*n[15],this.fromArray(e)},translate:function(t){var e=t.x,i=t.y,n=t.z,r=this.val;return r[12]=r[0]*e+r[4]*i+r[8]*n+r[12],r[13]=r[1]*e+r[5]*i+r[9]*n+r[13],r[14]=r[2]*e+r[6]*i+r[10]*n+r[14],r[15]=r[3]*e+r[7]*i+r[11]*n+r[15],this},translateXYZ:function(t,e,i){var n=this.val;return n[12]=n[0]*t+n[4]*e+n[8]*i+n[12],n[13]=n[1]*t+n[5]*e+n[9]*i+n[13],n[14]=n[2]*t+n[6]*e+n[10]*i+n[14],n[15]=n[3]*t+n[7]*e+n[11]*i+n[15],this},scale:function(t){var e=t.x,i=t.y,n=t.z,r=this.val;return r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*e,r[3]=r[3]*e,r[4]=r[4]*i,r[5]=r[5]*i,r[6]=r[6]*i,r[7]=r[7]*i,r[8]=r[8]*n,r[9]=r[9]*n,r[10]=r[10]*n,r[11]=r[11]*n,this},scaleXYZ:function(t,e,i){var n=this.val;return n[0]=n[0]*t,n[1]=n[1]*t,n[2]=n[2]*t,n[3]=n[3]*t,n[4]=n[4]*e,n[5]=n[5]*e,n[6]=n[6]*e,n[7]=n[7]*e,n[8]=n[8]*i,n[9]=n[9]*i,n[10]=n[10]*i,n[11]=n[11]*i,this},makeRotationAxis:function(t,e){var i=Math.cos(e),n=Math.sin(e),r=1-i,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.fromArray([h*s+i,h*o-n*a,h*a+n*o,0,h*o+n*a,l*o+i,l*a-n*s,0,h*a-n*o,l*a+n*s,r*a*a+i,0,0,0,0,1]),this},rotate:function(t,e){var i=this.val,n=e.x,r=e.y,s=e.z,o=Math.sqrt(n*n+r*r+s*s);if(Math.abs(o)<1e-6)return null;n*=o=1/o,r*=o,s*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],v=i[5],M=i[6],m=i[7],g=i[8],x=i[9],y=i[10],w=i[11],b=n*n*l+h,A=r*n*l+s*a,E=s*n*l-r*a,R=n*r*l-s*a,T=r*r*l+h,I=s*r*l+n*a,S=n*s*l+r*a,C=r*s*l-n*a,P=s*s*l+h;return i[0]=u*b+p*A+g*E,i[1]=c*b+v*A+x*E,i[2]=f*b+M*A+y*E,i[3]=d*b+m*A+w*E,i[4]=u*R+p*T+g*I,i[5]=c*R+v*T+x*I,i[6]=f*R+M*T+y*I,i[7]=d*R+m*T+w*I,i[8]=u*S+p*C+g*P,i[9]=c*S+v*C+x*P,i[10]=f*S+M*C+y*P,i[11]=d*S+m*C+w*P,this},rotateX:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[4],s=e[5],o=e[6],a=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*n+h*i,e[5]=s*n+l*i,e[6]=o*n+u*i,e[7]=a*n+c*i,e[8]=h*n-r*i,e[9]=l*n-s*i,e[10]=u*n-o*i,e[11]=c*n-a*i,this},rotateY:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*n-h*i,e[1]=s*n-l*i,e[2]=o*n-u*i,e[3]=a*n-c*i,e[8]=r*i+h*n,e[9]=s*i+l*n,e[10]=o*i+u*n,e[11]=a*i+c*n,this},rotateZ:function(t){var e=this.val,i=Math.sin(t),n=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*n+h*i,e[1]=s*n+l*i,e[2]=o*n+u*i,e[3]=a*n+c*i,e[4]=h*n-r*i,e[5]=l*n-s*i,e[6]=u*n-o*i,e[7]=c*n-a*i,this},fromRotationTranslation:function(t,e){var i=this.val,n=t.x,r=t.y,s=t.z,o=t.w,a=n+n,h=r+r,l=s+s,u=n*a,c=n*h,f=n*l,d=r*h,p=r*l,v=s*l,M=o*a,m=o*h,g=o*l;return i[0]=1-(d+v),i[1]=c+g,i[2]=f-m,i[3]=0,i[4]=c-g,i[5]=1-(u+v),i[6]=p+M,i[7]=0,i[8]=f+m,i[9]=p-M,i[10]=1-(u+d),i[11]=0,i[12]=e.x,i[13]=e.y,i[14]=e.z,i[15]=1,this},fromQuat:function(t){var e=this.val,i=t.x,n=t.y,r=t.z,s=t.w,o=i+i,a=n+n,h=r+r,l=i*o,u=i*a,c=i*h,f=n*a,d=n*h,p=r*h,v=s*o,M=s*a,m=s*h;return e[0]=1-(f+p),e[1]=u+m,e[2]=c-M,e[3]=0,e[4]=u-m,e[5]=1-(l+p),e[6]=d+v,e[7]=0,e[8]=c+M,e[9]=d-v,e[10]=1-(l+f),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,i,n,r,s){var o=this.val,a=1/(e-t),h=1/(n-i),l=1/(r-s);return o[0]=2*r*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*r*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(n+i)*h,o[10]=(s+r)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=s*r*2*l,o[15]=0,this},perspective:function(t,e,i,n){var r=this.val,s=1/Math.tan(t/2),o=1/(i-n);return r[0]=s/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(n+i)*o,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*n*i*o,r[15]=0,this},perspectiveLH:function(t,e,i,n){var r=this.val;return r[0]=2*i/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*i/e,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-n/(i-n),r[11]=1,r[12]=0,r[13]=0,r[14]=i*n/(i-n),r[15]=0,this},ortho:function(t,e,i,n,r,s){var o=this.val,a=t-e,h=i-n,l=r-s;return a=0===a?a:1/a,h=0===h?h:1/h,l=0===l?l:1/l,o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(n+i)*h,o[14]=(s+r)*l,o[15]=1,this},lookAt:function(t,e,i){var n=this.val,r=t.x,s=t.y,o=t.z,a=i.x,h=i.y,l=i.z,u=e.x,c=e.y,f=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(o-f)<1e-6)return this.identity();var d=r-u,p=s-c,v=o-f,M=1/Math.sqrt(d*d+p*p+v*v),m=h*(v*=M)-l*(p*=M),g=l*(d*=M)-a*v,x=a*p-h*d;(M=Math.sqrt(m*m+g*g+x*x))?(m*=M=1/M,g*=M,x*=M):(m=0,g=0,x=0);var y=p*x-v*g,w=v*m-d*x,b=d*g-p*m;return(M=Math.sqrt(y*y+w*w+b*b))?(y*=M=1/M,w*=M,b*=M):(y=0,w=0,b=0),n[0]=m,n[1]=y,n[2]=d,n[3]=0,n[4]=g,n[5]=w,n[6]=p,n[7]=0,n[8]=x,n[9]=b,n[10]=v,n[11]=0,n[12]=-(m*r+g*s+x*o),n[13]=-(y*r+w*s+b*o),n[14]=-(d*r+p*s+v*o),n[15]=1,this},yawPitchRoll:function(t,e,i){this.zero(),r.zero(),s.zero();var n=this.val,o=r.val,a=s.val,h=Math.sin(i),l=Math.cos(i);return n[10]=1,n[15]=1,n[0]=l,n[1]=h,n[4]=-h,n[5]=l,h=Math.sin(e),l=Math.cos(e),o[0]=1,o[15]=1,o[5]=l,o[10]=l,o[9]=-h,o[6]=h,h=Math.sin(t),l=Math.cos(t),a[5]=1,a[15]=1,a[0]=l,a[2]=-h,a[8]=h,a[10]=l,this.multiplyLocal(r),this.multiplyLocal(s),this},setWorldMatrix:function(t,e,i,n,o){return this.yawPitchRoll(t.y,t.x,t.z),r.scaling(i.x,i.y,i.z),s.xyz(e.x,e.y,e.z),this.multiplyLocal(r),this.multiplyLocal(s),void 0!==n&&this.multiplyLocal(n),void 0!==o&&this.multiplyLocal(o),this}}),r=new n,s=new n;t.exports=n},function(t,e,i){var n=i(0),r=i(10),s=i(26),o=new Int8Array([1,2,0]),a=new Float32Array([0,0,0]),h=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,f=new n({initialize:function(t,e,i,n){"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=i||0,this.w=n||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,i,n){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=i||0,this.w=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,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,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(u.copy(h).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):i>.999999?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+i,this.normalize())},setAxes:function(t,e,i){var n=c.val;return n[0]=e.x,n[3]=e.y,n[6]=e.z,n[1]=i.x,n[4]=i.y,n[7]=i.z,n[2]=-t.x,n[5]=-t.y,n[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.x=i*t.x,this.y=i*t.y,this.z=i*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,i=this.y,n=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+r*s+i*a-n*o,this.y=i*h+r*o+n*s-e*a,this.z=n*h+r*a+e*o-i*s,this.w=r*h-e*s-i*o-n*a,this},slerp:function(t,e){var i=this.x,n=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=i*o+n*a+r*h+s*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c=1-e,f=e;if(1-u>1e-6){var d=Math.acos(u),p=Math.sin(d);c=Math.sin((1-e)*d)/p,f=Math.sin(e*d)/p}return this.x=c*i+f*o,this.y=c*n+f*a,this.z=c*r+f*h,this.w=c*s+f*l,this},invert:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n,s=r?1/r:0;return this.x=-t*s,this.y=-e*s,this.z=-i*s,this.w=n*s,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+r*s,this.y=i*o+n*s,this.z=n*o-i*s,this.w=r*o-e*s,this},rotateY:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o-n*s,this.y=i*o+r*s,this.z=n*o+e*s,this.w=r*o-i*s,this},rotateZ:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+i*s,this.y=i*o-e*s,this.z=n*o+r*s,this.w=r*o-n*s,this},calculateW:function(){var t=this.x,e=this.y,i=this.z;return this.w=-Math.sqrt(1-t*t-e*e-i*i),this},fromMat3:function(t){var e,i=t.val,n=i[0]+i[4]+i[8];if(n>0)e=Math.sqrt(n+1),this.w=.5*e,e=.5/e,this.x=(i[7]-i[5])*e,this.y=(i[2]-i[6])*e,this.z=(i[3]-i[1])*e;else{var r=0;i[4]>i[0]&&(r=1),i[8]>i[3*r+r]&&(r=2);var s=o[r],h=o[s];e=Math.sqrt(i[3*r+r]-i[3*s+s]-i[3*h+h]+1),a[r]=.5*e,e=.5/e,a[s]=(i[3*s+r]+i[3*r+s])*e,a[h]=(i[3*h+r]+i[3*r+h])*e,this.x=a[0],this.y=a[1],this.z=a[2],this.w=(i[3*h+s]-i[3*s+h])*e}return this}});t.exports=f},function(t,e,i){var n=i(14),r=i(30);t.exports=function(t,e){var i=void 0===t?r():n({},t);if(e)for(var s in e)void 0!==e[s]&&(i[s]=e[s]);return i}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),{responseType:t,async:e,user:i,password:n,timeout:r,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0}}},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(33),r=i(0),s=i(11),o=i(144),a=i(145),h=i(167),l=i(168),u=i(186),c=new r({Extends:a,initialize:function(t,e){a.call(this,t,e);var i=e.game;this.isWebGL=2===i.config.renderType,this.cache=i.cache.addCustom("spine"),this.spineTextures=i.cache.addCustom("spineTextures"),this.json=i.cache.json,this.textures=i.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=h,this.temp1,this.temp2,this.isWebGL?(this.runtime=h.webgl,this.renderer=i.renderer,this.gl=i.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=h.canvas,this.renderer=i.renderer,this.getAtlas=this.getAtlasCanvas),e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",this.add.bind(this),this.make.bind(this))},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(o,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new h.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new h.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);var t=function(t,e){if(t!==this.srcBlend||e!==this.dstBlend){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))}};this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new h.webgl.Vector3(0,0,0),this.temp2=new h.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=new h.TextureAtlas(e.data,function(){return n.get(t)});else{var r=this.textures;i=new h.TextureAtlas(e.data,function(e){var i=new h.canvas.CanvasTexture(r.get(e).getSourceImage());return n.add(t,i),i})}return i}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;if(n.has(t))i=new h.TextureAtlas(e.data,function(){return n.get(t)});else{var r=this.textures,s=this.sceneRenderer.context.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),i=new h.TextureAtlas(e.data,function(e){var i=new h.webgl.GLTexture(s,r.get(e).getSourceImage(),!1);return n.add(t,i),i})}return i}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,i,n,r,s){var o;if(Array.isArray(t))for(var a=0;a=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(et?t+=i:e=1?1:1/e*(1+(e*t|0))}},function(t,e,i){t.exports={Ceil:i(94),Equal:i(95),Floor:i(96),GreaterThan:i(97),LessThan:i(98)}},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,i){return void 0===i&&(i=1e-4),Math.abs(t-e)e-i}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t1?t[i]-(n(r-i,t[i],t[i],t[i-1],t[i-1])-t[i]):n(r-s,t[s?s-1:0],t[s],t[i1?n(t[i],t[i-1],i-r):n(t[s],t[s+1>i?i:s+1],r-s)}},function(t,e){t.exports=function(t,e,i,n){return function(t,e){var i=1-t;return i*i*e}(t,e)+function(t,e){return 2*(1-t)*t*e}(t,i)+function(t,e){return t*t*e}(t,n)}},function(t,e,i){var n=i(23);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(24);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(108),IsSize:i(109),IsValue:i(110)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<0&&0==(t&t-1)&&e>0&&0==(e&e-1)}},function(t,e){t.exports=function(t){return t>0&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(112),Floor:i(113),To:i(114)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.ceil(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.floor(t/e),n?(i+t)/e:i+t)}},function(t,e){t.exports=function(t,e,i,n){return void 0===i&&(i=0),0===e?t:(t-=i,t=e*Math.round(t/e),n?(i+t)/e:i+t)}},function(t,e,i){var n=new(i(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,i=this.n;t=t.toString();for(var n=0;n>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return this.n=i,2.3283064365386963e-10*(i>>>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;e0;e--){var i=Math.floor(this.frac()*(e+1)),n=t[i];t[i]=t[e],t[e]=n}return t}});t.exports=n},function(t,e){t.exports=function(t){for(var e=0,i=0;i1?void 0!==n?(r=(n-t)/(n-i))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI;return t.x=Math.cos(i)*e,t.y=Math.sin(i)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var i=2*Math.random()*Math.PI,n=2*Math.random()-1,r=Math.sqrt(1-n*n)*e;return t.x=Math.cos(i)*r,t.y=Math.sin(i)*r,t.z=n*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 i=t.x,n=t.y;return t.x=i*Math.cos(e)-n*Math.sin(e),t.y=i*Math.sin(e)+n*Math.cos(e),t}},function(t,e){t.exports=function(t,e,i,n){var r=Math.cos(n),s=Math.sin(n),o=t.x-e,a=t.y-i;return t.x=o*r-a*s+e,t.y=o*s+a*r+i,t}},function(t,e){t.exports=function(t,e,i,n,r){var s=n+Math.atan2(t.y-i,t.x-e);return t.x=e+r*Math.cos(s),t.y=i+r*Math.sin(s),t}},function(t,e){t.exports=function(t){return t>0?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.round(t*n)/n}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=1),void 0===i&&(i=1),void 0===n&&(n=1),n*=Math.PI/t;for(var r=[],s=[],o=0;o0&&t<=e*i&&(s=t>e-1?t-(o=Math.floor(t/e))*e:t,r.set(s,o)),r}},function(t,e,i){var n=i(5);t.exports=function(t,e,i,r,s,o,a,h){void 0===h&&(h=new n);var l=Math.sin(s),u=Math.cos(s),c=u*o,f=l*o,d=-l*a,p=u*a,v=1/(c*p+d*-f);return h.x=p*v*t+-d*v*e+(r*d-i*p)*v,h.y=c*v*e+-f*v*t+(-r*c+i*f)*v,h}},function(t,e){t.exports=function(t,e,i){return Math.abs(t-e)<=i}},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){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=i||0,this.w=n||0)},clone:function(){return new n(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,i,n){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=i||0,this.w=n||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,i=this.z,n=this.w;return Math.sqrt(t*t+e*e+i*i+n*n)},lengthSq:function(){var t=this.x,e=this.y,i=this.z,n=this.w;return t*t+e*e+i*i+n*n},normalize:function(){var t=this.x,e=this.y,i=this.z,n=this.w,r=t*t+e*e+i*i+n*n;return r>0&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=i*r,this.w=n*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 i=this.x,n=this.y,r=this.z,s=this.w;return this.x=i+e*(t.x-i),this.y=n+e*(t.y-n),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,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+i*i+n*n+r*r)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z||0,r=t.w-this.w||0;return e*e+i*i+n*n+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,i=this.y,n=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*i+s[8]*n+s[12]*r,this.y=s[1]*e+s[5]*i+s[9]*n+s[13]*r,this.z=s[2]*e+s[6]*i+s[10]*n+s[14]*r,this.w=s[3]*e+s[7]*i+s[11]*n+s[15]*r,this},transformQuat:function(t){var e=this.x,i=this.y,n=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*n-o*i,l=a*i+o*e-r*n,u=a*n+r*i-s*e,c=-r*e-s*i-o*n;return this.x=h*a+c*-r+l*-o-u*-s,this.y=l*a+c*-s+u*-r-h*-o,this.z=u*a+c*-o+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});n.prototype.sub=n.prototype.subtract,n.prototype.mul=n.prototype.multiply,n.prototype.div=n.prototype.divide,n.prototype.dist=n.prototype.distance,n.prototype.distSq=n.prototype.distanceSq,n.prototype.len=n.prototype.length,n.prototype.lenSq=n.prototype.lengthSq,t.exports=n},function(t,e,i){var n=i(10),r=i(27),s=i(28),o=new r,a=new s,h=new n;t.exports=function(t,e,i){return a.setAxisAngle(e,i),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports={DEFAULT:0,LINEAR:0,NEAREST:1}},function(t,e){t.exports="resize"},function(t,e,i){var n=i(146),r=i(0),s=i(147),o=new r({Extends:n,initialize:function(t,e){n.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){}});t.exports=o},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game,this.scene,this.systems},init:function(){},start:function(){},stop:function(){},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){t.exports={BOOT:i(148),CREATE:i(149),DESTROY:i(150),PAUSE:i(151),POST_UPDATE:i(152),PRE_UPDATE:i(153),READY:i(154),RENDER:i(155),RESUME:i(156),SHUTDOWN:i(157),SLEEP:i(158),START:i(159),TRANSITION_COMPLETE:i(160),TRANSITION_INIT:i(161),TRANSITION_OUT:i(162),TRANSITION_START:i(163),TRANSITION_WAKE:i(164),UPDATE:i(165),WAKE:i(166)}},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="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(t,e){(function(){var e,i,n,r=this&&this.__extends||(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)e.hasOwnProperty(i)&&(t[i]=e[i])},function(t,i){function n(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(n.prototype=i.prototype,new n)});!function(t){var e,i,n,s=function(){function t(t,e,i){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.duration=i}return t.prototype.apply=function(t,e,i,n,r,s,o,a){if(null==t)throw new Error("skeleton cannot be null.");n&&0!=this.duration&&(i%=this.duration,e>0&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},t.linearSearch=function(t,e,i){for(var n=0,r=t.length-i;n<=r;n+=i)if(t[n]>e)return n;return-1},t}();t.Animation=s,function(t){t[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add"}(e=t.MixBlend||(t.MixBlend={})),function(t){t[t.in=0]="in",t[t.out=1]="out"}(i=t.MixDirection||(t.MixDirection={})),function(t){t[t.rotate=0]="rotate",t[t.translate=1]="translate",t[t.scale=2]="scale",t[t.shear=3]="shear",t[t.attachment=4]="attachment",t[t.color=5]="color",t[t.deform=6]="deform",t[t.event=7]="event",t[t.drawOrder=8]="drawOrder",t[t.ikConstraint=9]="ikConstraint",t[t.transformConstraint=10]="transformConstraint",t[t.pathConstraintPosition=11]="pathConstraintPosition",t[t.pathConstraintSpacing=12]="pathConstraintSpacing",t[t.pathConstraintMix=13]="pathConstraintMix",t[t.twoColor=14]="twoColor"}(n=t.TimelineType||(t.TimelineType={}));var o=function(){function e(i){if(i<=0)throw new Error("frameCount must be > 0: "+i);this.curves=t.Utils.newFloatArray((i-1)*e.BEZIER_SIZE)}return e.prototype.getFrameCount=function(){return this.curves.length/e.BEZIER_SIZE+1},e.prototype.setLinear=function(t){this.curves[t*e.BEZIER_SIZE]=e.LINEAR},e.prototype.setStepped=function(t){this.curves[t*e.BEZIER_SIZE]=e.STEPPED},e.prototype.getCurveType=function(t){var i=t*e.BEZIER_SIZE;if(i==this.curves.length)return e.LINEAR;var n=this.curves[i];return n==e.LINEAR?e.LINEAR:n==e.STEPPED?e.STEPPED:e.BEZIER},e.prototype.setCurve=function(t,i,n,r,s){var o=.03*(2*-i+r),a=.03*(2*-n+s),h=.006*(3*(i-r)+1),l=.006*(3*(n-s)+1),u=2*o+h,c=2*a+l,f=.3*i+o+.16666667*h,d=.3*n+a+.16666667*l,p=t*e.BEZIER_SIZE,v=this.curves;v[p++]=e.BEZIER;for(var M=f,m=d,g=p+e.BEZIER_SIZE-1;p=n){var u=void 0,c=void 0;return s==h?(u=0,c=0):(u=r[s-2],c=r[s-1]),c+(r[s+1]-c)*(n-u)/(a-u)}var f=r[s-1];return f+(1-f)*(n-a)/(1-a)},e.LINEAR=0,e.STEPPED=1,e.BEZIER=2,e.BEZIER_SIZE=19,e}();t.CurveTimeline=o;var a=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e<<1),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+o.ROTATION]=i},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(n=u[u.length-o.ENTRIES]){var d=u[u.length+o.PREV_ROTATION];switch(h){case e.setup:c.rotation=c.data.rotation+d*a;break;case e.first:case e.replace:d+=c.data.rotation-c.rotation,d-=360*(16384-(16384.499999999996-d/360|0));case e.add:c.rotation+=d*a}}else{var p=s.binarySearch(u,n,o.ENTRIES),v=u[p+o.PREV_ROTATION],M=u[p],m=this.getCurvePercent((p>>1)-1,1-(n-M)/(u[p+o.PREV_TIME]-M)),g=u[p+o.ROTATION]-v;switch(g=v+(g-360*(16384-(16384.499999999996-g/360|0)))*m,h){case e.setup:c.rotation=c.data.rotation+(g-360*(16384-(16384.499999999996-g/360|0)))*a;break;case e.first:case e.replace:g+=c.data.rotation-c.rotation;case e.add:c.rotation+=(g-360*(16384-(16384.499999999996-g/360|0)))*a}}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_ROTATION=-1,o.ROTATION=1,o}(o);t.RotateTimeline=a;var h=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},o.prototype.setFrame=function(t,e,i,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.X]=i,this.frames[t+o.Y]=n},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(n=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_X],d=u[u.length+o.PREV_Y];else{var p=s.binarySearch(u,n,o.ENTRIES);f=u[p+o.PREV_X],d=u[p+o.PREV_Y];var v=u[p],M=this.getCurvePercent(p/o.ENTRIES-1,1-(n-v)/(u[p+o.PREV_TIME]-v));f+=(u[p+o.X]-f)*M,d+=(u[p+o.Y]-d)*M}switch(h){case e.setup:c.x=c.data.x+f*a,c.y=c.data.y+d*a;break;case e.first:case e.replace:c.x+=(c.data.x+f-c.x)*a,c.y+=(c.data.y+d-c.y)*a;break;case e.add:c.x+=f*a,c.y+=d*a}}},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_X=-2,o.PREV_Y=-1,o.X=1,o.Y=2,o}(o);t.TranslateTimeline=h;var l=function(o){function a(t){return o.call(this,t)||this}return r(a,o),a.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},a.prototype.apply=function(n,r,o,h,l,u,c){var f=this.frames,d=n.bones[this.boneIndex];if(o=f[f.length-a.ENTRIES])p=f[f.length+a.PREV_X]*d.data.scaleX,v=f[f.length+a.PREV_Y]*d.data.scaleY;else{var M=s.binarySearch(f,o,a.ENTRIES);p=f[M+a.PREV_X],v=f[M+a.PREV_Y];var m=f[M],g=this.getCurvePercent(M/a.ENTRIES-1,1-(o-m)/(f[M+a.PREV_TIME]-m));p=(p+(f[M+a.X]-p)*g)*d.data.scaleX,v=(v+(f[M+a.Y]-v)*g)*d.data.scaleY}if(1==l)u==e.add?(d.scaleX+=p-d.data.scaleX,d.scaleY+=v-d.data.scaleY):(d.scaleX=p,d.scaleY=v);else{var x=0,y=0;if(c==i.out)switch(u){case e.setup:x=d.data.scaleX,y=d.data.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-y)*l;break;case e.first:case e.replace:x=d.scaleX,y=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-x)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-y)*l;break;case e.add:x=d.scaleX,y=d.scaleY,d.scaleX=x+(Math.abs(p)*t.MathUtils.signum(x)-d.data.scaleX)*l,d.scaleY=y+(Math.abs(v)*t.MathUtils.signum(y)-d.data.scaleY)*l}else switch(u){case e.setup:x=Math.abs(d.data.scaleX)*t.MathUtils.signum(p),y=Math.abs(d.data.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=y+(v-y)*l;break;case e.first:case e.replace:x=Math.abs(d.scaleX)*t.MathUtils.signum(p),y=Math.abs(d.scaleY)*t.MathUtils.signum(v),d.scaleX=x+(p-x)*l,d.scaleY=y+(v-y)*l;break;case e.add:x=t.MathUtils.signum(p),y=t.MathUtils.signum(v),d.scaleX=Math.abs(d.scaleX)*x+(p-Math.abs(d.data.scaleX)*x)*l,d.scaleY=Math.abs(d.scaleY)*y+(v-Math.abs(d.data.scaleY)*y)*l}}}},a}(h);t.ScaleTimeline=l;var u=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},i.prototype.apply=function(t,n,r,o,a,h,l){var u=this.frames,c=t.bones[this.boneIndex];if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_X],d=u[u.length+i.PREV_Y];else{var p=s.binarySearch(u,r,i.ENTRIES);f=u[p+i.PREV_X],d=u[p+i.PREV_Y];var v=u[p],M=this.getCurvePercent(p/i.ENTRIES-1,1-(r-v)/(u[p+i.PREV_TIME]-v));f+=(u[p+i.X]-f)*M,d+=(u[p+i.Y]-d)*M}switch(h){case e.setup:c.shearX=c.data.shearX+f*a,c.shearY=c.data.shearY+d*a;break;case e.first:case e.replace:c.shearX+=(c.data.shearX+f-c.shearX)*a,c.shearY+=(c.data.shearY+d-c.shearY)*a;break;case e.add:c.shearX+=f*a,c.shearY+=d*a}}},i}(h);t.ShearTimeline=u;var c=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,i,n,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=i,this.frames[t+o.G]=n,this.frames[t+o.B]=r,this.frames[t+o.A]=s},o.prototype.apply=function(t,i,n,r,a,h,l){var u=t.slots[this.slotIndex],c=this.frames;if(n=c[c.length-o.ENTRIES]){var g=c.length;p=c[g+o.PREV_R],v=c[g+o.PREV_G],M=c[g+o.PREV_B],m=c[g+o.PREV_A]}else{var x=s.binarySearch(c,n,o.ENTRIES);p=c[x+o.PREV_R],v=c[x+o.PREV_G],M=c[x+o.PREV_B],m=c[x+o.PREV_A];var y=c[x],w=this.getCurvePercent(x/o.ENTRIES-1,1-(n-y)/(c[x+o.PREV_TIME]-y));p+=(c[x+o.R]-p)*w,v+=(c[x+o.G]-v)*w,M+=(c[x+o.B]-M)*w,m+=(c[x+o.A]-m)*w}if(1==a)u.color.set(p,v,M,m);else{f=u.color;h==e.setup&&f.setFromColor(u.data.color),f.add((p-f.r)*a,(v-f.g)*a,(M-f.b)*a,(m-f.a)*a)}}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_R=-4,o.PREV_G=-3,o.PREV_B=-2,o.PREV_A=-1,o.R=1,o.G=2,o.B=3,o.A=4,o}(o);t.ColorTimeline=c;var f=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},o.prototype.setFrame=function(t,e,i,n,r,s,a,h,l){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.R]=i,this.frames[t+o.G]=n,this.frames[t+o.B]=r,this.frames[t+o.A]=s,this.frames[t+o.R2]=a,this.frames[t+o.G2]=h,this.frames[t+o.B2]=l},o.prototype.apply=function(t,i,n,r,a,h,l){var u=t.slots[this.slotIndex],c=this.frames;if(n=c[c.length-o.ENTRIES]){var A=c.length;M=c[A+o.PREV_R],m=c[A+o.PREV_G],g=c[A+o.PREV_B],x=c[A+o.PREV_A],y=c[A+o.PREV_R2],w=c[A+o.PREV_G2],b=c[A+o.PREV_B2]}else{var E=s.binarySearch(c,n,o.ENTRIES);M=c[E+o.PREV_R],m=c[E+o.PREV_G],g=c[E+o.PREV_B],x=c[E+o.PREV_A],y=c[E+o.PREV_R2],w=c[E+o.PREV_G2],b=c[E+o.PREV_B2];var R=c[E],T=this.getCurvePercent(E/o.ENTRIES-1,1-(n-R)/(c[E+o.PREV_TIME]-R));M+=(c[E+o.R]-M)*T,m+=(c[E+o.G]-m)*T,g+=(c[E+o.B]-g)*T,x+=(c[E+o.A]-x)*T,y+=(c[E+o.R2]-y)*T,w+=(c[E+o.G2]-w)*T,b+=(c[E+o.B2]-b)*T}if(1==a)u.color.set(M,m,g,x),u.darkColor.set(y,w,b,1);else{f=u.color,d=u.darkColor;h==e.setup&&(f.setFromColor(u.data.color),d.setFromColor(u.data.darkColor)),f.add((M-f.r)*a,(m-f.g)*a,(g-f.b)*a,(x-f.a)*a),d.add((y-d.r)*a,(w-d.g)*a,(b-d.b)*a,0)}}},o.ENTRIES=8,o.PREV_TIME=-8,o.PREV_R=-7,o.PREV_G=-6,o.PREV_B=-5,o.PREV_A=-4,o.PREV_R2=-3,o.PREV_G2=-2,o.PREV_B2=-1,o.R=1,o.G=2,o.B=3,o.A=4,o.R2=5,o.G2=6,o.B2=7,o}(o);t.TwoColorTimeline=f;var d=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.attachmentNames=new Array(e)}return r.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},r.prototype.apply=function(t,n,r,o,a,h,l){var u=t.slots[this.slotIndex];if(l!=i.out||h!=e.setup){var c=this.frames;if(r=c[c.length-1]?c.length-1:s.binarySearch(c,r,1)-1;var p=this.attachmentNames[d];t.slots[this.slotIndex].setAttachment(null==p?null:t.getAttachment(this.slotIndex,p))}}else{var v=u.data.attachmentName;u.setAttachment(null==v?null:t.getAttachment(this.slotIndex,v))}},r}();t.AttachmentTimeline=d;var p=null,v=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e),n.frameVertices=new Array(e),null==p&&(p=t.Utils.newFloatArray(64)),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},o.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},o.prototype.apply=function(i,n,r,o,a,h,l){var u=i.slots[this.slotIndex],c=u.getAttachment();if(c instanceof t.VertexAttachment&&c.applyDeform(this.attachment)){var f=u.attachmentVertices;0==f.length&&(h=e.setup);var d=this.frameVertices,p=d[0].length,v=this.frames;if(r=v[v.length-1]){var w=d[v.length-1];if(1==a)if(h==e.add)if(null==(M=c).bones){g=M.vertices;for(var b=0;bi)this.apply(t,e,Number.MAX_VALUE,n,r,o,a),e=-1;else if(e>=h[l-1])return;if(!(i0&&h[u-1]==c;)u--;for(;u=h[u];u++)n.push(this.events[u])}}},e}();t.EventTimeline=M;var m=function(){function r(e){this.frames=t.Utils.newFloatArray(e),this.drawOrders=new Array(e)}return r.prototype.getPropertyId=function(){return n.drawOrder<<24},r.prototype.getFrameCount=function(){return this.frames.length},r.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},r.prototype.apply=function(n,r,o,a,h,l,u){var c=n.drawOrder,f=n.slots;if(u!=i.out||l!=e.setup){var d=this.frames;if(o=d[d.length-1]?d.length-1:s.binarySearch(d,o)-1;var v=this.drawOrders[p];if(null==v)t.Utils.arrayCopy(f,0,c,0,f.length);else for(var M=0,m=v.length;M=c[c.length-a.ENTRIES])l==e.setup?(f.mix=f.data.mix+(c[c.length+a.PREV_MIX]-f.data.mix)*h,u==i.out?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[c.length+a.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+a.PREV_COMPRESS],f.stretch=0!=c[c.length+a.PREV_STRETCH])):(f.mix+=(c[c.length+a.PREV_MIX]-f.mix)*h,u==i.in&&(f.bendDirection=c[c.length+a.PREV_BEND_DIRECTION],f.compress=0!=c[c.length+a.PREV_COMPRESS],f.stretch=0!=c[c.length+a.PREV_STRETCH]));else{var d=s.binarySearch(c,r,a.ENTRIES),p=c[d+a.PREV_MIX],v=c[d],M=this.getCurvePercent(d/a.ENTRIES-1,1-(r-v)/(c[d+a.PREV_TIME]-v));l==e.setup?(f.mix=f.data.mix+(p+(c[d+a.MIX]-p)*M-f.data.mix)*h,u==i.out?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=c[d+a.PREV_BEND_DIRECTION],f.compress=0!=c[d+a.PREV_COMPRESS],f.stretch=0!=c[d+a.PREV_STRETCH])):(f.mix+=(p+(c[d+a.MIX]-p)*M-f.mix)*h,u==i.in&&(f.bendDirection=c[d+a.PREV_BEND_DIRECTION],f.compress=0!=c[d+a.PREV_COMPRESS],f.stretch=0!=c[d+a.PREV_STRETCH]))}},a.ENTRIES=5,a.PREV_TIME=-5,a.PREV_MIX=-4,a.PREV_BEND_DIRECTION=-3,a.PREV_COMPRESS=-2,a.PREV_STRETCH=-1,a.MIX=1,a.BEND_DIRECTION=2,a.COMPRESS=3,a.STRETCH=4,a}(o);t.IkConstraintTimeline=g;var x=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},o.prototype.setFrame=function(t,e,i,n,r,s){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=i,this.frames[t+o.TRANSLATE]=n,this.frames[t+o.SCALE]=r,this.frames[t+o.SHEAR]=s},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.transformConstraints[this.transformConstraintIndex];if(n=u[u.length-o.ENTRIES]){var m=u.length;d=u[m+o.PREV_ROTATE],p=u[m+o.PREV_TRANSLATE],v=u[m+o.PREV_SCALE],M=u[m+o.PREV_SHEAR]}else{var g=s.binarySearch(u,n,o.ENTRIES);d=u[g+o.PREV_ROTATE],p=u[g+o.PREV_TRANSLATE],v=u[g+o.PREV_SCALE],M=u[g+o.PREV_SHEAR];var x=u[g],y=this.getCurvePercent(g/o.ENTRIES-1,1-(n-x)/(u[g+o.PREV_TIME]-x));d+=(u[g+o.ROTATE]-d)*y,p+=(u[g+o.TRANSLATE]-p)*y,v+=(u[g+o.SCALE]-v)*y,M+=(u[g+o.SHEAR]-M)*y}if(h==e.setup){f=c.data;c.rotateMix=f.rotateMix+(d-f.rotateMix)*a,c.translateMix=f.translateMix+(p-f.translateMix)*a,c.scaleMix=f.scaleMix+(v-f.scaleMix)*a,c.shearMix=f.shearMix+(M-f.shearMix)*a}else c.rotateMix+=(d-c.rotateMix)*a,c.translateMix+=(p-c.translateMix)*a,c.scaleMix+=(v-c.scaleMix)*a,c.shearMix+=(M-c.shearMix)*a}},o.ENTRIES=5,o.PREV_TIME=-5,o.PREV_ROTATE=-4,o.PREV_TRANSLATE=-3,o.PREV_SCALE=-2,o.PREV_SHEAR=-1,o.ROTATE=1,o.TRANSLATE=2,o.SCALE=3,o.SHEAR=4,o}(o);t.TransformConstraintTimeline=x;var y=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,i){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.VALUE]=i},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(n=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_VALUE];else{var d=s.binarySearch(u,n,o.ENTRIES);f=u[d+o.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/o.ENTRIES-1,1-(n-p)/(u[d+o.PREV_TIME]-p));f+=(u[d+o.VALUE]-f)*v}h==e.setup?c.position=c.data.position+(f-c.data.position)*a:c.position+=(f-c.position)*a}},o.ENTRIES=2,o.PREV_TIME=-2,o.PREV_VALUE=-1,o.VALUE=1,o}(o);t.PathConstraintPositionTimeline=y;var w=function(t){function i(e){return t.call(this,e)||this}return r(i,t),i.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},i.prototype.apply=function(t,n,r,o,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(r=u[u.length-i.ENTRIES])f=u[u.length+i.PREV_VALUE];else{var d=s.binarySearch(u,r,i.ENTRIES);f=u[d+i.PREV_VALUE];var p=u[d],v=this.getCurvePercent(d/i.ENTRIES-1,1-(r-p)/(u[d+i.PREV_TIME]-p));f+=(u[d+i.VALUE]-f)*v}h==e.setup?c.spacing=c.data.spacing+(f-c.data.spacing)*a:c.spacing+=(f-c.spacing)*a}},i}(y);t.PathConstraintSpacingTimeline=w;var b=function(i){function o(e){var n=i.call(this,e)||this;return n.frames=t.Utils.newFloatArray(e*o.ENTRIES),n}return r(o,i),o.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},o.prototype.setFrame=function(t,e,i,n){t*=o.ENTRIES,this.frames[t]=e,this.frames[t+o.ROTATE]=i,this.frames[t+o.TRANSLATE]=n},o.prototype.apply=function(t,i,n,r,a,h,l){var u=this.frames,c=t.pathConstraints[this.pathConstraintIndex];if(n=u[u.length-o.ENTRIES])f=u[u.length+o.PREV_ROTATE],d=u[u.length+o.PREV_TRANSLATE];else{var p=s.binarySearch(u,n,o.ENTRIES);f=u[p+o.PREV_ROTATE],d=u[p+o.PREV_TRANSLATE];var v=u[p],M=this.getCurvePercent(p/o.ENTRIES-1,1-(n-v)/(u[p+o.PREV_TIME]-v));f+=(u[p+o.ROTATE]-f)*M,d+=(u[p+o.TRANSLATE]-d)*M}h==e.setup?(c.rotateMix=c.data.rotateMix+(f-c.data.rotateMix)*a,c.translateMix=c.data.translateMix+(d-c.data.translateMix)*a):(c.rotateMix+=(f-c.rotateMix)*a,c.translateMix+=(d-c.translateMix)*a)}},o.ENTRIES=3,o.PREV_TIME=-3,o.PREV_ROTATE=-2,o.PREV_TRANSLATE=-1,o.ROTATE=1,o.TRANSLATE=2,o}(o);t.PathConstraintMixTimeline=b}(n||(n={})),function(t){var e=function(){function e(e){this.tracks=new Array,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new t.IntSet,this.animationsChanged=!1,this.timeScale=1,this.trackEntryPool=new t.Pool(function(){return new i}),this.data=e}return e.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i0){if(r.delay-=s,r.delay>0)continue;s=-r.delay,r.delay=0}var o=r.next;if(null!=o){var a=r.trackLast-o.delay;if(a>=0){for(o.delay=0,o.trackTime=0==r.timeScale?0:(a/r.timeScale+t)*o.timeScale,r.trackTime+=s,this.setCurrent(i,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[i]=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,null!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},e.prototype.updateMixingFrom=function(t,e){var i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,t.mixTime>0&&t.mixTime>=t.mixDuration?(0!=i.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=i.mixingFrom,null!=i.mixingFrom&&(i.mixingFrom.mixingTo=t),t.interruptAlpha=i.interruptAlpha,this.queue.end(i)),n):(i.trackTime+=e*i.timeScale,t.mixTime+=e,!1)},e.prototype.apply=function(i){if(null==i)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var n=this.events,r=this.tracks,s=!1,o=0,a=r.length;o0)){s=!0;var l=0==o?t.MixBlend.first:h.mixBlend,u=h.alpha;null!=h.mixingFrom?u*=this.applyMixingFrom(h,i,l):h.trackTime>=h.trackEnd&&null==h.next&&(u=0);var c=h.animationLast,f=h.getAnimationTime(),d=h.animation.timelines.length,p=h.animation.timelines;if(0==o&&1==u||l==t.MixBlend.add)for(var v=0;v1&&(o=1),r!=t.MixBlend.first&&(r=s.mixBlend));var a=o0&&this.queueEvents(s,c),this.events.length=0,s.nextAnimationLast=c,s.nextTrackLast=s.trackTime,o},e.prototype.applyRotateTimeline=function(e,i,n,r,s,o,a,h){if(h&&(o[a]=0),1!=r){var l=e,u=l.frames,c=i.bones[l.boneIndex],f=0,d=0;if(n=u[u.length-t.RotateTimeline.ENTRIES])d=c.data.rotation+u[u.length+t.RotateTimeline.PREV_ROTATION];else{var p=t.Animation.binarySearch(u,n,t.RotateTimeline.ENTRIES),v=u[p+t.RotateTimeline.PREV_ROTATION],M=u[p],m=l.getCurvePercent((p>>1)-1,1-(n-M)/(u[p+t.RotateTimeline.PREV_TIME]-M));d=u[p+t.RotateTimeline.ROTATION]-v,d=v+(d-=360*(16384-(16384.499999999996-d/360|0)))*m+c.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0))}var g=0,x=d-f;if(0==(x-=360*(16384-(16384.499999999996-x/360|0))))g=o[a];else{var y=0,w=0;h?(y=0,w=x):(y=o[a],w=o[a+1]);var b=x>0,A=y>=0;t.MathUtils.signum(w)!=t.MathUtils.signum(x)&&Math.abs(w)<=90&&(Math.abs(y)>180&&(y+=360*t.MathUtils.signum(y)),A=b),g=x+y-y%360,A!=b&&(g+=360*t.MathUtils.signum(y)),o[a]=g}o[a+1]=x,f+=g*r,c.rotation=f-360*(16384-(16384.499999999996-f/360|0))}else e.apply(i,0,n,null,1,s,t.MixDirection.in)},e.prototype.queueEvents=function(t,e){for(var i=t.animationStart,n=t.animationEnd,r=n-i,s=t.trackLast%r,o=this.events,a=0,h=o.length;an||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:e>=n&&t.animationLast=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var i=e;;){var n=i.mixingFrom;if(null==n)break;this.queue.end(n),i.mixingFrom=null,i.mixingTo=null,i=n}this.tracks[e.trackIndex]=null,this.queue.drain()}}},e.prototype.setCurrent=function(t,e,i){var n=this.expandToIndex(t);this.tracks[t]=e,null!=n&&(i&&this.queue.interrupt(n),e.mixingFrom=n,n.mixingTo=e,e.mixTime=0,null!=n.mixingFrom&&n.mixDuration>0&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},e.prototype.setAnimation=function(t,e,i){var n=this.data.skeletonData.findAnimation(e);if(null==n)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,n,i)},e.prototype.setAnimationWith=function(t,e,i){if(null==e)throw new Error("animation cannot be null.");var n=!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,n=!1):this.disposeNext(r));var s=this.trackEntry(t,e,i,r);return this.setCurrent(t,s,n),this.queue.drain(),s},e.prototype.addAnimation=function(t,e,i,n){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,i,n)},e.prototype.addAnimationWith=function(t,e,i,n){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=this.trackEntry(t,e,i,r);if(null==r)this.setCurrent(t,s,!0),this.queue.drain();else if(r.next=s,n<=0){var o=r.animationEnd-r.animationStart;0!=o?(r.loop?n+=o*(1+(r.trackTime/o|0)):n+=Math.max(o,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime}return s.delay=n,s},e.prototype.setEmptyAnimation=function(t,i){var n=this.setAnimationWith(t,e.emptyAnimation,!1);return n.mixDuration=i,n.trackEnd=i,n},e.prototype.addEmptyAnimation=function(t,i,n){n<=0&&(n-=i);var r=this.addAnimationWith(t,e.emptyAnimation,!1,n);return r.mixDuration=i,r.trackEnd=i,r},e.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i0){o[l]=e.HOLD_MIX,a[l]=c;continue t}break}o[l]=e.HOLD}else o[l]=e.FIRST;else o[l]=e.SUBSEQUENT}},e.prototype.hasTimeline=function(t,e){for(var i=t.animation.timelines,n=0,r=i.length;n=this.tracks.length?null:this.tracks[t]},e.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},e.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);e>=0&&this.listeners.splice(e,1)},e.prototype.clearListeners=function(){this.listeners.length=0},e.prototype.clearListenerNotifications=function(){this.queue.clear()},e.emptyAnimation=new t.Animation("",[],0),e.SUBSEQUENT=0,e.FIRST=1,e.HOLD=2,e.HOLD_MIX=3,e}();t.AnimationState=e;var i=function(){function e(){this.mixBlend=t.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}return e.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},e.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},e.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},e.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},e.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},e}();t.TrackEntry=i;var n,r=function(){function t(t){this.objects=[],this.drainDisabled=!1,this.animState=t}return t.prototype.start=function(t){this.objects.push(n.start),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.interrupt=function(t){this.objects.push(n.interrupt),this.objects.push(t)},t.prototype.end=function(t){this.objects.push(n.end),this.objects.push(t),this.animState.animationsChanged=!0},t.prototype.dispose=function(t){this.objects.push(n.dispose),this.objects.push(t)},t.prototype.complete=function(t){this.objects.push(n.complete),this.objects.push(t)},t.prototype.event=function(t,e){this.objects.push(n.event),this.objects.push(t),this.objects.push(e)},t.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;i=0?i.substring(0,i.lastIndexOf("/")):"";i=this.pathPrefix+i,this.toLoad++,e.downloadText(i,function(e){var a={count:0},h=new Array;try{new t.TextureAtlas(e,function(e){h.push(o+"/"+e);var i=document.createElement("img");return i.width=16,i.height=16,new t.FakeTexture(i)})}catch(t){var l=t;return s.errors[i]="Couldn't load texture atlas "+i+": "+l.message,r&&r(i,"Couldn't load texture atlas "+i+": "+l.message),s.toLoad--,void s.loaded++}for(var u=function(l){var u=!1;s.loadTexture(l,function(l,c){if(a.count++,a.count==h.length)if(u)s.errors[i]="Couldn't load texture atlas page "+l+"} of atlas "+i,r&&r(i,"Couldn't load texture atlas page "+l+" of atlas "+i),s.toLoad--,s.loaded++;else try{var f=new t.TextureAtlas(e,function(t){return s.get(o+"/"+t)});s.assets[i]=f,n&&n(i,f),s.toLoad--,s.loaded++}catch(t){var d=t;s.errors[i]="Couldn't load texture atlas "+i+": "+d.message,r&&r(i,"Couldn't load texture atlas "+i+": "+d.message),s.toLoad--,s.loaded++}},function(t,e){u=!0,a.count++,a.count==h.length&&(s.errors[i]="Couldn't load texture atlas page "+t+"} of atlas "+i,r&&r(i,"Couldn't load texture atlas page "+t+" of atlas "+i),s.toLoad--,s.loaded++)})},c=0,f=h;c0},e.prototype.getErrors=function(){return this.errors},e}();t.AssetManager=e}(n||(n={})),function(t){var e=function(){function e(t){this.atlas=t}return e.prototype.newRegionAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (region attachment: "+i+")");r.renderObject=r;var s=new t.RegionAttachment(i);return s.setRegion(r),s},e.prototype.newMeshAttachment=function(e,i,n){var r=this.atlas.findRegion(n);if(null==r)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+i+")");r.renderObject=r;var s=new t.MeshAttachment(i);return s.region=r,s},e.prototype.newBoundingBoxAttachment=function(e,i){return new t.BoundingBoxAttachment(i)},e.prototype.newPathAttachment=function(e,i){return new t.PathAttachment(i)},e.prototype.newPointAttachment=function(e,i){return new t.PointAttachment(i)},e.prototype.newClippingAttachment=function(e,i){return new t.ClippingAttachment(i)},e}();t.AtlasAttachmentLoader=e}(n||(n={})),function(t){!function(t){t[t.Normal=0]="Normal",t[t.Additive=1]="Additive",t[t.Multiply=2]="Multiply",t[t.Screen=3]="Screen"}(t.BlendMode||(t.BlendMode={}))}(n||(n={})),function(t){var e=function(){function e(t,e,i){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.worldX=0,this.c=0,this.d=0,this.worldY=0,this.sorted=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}return e.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},e.prototype.updateWorldTransformWith=function(e,i,n,r,s,o,a){this.ax=e,this.ay=i,this.arotation=n,this.ascaleX=r,this.ascaleY=s,this.ashearX=o,this.ashearY=a,this.appliedValid=!0;var h=this.parent;if(null==h){var l=this.skeleton,u=n+90+a,c=l.scaleX,f=l.scaleY;return this.a=t.MathUtils.cosDeg(n+o)*r*c,this.b=t.MathUtils.cosDeg(u)*s*c,this.c=t.MathUtils.sinDeg(n+o)*r*f,this.d=t.MathUtils.sinDeg(u)*s*f,this.worldX=e*c+l.x,void(this.worldY=i*f+l.y)}var d=h.a,p=h.b,v=h.c,M=h.d;switch(this.worldX=d*e+p*i+h.worldX,this.worldY=v*e+M*i+h.worldY,this.data.transformMode){case t.TransformMode.Normal:u=n+90+a;var m=t.MathUtils.cosDeg(n+o)*r,g=t.MathUtils.cosDeg(u)*s,x=t.MathUtils.sinDeg(n+o)*r,y=t.MathUtils.sinDeg(u)*s;return this.a=d*m+p*x,this.b=d*g+p*y,this.c=v*m+M*x,void(this.d=v*g+M*y);case t.TransformMode.OnlyTranslation:u=n+90+a;this.a=t.MathUtils.cosDeg(n+o)*r,this.b=t.MathUtils.cosDeg(u)*s,this.c=t.MathUtils.sinDeg(n+o)*r,this.d=t.MathUtils.sinDeg(u)*s;break;case t.TransformMode.NoRotationOrReflection:var w=0;(E=d*d+v*v)>1e-4?(p=v*(E=Math.abs(d*M-p*v)/E),M=d*E,w=Math.atan2(v,d)*t.MathUtils.radDeg):(d=0,v=0,w=90-Math.atan2(M,p)*t.MathUtils.radDeg);var b=n+o-w,A=n+a-w+90;m=t.MathUtils.cosDeg(b)*r,g=t.MathUtils.cosDeg(A)*s,x=t.MathUtils.sinDeg(b)*r,y=t.MathUtils.sinDeg(A)*s;this.a=d*m-p*x,this.b=d*g-p*y,this.c=v*m+M*x,this.d=v*g+M*y;break;case t.TransformMode.NoScale:case t.TransformMode.NoScaleOrReflection:var E,R=t.MathUtils.cosDeg(n),T=t.MathUtils.sinDeg(n),I=(d*R+p*T)/this.skeleton.scaleX,S=(v*R+M*T)/this.skeleton.scaleY;(E=Math.sqrt(I*I+S*S))>1e-5&&(E=1/E),I*=E,S*=E,E=Math.sqrt(I*I+S*S),this.data.transformMode==t.TransformMode.NoScale&&d*M-p*v<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(E=-E);var C=Math.PI/2+Math.atan2(S,I),P=Math.cos(C)*E,L=Math.sin(C)*E;m=t.MathUtils.cosDeg(o)*r,g=t.MathUtils.cosDeg(90+a)*s,x=t.MathUtils.sinDeg(o)*r,y=t.MathUtils.sinDeg(90+a)*s;this.a=I*m+P*x,this.b=I*g+P*y,this.c=S*m+L*x,this.d=S*g+L*y}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},e.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},e.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*t.MathUtils.radDeg},e.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*t.MathUtils.radDeg},e.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},e.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},e.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var e=this.parent;if(null==e)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*t.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*t.MathUtils.radDeg);var i=e.a,n=e.b,r=e.c,s=e.d,o=1/(i*s-n*r),a=this.worldX-e.worldX,h=this.worldY-e.worldY;this.ax=a*s*o-h*n*o,this.ay=h*i*o-a*r*o;var l=o*s,u=o*i,c=o*n,f=o*r,d=l*this.a-c*this.c,p=l*this.b-c*this.d,v=u*this.c-f*this.a,M=u*this.d-f*this.b;if(this.ashearX=0,this.ascaleX=Math.sqrt(d*d+v*v),this.ascaleX>1e-4){var m=d*M-p*v;this.ascaleY=m/this.ascaleX,this.ashearY=Math.atan2(d*p+v*M,m)*t.MathUtils.radDeg,this.arotation=Math.atan2(v,d)*t.MathUtils.radDeg}else this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+M*M),this.ashearY=0,this.arotation=90-Math.atan2(M,p)*t.MathUtils.radDeg},e.prototype.worldToLocal=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=1/(e*r-i*n),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*i*s,t.y=a*e*s-o*n*s,t},e.prototype.localToWorld=function(t){var e=t.x,i=t.y;return t.x=e*this.a+i*this.b+this.worldX,t.y=e*this.c+i*this.d+this.worldY,t},e.prototype.worldToLocalRotation=function(e){var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(this.a*i-this.c*n,this.d*n-this.b*i)*t.MathUtils.radDeg+this.rotation-this.shearX},e.prototype.localToWorldRotation=function(e){e-=this.rotation-this.shearX;var i=t.MathUtils.sinDeg(e),n=t.MathUtils.cosDeg(e);return Math.atan2(n*this.c+i*this.d,n*this.a+i*this.b)*t.MathUtils.radDeg},e.prototype.rotateWorld=function(e){var i=this.a,n=this.b,r=this.c,s=this.d,o=t.MathUtils.cosDeg(e),a=t.MathUtils.sinDeg(e);this.a=o*i-a*r,this.b=o*n-a*s,this.c=a*i+o*r,this.d=a*n+o*s,this.appliedValid=!1},e}();t.Bone=e}(n||(n={})),function(t){var e,i=function(){return function(t,i,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=e.Normal,t<0)throw new Error("index must be >= 0.");if(null==i)throw new Error("name cannot be null.");this.index=t,this.name=i,this.parent=n}}();t.BoneData=i,function(t){t[t.Normal=0]="Normal",t[t.OnlyTranslation=1]="OnlyTranslation",t[t.NoRotationOrReflection=2]="NoRotationOrReflection",t[t.NoScale=3]="NoScale",t[t.NoScaleOrReflection=4]="NoScaleOrReflection"}(e=t.TransformMode||(t.TransformMode={}))}(n||(n={})),function(t){var e=function(){return function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e}}();t.Event=e}(n||(n={})),function(t){var e=function(){return function(t){this.name=t}}();t.EventData=e}(n||(n={})),function(t){var e=function(){function e(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i180?p-=360:p<-180&&(p+=360);var v=e.ascaleX,M=e.ascaleY;if(r||s){var m=e.data.length*v,g=Math.sqrt(f*f+d*d);if(r&&gm&&m>1e-4){var x=(g/m-1)*a+1;v*=x,o&&(M*=x)}}e.updateWorldTransformWith(e.ax,e.ay,e.arotation+p*a,v,M,e.ashearX,e.ashearY)},e.prototype.apply2=function(e,i,n,r,s,o,a){if(0!=a){e.appliedValid||e.updateAppliedTransform(),i.appliedValid||i.updateAppliedTransform();var h=e.ax,l=e.ay,u=e.ascaleX,c=u,f=e.ascaleY,d=i.ascaleX,p=0,v=0,M=0;u<0?(u=-u,p=180,M=-1):(p=0,M=1),f<0&&(f=-f,M=-M),d<0?(d=-d,v=180):v=0;var m=i.ax,g=0,x=0,y=0,w=e.a,b=e.b,A=e.c,E=e.d,R=Math.abs(u-f)<=1e-4;R?(x=w*m+b*(g=i.ay)+e.worldX,y=A*m+E*g+e.worldY):(g=0,x=w*m+e.worldX,y=A*m+e.worldY);var T=e.parent;w=T.a,b=T.b,A=T.c;var I=1/(w*(E=T.d)-b*A),S=n-T.worldX,C=r-T.worldY,P=(S*E-C*b)*I-h,L=(C*w-S*A)*I-l,O=P*P+L*L,D=((S=x-T.worldX)*E-(C=y-T.worldY)*b)*I-h,k=(C*w-S*A)*I-l,Y=Math.sqrt(D*D+k*k),V=i.data.length*d,N=0,F=0;t:if(R){var z=(O-Y*Y-(V*=u)*V)/(2*Y*V);z<-1?z=-1:z>1&&(z=1,o&&Y+V>1e-4&&(c*=(Math.sqrt(O)/(Y+V)-1)*a+1)),F=Math.acos(z)*s,w=Y+V*z,b=V*Math.sin(F),N=Math.atan2(L*w-P*b,P*w+L*b)}else{var U=(w=u*V)*w,X=(b=f*V)*b,B=Math.atan2(L,P),_=-2*X*Y,G=X-U;if((E=_*_-4*G*(A=X*Y*Y+U*O-U*X))>=0){var W=Math.sqrt(E);_<0&&(W=-W);var Z=(W=-(_+W)/2)/G,j=A/W,H=Math.abs(Z)=-1&&A<=1&&(A=Math.acos(A),(E=(S=w*Math.cos(A)+Y)*S+(C=b*Math.sin(A))*C)et&&($=A,et=E,tt=S,it=C)),O<=(Q+et)/2?(N=B-Math.atan2(K*s,J),F=q*s):(N=B-Math.atan2(it*s,tt),F=$*s)}var nt=Math.atan2(g,m)*M,rt=e.arotation;(N=(N-nt)*t.MathUtils.radDeg+p-rt)>180?N-=360:N<-180&&(N+=360),e.updateWorldTransformWith(h,l,rt+N*a,c,e.ascaleY,0,0),rt=i.arotation,(F=((F+nt)*t.MathUtils.radDeg-i.ashearX)*M+v-rt)>180?F-=360:F<-180&&(F+=360),i.updateWorldTransformWith(m,g,rt+F*a,i.ascaleX,i.ascaleY,i.ashearX,i.ashearY)}else i.updateWorldTransform()},e}();t.IkConstraint=e}(n||(n={})),function(t){var e=function(){return function(t){this.order=0,this.bones=new Array,this.bendDirection=1,this.compress=!1,this.stretch=!1,this.uniform=!1,this.mix=1,this.name=t}}();t.IkConstraintData=e}(n||(n={})),function(t){var e=function(){function e(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var i=0,n=t.bones.length;i0;if(r>0||s){var o=this.data,a=o.spacingMode==t.SpacingMode.Percent,h=o.rotateMode,l=h==t.RotateMode.Tangent,u=h==t.RotateMode.ChainScale,c=this.bones.length,f=l?c:c+1,d=this.bones,p=t.Utils.setArraySize(this.spaces,f),v=null,M=this.spacing;if(u||!a){u&&(v=t.Utils.setArraySize(this.lengths,c));for(var m=o.spacingMode==t.SpacingMode.Length,g=0,x=f-1;g0?t.MathUtils.degRad:-t.MathUtils.degRad;g=0;for(var P=3;gt.MathUtils.PI?U-=t.MathUtils.PI2:U<-t.MathUtils.PI&&(U+=t.MathUtils.PI2),U*=n,X=Math.cos(U),B=Math.sin(U),L.a=X*V-B*F,L.b=X*N-B*z,L.c=B*V+X*F,L.d=B*N+X*z}L.appliedValid=!1}}}},e.prototype.computeWorldPositions=function(i,n,r,s,o){var a=this.target,h=this.position,l=this.spaces,u=t.Utils.setArraySize(this.positions,3*n+2),c=null,f=i.closed,d=i.worldVerticesLength,p=d/6,v=e.NONE;if(!i.constantSpeed){var M=i.lengths,m=M[p-=f?1:2];if(s&&(h*=m),o)for(var g=1;gm){v!=e.AFTER&&(v=e.AFTER,i.computeWorldVertices(a,d-6,4,c,0,2)),this.addAfterPosition(w-m,c,0,u,x);continue}}for(;;y++){var b=M[y];if(!(w>b)){if(0==y)w/=b;else w=(w-(q=M[y-1]))/(b-q);break}}y!=v&&(v=y,f&&y==p?(i.computeWorldVertices(a,d-4,4,c,0,2),i.computeWorldVertices(a,0,4,c,4,2)):i.computeWorldVertices(a,6*y+2,8,c,0,2)),this.addCurvePosition(w,c[0],c[1],c[2],c[3],c[4],c[5],c[6],c[7],u,x,r||g>0&&0==W)}return u}f?(d+=2,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(a,2,d-4,c,0,2),i.computeWorldVertices(a,0,2,c,d-4,2),c[d-2]=c[0],c[d-1]=c[1]):(p--,d-=4,c=t.Utils.setArraySize(this.world,d),i.computeWorldVertices(a,2,d,c,0,2));for(var A=t.Utils.setArraySize(this.curves,p),E=0,R=c[0],T=c[1],I=0,S=0,C=0,P=0,L=0,O=0,D=0,k=0,Y=0,V=0,N=0,F=0,z=0,U=0,X=(g=0,2);gE){this.addAfterPosition(w-E,c,d-4,u,x);continue}}for(;;y++){var Z=A[y];if(!(w>Z)){if(0==y)w/=Z;else w=(w-(q=A[y-1]))/(Z-q);break}}if(y!=v){v=y;var j=6*y;for(R=c[j],T=c[j+1],I=c[j+2],S=c[j+3],C=c[j+4],P=c[j+5],L=c[j+6],O=c[j+7],N=2*(D=.03*(R-2*I+C))+(Y=.006*(3*(I-C)-R+L)),F=2*(k=.03*(T-2*S+P))+(V=.006*(3*(S-P)-T+O)),z=.3*(I-R)+D+.16666667*Y,U=.3*(S-T)+k+.16666667*V,_=Math.sqrt(z*z+U*U),B[0]=_,j=1;j<8;j++)z+=N,U+=F,N+=Y,F+=V,_+=Math.sqrt(z*z+U*U),B[j]=_;z+=N,U+=F,_+=Math.sqrt(z*z+U*U),B[8]=_,z+=N+Y,U+=F+V,_+=Math.sqrt(z*z+U*U),B[9]=_,G=0}for(w*=_;;G++){var H=B[G];if(!(w>H)){var q;if(0==G)w/=H;else w=G+(w-(q=B[G-1]))/(H-q);break}}this.addCurvePosition(.1*w,R,T,I,S,C,P,L,O,u,x,r||g>0&&0==W)}return u},e.prototype.addBeforePosition=function(t,e,i,n,r){var s=e[i],o=e[i+1],a=e[i+2]-s,h=e[i+3]-o,l=Math.atan2(h,a);n[r]=s+t*Math.cos(l),n[r+1]=o+t*Math.sin(l),n[r+2]=l},e.prototype.addAfterPosition=function(t,e,i,n,r){var s=e[i+2],o=e[i+3],a=s-e[i],h=o-e[i+1],l=Math.atan2(h,a);n[r]=s+t*Math.cos(l),n[r+1]=o+t*Math.sin(l),n[r+2]=l},e.prototype.addCurvePosition=function(t,e,i,n,r,s,o,a,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=i,void(l[u+2]=Math.atan2(r-i,n-e));var f=t*t,d=f*t,p=1-t,v=p*p,M=v*p,m=p*t,g=3*m,x=p*g,y=g*t,w=e*M+n*x+s*y+a*d,b=i*M+r*x+o*y+h*d;l[u]=w,l[u+1]=b,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(b-(i*v+r*m*2+o*f),w-(e*v+n*m*2+s*f)))},e.prototype.getOrder=function(){return this.data.order},e.NONE=-1,e.BEFORE=-2,e.AFTER=-3,e.epsilon=1e-5,e}();t.PathConstraint=e}(n||(n={})),function(t){var e=function(){return function(t){this.order=0,this.bones=new Array,this.name=t}}();t.PathConstraintData=e,function(t){t[t.Fixed=0]="Fixed",t[t.Percent=1]="Percent"}(t.PositionMode||(t.PositionMode={})),function(t){t[t.Length=0]="Length",t[t.Fixed=1]="Fixed",t[t.Percent=2]="Percent"}(t.SpacingMode||(t.SpacingMode={})),function(t){t[t.Tangent=0]="Tangent",t[t.Chain=1]="Chain",t[t.ChainScale=2]="ChainScale"}(t.RotateMode||(t.RotateMode={}))}(n||(n={})),function(t){var e=function(){function t(t){this.toLoad=new Array,this.assets={},this.clientId=t}return t.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},t}(),i=function(){function t(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}return t.prototype.queueAsset=function(t,i,n){var r=this.clientAssets[t];return null!==r&&void 0!==r||(r=new e(t),this.clientAssets[t]=r),null!==i&&(r.textureLoader=i),r.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},t.prototype.loadText=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&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()}},t.prototype.loadJson=function(t,e){var i=this;if(e=this.pathPrefix+e,this.queueAsset(t,null,e)){var n=new XMLHttpRequest;n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(n.status>=200&&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()}},t.prototype.loadTexture=function(t,e,i){var n=this;if(i=this.pathPrefix+i,this.queueAsset(t,e,i)){var r=new Image;r.src=i,r.crossOrigin="anonymous",r.onload=function(t){n.rawAssets[i]=r},r.onerror=function(t){n.errors[i]="Couldn't load image "+i}}},t.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null===i||void 0===i||i.assets[e]},t.prototype.updateClientAssets=function(t){for(var e=0;e0},t.prototype.getErrors=function(){return this.errors},t}();t.SharedAssetManager=i}(n||(n={})),function(t){var e=function(){function e(e){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==e)throw new Error("data cannot be null.");this.data=e,this.bones=new Array;for(var i=0;i1){var r=i[i.length-1];this._updateCache.indexOf(r)>-1||this.updateCacheReset.push(r)}this._updateCache.push(t),this.sortReset(n.children),i[i.length-1].sorted=!0},e.prototype.sortPathConstraint=function(e){var i=e.target,n=i.data.index,r=i.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,r),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,r);for(var s=0,o=this.data.skins.length;s-1||this.updateCacheReset.push(r)}else for(n=0;n=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},e.prototype.aabbIntersectsSegment=function(t,e,i,n){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&i<=r||e<=s&&n<=s||t>=o&&i>=o||e>=a&&n>=a)return!1;var h=(n-e)/(i-t),l=h*(r-t)+e;if(l>s&&ls&&lr&&ur&&ut.minX&&this.minYt.minY},e.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n=i||l=i){var u=n[a];u+(i-h)/(l-h)*(n[s]-u)=u&&x<=d||x>=d&&x<=u)&&(x>=e&&x<=n||x>=n&&x<=e)){var y=(l*m-h*v)/g;if((y>=c&&y<=p||y>=p&&y<=c)&&(y>=i&&y<=r||y>=r&&y<=i))return!0}u=d,c=p}return!1},e.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},e.prototype.getWidth=function(){return this.maxX-this.minX},e.prototype.getHeight=function(){return this.maxY-this.minY},e}();t.SkeletonBounds=e}(n||(n={})),function(t){var e=function(){function e(){this.triangulator=new t.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}return e.prototype.clipStart=function(i,n){if(null!=this.clipAttachment)return 0;this.clipAttachment=n;var r=n.worldVerticesLength,s=t.Utils.setArraySize(this.clippingPolygon,r);n.computeWorldVertices(i,0,r,s,0,2);var o=this.clippingPolygon;e.makeClockwise(o);for(var a=this.clippingPolygons=this.triangulator.decompose(o,this.triangulator.triangulate(o)),h=0,l=a.length;h>1,z=this.clipOutput,U=t.Utils.setArraySize(u,L+F*p),X=0;X=2?(u=a,a=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(i),u.push(n),u.push(r),u.push(s),u.push(t),u.push(e),a.length=0;for(var c=o,f=o.length-4,d=0;;d+=2){for(var p=c[d],v=c[d+1],M=c[d+2],m=c[d+3],g=p-M,x=v-m,y=u,w=u.length-2,b=a.length,A=0;A0;if(g*(R-m)-x*(E-M)>0){if(S){a.push(T),a.push(I);continue}var C=(L=I-R)*(M-p)-(O=T-E)*(m-v);if(Math.abs(C)>1e-6){var P=(O*(v-R)-L*(p-E))/C;a.push(p+(M-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v)}else if(S){var L,O;C=(L=I-R)*(M-p)-(O=T-E)*(m-v);if(Math.abs(C)>1e-6){P=(O*(v-R)-L*(p-E))/C;a.push(p+(M-p)*P),a.push(v+(m-v)*P)}else a.push(p),a.push(v);a.push(T),a.push(I)}l=!0}if(b==a.length)return h.length=0,!0;if(a.push(a[0]),a.push(a[1]),d==f)break;var D=a;(a=u).length=0,u=D}if(h!=a){h.length=0;d=0;for(var k=a.length-2;d>1;a=0;f--)-1==G[f]&&(G[f]=Z[--H])}y.setFrame(c++,_.time,G)}s.push(y),o=Math.max(o,y.frames[y.getFrameCount()-1])}if(e.events){for(y=new t.EventTimeline(e.events.length),c=0,f=0;f=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},t.prototype.getAttachment=function(t,e){var i=this.attachments[t];return i?i[e]:null},t.prototype.attachAll=function(t,e){for(var i=0,n=0;n= 0.");if(null==i)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=e,this.name=i,this.boneData=n}}();t.SlotData=e}(n||(n={})),function(t){var e,i,n=function(){function t(t){this._image=t}return t.prototype.getImage=function(){return this._image},t.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},t.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},t}();t.Texture=n,function(t){t[t.Nearest=9728]="Nearest",t[t.Linear=9729]="Linear",t[t.MipMap=9987]="MipMap",t[t.MipMapNearestNearest=9984]="MipMapNearestNearest",t[t.MipMapLinearNearest=9985]="MipMapLinearNearest",t[t.MipMapNearestLinear=9986]="MipMapNearestLinear",t[t.MipMapLinearLinear=9987]="MipMapLinearLinear"}(e=t.TextureFilter||(t.TextureFilter={})),function(t){t[t.MirroredRepeat=33648]="MirroredRepeat",t[t.ClampToEdge=33071]="ClampToEdge",t[t.Repeat=10497]="Repeat"}(i=t.TextureWrap||(t.TextureWrap={}));var s=function(){return function(){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=s;var o=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e.prototype.setFilters=function(t,e){},e.prototype.setWraps=function(t,e){},e.prototype.dispose=function(){},e}(n);t.FakeTexture=o}(n||(n={})),function(t){var e=function(){function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}return e.prototype.load=function(e,r){if(null==r)throw new Error("textureLoader cannot be null.");for(var o=new i(e),a=new Array(4),h=null;;){var l=o.readLine();if(null==l)break;if(0==(l=l.trim()).length)h=null;else if(h){var u=new s;u.name=l,u.page=h,u.rotate="true"==o.readValue(),o.readTuple(a);var c=parseInt(a[0]),f=parseInt(a[1]);o.readTuple(a);var d=parseInt(a[0]),p=parseInt(a[1]);u.u=c/h.width,u.v=f/h.height,u.rotate?(u.u2=(c+p)/h.width,u.v2=(f+d)/h.height):(u.u2=(c+d)/h.width,u.v2=(f+p)/h.height),u.x=c,u.y=f,u.width=Math.abs(d),u.height=Math.abs(p),4==o.readTuple(a)&&4==o.readTuple(a)&&o.readTuple(a),u.originalWidth=parseInt(a[0]),u.originalHeight=parseInt(a[1]),o.readTuple(a),u.offsetX=parseInt(a[0]),u.offsetY=parseInt(a[1]),u.index=parseInt(o.readValue()),u.texture=h.texture,this.regions.push(u)}else{(h=new n).name=l,2==o.readTuple(a)&&(h.width=parseInt(a[0]),h.height=parseInt(a[1]),o.readTuple(a)),o.readTuple(a),h.minFilter=t.Texture.filterFromString(a[0]),h.magFilter=t.Texture.filterFromString(a[1]);var v=o.readValue();h.uWrap=t.TextureWrap.ClampToEdge,h.vWrap=t.TextureWrap.ClampToEdge,"x"==v?h.uWrap=t.TextureWrap.Repeat:"y"==v?h.vWrap=t.TextureWrap.Repeat:"xy"==v&&(h.uWrap=h.vWrap=t.TextureWrap.Repeat),h.texture=r(l),h.texture.setFilters(h.minFilter,h.magFilter),h.texture.setWraps(h.uWrap,h.vWrap),h.width=h.texture.getImage().width,h.height=h.texture.getImage().height,this.pages.push(h)}}},e.prototype.findRegion=function(t){for(var e=0;e=this.lines.length?null:this.lines[this.index++]},t.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},t.prototype.readTuple=function(t){var e=this.readLine(),i=e.indexOf(":");if(-1==i)throw new Error("Invalid line: "+e);for(var n=0,r=i+1;n<3;n++){var s=e.indexOf(",",r);if(-1==s)break;t[n]=e.substr(r,s-r).trim(),r=s+1}return t[n]=e.substring(r).trim(),n+1},t}(),n=function(){return function(){}}();t.TextureAtlasPage=n;var s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r(e,t),e}(t.TextureRegion);t.TextureAtlasRegion=s}(n||(n={})),function(t){var e=function(){function e(e,i){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new t.Vector2,null==e)throw new Error("data cannot be null.");if(null==i)throw new Error("skeleton cannot be null.");this.data=e,this.rotateMix=e.rotateMix,this.translateMix=e.translateMix,this.scaleMix=e.scaleMix,this.shearMix=e.shearMix,this.bones=new Array;for(var n=0;n0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2),I*=e;var b=Math.cos(I),A=Math.sin(I);M.a=b*g-A*y,M.b=b*x-A*w,M.c=A*g+b*y,M.d=A*x+b*w,m=!0}if(0!=i){var E=this.temp;s.localToWorld(E.set(this.data.offsetX,this.data.offsetY)),M.worldX+=(E.x-M.worldX)*i,M.worldY+=(E.y-M.worldY)*i,m=!0}if(n>0){var R=Math.sqrt(M.a*M.a+M.c*M.c),T=Math.sqrt(o*o+h*h);R>1e-5&&(R=(R+(T-R+this.data.offsetScaleX)*n)/R),M.a*=R,M.c*=R,R=Math.sqrt(M.b*M.b+M.d*M.d),T=Math.sqrt(a*a+l*l),R>1e-5&&(R=(R+(T-R+this.data.offsetScaleY)*n)/R),M.b*=R,M.d*=R,m=!0}if(r>0){x=M.b,w=M.d;var I,S=Math.atan2(w,x);(I=Math.atan2(l,a)-Math.atan2(h,o)-(S-Math.atan2(M.c,M.a)))>t.MathUtils.PI?I-=t.MathUtils.PI2:I<-t.MathUtils.PI&&(I+=t.MathUtils.PI2),I=S+(I+f)*r;R=Math.sqrt(x*x+w*w);M.b=Math.cos(I)*R,M.d=Math.sin(I)*R,m=!0}m&&(M.appliedValid=!1)}},e.prototype.applyRelativeWorld=function(){for(var e=this.rotateMix,i=this.translateMix,n=this.scaleMix,r=this.shearMix,s=this.target,o=s.a,a=s.b,h=s.c,l=s.d,u=o*l-a*h>0?t.MathUtils.degRad:-t.MathUtils.degRad,c=this.data.offsetRotation*u,f=this.data.offsetShearY*u,d=this.bones,p=0,v=d.length;pt.MathUtils.PI?T-=t.MathUtils.PI2:T<-t.MathUtils.PI&&(T+=t.MathUtils.PI2),T*=e;var b=Math.cos(T),A=Math.sin(T);M.a=b*g-A*y,M.b=b*x-A*w,M.c=A*g+b*y,M.d=A*x+b*w,m=!0}if(0!=i){var E=this.temp;s.localToWorld(E.set(this.data.offsetX,this.data.offsetY)),M.worldX+=E.x*i,M.worldY+=E.y*i,m=!0}if(n>0){var R=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleX)*n+1;M.a*=R,M.c*=R,R=(Math.sqrt(a*a+l*l)-1+this.data.offsetScaleY)*n+1,M.b*=R,M.d*=R,m=!0}if(r>0){var T;(T=Math.atan2(l,a)-Math.atan2(h,o))>t.MathUtils.PI?T-=t.MathUtils.PI2:T<-t.MathUtils.PI&&(T+=t.MathUtils.PI2);x=M.b,w=M.d;T=Math.atan2(w,x)+(T-t.MathUtils.PI/2+f)*r;R=Math.sqrt(x*x+w*w);M.b=Math.cos(T)*R,M.d=Math.sin(T)*R,m=!0}m&&(M.appliedValid=!1)}},e.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o1e-5&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*i)/d),p>1e-5&&(p=(p+(r.ascaleY-p+this.data.offsetScaleY)*i)/p));var v=h.ashearY;if(0!=n){u=r.ashearY-v+this.data.offsetShearY;u-=360*(16384-(16384.499999999996-u/360|0)),h.shearY+=u*n}h.updateWorldTransformWith(c,f,l,d,p,h.ashearX,v)}},e.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,o=0,a=s.length;o1e-5&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),d>1e-5&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*i+1));var p=h.ashearY;0!=n&&(p+=(r.ashearY+this.data.offsetShearY)*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},e.prototype.getOrder=function(){return this.data.order},e}();t.TransformConstraint=e}(n||(n={})),function(t){var e=function(){return function(t){if(this.order=0,this.bones=new Array,this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.offsetRotation=0,this.offsetX=0,this.offsetY=0,this.offsetScaleX=0,this.offsetScaleY=0,this.offsetShearY=0,this.relative=!1,this.local=!1,null==t)throw new Error("name cannot be null.");this.name=t}}();t.TransformConstraintData=e}(n||(n={})),function(t){var e=function(){function e(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new t.Pool(function(){return new Array}),this.polygonIndicesPool=new t.Pool(function(){return new Array})}return e.prototype.triangulate=function(t){var i=t,n=t.length>>1,r=this.indicesArray;r.length=0;for(var s=0;s3;){for(var l=n-1,u=(s=0,1);;){t:if(!o[s]){for(var c=r[l]<<1,f=r[s]<<1,d=r[u]<<1,p=i[c],v=i[c+1],M=i[f],m=i[f+1],g=i[d],x=i[d+1],y=(u+1)%n;y!=l;y=(y+1)%n)if(o[y]){var w=r[y]<<1,b=i[w],A=i[w+1];if(e.positiveArea(g,x,p,v,b,A)&&e.positiveArea(p,v,M,m,b,A)&&e.positiveArea(M,m,g,x,b,A))break t}break}if(0==u){do{if(!o[s])break;s--}while(s>0);break}l=s,s=u,u=(u+1)%n}h.push(r[(n+s-1)%n]),h.push(r[s]),h.push(r[(s+1)%n]),r.splice(s,1),o.splice(s,1);var E=(--n+s-1)%n,R=s==n?0:s;o[E]=e.isConcave(E,n,i,r),o[R]=e.isConcave(R,n,i,r)}return 3==n&&(h.push(r[2]),h.push(r[0]),h.push(r[1])),h},e.prototype.decompose=function(t,i){var n=t,r=this.convexPolygons;this.polygonPool.freeAll(r),r.length=0;var s=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(s),s.length=0;var o=this.polygonIndicesPool.obtain();o.length=0;var a=this.polygonPool.obtain();a.length=0;for(var h=-1,l=0,u=0,c=i.length;u0?(r.push(a),s.push(o)):(this.polygonPool.free(a),this.polygonIndicesPool.free(o)),(a=this.polygonPool.obtain()).length=0,a.push(v),a.push(M),a.push(m),a.push(g),a.push(x),a.push(y),(o=this.polygonIndicesPool.obtain()).length=0,o.push(f),o.push(d),o.push(p),l=e.winding(v,M,m,g,x,y),h=f)}a.length>0&&(r.push(a),s.push(o));for(u=0,c=r.length;u=0;u--)0==(a=r[u]).length&&(r.splice(u,1),this.polygonPool.free(a),o=s[u],s.splice(u,1),this.polygonIndicesPool.free(o));return r},e.isConcave=function(t,e,i,n){var r=n[(e+t-1)%e]<<1,s=n[t]<<1,o=n[(t+1)%e]<<1;return!this.positiveArea(i[r],i[r+1],i[s],i[s+1],i[o],i[o+1])},e.positiveArea=function(t,e,i,n,r,s){return t*(s-n)+i*(e-s)+r*(n-e)>=0},e.winding=function(t,e,i,n,r,s){var o=i-t,a=n-e;return r*a-s*o+o*e-t*a>=0?1:-1},e}();t.Triangulator=e}(n||(n={})),function(t){var e=function(){function t(){this.array=new Array}return t.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},t.prototype.contains=function(t){return void 0!=this.array[0|t]},t.prototype.remove=function(t){this.array[0|t]=void 0},t.prototype.clear=function(){this.array.length=0},t}();t.IntSet=e;var i=function(){function t(t,e,i,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.r=t,this.g=e,this.b=i,this.a=n}return t.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this.clamp(),this},t.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},t.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},t.prototype.add=function(t,e,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,this.clamp(),this},t.prototype.clamp=function(){return this.r<0?this.r=0:this.r>1&&(this.r=1),this.g<0?this.g=0:this.g>1&&(this.g=1),this.b<0?this.b=0:this.b>1&&(this.b=1),this.a<0?this.a=0:this.a>1&&(this.a=1),this},t.WHITE=new t(1,1,1,1),t.RED=new t(1,0,0,1),t.GREEN=new t(0,1,0,1),t.BLUE=new t(0,0,1,1),t.MAGENTA=new t(1,0,1,1),t}();t.Color=i;var n=function(){function t(){}return t.clamp=function(t,e,i){return ti?i:t},t.cosDeg=function(e){return Math.cos(e*t.degRad)},t.sinDeg=function(e){return Math.sin(e*t.degRad)},t.signum=function(t){return t>0?1:t<0?-1:0},t.toInt=function(t){return t>0?Math.floor(t):Math.ceil(t)},t.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},t.randomTriangular=function(e,i){return t.randomTriangularWith(e,i,.5*(e+i))},t.randomTriangularWith=function(t,e,i){var n=Math.random(),r=e-t;return n<=(i-t)/r?t+Math.sqrt(n*r*(i-t)):e-Math.sqrt((1-n)*r*(e-i))},t.PI=3.1415927,t.PI2=2*t.PI,t.radiansToDegrees=180/t.PI,t.radDeg=t.radiansToDegrees,t.degreesToRadians=t.PI/180,t.degRad=t.degreesToRadians,t}();t.MathUtils=n;var s=function(){function t(){}return t.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},t}();t.Interpolation=s;var o=function(t){function e(e){var i=t.call(this)||this;return i.power=2,i.power=e,i}return r(e,t),e.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},e}(s);t.Pow=o;var a=function(t){function e(e){return t.call(this,e)||this}return r(e,t),e.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},e}(o);t.PowOut=a;var h=function(){function t(){}return t.arrayCopy=function(t,e,i,n,r){for(var s=e,o=n;s=i?e:t.setArraySize(e,i,n)},t.newArray=function(t,e){for(var i=new Array(t),n=0;n0?this.items.pop():this.instantiator()},t.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},t.prototype.freeAll=function(t){for(var e=0;ethis.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,this.frameTime>1&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},t}();t.TimeKeeper=f;var d=function(){function t(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}return t.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},t.prototype.addValue=function(t){this.addedValuesthis.values.length-1&&(this.lastValue=0),this.dirty=!0},t.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e>1)*s;var o=t.bone.skeleton,a=t.attachmentVertices,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f0&&(h=a);for(var y,w=(y=t.bone).worldX,b=y.worldY,A=y.a,E=y.b,R=y.c,T=y.d,I=e,S=r;S-1&&this.listeners.splice(e,1)},e}();e.Input=i;var n=function(){return function(t,e,i){this.identifier=t,this.x=e,this.y=i}}();e.Touch=n}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(e){var i=function(){function i(e){if(this.logo=null,this.spinner=null,this.angle=0,this.fadeOut=0,this.timeKeeper=new t.TimeKeeper,this.backgroundColor=new t.Color(.135,.135,.135,1),this.tempColor=new t.Color,this.firstDraw=0,this.renderer=e,this.timeKeeper.maxDelta=9,null===i.logoImg){var n=navigator.userAgent.indexOf("Safari")>-1;i.logoImg=new Image,i.logoImg.src=i.SPINE_LOGO_DATA,n||(i.logoImg.crossOrigin="anonymous"),i.logoImg.onload=function(t){i.loaded++},i.spinnerImg=new Image,i.spinnerImg.src=i.SPINNER_DATA,n||(i.spinnerImg.crossOrigin="anonymous"),i.spinnerImg.onload=function(t){i.loaded++}}}return i.prototype.draw=function(t){if(void 0===t&&(t=!1),!(t&&this.fadeOut>i.FADE_SECONDS)){this.timeKeeper.update();var n=Math.abs(Math.sin(this.timeKeeper.totalTime+.75));this.angle-=this.timeKeeper.delta/1.4*360*(1+1.5*Math.pow(n,5));var r=this.renderer,s=r.canvas,o=r.context.gl;r.resize(e.ResizeMode.Stretch);var a=r.camera.position.x,h=r.camera.position.y;if(r.camera.position.set(s.width/2,s.height/2,0),r.camera.viewportWidth=s.width,r.camera.viewportHeight=s.height,t){if(this.fadeOut+=this.timeKeeper.delta*(this.timeKeeper.totalTime<1?2:1),this.fadeOut>i.FADE_SECONDS)return void r.camera.position.set(a,h,0);n=1-this.fadeOut/i.FADE_SECONDS,this.tempColor.setFromColor(this.backgroundColor),this.tempColor.a=1-(n-1)*(n-1),r.begin(),r.quad(!0,0,0,s.width,0,s.width,s.height,0,s.height,this.tempColor,this.tempColor,this.tempColor,this.tempColor),r.end()}else o.clearColor(this.backgroundColor.r,this.backgroundColor.g,this.backgroundColor.b,this.backgroundColor.a),o.clear(o.COLOR_BUFFER_BIT),this.tempColor.a=1;if(this.tempColor.set(1,1,1,this.tempColor.a),2==i.loaded){null===this.logo&&(this.logo=new e.GLTexture(r.context,i.logoImg),this.spinner=new e.GLTexture(r.context,i.spinnerImg)),this.logo.update(!1),this.spinner.update(!1);var l=this.logo.getImage().width,u=this.logo.getImage().height,c=this.spinner.getImage().width,f=this.spinner.getImage().height;r.batcher.setBlendMode(o.SRC_ALPHA,o.ONE_MINUS_SRC_ALPHA),r.begin(),r.drawTexture(this.logo,(s.width-l)/2,(s.height-u)/2,l,u,this.tempColor),r.drawTextureRotated(this.spinner,(s.width-c)/2,(s.height-f)/2,c,f,c/2,f/2,this.angle,this.tempColor),r.end(),r.camera.position.set(a,h,0)}}},i.FADE_SECONDS=1,i.loaded=0,i.spinnerImg=null,i.logoImg=null,i.SPINNER_DATA="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKMAAACjCAYAAADmbK6AAAAACXBIWXMAAAsTAAALEwEAmpwYAAALB2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNS42LWMxNDIgNzkuMTYwOTI0LCAyMDE3LzA3LzEzLTAxOjA2OjM5ICAgICAgICAiPiA8cmRmOlJERiB4bWxu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y6oGRRTl2QivqwrJaJG2KZ5DQvsKwmmccHZVVD2fSSLmXk6XxRSHgVU5U6iqqnFJSyYKqAU+QGiJVAh2oClUdhqeLjSgOpSjFkTbwOVRXNGEDB9aCSwFIFHa3DFZBRfi1Q6gBTFk4Rs63zGijrFIg/ylRt7lW3m6kOUagQqiJ5orFONKJtHR0ok/vUAaPKOrbRt2owZZVTJmhRDaKOYW26I1st06yoBFKmk4jD61UCShSfq1OdpTLgUDW6R8t87rqcfZ1BlMr6uq6Vjhf2owGvozDKmG9dyiQCeTSAiwXVdNIP1A2uls7QkYhW/fgzVgIeXVOe6ISFOnSOjjn+uuHsK5F2NM1hLG/jSGfpjoSdjLSJg7Cp7FjaR7ZzXEGcinBJDF8DnZ1Ho7wPrYNadHdINGCLdVMdrU6nMdimqHYgiaF2kn4IXJ8FMJY6iPRxsPqTksbc55ZJP2vHgOnuYwD2tU4k/eycaT891g0F5YDZ7qfQ3SidTAZgG4By4FwHgBtYBpYbZ/l/2EJnC9N0gaQAAAAASUVORK5CYII=",i}();e.LoadingScreen=i}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){t.M00=0,t.M01=4,t.M02=8,t.M03=12,t.M10=1,t.M11=5,t.M12=9,t.M13=13,t.M20=2,t.M21=6,t.M22=10,t.M23=14,t.M30=3,t.M31=7,t.M32=11,t.M33=15;var e=function(){function e(){this.temp=new Float32Array(16),this.values=new Float32Array(16);var e=this.values;e[t.M00]=1,e[t.M11]=1,e[t.M22]=1,e[t.M33]=1}return e.prototype.set=function(t){return this.values.set(t),this},e.prototype.transpose=function(){var e=this.temp,i=this.values;return e[t.M00]=i[t.M00],e[t.M01]=i[t.M10],e[t.M02]=i[t.M20],e[t.M03]=i[t.M30],e[t.M10]=i[t.M01],e[t.M11]=i[t.M11],e[t.M12]=i[t.M21],e[t.M13]=i[t.M31],e[t.M20]=i[t.M02],e[t.M21]=i[t.M12],e[t.M22]=i[t.M22],e[t.M23]=i[t.M32],e[t.M30]=i[t.M03],e[t.M31]=i[t.M13],e[t.M32]=i[t.M23],e[t.M33]=i[t.M33],this.set(e)},e.prototype.identity=function(){var e=this.values;return e[t.M00]=1,e[t.M01]=0,e[t.M02]=0,e[t.M03]=0,e[t.M10]=0,e[t.M11]=1,e[t.M12]=0,e[t.M13]=0,e[t.M20]=0,e[t.M21]=0,e[t.M22]=1,e[t.M23]=0,e[t.M30]=0,e[t.M31]=0,e[t.M32]=0,e[t.M33]=1,this},e.prototype.invert=function(){var e=this.values,i=this.temp,n=e[t.M30]*e[t.M21]*e[t.M12]*e[t.M03]-e[t.M20]*e[t.M31]*e[t.M12]*e[t.M03]-e[t.M30]*e[t.M11]*e[t.M22]*e[t.M03]+e[t.M10]*e[t.M31]*e[t.M22]*e[t.M03]+e[t.M20]*e[t.M11]*e[t.M32]*e[t.M03]-e[t.M10]*e[t.M21]*e[t.M32]*e[t.M03]-e[t.M30]*e[t.M21]*e[t.M02]*e[t.M13]+e[t.M20]*e[t.M31]*e[t.M02]*e[t.M13]+e[t.M30]*e[t.M01]*e[t.M22]*e[t.M13]-e[t.M00]*e[t.M31]*e[t.M22]*e[t.M13]-e[t.M20]*e[t.M01]*e[t.M32]*e[t.M13]+e[t.M00]*e[t.M21]*e[t.M32]*e[t.M13]+e[t.M30]*e[t.M11]*e[t.M02]*e[t.M23]-e[t.M10]*e[t.M31]*e[t.M02]*e[t.M23]-e[t.M30]*e[t.M01]*e[t.M12]*e[t.M23]+e[t.M00]*e[t.M31]*e[t.M12]*e[t.M23]+e[t.M10]*e[t.M01]*e[t.M32]*e[t.M23]-e[t.M00]*e[t.M11]*e[t.M32]*e[t.M23]-e[t.M20]*e[t.M11]*e[t.M02]*e[t.M33]+e[t.M10]*e[t.M21]*e[t.M02]*e[t.M33]+e[t.M20]*e[t.M01]*e[t.M12]*e[t.M33]-e[t.M00]*e[t.M21]*e[t.M12]*e[t.M33]-e[t.M10]*e[t.M01]*e[t.M22]*e[t.M33]+e[t.M00]*e[t.M11]*e[t.M22]*e[t.M33];if(0==n)throw new Error("non-invertible matrix");var r=1/n;return i[t.M00]=e[t.M12]*e[t.M23]*e[t.M31]-e[t.M13]*e[t.M22]*e[t.M31]+e[t.M13]*e[t.M21]*e[t.M32]-e[t.M11]*e[t.M23]*e[t.M32]-e[t.M12]*e[t.M21]*e[t.M33]+e[t.M11]*e[t.M22]*e[t.M33],i[t.M01]=e[t.M03]*e[t.M22]*e[t.M31]-e[t.M02]*e[t.M23]*e[t.M31]-e[t.M03]*e[t.M21]*e[t.M32]+e[t.M01]*e[t.M23]*e[t.M32]+e[t.M02]*e[t.M21]*e[t.M33]-e[t.M01]*e[t.M22]*e[t.M33],i[t.M02]=e[t.M02]*e[t.M13]*e[t.M31]-e[t.M03]*e[t.M12]*e[t.M31]+e[t.M03]*e[t.M11]*e[t.M32]-e[t.M01]*e[t.M13]*e[t.M32]-e[t.M02]*e[t.M11]*e[t.M33]+e[t.M01]*e[t.M12]*e[t.M33],i[t.M03]=e[t.M03]*e[t.M12]*e[t.M21]-e[t.M02]*e[t.M13]*e[t.M21]-e[t.M03]*e[t.M11]*e[t.M22]+e[t.M01]*e[t.M13]*e[t.M22]+e[t.M02]*e[t.M11]*e[t.M23]-e[t.M01]*e[t.M12]*e[t.M23],i[t.M10]=e[t.M13]*e[t.M22]*e[t.M30]-e[t.M12]*e[t.M23]*e[t.M30]-e[t.M13]*e[t.M20]*e[t.M32]+e[t.M10]*e[t.M23]*e[t.M32]+e[t.M12]*e[t.M20]*e[t.M33]-e[t.M10]*e[t.M22]*e[t.M33],i[t.M11]=e[t.M02]*e[t.M23]*e[t.M30]-e[t.M03]*e[t.M22]*e[t.M30]+e[t.M03]*e[t.M20]*e[t.M32]-e[t.M00]*e[t.M23]*e[t.M32]-e[t.M02]*e[t.M20]*e[t.M33]+e[t.M00]*e[t.M22]*e[t.M33],i[t.M12]=e[t.M03]*e[t.M12]*e[t.M30]-e[t.M02]*e[t.M13]*e[t.M30]-e[t.M03]*e[t.M10]*e[t.M32]+e[t.M00]*e[t.M13]*e[t.M32]+e[t.M02]*e[t.M10]*e[t.M33]-e[t.M00]*e[t.M12]*e[t.M33],i[t.M13]=e[t.M02]*e[t.M13]*e[t.M20]-e[t.M03]*e[t.M12]*e[t.M20]+e[t.M03]*e[t.M10]*e[t.M22]-e[t.M00]*e[t.M13]*e[t.M22]-e[t.M02]*e[t.M10]*e[t.M23]+e[t.M00]*e[t.M12]*e[t.M23],i[t.M20]=e[t.M11]*e[t.M23]*e[t.M30]-e[t.M13]*e[t.M21]*e[t.M30]+e[t.M13]*e[t.M20]*e[t.M31]-e[t.M10]*e[t.M23]*e[t.M31]-e[t.M11]*e[t.M20]*e[t.M33]+e[t.M10]*e[t.M21]*e[t.M33],i[t.M21]=e[t.M03]*e[t.M21]*e[t.M30]-e[t.M01]*e[t.M23]*e[t.M30]-e[t.M03]*e[t.M20]*e[t.M31]+e[t.M00]*e[t.M23]*e[t.M31]+e[t.M01]*e[t.M20]*e[t.M33]-e[t.M00]*e[t.M21]*e[t.M33],i[t.M22]=e[t.M01]*e[t.M13]*e[t.M30]-e[t.M03]*e[t.M11]*e[t.M30]+e[t.M03]*e[t.M10]*e[t.M31]-e[t.M00]*e[t.M13]*e[t.M31]-e[t.M01]*e[t.M10]*e[t.M33]+e[t.M00]*e[t.M11]*e[t.M33],i[t.M23]=e[t.M03]*e[t.M11]*e[t.M20]-e[t.M01]*e[t.M13]*e[t.M20]-e[t.M03]*e[t.M10]*e[t.M21]+e[t.M00]*e[t.M13]*e[t.M21]+e[t.M01]*e[t.M10]*e[t.M23]-e[t.M00]*e[t.M11]*e[t.M23],i[t.M30]=e[t.M12]*e[t.M21]*e[t.M30]-e[t.M11]*e[t.M22]*e[t.M30]-e[t.M12]*e[t.M20]*e[t.M31]+e[t.M10]*e[t.M22]*e[t.M31]+e[t.M11]*e[t.M20]*e[t.M32]-e[t.M10]*e[t.M21]*e[t.M32],i[t.M31]=e[t.M01]*e[t.M22]*e[t.M30]-e[t.M02]*e[t.M21]*e[t.M30]+e[t.M02]*e[t.M20]*e[t.M31]-e[t.M00]*e[t.M22]*e[t.M31]-e[t.M01]*e[t.M20]*e[t.M32]+e[t.M00]*e[t.M21]*e[t.M32],i[t.M32]=e[t.M02]*e[t.M11]*e[t.M30]-e[t.M01]*e[t.M12]*e[t.M30]-e[t.M02]*e[t.M10]*e[t.M31]+e[t.M00]*e[t.M12]*e[t.M31]+e[t.M01]*e[t.M10]*e[t.M32]-e[t.M00]*e[t.M11]*e[t.M32],i[t.M33]=e[t.M01]*e[t.M12]*e[t.M20]-e[t.M02]*e[t.M11]*e[t.M20]+e[t.M02]*e[t.M10]*e[t.M21]-e[t.M00]*e[t.M12]*e[t.M21]-e[t.M01]*e[t.M10]*e[t.M22]+e[t.M00]*e[t.M11]*e[t.M22],e[t.M00]=i[t.M00]*r,e[t.M01]=i[t.M01]*r,e[t.M02]=i[t.M02]*r,e[t.M03]=i[t.M03]*r,e[t.M10]=i[t.M10]*r,e[t.M11]=i[t.M11]*r,e[t.M12]=i[t.M12]*r,e[t.M13]=i[t.M13]*r,e[t.M20]=i[t.M20]*r,e[t.M21]=i[t.M21]*r,e[t.M22]=i[t.M22]*r,e[t.M23]=i[t.M23]*r,e[t.M30]=i[t.M30]*r,e[t.M31]=i[t.M31]*r,e[t.M32]=i[t.M32]*r,e[t.M33]=i[t.M33]*r,this},e.prototype.determinant=function(){var e=this.values;return e[t.M30]*e[t.M21]*e[t.M12]*e[t.M03]-e[t.M20]*e[t.M31]*e[t.M12]*e[t.M03]-e[t.M30]*e[t.M11]*e[t.M22]*e[t.M03]+e[t.M10]*e[t.M31]*e[t.M22]*e[t.M03]+e[t.M20]*e[t.M11]*e[t.M32]*e[t.M03]-e[t.M10]*e[t.M21]*e[t.M32]*e[t.M03]-e[t.M30]*e[t.M21]*e[t.M02]*e[t.M13]+e[t.M20]*e[t.M31]*e[t.M02]*e[t.M13]+e[t.M30]*e[t.M01]*e[t.M22]*e[t.M13]-e[t.M00]*e[t.M31]*e[t.M22]*e[t.M13]-e[t.M20]*e[t.M01]*e[t.M32]*e[t.M13]+e[t.M00]*e[t.M21]*e[t.M32]*e[t.M13]+e[t.M30]*e[t.M11]*e[t.M02]*e[t.M23]-e[t.M10]*e[t.M31]*e[t.M02]*e[t.M23]-e[t.M30]*e[t.M01]*e[t.M12]*e[t.M23]+e[t.M00]*e[t.M31]*e[t.M12]*e[t.M23]+e[t.M10]*e[t.M01]*e[t.M32]*e[t.M23]-e[t.M00]*e[t.M11]*e[t.M32]*e[t.M23]-e[t.M20]*e[t.M11]*e[t.M02]*e[t.M33]+e[t.M10]*e[t.M21]*e[t.M02]*e[t.M33]+e[t.M20]*e[t.M01]*e[t.M12]*e[t.M33]-e[t.M00]*e[t.M21]*e[t.M12]*e[t.M33]-e[t.M10]*e[t.M01]*e[t.M22]*e[t.M33]+e[t.M00]*e[t.M11]*e[t.M22]*e[t.M33]},e.prototype.translate=function(e,i,n){var r=this.values;return r[t.M03]+=e,r[t.M13]+=i,r[t.M23]+=n,this},e.prototype.copy=function(){return(new e).set(this.values)},e.prototype.projection=function(e,i,n,r){this.identity();var s=1/Math.tan(n*(Math.PI/180)/2),o=(i+e)/(e-i),a=2*i*e/(e-i),h=this.values;return h[t.M00]=s/r,h[t.M10]=0,h[t.M20]=0,h[t.M30]=0,h[t.M01]=0,h[t.M11]=s,h[t.M21]=0,h[t.M31]=0,h[t.M02]=0,h[t.M12]=0,h[t.M22]=o,h[t.M32]=-1,h[t.M03]=0,h[t.M13]=0,h[t.M23]=a,h[t.M33]=0,this},e.prototype.ortho2d=function(t,e,i,n){return this.ortho(t,t+i,e,e+n,0,1)},e.prototype.ortho=function(e,i,n,r,s,o){this.identity();var a=2/(i-e),h=2/(r-n),l=-2/(o-s),u=-(i+e)/(i-e),c=-(r+n)/(r-n),f=-(o+s)/(o-s),d=this.values;return d[t.M00]=a,d[t.M10]=0,d[t.M20]=0,d[t.M30]=0,d[t.M01]=0,d[t.M11]=h,d[t.M21]=0,d[t.M31]=0,d[t.M02]=0,d[t.M12]=0,d[t.M22]=l,d[t.M32]=0,d[t.M03]=u,d[t.M13]=c,d[t.M23]=f,d[t.M33]=1,this},e.prototype.multiply=function(e){var i=this.temp,n=this.values,r=e.values;return i[t.M00]=n[t.M00]*r[t.M00]+n[t.M01]*r[t.M10]+n[t.M02]*r[t.M20]+n[t.M03]*r[t.M30],i[t.M01]=n[t.M00]*r[t.M01]+n[t.M01]*r[t.M11]+n[t.M02]*r[t.M21]+n[t.M03]*r[t.M31],i[t.M02]=n[t.M00]*r[t.M02]+n[t.M01]*r[t.M12]+n[t.M02]*r[t.M22]+n[t.M03]*r[t.M32],i[t.M03]=n[t.M00]*r[t.M03]+n[t.M01]*r[t.M13]+n[t.M02]*r[t.M23]+n[t.M03]*r[t.M33],i[t.M10]=n[t.M10]*r[t.M00]+n[t.M11]*r[t.M10]+n[t.M12]*r[t.M20]+n[t.M13]*r[t.M30],i[t.M11]=n[t.M10]*r[t.M01]+n[t.M11]*r[t.M11]+n[t.M12]*r[t.M21]+n[t.M13]*r[t.M31],i[t.M12]=n[t.M10]*r[t.M02]+n[t.M11]*r[t.M12]+n[t.M12]*r[t.M22]+n[t.M13]*r[t.M32],i[t.M13]=n[t.M10]*r[t.M03]+n[t.M11]*r[t.M13]+n[t.M12]*r[t.M23]+n[t.M13]*r[t.M33],i[t.M20]=n[t.M20]*r[t.M00]+n[t.M21]*r[t.M10]+n[t.M22]*r[t.M20]+n[t.M23]*r[t.M30],i[t.M21]=n[t.M20]*r[t.M01]+n[t.M21]*r[t.M11]+n[t.M22]*r[t.M21]+n[t.M23]*r[t.M31],i[t.M22]=n[t.M20]*r[t.M02]+n[t.M21]*r[t.M12]+n[t.M22]*r[t.M22]+n[t.M23]*r[t.M32],i[t.M23]=n[t.M20]*r[t.M03]+n[t.M21]*r[t.M13]+n[t.M22]*r[t.M23]+n[t.M23]*r[t.M33],i[t.M30]=n[t.M30]*r[t.M00]+n[t.M31]*r[t.M10]+n[t.M32]*r[t.M20]+n[t.M33]*r[t.M30],i[t.M31]=n[t.M30]*r[t.M01]+n[t.M31]*r[t.M11]+n[t.M32]*r[t.M21]+n[t.M33]*r[t.M31],i[t.M32]=n[t.M30]*r[t.M02]+n[t.M31]*r[t.M12]+n[t.M32]*r[t.M22]+n[t.M33]*r[t.M32],i[t.M33]=n[t.M30]*r[t.M03]+n[t.M31]*r[t.M13]+n[t.M32]*r[t.M23]+n[t.M33]*r[t.M33],this.set(this.temp)},e.prototype.multiplyLeft=function(e){var i=this.temp,n=this.values,r=e.values;return i[t.M00]=r[t.M00]*n[t.M00]+r[t.M01]*n[t.M10]+r[t.M02]*n[t.M20]+r[t.M03]*n[t.M30],i[t.M01]=r[t.M00]*n[t.M01]+r[t.M01]*n[t.M11]+r[t.M02]*n[t.M21]+r[t.M03]*n[t.M31],i[t.M02]=r[t.M00]*n[t.M02]+r[t.M01]*n[t.M12]+r[t.M02]*n[t.M22]+r[t.M03]*n[t.M32],i[t.M03]=r[t.M00]*n[t.M03]+r[t.M01]*n[t.M13]+r[t.M02]*n[t.M23]+r[t.M03]*n[t.M33],i[t.M10]=r[t.M10]*n[t.M00]+r[t.M11]*n[t.M10]+r[t.M12]*n[t.M20]+r[t.M13]*n[t.M30],i[t.M11]=r[t.M10]*n[t.M01]+r[t.M11]*n[t.M11]+r[t.M12]*n[t.M21]+r[t.M13]*n[t.M31],i[t.M12]=r[t.M10]*n[t.M02]+r[t.M11]*n[t.M12]+r[t.M12]*n[t.M22]+r[t.M13]*n[t.M32],i[t.M13]=r[t.M10]*n[t.M03]+r[t.M11]*n[t.M13]+r[t.M12]*n[t.M23]+r[t.M13]*n[t.M33],i[t.M20]=r[t.M20]*n[t.M00]+r[t.M21]*n[t.M10]+r[t.M22]*n[t.M20]+r[t.M23]*n[t.M30],i[t.M21]=r[t.M20]*n[t.M01]+r[t.M21]*n[t.M11]+r[t.M22]*n[t.M21]+r[t.M23]*n[t.M31],i[t.M22]=r[t.M20]*n[t.M02]+r[t.M21]*n[t.M12]+r[t.M22]*n[t.M22]+r[t.M23]*n[t.M32],i[t.M23]=r[t.M20]*n[t.M03]+r[t.M21]*n[t.M13]+r[t.M22]*n[t.M23]+r[t.M23]*n[t.M33],i[t.M30]=r[t.M30]*n[t.M00]+r[t.M31]*n[t.M10]+r[t.M32]*n[t.M20]+r[t.M33]*n[t.M30],i[t.M31]=r[t.M30]*n[t.M01]+r[t.M31]*n[t.M11]+r[t.M32]*n[t.M21]+r[t.M33]*n[t.M31],i[t.M32]=r[t.M30]*n[t.M02]+r[t.M31]*n[t.M12]+r[t.M32]*n[t.M22]+r[t.M33]*n[t.M32],i[t.M33]=r[t.M30]*n[t.M03]+r[t.M31]*n[t.M13]+r[t.M32]*n[t.M23]+r[t.M33]*n[t.M33],this.set(this.temp)},e.prototype.lookAt=function(i,n,r){e.initTemps();var s=e.xAxis,o=e.yAxis,a=e.zAxis;a.setFrom(n).normalize(),s.setFrom(n).normalize(),s.cross(r).normalize(),o.setFrom(s).cross(a).normalize(),this.identity();var h=this.values;return h[t.M00]=s.x,h[t.M01]=s.y,h[t.M02]=s.z,h[t.M10]=o.x,h[t.M11]=o.y,h[t.M12]=o.z,h[t.M20]=-a.x,h[t.M21]=-a.y,h[t.M22]=-a.z,e.tmpMatrix.identity(),e.tmpMatrix.values[t.M03]=-i.x,e.tmpMatrix.values[t.M13]=-i.y,e.tmpMatrix.values[t.M23]=-i.z,this.multiply(e.tmpMatrix),this},e.initTemps=function(){null===e.xAxis&&(e.xAxis=new t.Vector3),null===e.yAxis&&(e.yAxis=new t.Vector3),null===e.zAxis&&(e.zAxis=new t.Vector3)},e.xAxis=null,e.yAxis=null,e.zAxis=null,e.tmpMatrix=new e,e}();t.Matrix4=e}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){var e=function(){function e(e,i,n,r){this.attributes=i,this.verticesLength=0,this.dirtyVertices=!1,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e),this.elementsPerVertex=0;for(var s=0;sthis.vertices.length)throw Error("Mesh can't store more than "+this.maxVertices()+" vertices");this.vertices.set(t,0),this.verticesLength=t.length},e.prototype.setIndices=function(t){if(this.dirtyIndices=!0,t.length>this.indices.length)throw Error("Mesh can't store more than "+this.maxIndices()+" indices");this.indices.set(t,0),this.indicesLength=t.length},e.prototype.draw=function(t,e){this.drawWithOffset(t,e,0,this.indicesLength>0?this.indicesLength:this.verticesLength/this.elementsPerVertex)},e.prototype.drawWithOffset=function(t,e,i,n){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),this.indicesLength>0?r.drawElements(e,n,r.UNSIGNED_SHORT,2*i):r.drawArrays(e,i,n),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var i=0,n=0;n0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i0&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,null)},e.prototype.update=function(){var t=this.context.gl;this.dirtyVertices&&(this.verticesBuffer||(this.verticesBuffer=t.createBuffer()),t.bindBuffer(t.ARRAY_BUFFER,this.verticesBuffer),t.bufferData(t.ARRAY_BUFFER,this.vertices.subarray(0,this.verticesLength),t.DYNAMIC_DRAW),this.dirtyVertices=!1),this.dirtyIndices&&(this.indicesBuffer||(this.indicesBuffer=t.createBuffer()),t.bindBuffer(t.ELEMENT_ARRAY_BUFFER,this.indicesBuffer),t.bufferData(t.ELEMENT_ARRAY_BUFFER,this.indices.subarray(0,this.indicesLength),t.DYNAMIC_DRAW),this.dirtyIndices=!1)},e.prototype.restore=function(){this.verticesBuffer=null,this.indicesBuffer=null,this.update()},e.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;t.deleteBuffer(this.verticesBuffer),t.deleteBuffer(this.indicesBuffer)},e}();t.Mesh=e;var i=function(){return function(t,e,i){this.name=t,this.type=e,this.numElements=i}}();t.VertexAttribute=i;var n=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,2)||this}return r(i,e),i}(i);t.Position2Attribute=n;var s=function(e){function i(){return e.call(this,t.Shader.POSITION,h.Float,3)||this}return r(i,e),i}(i);t.Position3Attribute=s;var o=function(e){function i(i){return void 0===i&&(i=0),e.call(this,t.Shader.TEXCOORDS+(0==i?"":i),h.Float,2)||this}return r(i,e),i}(i);t.TexCoordAttribute=o;var a=function(e){function i(){return e.call(this,t.Shader.COLOR,h.Float,4)||this}return r(i,e),i}(i);t.ColorAttribute=a;var h,l=function(e){function i(){return e.call(this,t.Shader.COLOR2,h.Float,4)||this}return r(i,e),i}(i);t.Color2Attribute=l,function(t){t[t.Float=0]="Float"}(h=t.VertexAttributeType||(t.VertexAttributeType={}))}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(t){var e=function(){function e(e,i,n){if(void 0===i&&(i=!0),void 0===n&&(n=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,n>10920)throw new Error("Can't have more than 10920 triangles per batch: "+n);this.context=e instanceof t.ManagedWebGLRenderingContext?e:new t.ManagedWebGLRenderingContext(e);var r=i?[new t.Position2Attribute,new t.ColorAttribute,new t.TexCoordAttribute,new t.Color2Attribute]:[new t.Position2Attribute,new t.ColorAttribute,new t.TexCoordAttribute];this.mesh=new t.Mesh(e,r,n,3*n),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}return e.prototype.begin=function(t){var e=this.context.gl;if(this.isDrawing)throw new Error("PolygonBatch is already drawing. Call PolygonBatch.end() before calling PolygonBatch.begin()");this.drawCalls=0,this.shader=t,this.lastTexture=null,this.isDrawing=!0,e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},e.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},e.prototype.draw=function(t,e,i){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+i.length>this.mesh.getIndices().length)&&this.flush();var n=this.mesh.numVertices();this.mesh.getVertices().set(e,this.verticesLength),this.verticesLength+=e.length,this.mesh.setVerticesLength(this.verticesLength);for(var r=this.mesh.getIndices(),s=this.indicesLength,o=0;o0||this.indicesLength>0)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1,t.disable(t.BLEND)},e.prototype.getDrawCalls=function(){return this.drawCalls},e.prototype.dispose=function(){this.mesh.dispose()},e}();t.PolygonBatcher=e}(t.webgl||(t.webgl={}))}(n||(n={})),function(t){!function(e){var i,n=function(){function n(i,n,r){void 0===r&&(r=!0),this.twoColorTint=!1,this.activeRenderer=null,this.QUAD=[0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,1,1,0,0],this.QUAD_TRIANGLES=[0,1,2,2,3,0],this.WHITE=new t.Color(1,1,1,1),this.canvas=i,this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.twoColorTint=r,this.camera=new e.OrthoCamera(i.width,i.height),this.batcherShader=r?e.Shader.newTwoColoredTextured(this.context):e.Shader.newColoredTextured(this.context),this.batcher=new e.PolygonBatcher(this.context,r),this.shapesShader=e.Shader.newColored(this.context),this.shapes=new e.ShapeRenderer(this.context),this.skeletonRenderer=new e.SkeletonRenderer(this.context,r),this.skeletonDebugRenderer=new e.SkeletonDebugRenderer(this.context)}return n.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},n.prototype.drawSkeleton=function(t,e,i,n){void 0===e&&(e=!1),void 0===i&&(i=-1),void 0===n&&(n=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,i,n)},n.prototype.drawSkeletonDebug=function(t,e,i){void 0===e&&(e=!1),void 0===i&&(i=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,i)},n.prototype.drawTexture=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var o=this.QUAD,a=0;o[a++]=e,o[a++]=i,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+n,o[a++]=i,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=1,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e+n,o[a++]=i+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=1,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),o[a++]=e,o[a++]=i+r,o[a++]=s.r,o[a++]=s.g,o[a++]=s.b,o[a++]=s.a,o[a++]=0,o[a++]=0,this.twoColorTint&&(o[a++]=0,o[a++]=0,o[a++]=0,o[a++]=0),this.batcher.draw(t,o,this.QUAD_TRIANGLES)},n.prototype.drawTextureUV=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var u=this.QUAD,c=0;u[c++]=e,u[c++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=o,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=a,u[c++]=o,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e+n,u[c++]=i+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=a,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),u[c++]=e,u[c++]=i+r,u[c++]=l.r,u[c++]=l.g,u[c++]=l.b,u[c++]=l.a,u[c++]=s,u[c++]=h,this.twoColorTint&&(u[c++]=0,u[c++]=0,u[c++]=0,u[c++]=0),this.batcher.draw(t,u,this.QUAD_TRIANGLES)},n.prototype.drawTextureRotated=function(e,i,n,r,s,o,a,h,l,u){void 0===l&&(l=null),void 0===u&&(u=!1),this.enableRenderer(this.batcher),null===l&&(l=this.WHITE);var c=this.QUAD,f=i+o,d=n+a,p=-o,v=-a,M=r-o,m=s-a,g=p,x=v,y=p,w=m,b=M,A=m,E=M,R=v,T=0,I=0,S=0,C=0,P=0,L=0,O=0,D=0;if(0!=h){var k=t.MathUtils.cosDeg(h),Y=t.MathUtils.sinDeg(h);S=(P=k*b-Y*A)+((T=k*g-Y*x)-(O=k*y-Y*w)),C=(L=Y*b+k*A)+((I=Y*g+k*x)-(D=Y*y+k*w))}else T=g,I=x,O=y,D=w,P=b,L=A,S=E,C=R;T+=f,I+=d,S+=f,C+=d,P+=f,L+=d,O+=f,D+=d;var V=0;c[V++]=T,c[V++]=I,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=0,c[V++]=1,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),c[V++]=S,c[V++]=C,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=1,c[V++]=1,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),c[V++]=P,c[V++]=L,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=1,c[V++]=0,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),c[V++]=O,c[V++]=D,c[V++]=l.r,c[V++]=l.g,c[V++]=l.b,c[V++]=l.a,c[V++]=0,c[V++]=0,this.twoColorTint&&(c[V++]=0,c[V++]=0,c[V++]=0,c[V++]=0),this.batcher.draw(e,c,this.QUAD_TRIANGLES)},n.prototype.drawRegion=function(t,e,i,n,r,s,o){void 0===s&&(s=null),void 0===o&&(o=!1),this.enableRenderer(this.batcher),null===s&&(s=this.WHITE);var a=this.QUAD,h=0;a[h++]=e,a[h++]=i,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u,a[h++]=t.v2,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e+n,a[h++]=i,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u2,a[h++]=t.v2,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e+n,a[h++]=i+r,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u2,a[h++]=t.v,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),a[h++]=e,a[h++]=i+r,a[h++]=s.r,a[h++]=s.g,a[h++]=s.b,a[h++]=s.a,a[h++]=t.u,a[h++]=t.v,this.twoColorTint&&(a[h++]=0,a[h++]=0,a[h++]=0,a[h++]=0),this.batcher.draw(t.texture,a,this.QUAD_TRIANGLES)},n.prototype.line=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,i,n,r)},n.prototype.triangle=function(t,e,i,n,r,s,o,a,h,l){void 0===a&&(a=null),void 0===h&&(h=null),void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.triangle(t,e,i,n,r,s,o,a,h,l)},n.prototype.quad=function(t,e,i,n,r,s,o,a,h,l,u,c,f){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),this.enableRenderer(this.shapes),this.shapes.quad(t,e,i,n,r,s,o,a,h,l,u,c,f)},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,i,n,r,s)},n.prototype.rectLine=function(t,e,i,n,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,i,n,r,s,o)},n.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},n.prototype.circle=function(t,e,i,n,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,i,n,r,s)},n.prototype.curve=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,i,n,r,s,o,a,h,l)},n.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},n.prototype.resize=function(t){var e=this.canvas,n=e.clientWidth,r=e.clientHeight;if(e.width==n&&e.height==r||(e.width=n,e.height=r),this.context.gl.viewport(0,0,e.width,e.height),t===i.Stretch);else if(t===i.Expand)this.camera.setViewport(n,r);else if(t===i.Fit){var s=e.width,o=e.height,a=this.camera.viewportWidth,h=this.camera.viewportHeight,l=h/a10920)throw new Error("Can't have more than 10920 triangles per batch: "+r);this.context=n instanceof e.ManagedWebGLRenderingContext?n:new e.ManagedWebGLRenderingContext(n),this.mesh=new e.Mesh(n,[new e.Position2Attribute,new e.ColorAttribute],r,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}return n.prototype.begin=function(t){if(this.isDrawing)throw new Error("ShapeRenderer.begin() has already been called");this.shader=t,this.vertexIndex=0,this.isDrawing=!0;var e=this.context.gl;e.enable(e.BLEND),e.blendFunc(this.srcBlend,this.dstBlend)},n.prototype.setBlendMode=function(t,e){var i=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend))},n.prototype.setColor=function(t){this.color.setFromColor(t)},n.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},n.prototype.point=function(t,e,n){void 0===n&&(n=null),this.check(i.Point,1),null===n&&(n=this.color),this.vertex(t,e,n)},n.prototype.line=function(t,e,n,r,s){void 0===s&&(s=null),this.check(i.Line,2);this.mesh.getVertices(),this.vertexIndex;null===s&&(s=this.color),this.vertex(t,e,s),this.vertex(n,r,s)},n.prototype.triangle=function(t,e,n,r,s,o,a,h,l,u){void 0===h&&(h=null),void 0===l&&(l=null),void 0===u&&(u=null),this.check(t?i.Filled:i.Line,3);this.mesh.getVertices(),this.vertexIndex;null===h&&(h=this.color),null===l&&(l=this.color),null===u&&(u=this.color),t?(this.vertex(e,n,h),this.vertex(r,s,l),this.vertex(o,a,u)):(this.vertex(e,n,h),this.vertex(r,s,l),this.vertex(r,s,h),this.vertex(o,a,l),this.vertex(o,a,h),this.vertex(e,n,l))},n.prototype.quad=function(t,e,n,r,s,o,a,h,l,u,c,f,d){void 0===u&&(u=null),void 0===c&&(c=null),void 0===f&&(f=null),void 0===d&&(d=null),this.check(t?i.Filled:i.Line,3);this.mesh.getVertices(),this.vertexIndex;null===u&&(u=this.color),null===c&&(c=this.color),null===f&&(f=this.color),null===d&&(d=this.color),t?(this.vertex(e,n,u),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(e,n,u)):(this.vertex(e,n,u),this.vertex(r,s,c),this.vertex(r,s,c),this.vertex(o,a,f),this.vertex(o,a,f),this.vertex(h,l,d),this.vertex(h,l,d),this.vertex(e,n,u))},n.prototype.rect=function(t,e,i,n,r,s){void 0===s&&(s=null),this.quad(t,e,i,e+n,i,e+n,i+r,e,i+r,s,s,s,s)},n.prototype.rectLine=function(t,e,n,r,s,o,a){void 0===a&&(a=null),this.check(t?i.Filled:i.Line,8),null===a&&(a=this.color);var h=this.tmp.set(s-n,e-r);h.normalize(),o*=.5;var l=h.x*o,u=h.y*o;t?(this.vertex(e+l,n+u,a),this.vertex(e-l,n-u,a),this.vertex(r+l,s+u,a),this.vertex(r-l,s-u,a),this.vertex(r+l,s+u,a),this.vertex(e-l,n-u,a)):(this.vertex(e+l,n+u,a),this.vertex(e-l,n-u,a),this.vertex(r+l,s+u,a),this.vertex(r-l,s-u,a),this.vertex(r+l,s+u,a),this.vertex(e+l,n+u,a),this.vertex(r-l,s-u,a),this.vertex(e-l,n-u,a))},n.prototype.x=function(t,e,i){this.line(t-i,e-i,t+i,e+i),this.line(t-i,e+i,t+i,e-i)},n.prototype.polygon=function(t,e,n,r){if(void 0===r&&(r=null),n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(i.Line,2*n),null===r&&(r=this.color);this.mesh.getVertices(),this.vertexIndex;n<<=1;for(var s=t[e<<=1],o=t[e+1],a=e+n,h=e,l=e+n-2;h=a?(f=s,d=o):(f=t[h+2],d=t[h+3]),this.vertex(u,c,r),this.vertex(f,d,r)}},n.prototype.circle=function(e,n,r,s,o,a){if(void 0===o&&(o=null),void 0===a&&(a=0),0===a&&(a=Math.max(1,6*t.MathUtils.cbrt(s)|0)),a<=0)throw new Error("segments must be > 0.");null===o&&(o=this.color);var h=2*t.MathUtils.PI/a,l=Math.cos(h),u=Math.sin(h),c=s,f=0;if(e){this.check(i.Filled,3*a+3),a--;for(p=0;p0;)this.vertex(b,A,u),b+=E,A+=R,E+=T,R+=I,T+=S,I+=C,this.vertex(b,A,u);this.vertex(b,A,u),this.vertex(a,h,u)},n.prototype.vertex=function(t,e,i){var n=this.vertexIndex,r=this.mesh.getVertices();r[n++]=t,r[n++]=e,r[n++]=i.r,r[n++]=i.g,r[n++]=i.b,r[n++]=i.a,this.vertexIndex=n},n.prototype.end=function(){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");this.flush(),this.context.gl.disable(this.context.gl.BLEND),this.isDrawing=!1},n.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},n.prototype.check=function(t,e){if(!this.isDrawing)throw new Error("ShapeRenderer.begin() has not been called");if(this.shapeType==t){if(!(this.mesh.maxVertices()-this.mesh.numVertices()-1)&&null!=f.parent){var d=s+f.data.length*f.a+f.worldX,p=o+f.data.length*f.c+f.worldY;e.rectLine(!0,s+f.worldX,o+f.worldY,d,p,this.boneWidth*this.scale)}}this.drawSkeletonXY&&e.x(s,o,4*this.scale)}if(this.drawRegionAttachments){e.setColor(this.attachmentLineColor);for(u=0,c=(B=n.slots).length;u0){e.setColor(this.attachmentLineColor);var R=M[(x=2*(x>>1))-2],T=M[x-1];for(y=0,w=x;y-1||e.circle(!0,s+f.worldX,o+f.worldY,3*this.scale,i.GREEN,8)}}if(this.drawClipping){var B=n.slots;e.setColor(this.clipColor);for(u=0,c=B.length;u=0&&s==T.data.index&&(b=!0),b){o>=0&&o==T.data.index&&(b=!1);var I=T.getAttachment(),S=null;if(I instanceof t.RegionAttachment){var C=I;v.vertices=this.vertices,v.numVertices=4,v.numFloats=R<<2,C.computeWorldVertices(T.bone,v.vertices,0,R),m=n.QUAD_TRIANGLES,M=C.uvs,S=C.region.renderObject.texture,x=C.color}else{if(!(I instanceof t.MeshAttachment)){if(I instanceof t.ClippingAttachment){var P=I;a.clipStart(T,P);continue}a.clipEndWithSlot(T);continue}var L=I;v.vertices=this.vertices,v.numVertices=L.worldVerticesLength>>1,v.numFloats=v.numVertices*R,v.numFloats>v.vertices.length&&(v.vertices=this.vertices=t.Utils.newFloatArray(v.numFloats)),L.computeWorldVertices(T,0,L.worldVerticesLength,v.vertices,0,R),m=L.triangles,S=L.region.renderObject.texture,M=L.uvs,x=L.color}if(null!=S){var O=T.color,D=this.tempColor;D.r=y.r*O.r*x.r,D.g=y.g*O.g*x.g,D.b=y.b*O.b*x.b,D.a=y.a*O.a*x.a,h&&(D.r*=D.a,D.g*=D.a,D.b*=D.a);var k=this.tempColor2;null==T.darkColor?k.set(0,0,0,1):(h?(k.r=T.darkColor.r*D.a,k.g=T.darkColor.g*D.a,k.b=T.darkColor.b*D.a):k.setFromColor(T.darkColor),k.a=h?1:0);var Y=T.data.blendMode;if(Y!=u&&(u=Y,i.setBlendMode(e.WebGLBlendModeConverter.getSourceGLBlendMode(u,h),e.WebGLBlendModeConverter.getDestGLBlendMode(u))),a.isClipping()){a.clipTriangles(v.vertices,v.numFloats,m,m.length,M,D,k,l);var V=new Float32Array(a.clippedVertices),N=a.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,z=V;if(l){X=0;for(var U=V.length;X-1&&this.restorables.splice(e,1)},t}();e.ManagedWebGLRenderingContext=i;var n=function(){function e(){}return e.getDestGLBlendMode=function(i){switch(i){case t.BlendMode.Normal:return e.ONE_MINUS_SRC_ALPHA;case t.BlendMode.Additive:return e.ONE;case t.BlendMode.Multiply:case t.BlendMode.Screen:return e.ONE_MINUS_SRC_ALPHA;default:throw new Error("Unknown blend mode: "+i)}},e.getSourceGLBlendMode=function(i,n){switch(void 0===n&&(n=!1),i){case t.BlendMode.Normal:case t.BlendMode.Additive:return n?e.ONE:e.SRC_ALPHA;case t.BlendMode.Multiply:return e.DST_COLOR;case t.BlendMode.Screen:return e.ONE;default:throw new Error("Unknown blend mode: "+i)}},e.ZERO=0,e.ONE=1,e.SRC_COLOR=768,e.ONE_MINUS_SRC_COLOR=769,e.SRC_ALPHA=770,e.ONE_MINUS_SRC_ALPHA=771,e.DST_ALPHA=772,e.ONE_MINUS_DST_ALPHA=773,e.DST_COLOR=774,e}();e.WebGLBlendModeConverter=n}(t.webgl||(t.webgl={}))}(n||(n={})),t.exports=n}).call(window)},function(t,e,i){var n=i(0),r=i(3),s=i(169),o=i(2),a=i(183),h=i(184),l=i(185),u=new n({Extends:h,initialize:function(t,e,i,n,s,u,c){var f,d,p,v=[],M=t.cacheManager.custom.spine;if(o(e)){var m=e;for(e=r(m,"key"),d=new a(t,{key:e,url:r(m,"jsonURL"),extension:r(m,"jsonExtension","json"),xhrSettings:r(m,"jsonXhrSettings")}),n=r(m,"atlasURL"),s=r(m,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),f=0;f>16&255)/255,n=(t>>8&255)/255,r=(255&t)/255,s=t>16777215?(t>>>24)/255:null,o=this.skeleton;if(e){var a=this.findSlot(e);a&&(o=a)}return o.color.r=i,o.color.g=n,o.color.b=r,null!==s&&(o.color.a=s),this},setSkeletonFromJSON:function(t,e,i,n){return this.setSkeleton(t,e,i,n)},setSkeleton:function(t,e,i,n){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,n);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkinByName("default"),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,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(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=v(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,i,n){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===i&&(i=0),void 0===n&&(n=0),this.width=t,this.height=e,this.displayOriginX=r.x-i,this.displayOriginY=r.y-n,this},setOffset:function(t,e){var i=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=i.x-t,this.displayOriginY=i.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,i=this.scaleX,n=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=i,t.scaleY=n,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 i=0;i0?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||s?r.TAU-(s>0?Math.acos(-n/this.scaleY):-Math.acos(n/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 i=this.matrix;return i[4]=i[0]*t+i[2]*e+i[4],i[5]=i[1]*t+i[3]*e+i[5],this},scale:function(t,e){var i=this.matrix;return i[0]*=t,i[1]*=t,i[2]*=e,i[3]*=e,this},rotate:function(t){var e=Math.sin(t),i=Math.cos(t),n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3];return n[0]=r*i+o*e,n[1]=s*i+a*e,n[2]=r*-e+o*i,n[3]=s*-e+a*i,this},multiply:function(t,e){var i=this.matrix,n=t.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],v=n[5],M=void 0===e?this:e;return M.a=u*r+c*o,M.b=u*s+c*a,M.c=f*r+d*o,M.d=f*s+d*a,M.e=p*r+v*o+h,M.f=p*s+v*a+l,M},multiplyWithOffset:function(t,e,i){var n=this.matrix,r=t.matrix,s=n[0],o=n[1],a=n[2],h=n[3],l=e*s+i*a+n[4],u=e*o+i*h+n[5],c=r[0],f=r[1],d=r[2],p=r[3],v=r[4],M=r[5];return n[0]=c*s+f*a,n[1]=c*o+f*h,n[2]=d*s+p*a,n[3]=d*o+p*h,n[4]=v*s+M*a+l,n[5]=v*o+M*h+u,this},transform:function(t,e,i,n,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],f=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=i*a+n*l,o[3]=i*h+n*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+f,this},transformPoint:function(t,e,i){void 0===i&&(i={x:0,y:0});var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5];return i.x=t*r+e*o+h,i.y=t*s+e*a+l,i},invert:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3],s=t[4],o=t[5],a=e*r-i*n;return t[0]=r/a,t[1]=-i/a,t[2]=-n/a,t[3]=e/a,t[4]=(n*o-r*s)/a,t[5]=-(e*o-i*s)/a,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,i,n,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=i,o[3]=n,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t=this.decomposedMatrix,e=this.matrix,i=e[0],n=e[1],r=e[2],s=e[3],o=i*s-n*r;if(t.translateX=e[4],t.translateY=e[5],i||n){var a=Math.sqrt(i*i+n*n);t.rotation=n>0?Math.acos(i/a):-Math.acos(i/a),t.scaleX=a,t.scaleY=o/a}else if(r||s){var h=Math.sqrt(r*r+s*s);t.rotation=.5*Math.PI-(s>0?Math.acos(-r/h):-Math.acos(r/h)),t.scaleX=o/h,t.scaleY=h}else t.rotation=0,t.scaleX=0,t.scaleY=0;return t},applyITRS:function(t,e,i,n,r){var s=this.matrix,o=Math.sin(i),a=Math.cos(i);return s[4]=t,s[5]=e,s[0]=a*n,s[1]=o*n,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,i){void 0===i&&(i=new s);var n=this.matrix,r=n[0],o=n[1],a=n[2],h=n[3],l=n[4],u=n[5],c=1/(r*h+a*-o);return i.x=h*c*t+-a*c*e+(u*a-l*h)*c,i.y=r*c*e+-o*c*t+(-u*r+l*o)*c,i},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},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=o},function(t,e){var i={_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=i},function(t,e,i){var n=i(0),r=i(195),s=i(196),o=i(202),a=i(203),h=new n({Extends:o,initialize:function(t,e){o.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},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,i){return this.scene.sys.input.enable(this,t,e,i),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},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,i=[];e&&(i.unshift(e.getIndex(t)),t=e,e.parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){if(void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy){this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this);var e=this.scene.sys;t||(e.displayList.remove(this),e.updateList.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,scaleMode:t.scaleMode,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){var n=i(0),r=i(197),s=new n({initialize:function(t,e){this.parent=t,this.events=e,e||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n