mirror of
https://github.com/photonstorm/phaser
synced 2024-12-14 15:22:57 +00:00
1 line
No EOL
331 KiB
JavaScript
1 line
No EOL
331 KiB
JavaScript
window.SpinePlugin=function(i){var n={};function r(t){if(n[t])return n[t].exports;var e=n[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=i,r.c=n,r.d=function(t,e,i){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=61)}([function(t,e){function s(t,e,i,n){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,d=f=void 0,d=(c=i)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&d.value&&"object"==typeof d.value&&(d=d.value),!(!d||!((f=d).get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===d.enumerable&&(d.enumerable=!0),void 0===d.configurable&&(d.configurable=!0),d));if(!1!==s){if(o=(n||t).prototype,a=r,h=void 0,(h=Object.getOwnPropertyDescriptor(o,a))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var o,a,h,l,u,c,f,d}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var i=0;i<e.length;i++)s(t,e[i].prototype||e[i])}}function p(t){var e,i,n;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");n=t.initialize,delete t.initialize}else{n=t.Extends?(i=t.Extends,function(){i.apply(this,arguments)}):function(){}}t.Extends?(n.prototype=Object.create(t.Extends.prototype),n.prototype.constructor=n,e=t.Extends,delete t.Extends):n.prototype.constructor=n;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),o(n,r),s(n,t,!0,e),n}p.extend=s,p.mixin=o,p.ignoreFinals=!1,t.exports=p},function(t,e){t.exports=function(){}},function(t,e,i){var n=i(0),r=i(32),s=new n({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,i=t.y-this.y;return Math.sqrt(e*e+i*i)},distanceSq:function(t){var e=t.x-this.x,i=t.y-this.y;return e*e+i*i},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,i=t*t+e*e;return 0<i&&(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},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var 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},limit:function(t){var e=this.length();return e&&t<e&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),i=Math.sin(t);return this.set(e*this.x-i*this.y,i*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){var i={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=i},function(t,e){t.exports=function(t,e,i){return Math.max(e,Math.min(i,t))}},function(t,e){t.exports=function(t,e,i,n){var r=t.length;if(e<0||r<e||i<=e||r<i||r<e+i){if(n)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports=function(t,e,i){var n=i-e;return e+((t-e)%n+n)%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("."))return i;for(var n=e.split("."),r=t,s=i,o=0;o<n.length;o++){if(!r.hasOwnProperty(n[o])){s=i;break}s=r[n[o]],r=r[n[o]]}return s}return i}},function(t,e){t.exports=function(t,e,i){var n=typeof t;return t&&"number"!=n&&"string"!=n&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:i}},function(t,e,i){var n=i(0),r=i(26),s=new n({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},function(t,e,i){var n=i(3);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,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},min:function(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this},max:function(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this},clone:function(){return new n(this.x,this.y,this.z)},addVectors:function(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this},crossVectors:function(t,e){var 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},setFromMatrixPosition:function(t){return this.fromArray(t.val,12)},setFromMatrixColumn:function(t,e){return this.fromArray(t.val,4*e)},fromArray:function(t,e){return void 0===e&&(e=0),this.x=t[e],this.y=t[e+1],this.z=t[e+2],this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},addScalar:function(t){return this.x+=t,this.y+=t,this.z+=t,this},addScale:function(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,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 0<n&&(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},applyMatrix3:function(t){var e=this.x,i=this.y,n=this.z,r=t.val;return this.x=r[0]*e+r[3]*i+r[6]*n,this.y=r[1]*e+r[4]*i+r[7]*n,this.z=r[2]*e+r[5]*i+r[8]*n,this},applyMatrix4:function(t){var e=this.x,i=this.y,n=this.z,r=t.val,s=1/(r[3]*e+r[7]*i+r[11]*n+r[15]);return this.x=(r[0]*e+r[4]*i+r[8]*n+r[12])*s,this.y=(r[1]*e+r[5]*i+r[9]*n+r[13])*s,this.z=(r[2]*e+r[6]*i+r[10]*n+r[14])*s,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],g=r[10],v=r[11],m=r[12],M=r[13],x=r[14],y=1/(e*h+i*f+n*v+r[15]);return this.x=(e*s+i*l+n*d+m)*y,this.y=(e*o+i*u+n*p+M)*y,this.z=(e*a+i*c+n*g+x)*y,this},projectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unprojectViewMatrix:function(t,e){return this.applyMatrix4(t).applyMatrix4(e)},unproject:function(t,e){var 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,i){var n=i(3);t.exports=function(t){return t*n.RAD_TO_DEG}},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(24),r=i(55);t.exports=function(t,e){if(void 0===e&&(e=90),!n(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var i=0;i<t.length;i++)t[i].reverse();t.reverse()}return t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var i=t.length-1,n=t[e],r=e;r<i;r++)t[r]=t[r+1];return t.length=i,n}}},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,i){var n=i(3);t.exports=function(t){return t*n.DEG_TO_RAD}},function(t,e,i){var n=i(0),r=i(12),s=new n({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new s(this)},set:function(t){return this.copy(t)},setValues:function(t,e,i,n,r,s,o,a,h,l,u,c,f,d,p,g){var v=this.val;return v[0]=t,v[1]=e,v[2]=i,v[3]=n,v[4]=r,v[5]=s,v[6]=o,v[7]=a,v[8]=h,v[9]=l,v[10]=u,v[11]=c,v[12]=f,v[13]=d,v[14]=p,v[15]=g,this},copy:function(t){var e=t.val;return this.setValues(e[0],e[1],e[2],e[3],e[4],e[5],e[6],e[7],e[8],e[9],e[10],e[11],e[12],e[13],e[14],e[15])},fromArray:function(t){return this.setValues(t[0],t[1],t[2],t[3],t[4],t[5],t[6],t[7],t[8],t[9],t[10],t[11],t[12],t[13],t[14],t[15])},zero:function(){return this.setValues(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)},transform:function(t,e,i){var n=h.fromQuat(i).val,r=e.x,s=e.y,o=e.z;return this.setValues(n[0]*r,n[1]*r,n[2]*r,0,n[4]*s,n[5]*s,n[6]*s,0,n[8]*o,n[9]*o,n[10]*o,0,t.x,t.y,t.z,1)},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(){return this.setValues(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1)},transpose:function(){var t=this.val,e=t[1],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},getInverse:function(t){return this.copy(t),this.invert()},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],g=t[14],v=t[15],m=e*o-i*s,M=e*a-n*s,x=e*h-r*s,y=i*a-n*o,w=i*h-r*o,T=n*h-r*a,E=l*p-u*d,b=l*g-c*d,A=l*v-f*d,R=u*g-c*p,S=u*v-f*p,C=c*v-f*g,I=m*C-M*S+x*R+y*A-w*b+T*E;return I?(I=1/I,this.setValues((o*C-a*S+h*R)*I,(n*S-i*C-r*R)*I,(p*T-g*w+v*y)*I,(c*w-u*T-f*y)*I,(a*A-s*C-h*b)*I,(e*C-n*A+r*b)*I,(g*x-d*T-v*M)*I,(l*T-c*x+f*M)*I,(s*S-o*A+h*E)*I,(i*A-e*S-r*E)*I,(d*w-p*x+v*m)*I,(u*x-l*w-f*m)*I,(o*b-s*R-a*E)*I,(e*R-i*b+n*E)*I,(p*M-d*y-g*m)*I,(l*y-u*M+c*m)*I)):this},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],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],g=t[14],v=t[15];return this.setValues(o*(c*v-f*g)-u*(a*v-h*g)+p*(a*f-h*c),-(i*(c*v-f*g)-u*(n*v-r*g)+p*(n*f-r*c)),i*(a*v-h*g)-o*(n*v-r*g)+p*(n*h-r*a),-(i*(a*f-h*c)-o*(n*f-r*c)+u*(n*h-r*a)),-(s*(c*v-f*g)-l*(a*v-h*g)+d*(a*f-h*c)),e*(c*v-f*g)-l*(n*v-r*g)+d*(n*f-r*c),-(e*(a*v-h*g)-s*(n*v-r*g)+d*(n*h-r*a)),e*(a*f-h*c)-s*(n*f-r*c)+l*(n*h-r*a),s*(u*v-f*p)-l*(o*v-h*p)+d*(o*f-h*u),-(e*(u*v-f*p)-l*(i*v-r*p)+d*(i*f-r*u)),e*(o*v-h*p)-s*(i*v-r*p)+d*(i*h-r*o),-(e*(o*f-h*u)-s*(i*f-r*u)+l*(i*h-r*o)),-(s*(u*g-c*p)-l*(o*g-a*p)+d*(o*c-a*u)),e*(u*g-c*p)-l*(i*g-n*p)+d*(i*c-n*u),-(e*(o*g-a*p)-s*(i*g-n*p)+d*(i*a-n*o)),e*(o*c-a*u)-s*(i*c-n*u)+l*(i*a-n*o))},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],g=t[14],v=t[15];return(e*o-i*s)*(c*v-f*g)-(e*a-n*s)*(u*v-f*p)+(e*h-r*s)*(u*g-c*p)+(i*a-n*o)*(l*v-f*d)-(i*h-r*o)*(l*g-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],g=e[13],v=e[14],m=e[15],M=t.val,x=M[0],y=M[1],w=M[2],T=M[3];return e[0]=x*i+y*o+w*u+T*p,e[1]=x*n+y*a+w*c+T*g,e[2]=x*r+y*h+w*f+T*v,e[3]=x*s+y*l+w*d+T*m,x=M[4],y=M[5],w=M[6],T=M[7],e[4]=x*i+y*o+w*u+T*p,e[5]=x*n+y*a+w*c+T*g,e[6]=x*r+y*h+w*f+T*v,e[7]=x*s+y*l+w*d+T*m,x=M[8],y=M[9],w=M[10],T=M[11],e[8]=x*i+y*o+w*u+T*p,e[9]=x*n+y*a+w*c+T*g,e[10]=x*r+y*h+w*f+T*v,e[11]=x*s+y*l+w*d+T*m,x=M[12],y=M[13],w=M[14],T=M[15],e[12]=x*i+y*o+w*u+T*p,e[13]=x*n+y*a+w*c+T*g,e[14]=x*r+y*h+w*f+T*v,e[15]=x*s+y*l+w*d+T*m,this},multiplyLocal:function(t){var e=this.val,i=t.val;return this.setValues(e[0]*i[0]+e[1]*i[4]+e[2]*i[8]+e[3]*i[12],e[0]*i[1]+e[1]*i[5]+e[2]*i[9]+e[3]*i[13],e[0]*i[2]+e[1]*i[6]+e[2]*i[10]+e[3]*i[14],e[0]*i[3]+e[1]*i[7]+e[2]*i[11]+e[3]*i[15],e[4]*i[0]+e[5]*i[4]+e[6]*i[8]+e[7]*i[12],e[4]*i[1]+e[5]*i[5]+e[6]*i[9]+e[7]*i[13],e[4]*i[2]+e[5]*i[6]+e[6]*i[10]+e[7]*i[14],e[4]*i[3]+e[5]*i[7]+e[6]*i[11]+e[7]*i[15],e[8]*i[0]+e[9]*i[4]+e[10]*i[8]+e[11]*i[12],e[8]*i[1]+e[9]*i[5]+e[10]*i[9]+e[11]*i[13],e[8]*i[2]+e[9]*i[6]+e[10]*i[10]+e[11]*i[14],e[8]*i[3]+e[9]*i[7]+e[10]*i[11]+e[11]*i[15],e[12]*i[0]+e[13]*i[4]+e[14]*i[8]+e[15]*i[12],e[12]*i[1]+e[13]*i[5]+e[14]*i[9]+e[15]*i[13],e[12]*i[2]+e[13]*i[6]+e[14]*i[10]+e[15]*i[14],e[12]*i[3]+e[13]*i[7]+e[14]*i[11]+e[15]*i[15])},premultiply:function(t){return this.multiplyMatrices(t,this)},multiplyMatrices:function(t,e){var i=t.val,n=e.val,r=i[0],s=i[4],o=i[8],a=i[12],h=i[1],l=i[5],u=i[9],c=i[13],f=i[2],d=i[6],p=i[10],g=i[14],v=i[3],m=i[7],M=i[11],x=i[15],y=n[0],w=n[4],T=n[8],E=n[12],b=n[1],A=n[5],R=n[9],S=n[13],C=n[2],I=n[6],P=n[10],_=n[14],L=n[3],k=n[7],O=n[11],F=n[15];return this.setValues(r*y+s*b+o*C+a*L,h*y+l*b+u*C+c*L,f*y+d*b+p*C+g*L,v*y+m*b+M*C+x*L,r*w+s*A+o*I+a*k,h*w+l*A+u*I+c*k,f*w+d*A+p*I+g*k,v*w+m*A+M*I+x*k,r*T+s*R+o*P+a*O,h*T+l*R+u*P+c*O,f*T+d*R+p*P+g*O,v*T+m*R+M*P+x*O,r*E+s*S+o*_+a*F,h*E+l*S+u*_+c*F,f*E+d*S+p*_+g*F,v*E+m*S+M*_+x*F)},translate:function(t){return this.translateXYZ(t.x,t.y,t.z)},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){return this.scaleXYZ(t.x,t.y,t.z)},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.setValues(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)},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 this;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],g=i[5],v=i[6],m=i[7],M=i[8],x=i[9],y=i[10],w=i[11],T=i[12],E=i[13],b=i[14],A=i[15],R=n*n*l+h,S=r*n*l+s*a,C=s*n*l-r*a,I=n*r*l-s*a,P=r*r*l+h,_=s*r*l+n*a,L=n*s*l+r*a,k=r*s*l-n*a,O=s*s*l+h;return this.setValues(u*R+p*S+M*C,c*R+g*S+x*C,f*R+v*S+y*C,d*R+m*S+w*C,u*I+p*P+M*_,c*I+g*P+x*_,f*I+v*P+y*_,d*I+m*P+w*_,u*L+p*k+M*O,c*L+g*k+x*O,f*L+v*k+y*O,d*L+m*k+w*O,T,E,b,A)},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=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,g=s*o,v=s*a,m=s*h;return this.setValues(1-(f+p),u+m,c-v,0,u-m,1-(l+p),d+g,0,c+v,d-g,1-(l+f),0,e.x,e.y,e.z,1)},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,g=r*o,v=r*a;return this.setValues(1-(c+d),l+v,u-g,0,l-v,1-(h+d),f+p,0,u+g,f-p,1-(h+c),0,0,0,0,1)},frustum:function(t,e,i,n,r,s){var o=1/(e-t),a=1/(n-i),h=1/(r-s);return this.setValues(2*r*o,0,0,0,0,2*r*a,0,0,(e+t)*o,(n+i)*a,(s+r)*h,-1,0,0,s*r*2*h,0)},perspective:function(t,e,i,n){var r=1/Math.tan(t/2),s=1/(i-n);return this.setValues(r/e,0,0,0,0,r,0,0,0,0,(n+i)*s,-1,0,0,2*n*i*s,0)},perspectiveLH:function(t,e,i,n){return this.setValues(2*i/t,0,0,0,0,2*i/e,0,0,0,0,-n/(i-n),1,0,0,i*n/(i-n),0)},ortho:function(t,e,i,n,r,s){var o=0===(o=t-e)?o:1/o,a=0===(a=i-n)?a:1/a,h=0===(h=r-s)?h:1/h;return this.setValues(-2*o,0,0,0,0,-2*a,0,0,0,0,2*h,0,(t+e)*o,(n+i)*a,(s+r)*h,1)},lookAtRH:function(t,e,i){var n=this.val;return u.subVectors(t,e),0===u.getLengthSquared()&&(u.z=1),u.normalize(),o.crossVectors(i,u),0===o.getLengthSquared()&&(1===Math.abs(i.z)?u.x+=1e-4:u.z+=1e-4,u.normalize(),o.crossVectors(i,u)),o.normalize(),a.crossVectors(u,o),n[0]=o.x,n[1]=o.y,n[2]=o.z,n[4]=a.x,n[5]=a.y,n[6]=a.z,n[8]=u.x,n[9]=u.y,n[10]=u.z,this},lookAt:function(t,e,i){var n=t.x,r=t.y,s=t.z,o=i.x,a=i.y,h=i.z,l=e.x,u=e.y,c=e.z;if(Math.abs(n-l)<1e-6&&Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6)return this.identity();var f=n-l,d=r-u,p=s-c,g=1/Math.sqrt(f*f+d*d+p*p),v=a*(p*=g)-h*(d*=g),m=h*(f*=g)-o*p,M=o*d-a*f;(g=Math.sqrt(v*v+m*m+M*M))?(v*=g=1/g,m*=g,M*=g):M=m=v=0;var x=d*M-p*m,y=p*v-f*M,w=f*m-d*v;return(g=Math.sqrt(x*x+y*y+w*w))?(x*=g=1/g,y*=g,w*=g):w=y=x=0,this.setValues(v,x,f,0,m,y,d,0,M,w,p,0,-(v*n+m*r+M*s),-(x*n+y*r+w*s),-(f*n+d*r+p*s),1)},yawPitchRoll:function(t,e,i){this.zero(),h.zero(),l.zero();var n=this.val,r=h.val,s=l.val,o=Math.sin(i),a=Math.cos(i);return n[10]=1,n[15]=1,n[0]=a,n[1]=o,n[4]=-o,n[5]=a,o=Math.sin(e),a=Math.cos(e),r[0]=1,r[15]=1,r[5]=a,r[10]=a,r[9]=-o,r[6]=o,o=Math.sin(t),a=Math.cos(t),s[5]=1,s[15]=1,s[0]=a,s[2]=-o,s[8]=o,s[10]=a,this.multiplyLocal(h),this.multiplyLocal(l),this},setWorldMatrix:function(t,e,i,n,r){return this.yawPitchRoll(t.y,t.x,t.z),h.scaling(i.x,i.y,i.z),l.xyz(e.x,e.y,e.z),this.multiplyLocal(h),this.multiplyLocal(l),n&&this.multiplyLocal(n),r&&this.multiplyLocal(r),this},multiplyToMat4:function(t,e){var i=this.val,n=t.val,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=i[6],c=i[7],f=i[8],d=i[9],p=i[10],g=i[11],v=i[12],m=i[13],M=i[14],x=i[15],y=n[0],w=n[1],T=n[2],E=n[3],b=n[4],A=n[5],R=n[6],S=n[7],C=n[8],I=n[9],P=n[10],_=n[11],L=n[12],k=n[13],O=n[14],F=n[15];return e.setValues(y*r+w*h+T*f+E*v,w*s+w*l+T*d+E*m,T*o+w*u+T*p+E*M,E*a+w*c+T*g+E*x,b*r+A*h+R*f+S*v,b*s+A*l+R*d+S*m,b*o+A*u+R*p+S*M,b*a+A*c+R*g+S*x,C*r+I*h+P*f+_*v,C*s+I*l+P*d+_*m,C*o+I*u+P*p+_*M,C*a+I*c+P*g+_*x,L*r+k*h+O*f+F*v,L*s+k*l+O*d+F*m,L*o+k*u+O*p+F*M,L*a+k*c+O*g+F*x)},fromRotationXYTranslation:function(t,e,i){var n=e.x,r=e.y,s=e.z,o=Math.sin(t.x),a=Math.cos(t.x),h=Math.sin(t.y),l=Math.cos(t.y),u=n,c=r,f=s,d=-o,p=0-d*h,g=0-a*h,v=d*l,m=a*l;return i||(u=l*n+h*s,c=p*n+a*r+v*s,f=g*n+o*r+m*s),this.setValues(l,p,g,0,0,a,o,0,h,v,m,0,u,c,f,1)},getMaxScaleOnAxis:function(){var t=this.val,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],i=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],n=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,i,n))}}),h=new s,l=new s,o=new r,a=new r,u=new r;t.exports=s},function(t,e,i){var n=i(0),r=i(14),s=i(202),o=i(9),a=i(213),h=i(44),l=i(214),u=i(45),c=new n({initialize:function(t,e){this.loader=t,this.cache=o(e,"cache",!1),this.type=o(e,"type",!1),this.key=o(e,"key",!1);var i=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+i),!this.type||!this.key)throw new Error("Invalid Loader."+this.type+" key");var n=o(e,"url");void 0===n?n=t.path+i+"."+o(e,"extension",""):"string"!=typeof n||n.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)||(n=t.path+n),this.url=n,this.src="",this.xhrSettings=u(o(e,"responseType",void 0)),o(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,o(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=o(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=a(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var i=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,n=!(e.target&&200!==e.target.status)||i;4===t.readyState&&400<=t.status&&t.status<=599&&(n=!1),this.state=r.FILE_LOADED,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){var n;"function"==typeof URL?t.src=URL.createObjectURL(e):((n=new FileReader).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(0),s=i(3),c=i(2),r=new n({initialize:function(t,e,i,n,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,i,n,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],i=t[1],n=t[2],r=t[3];return e||i?0<i?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):n||r?s.TAU-(0<r?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],g=n[5],v=void 0===e?this:e;return v.a=u*r+c*o,v.b=u*s+c*a,v.c=f*r+d*o,v.d=f*s+d*a,v.e=p*r+g*o+h,v.f=p*s+g*a+l,v},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],g=r[4],v=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]=g*s+v*a+l,n[5]=g*o+v*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,e,i=this.decomposedMatrix,n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=r*a-s*o;return i.translateX=n[4],i.translateY=n[5],r||s?(t=Math.sqrt(r*r+s*s),i.rotation=0<s?Math.acos(r/t):-Math.acos(r/t),i.scaleX=t,i.scaleY=h/t):o||a?(e=Math.sqrt(o*o+a*a),i.rotation=.5*Math.PI-(0<a?Math.acos(-o/e):-Math.acos(o/e)),i.scaleX=h/e,i.scaleY=e):(i.rotation=0,i.scaleX=0,i.scaleY=0),i},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 c);var n=this.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=1/(r*a+o*-s);return i.x=a*u*t+-o*u*e+(l*o-h*a)*u,i.y=r*u*e+-s*u*t+(-l*r+h*s)*u,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},getXRound:function(t,e,i){var n=this.getX(t,e);return i&&(n=Math.round(n)),n},getYRound:function(t,e,i){var n=this.getY(t,e);return i&&(n=Math.round(n)),n},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,i=1;i<t.length;i++)if(t[i].length!==e)return!1;return!0}},function(t,e,i){var n=i(0),r=i(296),s=i(59),o=i(297),a=i(26),h=i(298),l=i(303),u=new n({initialize:function(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.type=a.RECTANGLE,this.x=t,this.y=e,this.width=i,this.height=n},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,i){return o(this,t,e,i)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,i,n){return this.x=t,this.y=e,this.width=i,this.height=n,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,i){var u=i(6),c=function(){var t,e,i,n,r,s,o=arguments[0]||{},a=1,h=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[1]||{},a=2),h===a&&(o=this,--a);a<h;a++)if(null!=(t=arguments[a]))for(e in t)i=o[e],o!==(n=t[e])&&(l&&n&&(u(n)||(r=Array.isArray(n)))?(s=r?(r=!1,i&&Array.isArray(i)?i:[]):i&&u(i)?i:{},o[e]=c(l,s,n)):void 0!==n&&(o[e]=n));return o};t.exports=c},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(n-e,i-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,i){var n=i(7);t.exports=function(t){return n(t,-Math.PI,Math.PI)}},function(t,e,i){var n=i(7);t.exports=function(t){return n(t,-180,180)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),Math.abs(t-e)<i}},function(t,e,i){var n=i(34);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:i<=t?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){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){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,i){var g=i(2);t.exports=function(t,e,i,n,r,s,o,a){void 0===a&&(a=new g);var h=Math.sin(r),l=Math.cos(r),u=l*s,c=h*s,f=-h*o,d=l*o,p=1/(u*d+f*-c);return a.x=d*p*t+-f*p*e+(n*f-i*d)*p,a.y=u*p*e+-c*p*t+(-n*u+i*c)*p,a}},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],g=c[3],v=c[4],m=c[5],M=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]=g*i+v*s+m*h,e[4]=g*n+v*o+m*l,e[5]=g*r+v*a+m*u,e[6]=M*i+x*s+y*h,e[7]=M*n+x*o+y*l,e[8]=M*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,g=r*o,v=r*a,m=this.val;return m[0]=1-(c+d),m[3]=l+v,m[6]=u-g,m[1]=l-v,m[4]=1-(h+d),m[7]=f+p,m[2]=u+g,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],g=e[12],v=e[13],m=e[14],M=e[15],x=n*h-r*a,y=n*l-s*a,w=n*u-o*a,T=r*l-s*h,E=r*u-o*h,b=s*u-o*l,A=c*v-f*g,R=c*m-d*g,S=c*M-p*g,C=f*m-d*v,I=f*M-p*v,P=d*M-p*m,_=x*P-y*I+w*C+T*S-E*R+b*A;return _?(_=1/_,i[0]=(h*P-l*I+u*C)*_,i[1]=(l*S-a*P-u*R)*_,i[2]=(a*I-h*S+u*A)*_,i[3]=(s*I-r*P-o*C)*_,i[4]=(n*P-s*S+o*R)*_,i[5]=(r*S-n*I-o*A)*_,i[6]=(v*b-m*E+M*T)*_,i[7]=(m*w-g*b-M*y)*_,i[8]=(g*E-v*w+M*x)*_,this):null}});t.exports=n},function(t,e,i){var n=i(0),r=i(42),s=i(1),o=i(12),a=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),l=new o(1,0,0),u=new o(0,1,0),c=new o,f=new r,d=new n({initialize:function(t,e,i,n){this.onChangeCallback=s,this.set(t,e,i,n)},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},w:{get:function(){return this._w},set:function(t){this._w=t,this.onChangeCallback(this)}},copy:function(t){return this.set(t)},set:function(t,e,i,n,r){return void 0===r&&(r=!0),"object"==typeof t?(this._x=t.x||0,this._y=t.y||0,this._z=t.z||0,this._w=t.w||0):(this._x=t||0,this._y=e||0,this._z=i||0,this._w=n||0),r&&this.onChangeCallback(this),this},add:function(t){return this._x+=t.x,this._y+=t.y,this._z+=t.z,this._w+=t.w,this.onChangeCallback(this),this},subtract:function(t){return this._x-=t.x,this._y-=t.y,this._z-=t.z,this._w-=t.w,this.onChangeCallback(this),this},scale:function(t){return this._x*=t,this._y*=t,this._z*=t,this._w*=t,this.onChangeCallback(this),this},length:function(){var t=this.x,e=this.y,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 0<r&&(r=1/Math.sqrt(r),this._x=t*r,this._y=e*r,this._z=i*r,this._w=n*r),this.onChangeCallback(this),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var i=this.x,n=this.y,r=this.z,s=this.w;return this.set(i+e*(t.x-i),n+e*(t.y-n),r+e*(t.z-r),s+e*(t.w-s))},rotationTo:function(t,e){var i=t.x*e.x+t.y*e.y+t.z*e.z;return i<-.999999?(c.copy(l).cross(t).length()<1e-6&&c.copy(u).cross(t),c.normalize(),this.setAxisAngle(c,Math.PI)):.999999<i?this.set(0,0,0,1):(c.copy(t).cross(e),this._x=c.x,this._y=c.y,this._z=c.z,this._w=1+i,this.normalize())},setAxes:function(t,e,i){var n=f.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(f).normalize()},identity:function(){return this.set(0,0,0,1)},setAxisAngle:function(t,e){e*=.5;var i=Math.sin(e);return this.set(i*t.x,i*t.y,i*t.z,Math.cos(e))},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.set(e*h+r*s+i*a-n*o,i*h+r*o+n*s-e*a,n*h+r*a+e*o-i*s,r*h-e*s-i*o-n*a)},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,f,d=1-e,p=e;return 1e-6<1-u&&(c=Math.acos(u),f=Math.sin(c),d=Math.sin((1-e)*c)/f,p=Math.sin(e*c)/f),this.set(d*i+p*o,d*n+p*a,d*r+p*h,d*s+p*l)},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.set(-t*s,-e*s,-i*s,n*s)},conjugate:function(){return this._x=-this.x,this._y=-this.y,this._z=-this.z,this.onChangeCallback(this),this},rotateX:function(t){t*=.5;var e=this.x,i=this.y,n=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.set(e*o+r*s,i*o+n*s,n*o-i*s,r*o-e*s)},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.set(e*o-n*s,i*o+r*s,n*o+e*s,r*o-i*s)},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.set(e*o+i*s,i*o-e*s,n*o+r*s,r*o-n*s)},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},setFromEuler:function(t,e){var i=t.x/2,n=t.y/2,r=t.z/2,s=Math.cos(i),o=Math.cos(n),a=Math.cos(r),h=Math.sin(i),l=Math.sin(n),u=Math.sin(r);switch(t.order){case"XYZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"YXZ":this.set(h*o*a+s*l*u,s*l*a-h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"ZXY":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u+h*l*a,s*o*a-h*l*u,e);break;case"ZYX":this.set(h*o*a-s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a+h*l*u,e);break;case"YZX":this.set(h*o*a+s*l*u,s*l*a+h*o*u,s*o*u-h*l*a,s*o*a-h*l*u,e);break;case"XZY":this.set(h*o*a-s*l*u,s*l*a-h*o*u,s*o*u+h*l*a,s*o*a+h*l*u,e)}return this},setFromRotationMatrix:function(t){var e,i=t.val,n=i[0],r=i[4],s=i[8],o=i[1],a=i[5],h=i[9],l=i[2],u=i[6],c=i[10],f=n+a+c;return 0<f?(e=.5/Math.sqrt(f+1),this.set((u-h)*e,(s-l)*e,(o-r)*e,.25/e)):a<n&&c<n?(e=2*Math.sqrt(1+n-a-c),this.set(.25*e,(r+o)/e,(s+l)/e,(u-h)/e)):c<a?(e=2*Math.sqrt(1+a-n-c),this.set((r+o)/e,.25*e,(h+u)/e,(s-l)/e)):(e=2*Math.sqrt(1+c-n-a),this.set((s+l)/e,(h+u)/e,.25*e,(o-r)/e)),this},fromMat3:function(t){var e,i,n,r,s=t.val,o=s[0]+s[4]+s[8];return 0<o?(r=Math.sqrt(o+1),this.w=.5*r,r=.5/r,this._x=(s[7]-s[5])*r,this._y=(s[2]-s[6])*r,this._z=(s[3]-s[1])*r):(e=0,s[4]>s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),i=a[e],n=a[i],r=Math.sqrt(s[3*e+e]-s[3*i+i]-s[3*n+n]+1),h[e]=.5*r,r=.5/r,h[i]=(s[3*i+e]+s[3*e+i])*r,h[n]=(s[3*n+e]+s[3*e+n])*r,this._x=h[0],this._y=h[1],this._z=h[2],this._w=(s[3*n+i]-s[3*i+n])*r),this.onChangeCallback(this),this}});t.exports=d},function(t,e,i){var r=i(27),s=i(45);t.exports=function(t,e){var i=void 0===t?s():r({},t);if(e)for(var n in e)void 0!==e[n]&&(i[n]=e[n]);return i}},function(t,e){t.exports=function(t,e,i,n,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===i&&(i=""),void 0===n&&(n=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:i,password:n,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){var i={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=i},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var i={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=i},function(t,e,i){var n=i(3),r=i(23),h=i(41),s=i(30),o=i(31),l=i(2),a={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return o(this._rotation*n.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*n.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===i&&(i=0),void 0===n&&(n=0),this.x=t,this.y=e,this.z=i,this.w=n,this},copyPosition:function(t){return void 0!==t.x&&(this.x=t.x),void 0!==t.y&&(this.y=t.y),void 0!==t.z&&(this.z=t.z),void 0!==t.w&&(this.w=t.w),this},setRandomPosition:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=this.scene.sys.scale.width),void 0===n&&(n=this.scene.sys.scale.height),this.x=t+Math.random()*i,this.y=e+Math.random()*n,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var i=this.parentContainer;if(!i)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);i;)e.applyITRS(i.x,i.y,i._rotation,i._scaleX,i._scaleY),e.multiply(t,t),i=i.parentContainer;return t},getLocalPoint:function(t,e,i,n){i=i||new l;var r=(n=n||this.scene.sys.cameras.main).scrollX,s=n.scrollY,o=t+r*this.scrollFactorX-r,a=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,a,i):h(o,a,this.x,this.y,this.rotation,this.scaleX,this.scaleY,i),this._originComponent&&(i.x+=this._displayOriginX,i.y+=this._displayOriginY),i},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=a},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(53),s=i(219),o=i(226),a=i(54),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},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,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},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,i=[];e&&(i.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return i.unshift(this.scene.sys.displayList.getIndex(t)),i},destroy:function(t){var e;void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(a.DESTROY,this),e=this.scene.sys,t||e.displayList.remove(this),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners())}});h.RENDER_MASK=15,t.exports=h},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,i){t.exports={ADDED_TO_SCENE:i(227),DESTROY:i(228),REMOVED_FROM_SCENE:i(229),VIDEO_COMPLETE:i(230),VIDEO_CREATED:i(231),VIDEO_ERROR:i(232),VIDEO_LOOP:i(233),VIDEO_PLAY:i(234),VIDEO_SEEKED:i(235),VIDEO_SEEKING:i(236),VIDEO_STOP:i(237),VIDEO_TIMEOUT:i(238),VIDEO_UNLOCKED:i(239)}},function(t,e){t.exports=function(t){for(var e=t.length,i=t[0].length,n=new Array(i),r=0;r<i;r++){n[r]=new Array(e);for(var s=e-1;-1<s;s--)n[r][s]=t[s][r]}return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.shift(),t.push(i);return i}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var i=null,n=0;n<e;n++)i=t.pop(),t.unshift(i);return i}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var i=Math.floor(Math.random()*(e+1)),n=t[e];t[e]=t[i],t[i]=n}return t}},function(t,e,i){var r=i(60),s=i(10);t.exports=function(t,e,i){if(void 0===i&&(i=new s),e<=0||1<=e)return i.x=t.x,i.y=t.y,i;var n=r(t)*e;return.5<e?(n-=t.width+t.height)<=t.width?(i.x=t.right-n,i.y=t.bottom):(i.x=t.x,i.y=t.bottom-(n-t.width)):n<=t.width?(i.x=t.x+n,i.y=t.y):(i.x=t.right,i.y=t.y+(n-t.width)),i}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,i){var n,u=i(62),r=i(0),p=i(8),s=i(174),o=i(175),g=i(199),h=i(200),c=i(218),a=i(251),f=i(1),l=new r({Extends:o,initialize:function(t,e){o.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=g,this.temp1,this.temp2,this.isWebGL?(this.runtime=g.webgl,this.renderer=i.renderer,this.gl=i.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=g.canvas,this.renderer=i.renderer,this.getAtlas=this.getAtlasCanvas),this.renderer||(this.renderer={width:i.scale.width,height:i.scale.height,preRender:f,postRender:f,render:f,destroy:f});var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,i,n,r){var s=new c(this.scene,l,t,e,i,n,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var i=p(t,"key",null),n=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,i,n,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var o=p(t,"skinName",!1);o&&s.setSkinByName(o);var a=p(t,"slotName",!1),h=p(t,"attachmentName",null);return a&&s.setAttachment(a,h),s.refresh()}),e.registerGameObject("spineContainer",function(t,e,i){var n=new a(this.scene,l,t,e,i);return this.displayList.add(n),n},function(t,e){void 0===t&&(t={});var i=p(t,"x",0),n=p(t,"y",0),r=p(t,"children",null),s=new a(this.scene,l,i,n,r);return void 0!==e&&(t.add=e),u(this.scene,s,t),s})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(s,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this),this.game.events.once("destroy",this.gameDestroy,this)},bootCanvas:function(){this.skeletonRenderer=new g.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){function t(t,e){var i;t===this.srcBlend&&e===this.dstBlend||(i=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),i.blendFunc(this.srcBlend,this.dstBlend)))}n||((n=new g.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0)).batcher.setBlendMode=t,n.shapes.setBlendMode=t),this.sceneRenderer=n,this.skeletonRenderer=n.skeletonRenderer,this.skeletonDebugRenderer=n.skeletonDebugRenderer,this.temp1=new g.webgl.Vector3(0,0,0),this.temp2=new g.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var i,n=this.spineTextures;return n.has(t)?n.get(t):(i=this.textures,new g.TextureAtlas(e.data,function(t){return new g.canvas.CanvasTexture(i.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var i,n,r=this.spineTextures,s=r.has(t)?r.get(t):(i=this.textures,(n=this.sceneRenderer.context.gl).pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new g.TextureAtlas(e.data,function(t){return new g.webgl.GLTexture(n,i.get(e.prefix+t).getSourceImage(),!1)}));return s}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<t.length;a++)o=new h(this,t[a]),this.addFile(o.files);else o=new h(this,t,e,i,n,r,s),this.addFile(o.files);return this},worldToLocal:function(t,e,i,n){var r=this.temp1,s=this.temp2,o=this.sceneRenderer.camera;r.set(t+i.x,e-i.y,0);var a=o.viewportWidth,h=o.viewportHeight;return o.screenToWorld(r,a,h),n&&null!==n.parent?(n.parent.worldToLocal(s.set(r.x-i.x,r.y-i.y,0)),new g.Vector2(s.x,s.y)):n?new g.Vector2(r.x-i.x,r.y-i.y):new g.Vector2(r.x,r.y)},getVector2:function(t,e){return new g.Vector2(t,e)},getVector3:function(t,e,i){return new g.webgl.Vector3(t,e,i)},setDebugBones:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBones=t,this},setDebugRegionAttachments:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawRegionAttachments=t,this},setDebugBoundingBoxes:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBoundingBoxes=t,this},setDebugMeshHull:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshHull=t,this},setDebugMeshTriangles:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshTriangles=t,this},setDebugPaths:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawPaths=t,this},setDebugSkeletonXY:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawSkeletonXY=t,this},setDebugClipping:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawClipping=t,this},setEffect:function(t){return this.sceneRenderer.skeletonRenderer.vertexEffect=t,this},createSkeleton:function(t,e){var i,n=t,r=t,s=-1!==t.indexOf(".");s&&(n=(i=t.split(".")).shift(),r=i.join("."));var o=this.cache.get(n),a=this.getAtlas(n);if(!a)return null;this.spineTextures.has(n)||this.spineTextures.add(n,a);var h,l,u=o.preMultipliedAlpha,c=new g.AtlasAttachmentLoader(a),f=new g.SkeletonJson(c);if(l=e||(h=this.json.get(n),s?p(h,r):h)){var d=f.readSkeletonData(l);return{skeletonData:d,skeleton:new g.Skeleton(d),preMultipliedAlpha:u}}return null},createAnimationState:function(t){var e=new g.AnimationStateData(t.data);return{stateData:e,state:new g.AnimationState(e)}},getBounds:function(t){var e=new g.Vector2,i=new g.Vector2;return t.getBounds(e,i,[]),{offset:e,size:i}},onResize:function(){var t=this.renderer,e=this.sceneRenderer,i=t.width,n=t.height;e.camera.position.x=i/2,e.camera.position.y=n/2,e.camera.setViewport(i,n)},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this),this.isWebGL&&this.game.scale.off(s,this.onResize,this)},destroy:function(){this.shutdown(),this.game=null,this.scene=null,this.systems=null,this.cache=null,this.spineTextures=null,this.json=null,this.textures=null,this.skeletonRenderer=null,this.gl=null},gameDestroy:function(){this.destroy(),n&&n.dispose(),this.sceneRenderer=null,this.pluginManager=null,this.pluginManager.removeGameObject("spine",!0,!0),this.pluginManager.removeGameObject("spineContainer",!0,!0)}});l.SpineGameObject=c,l.SpineContainer=a,t.exports=l},function(t,e,i){var l=i(17),u=i(63);t.exports=function(t,e,i){e.x=u(i,"x",0),e.y=u(i,"y",0),e.depth=u(i,"depth",0),e.flipX=u(i,"flipX",!1),e.flipY=u(i,"flipY",!1);var n=u(i,"scale",null);"number"==typeof n?e.setScale(n):null!==n&&(e.scaleX=u(n,"x",1),e.scaleY=u(n,"y",1));var r=u(i,"scrollFactor",null);"number"==typeof r?e.setScrollFactor(r):null!==r&&(e.scrollFactorX=u(r,"x",1),e.scrollFactorY=u(r,"y",1)),e.rotation=u(i,"rotation",0);var s=u(i,"angle",null);null!==s&&(e.angle=s),e.alpha=u(i,"alpha",1);var o,a,h=u(i,"origin",null);return"number"==typeof h?e.setOrigin(h):null!==h&&(o=u(h,"x",.5),a=u(h,"y",.5),e.setOrigin(o,a)),e.blendMode=u(i,"blendMode",l.NORMAL),e.visible=u(i,"visible",!0),u(i,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,i){var r=i(64),s=i(8);t.exports=function(t,e,i){var n=s(t,e,null);if(null===n)return i;if(Array.isArray(n))return r.RND.pick(n);if("object"==typeof n){if(n.hasOwnProperty("randInt"))return r.RND.integerInRange(n.randInt[0],n.randInt[1]);if(n.hasOwnProperty("randFloat"))return r.RND.realInRange(n.randFloat[0],n.randFloat[1])}else if("function"==typeof n)return n(e);return n}},function(t,e,i){var n=i(3),r=i(27)(!1,r={Angle:i(65),Distance:i(74),Easing:i(82),Fuzzy:i(127),Interpolation:i(132),Pow2:i(140),Snap:i(144),RandomDataGenerator:i(148),Average:i(149),Bernstein:i(33),Between:i(150),CatmullRom:i(35),CeilTo:i(151),Clamp:i(4),DegToRad:i(19),Difference:i(152),Euler:i(153),Factorial:i(34),FloatBetween:i(18),FloorTo:i(154),FromPercent:i(155),GetSpeed:i(156),IsEven:i(157),IsEvenStrict:i(158),Linear:i(36),MaxAdd:i(159),MinSub:i(160),Percent:i(161),RadToDeg:i(13),RandomXY:i(162),RandomXYZ:i(163),RandomXYZW:i(164),Rotate:i(165),RotateAround:i(39),RotateAroundDistance:i(166),RotateTo:i(167),RoundAwayFromZero:i(40),RoundTo:i(168),SinCosTableGenerator:i(169),SmootherStep:i(38),SmoothStep:i(37),ToXY:i(170),TransformXY:i(41),Within:i(171),Wrap:i(7),Vector2:i(2),Vector3:i(12),Vector4:i(172),Matrix3:i(42),Matrix4:i(20),Quaternion:i(43),RotateVec3:i(173)},n);t.exports=r},function(t,e,i){t.exports={Between:i(28),BetweenPoints:i(66),BetweenPointsY:i(67),BetweenY:i(68),CounterClockwise:i(11),Normalize:i(29),Random:i(69),RandomDegrees:i(70),Reverse:i(71),RotateTo:i(72),ShortestBetween:i(73),Wrap:i(30),WrapDegrees:i(31)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,i,n){return Math.atan2(i-t,n-e)}},function(t,e,i){var n=i(18);t.exports=function(){return n(-Math.PI,Math.PI)}},function(t,e,i){var n=i(18);t.exports=function(){return n(-180,180)}},function(t,e,i){var n=i(29);t.exports=function(t){return n(t+Math.PI)}},function(t,e,i){var n=i(3);t.exports=function(t,e,i){return void 0===i&&(i=.05),t===e||(Math.abs(e-t)<=i||Math.abs(e-t)>=n.PI2-i?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=n.PI2:e-=n.PI2),t<e?t+=i:e<t&&(t-=i))),t}},function(t,e){t.exports=function(t,e){var i=e-t;return 0==i?0:i-360*Math.floor((i+180)/360)}},function(t,e,i){t.exports={Between:i(75),BetweenPoints:i(76),BetweenPointsSquared:i(77),Chebyshev:i(78),Power:i(79),Snake:i(80),Squared:i(81)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return Math.sqrt(r*r+s*s)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return Math.sqrt(i*i+n*n)}},function(t,e){t.exports=function(t,e){var i=t.x-e.x,n=t.y-e.y;return i*i+n*n}},function(t,e){t.exports=function(t,e,i,n){return Math.max(Math.abs(t-i),Math.abs(e-n))}},function(t,e){t.exports=function(t,e,i,n,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(i-t,r)+Math.pow(n-e,r))}},function(t,e){t.exports=function(t,e,i,n){return Math.abs(t-i)+Math.abs(e-n)}},function(t,e){t.exports=function(t,e,i,n){var r=t-i,s=e-n;return r*r+s*s}},function(t,e,i){t.exports={Back:i(83),Bounce:i(87),Circular:i(91),Cubic:i(95),Elastic:i(99),Expo:i(103),Linear:i(107),Quadratic:i(109),Quartic:i(113),Quintic:i(117),Sine:i(121),Stepped:i(125)}},function(t,e,i){t.exports={In:i(84),Out:i(85),InOut:i(86)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var i=1.525*e;return(t*=2)<1?t*t*((1+i)*t-i)*.5:.5*((t-=2)*t*((1+i)*t+i)+2)}},function(t,e,i){t.exports={In:i(88),Out:i(89),InOut:i(90)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,i){t.exports={In:i(92),Out:i(93),InOut:i(94)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,i){t.exports={In:i(96),Out:i(97),InOut:i(98)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,i){t.exports={In:i(100),Out:i(101),InOut:i(102)}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i))}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-n)*(2*Math.PI)/i)+1}},function(t,e){t.exports=function(t,e,i){if(void 0===e&&(e=.1),void 0===i&&(i=.1),0===t)return 0;if(1===t)return 1;var n=i/4;return e<1?e=1:n=i*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-n)*(2*Math.PI)/i)*.5+1}},function(t,e,i){t.exports={In:i(104),Out:i(105),InOut:i(106)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,i){t.exports=i(108)},function(t,e){t.exports=function(t){return t}},function(t,e,i){t.exports={In:i(110),Out:i(111),InOut:i(112)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,i){t.exports={In:i(114),Out:i(115),InOut:i(116)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,i){t.exports={In:i(118),Out:i(119),InOut:i(120)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,i){t.exports={In:i(122),Out:i(123),InOut:i(124)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,i){t.exports=i(126)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,i){t.exports={Ceil:i(128),Equal:i(32),Floor:i(129),GreaterThan:i(130),LessThan:i(131)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),e-i<t}},function(t,e){t.exports=function(t,e,i){return void 0===i&&(i=1e-4),t<e+i}},function(t,e,i){t.exports={Bezier:i(133),CatmullRom:i(134),CubicBezier:i(135),Linear:i(136),QuadraticBezier:i(137),SmoothStep:i(138),SmootherStep:i(139)}},function(t,e,i){var s=i(33);t.exports=function(t,e){for(var i=0,n=t.length-1,r=0;r<=n;r++)i+=Math.pow(1-e,n-r)*Math.pow(e,r)*t[r]*s(n,r);return i}},function(t,e,i){var s=i(35);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return t[0]===t[i]?(e<0&&(r=Math.floor(n=i*(1+e))),s(n-r,t[(r-1+i)%i],t[r],t[(r+1)%i],t[(r+2)%i])):e<0?t[0]-(s(-n,t[0],t[0],t[1],t[1])-t[0]):1<e?t[i]-(s(n-i,t[i],t[i],t[i-1],t[i-1])-t[i]):s(n-r,t[r?r-1:0],t[r],t[i<r+1?i:r+1],t[i<r+2?i:r+2])}},function(t,e){t.exports=function(t,e,i,n,r){return(l=1-t)*l*l*e+3*(h=1-(a=t))*h*a*i+3*(1-(o=t))*o*o*n+(s=t)*s*s*r;var s,o,a,h,l}},function(t,e,i){var s=i(36);t.exports=function(t,e){var i=t.length-1,n=i*e,r=Math.floor(n);return e<0?s(t[0],t[1],n):1<e?s(t[i],t[i-1],i-n):s(t[r],t[i<r+1?i:r+1],n-r)}},function(t,e){t.exports=function(t,e,i,n){return(o=1-t)*o*e+2*(1-(s=t))*s*i+(r=t)*r*n;var r,s,o}},function(t,e,i){var n=i(37);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){var n=i(38);t.exports=function(t,e,i){return e+(i-e)*n(t,0,1)}},function(t,e,i){t.exports={GetNext:i(141),IsSize:i(142),IsValue:i(143)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,i){t.exports={Ceil:i(145),Floor:i(146),To:i(147)}},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<t.length;n++)e=.02519603282416938*(i+=t.charCodeAt(n)),e-=i=e>>>0,i=(e*=i)>>>0,i+=4294967296*(e-=i);return 2.3283064365386963e-10*((this.n=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;e<t.length&&null!=t[e];e++){var i=t[e];this.s0-=this.hash(i),this.s0+=~~(this.s0<0),this.s1-=this.hash(i),this.s1+=~~(this.s1<0),this.s2-=this.hash(i),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){for(var t="",e="",e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;0<e;e--){var 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;i<t.length;i++)e+=+t[i];return e/t.length}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=10);var n=Math.pow(i,-e);return Math.ceil(t*n)/n}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e,i){var m=i(4),n=i(0),r=i(20),s=i(1),o=new r,a=new n({initialize:function t(e,i,n,r){void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),void 0===r&&(r=t.DefaultOrder),this._x=e,this._y=i,this._z=n,this._order=r,this.onChangeCallback=s},x:{get:function(){return this._x},set:function(t){this._x=t,this.onChangeCallback(this)}},y:{get:function(){return this._y},set:function(t){this._y=t,this.onChangeCallback(this)}},z:{get:function(){return this._z},set:function(t){this._z=t,this.onChangeCallback(this)}},order:{get:function(){return this._order},set:function(t){this._order=t,this.onChangeCallback(this)}},set:function(t,e,i,n){return void 0===n&&(n=this._order),this._x=t,this._y=e,this._z=i,this._order=n,this.onChangeCallback(this),this},copy:function(t){return this.set(t.x,t.y,t.z,t.order)},setFromQuaternion:function(t,e,i){return void 0===e&&(e=this._order),void 0===i&&(i=!1),o.fromQuat(t),this.setFromRotationMatrix(o,e,i)},setFromRotationMatrix:function(t,e,i){void 0===e&&(e=this._order),void 0===i&&(i=!1);var n=t.val,r=n[0],s=n[4],o=n[8],a=n[1],h=n[5],l=n[9],u=n[2],c=n[6],f=n[10],d=0,p=0,g=0,v=.99999;switch(e){case"XYZ":p=Math.asin(m(o,-1,1)),Math.abs(o)<v?(d=Math.atan2(-l,f),g=Math.atan2(-s,r)):d=Math.atan2(c,h);break;case"YXZ":d=Math.asin(-m(l,-1,1)),Math.abs(l)<v?(p=Math.atan2(o,f),g=Math.atan2(a,h)):p=Math.atan2(-u,r);break;case"ZXY":d=Math.asin(m(c,-1,1)),g=Math.abs(c)<v?(p=Math.atan2(-u,f),Math.atan2(-s,h)):Math.atan2(a,r);break;case"ZYX":p=Math.asin(-m(u,-1,1)),g=Math.abs(u)<v?(d=Math.atan2(c,f),Math.atan2(a,r)):Math.atan2(-s,h);break;case"YZX":g=Math.asin(m(a,-1,1)),p=Math.abs(a)<v?(d=Math.atan2(-l,h),Math.atan2(-u,r)):Math.atan2(o,f);break;case"XZY":g=Math.asin(-m(s,-1,1)),Math.abs(s)<v?(d=Math.atan2(c,h),p=Math.atan2(o,r)):d=Math.atan2(-l,f)}return this._x=d,this._y=p,this._z=g,this._order=e,i&&this.onChangeCallback(this),this}});a.RotationOrders=["XYZ","YXZ","ZXY","ZYX","YZX","XZY"],a.DefaultOrder="XYZ",t.exports=a},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.floor(t*n)/n}},function(t,e,i){var n=i(4);t.exports=function(t,e,i){return(i-e)*(t=n(t,0,1))}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,i){return Math.min(t+e,i)}},function(t,e){t.exports=function(t,e,i){return Math.max(t-e,i)}},function(t,e){t.exports=function(t,e,i,n){void 0===i&&(i=e+1);var r=(t-e)/(i-e);return 1<r?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,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,e,i,n,r){return t.x=e+r*Math.cos(n),t.y=i+r*Math.sin(n),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;o<t;o++)e+=(i-=e*n)*n,r[o]=i,s[o]=e;return{sin:s,cos:r,length:t}}},function(t,e,i){var o=i(2);t.exports=function(t,e,i,n){void 0===n&&(n=new o);var r=0,s=0;return 0<t&&t<=e*i&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t,n.set(r,s)),n}},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 0<r&&(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(12),r=i(20),s=i(43),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="resize"},function(t,e,i){var n=i(176),r=i(0),s=i(177),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(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,i){var n=new(i(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=n},function(t,e,i){t.exports={ADDED_TO_SCENE:i(178),BOOT:i(179),CREATE:i(180),DESTROY:i(181),PAUSE:i(182),POST_UPDATE:i(183),PRE_UPDATE:i(184),READY:i(185),REMOVED_FROM_SCENE:i(186),RENDER:i(187),RESUME:i(188),SHUTDOWN:i(189),SLEEP:i(190),START:i(191),TRANSITION_COMPLETE:i(192),TRANSITION_INIT:i(193),TRANSITION_OUT:i(194),TRANSITION_START:i(195),TRANSITION_WAKE:i(196),UPDATE:i(197),WAKE:i(198)}},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(si,t){(function(){var n,t,e,d,i,s,r,o,a,_,h,l,u,c,ht,f,p,g,v,j,m,M,x,y,w,T,E,b,A,R,S,C,I,P,Z,L,k,O,F,V,D,N,Y,X,B,U,z,W,G,q,H,K,Q,J,$,tt,et,it,nt,rt,st,ot,at,lt,ut,ct,ft,dt,pt,gt,vt,mt,Mt,xt,yt,wt,Tt,Et,bt,At,Rt,St,Ct,It,Pt,_t,Lt,kt,Ot,Ft,Vt,Dt,Nt,Yt,Xt,Bt,Ut,zt,Wt,Gt,qt,Ht,jt,Zt,Kt,Qt,Jt,$t,te,ee,ie,ne,re,se,oe,ae,he,le,ue,ce,fe,de,pe,ge,ve,me=this&&this.__extends||(n=function(t,e){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i])})(t,e)},function(t,e){function i(){this.constructor=t}n(t,e),t.prototype=null===e?Object.create(e):(i.prototype=e.prototype,new i)});function Me(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function xe(t,e){void 0===e&&(e=""),this.assets={},this.errors={},this.toLoad=0,this.loaded=0,this.rawDataUris={},this.textureLoader=t,this.pathPrefix=e}function ye(t){this.atlas=t}function we(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.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=i,this.setToSetupPose()}function Te(t,e,i){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=u.Normal,this.skinRequired=!1,this.color=new l.Color,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=i}function Ee(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var i=0;i<t.bones.length;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findBone(t.target.name)}function be(t){var e=g.call(this,t,0,!1)||this;return e.bones=new Array,e.bendDirection=1,e.compress=!1,e.stretch=!1,e.uniform=!1,e.mix=1,e.softness=0,e}function Ae(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var i=0,n=t.bones.length;i<n;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}function Re(t){var e=x.call(this,t,0,!1)||this;return e.bones=new Array,e}function Se(t){this.toLoad=new Array,this.assets={},this.clientId=t}function Ce(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function Ie(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var i,n=t.bones[e],r=void 0;null==n.parent?r=new S.Bone(n,this,null):(i=this.bones[n.parent.index],r=new S.Bone(n,this,i),i.children.push(r)),this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var s=t.slots[e],r=this.bones[s.boneData.index],o=new S.Slot(s,r);this.slots.push(o),this.drawOrder.push(o)}this.ikConstraints=new Array;for(e=0;e<t.ikConstraints.length;e++){var a=t.ikConstraints[e];this.ikConstraints.push(new S.IkConstraint(a,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var h=t.transformConstraints[e];this.transformConstraints.push(new S.TransformConstraint(h,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var l=t.pathConstraints[e];this.pathConstraints.push(new S.PathConstraint(l,this))}this.color=new S.Color(1,1,1,1),this.updateCache()}function Pe(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new I.Pool(function(){return I.Utils.newFloatArray(16)})}function _e(){this.triangulator=new Z.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}function Le(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}function ke(t,e){if(this.deform=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new F.Color,this.darkColor=null==t.darkColor?null:new F.Color,this.setToSetupPose()}function Oe(t,e,i){if(this.color=new D.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==i)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=i}function Fe(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var i=0;i<t.bones.length;i++)this.bones.push(e.findBone(t.bones[i].name));this.target=e.findBone(t.target.name)}function Ve(t){var e=B.call(this,t,0,!1)||this;return e.bones=new Array,e.rotateMix=0,e.translateMix=0,e.scaleMix=0,e.shearMix=0,e.offsetRotation=0,e.offsetX=0,e.offsetY=0,e.offsetScaleX=0,e.offsetScaleY=0,e.offsetShearY=0,e.relative=!1,e.local=!1,e}function De(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new z.Pool(function(){return new Array}),this.polygonIndicesPool=new z.Pool(function(){return new Array})}function Ne(t){var e=Q.call(this,t)||this;return e.color=new K.Color(1,1,1,1),e}function Ye(t){var e=tt.call(this,t)||this;return e.color=new $.Color(.2275,.2275,.8078,1),e}function Xe(t){var e=nt.call(this,t)||this;return e.color=new it.Color(1,1,1,1),e.tempColor=new it.Color(0,0,0,0),e}function Be(t){var e=ot.call(this,t)||this;return e.closed=!1,e.constantSpeed=!1,e.color=new st.Color(1,1,1,1),e}function Ue(t){var e=ut.call(this,t)||this;return e.color=new lt.Color(.38,.94,0,1),e}function ze(t){var e=dt.call(this,t)||this;return e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.rotation=0,e.width=0,e.height=0,e.color=new ft.Color(1,1,1,1),e.offset=ft.Utils.newFloatArray(8),e.uvs=ft.Utils.newFloatArray(8),e.tempColor=new ft.Color(1,1,1,1),e}function We(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}function Ge(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}function qe(t){return void 0===t&&(t=""),wt.call(this,function(t){return new xt.canvas.CanvasTexture(t)},t)||this}function He(t){return At.call(this,t)||this}function je(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=St.Utils.newFloatArray(8192),this.tempColor=new St.Color,this.ctx=t}function Ze(e,t){return void 0===t&&(t=""),Lt.call(this,function(t){return new Pt.webgl.GLTexture(e,t)},t)||this}function Ke(t,e){this.position=new Ft.Vector3(0,0,0),this.direction=new Ft.Vector3(0,0,-1),this.up=new Ft.Vector3(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new Ft.Matrix4,this.inverseProjectionView=new Ft.Matrix4,this.projection=new Ft.Matrix4,this.view=new Ft.Matrix4,this.tmp=new Ft.Vector3,this.viewportWidth=t,this.viewportHeight=e,this.update()}function Qe(t,e,i){void 0===i&&(i=!1);var n=Yt.call(this,e)||this;return n.texture=null,n.boundUnit=0,n.useMipMaps=!1,n.context=t instanceof Nt.ManagedWebGLRenderingContext?t:new Nt.ManagedWebGLRenderingContext(t),n.useMipMaps=i,n.restore(),n.context.addRestorable(n),n}function Je(t,e,i){if(void 0===e&&(e=!0),void 0===i&&(i=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,10920<i)throw new Error("Can't have more than 10920 triangles per batch: "+i);this.context=t instanceof Wt.ManagedWebGLRenderingContext?t:new Wt.ManagedWebGLRenderingContext(t);var n=e?[new Wt.Position2Attribute,new Wt.ColorAttribute,new Wt.TexCoordAttribute,new Wt.Color2Attribute]:[new Wt.Position2Attribute,new Wt.ColorAttribute,new Wt.TexCoordAttribute];this.mesh=new Wt.Mesh(t,n,i,3*i),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function $e(t,e,i){void 0===i&&(i=!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 qt.Color(1,1,1,1),this.canvas=t,this.context=e instanceof Ht.ManagedWebGLRenderingContext?e:new Ht.ManagedWebGLRenderingContext(e),this.twoColorTint=i,this.camera=new Ht.OrthoCamera(t.width,t.height),this.batcherShader=i?Ht.Shader.newTwoColoredTextured(this.context):Ht.Shader.newColoredTextured(this.context),this.batcher=new Ht.PolygonBatcher(this.context,i),this.shapesShader=Ht.Shader.newColored(this.context),this.shapes=new Ht.ShapeRenderer(this.context),this.skeletonRenderer=new Ht.SkeletonRenderer(this.context,i),this.skeletonDebugRenderer=new Ht.SkeletonDebugRenderer(this.context)}function ti(t,e,i){this.vertexShader=e,this.fragmentShader=i,this.vs=null,this.fs=null,this.program=null,this.tmp2x2=new Float32Array(4),this.tmp3x3=new Float32Array(9),this.tmp4x4=new Float32Array(16),this.vsSource=e,this.fsSource=i,this.context=t instanceof Jt.ManagedWebGLRenderingContext?t:new Jt.ManagedWebGLRenderingContext(t),this.context.addRestorable(this),this.compile()}function ei(t,e){if(void 0===e&&(e=10920),this.isDrawing=!1,this.shapeType=ie.Filled,this.color=new te.Color(1,1,1,1),this.vertexIndex=0,this.tmp=new te.Vector2,10920<e)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof ee.ManagedWebGLRenderingContext?t:new ee.ManagedWebGLRenderingContext(t),this.mesh=new ee.Mesh(t,[new ee.Position2Attribute,new ee.ColorAttribute],e,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function ii(t){this.boneLineColor=new se.Color(1,0,0,1),this.boneOriginColor=new se.Color(0,1,0,1),this.attachmentLineColor=new se.Color(0,0,1,.5),this.triangleLineColor=new se.Color(1,.64,0,.5),this.pathColor=(new se.Color).setFromString("FF7F00"),this.clipColor=new se.Color(.8,0,0,2),this.aabbColor=new se.Color(0,1,0,.5),this.drawBones=!0,this.drawRegionAttachments=!0,this.drawBoundingBoxes=!0,this.drawMeshHull=!0,this.drawMeshTriangles=!0,this.drawPaths=!0,this.drawSkeletonXY=!1,this.drawClipping=!0,this.premultipliedAlpha=!1,this.scale=1,this.boneWidth=2,this.bounds=new se.SkeletonBounds,this.temp=new Array,this.vertices=se.Utils.newFloatArray(2048),this.context=t instanceof oe.ManagedWebGLRenderingContext?t:new oe.ManagedWebGLRenderingContext(t)}function ni(t,e){void 0===e&&(e=!0),this.premultipliedAlpha=!1,this.vertexEffect=null,this.tempColor=new he.Color,this.tempColor2=new he.Color,this.vertexSize=8,this.twoColorTint=!1,this.renderable=new ue(null,0,0),this.clipper=new he.SkeletonClipping,this.temp=new he.Vector2,this.temp2=new he.Vector2,this.temp3=new he.Color,this.temp4=new he.Color,(this.twoColorTint=e)&&(this.vertexSize+=4),this.vertices=he.Utils.newFloatArray(1024*this.vertexSize)}function ri(t,e,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=i}!function(B){var U,t,v,e,i,n,z=(r.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},r.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,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l<u;l++)h[l].apply(t,e,i,r,s,o,a)},r.binarySearch=function(t,e,i){void 0===i&&(i=1);var n=0,r=t.length/i-2;if(0==r)return i;for(var s=r>>>1;;){if(t[(s+1)*i]<=e?n=s+1:r=s,n==r)return(n+1)*i;s=n+r>>>1}},r.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},r);function r(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.timelineIds=[];for(var n=0;n<e.length;n++)this.timelineIds[e[n].getPropertyId()]=!0;this.duration=i}B.Animation=z,(t=U=B.MixBlend||(B.MixBlend={}))[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",(e=v=B.MixDirection||(B.MixDirection={}))[e.mixIn=0]="mixIn",e[e.mixOut=1]="mixOut",(n=i=B.TimelineType||(B.TimelineType={}))[n.rotate=0]="rotate",n[n.translate=1]="translate",n[n.scale=2]="scale",n[n.shear=3]="shear",n[n.attachment=4]="attachment",n[n.color=5]="color",n[n.deform=6]="deform",n[n.event=7]="event",n[n.drawOrder=8]="drawOrder",n[n.ikConstraint=9]="ikConstraint",n[n.transformConstraint=10]="transformConstraint",n[n.pathConstraintPosition=11]="pathConstraintPosition",n[n.pathConstraintSpacing=12]="pathConstraintSpacing",n[n.pathConstraintMix=13]="pathConstraintMix",n[n.twoColor=14]="twoColor";var s=(M.prototype.getFrameCount=function(){return this.curves.length/M.BEZIER_SIZE+1},M.prototype.setLinear=function(t){this.curves[t*M.BEZIER_SIZE]=M.LINEAR},M.prototype.setStepped=function(t){this.curves[t*M.BEZIER_SIZE]=M.STEPPED},M.prototype.getCurveType=function(t){var e=t*M.BEZIER_SIZE;if(e==this.curves.length)return M.LINEAR;var i=this.curves[e];return i==M.LINEAR?M.LINEAR:i==M.STEPPED?M.STEPPED:M.BEZIER},M.prototype.setCurve=function(t,e,i,n,r){var s=.03*(2*-e+n),o=.03*(2*-i+r),a=.006*(3*(e-n)+1),h=.006*(3*(i-r)+1),l=2*s+a,u=2*o+h,c=.3*e+s+.16666667*a,f=.3*i+o+.16666667*h,d=t*M.BEZIER_SIZE,p=this.curves;p[d++]=M.BEZIER;for(var g=c,v=f,m=d+M.BEZIER_SIZE-1;d<m;d+=2)p[d]=g,p[d+1]=v,c+=l,f+=u,l+=a,u+=h,g+=c,v+=f},M.prototype.getCurvePercent=function(t,e){e=B.MathUtils.clamp(e,0,1);var i=this.curves,n=t*M.BEZIER_SIZE,r=i[n];if(r==M.LINEAR)return e;if(r==M.STEPPED)return 0;for(var s=0,o=++n,a=n+M.BEZIER_SIZE-1;n<a;n+=2)if(e<=(s=i[n])){var h=void 0,l=void 0;return(l=n==o?h=0:(h=i[n-2],i[n-1]))+(i[n+1]-l)*(e-h)/(s-h)}var u=i[n-1];return u+(1-u)*(e-s)/(1-s)},M.LINEAR=0,M.STEPPED=1,M.BEZIER=2,M.BEZIER_SIZE=19,M);function M(t){if(t<=0)throw new Error("frameCount must be > 0: "+t);this.curves=B.Utils.newFloatArray((t-1)*M.BEZIER_SIZE)}B.CurveTimeline=s;var o,a=(me(m,o=s),m.prototype.getPropertyId=function(){return(i.rotate<<24)+this.boneIndex},m.prototype.setFrame=function(t,e,i){t<<=1,this.frames[t]=e,this.frames[t+m.ROTATION]=i},m.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return void(h.rotation=h.data.rotation);case U.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(i>=a[a.length-m.ENTRIES]){var u=a[a.length+m.PREV_ROTATION];switch(s){case U.setup:h.rotation=h.data.rotation+u*r;break;case U.first:case U.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case U.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,i,m.ENTRIES),f=a[c+m.PREV_ROTATION],d=a[c],p=this.getCurvePercent((c>>1)-1,1-(i-d)/(a[c+m.PREV_TIME]-d)),g=f+((g=a[c+m.ROTATION]-f)-360*(16384-(16384.499999999996-g/360|0)))*p;switch(s){case U.setup:h.rotation=h.data.rotation+(g-360*(16384-(16384.499999999996-g/360|0)))*r;break;case U.first:case U.replace:g+=h.data.rotation-h.rotation;case U.add:h.rotation+=(g-360*(16384-(16384.499999999996-g/360|0)))*r}}},m.ENTRIES=2,m.PREV_TIME=-2,m.PREV_ROTATION=-1,m.ROTATION=1,m);function m(t){var e=o.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t<<1),e}B.RotateTimeline=a;var h,l=(me(p,h=s),p.prototype.getPropertyId=function(){return(i.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,i,n){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=i,this.frames[t+p.Y]=n},p.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return h.x=h.data.x,void(h.y=h.data.y);case U.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,u,c,f=0,d=0;switch(i>=a[a.length-p.ENTRIES]?(f=a[a.length+p.PREV_X],d=a[a.length+p.PREV_Y]):(f=a[(l=z.binarySearch(a,i,p.ENTRIES))+p.PREV_X],d=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(i-u)/(a[l+p.PREV_TIME]-u)),f+=(a[l+p.X]-f)*c,d+=(a[l+p.Y]-d)*c),s){case U.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case U.first:case U.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case U.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*p.ENTRIES),e}B.TranslateTimeline=l;var u,c=(me(x,u=l),x.prototype.getPropertyId=function(){return(i.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case U.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,u,c,f=0,d=0;if(d=i>=a[a.length-x.ENTRIES]?(f=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(f=a[(l=z.binarySearch(a,i,x.ENTRIES))+x.PREV_X],d=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(i-u)/(a[l+x.PREV_TIME]-u)),f=(f+(a[l+x.X]-f)*c)*h.data.scaleX,(d+(a[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==U.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,g=0;if(o==v.mixOut)switch(s){case U.setup:p=h.data.scaleX,g=h.data.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(d)*B.MathUtils.signum(g)-g)*r;break;case U.first:case U.replace:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=g+(Math.abs(d)*B.MathUtils.signum(g)-g)*r;break;case U.add:p=h.scaleX,g=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=g+(Math.abs(d)*B.MathUtils.signum(g)-h.data.scaleY)*r}else switch(s){case U.setup:p=Math.abs(h.data.scaleX)*B.MathUtils.signum(f),g=Math.abs(h.data.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=g+(d-g)*r;break;case U.first:case U.replace:p=Math.abs(h.scaleX)*B.MathUtils.signum(f),g=Math.abs(h.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=g+(d-g)*r;break;case U.add:p=B.MathUtils.signum(f),g=B.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*g+(d-Math.abs(h.data.scaleY)*g)*r}}}},x);function x(t){return u.call(this,t)||this}B.ScaleTimeline=c;var f,d=(me(g,f=l),g.prototype.getPropertyId=function(){return(i.shear<<24)+this.boneIndex},g.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case U.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,u,c,f=0,d=0;switch(i>=a[a.length-g.ENTRIES]?(f=a[a.length+g.PREV_X],d=a[a.length+g.PREV_Y]):(f=a[(l=z.binarySearch(a,i,g.ENTRIES))+g.PREV_X],d=a[l+g.PREV_Y],u=a[l],c=this.getCurvePercent(l/g.ENTRIES-1,1-(i-u)/(a[l+g.PREV_TIME]-u)),f+=(a[l+g.X]-f)*c,d+=(a[l+g.Y]-d)*c),s){case U.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case U.first:case U.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case U.add:h.shearX+=f*r,h.shearY+=d*r}}},g);function g(t){return f.call(this,t)||this}B.ShearTimeline=d;var y,w=(me(T,y=s),T.prototype.getPropertyId=function(){return(i.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,i,n,r,s){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=i,this.frames[t+T.G]=n,this.frames[t+T.B]=r,this.frames[t+T.A]=s},T.prototype.apply=function(t,e,i,n,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(i<h[0])switch(s){case U.setup:return void a.color.setFromColor(a.data.color);case U.first:var l=a.color,u=a.data.color;l.add((u.r-l.r)*r,(u.g-l.g)*r,(u.b-l.b)*r,(u.a-l.a)*r)}else{var c,f,d,p,g=0,v=0,m=0,M=0;i>=h[h.length-T.ENTRIES]?(g=h[(c=h.length)+T.PREV_R],v=h[c+T.PREV_G],m=h[c+T.PREV_B],M=h[c+T.PREV_A]):(g=h[(f=z.binarySearch(h,i,T.ENTRIES))+T.PREV_R],v=h[f+T.PREV_G],m=h[f+T.PREV_B],M=h[f+T.PREV_A],d=h[f],p=this.getCurvePercent(f/T.ENTRIES-1,1-(i-d)/(h[f+T.PREV_TIME]-d)),g+=(h[f+T.R]-g)*p,v+=(h[f+T.G]-v)*p,m+=(h[f+T.B]-m)*p,M+=(h[f+T.A]-M)*p),1==r?a.color.set(g,v,m,M):(l=a.color,s==U.setup&&l.setFromColor(a.data.color),l.add((g-l.r)*r,(v-l.g)*r,(m-l.b)*r,(M-l.a)*r))}}},T.ENTRIES=5,T.PREV_TIME=-5,T.PREV_R=-4,T.PREV_G=-3,T.PREV_B=-2,T.PREV_A=-1,T.R=1,T.G=2,T.B=3,T.A=4,T);function T(t){var e=y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*T.ENTRIES),e}B.ColorTimeline=w;var E,b=(me(A,E=s),A.prototype.getPropertyId=function(){return(i.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,i,n,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=i,this.frames[t+A.G]=n,this.frames[t+A.B]=r,this.frames[t+A.A]=s,this.frames[t+A.R2]=o,this.frames[t+A.G2]=a,this.frames[t+A.B2]=h},A.prototype.apply=function(t,e,i,n,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(i<h[0])switch(s){case U.setup:return a.color.setFromColor(a.data.color),void a.darkColor.setFromColor(a.data.darkColor);case U.first:var l=a.color,u=a.darkColor,c=a.data.color,f=a.data.darkColor;l.add((c.r-l.r)*r,(c.g-l.g)*r,(c.b-l.b)*r,(c.a-l.a)*r),u.add((f.r-u.r)*r,(f.g-u.g)*r,(f.b-u.b)*r,0)}else{var d,p,g,v,m=0,M=0,x=0,y=0,w=0,T=0,E=0;i>=h[h.length-A.ENTRIES]?(m=h[(d=h.length)+A.PREV_R],M=h[d+A.PREV_G],x=h[d+A.PREV_B],y=h[d+A.PREV_A],w=h[d+A.PREV_R2],T=h[d+A.PREV_G2],E=h[d+A.PREV_B2]):(m=h[(p=z.binarySearch(h,i,A.ENTRIES))+A.PREV_R],M=h[p+A.PREV_G],x=h[p+A.PREV_B],y=h[p+A.PREV_A],w=h[p+A.PREV_R2],T=h[p+A.PREV_G2],E=h[p+A.PREV_B2],g=h[p],v=this.getCurvePercent(p/A.ENTRIES-1,1-(i-g)/(h[p+A.PREV_TIME]-g)),m+=(h[p+A.R]-m)*v,M+=(h[p+A.G]-M)*v,x+=(h[p+A.B]-x)*v,y+=(h[p+A.A]-y)*v,w+=(h[p+A.R2]-w)*v,T+=(h[p+A.G2]-T)*v,E+=(h[p+A.B2]-E)*v),1==r?(a.color.set(m,M,x,y),a.darkColor.set(w,T,E,1)):(l=a.color,u=a.darkColor,s==U.setup&&(l.setFromColor(a.data.color),u.setFromColor(a.data.darkColor)),l.add((m-l.r)*r,(M-l.g)*r,(x-l.b)*r,(y-l.a)*r),u.add((w-u.r)*r,(T-u.g)*r,(E-u.b)*r,0))}}},A.ENTRIES=8,A.PREV_TIME=-8,A.PREV_R=-7,A.PREV_G=-6,A.PREV_B=-5,A.PREV_A=-4,A.PREV_R2=-3,A.PREV_G2=-2,A.PREV_B2=-1,A.R=1,A.G=2,A.B=3,A.A=4,A.R2=5,A.G2=6,A.B2=7,A);function A(t){var e=E.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*A.ENTRIES),e}B.TwoColorTimeline=b;var R=(S.prototype.getPropertyId=function(){return(i.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.attachmentNames[t]=i},S.prototype.apply=function(t,e,i,n,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=v.mixOut?i<(a=this.frames)[0]?s!=U.setup&&s!=U.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=i>=a[a.length-1]?a.length-1:z.binarySearch(a,i,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==U.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,i){e.attachment=null==i?null:t.getAttachment(this.slotIndex,i)},S);function S(t){this.frames=B.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}B.AttachmentTimeline=R;var C,I=null,P=(me(_,C=s),_.prototype.getPropertyId=function(){return(i.deform<<27)+ +this.attachment.id+this.slotIndex},_.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.frameVertices[t]=i},_.prototype.apply=function(t,e,i,n,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof B.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=U.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(i<f[0]){var d=h;switch(s){case U.setup:return void(l.length=0);case U.first:if(1==r){l.length=0;break}var p=B.Utils.setArraySize(l,c);if(null==d.bones)for(var g=d.vertices,v=0;v<c;v++)p[v]+=(g[v]-p[v])*r;else for(r=1-r,v=0;v<c;v++)p[v]*=r}}else{var m=B.Utils.setArraySize(l,c);if(i>=f[f.length-1]){var M=u[f.length-1];if(1==r)if(s==U.add)if(null==(d=h).bones)for(var g=d.vertices,x=0;x<c;x++)m[x]+=M[x]-g[x];else for(var y=0;y<c;y++)m[y]+=M[y];else B.Utils.arrayCopy(M,0,m,0,c);else switch(s){case U.setup:if(null==h.bones)for(var g=h.vertices,w=0;w<c;w++){var T=g[w];m[w]=T+(M[w]-T)*r}else for(var E=0;E<c;E++)m[E]=M[E]*r;break;case U.first:case U.replace:for(var b=0;b<c;b++)m[b]+=(M[b]-m[b])*r;break;case U.add:if(null==(d=h).bones)for(var g=d.vertices,A=0;A<c;A++)m[A]+=(M[A]-g[A])*r;else for(var R=0;R<c;R++)m[R]+=M[R]*r}}else{var S=z.binarySearch(f,i),C=u[S-1],I=u[S],P=f[S],_=this.getCurvePercent(S-1,1-(i-P)/(f[S-1]-P));if(1==r)if(s==U.add)if(null==(d=h).bones)for(var g=d.vertices,L=0;L<c;L++){var k=C[L];m[L]+=k+(I[L]-k)*_-g[L]}else for(var O=0;O<c;O++)k=C[O],m[O]+=k+(I[O]-k)*_;else for(var F=0;F<c;F++)k=C[F],m[F]=k+(I[F]-k)*_;else switch(s){case U.setup:if(null==h.bones)for(var g=h.vertices,V=0;V<c;V++)k=C[V],T=g[V],m[V]=T+(k+(I[V]-k)*_-T)*r;else for(var D=0;D<c;D++)k=C[D],m[D]=(k+(I[D]-k)*_)*r;break;case U.first:case U.replace:for(var N=0;N<c;N++)k=C[N],m[N]+=(k+(I[N]-k)*_-m[N])*r;break;case U.add:if(null==(d=h).bones)for(var g=d.vertices,Y=0;Y<c;Y++)k=C[Y],m[Y]+=(k+(I[Y]-k)*_-g[Y])*r;else for(var X=0;X<c;X++)k=C[X],m[X]+=(k+(I[X]-k)*_)*r}}}}}},_);function _(t){var e=C.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==I&&(I=B.Utils.newFloatArray(64)),e}B.DeformTimeline=P;var L=(k.prototype.getPropertyId=function(){return i.event<<24},k.prototype.getFrameCount=function(){return this.frames.length},k.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},k.prototype.apply=function(t,e,i,n,r,s,o){if(null!=n){var a=this.frames,h=this.frames.length;if(i<e)this.apply(t,e,Number.MAX_VALUE,n,r,s,o),e=-1;else if(e>=a[h-1])return;if(!(i<a[0])){var l=0;if(e<a[0])l=0;else for(var u=a[l=z.binarySearch(a,e)];0<l&&a[l-1]==u;)l--;for(;l<h&&i>=a[l];l++)n.push(this.events[l])}}},k);function k(t){this.frames=B.Utils.newFloatArray(t),this.events=new Array(t)}B.EventTimeline=L;var O=(F.prototype.getPropertyId=function(){return i.drawOrder<<24},F.prototype.getFrameCount=function(){return this.frames.length},F.prototype.setFrame=function(t,e,i){this.frames[t]=e,this.drawOrders[t]=i},F.prototype.apply=function(t,e,i,n,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=v.mixOut){var l=this.frames;if(i<l[0])s!=U.setup&&s!=U.first||B.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var u=0,u=i>=l[l.length-1]?l.length-1:z.binarySearch(l,i)-1,c=this.drawOrders[u];if(null==c)B.Utils.arrayCopy(h,0,a,0,h.length);else for(var f=0,d=c.length;f<d;f++)a[f]=h[c[f]]}}else s==U.setup&&B.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},F);function F(t){this.frames=B.Utils.newFloatArray(t),this.drawOrders=new Array(t)}B.DrawOrderTimeline=O;var V,D=(me(N,V=s),N.prototype.getPropertyId=function(){return(i.ikConstraint<<24)+this.ikConstraintIndex},N.prototype.setFrame=function(t,e,i,n,r,s,o){t*=N.ENTRIES,this.frames[t]=e,this.frames[t+N.MIX]=i,this.frames[t+N.SOFTNESS]=n,this.frames[t+N.BEND_DIRECTION]=r,this.frames[t+N.COMPRESS]=s?1:0,this.frames[t+N.STRETCH]=o?1:0},N.prototype.apply=function(t,e,i,n,r,s,o){var a,h,l,u,c,f=this.frames,d=t.ikConstraints[this.ikConstraintIndex];if(d.active)if(i<f[0])switch(s){case U.setup:return d.mix=d.data.mix,d.softness=d.data.softness,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,void(d.stretch=d.data.stretch);case U.first:d.mix+=(d.data.mix-d.mix)*r,d.softness+=(d.data.softness-d.softness)*r,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch}else i>=f[f.length-N.ENTRIES]?s==U.setup?(d.mix=d.data.mix+(f[f.length+N.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+N.PREV_SOFTNESS]-d.data.softness)*r,o==v.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(d.mix+=(f[f.length+N.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+N.PREV_SOFTNESS]-d.softness)*r,o==v.mixIn&&(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(h=f[(a=z.binarySearch(f,i,N.ENTRIES))+N.PREV_MIX],l=f[a+N.PREV_SOFTNESS],u=f[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(i-u)/(f[a+N.PREV_TIME]-u)),s==U.setup?(d.mix=d.data.mix+(h+(f[a+N.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[a+N.SOFTNESS]-l)*c-d.data.softness)*r,o==v.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[a+N.PREV_BEND_DIRECTION],d.compress=0!=f[a+N.PREV_COMPRESS],d.stretch=0!=f[a+N.PREV_STRETCH])):(d.mix+=(h+(f[a+N.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[a+N.SOFTNESS]-l)*c-d.softness)*r,o==v.mixIn&&(d.bendDirection=f[a+N.PREV_BEND_DIRECTION],d.compress=0!=f[a+N.PREV_COMPRESS],d.stretch=0!=f[a+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=V.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*N.ENTRIES),e}B.IkConstraintTimeline=D;var Y,X=(me(W,Y=s),W.prototype.getPropertyId=function(){return(i.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,i,n,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=i,this.frames[t+W.TRANSLATE]=n,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(i<a[0]){var l=h.data;switch(s){case U.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case U.first:h.rotateMix+=(l.rotateMix-h.rotateMix)*r,h.translateMix+=(l.translateMix-h.translateMix)*r,h.scaleMix+=(l.scaleMix-h.scaleMix)*r,h.shearMix+=(l.shearMix-h.shearMix)*r}}else{var u,c,f,d,p=0,g=0,v=0,m=0;i>=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],g=a[u+W.PREV_TRANSLATE],v=a[u+W.PREV_SCALE],m=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,i,W.ENTRIES))+W.PREV_ROTATE],g=a[c+W.PREV_TRANSLATE],v=a[c+W.PREV_SCALE],m=a[c+W.PREV_SHEAR],f=a[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(i-f)/(a[c+W.PREV_TIME]-f)),p+=(a[c+W.ROTATE]-p)*d,g+=(a[c+W.TRANSLATE]-g)*d,v+=(a[c+W.SCALE]-v)*d,m+=(a[c+W.SHEAR]-m)*d),s==U.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(g-l.translateMix)*r,h.scaleMix=l.scaleMix+(v-l.scaleMix)*r,h.shearMix=l.shearMix+(m-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(g-h.translateMix)*r,h.scaleMix+=(v-h.scaleMix)*r,h.shearMix+=(m-h.shearMix)*r)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=Y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*W.ENTRIES),e}B.TransformConstraintTimeline=X;var G,q=(me(H,G=s),H.prototype.getPropertyId=function(){return(i.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,i){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=i},H.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return void(h.position=h.data.position);case U.first:h.position+=(h.data.position-h.position)*r}else{var l,u,c,f=0;i>=a[a.length-H.ENTRIES]?f=a[a.length+H.PREV_VALUE]:(f=a[(l=z.binarySearch(a,i,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(i-u)/(a[l+H.PREV_TIME]-u)),f+=(a[l+H.VALUE]-f)*c),s==U.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=G.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*H.ENTRIES),e}B.PathConstraintPositionTimeline=q;var j,Z=(me(K,j=q),K.prototype.getPropertyId=function(){return(i.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return void(h.spacing=h.data.spacing);case U.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,u,c,f=0;i>=a[a.length-K.ENTRIES]?f=a[a.length+K.PREV_VALUE]:(f=a[(l=z.binarySearch(a,i,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(i-u)/(a[l+K.PREV_TIME]-u)),f+=(a[l+K.VALUE]-f)*c),s==U.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}B.PathConstraintSpacingTimeline=Z;var Q,J=(me($,Q=s),$.prototype.getPropertyId=function(){return(i.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,i,n){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=i,this.frames[t+$.TRANSLATE]=n},$.prototype.apply=function(t,e,i,n,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(i<a[0])switch(s){case U.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case U.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,u,c,f=0,d=0;i>=a[a.length-$.ENTRIES]?(f=a[a.length+$.PREV_ROTATE],d=a[a.length+$.PREV_TRANSLATE]):(f=a[(l=z.binarySearch(a,i,$.ENTRIES))+$.PREV_ROTATE],d=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(i-u)/(a[l+$.PREV_TIME]-u)),f+=(a[l+$.ROTATE]-f)*c,d+=(a[l+$.TRANSLATE]-d)*c),s==U.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*$.ENTRIES),e}B.PathConstraintMixTimeline=J}(ge=ge||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,i=0,n=e.length;i<n;i++){var r=e[i];if(null!=r){r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var s=t*r.timeScale;if(0<r.delay){if(r.delay-=s,0<r.delay)continue;s=-r.delay,r.delay=0}var o=r.next;if(null!=o){var a=r.trackLast-o.delay;if(0<=a){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)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var i=t.mixingFrom;if(null==i)return!0;var n=this.updateMixingFrom(i,e);return i.animationLast=i.nextAnimationLast,i.trackLast=i.nextTrackLast,0<t.mixTime&&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)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,i=this.tracks,n=!1,r=0,s=i.length;r<s;r++){var o=i[r];if(!(null==o||0<o.delay)){n=!0;var a=0==r?R.MixBlend.first:o.mixBlend,h=o.alpha;null!=o.mixingFrom?h*=this.applyMixingFrom(o,t,a):o.trackTime>=o.trackEnd&&null==o.next&&(h=0);var l=o.animationLast,u=o.getAnimationTime(),c=o.animation.timelines.length,f=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var d=0;d<c;d++){R.Utils.webkit602BugfixHelper(h,a);var p=f[d];p instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(p,t,u,a,!0):p.apply(t,l,u,e,h,a,R.MixDirection.mixIn)}else{var g=o.timelineMode,v=0==o.timelinesRotation.length;v&&R.Utils.setArraySize(o.timelinesRotation,c<<1,null);for(var m=o.timelinesRotation,d=0;d<c;d++){var M=f[d],x=g[d]==S.SUBSEQUENT?a:R.MixBlend.setup;M instanceof R.RotateTimeline?this.applyRotateTimeline(M,t,u,h,x,m,d<<1,v):M instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(M,t,u,a,!0):(R.Utils.webkit602BugfixHelper(h,a),M.apply(t,l,u,e,h,x,R.MixDirection.mixIn))}}this.queueEvents(o,u),e.length=0,o.nextAnimationLast=u,o.nextTrackLast=o.trackTime}}for(var y=this.unkeyedState+S.SETUP,w=t.slots,T=0,E=t.slots.length;T<E;T++){var b,A=w[T];A.attachmentState==y&&(b=A.data.attachmentName,A.attachment=null==b?null:t.getAttachment(A.data.index,b))}return this.unkeyedState+=2,this.queue.drain(),n},S.prototype.applyMixingFrom=function(t,e,i){var n=t.mixingFrom;null!=n.mixingFrom&&this.applyMixingFrom(n,e,i);var r=0;0==t.mixDuration?(r=1,i==R.MixBlend.first&&(i=R.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),i!=R.MixBlend.first&&(i=n.mixBlend));var s=r<n.eventThreshold?this.events:null,o=r<n.attachmentThreshold,a=r<n.drawOrderThreshold,h=n.animationLast,l=n.getAnimationTime(),u=n.animation.timelines.length,c=n.animation.timelines,f=n.alpha*t.interruptAlpha,d=f*(1-r);if(i==R.MixBlend.add)for(var p=0;p<u;p++)c[p].apply(e,h,l,s,d,i,R.MixDirection.mixOut);else{var g=n.timelineMode,v=n.timelineHoldMix,m=0==n.timelinesRotation.length;m&&R.Utils.setArraySize(n.timelinesRotation,u<<1,null);for(var M=n.timelinesRotation,p=n.totalAlpha=0;p<u;p++){var x=c[p],y=R.MixDirection.mixOut,w=void 0,T=0;switch(g[p]){case S.SUBSEQUENT:if(!a&&x instanceof R.DrawOrderTimeline)continue;w=i,T=d;break;case S.FIRST:w=R.MixBlend.setup,T=d;break;case S.HOLD_SUBSEQUENT:w=i,T=f;break;case S.HOLD_FIRST:w=R.MixBlend.setup,T=f;break;default:w=R.MixBlend.setup;var E=v[p],T=f*Math.max(0,1-E.mixTime/E.mixDuration)}n.totalAlpha+=T,x instanceof R.RotateTimeline?this.applyRotateTimeline(x,e,l,T,w,M,p<<1,m):x instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,w,o):(R.Utils.webkit602BugfixHelper(T,i),a&&x instanceof R.DrawOrderTimeline&&w==R.MixBlend.setup&&(y=R.MixDirection.mixIn),x.apply(e,h,l,s,T,w,y))}}return 0<t.mixDuration&&this.queueEvents(n,l),this.events.length=0,n.nextAnimationLast=l,n.nextTrackLast=n.trackTime,r},S.prototype.applyAttachmentTimeline=function(t,e,i,n,r){var s,o,a=e.slots[t.slotIndex];a.bone.active&&(i<(s=t.frames)[0]?n!=R.MixBlend.setup&&n!=R.MixBlend.first||this.setAttachment(e,a,a.data.attachmentName,r):(o=i>=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,i)-1,this.setAttachment(e,a,t.attachmentNames[o],r)),a.attachmentState<=this.unkeyedState&&(a.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,i,n){e.attachment=null==i?null:t.getAttachment(e.data.index,i),n&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,i,n,r,s,o,a){if(a&&(s[o]=0),1!=n){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(i<l[0])switch(r){case R.MixBlend.setup:u.rotation=u.data.rotation;default:return;case R.MixBlend.first:c=u.rotation,f=u.data.rotation}else{var d,p,g,v,c=r==R.MixBlend.setup?u.data.rotation:u.rotation;i>=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,i,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],g=l[d],v=h.getCurvePercent((d>>1)-1,1-(i-g)/(l[d+R.RotateTimeline.PREV_TIME]-g)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*v+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var m,M,x,y,w=0,T=f-c;0==(T-=360*(16384-(16384.499999999996-T/360|0)))?w=s[o]:(M=m=0,M=a?(m=0,T):(m=s[o],s[o+1]),x=0<T,y=0<=m,R.MathUtils.signum(M)!=R.MathUtils.signum(T)&&Math.abs(M)<=90&&(180<Math.abs(m)&&(m+=360*R.MathUtils.signum(m)),y=x),w=T+m-m%360,y!=x&&(w+=360*R.MathUtils.signum(m)),s[o]=w),s[o+1]=T,c+=w*n,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}}else t.apply(e,0,i,null,1,r,R.MixDirection.mixIn)},S.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;a<h;a++){var l=o[a];if(l.time<s)break;l.time>n||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:n<=e&&t.animationLast<n)&&this.queue.complete(t);a<h;a++)o[a].time<i||this.queue.event(t,o[a])},S.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,i=this.tracks.length;e<i;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},S.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var 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()}}},S.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).mixingTo=e).mixTime=0,null!=n.mixingFrom&&0<n.mixDuration&&(e.interruptAlpha*=Math.min(1,n.mixTime/n.mixDuration)),n.timelinesRotation.length=0),this.queue.start(e)},S.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)},S.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},S.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)},S.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,o=this.trackEntry(t,e,i,r);return null==r?(this.setCurrent(t,o,!0),this.queue.drain()):(r.next=o,n<=0&&(0!=(s=r.animationEnd-r.animationStart)?(r.loop?n+=s*(1+(r.trackTime/s|0)):n+=Math.max(s,r.trackTime),n-=this.data.getMix(r.animation,e)):n=r.trackTime)),o.delay=n,o},S.prototype.setEmptyAnimation=function(t,e){var i=this.setAnimationWith(t,S.emptyAnimation,!1);return i.mixDuration=e,i.trackEnd=e,i},S.prototype.addEmptyAnimation=function(t,e,i){i<=0&&(i-=e);var n=this.addAnimationWith(t,S.emptyAnimation,!1,i);return n.mixDuration=e,n.trackEnd=e,n},S.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var i=0,n=this.tracks.length;i<n;i++){var r=this.tracks[i];null!=r&&this.setEmptyAnimation(r.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},S.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(R.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},S.prototype.trackEntry=function(t,e,i,n){var r=this.trackEntryPool.obtain();return r.trackIndex=t,r.animation=e,r.loop=i,r.holdPrevious=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.interruptAlpha=1,r.mixTime=0,r.mixDuration=null==n?0:this.data.getMix(n.animation,e),r.mixBlend=R.MixBlend.replace,r},S.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},S.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var t=0,e=this.tracks.length;t<e;t++){var i=this.tracks[t];if(null!=i){for(;null!=i.mixingFrom;)i=i.mixingFrom;for(;null!=i.mixingFrom&&i.mixBlend==R.MixBlend.add||this.computeHold(i),null!=(i=i.mixingTo););}}},S.prototype.computeHold=function(t){var e=t.mixingTo,i=t.animation.timelines,n=t.animation.timelines.length,r=R.Utils.setArraySize(t.timelineMode,n);t.timelineHoldMix.length=0;var s=R.Utils.setArraySize(t.timelineHoldMix,n),o=this.propertyIDs;if(null!=e&&e.holdPrevious)for(var a=0;a<n;a++)r[a]=o.add(i[a].getPropertyId())?S.HOLD_FIRST:S.HOLD_SUBSEQUENT;else t:for(a=0;a<n;a++){var h=i[a],l=h.getPropertyId();if(o.add(l))if(null==e||h instanceof R.AttachmentTimeline||h instanceof R.DrawOrderTimeline||h instanceof R.EventTimeline||!e.animation.hasTimeline(l))r[a]=S.FIRST;else{for(var u=e.mixingTo;null!=u;u=u.mixingTo)if(!u.animation.hasTimeline(l)){if(0<t.mixDuration){r[a]=S.HOLD_MIX,s[a]=u;continue t}break}r[a]=S.HOLD_FIRST}else r[a]=S.SUBSEQUENT}},S.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("<empty>",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(i.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},i.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)},i.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},i.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},i.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},i);function i(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,n,r=(s.prototype.start=function(t){this.objects.push(a.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(a.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(a.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(a.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(a.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(a.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,i=0;i<t.length;i+=2){var n=t[i],r=t[i+1];switch(n){case a.start:null!=r.listener&&r.listener.start&&r.listener.start(r);for(var s=0;s<e.length;s++)e[s].start&&e[s].start(r);break;case a.interrupt:for(null!=r.listener&&r.listener.interrupt&&r.listener.interrupt(r),s=0;s<e.length;s++)e[s].interrupt&&e[s].interrupt(r);break;case a.end:for(null!=r.listener&&r.listener.end&&r.listener.end(r),s=0;s<e.length;s++)e[s].end&&e[s].end(r);case a.dispose:for(null!=r.listener&&r.listener.dispose&&r.listener.dispose(r),s=0;s<e.length;s++)e[s].dispose&&e[s].dispose(r);this.animState.trackEntryPool.free(r);break;case a.complete:for(null!=r.listener&&r.listener.complete&&r.listener.complete(r),s=0;s<e.length;s++)e[s].complete&&e[s].complete(r);break;case a.event:var o=t[2+i++];for(null!=r.listener&&r.listener.event&&r.listener.event(r,o),s=0;s<e.length;s++)e[s].event&&e[s].event(r,o)}}this.clear(),this.drainDisabled=!1}},s.prototype.clear=function(){this.objects.length=0},s);function s(t){this.objects=[],this.drainDisabled=!1,this.animState=t}R.EventQueue=r,(n=a=R.EventType||(R.EventType={}))[n.start=0]="start",n[n.interrupt=1]="interrupt",n[n.end=2]="end",n[n.dispose=3]="dispose",n[n.complete=4]="complete",n[n.event=5]="event";var o=(h.prototype.start=function(t){},h.prototype.interrupt=function(t){},h.prototype.end=function(t){},h.prototype.dispose=function(t){},h.prototype.complete=function(t){},h.prototype.event=function(t,e){},h);function h(){}R.AnimationStateAdapter=o}(ge=ge||{}),t=ge=ge||{},Me.prototype.setMix=function(t,e,i){var n=this.skeletonData.findAnimation(t);if(null==n)throw new Error("Animation not found: "+t);var r=this.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);this.setMixWith(n,r,i)},Me.prototype.setMixWith=function(t,e,i){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");var n=t.name+"."+e.name;this.animationToMixTime[n]=i},Me.prototype.getMix=function(t,e){var i=t.name+"."+e.name,n=this.animationToMixTime[i];return void 0===n?this.defaultMix:n},e=Me,t.AnimationStateData=e,d=ge=ge||{},xe.prototype.downloadText=function(t,e,i){var n=new XMLHttpRequest;n.overrideMimeType("text/html"),this.rawDataUris[t]&&(t=this.rawDataUris[t]),n.open("GET",t,!0),n.onload=function(){200==n.status?e(n.responseText):i(n.status,n.responseText)},n.onerror=function(){i(n.status,n.responseText)},n.send()},xe.prototype.downloadBinary=function(t,e,i){var n=new XMLHttpRequest;this.rawDataUris[t]&&(t=this.rawDataUris[t]),n.open("GET",t,!0),n.responseType="arraybuffer",n.onload=function(){200==n.status?e(new Uint8Array(n.response)):i(n.status,n.responseText)},n.onerror=function(){i(n.status,n.responseText)},n.send()},xe.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},xe.prototype.loadBinary=function(i,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null),i=this.pathPrefix+i,this.toLoad++,this.downloadBinary(i,function(t){r.assets[i]=t,e&&e(i,t),r.toLoad--,r.loaded++},function(t,e){r.errors[i]="Couldn't load binary "+i+": status "+status+", "+e,n&&n(i,"Couldn't load binary "+i+": status "+status+", "+e),r.toLoad--,r.loaded++})},xe.prototype.loadText=function(i,e,n){var r=this;void 0===e&&(e=null),void 0===n&&(n=null),i=this.pathPrefix+i,this.toLoad++,this.downloadText(i,function(t){r.assets[i]=t,e&&e(i,t),r.toLoad--,r.loaded++},function(t,e){r.errors[i]="Couldn't load text "+i+": status "+status+", "+e,n&&n(i,"Couldn't load text "+i+": status "+status+", "+e),r.toLoad--,r.loaded++})},xe.prototype.loadTexture=function(i,n,e){var r=this;void 0===n&&(n=null),void 0===e&&(e=null);var s=i=this.pathPrefix+i;this.toLoad++;var o=new Image;o.crossOrigin="anonymous",o.onload=function(t){var e=r.textureLoader(o);r.assets[s]=e,r.toLoad--,r.loaded++,n&&n(i,o)},o.onerror=function(t){r.errors[i]="Couldn't load image "+i,r.toLoad--,r.loaded++,e&&e(i,"Couldn't load image "+i)},this.rawDataUris[i]&&(i=this.rawDataUris[i]),o.src=i},xe.prototype.loadTextureAtlas=function(h,l,u){var c=this;void 0===l&&(l=null),void 0===u&&(u=null);var f=0<=h.lastIndexOf("/")?h.substring(0,h.lastIndexOf("/")):"";h=this.pathPrefix+h,this.toLoad++,this.downloadText(h,function(s){var o={count:0},a=new Array;try{new d.TextureAtlas(s,function(t){a.push(""==f?t:f+"/"+t);var e=document.createElement("img");return e.width=16,e.height=16,new d.FakeTexture(e)})}catch(t){var e=t;return c.errors[h]="Couldn't load texture atlas "+h+": "+e.message,u&&u(h,"Couldn't load texture atlas "+h+": "+e.message),c.toLoad--,void c.loaded++}for(var t=0,i=a;t<i.length;t++)!function(t){var r=!1;c.loadTexture(t,function(t,e){if(o.count++,o.count==a.length)if(r)c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++;else try{var i=new d.TextureAtlas(s,function(t){return c.get(""==f?t:f+"/"+t)});c.assets[h]=i,l&&l(h,i),c.toLoad--,c.loaded++}catch(t){var n=t;c.errors[h]="Couldn't load texture atlas "+h+": "+n.message,u&&u(h,"Couldn't load texture atlas "+h+": "+n.message),c.toLoad--,c.loaded++}},function(t,e){r=!0,o.count++,o.count==a.length&&(c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++)})}(i[t])},function(t,e){c.errors[h]="Couldn't load texture atlas "+h+": status "+status+", "+e,u&&u(h,"Couldn't load texture atlas "+h+": status "+status+", "+e),c.toLoad--,c.loaded++})},xe.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},xe.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},xe.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},xe.prototype.isLoadingComplete=function(){return 0==this.toLoad},xe.prototype.getToLoad=function(){return this.toLoad},xe.prototype.getLoaded=function(){return this.loaded},xe.prototype.dispose=function(){this.removeAll()},xe.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},xe.prototype.getErrors=function(){return this.errors},i=xe,d.AssetManager=i,s=ge=ge||{},ye.prototype.newRegionAttachment=function(t,e,i){var n=this.atlas.findRegion(i);if(null==n)throw new Error("Region not found in atlas: "+i+" (region attachment: "+e+")");n.renderObject=n;var r=new s.RegionAttachment(e);return r.setRegion(n),r},ye.prototype.newMeshAttachment=function(t,e,i){var n=this.atlas.findRegion(i);if(null==n)throw new Error("Region not found in atlas: "+i+" (mesh attachment: "+e+")");n.renderObject=n;var r=new s.MeshAttachment(e);return r.region=n,r},ye.prototype.newBoundingBoxAttachment=function(t,e){return new s.BoundingBoxAttachment(e)},ye.prototype.newPathAttachment=function(t,e){return new s.PathAttachment(e)},ye.prototype.newPointAttachment=function(t,e){return new s.PointAttachment(e)},ye.prototype.newClippingAttachment=function(t,e){return new s.ClippingAttachment(e)},r=ye,s.AtlasAttachmentLoader=r,o=ge=ge||{},(a=o.BlendMode||(o.BlendMode={}))[a.Normal=0]="Normal",a[a.Additive=1]="Additive",a[a.Multiply=2]="Multiply",a[a.Screen=3]="Screen",_=ge=ge||{},we.prototype.isActive=function(){return this.active},we.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},we.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},we.prototype.updateWorldTransformWith=function(t,e,i,n,r,s,o){this.ax=t,this.ay=e,this.arotation=i,this.ascaleX=n,this.ascaleY=r,this.ashearX=s,this.ashearY=o,this.appliedValid=!0;var a=this.parent;if(null==a){var h=this.skeleton,l=i+90+o,u=h.scaleX,c=h.scaleY;return this.a=_.MathUtils.cosDeg(i+s)*n*u,this.b=_.MathUtils.cosDeg(l)*r*u,this.c=_.MathUtils.sinDeg(i+s)*n*c,this.d=_.MathUtils.sinDeg(l)*r*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var f=a.a,d=a.b,p=a.c,g=a.d;switch(this.worldX=f*t+d*e+a.worldX,this.worldY=p*t+g*e+a.worldY,this.data.transformMode){case _.TransformMode.Normal:var l=i+90+o,v=_.MathUtils.cosDeg(i+s)*n,m=_.MathUtils.cosDeg(l)*r,M=_.MathUtils.sinDeg(i+s)*n,x=_.MathUtils.sinDeg(l)*r;return this.a=f*v+d*M,this.b=f*m+d*x,this.c=p*v+g*M,void(this.d=p*m+g*x);case _.TransformMode.OnlyTranslation:l=i+90+o,this.a=_.MathUtils.cosDeg(i+s)*n,this.b=_.MathUtils.cosDeg(l)*r,this.c=_.MathUtils.sinDeg(i+s)*n,this.d=_.MathUtils.sinDeg(l)*r;break;case _.TransformMode.NoRotationOrReflection:var y=0,w=i+s-(y=1e-4<(E=f*f+p*p)?(E=Math.abs(f*g-d*p)/E,f/=this.skeleton.scaleX,d=(p/=this.skeleton.scaleY)*E,g=f*E,Math.atan2(p,f)*_.MathUtils.radDeg):(p=f=0,90-Math.atan2(g,d)*_.MathUtils.radDeg)),T=i+o-y+90,v=_.MathUtils.cosDeg(w)*n,m=_.MathUtils.cosDeg(T)*r,M=_.MathUtils.sinDeg(w)*n,x=_.MathUtils.sinDeg(T)*r;this.a=f*v-d*M,this.b=f*m-d*x,this.c=p*v+g*M,this.d=p*m+g*x;break;case _.TransformMode.NoScale:case _.TransformMode.NoScaleOrReflection:var E,b=_.MathUtils.cosDeg(i),A=_.MathUtils.sinDeg(i),R=(f*b+d*A)/this.skeleton.scaleX,S=(p*b+g*A)/this.skeleton.scaleY;1e-5<(E=Math.sqrt(R*R+S*S))&&(E=1/E),R*=E,S*=E,E=Math.sqrt(R*R+S*S),this.data.transformMode==_.TransformMode.NoScale&&f*g-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(E=-E);var C=Math.PI/2+Math.atan2(S,R),I=Math.cos(C)*E,P=Math.sin(C)*E,v=_.MathUtils.cosDeg(s)*n,m=_.MathUtils.cosDeg(90+o)*r,M=_.MathUtils.sinDeg(s)*n,x=_.MathUtils.sinDeg(90+o)*r;this.a=R*v+I*M,this.b=R*m+I*x,this.c=S*v+P*M,this.d=S*m+P*x}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},we.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},we.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*_.MathUtils.radDeg},we.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*_.MathUtils.radDeg},we.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},we.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},we.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t=this.parent;if(null==t)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*_.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)*_.MathUtils.radDeg);var e=t.a,i=t.b,n=t.c,r=t.d,s=1/(e*r-i*n),o=this.worldX-t.worldX,a=this.worldY-t.worldY;this.ax=o*r*s-a*i*s,this.ay=a*e*s-o*n*s;var h,l=s*r,u=s*e,c=s*i,f=s*n,d=l*this.a-c*this.c,p=l*this.b-c*this.d,g=u*this.c-f*this.a,v=u*this.d-f*this.b;this.ashearX=0,this.ascaleX=Math.sqrt(d*d+g*g),1e-4<this.ascaleX?(h=d*v-p*g,this.ascaleY=h/this.ascaleX,this.ashearY=Math.atan2(d*p+g*v,h)*_.MathUtils.radDeg,this.arotation=Math.atan2(g,d)*_.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+v*v),this.ashearY=0,this.arotation=90-Math.atan2(v,p)*_.MathUtils.radDeg)},we.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},we.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},we.prototype.worldToLocalRotation=function(t){var e=_.MathUtils.sinDeg(t),i=_.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*i,this.d*i-this.b*e)*_.MathUtils.radDeg+this.rotation-this.shearX},we.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=_.MathUtils.sinDeg(t),i=_.MathUtils.cosDeg(t);return Math.atan2(i*this.c+e*this.d,i*this.a+e*this.b)*_.MathUtils.radDeg},we.prototype.rotateWorld=function(t){var e=this.a,i=this.b,n=this.c,r=this.d,s=_.MathUtils.cosDeg(t),o=_.MathUtils.sinDeg(t);this.a=s*e-o*n,this.b=s*i-o*r,this.c=o*e+s*n,this.d=o*i+s*r,this.appliedValid=!1},h=we,_.Bone=h,(l=ge=ge||{}).BoneData=Te,(c=u=l.TransformMode||(l.TransformMode={}))[c.Normal=0]="Normal",c[c.OnlyTranslation=1]="OnlyTranslation",c[c.NoRotationOrReflection=2]="NoRotationOrReflection",c[c.NoScale=3]="NoScale",c[c.NoScaleOrReflection=4]="NoScaleOrReflection",(ge||(ge={})).ConstraintData=function(t,e,i){this.name=t,this.order=e,this.skinRequired=i},(ge||(ge={})).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(ge||(ge={})).EventData=function(t){this.name=t},ht=ge=ge||{},Ee.prototype.isActive=function(){return this.active},Ee.prototype.apply=function(){this.update()},Ee.prototype.update=function(){var t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.softness,this.mix)}},Ee.prototype.apply1=function(t,e,i,n,r,s,o){t.appliedValid||t.updateAppliedTransform();var a=t.parent,h=a.a,l=a.b,u=a.c,c=a.d,f=-t.ashearX-t.arotation,d=0,p=0;switch(t.data.transformMode){case ht.TransformMode.OnlyTranslation:d=e-t.worldX,p=i-t.worldY;break;case ht.TransformMode.NoRotationOrReflection:var g=Math.abs(h*c-l*u)/(h*h+u*u),v=h/t.skeleton.scaleX,m=u/t.skeleton.scaleY,l=-m*g*t.skeleton.scaleX,c=v*g*t.skeleton.scaleY;f+=Math.atan2(m,v)*ht.MathUtils.radDeg;default:var M=e-a.worldX,x=i-a.worldY,y=h*c-l*u,d=(M*c-x*l)/y-t.ax,p=(x*h-M*u)/y-t.ay}f+=Math.atan2(p,d)*ht.MathUtils.radDeg,t.ascaleX<0&&(f+=180),180<f?f-=360:f<-180&&(f+=360);var w=t.ascaleX,T=t.ascaleY;if(n||r){switch(t.data.transformMode){case ht.TransformMode.NoScale:case ht.TransformMode.NoScaleOrReflection:d=e-t.worldX,p=i-t.worldY}var E=t.data.length*w,b=Math.sqrt(d*d+p*p);(n&&b<E||r&&E<b&&1e-4<E)&&(w*=g=(b/E-1)*o+1,s&&(T*=g))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*o,w,T,t.ashearX,t.ashearY)},Ee.prototype.apply2=function(t,e,i,n,r,s,o,a){if(0!=a){t.appliedValid||t.updateAppliedTransform(),e.appliedValid||e.updateAppliedTransform();var h=t.ax,l=t.ay,u=t.ascaleX,c=u,f=t.ascaleY,d=e.ascaleX,p=0,g=0,v=0,v=u<0?(u=-u,p=180,-1):(p=0,1);f<0&&(f=-f,v=-v),g=d<0?(d=-d,180):0;var m=e.ax,M=0,x=0,y=0,w=t.a,T=t.b,E=t.c,b=t.d,A=Math.abs(u-f)<=1e-4,y=A?(x=w*m+T*(M=e.ay)+t.worldX,E*m+b*M+t.worldY):(M=0,x=w*m+t.worldX,E*m+t.worldY),R=t.parent,w=R.a,T=R.b;E=R.c;var S,C=1/(w*(b=R.d)-T*E),I=x-R.worldX,P=y-R.worldY,_=(I*b-P*T)*C-h,L=(P*w-I*E)*C-l,k=Math.sqrt(_*_+L*L),O=e.data.length*d;if(k<1e-4)return this.apply1(t,i,n,!1,s,!1,a),void e.updateWorldTransformWith(m,M,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var F,V,D,N=((I=i-R.worldX)*b-(P=n-R.worldY)*T)*C-h,Y=(P*w-I*E)*C-l,X=N*N+Y*Y;0!=o&&(o*=u*(d+1)/2,0<(V=(F=Math.sqrt(X))-k-O*u+o)&&(X=(N-=(D=(V-o*(1-(D=Math.min(1,V/(2*o))-1)*D))/F)*N)*N+(Y-=D*Y)*Y));t:if(A){var B=(X-k*k-(O*=u)*O)/(2*k*O);B<-1?B=-1:1<B&&(B=1,s&&(c*=(Math.sqrt(X)/(k+O)-1)*a+1)),S=Math.acos(B)*r,w=k+O*B,T=O*Math.sin(S),st=Math.atan2(Y*w-N*T,N*w+Y*T)}else{var U=(w=u*O)*w,z=(T=f*O)*T,W=Math.atan2(Y,N),G=-2*z*k,q=z-U;if(0<=(b=G*G-4*q*(E=z*k*k+U*X-U*z))){var H=Math.sqrt(b);G<0&&(H=-H);var j=(H=-(G+H)/2)/q,Z=E/H,K=Math.abs(j)<Math.abs(Z)?j:Z;if(K*K<=X){P=Math.sqrt(X-K*K)*r,st=W-Math.atan2(P,K),S=Math.atan2(P/f,(K-k)/u);break t}}var Q=ht.MathUtils.PI,J=k-w,$=J*J,tt=0,et=0,it=k+w,nt=it*it,rt=0;-1<=(E=-w*k/(U-z))&&E<=1&&(E=Math.acos(E),(b=(I=w*Math.cos(E)+k)*I+(P=T*Math.sin(E))*P)<$&&(Q=E,$=b,J=I,tt=P),nt<b&&(et=E,nt=b,it=I,rt=P)),S=X<=($+nt)/2?(st=W-Math.atan2(tt*r,J),Q*r):(st=W-Math.atan2(rt*r,it),et*r)}var st,ot=Math.atan2(M,m)*v,at=t.arotation;180<(st=(st-ot)*ht.MathUtils.radDeg+p-at)?st-=360:st<-180&&(st+=360),t.updateWorldTransformWith(h,l,at+st*a,c,t.ascaleY,0,0),at=e.arotation,180<(S=((S+ot)*ht.MathUtils.radDeg-e.ashearX)*v+g-at)?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(m,M,at+S*a,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}else e.updateWorldTransform()},f=Ee,ht.IkConstraint=f,p=ge=ge||{},g=p.ConstraintData,me(be,g),v=be,p.IkConstraintData=v,j=ge=ge||{},Ae.prototype.isActive=function(){return this.active},Ae.prototype.apply=function(){this.update()},Ae.prototype.update=function(){var t=this.target.getAttachment();if(t instanceof j.PathAttachment){var e=this.rotateMix,i=this.translateMix,n=0<e;if(0<i||n){var r=this.data,s=r.spacingMode==j.SpacingMode.Percent,o=r.rotateMode,a=o==j.RotateMode.Tangent,h=o==j.RotateMode.ChainScale,l=this.bones.length,u=a?l:l+1,c=this.bones,f=j.Utils.setArraySize(this.spaces,u),d=null,p=this.spacing;if(h||!s){h&&(d=j.Utils.setArraySize(this.lengths,l));for(var g=r.spacingMode==j.SpacingMode.Length,v=0,m=u-1;v<m;){var M,x,y=(R=c[v]).data.length;y<Ae.epsilon?(h&&(d[v]=0),f[++v]=0):s?(h&&(C=y*R.a,I=y*R.c,M=Math.sqrt(C*C+I*I),d[v]=M),f[++v]=p):(C=y*R.a,I=y*R.c,x=Math.sqrt(C*C+I*I),h&&(d[v]=x),f[++v]=(g?y+p:p)*x/y)}}else for(v=1;v<u;v++)f[v]=p;var w=this.computeWorldPositions(t,u,a,r.positionMode==j.PositionMode.Percent,s),T=w[0],E=w[1],b=r.offsetRotation,A=!1;0==b?A=o==j.RotateMode.Chain:(A=!1,b*=0<(S=this.target.bone).a*S.d-S.b*S.c?j.MathUtils.degRad:-j.MathUtils.degRad);for(var R,v=0,S=3;v<l;v++,S+=3){(R=c[v]).worldX+=(T-R.worldX)*i,R.worldY+=(E-R.worldY)*i;var C,I,P,_,L,k,O,F,V,D,N,Y,X=(C=w[S])-T,B=(I=w[S+1])-E;!h||0!=(P=d[v])&&(_=(Math.sqrt(X*X+B*B)/P-1)*e+1,R.a*=_,R.c*=_),T=C,E=I,n&&(L=R.a,k=R.b,O=R.c,F=R.d,D=V=Y=0,Y=a?w[S-1]:0==f[v+1]?w[S+2]:Math.atan2(B,X),Y-=Math.atan2(O,L),A?(V=Math.cos(Y),D=Math.sin(Y),T+=((N=R.data.length)*(V*L-D*O)-X)*e,E+=(N*(D*L+V*O)-B)*e):Y+=b,Y>j.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,V=Math.cos(Y),D=Math.sin(Y),R.a=V*L-D*O,R.b=V*k-D*F,R.c=D*L+V*O,R.d=D*k+V*F),R.appliedValid=!1}}}},Ae.prototype.computeWorldPositions=function(t,e,i,n,r){var s=this.target,o=this.position,a=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=Ae.NONE;if(!t.constantSpeed){var p=t.lengths,g=p[f-=u?1:2];if(n&&(o*=g),r)for(var v=1;v<e;v++)a[v]*=g;l=j.Utils.setArraySize(this.world,8);for(var v=0,m=0,M=0;v<e;v++,m+=3){var x=o+=z=a[v];if(u)(x%=g)<0&&(x+=g),M=0;else{if(x<0){d!=Ae.BEFORE&&(d=Ae.BEFORE,t.computeWorldVertices(s,2,4,l,0,2)),this.addBeforePosition(x,l,0,h,m);continue}if(g<x){d!=Ae.AFTER&&(d=Ae.AFTER,t.computeWorldVertices(s,c-6,4,l,0,2)),this.addAfterPosition(x-g,l,0,h,m);continue}}for(;;M++){var y=p[M];if(!(y<x)){0==M?x/=y:x=(x-(q=p[M-1]))/(y-q);break}}M!=d&&(d=M,u&&M==f?(t.computeWorldVertices(s,c-4,4,l,0,2),t.computeWorldVertices(s,0,4,l,4,2)):t.computeWorldVertices(s,6*M+2,8,l,0,2)),this.addCurvePosition(x,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],h,m,i||0<v&&0==z)}return h}u?(c+=2,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c-4,l,0,2),t.computeWorldVertices(s,0,2,l,c-4,2),l[c-2]=l[0],l[c-1]=l[1]):(f--,c-=4,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c,l,0,2));for(var w=j.Utils.setArraySize(this.curves,f),T=0,E=l[0],b=l[1],A=0,R=0,S=0,C=0,I=0,P=0,_=0,L=0,k=0,O=0,F=0,V=0,D=0,N=0,v=0,Y=2;v<f;v++,Y+=6)A=l[Y],R=l[Y+1],S=l[Y+2],C=l[Y+3],F=2*(_=.1875*(E-2*A+S))+(k=.09375*(3*(A-S)-E+(I=l[Y+4]))),V=2*(L=.1875*(b-2*R+C))+(O=.09375*(3*(R-C)-b+(P=l[Y+5]))),D=.75*(A-E)+_+.16666667*k,N=.75*(R-b)+L+.16666667*O,T+=Math.sqrt(D*D+N*N),D+=F,N+=V,F+=k,V+=O,T+=Math.sqrt(D*D+N*N),D+=F,N+=V,T+=Math.sqrt(D*D+N*N),D+=F+k,N+=V+O,T+=Math.sqrt(D*D+N*N),w[v]=T,E=I,b=P;if(o*=n?T:T/t.lengths[f-1],r)for(v=1;v<e;v++)a[v]*=T;for(var X=this.segments,B=0,v=0,m=0,M=0,U=0;v<e;v++,m+=3){var z,x=o+=z=a[v];if(u)(x%=T)<0&&(x+=T),M=0;else{if(x<0){this.addBeforePosition(x,l,0,h,m);continue}if(T<x){this.addAfterPosition(x-T,l,c-4,h,m);continue}}for(;;M++){var W=w[M];if(!(W<x)){0==M?x/=W:x=(x-(q=w[M-1]))/(W-q);break}}if(M!=d){var G=6*(d=M),E=l[G],b=l[G+1],A=l[G+2],R=l[G+3],S=l[G+4],C=l[G+5],F=2*(_=.03*(E-2*A+S))+(k=.006*(3*(A-S)-E+(I=l[G+6]))),V=2*(L=.03*(b-2*R+C))+(O=.006*(3*(R-C)-b+(P=l[G+7]))),D=.3*(A-E)+_+.16666667*k,N=.3*(R-b)+L+.16666667*O,B=Math.sqrt(D*D+N*N);for(X[0]=B,G=1;G<8;G++)D+=F,N+=V,F+=k,V+=O,B+=Math.sqrt(D*D+N*N),X[G]=B;D+=F,N+=V,B+=Math.sqrt(D*D+N*N),X[8]=B,D+=F+k,N+=V+O,B+=Math.sqrt(D*D+N*N),X[9]=B,U=0}for(x*=B;;U++){var q,H=X[U];if(!(H<x)){0==U?x/=H:x=U+(x-(q=X[U-1]))/(H-q);break}}this.addCurvePosition(.1*x,E,b,A,R,S,C,I,P,h,m,i||0<v&&0==z)}return h},Ae.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},Ae.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},Ae.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,g=p*p,v=g*p,m=p*t,M=3*m,x=p*M,y=M*t,w=e*v+n*x+s*y+a*d,T=i*v+r*x+o*y+h*d;l[u]=w,l[u+1]=T,c&&(l[u+2]=t<.001?Math.atan2(r-i,n-e):Math.atan2(T-(i*g+r*m*2+o*f),w-(e*g+n*m*2+s*f)))},Ae.NONE=-1,Ae.BEFORE=-2,Ae.AFTER=-3,Ae.epsilon=1e-5,m=Ae,j.PathConstraint=m,M=ge=ge||{},x=M.ConstraintData,me(Re,x),E=Re,M.PathConstraintData=E,(y=M.PositionMode||(M.PositionMode={}))[y.Fixed=0]="Fixed",y[y.Percent=1]="Percent",(w=M.SpacingMode||(M.SpacingMode={}))[w.Length=0]="Length",w[w.Fixed=1]="Fixed",w[w.Percent=2]="Percent",(T=M.RotateMode||(M.RotateMode={}))[T.Tangent=0]="Tangent",T[T.Chain=1]="Chain",T[T.ChainScale=2]="ChainScale",b=ge=ge||{},Se.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},A=Se,Ce.prototype.queueAsset=function(t,e,i){var n=this.clientAssets[t];return null==n&&(n=new A(t),this.clientAssets[t]=n),null!==e&&(n.textureLoader=e),n.toLoad.push(i),this.queuedAssets[i]!==i&&(this.queuedAssets[i]=i,!0)},Ce.prototype.loadText=function(t,e){var i,n=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((i=new XMLHttpRequest).overrideMimeType("text/html"),i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(200<=i.status&&i.status<300?n.rawAssets[e]=i.responseText:n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send())},Ce.prototype.loadJson=function(t,e){var i,n=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((i=new XMLHttpRequest).overrideMimeType("text/html"),i.onreadystatechange=function(){i.readyState==XMLHttpRequest.DONE&&(200<=i.status&&i.status<300?n.rawAssets[e]=JSON.parse(i.responseText):n.errors[e]="Couldn't load text "+e+": status "+i.status+", "+i.responseText)},i.open("GET",e,!0),i.send())},Ce.prototype.loadTexture=function(t,e,i){var n,r=this;i=this.pathPrefix+i,this.queueAsset(t,e,i)&&((n=new Image).crossOrigin="anonymous",n.onload=function(t){r.rawAssets[i]=n},n.onerror=function(t){r.errors[i]="Couldn't load image "+i},n.src=i)},Ce.prototype.get=function(t,e){e=this.pathPrefix+e;var i=this.clientAssets[t];return null==i||i.assets[e]},Ce.prototype.updateClientAssets=function(t){for(var e=0;e<t.toLoad.length;e++){var i=t.toLoad[e],n=t.assets[i];if(null==n){var r=this.rawAssets[i];if(null==r)continue;r instanceof HTMLImageElement?t.assets[i]=t.textureLoader(r):t.assets[i]=r}}},Ce.prototype.isLoadingComplete=function(t){var e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())},Ce.prototype.dispose=function(){},Ce.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Ce.prototype.getErrors=function(){return this.errors},R=Ce,b.SharedAssetManager=R,S=ge=ge||{},Ie.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,i=t.length;e<i;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var n=this.skin.bones,e=0,i=this.skin.bones.length;e<i;e++)for(var r=this.bones[n[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,o=this.transformConstraints,a=this.pathConstraints,h=s.length,l=o.length,u=a.length,c=h+l+u;t:for(e=0;e<c;e++){for(var f=0;f<h;f++)if((d=s[f]).data.order==e){this.sortIkConstraint(d);continue t}for(f=0;f<l;f++)if((d=o[f]).data.order==e){this.sortTransformConstraint(d);continue t}for(var d,f=0;f<u;f++)if((d=a[f]).data.order==e){this.sortPathConstraint(d);continue t}}for(e=0,i=t.length;e<i;e++)this.sortBone(t[e])},Ie.prototype.sortIkConstraint=function(t){var e,i,n,r;t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active&&(e=t.target,this.sortBone(e),n=(i=t.bones)[0],this.sortBone(n),1<i.length&&(r=i[i.length-1],-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)),this._updateCache.push(t),this.sortReset(n.children),i[i.length-1].sorted=!0)},Ie.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,i=e.data.index,n=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,i,n),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,i,n);for(var r=0,s=this.data.skins.length;r<s;r++)this.sortPathConstraintAttachment(this.data.skins[r],i,n);var o=e.getAttachment();o instanceof S.PathAttachment&&this.sortPathConstraintAttachmentWith(o,n);for(var a=t.bones,h=a.length,r=0;r<h;r++)this.sortBone(a[r]);for(this._updateCache.push(t),r=0;r<h;r++)this.sortReset(a[r].children);for(r=0;r<h;r++)a[r].sorted=!0}},Ie.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,i=e.length;if(t.data.local)for(var n=0;n<i;n++){var r=e[n];this.sortBone(r.parent),-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)}else for(n=0;n<i;n++)this.sortBone(e[n]);this._updateCache.push(t);for(var s=0;s<i;s++)this.sortReset(e[s].children);for(s=0;s<i;s++)e[s].sorted=!0}},Ie.prototype.sortPathConstraintAttachment=function(t,e,i){var n=t.attachments[e];if(n)for(var r in n)this.sortPathConstraintAttachmentWith(n[r],i)},Ie.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof S.PathAttachment){var i=t.bones;if(null==i)this.sortBone(e);else for(var n=this.bones,r=0;r<i.length;)for(var s=i[r++],o=r+s;r<o;r++){var a=i[r];this.sortBone(n[a])}}},Ie.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},Ie.prototype.sortReset=function(t){for(var e=0,i=t.length;e<i;e++){var n=t[e];n.active&&(n.sorted&&this.sortReset(n.children),n.sorted=!1)}},Ie.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,i=t.length;e<i;e++){var n=t[e];n.ax=n.x,n.ay=n.y,n.arotation=n.rotation,n.ascaleX=n.scaleX,n.ascaleY=n.scaleY,n.ashearX=n.shearX,n.ashearY=n.shearY,n.appliedValid=!0}for(var r=this._updateCache,e=0,i=r.length;e<i;e++)r[e].update()},Ie.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},Ie.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,i=t.length;e<i;e++)t[e].setToSetupPose();for(var n=this.ikConstraints,e=0,i=n.length;e<i;e++)(a=n[e]).mix=a.data.mix,a.softness=a.data.softness,a.bendDirection=a.data.bendDirection,a.compress=a.data.compress,a.stretch=a.data.stretch;for(var r=this.transformConstraints,e=0,i=r.length;e<i;e++){var s=(a=r[e]).data;a.rotateMix=s.rotateMix,a.translateMix=s.translateMix,a.scaleMix=s.scaleMix,a.shearMix=s.shearMix}for(var o=this.pathConstraints,e=0,i=o.length;e<i;e++){var a,s=(a=o[e]).data;a.position=s.position,a.spacing=s.spacing,a.rotateMix=s.rotateMix,a.translateMix=s.translateMix}},Ie.prototype.setSlotsToSetupPose=function(){var t=this.slots;S.Utils.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,i=t.length;e<i;e++)t[e].setToSetupPose()},Ie.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},Ie.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ie.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++)if(e[i].data.name==t)return i;return-1},Ie.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ie.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++)if(e[i].data.name==t)return i;return-1},Ie.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},Ie.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,i=0,n=e.length;i<n;i++){var r,s=e[i],o=s.data.attachmentName;null==o||null!=(r=t.getAttachment(i,o))&&s.setAttachment(r)}this.skin=t,this.updateCache()}},Ie.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},Ie.prototype.getAttachment=function(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){var i=this.skin.getAttachment(t,e);if(null!=i)return i}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},Ie.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var i=this.slots,n=0,r=i.length;n<r;n++){var s=i[n];if(s.data.name==t){var o=null;if(null!=e&&null==(o=this.getAttachment(n,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(o)}}throw new Error("Slot not found: "+t)},Ie.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ie.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ie.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.data.name==t)return r}return null},Ie.prototype.getBounds=function(t,e,i){if(void 0===i&&(i=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var n=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,h=0,l=n.length;h<l;h++){var u=n[h];if(u.bone.active){var c,f=0,d=null,p=u.getAttachment();if(p instanceof S.RegionAttachment?(f=8,d=S.Utils.setArraySize(i,f,0),p.computeWorldVertices(u.bone,d,0,2)):p instanceof S.MeshAttachment&&(f=(c=p).worldVerticesLength,d=S.Utils.setArraySize(i,f,0),c.computeWorldVertices(u,0,f,d,0,2)),null!=d)for(var g=0,v=d.length;g<v;g+=2)var m=d[g],M=d[g+1],r=Math.min(r,m),s=Math.min(s,M),o=Math.max(o,m),a=Math.max(a,M)}}t.set(r,s),e.set(o-r,a-s)},Ie.prototype.update=function(t){this.time+=t},C=Ie,S.Skeleton=C,function(W){var t=(G.prototype.readSkeletonData=function(t){var e=this.scale,i=new W.SkeletonData;i.name="";var n=new x(t);if(i.hash=n.readString(),i.version=n.readString(),"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=n.readFloat(),i.y=n.readFloat(),i.width=n.readFloat(),i.height=n.readFloat();var r=n.readBoolean();r&&(i.fps=n.readFloat(),i.imagesPath=n.readString(),i.audioPath=n.readString());for(var s=0,s=n.readInt(!0),o=0;o<s;o++)n.strings.push(n.readString());for(s=n.readInt(!0),o=0;o<s;o++){var a=n.readString(),h=0==o?null:i.bones[n.readInt(!0)];(c=new W.BoneData(o,a,h)).rotation=n.readFloat(),c.x=n.readFloat()*e,c.y=n.readFloat()*e,c.scaleX=n.readFloat(),c.scaleY=n.readFloat(),c.shearX=n.readFloat(),c.shearY=n.readFloat(),c.length=n.readFloat()*e,c.transformMode=G.TransformModeValues[n.readInt(!0)],c.skinRequired=n.readBoolean(),r&&W.Color.rgba8888ToColor(c.color,n.readInt32()),i.bones.push(c)}for(s=n.readInt(!0),o=0;o<s;o++){var l=n.readString(),u=i.bones[n.readInt(!0)],c=new W.SlotData(o,l,u);W.Color.rgba8888ToColor(c.color,n.readInt32());var f=n.readInt32();-1!=f&&W.Color.rgb888ToColor(c.darkColor=new W.Color,f),c.attachmentName=n.readStringRef(),c.blendMode=G.BlendModeValues[n.readInt(!0)],i.slots.push(c)}s=n.readInt(!0);for(var o=0,d=void 0;o<s;o++){(c=new W.IkConstraintData(n.readString())).order=n.readInt(!0),c.skinRequired=n.readBoolean(),d=n.readInt(!0);for(var p=0;p<d;p++)c.bones.push(i.bones[n.readInt(!0)]);c.target=i.bones[n.readInt(!0)],c.mix=n.readFloat(),c.softness=n.readFloat()*e,c.bendDirection=n.readByte(),c.compress=n.readBoolean(),c.stretch=n.readBoolean(),c.uniform=n.readBoolean(),i.ikConstraints.push(c)}for(s=n.readInt(!0),d=void(o=0);o<s;o++){for((c=new W.TransformConstraintData(n.readString())).order=n.readInt(!0),c.skinRequired=n.readBoolean(),d=n.readInt(!0),p=0;p<d;p++)c.bones.push(i.bones[n.readInt(!0)]);c.target=i.bones[n.readInt(!0)],c.local=n.readBoolean(),c.relative=n.readBoolean(),c.offsetRotation=n.readFloat(),c.offsetX=n.readFloat()*e,c.offsetY=n.readFloat()*e,c.offsetScaleX=n.readFloat(),c.offsetScaleY=n.readFloat(),c.offsetShearY=n.readFloat(),c.rotateMix=n.readFloat(),c.translateMix=n.readFloat(),c.scaleMix=n.readFloat(),c.shearMix=n.readFloat(),i.transformConstraints.push(c)}for(s=n.readInt(!0),d=void(o=0);o<s;o++){for((c=new W.PathConstraintData(n.readString())).order=n.readInt(!0),c.skinRequired=n.readBoolean(),d=n.readInt(!0),p=0;p<d;p++)c.bones.push(i.bones[n.readInt(!0)]);c.target=i.slots[n.readInt(!0)],c.positionMode=G.PositionModeValues[n.readInt(!0)],c.spacingMode=G.SpacingModeValues[n.readInt(!0)],c.rotateMode=G.RotateModeValues[n.readInt(!0)],c.offsetRotation=n.readFloat(),c.position=n.readFloat(),c.positionMode==W.PositionMode.Fixed&&(c.position*=e),c.spacing=n.readFloat(),c.spacingMode!=W.SpacingMode.Length&&c.spacingMode!=W.SpacingMode.Fixed||(c.spacing*=e),c.rotateMix=n.readFloat(),c.translateMix=n.readFloat(),i.pathConstraints.push(c)}var g=this.readSkin(n,i,!0,r);for(null!=g&&(i.defaultSkin=g,i.skins.push(g)),o=i.skins.length,W.Utils.setArraySize(i.skins,s=o+n.readInt(!0));o<s;o++)i.skins[o]=this.readSkin(n,i,!1,r);for(s=this.linkedMeshes.length,o=0;o<s;o++){var v=this.linkedMeshes[o],m=null==v.skin?i.defaultSkin:i.findSkin(v.skin);if(null==m)throw new Error("Skin not found: "+v.skin);var M=m.getAttachment(v.slotIndex,v.parent);if(null==M)throw new Error("Parent mesh not found: "+v.parent);v.mesh.deformAttachment=v.inheritDeform?M:v.mesh,v.mesh.setParentMesh(M),v.mesh.updateUVs()}for(this.linkedMeshes.length=0,s=n.readInt(!0),o=0;o<s;o++)(c=new W.EventData(n.readStringRef())).intValue=n.readInt(!1),c.floatValue=n.readFloat(),c.stringValue=n.readString(),c.audioPath=n.readString(),null!=c.audioPath&&(c.volume=n.readFloat(),c.balance=n.readFloat()),i.events.push(c);for(s=n.readInt(!0),o=0;o<s;o++)i.animations.push(this.readAnimation(n,n.readString(),i));return i},G.prototype.readSkin=function(t,e,i,n){var r=null,s=0;if(i){if(0==(s=t.readInt(!0)))return null;r=new W.Skin("default")}else{(r=new W.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var o=0,a=r.bones.length;o<a;o++)r.bones[o]=e.bones[t.readInt(!0)];for(o=0,a=t.readInt(!0);o<a;o++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(o=0,a=t.readInt(!0);o<a;o++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(o=0,a=t.readInt(!0);o<a;o++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);s=t.readInt(!0)}for(o=0;o<s;o++)for(var h=t.readInt(!0),l=0,u=t.readInt(!0);l<u;l++){var c=t.readStringRef(),f=this.readAttachment(t,e,r,h,c,n);null!=f&&r.setAttachment(h,c,f)}return r},G.prototype.readAttachment=function(t,e,i,n,r,s){var o=this.scale,a=t.readStringRef();null==a&&(a=r);var h=t.readByte();switch(G.AttachmentTypeValues[h]){case W.AttachmentType.Region:var l=t.readStringRef(),u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),d=t.readFloat(),p=t.readFloat(),g=t.readFloat(),v=t.readFloat(),m=t.readInt32();null==l&&(l=a);var M=this.attachmentLoader.newRegionAttachment(i,a,l);return null==M?null:(M.path=l,M.x=c*o,M.y=f*o,M.scaleX=d,M.scaleY=p,M.rotation=u,M.width=g*o,M.height=v*o,W.Color.rgba8888ToColor(M.color,m),M.updateOffset(),M);case W.AttachmentType.BoundingBox:var x=t.readInt(!0),y=this.readVertices(t,x),m=s?t.readInt32():0,w=this.attachmentLoader.newBoundingBoxAttachment(i,a);return null==w?null:(w.worldVerticesLength=x<<1,w.vertices=y.vertices,w.bones=y.bones,s&&W.Color.rgba8888ToColor(w.color,m),w);case W.AttachmentType.Mesh:var l=t.readStringRef(),m=t.readInt32(),x=t.readInt(!0),T=this.readFloatArray(t,x<<1,1),E=this.readShortArray(t),y=this.readVertices(t,x),b=t.readInt(!0),A=null,g=0,v=0;return s&&(A=this.readShortArray(t),g=t.readFloat(),v=t.readFloat()),null==l&&(l=a),null==(R=this.attachmentLoader.newMeshAttachment(i,a,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,m),R.bones=y.bones,R.vertices=y.vertices,R.worldVerticesLength=x<<1,R.triangles=E,R.regionUVs=T,R.updateUVs(),R.hullLength=b<<1,s&&(R.edges=A,R.width=g*o,R.height=v*o),R);case W.AttachmentType.LinkedMesh:var R,l=t.readStringRef(),m=t.readInt32(),S=t.readStringRef(),C=t.readStringRef(),I=t.readBoolean(),g=0,v=0;return s&&(g=t.readFloat(),v=t.readFloat()),null==l&&(l=a),null==(R=this.attachmentLoader.newMeshAttachment(i,a,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,m),s&&(R.width=g*o,R.height=v*o),this.linkedMeshes.push(new N(R,S,n,C,I)),R);case W.AttachmentType.Path:for(var P=t.readBoolean(),_=t.readBoolean(),x=t.readInt(!0),y=this.readVertices(t,x),L=W.Utils.newArray(x/3,0),k=0,O=L.length;k<O;k++)L[k]=t.readFloat()*o;return m=s?t.readInt32():0,null==(l=this.attachmentLoader.newPathAttachment(i,a))?null:(l.closed=P,l.constantSpeed=_,l.worldVerticesLength=x<<1,l.vertices=y.vertices,l.bones=y.bones,l.lengths=L,s&&W.Color.rgba8888ToColor(l.color,m),l);case W.AttachmentType.Point:var u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),m=s?t.readInt32():0,F=this.attachmentLoader.newPointAttachment(i,a);return null==F?null:(F.x=c*o,F.y=f*o,F.rotation=u,s&&W.Color.rgba8888ToColor(F.color,m),F);case W.AttachmentType.Clipping:var V=t.readInt(!0),x=t.readInt(!0),y=this.readVertices(t,x),m=s?t.readInt32():0,D=this.attachmentLoader.newClippingAttachment(i,a);return null==D?null:(D.endSlot=e.slots[V],D.worldVerticesLength=x<<1,D.vertices=y.vertices,D.bones=y.bones,s&&W.Color.rgba8888ToColor(D.color,m),D)}return null},G.prototype.readVertices=function(t,e){var i=e<<1,n=new u,r=this.scale;if(!t.readBoolean())return n.vertices=this.readFloatArray(t,i,r),n;for(var s=new Array,o=new Array,a=0;a<e;a++){var h=t.readInt(!0);o.push(h);for(var l=0;l<h;l++)o.push(t.readInt(!0)),s.push(t.readFloat()*r),s.push(t.readFloat()*r),s.push(t.readFloat())}return n.vertices=W.Utils.toFloatArray(s),n.bones=o,n},G.prototype.readFloatArray=function(t,e,i){var n=new Array(e);if(1==i)for(var r=0;r<e;r++)n[r]=t.readFloat();else for(r=0;r<e;r++)n[r]=t.readFloat()*i;return n},G.prototype.readShortArray=function(t){for(var e=t.readInt(!0),i=new Array(e),n=0;n<e;n++)i[n]=t.readShort();return i},G.prototype.readAnimation=function(t,e,i){for(var n=new Array,r=this.scale,s=0,o=new W.Color,a=new W.Color,h=0,l=t.readInt(!0);h<l;h++)for(var u=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++){var d=t.readByte(),p=t.readInt(!0);switch(d){case G.SLOT_ATTACHMENT:(M=new W.AttachmentTimeline(p)).slotIndex=u;for(var g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readStringRef());n.push(M),s=Math.max(s,M.frames[p-1]);break;case G.SLOT_COLOR:for((M=new W.ColorTimeline(p)).slotIndex=u,g=0;g<p;g++){var v=t.readFloat();W.Color.rgba8888ToColor(o,t.readInt32()),M.setFrame(g,v,o.r,o.g,o.b,o.a),g<p-1&&this.readCurve(t,g,M)}n.push(M),s=Math.max(s,M.frames[(p-1)*W.ColorTimeline.ENTRIES]);break;case G.SLOT_TWO_COLOR:for((M=new W.TwoColorTimeline(p)).slotIndex=u,g=0;g<p;g++)v=t.readFloat(),W.Color.rgba8888ToColor(o,t.readInt32()),W.Color.rgb888ToColor(a,t.readInt32()),M.setFrame(g,v,o.r,o.g,o.b,o.a,a.r,a.g,a.b),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.TwoColorTimeline.ENTRIES])}}for(h=0,l=t.readInt(!0);h<l;h++)for(var m=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case G.BONE_ROTATE:for((M=new W.RotateTimeline(p)).boneIndex=m,g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readFloat()),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.RotateTimeline.ENTRIES]);break;case G.BONE_TRANSLATE:case G.BONE_SCALE:case G.BONE_SHEAR:var M=void 0,x=1;for(d==G.BONE_SCALE?M=new W.ScaleTimeline(p):d==G.BONE_SHEAR?M=new W.ShearTimeline(p):(M=new W.TranslateTimeline(p),x=r),M.boneIndex=m,g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readFloat()*x,t.readFloat()*x),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.TranslateTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){var y=t.readInt(!0),p=t.readInt(!0);for((M=new W.IkConstraintTimeline(p)).ikConstraintIndex=y,g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readFloat(),t.readFloat()*r,t.readByte(),t.readBoolean(),t.readBoolean()),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.IkConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){for(y=t.readInt(!0),p=t.readInt(!0),(M=new W.TransformConstraintTimeline(p)).transformConstraintIndex=y,g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat()),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.TransformConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var y=t.readInt(!0),w=i.pathConstraints[y],c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case G.PATH_POSITION:case G.PATH_SPACING:var M=void 0,x=1;for(d==G.PATH_SPACING?(M=new W.PathConstraintSpacingTimeline(p),w.spacingMode!=W.SpacingMode.Length&&w.spacingMode!=W.SpacingMode.Fixed||(x=r)):(M=new W.PathConstraintPositionTimeline(p),w.positionMode==W.PositionMode.Fixed&&(x=r)),M.pathConstraintIndex=y,g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readFloat()*x),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.PathConstraintPositionTimeline.ENTRIES]);break;case G.PATH_MIX:for((M=new W.PathConstraintMixTimeline(p)).pathConstraintIndex=y,g=0;g<p;g++)M.setFrame(g,t.readFloat(),t.readFloat(),t.readFloat()),g<p-1&&this.readCurve(t,g,M);n.push(M),s=Math.max(s,M.frames[(p-1)*W.PathConstraintMixTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var T=i.skins[t.readInt(!0)],c=0,f=t.readInt(!0);c<f;c++)for(var u=t.readInt(!0),E=0,b=t.readInt(!0);E<b;E++){var A=T.getAttachment(u,t.readStringRef()),R=null!=A.bones,S=A.vertices,C=R?S.length/3*2:S.length,p=t.readInt(!0);for((M=new W.DeformTimeline(p)).slotIndex=u,M.attachment=A,g=0;g<p;g++){var v=t.readFloat(),I=void 0,P=t.readInt(!0);if(0==P)I=R?W.Utils.newFloatArray(C):S;else{I=W.Utils.newFloatArray(C);var _=t.readInt(!0);if(P+=_,1==r)for(var L=_;L<P;L++)I[L]=t.readFloat();else for(L=_;L<P;L++)I[L]=t.readFloat()*r;if(!R)for(var L=0,k=I.length;L<k;L++)I[L]+=S[L]}M.setFrame(g,v,I),g<p-1&&this.readCurve(t,g,M)}n.push(M),s=Math.max(s,M.frames[p-1])}var O=t.readInt(!0);if(0<O){for(var M=new W.DrawOrderTimeline(O),F=i.slots.length,h=0;h<O;h++){for(var v=t.readFloat(),V=t.readInt(!0),D=W.Utils.newArray(F,0),c=F-1;0<=c;c--)D[c]=-1;for(var N=W.Utils.newArray(F-V,0),Y=0,X=0,c=0;c<V;c++){for(u=t.readInt(!0);Y!=u;)N[X++]=Y++;D[Y+t.readInt(!0)]=Y++}for(;Y<F;)N[X++]=Y++;for(c=F-1;0<=c;c--)-1==D[c]&&(D[c]=N[--X]);M.setFrame(h,v,D)}n.push(M),s=Math.max(s,M.frames[O-1])}var B=t.readInt(!0);if(0<B){for(M=new W.EventTimeline(B),h=0;h<B;h++){var v=t.readFloat(),U=i.events[t.readInt(!0)],z=new W.Event(v,U);z.intValue=t.readInt(!1),z.floatValue=t.readFloat(),z.stringValue=t.readBoolean()?t.readString():U.stringValue,null!=z.data.audioPath&&(z.volume=t.readFloat(),z.balance=t.readFloat()),M.setFrame(h,z)}n.push(M),s=Math.max(s,M.frames[B-1])}return new W.Animation(e,n,s)},G.prototype.readCurve=function(t,e,i){switch(t.readByte()){case G.CURVE_STEPPED:i.setStepped(e);break;case G.CURVE_BEZIER:this.setCurve(i,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},G.prototype.setCurve=function(t,e,i,n,r,s){t.setCurve(e,i,n,r,s)},G.AttachmentTypeValues=[0,1,2,3,4,5,6],G.TransformModeValues=[W.TransformMode.Normal,W.TransformMode.OnlyTranslation,W.TransformMode.NoRotationOrReflection,W.TransformMode.NoScale,W.TransformMode.NoScaleOrReflection],G.PositionModeValues=[W.PositionMode.Fixed,W.PositionMode.Percent],G.SpacingModeValues=[W.SpacingMode.Length,W.SpacingMode.Fixed,W.SpacingMode.Percent],G.RotateModeValues=[W.RotateMode.Tangent,W.RotateMode.Chain,W.RotateMode.ChainScale],G.BlendModeValues=[W.BlendMode.Normal,W.BlendMode.Additive,W.BlendMode.Multiply,W.BlendMode.Screen],G.BONE_ROTATE=0,G.BONE_TRANSLATE=1,G.BONE_SCALE=2,G.BONE_SHEAR=3,G.SLOT_ATTACHMENT=0,G.SLOT_COLOR=1,G.SLOT_TWO_COLOR=2,G.PATH_POSITION=0,G.PATH_SPACING=1,G.PATH_MIX=2,G.CURVE_LINEAR=0,G.CURVE_STEPPED=1,G.CURVE_BEZIER=2,G);function G(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}W.SkeletonBinary=t;var x=(e.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},e.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},e.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},e.prototype.readInt=function(t){var e=this.readByte(),i=127&e;return 0!=(128&e)&&(i|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(i|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(i|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(i|=(127&this.readByte())<<28)))),t?i:i>>>1^-(1&i)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",i=0;i<t;){var n=this.readByte();switch(n>>4){case 12:case 13:e+=String.fromCharCode((31&n)<<6|63&this.readByte()),i+=2;break;case 14:e+=String.fromCharCode((15&n)<<12|(63&this.readByte())<<6|63&this.readByte()),i+=3;break;default:e+=String.fromCharCode(n),i++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,i,n){void 0===e&&(e=new Array),void 0===i&&(i=0),void 0===n&&(n=new DataView(t.buffer)),this.strings=e,this.index=i,this.buffer=n}var N=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(ge=ge||{}),I=ge=ge||{},Pe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var i=this.boundingBoxes,n=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;i.length=0,r.freeAll(n);for(var a=n.length=0;a<o;a++){var h,l,u,c=s[a];c.bone.active&&(h=c.getAttachment())instanceof I.BoundingBoxAttachment&&(l=h,i.push(l),(u=r.obtain()).length!=l.worldVerticesLength&&(u=I.Utils.newFloatArray(l.worldVerticesLength)),n.push(u),l.computeWorldVertices(c,0,l.worldVerticesLength,u,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},Pe.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,i=Number.NEGATIVE_INFINITY,n=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,o=r.length;s<o;s++)for(var a=r[s],h=a,l=0,u=a.length;l<u;l+=2)var c=h[l],f=h[l+1],t=Math.min(t,c),e=Math.min(e,f),i=Math.max(i,c),n=Math.max(n,f);this.minX=t,this.minY=e,this.maxX=i,this.maxY=n},Pe.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Pe.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||o<=t&&o<=i||a<=e&&a<=n)return!1;var h=(n-e)/(i-t),l=h*(r-t)+e;if(s<l&&l<a)return!0;if(s<(l=h*(o-t)+e)&&l<a)return!0;var u=(s-e)/h+t;return r<u&&u<o||r<(u=(a-e)/h+t)&&u<o},Pe.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},Pe.prototype.containsPoint=function(t,e){for(var i=this.polygons,n=0,r=i.length;n<r;n++)if(this.containsPointPolygon(i[n],t,e))return this.boundingBoxes[n];return null},Pe.prototype.containsPointPolygon=function(t,e,i){for(var n=t,r=t.length,s=r-2,o=!1,a=0;a<r;a+=2){var h,l=n[a+1],u=n[s+1];!(l<i&&i<=u||u<i&&i<=l)||(h=n[a])+(i-l)/(u-l)*(n[s]-h)<e&&(o=!o),s=a}return o},Pe.prototype.intersectsSegment=function(t,e,i,n){for(var r=this.polygons,s=0,o=r.length;s<o;s++)if(this.intersectsSegmentPolygon(r[s],t,e,i,n))return this.boundingBoxes[s];return null},Pe.prototype.intersectsSegmentPolygon=function(t,e,i,n,r){for(var s=t,o=t.length,a=e-n,h=i-r,l=e*r-i*n,u=s[o-2],c=s[o-1],f=0;f<o;f+=2){var d=s[f],p=s[f+1],g=u*p-c*d,v=u-d,m=c-p,M=a*m-h*v,x=(l*v-a*g)/M;if((u<=x&&x<=d||d<=x&&x<=u)&&(e<=x&&x<=n||n<=x&&x<=e)){var y=(l*m-h*g)/M;if((c<=y&&y<=p||p<=y&&y<=c)&&(i<=y&&y<=r||r<=y&&y<=i))return!0}u=d,c=p}return!1},Pe.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]},Pe.prototype.getWidth=function(){return this.maxX-this.minX},Pe.prototype.getHeight=function(){return this.maxY-this.minY},P=Pe,I.SkeletonBounds=P,Z=ge=ge||{},_e.prototype.clipStart=function(t,e){if(null!=this.clipAttachment)return 0;var i=(this.clipAttachment=e).worldVerticesLength,n=Z.Utils.setArraySize(this.clippingPolygon,i);e.computeWorldVertices(t,0,i,n,0,2);var r=this.clippingPolygon;_e.makeClockwise(r);for(var s=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r)),o=0,a=s.length;o<a;o++){var h=s[o];_e.makeClockwise(h),h.push(h[0]),h.push(h[1])}return s.length},_e.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},_e.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},_e.prototype.isClipping=function(){return null!=this.clipAttachment},_e.prototype.clipTriangles=function(t,e,i,n,r,s,o,a){var h=this.clipOutput,l=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,f=this.clippingPolygons.length,d=a?12:8,p=0;l.length=0;t:for(var g=u.length=0;g<n;g+=3)for(var v=i[g]<<1,m=t[v],M=t[1+v],x=r[v],y=r[1+v],w=t[v=i[g+1]<<1],T=t[1+v],E=r[v],b=r[1+v],A=t[v=i[g+2]<<1],R=t[1+v],S=r[v],C=r[1+v],I=0;I<f;I++){var P=l.length;if(!this.clip(m,M,w,T,A,R,c[I],h)){(Y=Z.Utils.setArraySize(l,P+3*d))[P]=m,Y[P+1]=M,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a,a?(Y[P+6]=x,Y[P+7]=y,Y[P+8]=o.r,Y[P+9]=o.g,Y[P+10]=o.b,Y[P+11]=o.a,Y[P+12]=w,Y[P+13]=T,Y[P+14]=s.r,Y[P+15]=s.g,Y[P+16]=s.b,Y[P+17]=s.a,Y[P+18]=E,Y[P+19]=b,Y[P+20]=o.r,Y[P+21]=o.g,Y[P+22]=o.b,Y[P+23]=o.a,Y[P+24]=A,Y[P+25]=R,Y[P+26]=s.r,Y[P+27]=s.g,Y[P+28]=s.b,Y[P+29]=s.a,Y[P+30]=S,Y[P+31]=C,Y[P+32]=o.r,Y[P+33]=o.g,Y[P+34]=o.b,Y[P+35]=o.a):(Y[P+6]=x,Y[P+7]=y,Y[P+8]=w,Y[P+9]=T,Y[P+10]=s.r,Y[P+11]=s.g,Y[P+12]=s.b,Y[P+13]=s.a,Y[P+14]=E,Y[P+15]=b,Y[P+16]=A,Y[P+17]=R,Y[P+18]=s.r,Y[P+19]=s.g,Y[P+20]=s.b,Y[P+21]=s.a,Y[P+22]=S,Y[P+23]=C),P=u.length,(j=Z.Utils.setArraySize(u,P+3))[P]=p,j[P+1]=p+1,j[P+2]=p+2,p+=3;continue t}var _=h.length;if(0!=_){for(var L=T-R,k=A-w,O=m-A,F=R-M,V=1/(L*O+k*(M-R)),D=_>>1,N=this.clipOutput,Y=Z.Utils.setArraySize(l,P+D*d),X=0;X<_;X+=2){var B=N[X],U=N[X+1];Y[P]=B,Y[P+1]=U,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a;var z=B-A,W=U-R,G=(L*z+k*W)*V,q=(F*z+O*W)*V,H=1-G-q;Y[P+6]=x*G+E*q+S*H,Y[P+7]=y*G+b*q+C*H,a&&(Y[P+8]=o.r,Y[P+9]=o.g,Y[P+10]=o.b,Y[P+11]=o.a),P+=d}P=u.length;var j=Z.Utils.setArraySize(u,P+3*(D-2));for(D--,X=1;X<D;X++)j[P]=p,j[P+1]=p+X,j[P+2]=p+X+1,P+=3;p+=1+D}}},_e.prototype.clip=function(t,e,i,n,r,s,o,a){var h=a,l=!1,u=null;2<=o.length%4?(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],g=c[d+1],v=c[d+2],m=c[d+3],M=p-v,x=g-m,y=u,w=u.length-2,T=a.length,E=0;E<w;E+=2){var b=y[E],A=y[E+1],R=y[E+2],S=y[E+3],C=0<M*(S-m)-x*(R-v);if(0<M*(A-m)-x*(b-v)){if(C){a.push(R),a.push(S);continue}var I,P,_,L=(I=S-A)*(v-p)-(P=R-b)*(m-g);1e-6<Math.abs(L)?(_=(P*(g-A)-I*(p-b))/L,a.push(p+(v-p)*_),a.push(g+(m-g)*_)):(a.push(p),a.push(g))}else C&&(L=(I=S-A)*(v-p)-(P=R-b)*(m-g),1e-6<Math.abs(L)?(_=(P*(g-A)-I*(p-b))/L,a.push(p+(v-p)*_),a.push(g+(m-g)*_)):(a.push(p),a.push(g)),a.push(R),a.push(S));l=!0}if(T==a.length)return!(h.length=0);if(a.push(a[0]),a.push(a[1]),d==f)break;var k=a;(a=u).length=0,u=k}if(h!=a)for(var d=h.length=0,O=a.length-2;d<O;d++)h[d]=a[d];else h.length=h.length-2;return l},_e.makeClockwise=function(t){for(var e,i,n,r=t,s=t.length,o=r[s-2]*r[1]-r[0]*r[s-1],a=0,h=s-3;a<h;a+=2)e=r[a],i=r[a+1],n=r[a+2],o+=e*r[a+3]-n*i;if(!(o<0))for(var a=0,l=s-2,h=s>>1;a<h;a+=2){var u=r[a],c=r[a+1],f=l-a;r[a]=r[f],r[a+1]=r[1+f],r[f]=u,r[1+f]=c}},L=_e,Z.SkeletonClipping=L,k=ge=ge||{},Le.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},Le.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},Le.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++){var r=e[i];if(r.name==t)return r}return null},Le.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,i=0,n=e.length;i<n;i++)if(e[i].name==t)return i;return-1},O=Le,k.SkeletonData=O,function(tt){var t=(O.prototype.readSkeletonData=function(t){var e=this.scale,i=new tt.SkeletonData,n="string"==typeof t?JSON.parse(t):t,r=n.skeleton;if(null!=r){if(i.hash=r.hash,i.version=r.spine,"3.8.75"==i.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height,i.fps=r.fps,i.imagesPath=r.images}if(n.bones)for(var s=0;s<n.bones.length;s++){var o=n.bones[s],a=null,h=this.getValue(o,"parent",null);if(null!=h&&null==(a=i.findBone(h)))throw new Error("Parent bone not found: "+h);(f=new tt.BoneData(i.bones.length,o.name,a)).length=this.getValue(o,"length",0)*e,f.x=this.getValue(o,"x",0)*e,f.y=this.getValue(o,"y",0)*e,f.rotation=this.getValue(o,"rotation",0),f.scaleX=this.getValue(o,"scaleX",1),f.scaleY=this.getValue(o,"scaleY",1),f.shearX=this.getValue(o,"shearX",0),f.shearY=this.getValue(o,"shearY",0),f.transformMode=O.transformModeFromString(this.getValue(o,"transform","normal")),f.skinRequired=this.getValue(o,"skin",!1),i.bones.push(f)}if(n.slots)for(s=0;s<n.slots.length;s++){var l=(b=n.slots[s]).name,u=b.bone,c=i.findBone(u);if(null==c)throw new Error("Slot bone not found: "+u);var f=new tt.SlotData(i.slots.length,l,c),d=this.getValue(b,"color",null);null!=d&&f.color.setFromString(d);var p=this.getValue(b,"dark",null);null!=p&&(f.darkColor=new tt.Color(1,1,1,1),f.darkColor.setFromString(p)),f.attachmentName=this.getValue(b,"attachment",null),f.blendMode=O.blendModeFromString(this.getValue(b,"blend","normal")),i.slots.push(f)}if(n.ik)for(s=0;s<n.ik.length;s++){var g=n.ik[s];(f=new tt.IkConstraintData(g.name)).order=this.getValue(g,"order",0),f.skinRequired=this.getValue(g,"skin",!1);for(var v=0;v<g.bones.length;v++){if(u=g.bones[v],null==(y=i.findBone(u)))throw new Error("IK bone not found: "+u);f.bones.push(y)}var m=g.target;if(f.target=i.findBone(m),null==f.target)throw new Error("IK target bone not found: "+m);f.mix=this.getValue(g,"mix",1),f.softness=this.getValue(g,"softness",0)*e,f.bendDirection=this.getValue(g,"bendPositive",!0)?1:-1,f.compress=this.getValue(g,"compress",!1),f.stretch=this.getValue(g,"stretch",!1),f.uniform=this.getValue(g,"uniform",!1),i.ikConstraints.push(f)}if(n.transform)for(s=0;s<n.transform.length;s++){for(g=n.transform[s],(f=new tt.TransformConstraintData(g.name)).order=this.getValue(g,"order",0),f.skinRequired=this.getValue(g,"skin",!1),v=0;v<g.bones.length;v++){if(u=g.bones[v],null==(y=i.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(y)}if(m=g.target,f.target=i.findBone(m),null==f.target)throw new Error("Transform constraint target bone not found: "+m);f.local=this.getValue(g,"local",!1),f.relative=this.getValue(g,"relative",!1),f.offsetRotation=this.getValue(g,"rotation",0),f.offsetX=this.getValue(g,"x",0)*e,f.offsetY=this.getValue(g,"y",0)*e,f.offsetScaleX=this.getValue(g,"scaleX",0),f.offsetScaleY=this.getValue(g,"scaleY",0),f.offsetShearY=this.getValue(g,"shearY",0),f.rotateMix=this.getValue(g,"rotateMix",1),f.translateMix=this.getValue(g,"translateMix",1),f.scaleMix=this.getValue(g,"scaleMix",1),f.shearMix=this.getValue(g,"shearMix",1),i.transformConstraints.push(f)}if(n.path)for(s=0;s<n.path.length;s++){for(g=n.path[s],(f=new tt.PathConstraintData(g.name)).order=this.getValue(g,"order",0),f.skinRequired=this.getValue(g,"skin",!1),v=0;v<g.bones.length;v++){if(u=g.bones[v],null==(y=i.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(y)}if(m=g.target,f.target=i.findSlot(m),null==f.target)throw new Error("Path target slot not found: "+m);f.positionMode=O.positionModeFromString(this.getValue(g,"positionMode","percent")),f.spacingMode=O.spacingModeFromString(this.getValue(g,"spacingMode","length")),f.rotateMode=O.rotateModeFromString(this.getValue(g,"rotateMode","tangent")),f.offsetRotation=this.getValue(g,"rotation",0),f.position=this.getValue(g,"position",0),f.positionMode==tt.PositionMode.Fixed&&(f.position*=e),f.spacing=this.getValue(g,"spacing",0),f.spacingMode!=tt.SpacingMode.Length&&f.spacingMode!=tt.SpacingMode.Fixed||(f.spacing*=e),f.rotateMix=this.getValue(g,"rotateMix",1),f.translateMix=this.getValue(g,"translateMix",1),i.pathConstraints.push(f)}if(n.skins)for(s=0;s<n.skins.length;s++){var M=n.skins[s],x=new tt.Skin(M.name);if(M.bones)for(var y,w=0;w<M.bones.length;w++){if(null==(y=i.findBone(M.bones[w])))throw new Error("Skin bone not found: "+M.bones[s]);x.bones.push(y)}if(M.ik)for(w=0;w<M.ik.length;w++){if(null==(T=i.findIkConstraint(M.ik[w])))throw new Error("Skin IK constraint not found: "+M.ik[s]);x.constraints.push(T)}if(M.transform)for(w=0;w<M.transform.length;w++){if(null==(T=i.findTransformConstraint(M.transform[w])))throw new Error("Skin transform constraint not found: "+M.transform[s]);x.constraints.push(T)}if(M.path)for(var T,w=0;w<M.path.length;w++){if(null==(T=i.findPathConstraint(M.path[w])))throw new Error("Skin path constraint not found: "+M.path[s]);x.constraints.push(T)}for(var l in M.attachments){var E=i.findSlot(l);if(null==E)throw new Error("Slot not found: "+l);var b=M.attachments[l];for(var A in b){var R=this.readAttachment(b[A],x,E.index,A,i);null!=R&&x.setAttachment(E.index,A,R)}}i.skins.push(x),"default"==x.name&&(i.defaultSkin=x)}for(var s=0,S=this.linkedMeshes.length;s<S;s++){var C=this.linkedMeshes[s];if(null==(x=null==C.skin?i.defaultSkin:i.findSkin(C.skin)))throw new Error("Skin not found: "+C.skin);var I=x.getAttachment(C.slotIndex,C.parent);if(null==I)throw new Error("Parent mesh not found: "+C.parent);C.mesh.deformAttachment=C.inheritDeform?I:C.mesh,C.mesh.setParentMesh(I),C.mesh.updateUVs()}if(this.linkedMeshes.length=0,n.events)for(var P in n.events){var _=n.events[P];(f=new tt.EventData(P)).intValue=this.getValue(_,"int",0),f.floatValue=this.getValue(_,"float",0),f.stringValue=this.getValue(_,"string",""),f.audioPath=this.getValue(_,"audio",null),null!=f.audioPath&&(f.volume=this.getValue(_,"volume",1),f.balance=this.getValue(_,"balance",0)),i.events.push(f)}if(n.animations)for(var L in n.animations){var k=n.animations[L];this.readAnimation(k,L,i)}return i},O.prototype.readAttachment=function(t,e,i,n,r){var s=this.scale;switch(n=this.getValue(t,"name",n),this.getValue(t,"type","region")){case"region":var o=this.getValue(t,"path",n),a=this.attachmentLoader.newRegionAttachment(e,n,o);return null==a?null:(a.path=o,a.x=this.getValue(t,"x",0)*s,a.y=this.getValue(t,"y",0)*s,a.scaleX=this.getValue(t,"scaleX",1),a.scaleY=this.getValue(t,"scaleY",1),a.rotation=this.getValue(t,"rotation",0),a.width=t.width*s,a.height=t.height*s,null!=(x=this.getValue(t,"color",null))&&a.color.setFromString(x),a.updateOffset(),a);case"boundingbox":var h=this.attachmentLoader.newBoundingBoxAttachment(e,n);return null==h?null:(this.readVertices(t,h,t.vertexCount<<1),null!=(x=this.getValue(t,"color",null))&&h.color.setFromString(x),h);case"mesh":case"linkedmesh":var o=this.getValue(t,"path",n),l=this.attachmentLoader.newMeshAttachment(e,n,o);if(null==l)return null;l.path=o,null!=(x=this.getValue(t,"color",null))&&l.color.setFromString(x),l.width=this.getValue(t,"width",0)*s,l.height=this.getValue(t,"height",0)*s;var u=this.getValue(t,"parent",null);if(null!=u)return this.linkedMeshes.push(new y(l,this.getValue(t,"skin",null),i,u,this.getValue(t,"deform",!0))),l;var c=t.uvs;return this.readVertices(t,l,c.length),l.triangles=t.triangles,l.regionUVs=c,l.updateUVs(),l.edges=this.getValue(t,"edges",null),l.hullLength=2*this.getValue(t,"hull",0),l;case"path":if(null==(o=this.attachmentLoader.newPathAttachment(e,n)))return null;o.closed=this.getValue(t,"closed",!1),o.constantSpeed=this.getValue(t,"constantSpeed",!0);var f=t.vertexCount;this.readVertices(t,o,f<<1);for(var d=tt.Utils.newArray(f/3,0),p=0;p<t.lengths.length;p++)d[p]=t.lengths[p]*s;return o.lengths=d,null!=(x=this.getValue(t,"color",null))&&o.color.setFromString(x),o;case"point":var g=this.attachmentLoader.newPointAttachment(e,n);return null==g?null:(g.x=this.getValue(t,"x",0)*s,g.y=this.getValue(t,"y",0)*s,g.rotation=this.getValue(t,"rotation",0),null!=(x=this.getValue(t,"color",null))&&g.color.setFromString(x),g);case"clipping":var v=this.attachmentLoader.newClippingAttachment(e,n);if(null==v)return null;var m=this.getValue(t,"end",null);if(null!=m){var M=r.findSlot(m);if(null==M)throw new Error("Clipping end slot not found: "+m);v.endSlot=M}var x,f=t.vertexCount;return this.readVertices(t,v,f<<1),null!=(x=this.getValue(t,"color",null))&&v.color.setFromString(x),v}return null},O.prototype.readVertices=function(t,e,i){var n=this.scale;e.worldVerticesLength=i;var r=t.vertices;if(i!=r.length){for(var s=new Array,o=new Array,a=0,h=r.length;a<h;){var l=r[a++];o.push(l);for(var u=a+4*l;a<u;a+=4)o.push(r[a]),s.push(r[a+1]*n),s.push(r[a+2]*n),s.push(r[a+3])}e.bones=o,e.vertices=tt.Utils.toFloatArray(s)}else{var c=tt.Utils.toFloatArray(r);if(1!=n)for(var a=0,h=r.length;a<h;a++)c[a]*=n;e.vertices=c}},O.prototype.readAnimation=function(t,e,i){var n=this.scale,r=new Array,s=0;if(t.slots)for(var o in t.slots){var a=t.slots[o];if(-1==(Z=i.findSlotIndex(o)))throw new Error("Slot not found: "+o);for(var h in a){var l=a[h];if("attachment"==h){(x=new tt.AttachmentTimeline(l.length)).slotIndex=Z;for(var u=0,c=0;c<l.length;c++){var f=l[c];x.setFrame(u++,this.getValue(f,"time",0),f.name)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}else if("color"==h){for((x=new tt.ColorTimeline(l.length)).slotIndex=Z,c=u=0;c<l.length;c++){var f=l[c],d=new tt.Color;d.setFromString(f.color),x.setFrame(u,this.getValue(f,"time",0),d.r,d.g,d.b,d.a),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.ColorTimeline.ENTRIES])}else{if("twoColor"!=h)throw new Error("Invalid timeline type for a slot: "+h+" ("+o+")");for((x=new tt.TwoColorTimeline(l.length)).slotIndex=Z,c=u=0;c<l.length;c++){var f=l[c],p=new tt.Color,g=new tt.Color;p.setFromString(f.light),g.setFromString(f.dark),x.setFrame(u,this.getValue(f,"time",0),p.r,p.g,p.b,p.a,g.r,g.g,g.b),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TwoColorTimeline.ENTRIES])}}}if(t.bones)for(var v in t.bones){var m=t.bones[v],M=i.findBoneIndex(v);if(-1==M)throw new Error("Bone not found: "+v);for(var h in m)if(l=m[h],"rotate"===h){for((x=new tt.RotateTimeline(l.length)).boneIndex=M,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"angle",0)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.RotateTimeline.ENTRIES])}else{if("translate"!==h&&"scale"!==h&&"shear"!==h)throw new Error("Invalid timeline type for a bone: "+h+" ("+v+")");var x=null,y=1,w=0;for("scale"===h?(x=new tt.ScaleTimeline(l.length),w=1):"shear"===h?x=new tt.ShearTimeline(l.length):(x=new tt.TranslateTimeline(l.length),y=n),x.boneIndex=M,c=u=0;c<l.length;c++){var f=l[c],T=this.getValue(f,"x",w),E=this.getValue(f,"y",w);x.setFrame(u,this.getValue(f,"time",0),T*y,E*y),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TranslateTimeline.ENTRIES])}}if(t.ik)for(var b in t.ik){var A=t.ik[b],R=i.findIkConstraint(b);for((x=new tt.IkConstraintTimeline(A.length)).ikConstraintIndex=i.ikConstraints.indexOf(R),c=u=0;c<A.length;c++)f=A[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"mix",1),this.getValue(f,"softness",0)*n,this.getValue(f,"bendPositive",!0)?1:-1,this.getValue(f,"compress",!1),this.getValue(f,"stretch",!1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.IkConstraintTimeline.ENTRIES])}if(t.transform)for(var b in t.transform){for(A=t.transform[b],R=i.findTransformConstraint(b),(x=new tt.TransformConstraintTimeline(A.length)).transformConstraintIndex=i.transformConstraints.indexOf(R),c=u=0;c<A.length;c++)f=A[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1),this.getValue(f,"scaleMix",1),this.getValue(f,"shearMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TransformConstraintTimeline.ENTRIES])}if(t.path)for(var b in t.path){var A=t.path[b],S=i.findPathConstraintIndex(b);if(-1==S)throw new Error("Path constraint not found: "+b);var C=i.pathConstraints[S];for(var h in A)if(l=A[h],"position"===h||"spacing"===h){var x=null,y=1;for("spacing"===h?(x=new tt.PathConstraintSpacingTimeline(l.length),C.spacingMode!=tt.SpacingMode.Length&&C.spacingMode!=tt.SpacingMode.Fixed||(y=n)):(x=new tt.PathConstraintPositionTimeline(l.length),C.positionMode==tt.PositionMode.Fixed&&(y=n)),x.pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,h,0)*y),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===h){for((x=new tt.PathConstraintMixTimeline(l.length)).pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintMixTimeline.ENTRIES])}}if(t.deform)for(var I in t.deform){var P=t.deform[I],_=i.findSkin(I);if(null==_)throw new Error("Skin not found: "+I);for(var o in P){if(a=P[o],-1==(Z=i.findSlotIndex(o)))throw new Error("Slot not found: "+a.name);for(var h in a){var l=a[h],L=_.getAttachment(Z,h);if(null==L)throw new Error("Deform attachment not found: "+l.name);var k=null!=L.bones,O=L.vertices,F=k?O.length/3*2:O.length;(x=new tt.DeformTimeline(l.length)).slotIndex=Z,x.attachment=L;for(var u=0,V=0;V<l.length;V++){var f=l[V],D=void 0,N=this.getValue(f,"vertices",null);if(null==N)D=k?tt.Utils.newFloatArray(F):O;else{D=tt.Utils.newFloatArray(F);var Y=this.getValue(f,"offset",0);if(tt.Utils.arrayCopy(N,0,D,Y,N.length),1!=n)for(var X=(c=Y)+N.length;c<X;c++)D[c]*=n;if(!k)for(c=0;c<F;c++)D[c]+=O[c]}x.setFrame(u,this.getValue(f,"time",0),D),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}}}var B=t.drawOrder;if(null==B&&(B=t.draworder),null!=B){for(var x=new tt.DrawOrderTimeline(B.length),U=i.slots.length,u=0,V=0;V<B.length;V++){var z=B[V],W=null,G=this.getValue(z,"offsets",null);if(null!=G){W=tt.Utils.newArray(U,-1);for(var q=tt.Utils.newArray(U-G.length,0),H=0,j=0,c=0;c<G.length;c++){var Z,K=G[c];if(-1==(Z=i.findSlotIndex(K.slot)))throw new Error("Slot not found: "+K.slot);for(;H!=Z;)q[j++]=H++;W[H+K.offset]=H++}for(;H<U;)q[j++]=H++;for(c=U-1;0<=c;c--)-1==W[c]&&(W[c]=q[--j])}x.setFrame(u++,this.getValue(z,"time",0),W)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(t.events){for(x=new tt.EventTimeline(t.events.length),c=u=0;c<t.events.length;c++){var Q=t.events[c],J=i.findEvent(Q.name);if(null==J)throw new Error("Event not found: "+Q.name);var $=new tt.Event(tt.Utils.toSinglePrecision(this.getValue(Q,"time",0)),J);$.intValue=this.getValue(Q,"int",J.intValue),$.floatValue=this.getValue(Q,"float",J.floatValue),$.stringValue=this.getValue(Q,"string",J.stringValue),null!=$.data.audioPath&&($.volume=this.getValue(Q,"volume",1),$.balance=this.getValue(Q,"balance",0)),x.setFrame(u++,$)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(isNaN(s))throw new Error("Error while parsing animation, duration is NaN");i.animations.push(new tt.Animation(e,r,s))},O.prototype.readCurve=function(t,e,i){var n;t.hasOwnProperty("curve")&&("stepped"==t.curve?e.setStepped(i):(n=t.curve,e.setCurve(i,n,this.getValue(t,"c2",0),this.getValue(t,"c3",1),this.getValue(t,"c4",1))))},O.prototype.getValue=function(t,e,i){return void 0!==t[e]?t[e]:i},O.blendModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.BlendMode.Normal;if("additive"==t)return tt.BlendMode.Additive;if("multiply"==t)return tt.BlendMode.Multiply;if("screen"==t)return tt.BlendMode.Screen;throw new Error("Unknown blend mode: "+t)},O.positionModeFromString=function(t){if("fixed"==(t=t.toLowerCase()))return tt.PositionMode.Fixed;if("percent"==t)return tt.PositionMode.Percent;throw new Error("Unknown position mode: "+t)},O.spacingModeFromString=function(t){if("length"==(t=t.toLowerCase()))return tt.SpacingMode.Length;if("fixed"==t)return tt.SpacingMode.Fixed;if("percent"==t)return tt.SpacingMode.Percent;throw new Error("Unknown position mode: "+t)},O.rotateModeFromString=function(t){if("tangent"==(t=t.toLowerCase()))return tt.RotateMode.Tangent;if("chain"==t)return tt.RotateMode.Chain;if("chainscale"==t)return tt.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+t)},O.transformModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.TransformMode.Normal;if("onlytranslation"==t)return tt.TransformMode.OnlyTranslation;if("norotationorreflection"==t)return tt.TransformMode.NoRotationOrReflection;if("noscale"==t)return tt.TransformMode.NoScale;if("noscaleorreflection"==t)return tt.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+t)},O);function O(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}tt.SkeletonJson=t;var y=function(t,e,i,n,r){this.mesh=t,this.skin=e,this.slotIndex=i,this.parent=n,this.inheritDeform=r}}(ge=ge||{}),function(h){var s=function(t,e,i){this.slotIndex=t,this.name=e,this.attachment=i};h.SkinEntry=s;var t=(e.prototype.setAttachment=function(t,e,i){if(null==i)throw new Error("attachment cannot be null.");var n=this.attachments;t>=n.length&&(n.length=t+1),n[t]||(n[t]={}),n[t][e]=i},e.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var i=t.bones[e],n=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==i){n=!0;break}n||this.bones.push(i)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],n=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){n=!0;break}n||this.constraints.push(s)}for(var o=t.getAttachments(),e=0;e<o.length;e++){var a=o[e];this.setAttachment(a.slotIndex,a.name,a.attachment)}},e.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var i=t.bones[e],n=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==i){n=!0;break}n||this.bones.push(i)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],n=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){n=!0;break}n||this.constraints.push(s)}for(var o=t.getAttachments(),e=0;e<o.length;e++){var a=o[e];null!=a.attachment&&(a.attachment instanceof h.MeshAttachment?a.attachment=a.attachment.newLinkedMesh():a.attachment=a.attachment.copy(),this.setAttachment(a.slotIndex,a.name,a.attachment))}},e.prototype.getAttachment=function(t,e){var i=this.attachments[t];return i?i[e]:null},e.prototype.removeAttachment=function(t,e){var i=this.attachments[t];i&&(i[e]=null)},e.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var i=this.attachments[e];if(i)for(var n in i){var r=i[n];r&&t.push(new s(e,n,r))}}return t},e.prototype.getAttachmentsForSlot=function(t,e){var i=this.attachments[t];if(i)for(var n in i){var r=i[n];r&&e.push(new s(t,n,r))}},e.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},e.prototype.attachAll=function(t,e){for(var i=0,n=0;n<t.slots.length;n++){var r=t.slots[n],s=r.getAttachment();if(s&&i<e.attachments.length){var o=e.attachments[i];for(var a in o)if(s==o[a]){var h=this.getAttachment(i,a);null!=h&&r.setAttachment(h);break}}i++}},e);function e(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}h.Skin=t}(ge=ge||{}),F=ge=ge||{},ke.prototype.getSkeleton=function(){return this.bone.skeleton},ke.prototype.getAttachment=function(){return this.attachment},ke.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)},ke.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},ke.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},ke.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),null!=this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),null==this.data.attachmentName?this.attachment=null:(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName)))},V=ke,F.Slot=V,(D=ge=ge||{}).SlotData=Oe,function(t){var e,i,n,r,s=(o.prototype.getImage=function(){return this._image},o.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)}},o.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return n.MirroredRepeat;case"clamptoedge":return n.ClampToEdge;case"repeat":return n.Repeat;default:throw new Error("Unknown texture wrap "+t)}},o);function o(t){this._image=t}t.Texture=s,(i=e=t.TextureFilter||(t.TextureFilter={}))[i.Nearest=9728]="Nearest",i[i.Linear=9729]="Linear",i[i.MipMap=9987]="MipMap",i[i.MipMapNearestNearest=9984]="MipMapNearestNearest",i[i.MipMapLinearNearest=9985]="MipMapLinearNearest",i[i.MipMapNearestLinear=9986]="MipMapNearestLinear",i[i.MipMapLinearLinear=9987]="MipMapLinearLinear",(r=n=t.TextureWrap||(t.TextureWrap={}))[r.MirroredRepeat=33648]="MirroredRepeat",r[r.ClampToEdge=33071]="ClampToEdge",r[r.Repeat=10497]="Repeat";function a(){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=a;var h,l=(me(u,h=s),u.prototype.setFilters=function(t,e){},u.prototype.setWraps=function(t,e){},u.prototype.dispose=function(){},u);function u(){return null!==h&&h.apply(this,arguments)||this}t.FakeTexture=l}(ge=ge||{}),function(d){var t=(e.prototype.load=function(t,e){if(null==e)throw new Error("textureLoader cannot be null.");for(var i=new p(t),n=new Array(4),r=null;;){var s,o,a,h,l,u,c,f=i.readLine();if(null==f)break;0==(f=f.trim()).length?r=null:r?((s=new v).name=f,s.page=r,"true"==(o=i.readValue()).toLocaleLowerCase()?s.degrees=90:"false"==o.toLocaleLowerCase()?s.degrees=0:s.degrees=parseFloat(o),s.rotate=90==s.degrees,i.readTuple(n),a=parseInt(n[0]),h=parseInt(n[1]),i.readTuple(n),l=parseInt(n[0]),u=parseInt(n[1]),s.u=a/r.width,s.v=h/r.height,s.rotate?(s.u2=(a+u)/r.width,s.v2=(h+l)/r.height):(s.u2=(a+l)/r.width,s.v2=(h+u)/r.height),s.x=a,s.y=h,s.width=Math.abs(l),s.height=Math.abs(u),4==i.readTuple(n)&&4==i.readTuple(n)&&i.readTuple(n),s.originalWidth=parseInt(n[0]),s.originalHeight=parseInt(n[1]),i.readTuple(n),s.offsetX=parseInt(n[0]),s.offsetY=parseInt(n[1]),s.index=parseInt(i.readValue()),s.texture=r.texture,this.regions.push(s)):((r=new g).name=f,2==i.readTuple(n)&&(r.width=parseInt(n[0]),r.height=parseInt(n[1]),i.readTuple(n)),i.readTuple(n),r.minFilter=d.Texture.filterFromString(n[0]),r.magFilter=d.Texture.filterFromString(n[1]),c=i.readValue(),r.uWrap=d.TextureWrap.ClampToEdge,r.vWrap=d.TextureWrap.ClampToEdge,"x"==c?r.uWrap=d.TextureWrap.Repeat:"y"==c?r.vWrap=d.TextureWrap.Repeat:"xy"==c&&(r.uWrap=r.vWrap=d.TextureWrap.Repeat),r.texture=e(f),r.texture.setFilters(r.minFilter,r.magFilter),r.texture.setWraps(r.uWrap,r.vWrap),r.width=r.texture.getImage().width,r.height=r.texture.getImage().height,this.pages.push(r))}},e.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},e.prototype.dispose=function(){for(var t=0;t<this.pages.length;t++)this.pages[t].texture.dispose()},e);function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}d.TextureAtlas=t;var p=(i.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},i.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()},i.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},i);function i(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var g=function(){};d.TextureAtlasPage=g;var n,v=(n=d.TextureRegion,me(r,n),r);function r(){return null!==n&&n.apply(this,arguments)||this}d.TextureAtlasRegion=v}(ge=ge||{}),N=ge=ge||{},Fe.prototype.isActive=function(){return this.active},Fe.prototype.apply=function(){this.update()},Fe.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Fe.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0<s*h-o*a?N.MathUtils.degRad:-N.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var g,v,m,M,x,y,w,T,E,b,A,R=f[d],S=!1;0!=t&&(g=R.a,w=R.b,v=R.c,T=R.d,(b=Math.atan2(a,s)-Math.atan2(v,g)+u)>N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b*=t,m=Math.cos(b),M=Math.sin(b),R.a=m*g-M*v,R.b=m*w-M*T,R.c=M*g+m*v,R.d=M*w+m*T,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0<i&&(A=Math.sqrt(R.a*R.a+R.c*R.c),y=Math.sqrt(s*s+a*a),1e-5<A&&(A=(A+(y-A+this.data.offsetScaleX)*i)/A),R.a*=A,R.c*=A,A=Math.sqrt(R.b*R.b+R.d*R.d),y=Math.sqrt(o*o+h*h),1e-5<A&&(A=(A+(y-A+this.data.offsetScaleY)*i)/A),R.b*=A,R.d*=A,S=!0),0<n&&(w=R.b,T=R.d,E=Math.atan2(T,w),(b=Math.atan2(h,o)-Math.atan2(a,s)-(E-Math.atan2(R.c,R.a)))>N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b=E+(b+c)*n,A=Math.sqrt(w*w+T*T),R.b=Math.cos(b)*A,R.d=Math.sin(b)*A,S=!0),S&&(R.appliedValid=!1)}},Fe.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,i=this.scaleMix,n=this.shearMix,r=this.target,s=r.a,o=r.b,a=r.c,h=r.d,l=0<s*h-o*a?N.MathUtils.degRad:-N.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var g,v,m,M,x,y,w,T,E,b=f[d],A=!1;0!=t&&(g=b.a,w=b.b,v=b.c,T=b.d,(y=Math.atan2(a,s)+u)>N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),y*=t,m=Math.cos(y),M=Math.sin(y),b.a=m*g-M*v,b.b=m*w-M*T,b.c=M*g+m*v,b.d=M*w+m*T,A=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),b.worldX+=x.x*e,b.worldY+=x.y*e,A=!0),0<i&&(E=(Math.sqrt(s*s+a*a)-1+this.data.offsetScaleX)*i+1,b.a*=E,b.c*=E,E=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleY)*i+1,b.b*=E,b.d*=E,A=!0),0<n&&((y=Math.atan2(h,o)-Math.atan2(a,s))>N.MathUtils.PI?y-=N.MathUtils.PI2:y<-N.MathUtils.PI&&(y+=N.MathUtils.PI2),w=b.b,T=b.d,y=Math.atan2(T,w)+(y-N.MathUtils.PI/2+c)*n,E=Math.sqrt(w*w+T*T),b.b=Math.cos(y)*E,b.d=Math.sin(y)*E,A=!0),A&&(b.appliedValid=!1)}},Fe.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;o<a;o++){var h=s[o];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(p=r.arotation-l+this.data.offsetRotation,l+=(p-=360*(16384-(16384.499999999996-p/360|0)))*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax-u+this.data.offsetX)*e,c+=(r.ay-c+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=i&&(1e-5<f&&(f=(f+(r.ascaleX-f+this.data.offsetScaleX)*i)/f),1e-5<d&&(d=(d+(r.ascaleY-d+this.data.offsetScaleY)*i)/d));var p,g=h.ashearY;0!=n&&(p=r.ashearY-g+this.data.offsetShearY,p-=360*(16384-(16384.499999999996-p/360|0)),h.shearY+=p*n),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,g)}},Fe.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;o<a;o++){var h=s[o];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(l+=(r.arotation+this.data.offsetRotation)*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax+this.data.offsetX)*e,c+=(r.ay+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=i&&(1e-5<f&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*i+1),1e-5<d&&(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)}},Y=Fe,N.TransformConstraint=Y,X=ge=ge||{},B=X.ConstraintData,me(Ve,B),U=Ve,X.TransformConstraintData=U,z=ge=ge||{},De.prototype.triangulate=function(t){for(var e=t,i=t.length>>1,n=this.indicesArray,r=n.length=0;r<i;r++)n[r]=r;for(var s=this.isConcaveArray,r=s.length=0,o=i;r<o;++r)s[r]=De.isConcave(r,i,e,n);var a=this.triangles;for(a.length=0;3<i;){for(var h=i-1,r=0,l=1;;){t:if(!s[r]){for(var u=n[h]<<1,c=n[r]<<1,f=n[l]<<1,d=e[u],p=e[1+u],g=e[c],v=e[1+c],m=e[f],M=e[1+f],x=(l+1)%i;x!=h;x=(x+1)%i)if(s[x]){var y=n[x]<<1,w=e[y],T=e[1+y];if(De.positiveArea(m,M,d,p,w,T)&&De.positiveArea(d,p,g,v,w,T)&&De.positiveArea(g,v,m,M,w,T))break t}break}if(0==l){do{if(!s[r])break;r--}while(0<r);break}h=r,l=((r=l)+1)%i}a.push(n[(i+r-1)%i]),a.push(n[r]),a.push(n[(r+1)%i]),n.splice(r,1),s.splice(r,1);var E=(--i+r-1)%i,b=r==i?0:r;s[E]=De.isConcave(E,i,e,n),s[b]=De.isConcave(b,i,e,n)}return 3==i&&(a.push(n[2]),a.push(n[0]),a.push(n[1])),a},De.prototype.decompose=function(t,e){var i=t,n=this.convexPolygons;this.polygonPool.freeAll(n),n.length=0;var r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;for(var o=this.polygonPool.obtain(),a=-1,h=o.length=0,l=0,u=e.length;l<u;l+=3){var c=e[l]<<1,f=e[l+1]<<1,d=e[l+2]<<1,p=i[c],g=i[1+c],v=i[f],m=i[1+f],M=i[d],x=i[1+d],y=!1;a==c&&(w=o.length-4,S=De.winding(o[w],o[w+1],o[w+2],o[w+3],M,x),C=De.winding(M,x,o[0],o[1],o[2],o[3]),S==h&&C==h&&(o.push(M),o.push(x),s.push(d),y=!0)),y||(0<o.length?(n.push(o),r.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(p),o.push(g),o.push(v),o.push(m),o.push(M),o.push(x),(s=this.polygonIndicesPool.obtain()).length=0,s.push(c),s.push(f),s.push(d),h=De.winding(p,g,v,m,M,x),a=c)}for(0<o.length&&(n.push(o),r.push(s)),l=0,u=n.length;l<u;l++)if(0!=(s=r[l]).length)for(var w,T,E,b,A,R,S,C,I=s[0],P=s[s.length-1],_=(o=n[l])[w=o.length-4],L=o[w+1],k=o[w+2],O=o[w+3],F=o[0],V=o[1],D=o[2],N=o[3],Y=De.winding(_,L,k,O,F,V),X=0;X<u;X++)X!=l&&3==(T=r[X]).length&&(E=T[0],b=T[1],A=T[2],M=(R=n[X])[R.length-2],x=R[R.length-1],E==I&&b==P&&(S=De.winding(_,L,k,O,M,x),C=De.winding(M,x,F,V,D,N),S==Y&&C==Y&&(R.length=0,T.length=0,o.push(M),o.push(x),s.push(A),_=k,L=O,k=M,O=x,X=0)));for(l=n.length-1;0<=l;l--)0==(o=n[l]).length&&(n.splice(l,1),this.polygonPool.free(o),s=r[l],r.splice(l,1),this.polygonIndicesPool.free(s));return n},De.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[1+r],i[s],i[1+s],i[o],i[1+o])},De.positiveArea=function(t,e,i,n,r,s){return 0<=t*(s-n)+i*(e-s)+r*(n-e)},De.winding=function(t,e,i,n,r,s){var o=i-t,a=n-e;return 0<=r*a-s*o+o*e-t*a?1:-1},W=De,z.Triangulator=W,function(t){var e=(i.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},i.prototype.contains=function(t){return null!=this.array[0|t]},i.prototype.remove=function(t){this.array[0|t]=void 0},i.prototype.clear=function(){this.array.length=0},i);function i(){this.array=new Array}t.IntSet=e;var n=(r.prototype.set=function(t,e,i,n){return this.r=t,this.g=e,this.b=i,this.a=n,this.clamp(),this},r.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},r.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},r.prototype.add=function(t,e,i,n){return this.r+=t,this.g+=e,this.b+=i,this.a+=n,this.clamp(),this},r.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},r.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,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}t.Color=n;var s=(o.clamp=function(t,e,i){return t<e?e:i<t?i:t},o.cosDeg=function(t){return Math.cos(t*o.degRad)},o.sinDeg=function(t){return Math.sin(t*o.degRad)},o.signum=function(t){return 0<t?1:t<0?-1:0},o.toInt=function(t){return 0<t?Math.floor(t):Math.ceil(t)},o.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},o.randomTriangular=function(t,e){return o.randomTriangularWith(t,e,.5*(t+e))},o.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))},o.PI2=2*(o.PI=3.1415927),o.radDeg=o.radiansToDegrees=180/o.PI,o.degRad=o.degreesToRadians=o.PI/180,o);function o(){}t.MathUtils=s;var a=(h.prototype.apply=function(t,e,i){return t+(e-t)*this.applyInternal(i)},h);function h(){}t.Interpolation=a;var l,u=(me(c,l=a),c.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},c);function c(t){var e=l.call(this)||this;return e.power=2,e.power=t,e}t.Pow=u;var f,d=(me(p,f=u),p.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},p);function p(t){return f.call(this,t)||this}t.PowOut=d;var g=(v.arrayCopy=function(t,e,i,n,r){for(var s=e,o=n;s<e+r;s++,o++)i[o]=t[s]},v.setArraySize=function(t,e,i){void 0===i&&(i=0);var n=t.length;if(n==e)return t;if(n<(t.length=e))for(var r=n;r<e;r++)t[r]=i;return t},v.ensureArrayCapacity=function(t,e,i){return void 0===i&&(i=0),t.length>=e?t:v.setArraySize(t,e,i)},v.newArray=function(t,e){for(var i=new Array(t),n=0;n<t;n++)i[n]=e;return i},v.newFloatArray=function(t){if(v.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);for(var e=new Array(t),i=0;i<e.length;i++)e[i]=0;return e},v.newShortArray=function(t){if(v.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);for(var e=new Array(t),i=0;i<e.length;i++)e[i]=0;return e},v.toFloatArray=function(t){return v.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t},v.toSinglePrecision=function(t){return v.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t},v.webkit602BugfixHelper=function(t,e){},v.contains=function(t,e,i){void 0===i&&(i=!0);for(var n=0;n<t.length;n++)if(t[n]==e)return!0;return!1},v.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,v);function v(){}t.Utils=g;var m=(M.logBones=function(t){for(var e=0;e<t.bones.length;e++){var i=t.bones[e];console.log(i.data.name+", "+i.a+", "+i.b+", "+i.c+", "+i.d+", "+i.worldX+", "+i.worldY)}},M);function M(){}t.DebugUtils=m;var x=(y.prototype.obtain=function(){return 0<this.items.length?this.items.pop():this.instantiator()},y.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},y.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},y.prototype.clear=function(){this.items.length=0},y);function y(t){this.items=new Array,this.instantiator=t}t.Pool=x;var w=(T.prototype.set=function(t,e){return this.x=t,this.y=e,this},T.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},T.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},T);function T(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}t.Vector2=w;var E=(b.prototype.update=function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1<this.frameTime&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},b);function b(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}t.TimeKeeper=E;var A=(R.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},R.prototype.addValue=function(t){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=t,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e<this.values.length;e++)t+=this.values[e];this.mean=t/this.values.length,this.dirty=!1}return this.mean}return 0},R);function R(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}t.WindowedMean=A}(ge=ge||{}),Math.fround||(Math.fround=(G=new Float32Array(1),function(t){return G[0]=t,G[0]})),function(e){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}e.Attachment=t;var i,n=(me(r,i=t),r.prototype.computeWorldVertices=function(t,e,i,n,r,s){i=r+(i>>1)*s;var o=t.bone.skeleton,a=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f<e;f+=2)u+=(v=l[u])+1,c+=v;var d=o.bones;if(0==a.length)for(T=r,E=3*c;T<i;T+=s){var p=0,g=0,v=l[u++];for(v+=u;u<v;u++,E+=3){var m=d[l[u]],M=h[E],x=h[E+1],y=h[E+2];p+=(M*m.a+x*m.b+m.worldX)*y,g+=(M*m.c+x*m.d+m.worldY)*y}n[T]=p,n[T+1]=g}else for(var w=a,T=r,E=3*c,b=c<<1;T<i;T+=s){for(g=p=0,v=l[u++],v+=u;u<v;u++,E+=3,b+=2)m=d[l[u]],M=h[E]+w[b],x=h[E+1]+w[b+1],y=h[E+2],p+=(M*m.a+x*m.b+m.worldX)*y,g+=(M*m.c+x*m.d+m.worldY)*y;n[T]=p,n[T+1]=g}}else{0<a.length&&(h=a);for(var A=(m=t.bone).worldX,R=m.worldY,S=m.a,E=m.b,C=m.c,I=m.d,P=e,T=r;T<i;P+=2,T+=s){var M=h[P],x=h[P+1];n[T]=M*S+x*E+A,n[T+1]=M*C+x*I+R}}},r.prototype.copyTo=function(t){null!=this.bones?(t.bones=new Array(this.bones.length),e.Utils.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,null!=this.vertices?(t.vertices=e.Utils.newFloatArray(this.vertices.length),e.Utils.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)):t.vertices=null,t.worldVerticesLength=this.worldVerticesLength,t.deformAttachment=this.deformAttachment},r.nextID=0,r);function r(t){var e=i.call(this,t)||this;return e.id=(65535&r.nextID++)<<11,e.worldVerticesLength=0,e.deformAttachment=e}e.VertexAttachment=n}(ge=ge||{}),q=ge=ge||{},(H=q.AttachmentType||(q.AttachmentType={}))[H.Region=0]="Region",H[H.BoundingBox=1]="BoundingBox",H[H.Mesh=2]="Mesh",H[H.LinkedMesh=3]="LinkedMesh",H[H.Path=4]="Path",H[H.Point=5]="Point",H[H.Clipping=6]="Clipping",K=ge=ge||{},Q=K.VertexAttachment,me(Ne,Q),Ne.prototype.copy=function(){var t=new Ne(name);return this.copyTo(t),t.color.setFromColor(this.color),t},J=Ne,K.BoundingBoxAttachment=J,$=ge=ge||{},tt=$.VertexAttachment,me(Ye,tt),Ye.prototype.copy=function(){var t=new Ye(name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},et=Ye,$.ClippingAttachment=et,it=ge=ge||{},nt=it.VertexAttachment,me(Xe,nt),Xe.prototype.updateUVs=function(){var t=this.regionUVs;null!=this.uvs&&this.uvs.length==t.length||(this.uvs=it.Utils.newFloatArray(t.length));var e=this.uvs,i=this.uvs.length,n=this.region.u,r=this.region.v,s=0,o=0;if(this.region instanceof it.TextureAtlasRegion){var a=this.region,h=a.texture.getImage().width,l=a.texture.getImage().height;switch(a.degrees){case 90:n-=(a.originalHeight-a.offsetY-a.height)/h,r-=(a.originalWidth-a.offsetX-a.width)/l,s=a.originalHeight/h,o=a.originalWidth/l;for(var u=0;u<i;u+=2)e[u]=n+t[u+1]*s,e[u+1]=r+(1-t[u])*o;return;case 180:for(n-=(a.originalWidth-a.offsetX-a.width)/h,r-=a.offsetY/l,s=a.originalWidth/h,o=a.originalHeight/l,u=0;u<i;u+=2)e[u]=n+(1-t[u])*s,e[u+1]=r+(1-t[u+1])*o;return;case 270:for(n-=a.offsetY/h,r-=a.offsetX/l,s=a.originalHeight/h,o=a.originalWidth/l,u=0;u<i;u+=2)e[u]=n+(1-t[u+1])*s,e[u+1]=r+t[u]*o;return}n-=a.offsetX/h,r-=(a.originalHeight-a.offsetY-a.height)/l,s=a.originalWidth/h,o=a.originalHeight/l}else null==this.region?(n=r=0,s=o=1):(s=this.region.u2-n,o=this.region.v2-r);for(u=0;u<i;u+=2)e[u]=n+t[u]*s,e[u+1]=r+t[u+1]*o},Xe.prototype.getParentMesh=function(){return this.parentMesh},Xe.prototype.setParentMesh=function(t){null!=(this.parentMesh=t)&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)},Xe.prototype.copy=function(){if(null!=this.parentMesh)return this.newLinkedMesh();var t=new Xe(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),it.Utils.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),it.Utils.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),it.Utils.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,null!=this.edges&&(t.edges=new Array(this.edges.length),it.Utils.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},Xe.prototype.newLinkedMesh=function(){var t=new Xe(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),t.deformAttachment=this.deformAttachment,t.setParentMesh(null!=this.parentMesh?this.parentMesh:this),t.updateUVs(),t},rt=Xe,it.MeshAttachment=rt,st=ge=ge||{},ot=st.VertexAttachment,me(Be,ot),Be.prototype.copy=function(){var t=new Be(name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),st.Utils.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},at=Be,st.PathAttachment=at,lt=ge=ge||{},ut=lt.VertexAttachment,me(Ue,ut),Ue.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},Ue.prototype.computeWorldRotation=function(t){var e=lt.MathUtils.cosDeg(this.rotation),i=lt.MathUtils.sinDeg(this.rotation),n=e*t.a+i*t.b,r=e*t.c+i*t.d;return Math.atan2(r,n)*lt.MathUtils.radDeg},Ue.prototype.copy=function(){var t=new Ue(name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},ct=Ue,lt.PointAttachment=ct,ft=ge=ge||{},dt=ft.Attachment,me(ze,dt),ze.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,i=-this.width/2*this.scaleX+this.region.offsetX*t,n=-this.height/2*this.scaleY+this.region.offsetY*e,r=i+this.region.width*t,s=n+this.region.height*e,o=this.rotation*Math.PI/180,a=Math.cos(o),h=Math.sin(o),l=i*a+this.x,u=i*h,c=n*a+this.y,f=n*h,d=r*a+this.x,p=r*h,g=s*a+this.y,v=s*h,m=this.offset;m[ze.OX1]=l-f,m[ze.OY1]=c+u,m[ze.OX2]=l-v,m[ze.OY2]=g+u,m[ze.OX3]=d-v,m[ze.OY3]=g+p,m[ze.OX4]=d-f,m[ze.OY4]=c+p},ze.prototype.setRegion=function(t){this.region=t;var e=this.uvs;t.rotate?(e[2]=t.u,e[3]=t.v2,e[4]=t.u,e[5]=t.v,e[6]=t.u2,e[7]=t.v,e[0]=t.u2,e[1]=t.v2):(e[0]=t.u,e[1]=t.v2,e[2]=t.u,e[3]=t.v,e[4]=t.u2,e[5]=t.v,e[6]=t.u2,e[7]=t.v2)},ze.prototype.computeWorldVertices=function(t,e,i,n){var r=this.offset,s=t.worldX,o=t.worldY,a=t.a,h=t.b,l=t.c,u=t.d,c=r[ze.OX1],f=r[ze.OY1];e[i]=c*a+f*h+s,e[i+1]=c*l+f*u+o,i+=n,c=r[ze.OX2],f=r[ze.OY2],e[i]=c*a+f*h+s,e[i+1]=c*l+f*u+o,i+=n,c=r[ze.OX3],f=r[ze.OY3],e[i]=c*a+f*h+s,e[i+1]=c*l+f*u+o,i+=n,c=r[ze.OX4],f=r[ze.OY4],e[i]=c*a+f*h+s,e[i+1]=c*l+f*u+o},ze.prototype.copy=function(){var t=new ze(this.name);return t.region=this.region,t.rendererObject=this.rendererObject,t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,ft.Utils.arrayCopy(this.uvs,0,t.uvs,0,8),ft.Utils.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t},ze.OX1=0,ze.OY1=1,ze.OX2=2,ze.OY2=3,ze.OX3=4,ze.OY3=5,ze.OX4=6,ze.OY4=7,ze.X1=0,ze.Y1=1,ze.C1R=2,ze.C1G=3,ze.C1B=4,ze.C1A=5,ze.U1=6,ze.V1=7,ze.X2=8,ze.Y2=9,ze.C2R=10,ze.C2G=11,ze.C2B=12,ze.C2A=13,ze.U2=14,ze.V2=15,ze.X3=16,ze.Y3=17,ze.C3R=18,ze.C3G=19,ze.C3B=20,ze.C3A=21,ze.U3=22,ze.V3=23,ze.X4=24,ze.Y4=25,ze.C4R=26,ze.C4G=27,ze.C4B=28,ze.C4A=29,ze.U4=30,ze.V4=31,pt=ze,ft.RegionAttachment=pt,gt=ge=ge||{},We.prototype.begin=function(t){},We.prototype.transform=function(t,e,i,n){t.x+=gt.MathUtils.randomTriangular(-this.jitterX,this.jitterY),t.y+=gt.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},We.prototype.end=function(){},vt=We,gt.JitterEffect=vt,mt=ge=ge||{},Ge.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},Ge.prototype.transform=function(t,e,i,n){var r,s,o,a=this.angle*mt.MathUtils.degreesToRadians,h=t.x-this.worldX,l=t.y-this.worldY,u=Math.sqrt(h*h+l*l);u<this.radius&&(r=Ge.interpolation.apply(0,a,(this.radius-u)/this.radius),s=Math.cos(r),o=Math.sin(r),t.x=s*h-o*l+this.worldX,t.y=o*h+s*l+this.worldY)},Ge.prototype.end=function(){},Ge.interpolation=new mt.PowOut(2),Mt=Ge,mt.SwirlEffect=Mt,xt=ge=ge||{},yt=xt.canvas||(xt.canvas={}),wt=xt.AssetManager,me(qe,wt),Tt=qe,yt.AssetManager=Tt,Et=ge=ge||{},bt=Et.canvas||(Et.canvas={}),At=Et.Texture,me(He,At),He.prototype.setFilters=function(t,e){},He.prototype.setWraps=function(t,e){},He.prototype.dispose=function(){},Rt=He,bt.CanvasTexture=Rt,St=ge=ge||{},Ct=St.canvas||(St.canvas={}),je.prototype.draw=function(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)},je.prototype.drawImages=function(t){var e=this.ctx,i=t.drawOrder;this.debugRendering&&(e.strokeStyle="green"),e.save();for(var n=0,r=i.length;n<r;n++){var s,o,a,h,l,u,c,f,d,p,g,v,m,M,x,y=i[n];y.bone.active&&(h=a=o=null,(s=y.getAttachment())instanceof St.RegionAttachment&&(h=(a=(o=s).region).texture.getImage(),l=y.bone.skeleton.color,u=y.color,c=o.color,f=l.a*u.a*c.a,(d=this.tempColor).set(l.r*u.r*c.r,l.g*u.g*c.g,l.b*u.b*c.b,f),p=s,g=y.bone,M=a.width,x=a.height,e.save(),e.transform(g.a,g.c,g.b,g.d,g.worldX,g.worldY),e.translate(s.offset[0],s.offset[1]),e.rotate(s.rotation*Math.PI/180),v=p.width/M,e.scale(v*s.scaleX,v*s.scaleY),e.translate(M/2,x/2),s.region.rotate&&(m=M,M=x,x=m,e.rotate(-Math.PI/2)),e.scale(1,-1),e.translate(-M/2,-x/2),1==d.r&&1==d.g&&1==d.b&&1==d.a||(e.globalAlpha=d.a),e.drawImage(h,a.x,a.y,M,x,0,0,M,x),this.debugRendering&&e.strokeRect(0,0,M,x),e.restore()))}e.restore()},je.prototype.drawTriangles=function(t){for(var e=null,i=this.vertices,n=null,r=t.drawOrder,s=0,o=r.length;s<o;s++){var a=r[s],h=a.getAttachment(),l=null;if(h instanceof St.RegionAttachment)var u=h,i=this.computeRegionVertices(a,u,!1),n=je.QUAD_TRIANGLES,l=u.region.texture.getImage();else{if(!(h instanceof St.MeshAttachment))continue;var c=h;i=this.computeMeshVertices(a,c,!1),n=c.triangles,l=c.region.renderObject.texture.getImage()}if(null!=l){var f=a.data.blendMode;f!=e&&(e=f);var d=a.bone.skeleton.color,p=a.color,g=h.color,v=d.a*p.a*g.a,m=this.tempColor;m.set(d.r*p.r*g.r,d.g*p.g*g.g,d.b*p.b*g.b,v);var M=this.ctx;1==m.r&&1==m.g&&1==m.b&&1==m.a||(M.globalAlpha=m.a);for(var x=0;x<n.length;x+=3){var y=8*n[x],w=8*n[x+1],T=8*n[x+2],E=i[y],b=i[1+y],A=i[6+y],R=i[7+y],S=i[w],C=i[1+w],I=i[6+w],P=i[7+w],_=i[T],L=i[1+T],k=i[6+T],O=i[7+T];this.drawTriangle(l,E,b,A,R,S,C,I,P,_,L,k,O),this.debugRendering&&(M.strokeStyle="green",M.beginPath(),M.moveTo(E,b),M.lineTo(S,C),M.lineTo(_,L),M.lineTo(E,b),M.stroke())}}}this.ctx.globalAlpha=1},je.prototype.drawTriangle=function(t,e,i,n,r,s,o,a,h,l,u,c,f){var d=this.ctx;n*=t.width,r*=t.height,a*=t.width,h*=t.height,c*=t.width,f*=t.height,d.beginPath(),d.moveTo(e,i),d.lineTo(s,o),d.lineTo(l,u),d.closePath();var p=1/((a-=n)*(f-=r)-(c-=n)*(h-=r)),g=(f*(s-=e)-h*(l-=e))*p,v=(f*(o-=i)-h*(u-=i))*p,m=(a*l-c*s)*p,M=(a*u-c*o)*p,x=e-g*n-m*r,y=i-v*n-M*r;d.save(),d.transform(g,v,m,M,x,y),d.clip(),d.drawImage(t,0,0),d.restore()},je.prototype.computeRegionVertices=function(t,e,i){var n=t.bone.skeleton.color,r=t.color,s=e.color,o=n.a*r.a*s.a,a=i?o:1,h=this.tempColor;h.set(n.r*r.r*s.r*a,n.g*r.g*s.g*a,n.b*r.b*s.b*a,o),e.computeWorldVertices(t.bone,this.vertices,0,je.VERTEX_SIZE);var l=this.vertices,u=e.uvs;return l[St.RegionAttachment.C1R]=h.r,l[St.RegionAttachment.C1G]=h.g,l[St.RegionAttachment.C1B]=h.b,l[St.RegionAttachment.C1A]=h.a,l[St.RegionAttachment.U1]=u[0],l[St.RegionAttachment.V1]=u[1],l[St.RegionAttachment.C2R]=h.r,l[St.RegionAttachment.C2G]=h.g,l[St.RegionAttachment.C2B]=h.b,l[St.RegionAttachment.C2A]=h.a,l[St.RegionAttachment.U2]=u[2],l[St.RegionAttachment.V2]=u[3],l[St.RegionAttachment.C3R]=h.r,l[St.RegionAttachment.C3G]=h.g,l[St.RegionAttachment.C3B]=h.b,l[St.RegionAttachment.C3A]=h.a,l[St.RegionAttachment.U3]=u[4],l[St.RegionAttachment.V3]=u[5],l[St.RegionAttachment.C4R]=h.r,l[St.RegionAttachment.C4G]=h.g,l[St.RegionAttachment.C4B]=h.b,l[St.RegionAttachment.C4A]=h.a,l[St.RegionAttachment.U4]=u[6],l[St.RegionAttachment.V4]=u[7],l},je.prototype.computeMeshVertices=function(t,e,i){var n=t.bone.skeleton.color,r=t.color,s=e.color,o=n.a*r.a*s.a,a=i?o:1,h=this.tempColor;h.set(n.r*r.r*s.r*a,n.g*r.g*s.g*a,n.b*r.b*s.b*a,o);var l=e.worldVerticesLength/2;this.vertices.length<e.worldVerticesLength&&(this.vertices=St.Utils.newFloatArray(e.worldVerticesLength));var u=this.vertices;e.computeWorldVertices(t,0,e.worldVerticesLength,u,0,je.VERTEX_SIZE);for(var c=e.uvs,f=0,d=l,p=0,g=2;f<d;f++)u[g++]=h.r,u[g++]=h.g,u[g++]=h.b,u[g++]=h.a,u[g++]=c[p++],u[g++]=c[p++],g+=2;return u},je.QUAD_TRIANGLES=[0,1,2,2,3,0],je.VERTEX_SIZE=8,It=je,Ct.SkeletonRenderer=It,Pt=ge=ge||{},_t=Pt.webgl||(Pt.webgl={}),Lt=Pt.AssetManager,me(Ze,Lt),kt=Ze,_t.AssetManager=kt,Ot=ge=ge||{},Ft=Ot.webgl||(Ot.webgl={}),Ke.prototype.update=function(){var t=this.projection,e=this.view,i=this.projectionView,n=this.inverseProjectionView,r=this.zoom,s=this.viewportWidth,o=this.viewportHeight;t.ortho(r*(-s/2),r*(s/2),r*(-o/2),r*(o/2),this.near,this.far),e.lookAt(this.position,this.direction,this.up),i.set(t.values),i.multiply(e),n.set(i.values).invert()},Ke.prototype.screenToWorld=function(t,e,i){var n=t.x,r=i-t.y-1,s=this.tmp;return s.x=2*n/e-1,s.y=2*r/i-1,s.z=2*t.z-1,s.project(this.inverseProjectionView),t.set(s.x,s.y,s.z),t},Ke.prototype.setViewport=function(t,e){this.viewportWidth=t,this.viewportHeight=e},Vt=Ke,Ft.OrthoCamera=Vt,Dt=ge=ge||{},Nt=Dt.webgl||(Dt.webgl={}),Yt=Dt.Texture,me(Qe,Yt),Qe.prototype.setFilters=function(t,e){var i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MAG_FILTER,Qe.validateMagFilter(e))},Qe.validateMagFilter=function(t){switch(t){case Dt.TextureFilter.MipMap:case Dt.TextureFilter.MipMapLinearLinear:case Dt.TextureFilter.MipMapLinearNearest:case Dt.TextureFilter.MipMapNearestLinear:case Dt.TextureFilter.MipMapNearestNearest:return Dt.TextureFilter.Linear;default:return t}},Qe.prototype.setWraps=function(t,e){var i=this.context.gl;this.bind(),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,t),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,e)},Qe.prototype.update=function(t){var e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),Qe.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL&&e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,this._image),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,t?e.LINEAR_MIPMAP_LINEAR:e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t&&e.generateMipmap(e.TEXTURE_2D)},Qe.prototype.restore=function(){this.texture=null,this.update(this.useMipMaps)},Qe.prototype.bind=function(t){void 0===t&&(t=0);var e=this.context.gl;this.boundUnit=t,e.activeTexture(e.TEXTURE0+t),e.bindTexture(e.TEXTURE_2D,this.texture)},Qe.prototype.unbind=function(){var t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)},Qe.prototype.dispose=function(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)},Qe.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1,Xt=Qe,Nt.GLTexture=Xt,function(d){d.M00=0,d.M01=4,d.M02=8,d.M03=12,d.M10=1,d.M11=5,d.M12=9,d.M13=13,d.M20=2,d.M21=6,d.M22=10,d.M23=14,d.M30=3,d.M31=7,d.M32=11,d.M33=15;var t=(a.prototype.set=function(t){return this.values.set(t),this},a.prototype.transpose=function(){var t=this.temp,e=this.values;return t[d.M00]=e[d.M00],t[d.M01]=e[d.M10],t[d.M02]=e[d.M20],t[d.M03]=e[d.M30],t[d.M10]=e[d.M01],t[d.M11]=e[d.M11],t[d.M12]=e[d.M21],t[d.M13]=e[d.M31],t[d.M20]=e[d.M02],t[d.M21]=e[d.M12],t[d.M22]=e[d.M22],t[d.M23]=e[d.M32],t[d.M30]=e[d.M03],t[d.M31]=e[d.M13],t[d.M32]=e[d.M23],t[d.M33]=e[d.M33],this.set(t)},a.prototype.identity=function(){var t=this.values;return t[d.M00]=1,t[d.M01]=0,t[d.M02]=0,t[d.M03]=0,t[d.M10]=0,t[d.M11]=1,t[d.M12]=0,t[d.M13]=0,t[d.M20]=0,t[d.M21]=0,t[d.M22]=1,t[d.M23]=0,t[d.M30]=0,t[d.M31]=0,t[d.M32]=0,t[d.M33]=1,this},a.prototype.invert=function(){var t=this.values,e=this.temp,i=t[d.M30]*t[d.M21]*t[d.M12]*t[d.M03]-t[d.M20]*t[d.M31]*t[d.M12]*t[d.M03]-t[d.M30]*t[d.M11]*t[d.M22]*t[d.M03]+t[d.M10]*t[d.M31]*t[d.M22]*t[d.M03]+t[d.M20]*t[d.M11]*t[d.M32]*t[d.M03]-t[d.M10]*t[d.M21]*t[d.M32]*t[d.M03]-t[d.M30]*t[d.M21]*t[d.M02]*t[d.M13]+t[d.M20]*t[d.M31]*t[d.M02]*t[d.M13]+t[d.M30]*t[d.M01]*t[d.M22]*t[d.M13]-t[d.M00]*t[d.M31]*t[d.M22]*t[d.M13]-t[d.M20]*t[d.M01]*t[d.M32]*t[d.M13]+t[d.M00]*t[d.M21]*t[d.M32]*t[d.M13]+t[d.M30]*t[d.M11]*t[d.M02]*t[d.M23]-t[d.M10]*t[d.M31]*t[d.M02]*t[d.M23]-t[d.M30]*t[d.M01]*t[d.M12]*t[d.M23]+t[d.M00]*t[d.M31]*t[d.M12]*t[d.M23]+t[d.M10]*t[d.M01]*t[d.M32]*t[d.M23]-t[d.M00]*t[d.M11]*t[d.M32]*t[d.M23]-t[d.M20]*t[d.M11]*t[d.M02]*t[d.M33]+t[d.M10]*t[d.M21]*t[d.M02]*t[d.M33]+t[d.M20]*t[d.M01]*t[d.M12]*t[d.M33]-t[d.M00]*t[d.M21]*t[d.M12]*t[d.M33]-t[d.M10]*t[d.M01]*t[d.M22]*t[d.M33]+t[d.M00]*t[d.M11]*t[d.M22]*t[d.M33];if(0==i)throw new Error("non-invertible matrix");var n=1/i;return e[d.M00]=t[d.M12]*t[d.M23]*t[d.M31]-t[d.M13]*t[d.M22]*t[d.M31]+t[d.M13]*t[d.M21]*t[d.M32]-t[d.M11]*t[d.M23]*t[d.M32]-t[d.M12]*t[d.M21]*t[d.M33]+t[d.M11]*t[d.M22]*t[d.M33],e[d.M01]=t[d.M03]*t[d.M22]*t[d.M31]-t[d.M02]*t[d.M23]*t[d.M31]-t[d.M03]*t[d.M21]*t[d.M32]+t[d.M01]*t[d.M23]*t[d.M32]+t[d.M02]*t[d.M21]*t[d.M33]-t[d.M01]*t[d.M22]*t[d.M33],e[d.M02]=t[d.M02]*t[d.M13]*t[d.M31]-t[d.M03]*t[d.M12]*t[d.M31]+t[d.M03]*t[d.M11]*t[d.M32]-t[d.M01]*t[d.M13]*t[d.M32]-t[d.M02]*t[d.M11]*t[d.M33]+t[d.M01]*t[d.M12]*t[d.M33],e[d.M03]=t[d.M03]*t[d.M12]*t[d.M21]-t[d.M02]*t[d.M13]*t[d.M21]-t[d.M03]*t[d.M11]*t[d.M22]+t[d.M01]*t[d.M13]*t[d.M22]+t[d.M02]*t[d.M11]*t[d.M23]-t[d.M01]*t[d.M12]*t[d.M23],e[d.M10]=t[d.M13]*t[d.M22]*t[d.M30]-t[d.M12]*t[d.M23]*t[d.M30]-t[d.M13]*t[d.M20]*t[d.M32]+t[d.M10]*t[d.M23]*t[d.M32]+t[d.M12]*t[d.M20]*t[d.M33]-t[d.M10]*t[d.M22]*t[d.M33],e[d.M11]=t[d.M02]*t[d.M23]*t[d.M30]-t[d.M03]*t[d.M22]*t[d.M30]+t[d.M03]*t[d.M20]*t[d.M32]-t[d.M00]*t[d.M23]*t[d.M32]-t[d.M02]*t[d.M20]*t[d.M33]+t[d.M00]*t[d.M22]*t[d.M33],e[d.M12]=t[d.M03]*t[d.M12]*t[d.M30]-t[d.M02]*t[d.M13]*t[d.M30]-t[d.M03]*t[d.M10]*t[d.M32]+t[d.M00]*t[d.M13]*t[d.M32]+t[d.M02]*t[d.M10]*t[d.M33]-t[d.M00]*t[d.M12]*t[d.M33],e[d.M13]=t[d.M02]*t[d.M13]*t[d.M20]-t[d.M03]*t[d.M12]*t[d.M20]+t[d.M03]*t[d.M10]*t[d.M22]-t[d.M00]*t[d.M13]*t[d.M22]-t[d.M02]*t[d.M10]*t[d.M23]+t[d.M00]*t[d.M12]*t[d.M23],e[d.M20]=t[d.M11]*t[d.M23]*t[d.M30]-t[d.M13]*t[d.M21]*t[d.M30]+t[d.M13]*t[d.M20]*t[d.M31]-t[d.M10]*t[d.M23]*t[d.M31]-t[d.M11]*t[d.M20]*t[d.M33]+t[d.M10]*t[d.M21]*t[d.M33],e[d.M21]=t[d.M03]*t[d.M21]*t[d.M30]-t[d.M01]*t[d.M23]*t[d.M30]-t[d.M03]*t[d.M20]*t[d.M31]+t[d.M00]*t[d.M23]*t[d.M31]+t[d.M01]*t[d.M20]*t[d.M33]-t[d.M00]*t[d.M21]*t[d.M33],e[d.M22]=t[d.M01]*t[d.M13]*t[d.M30]-t[d.M03]*t[d.M11]*t[d.M30]+t[d.M03]*t[d.M10]*t[d.M31]-t[d.M00]*t[d.M13]*t[d.M31]-t[d.M01]*t[d.M10]*t[d.M33]+t[d.M00]*t[d.M11]*t[d.M33],e[d.M23]=t[d.M03]*t[d.M11]*t[d.M20]-t[d.M01]*t[d.M13]*t[d.M20]-t[d.M03]*t[d.M10]*t[d.M21]+t[d.M00]*t[d.M13]*t[d.M21]+t[d.M01]*t[d.M10]*t[d.M23]-t[d.M00]*t[d.M11]*t[d.M23],e[d.M30]=t[d.M12]*t[d.M21]*t[d.M30]-t[d.M11]*t[d.M22]*t[d.M30]-t[d.M12]*t[d.M20]*t[d.M31]+t[d.M10]*t[d.M22]*t[d.M31]+t[d.M11]*t[d.M20]*t[d.M32]-t[d.M10]*t[d.M21]*t[d.M32],e[d.M31]=t[d.M01]*t[d.M22]*t[d.M30]-t[d.M02]*t[d.M21]*t[d.M30]+t[d.M02]*t[d.M20]*t[d.M31]-t[d.M00]*t[d.M22]*t[d.M31]-t[d.M01]*t[d.M20]*t[d.M32]+t[d.M00]*t[d.M21]*t[d.M32],e[d.M32]=t[d.M02]*t[d.M11]*t[d.M30]-t[d.M01]*t[d.M12]*t[d.M30]-t[d.M02]*t[d.M10]*t[d.M31]+t[d.M00]*t[d.M12]*t[d.M31]+t[d.M01]*t[d.M10]*t[d.M32]-t[d.M00]*t[d.M11]*t[d.M32],e[d.M33]=t[d.M01]*t[d.M12]*t[d.M20]-t[d.M02]*t[d.M11]*t[d.M20]+t[d.M02]*t[d.M10]*t[d.M21]-t[d.M00]*t[d.M12]*t[d.M21]-t[d.M01]*t[d.M10]*t[d.M22]+t[d.M00]*t[d.M11]*t[d.M22],t[d.M00]=e[d.M00]*n,t[d.M01]=e[d.M01]*n,t[d.M02]=e[d.M02]*n,t[d.M03]=e[d.M03]*n,t[d.M10]=e[d.M10]*n,t[d.M11]=e[d.M11]*n,t[d.M12]=e[d.M12]*n,t[d.M13]=e[d.M13]*n,t[d.M20]=e[d.M20]*n,t[d.M21]=e[d.M21]*n,t[d.M22]=e[d.M22]*n,t[d.M23]=e[d.M23]*n,t[d.M30]=e[d.M30]*n,t[d.M31]=e[d.M31]*n,t[d.M32]=e[d.M32]*n,t[d.M33]=e[d.M33]*n,this},a.prototype.determinant=function(){var t=this.values;return t[d.M30]*t[d.M21]*t[d.M12]*t[d.M03]-t[d.M20]*t[d.M31]*t[d.M12]*t[d.M03]-t[d.M30]*t[d.M11]*t[d.M22]*t[d.M03]+t[d.M10]*t[d.M31]*t[d.M22]*t[d.M03]+t[d.M20]*t[d.M11]*t[d.M32]*t[d.M03]-t[d.M10]*t[d.M21]*t[d.M32]*t[d.M03]-t[d.M30]*t[d.M21]*t[d.M02]*t[d.M13]+t[d.M20]*t[d.M31]*t[d.M02]*t[d.M13]+t[d.M30]*t[d.M01]*t[d.M22]*t[d.M13]-t[d.M00]*t[d.M31]*t[d.M22]*t[d.M13]-t[d.M20]*t[d.M01]*t[d.M32]*t[d.M13]+t[d.M00]*t[d.M21]*t[d.M32]*t[d.M13]+t[d.M30]*t[d.M11]*t[d.M02]*t[d.M23]-t[d.M10]*t[d.M31]*t[d.M02]*t[d.M23]-t[d.M30]*t[d.M01]*t[d.M12]*t[d.M23]+t[d.M00]*t[d.M31]*t[d.M12]*t[d.M23]+t[d.M10]*t[d.M01]*t[d.M32]*t[d.M23]-t[d.M00]*t[d.M11]*t[d.M32]*t[d.M23]-t[d.M20]*t[d.M11]*t[d.M02]*t[d.M33]+t[d.M10]*t[d.M21]*t[d.M02]*t[d.M33]+t[d.M20]*t[d.M01]*t[d.M12]*t[d.M33]-t[d.M00]*t[d.M21]*t[d.M12]*t[d.M33]-t[d.M10]*t[d.M01]*t[d.M22]*t[d.M33]+t[d.M00]*t[d.M11]*t[d.M22]*t[d.M33]},a.prototype.translate=function(t,e,i){var n=this.values;return n[d.M03]+=t,n[d.M13]+=e,n[d.M23]+=i,this},a.prototype.copy=function(){return(new a).set(this.values)},a.prototype.projection=function(t,e,i,n){this.identity();var r=1/Math.tan(i*(Math.PI/180)/2),s=(e+t)/(t-e),o=2*e*t/(t-e),a=this.values;return a[d.M00]=r/n,a[d.M10]=0,a[d.M20]=0,a[d.M30]=0,a[d.M01]=0,a[d.M11]=r,a[d.M21]=0,a[d.M31]=0,a[d.M02]=0,a[d.M12]=0,a[d.M22]=s,a[d.M32]=-1,a[d.M03]=0,a[d.M13]=0,a[d.M23]=o,a[d.M33]=0,this},a.prototype.ortho2d=function(t,e,i,n){return this.ortho(t,t+i,e,e+n,0,1)},a.prototype.ortho=function(t,e,i,n,r,s){this.identity();var o=2/(e-t),a=2/(n-i),h=-2/(s-r),l=-(e+t)/(e-t),u=-(n+i)/(n-i),c=-(s+r)/(s-r),f=this.values;return f[d.M00]=o,f[d.M10]=0,f[d.M20]=0,f[d.M30]=0,f[d.M01]=0,f[d.M11]=a,f[d.M21]=0,f[d.M31]=0,f[d.M02]=0,f[d.M12]=0,f[d.M22]=h,f[d.M32]=0,f[d.M03]=l,f[d.M13]=u,f[d.M23]=c,f[d.M33]=1,this},a.prototype.multiply=function(t){var e=this.temp,i=this.values,n=t.values;return e[d.M00]=i[d.M00]*n[d.M00]+i[d.M01]*n[d.M10]+i[d.M02]*n[d.M20]+i[d.M03]*n[d.M30],e[d.M01]=i[d.M00]*n[d.M01]+i[d.M01]*n[d.M11]+i[d.M02]*n[d.M21]+i[d.M03]*n[d.M31],e[d.M02]=i[d.M00]*n[d.M02]+i[d.M01]*n[d.M12]+i[d.M02]*n[d.M22]+i[d.M03]*n[d.M32],e[d.M03]=i[d.M00]*n[d.M03]+i[d.M01]*n[d.M13]+i[d.M02]*n[d.M23]+i[d.M03]*n[d.M33],e[d.M10]=i[d.M10]*n[d.M00]+i[d.M11]*n[d.M10]+i[d.M12]*n[d.M20]+i[d.M13]*n[d.M30],e[d.M11]=i[d.M10]*n[d.M01]+i[d.M11]*n[d.M11]+i[d.M12]*n[d.M21]+i[d.M13]*n[d.M31],e[d.M12]=i[d.M10]*n[d.M02]+i[d.M11]*n[d.M12]+i[d.M12]*n[d.M22]+i[d.M13]*n[d.M32],e[d.M13]=i[d.M10]*n[d.M03]+i[d.M11]*n[d.M13]+i[d.M12]*n[d.M23]+i[d.M13]*n[d.M33],e[d.M20]=i[d.M20]*n[d.M00]+i[d.M21]*n[d.M10]+i[d.M22]*n[d.M20]+i[d.M23]*n[d.M30],e[d.M21]=i[d.M20]*n[d.M01]+i[d.M21]*n[d.M11]+i[d.M22]*n[d.M21]+i[d.M23]*n[d.M31],e[d.M22]=i[d.M20]*n[d.M02]+i[d.M21]*n[d.M12]+i[d.M22]*n[d.M22]+i[d.M23]*n[d.M32],e[d.M23]=i[d.M20]*n[d.M03]+i[d.M21]*n[d.M13]+i[d.M22]*n[d.M23]+i[d.M23]*n[d.M33],e[d.M30]=i[d.M30]*n[d.M00]+i[d.M31]*n[d.M10]+i[d.M32]*n[d.M20]+i[d.M33]*n[d.M30],e[d.M31]=i[d.M30]*n[d.M01]+i[d.M31]*n[d.M11]+i[d.M32]*n[d.M21]+i[d.M33]*n[d.M31],e[d.M32]=i[d.M30]*n[d.M02]+i[d.M31]*n[d.M12]+i[d.M32]*n[d.M22]+i[d.M33]*n[d.M32],e[d.M33]=i[d.M30]*n[d.M03]+i[d.M31]*n[d.M13]+i[d.M32]*n[d.M23]+i[d.M33]*n[d.M33],this.set(this.temp)},a.prototype.multiplyLeft=function(t){var e=this.temp,i=this.values,n=t.values;return e[d.M00]=n[d.M00]*i[d.M00]+n[d.M01]*i[d.M10]+n[d.M02]*i[d.M20]+n[d.M03]*i[d.M30],e[d.M01]=n[d.M00]*i[d.M01]+n[d.M01]*i[d.M11]+n[d.M02]*i[d.M21]+n[d.M03]*i[d.M31],e[d.M02]=n[d.M00]*i[d.M02]+n[d.M01]*i[d.M12]+n[d.M02]*i[d.M22]+n[d.M03]*i[d.M32],e[d.M03]=n[d.M00]*i[d.M03]+n[d.M01]*i[d.M13]+n[d.M02]*i[d.M23]+n[d.M03]*i[d.M33],e[d.M10]=n[d.M10]*i[d.M00]+n[d.M11]*i[d.M10]+n[d.M12]*i[d.M20]+n[d.M13]*i[d.M30],e[d.M11]=n[d.M10]*i[d.M01]+n[d.M11]*i[d.M11]+n[d.M12]*i[d.M21]+n[d.M13]*i[d.M31],e[d.M12]=n[d.M10]*i[d.M02]+n[d.M11]*i[d.M12]+n[d.M12]*i[d.M22]+n[d.M13]*i[d.M32],e[d.M13]=n[d.M10]*i[d.M03]+n[d.M11]*i[d.M13]+n[d.M12]*i[d.M23]+n[d.M13]*i[d.M33],e[d.M20]=n[d.M20]*i[d.M00]+n[d.M21]*i[d.M10]+n[d.M22]*i[d.M20]+n[d.M23]*i[d.M30],e[d.M21]=n[d.M20]*i[d.M01]+n[d.M21]*i[d.M11]+n[d.M22]*i[d.M21]+n[d.M23]*i[d.M31],e[d.M22]=n[d.M20]*i[d.M02]+n[d.M21]*i[d.M12]+n[d.M22]*i[d.M22]+n[d.M23]*i[d.M32],e[d.M23]=n[d.M20]*i[d.M03]+n[d.M21]*i[d.M13]+n[d.M22]*i[d.M23]+n[d.M23]*i[d.M33],e[d.M30]=n[d.M30]*i[d.M00]+n[d.M31]*i[d.M10]+n[d.M32]*i[d.M20]+n[d.M33]*i[d.M30],e[d.M31]=n[d.M30]*i[d.M01]+n[d.M31]*i[d.M11]+n[d.M32]*i[d.M21]+n[d.M33]*i[d.M31],e[d.M32]=n[d.M30]*i[d.M02]+n[d.M31]*i[d.M12]+n[d.M32]*i[d.M22]+n[d.M33]*i[d.M32],e[d.M33]=n[d.M30]*i[d.M03]+n[d.M31]*i[d.M13]+n[d.M32]*i[d.M23]+n[d.M33]*i[d.M33],this.set(this.temp)},a.prototype.lookAt=function(t,e,i){a.initTemps();var n=a.xAxis,r=a.yAxis,s=a.zAxis;s.setFrom(e).normalize(),n.setFrom(e).normalize(),n.cross(i).normalize(),r.setFrom(n).cross(s).normalize(),this.identity();var o=this.values;return o[d.M00]=n.x,o[d.M01]=n.y,o[d.M02]=n.z,o[d.M10]=r.x,o[d.M11]=r.y,o[d.M12]=r.z,o[d.M20]=-s.x,o[d.M21]=-s.y,o[d.M22]=-s.z,a.tmpMatrix.identity(),a.tmpMatrix.values[d.M03]=-t.x,a.tmpMatrix.values[d.M13]=-t.y,a.tmpMatrix.values[d.M23]=-t.z,this.multiply(a.tmpMatrix),this},a.initTemps=function(){null===a.xAxis&&(a.xAxis=new d.Vector3),null===a.yAxis&&(a.yAxis=new d.Vector3),null===a.zAxis&&(a.zAxis=new d.Vector3)},a.xAxis=null,a.yAxis=null,a.zAxis=null,a.tmpMatrix=new a,a);function a(){this.temp=new Float32Array(16),this.values=new Float32Array(16);var t=this.values;t[d.M00]=1,t[d.M11]=1,t[d.M22]=1,t[d.M33]=1}d.Matrix4=t}((Bt=ge=ge||{}).webgl||(Bt.webgl={})),function(s){var t=(e.prototype.getAttributes=function(){return this.attributes},e.prototype.maxVertices=function(){return this.vertices.length/this.elementsPerVertex},e.prototype.numVertices=function(){return this.verticesLength/this.elementsPerVertex},e.prototype.setVerticesLength=function(t){this.dirtyVertices=!0,this.verticesLength=t},e.prototype.getVertices=function(){return this.vertices},e.prototype.maxIndices=function(){return this.indices.length},e.prototype.numIndices=function(){return this.indicesLength},e.prototype.setIndicesLength=function(t){this.dirtyIndices=!0,this.indicesLength=t},e.prototype.getIndices=function(){return this.indices},e.prototype.getVertexSizeInFloats=function(){for(var t=0,e=0;e<this.attributes.length;e++)t+=this.attributes[e].numElements;return t},e.prototype.setVertices=function(t){if(this.dirtyVertices=!0,t.length>this.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,0<this.indicesLength?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),0<this.indicesLength?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;n<this.attributes.length;n++){var r=this.attributes[n],s=t.getAttributeLocation(r.name);e.enableVertexAttribArray(s),e.vertexAttribPointer(s,r.numElements,e.FLOAT,!1,4*this.elementsPerVertex,4*i),i+=r.numElements}0<this.indicesLength&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,i=0;i<this.attributes.length;i++){var n=this.attributes[i],r=t.getAttributeLocation(n.name);e.disableVertexAttribArray(r)}e.bindBuffer(e.ARRAY_BUFFER,null),0<this.indicesLength&&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);function e(t,e,i,n){this.attributes=e,this.verticesLength=0,this.dirtyVertices=!1,this.indicesLength=0,this.dirtyIndices=!1,this.elementsPerVertex=0,this.context=t instanceof s.ManagedWebGLRenderingContext?t:new s.ManagedWebGLRenderingContext(t);for(var r=this.elementsPerVertex=0;r<e.length;r++)this.elementsPerVertex+=e[r].numElements;this.vertices=new Float32Array(i*this.elementsPerVertex),this.indices=new Uint16Array(n),this.context.addRestorable(this)}s.Mesh=t;function i(t,e,i){this.name=t,this.type=e,this.numElements=i}s.VertexAttribute=i;var n,r=(me(o,n=i),o);function o(){return n.call(this,s.Shader.POSITION,m.Float,2)||this}s.Position2Attribute=r;var a,h=(me(l,a=i),l);function l(){return a.call(this,s.Shader.POSITION,m.Float,3)||this}s.Position3Attribute=h;var u,c=(me(f,u=i),f);function f(t){return void 0===t&&(t=0),u.call(this,s.Shader.TEXCOORDS+(0==t?"":t),m.Float,2)||this}s.TexCoordAttribute=c;var d,p=(me(g,d=i),g);function g(){return d.call(this,s.Shader.COLOR,m.Float,4)||this}s.ColorAttribute=p;var v,m,M,x=(me(y,v=i),y);function y(){return v.call(this,s.Shader.COLOR2,m.Float,4)||this}s.Color2Attribute=x,(M=m=s.VertexAttributeType||(s.VertexAttributeType={}))[M.Float=0]="Float"}((Ut=ge=ge||{}).webgl||(Ut.webgl={})),zt=ge=ge||{},Wt=zt.webgl||(zt.webgl={}),Je.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)},Je.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))},Je.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;o<i.length;s++,o++)r[s]=i[o]+n;this.indicesLength+=i.length,this.mesh.setIndicesLength(this.indicesLength)},Je.prototype.flush=function(){var t=this.context.gl;0!=this.verticesLength&&(this.lastTexture.bind(),this.mesh.draw(this.shader,t.TRIANGLES),this.verticesLength=0,this.indicesLength=0,this.mesh.setVerticesLength(0),this.mesh.setIndicesLength(0),this.drawCalls++)},Je.prototype.end=function(){var t=this.context.gl;if(!this.isDrawing)throw new Error("PolygonBatch is not drawing. Call PolygonBatch.begin() before calling PolygonBatch.end()");(0<this.verticesLength||0<this.indicesLength)&&this.flush(),this.shader=null,this.lastTexture=null,this.isDrawing=!1,t.disable(t.BLEND)},Je.prototype.getDrawCalls=function(){return this.drawCalls},Je.prototype.dispose=function(){this.mesh.dispose()},Gt=Je,Wt.PolygonBatcher=Gt,qt=ge=ge||{},Ht=qt.webgl||(qt.webgl={}),$e.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},$e.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)},$e.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)},$e.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)},$e.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)},$e.prototype.drawTextureRotated=function(t,e,i,n,r,s,o,a,h,l){void 0===h&&(h=null),void 0===l&&(l=!1),this.enableRenderer(this.batcher),null===h&&(h=this.WHITE);var u,c,f=this.QUAD,d=e+s,p=i+o,g=-s,v=-o,m=n-s,M=r-o,x=g,y=v,w=g,T=M,E=m,b=M,A=m,R=v,S=0,C=0,I=0,P=0,_=0,L=0,k=0,O=0;P=0!=a?(I=(_=(u=qt.MathUtils.cosDeg(a))*E-(c=qt.MathUtils.sinDeg(a))*b)+((S=u*x-c*y)-(k=u*w-c*T)),(L=c*E+u*b)+((C=c*x+u*y)-(O=c*w+u*T))):(S=x,C=y,k=w,O=T,_=E,L=b,I=A,R),S+=d,C+=p,I+=d,P+=p,_+=d,L+=p,k+=d,O+=p;var F=0;f[F++]=S,f[F++]=C,f[F++]=h.r,f[F++]=h.g,f[F++]=h.b,f[F++]=h.a,f[F++]=0,f[F++]=1,this.twoColorTint&&(f[F++]=0,f[F++]=0,f[F++]=0,f[F++]=0),f[F++]=I,f[F++]=P,f[F++]=h.r,f[F++]=h.g,f[F++]=h.b,f[F++]=h.a,f[F++]=1,f[F++]=1,this.twoColorTint&&(f[F++]=0,f[F++]=0,f[F++]=0,f[F++]=0),f[F++]=_,f[F++]=L,f[F++]=h.r,f[F++]=h.g,f[F++]=h.b,f[F++]=h.a,f[F++]=1,f[F++]=0,this.twoColorTint&&(f[F++]=0,f[F++]=0,f[F++]=0,f[F++]=0),f[F++]=k,f[F++]=O,f[F++]=h.r,f[F++]=h.g,f[F++]=h.b,f[F++]=h.a,f[F++]=0,f[F++]=0,this.twoColorTint&&(f[F++]=0,f[F++]=0,f[F++]=0,f[F++]=0),this.batcher.draw(t,f,this.QUAD_TRIANGLES)},$e.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)},$e.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)},$e.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)},$e.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)},$e.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)},$e.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)},$e.prototype.polygon=function(t,e,i,n){void 0===n&&(n=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,i,n)},$e.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)},$e.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)},$e.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},$e.prototype.resize=function(t){var e,i,n,r,s,o=this.canvas,a=o.clientWidth,h=o.clientHeight;o.width==a&&o.height==h||(o.width=a,o.height=h),this.context.gl.viewport(0,0,o.width,o.height),t===jt.Stretch||(t===jt.Expand?this.camera.setViewport(a,h):t===jt.Fit&&(e=o.width,i=o.height,n=this.camera.viewportWidth,s=(r=this.camera.viewportHeight)/n<i/e?n/e:r/i,this.camera.viewportWidth=e*s,this.camera.viewportHeight=i*s)),this.camera.update()},$e.prototype.enableRenderer=function(t){this.activeRenderer!==t&&(this.end(),t instanceof Ht.PolygonBatcher?(this.batcherShader.bind(),this.batcherShader.setUniform4x4f(Ht.Shader.MVP_MATRIX,this.camera.projectionView.values),this.batcherShader.setUniformi("u_texture",0),this.batcher.begin(this.batcherShader),this.activeRenderer=this.batcher):t instanceof Ht.ShapeRenderer?(this.shapesShader.bind(),this.shapesShader.setUniform4x4f(Ht.Shader.MVP_MATRIX,this.camera.projectionView.values),this.shapes.begin(this.shapesShader),this.activeRenderer=this.shapes):this.activeRenderer=this.skeletonDebugRenderer)},$e.prototype.dispose=function(){this.batcher.dispose(),this.batcherShader.dispose(),this.shapes.dispose(),this.shapesShader.dispose(),this.skeletonDebugRenderer.dispose()},Kt=$e,Ht.SceneRenderer=Kt,(Zt=jt=Ht.ResizeMode||(Ht.ResizeMode={}))[Zt.Stretch=0]="Stretch",Zt[Zt.Expand=1]="Expand",Zt[Zt.Fit=2]="Fit",Qt=ge=ge||{},Jt=Qt.webgl||(Qt.webgl={}),ti.prototype.getProgram=function(){return this.program},ti.prototype.getVertexShader=function(){return this.vertexShader},ti.prototype.getFragmentShader=function(){return this.fragmentShader},ti.prototype.getVertexShaderSource=function(){return this.vsSource},ti.prototype.getFragmentSource=function(){return this.fsSource},ti.prototype.compile=function(){var t=this.context.gl;try{this.vs=this.compileShader(t.VERTEX_SHADER,this.vertexShader),this.fs=this.compileShader(t.FRAGMENT_SHADER,this.fragmentShader),this.program=this.compileProgram(this.vs,this.fs)}catch(t){throw this.dispose(),t}},ti.prototype.compileShader=function(t,e){var i=this.context.gl,n=i.createShader(t);if(i.shaderSource(n,e),i.compileShader(n),!i.getShaderParameter(n,i.COMPILE_STATUS)){var r="Couldn't compile shader: "+i.getShaderInfoLog(n);if(i.deleteShader(n),!i.isContextLost())throw new Error(r)}return n},ti.prototype.compileProgram=function(t,e){var i=this.context.gl,n=i.createProgram();if(i.attachShader(n,t),i.attachShader(n,e),i.linkProgram(n),!i.getProgramParameter(n,i.LINK_STATUS)){var r="Couldn't compile shader program: "+i.getProgramInfoLog(n);if(i.deleteProgram(n),!i.isContextLost())throw new Error(r)}return n},ti.prototype.restore=function(){this.compile()},ti.prototype.bind=function(){this.context.gl.useProgram(this.program)},ti.prototype.unbind=function(){this.context.gl.useProgram(null)},ti.prototype.setUniformi=function(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)},ti.prototype.setUniformf=function(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)},ti.prototype.setUniform2f=function(t,e,i){this.context.gl.uniform2f(this.getUniformLocation(t),e,i)},ti.prototype.setUniform3f=function(t,e,i,n){this.context.gl.uniform3f(this.getUniformLocation(t),e,i,n)},ti.prototype.setUniform4f=function(t,e,i,n,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,i,n,r)},ti.prototype.setUniform2x2f=function(t,e){var i=this.context.gl;this.tmp2x2.set(e),i.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)},ti.prototype.setUniform3x3f=function(t,e){var i=this.context.gl;this.tmp3x3.set(e),i.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)},ti.prototype.setUniform4x4f=function(t,e){var i=this.context.gl;this.tmp4x4.set(e),i.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)},ti.prototype.getUniformLocation=function(t){var e=this.context.gl,i=e.getUniformLocation(this.program,t);if(!i&&!e.isContextLost())throw new Error("Couldn't find location for uniform "+t);return i},ti.prototype.getAttributeLocation=function(t){var e=this.context.gl,i=e.getAttribLocation(this.program,t);if(-1==i&&!e.isContextLost())throw new Error("Couldn't find location for attribute "+t);return i},ti.prototype.dispose=function(){this.context.removeRestorable(this);var t=this.context.gl;this.vs&&(t.deleteShader(this.vs),this.vs=null),this.fs&&(t.deleteShader(this.fs),this.fs=null),this.program&&(t.deleteProgram(this.program),this.program=null)},ti.newColoredTextured=function(t){return new ti(t,"\n\t\t\t\tattribute vec4 "+ti.POSITION+";\n\t\t\t\tattribute vec4 "+ti.COLOR+";\n\t\t\t\tattribute vec2 "+ti.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+ti.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+ti.COLOR+";\n\t\t\t\t\tv_texCoords = "+ti.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+ti.MVP_MATRIX+" * "+ti.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color * texture2D(u_texture, v_texCoords);\n\t\t\t\t}\n\t\t\t")},ti.newTwoColoredTextured=function(t){return new ti(t,"\n\t\t\t\tattribute vec4 "+ti.POSITION+";\n\t\t\t\tattribute vec4 "+ti.COLOR+";\n\t\t\t\tattribute vec4 "+ti.COLOR2+";\n\t\t\t\tattribute vec2 "+ti.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+ti.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_light;\n\t\t\t\tvarying vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_light = "+ti.COLOR+";\n\t\t\t\t\tv_dark = "+ti.COLOR2+";\n\t\t\t\t\tv_texCoords = "+ti.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+ti.MVP_MATRIX+" * "+ti.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_light;\n\t\t\t\tvarying LOWP vec4 v_dark;\n\t\t\t\tvarying vec2 v_texCoords;\n\t\t\t\tuniform sampler2D u_texture;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tvec4 texColor = texture2D(u_texture, v_texCoords);\n\t\t\t\t\tgl_FragColor.a = texColor.a * v_light.a;\n\t\t\t\t\tgl_FragColor.rgb = ((texColor.a - 1.0) * v_dark.a + 1.0 - texColor.rgb) * v_dark.rgb + texColor.rgb * v_light.rgb;\n\t\t\t\t}\n\t\t\t")},ti.newColored=function(t){return new ti(t,"\n\t\t\t\tattribute vec4 "+ti.POSITION+";\n\t\t\t\tattribute vec4 "+ti.COLOR+";\n\t\t\t\tuniform mat4 "+ti.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+ti.COLOR+";\n\t\t\t\t\tgl_Position = "+ti.MVP_MATRIX+" * "+ti.POSITION+";\n\t\t\t\t}\n\t\t\t","\n\t\t\t\t#ifdef GL_ES\n\t\t\t\t\t#define LOWP lowp\n\t\t\t\t\tprecision mediump float;\n\t\t\t\t#else\n\t\t\t\t\t#define LOWP\n\t\t\t\t#endif\n\t\t\t\tvarying LOWP vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tgl_FragColor = v_color;\n\t\t\t\t}\n\t\t\t")},ti.MVP_MATRIX="u_projTrans",ti.POSITION="a_position",ti.COLOR="a_color",ti.COLOR2="a_color2",ti.TEXCOORDS="a_texCoords",ti.SAMPLER="u_texture",$t=ti,Jt.Shader=$t,te=ge=ge||{},ee=te.webgl||(te.webgl={}),ei.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)},ei.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))},ei.prototype.setColor=function(t){this.color.setFromColor(t)},ei.prototype.setColorWith=function(t,e,i,n){this.color.set(t,e,i,n)},ei.prototype.point=function(t,e,i){void 0===i&&(i=null),this.check(ie.Point,1),null===i&&(i=this.color),this.vertex(t,e,i)},ei.prototype.line=function(t,e,i,n,r){void 0===r&&(r=null),this.check(ie.Line,2),this.mesh.getVertices(),this.vertexIndex,null===r&&(r=this.color),this.vertex(t,e,r),this.vertex(i,n,r)},ei.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.check(t?ie.Filled:ie.Line,3),this.mesh.getVertices(),this.vertexIndex,null===a&&(a=this.color),null===h&&(h=this.color),null===l&&(l=this.color),t?(this.vertex(e,i,a),this.vertex(n,r,h),this.vertex(s,o,l)):(this.vertex(e,i,a),this.vertex(n,r,h),this.vertex(n,r,a),this.vertex(s,o,h),this.vertex(s,o,a),this.vertex(e,i,h))},ei.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.check(t?ie.Filled:ie.Line,3),this.mesh.getVertices(),this.vertexIndex,null===l&&(l=this.color),null===u&&(u=this.color),null===c&&(c=this.color),null===f&&(f=this.color),t?(this.vertex(e,i,l),this.vertex(n,r,u),this.vertex(s,o,c),this.vertex(s,o,c)):(this.vertex(e,i,l),this.vertex(n,r,u),this.vertex(n,r,u),this.vertex(s,o,c),this.vertex(s,o,c),this.vertex(a,h,f)),this.vertex(a,h,f),this.vertex(e,i,l)},ei.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)},ei.prototype.rectLine=function(t,e,i,n,r,s,o){void 0===o&&(o=null),this.check(t?ie.Filled:ie.Line,8),null===o&&(o=this.color);var a=this.tmp.set(r-i,e-n);a.normalize(),s*=.5;var h=a.x*s,l=a.y*s;t?(this.vertex(e+h,i+l,o),this.vertex(e-h,i-l,o),this.vertex(n+h,r+l,o),this.vertex(n-h,r-l,o),this.vertex(n+h,r+l,o)):(this.vertex(e+h,i+l,o),this.vertex(e-h,i-l,o),this.vertex(n+h,r+l,o),this.vertex(n-h,r-l,o),this.vertex(n+h,r+l,o),this.vertex(e+h,i+l,o),this.vertex(n-h,r-l,o)),this.vertex(e-h,i-l,o)},ei.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)},ei.prototype.polygon=function(t,e,i,n){if(void 0===n&&(n=null),i<3)throw new Error("Polygon must contain at least 3 vertices");this.check(ie.Line,2*i),null===n&&(n=this.color),this.mesh.getVertices(),this.vertexIndex,i<<=1;for(var r=t[e<<=1],s=t[e+1],o=e+i,a=e,h=e+i-2;a<h;a+=2){var l=t[a],u=t[a+1],c=0,f=0,f=o<=a+2?(c=r,s):(c=t[a+2],t[a+3]);this.vertex(l,u,n),this.vertex(c,f,n)}},ei.prototype.circle=function(t,e,i,n,r,s){if(void 0===r&&(r=null),void 0===s&&(s=0),0===s&&(s=Math.max(1,6*te.MathUtils.cbrt(n)|0)),s<=0)throw new Error("segments must be > 0.");null===r&&(r=this.color);var o=2*te.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=n,u=0;if(t){for(this.check(ie.Filled,3*s+3),s--,f=0;f<s;f++){this.vertex(e,i,r),this.vertex(e+l,i+u,r);var c=l;l=a*l-h*u,u=h*c+a*u,this.vertex(e+l,i+u,r)}this.vertex(e,i,r),this.vertex(e+l,i+u,r)}else{this.check(ie.Line,2*s+2);for(var f=0;f<s;f++){this.vertex(e+l,i+u,r);var d=l,l=a*l-h*u,u=h*d+a*u;this.vertex(e+l,i+u,r)}this.vertex(e+l,i+u,r)}l=n,u=0,this.vertex(e+l,i+u,r)},ei.prototype.curve=function(t,e,i,n,r,s,o,a,h,l){void 0===l&&(l=null),this.check(ie.Line,2*h+2),null===l&&(l=this.color);for(var u=1/h,c=u*u,f=u*u*u,d=3*u,p=3*c,g=6*c,v=6*f,m=t-2*i+r,M=e-2*n+s,x=3*(i-r)-t+o,y=3*(n-s)-e+a,w=t,T=e,E=(i-t)*d+m*p+x*f,b=(n-e)*d+M*p+y*f,A=m*g+x*v,R=M*g+y*v,S=x*v,C=y*v;0<h--;)this.vertex(w,T,l),w+=E,T+=b,E+=A,b+=R,A+=S,R+=C,this.vertex(w,T,l);this.vertex(w,T,l),this.vertex(o,a,l)},ei.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},ei.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},ei.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},ei.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()<e))return;this.flush()}else this.flush(),this.shapeType=t},ei.prototype.dispose=function(){this.mesh.dispose()},re=ei,ee.ShapeRenderer=re,(ne=ie=ee.ShapeType||(ee.ShapeType={}))[ne.Point=0]="Point",ne[ne.Line=1]="Line",ne[ne.Filled=4]="Filled",se=ge=ge||{},oe=se.webgl||(se.webgl={}),ii.prototype.draw=function(t,e,i){void 0===i&&(i=null);var n=e.x,r=e.y,s=this.context.gl,o=this.premultipliedAlpha?s.ONE:s.SRC_ALPHA;t.setBlendMode(o,s.ONE_MINUS_SRC_ALPHA);var a=e.bones;if(this.drawBones){t.setColor(this.boneLineColor);for(var h=0,l=a.length;h<l;h++){var u=a[h];i&&-1<i.indexOf(u.data.name)||null!=u.parent&&(T=n+u.data.length*u.a+u.worldX,E=r+u.data.length*u.c+u.worldY,t.rectLine(!0,n+u.worldX,r+u.worldY,T,E,this.boneWidth*this.scale))}this.drawSkeletonXY&&t.x(n,r,4*this.scale)}if(this.drawRegionAttachments)for(t.setColor(this.attachmentLineColor),h=0,l=(Y=e.slots).length;h<l;h++)(B=(X=Y[h]).getAttachment())instanceof se.RegionAttachment&&(f=this.vertices,B.computeWorldVertices(X.bone,f,0,2),t.line(f[0],f[1],f[2],f[3]),t.line(f[2],f[3],f[4],f[5]),t.line(f[4],f[5],f[6],f[7]),t.line(f[6],f[7],f[0],f[1]));if(this.drawMeshHull||this.drawMeshTriangles)for(h=0,l=(Y=e.slots).length;h<l;h++)if((X=Y[h]).bone.active&&(B=X.getAttachment())instanceof se.MeshAttachment){var c=B,f=this.vertices;c.computeWorldVertices(X,0,c.worldVerticesLength,f,0,2);var d=c.triangles,p=c.hullLength;if(this.drawMeshTriangles){t.setColor(this.triangleLineColor);for(var g=0,v=d.length;g<v;g+=3){var m=2*d[g],M=2*d[g+1],x=2*d[g+2];t.triangle(!1,f[m],f[1+m],f[M],f[1+M],f[x],f[1+x])}}if(this.drawMeshHull&&0<p){t.setColor(this.attachmentLineColor);for(var y=f[(p=2*(p>>1))-2],w=f[p-1],g=0,v=p;g<v;g+=2){var T=f[g],E=f[g+1];t.line(T,E,y,w),y=T,w=E}}}if(this.drawBoundingBoxes){var b=this.bounds;b.update(e,!0),t.setColor(this.aabbColor),t.rect(!1,b.minX,b.minY,b.getWidth(),b.getHeight());for(var A=b.polygons,R=b.boundingBoxes,h=0,l=A.length;h<l;h++){var S=A[h];t.setColor(R[h].color),t.polygon(S,0,S.length)}}if(this.drawPaths)for(h=0,l=(Y=e.slots).length;h<l;h++)if((X=Y[h]).bone.active&&(B=X.getAttachment())instanceof se.PathAttachment){var C=B,v=C.worldVerticesLength,I=this.temp=se.Utils.setArraySize(this.temp,v,0);C.computeWorldVertices(X,0,v,I,0,2);var P=this.pathColor,_=I[2],L=I[3],k=0,O=0;for(C.closed&&(t.setColor(P),F=I[0],V=I[1],D=I[v-2],N=I[v-1],k=I[v-4],O=I[v-3],t.curve(_,L,F,V,D,N,k,O,32),t.setColor(ii.LIGHT_GRAY),t.line(_,L,F,V),t.line(k,O,D,N)),v-=4,g=4;g<v;g+=6){var F=I[g],V=I[g+1],D=I[g+2],N=I[g+3];k=I[g+4],O=I[g+5],t.setColor(P),t.curve(_,L,F,V,D,N,k,O,32),t.setColor(ii.LIGHT_GRAY),t.line(_,L,F,V),t.line(k,O,D,N),_=k,L=O}}if(this.drawBones)for(t.setColor(this.boneOriginColor),h=0,l=a.length;h<l;h++)u=a[h],i&&-1<i.indexOf(u.data.name)||t.circle(!0,n+u.worldX,r+u.worldY,3*this.scale,ii.GREEN,8);if(this.drawClipping){var Y=e.slots;t.setColor(this.clipColor);for(var X,B,h=0,l=Y.length;h<l;h++)if((X=Y[h]).bone.active&&(B=X.getAttachment())instanceof se.ClippingAttachment){var U=B,v=U.worldVerticesLength,I=this.temp=se.Utils.setArraySize(this.temp,v,0);U.computeWorldVertices(X,0,v,I,0,2);for(var z=0,W=I.length;z<W;z+=2)T=I[z],E=I[z+1],k=I[(z+2)%I.length],O=I[(z+3)%I.length],t.line(T,E,k,O)}}},ii.prototype.dispose=function(){},ii.LIGHT_GRAY=new se.Color(192/255,192/255,192/255,1),ii.GREEN=new se.Color(0,1,0,1),ae=ii,oe.SkeletonDebugRenderer=ae,he=ge=ge||{},le=he.webgl||(he.webgl={}),ue=function(t,e,i){this.vertices=t,this.numVertices=e,this.numFloats=i},ni.prototype.draw=function(t,e,i,n){void 0===i&&(i=-1),void 0===n&&(n=-1);var r=this.clipper,s=this.premultipliedAlpha,o=this.twoColorTint,a=null,h=this.temp,l=this.temp2,u=this.temp3,c=this.temp4,f=this.renderable,d=null,p=null,g=e.drawOrder,v=null,m=e.color,M=o?12:8,x=!1;-1==i&&(x=!0);for(var y=0,w=g.length;y<w;y++){var T=r.isClipping()?2:M,E=g[y];if(E.bone.active)if(0<=i&&i==E.data.index&&(x=!0),x){0<=n&&n==E.data.index&&(x=!1);var b=E.getAttachment(),A=null;if(b instanceof he.RegionAttachment){var R=b;f.vertices=this.vertices,f.numVertices=4,f.numFloats=T<<2,R.computeWorldVertices(E.bone,f.vertices,0,T),p=ni.QUAD_TRIANGLES,d=R.uvs,A=R.region.renderObject.texture,v=R.color}else{if(!(b instanceof he.MeshAttachment)){if(b instanceof he.ClippingAttachment){r.clipStart(E,b);continue}r.clipEndWithSlot(E);continue}var S=b;f.vertices=this.vertices,f.numVertices=S.worldVerticesLength>>1,f.numFloats=f.numVertices*T,f.numFloats>f.vertices.length&&(f.vertices=this.vertices=he.Utils.newFloatArray(f.numFloats)),S.computeWorldVertices(E,0,S.worldVerticesLength,f.vertices,0,T),p=S.triangles,A=S.region.renderObject.texture,d=S.uvs,v=S.color}if(null!=A){var C=E.color,I=this.tempColor;I.r=m.r*C.r*v.r,I.g=m.g*C.g*v.g,I.b=m.b*C.b*v.b,I.a=m.a*C.a*v.a,s&&(I.r*=I.a,I.g*=I.a,I.b*=I.a);var P=this.tempColor2;null==E.darkColor?P.set(0,0,0,1):(s?(P.r=E.darkColor.r*I.a,P.g=E.darkColor.g*I.a,P.b=E.darkColor.b*I.a):P.setFromColor(E.darkColor),P.a=s?1:0);var _=E.data.blendMode;if(_!=a&&(a=_,t.setBlendMode(le.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),le.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(f.vertices,f.numFloats,p,p.length,d,I,P,o);var L=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var O=this.vertexEffect,F=L;if(o)for(var V=0,D=L.length;V<D;V+=M)h.x=F[V],h.y=F[V+1],u.set(F[V+2],F[V+3],F[V+4],F[V+5]),l.x=F[V+6],l.y=F[V+7],c.set(F[V+8],F[V+9],F[V+10],F[V+11]),O.transform(h,l,u,c),F[V]=h.x,F[V+1]=h.y,F[V+2]=u.r,F[V+3]=u.g,F[V+4]=u.b,F[V+5]=u.a,F[V+6]=l.x,F[V+7]=l.y,F[V+8]=c.r,F[V+9]=c.g,F[V+10]=c.b,F[V+11]=c.a;else for(var V=0,N=L.length;V<N;V+=M)h.x=F[V],h.y=F[V+1],u.set(F[V+2],F[V+3],F[V+4],F[V+5]),l.x=F[V+6],l.y=F[V+7],c.set(0,0,0,0),O.transform(h,l,u,c),F[V]=h.x,F[V+1]=h.y,F[V+2]=u.r,F[V+3]=u.g,F[V+4]=u.b,F[V+5]=u.a,F[V+6]=l.x,F[V+7]=l.y}t.draw(A,L,k)}else{if(F=f.vertices,null!=this.vertexEffect)if(O=this.vertexEffect,o)for(var V=0,Y=0,X=f.numFloats;V<X;V+=M,Y+=2)h.x=F[V],h.y=F[V+1],l.x=d[Y],l.y=d[Y+1],u.setFromColor(I),c.setFromColor(P),O.transform(h,l,u,c),F[V]=h.x,F[V+1]=h.y,F[V+2]=u.r,F[V+3]=u.g,F[V+4]=u.b,F[V+5]=u.a,F[V+6]=l.x,F[V+7]=l.y,F[V+8]=c.r,F[V+9]=c.g,F[V+10]=c.b,F[V+11]=c.a;else for(var V=0,Y=0,B=f.numFloats;V<B;V+=M,Y+=2)h.x=F[V],h.y=F[V+1],l.x=d[Y],l.y=d[Y+1],u.setFromColor(I),c.set(0,0,0,0),O.transform(h,l,u,c),F[V]=h.x,F[V+1]=h.y,F[V+2]=u.r,F[V+3]=u.g,F[V+4]=u.b,F[V+5]=u.a,F[V+6]=l.x,F[V+7]=l.y;else if(o)for(var V=2,Y=0,U=f.numFloats;V<U;V+=M,Y+=2)F[V]=I.r,F[V+1]=I.g,F[V+2]=I.b,F[V+3]=I.a,F[V+4]=d[Y],F[V+5]=d[Y+1],F[V+6]=P.r,F[V+7]=P.g,F[V+8]=P.b,F[V+9]=P.a;else for(var V=2,Y=0,z=f.numFloats;V<z;V+=M,Y+=2)F[V]=I.r,F[V+1]=I.g,F[V+2]=I.b,F[V+3]=I.a,F[V+4]=d[Y],F[V+5]=d[Y+1];var W=f.vertices.subarray(0,f.numFloats);t.draw(A,W,p)}}r.clipEndWithSlot(E)}else r.clipEndWithSlot(E);else r.clipEndWithSlot(E)}r.clipEnd()},ni.QUAD_TRIANGLES=[0,1,2,2,3,0],ce=ni,le.SkeletonRenderer=ce,fe=ge=ge||{},de=fe.webgl||(fe.webgl={}),ri.prototype.setFrom=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},ri.prototype.set=function(t,e,i){return this.x=t,this.y=e,this.z=i,this},ri.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},ri.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},ri.prototype.scale=function(t){return this.x*=t,this.y*=t,this.z*=t,this},ri.prototype.normalize=function(){var t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this},ri.prototype.cross=function(t){return this.set(this.y*t.z-this.z*t.y,this.z*t.x-this.x*t.z,this.x*t.y-this.y*t.x)},ri.prototype.multiply=function(t){var e=t.values;return this.set(this.x*e[de.M00]+this.y*e[de.M01]+this.z*e[de.M02]+e[de.M03],this.x*e[de.M10]+this.y*e[de.M11]+this.z*e[de.M12]+e[de.M13],this.x*e[de.M20]+this.y*e[de.M21]+this.z*e[de.M22]+e[de.M23])},ri.prototype.project=function(t){var e=t.values,i=1/(this.x*e[de.M30]+this.y*e[de.M31]+this.z*e[de.M32]+e[de.M33]);return this.set((this.x*e[de.M00]+this.y*e[de.M01]+this.z*e[de.M02]+e[de.M03])*i,(this.x*e[de.M10]+this.y*e[de.M11]+this.z*e[de.M12]+e[de.M13])*i,(this.x*e[de.M20]+this.y*e[de.M21]+this.z*e[de.M22]+e[de.M23])*i)},ri.prototype.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z},ri.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},ri.prototype.distance=function(t){var e=t.x-this.x,i=t.y-this.y,n=t.z-this.z;return Math.sqrt(e*e+i*i+n*n)},pe=ri,de.Vector3=pe,function(t){var e=(i.prototype.addRestorable=function(t){this.restorables.push(t)},i.prototype.removeRestorable=function(t){var e=this.restorables.indexOf(t);-1<e&&this.restorables.splice(e,1)},i);function i(t,e){var i,n=this;void 0===e&&(e={alpha:"true"}),this.restorables=new Array,t instanceof HTMLCanvasElement?(i=t,this.gl=i.getContext("webgl2",e)||i.getContext("webgl",e),(this.canvas=i).addEventListener("webglcontextlost",function(t){t&&t.preventDefault()}),i.addEventListener("webglcontextrestored",function(t){for(var e=0,i=n.restorables.length;e<i;e++)n.restorables[e].restore()})):(this.gl=t,this.canvas=this.gl.canvas)}t.ManagedWebGLRenderingContext=e;var n=(r.getDestGLBlendMode=function(t){switch(t){case ve.BlendMode.Normal:return r.ONE_MINUS_SRC_ALPHA;case ve.BlendMode.Additive:return r.ONE;case ve.BlendMode.Multiply:case ve.BlendMode.Screen:return r.ONE_MINUS_SRC_ALPHA;default:throw new Error("Unknown blend mode: "+t)}},r.getSourceGLBlendMode=function(t,e){switch(void 0===e&&(e=!1),t){case ve.BlendMode.Normal:case ve.BlendMode.Additive:return e?r.ONE:r.SRC_ALPHA;case ve.BlendMode.Multiply:return r.DST_COLOR;case ve.BlendMode.Screen:return r.ONE;default:throw new Error("Unknown blend mode: "+t)}},r.ZERO=0,r.ONE=1,r.SRC_COLOR=768,r.ONE_MINUS_SRC_COLOR=769,r.SRC_ALPHA=770,r.ONE_MINUS_SRC_ALPHA=771,r.DST_ALPHA=772,r.ONE_MINUS_DST_ALPHA=773,r.DST_COLOR=774,r);function r(){}t.WebGLBlendModeConverter=n}((ve=ge=ge||{}).webgl||(ve.webgl={})),si.exports=ge}).call(window)},function(t,e,i){var n=i(0),M=i(9),x=i(201),d=i(6),p=i(215),g=i(216),v=i(217),r=new n({Extends:g,initialize:function(t,e,i,n,r,s,o){var a,h,l,u=[],c=t.cacheManager.custom.spine;if(d(e)){var f=e;for(e=M(f,"key"),h=new p(t,{key:e,url:M(f,"jsonURL"),extension:M(f,"jsonExtension","json"),xhrSettings:M(f,"jsonXhrSettings")}),n=M(f,"atlasURL"),r=M(f,"preMultipliedAlpha"),Array.isArray(n)||(n=[n]),a=0;a<n.length;a++)(l=new v(t,{key:e+"!"+a,url:n[a],extension:M(f,"atlasExtension","atlas"),xhrSettings:M(f,"atlasXhrSettings")})).cache=c,u.push(l)}else for(h=new p(t,e,i,s),Array.isArray(n)||(n=[n]),a=0;a<n.length;a++)(l=new v(t,e+"!"+a,n[a],o)).cache=c,u.push(l);u.unshift(h),g.call(this,t,"spine",e,u),this.config.preMultipliedAlpha=r},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"text"===t.type)){for(var e=t.data.split("\n"),i=[],n=0;n<e.length;n++){var r=e[n];""===r.trim()&&n<e.length-1&&(r=e[n+1],i.push(r))}var s=this.config,o=this.loader,a=o.baseURL,h=o.path,l=o.prefix,u=M(s,"baseURL",this.baseURL),c=M(s,"path",t.src.match(/^.*\//))[0],f=M(s,"prefix",this.prefix),d=M(s,"textureXhrSettings");o.setBaseURL(u),o.setPath(c),o.setPrefix(f);for(var p=0;p<i.length;p++){var g=i[p],v=this.prefix+g,m=new x(o,v,g,d);o.keyExists(m)||(this.addToMultiFile(m),o.addFile(m))}o.setBaseURL(a),o.setPath(h),o.setPrefix(l)}},addToCache:function(){if(this.isReadyToProcess()){var t;this.files[0].addToCache();for(var e="",i="",n=!!this.config.preMultipliedAlpha,r=this.loader.textureManager,s=1;s<this.files.length;s++){var o,a,h,l=this.files[s];"text"===l.type?(e=l.key.replace(/![\d]$/,""),t=l.cache,i=i.concat(l.data)):(a=(o=l.key.trim()).indexOf("!"),h=o.substr(a+1),r.exists(h)||r.addImage(h,l.data)),l.pendingDestroy()}t.add(e,{preMultipliedAlpha:n,data:i,prefix:this.prefix}),this.complete=!0}}});t.exports=r},function(t,e,i){var n=i(0),r=i(14),c=i(21),s=i(22),f=i(9),d=i(6),o=new n({Extends:c,initialize:function t(e,i,n,r,s){var o,a,h="png";d(i)&&(i=f(a=i,"key"),n=f(a,"url"),o=f(a,"normalMap"),r=f(a,"xhrSettings"),h=f(a,"extension",h),s=f(a,"frameConfig")),Array.isArray(n)&&(o=n[1],n=n[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:i,url:n,xhrSettings:r,config:s};c.call(this,e,u),o&&((l=new t(e,this.key,o,r,s)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e,i){t.exports={ADD:i(203),COMPLETE:i(204),FILE_COMPLETE:i(205),FILE_KEY_COMPLETE:i(206),FILE_LOAD_ERROR:i(207),FILE_LOAD:i(208),FILE_PROGRESS:i(209),POST_PROCESS:i(210),PROGRESS:i(211),START:i(212)}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,i){var s=i(44);t.exports=function(t,e){var i=s(e,t.xhrSettings),n=new XMLHttpRequest;if(n.open("GET",t.src,i.async,i.user,i.password),n.responseType=t.xhrSettings.responseType,n.timeout=i.timeout,i.headers)for(var r in i.headers)n.setRequestHeader(r,i.headers[r]);return i.header&&i.headerValue&&n.setRequestHeader(i.header,i.headerValue),i.requestedWith&&n.setRequestHeader("X-Requested-With",i.requestedWith),i.overrideMimeType&&n.overrideMimeType(i.overrideMimeType),i.withCredentials&&(n.withCredentials=!0),n.onload=t.onLoad.bind(t,n),n.onerror=t.onError.bind(t,n),n.onprogress=t.onProgress.bind(t),n.send(),n}},function(t,e,i){var n=i(0),h=i(14),l=i(21),r=i(22),u=i(9),c=i(8),f=i(6),s=new n({Extends:l,initialize:function(t,e,i,n,r){var s,o="json";f(e)&&(e=u(s=e,"key"),i=u(s,"url"),n=u(s,"xhrSettings"),o=u(s,"extension",o),r=u(s,"dataKey",r));var a={type:"json",cache:t.cacheManager.json,extension:o,responseType:"text",key:e,url:i,xhrSettings:n,config:r};l.call(this,t,a),f(i)&&(this.data=r?c(i,r):i,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});r.register("json",function(t,e,i,n){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,n,i));return this}),t.exports=s},function(t,e,i){var n=new(i(0))({initialize:function(t,e,i,n){var r=[];n.forEach(function(t){t&&r.push(t)}),this.loader=t,this.type=e,this.key=i,this.multiKeyIndex=t.multiKeyIndex++,this.files=r,this.complete=!1,this.pending=r.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var s=0;s<r.length;s++)r[s].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=this).pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=n},function(t,e,i){var n=i(0),r=i(14),l=i(21),s=i(22),u=i(9),c=i(6),o=new n({Extends:l,initialize:function(t,e,i,n){var r,s="text",o="txt",a=t.cacheManager.text;c(e)&&(e=u(r=e,"key"),i=u(r,"url"),n=u(r,"xhrSettings"),o=u(r,"extension",o),s=u(r,"type",s),a=u(r,"cache",a));var h={type:s,cache:a,extension:o,responseType:"text",key:e,url:i,xhrSettings:n};l.call(this,t,h)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,i){if(Array.isArray(t))for(var n=0;n<t.length;n++)this.addFile(new o(this,t[n]));else this.addFile(new o(this,t,e,i));return this}),t.exports=o},function(t,e,i){var h=i(28),l=i(4),n=i(0),r=i(46),s=i(47),o=i(48),a=i(49),u=i(50),c=i(51),f=i(11),d=i(19),p=i(52),g=i(13),v=i(240),m=i(247),M=new n({Extends:p,Mixins:[r,s,o,a,u,c,m],initialize:function(t,e,i,n,r,s,o){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(i,n),r&&this.setSkeleton(r,s,o)},willRender:function(t){var e=this.skeleton;if(!e)return!1;var i=e.color.a;return!(15!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id||0===i)},setAlpha:function(t,e){var i;return void 0===t&&(t=1),e?(i=this.findSlot(e))&&(i.color.a=l(t,0,1)):this.alpha=t,this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var i,n=(t>>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215<t?(t>>>24)/255:null,a=this.skeleton;return!e||(i=this.findSlot(e))&&(a=i),a.color.r=n,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),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.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,i),this.root=this.getRootBone(),this.root&&(this.root.rotation=g(f(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(v.COMPLETE,t)},onDispose:function(t){this.emit(v.DISPOSE,t)},onEnd:function(t){this.emit(v.END,t)},onEvent:function(t,e){this.emit(v.EVENT,t,e)},onInterrupted:function(t){this.emit(v.INTERRUPTED,t)},onStart:function(t){this.emit(v.START,t)},refresh:function(){return this.root&&(this.root.rotation=g(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,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;i<e.bones.length;i++)t.push(e.bones[i].name);return t},getSkinList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.skins.length;i++)t.push(e.skins[i].name);return t},getSlotList:function(){for(var t=[],e=this.skeleton,i=0;i<e.slots.length;i++)t.push(e.slots[i].data.name);return t},getAnimationList:function(){var t=[],e=this.skeletonData;if(e)for(var i=0;i<e.animations.length;i++)t.push(e.animations[i].name);return t},getCurrentAnimation:function(t){void 0===t&&(t=0);var e=this.state.getCurrent(t);if(e)return e.animation},play:function(t,e,i){return this.setAnimation(0,t,e,i),this},setAnimation:function(t,e,i,n){if(void 0===i&&(i=!1),void 0===n&&(n=!1),n&&this.state){var r=this.state.getCurrent(t);if(r&&r.animation.name===e&&!r.isComplete())return}if(this.findAnimation(e))return this.state.setAnimation(t,e,i)},addAnimation:function(t,e,i,n){return void 0===i&&(i=!1),void 0===n&&(n=0),this.state.addAnimation(t,e,i,n)},setEmptyAnimation:function(t,e){return this.state.setEmptyAnimation(t,e)},clearTrack:function(t){return this.state.clearTrack(t),this},clearTracks:function(){return this.state.clearTracks(),this},setSkinByName:function(t){var e=this.skeleton;return e.setSkinByName(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setSkin:function(t){var e=this.skeleton;return e.setSkin(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setMix:function(t,e,i){return this.stateData.setMix(t,e,i),this},getAttachment:function(t,e){return this.skeleton.getAttachment(t,e)},getAttachmentByName:function(t,e){return this.skeleton.getAttachmentByName(t,e)},setAttachment:function(t,e){if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length)for(var i=0;i<t.length;i++)this.skeleton.setAttachment(t[i],e[i]);else this.skeleton.setAttachment(t,e);return this},setToSetupPose:function(){return this.skeleton.setToSetupPose(),this},setSlotsToSetupPose:function(){return this.skeleton.setSlotsToSetupPose(),this},setBonesToSetupPose:function(){return this.skeleton.setBonesToSetupPose(),this},getRootBone:function(){return this.skeleton.getRootBone()},angleBoneToXY:function(t,e,i,n,r,s){void 0===n&&(n=0),void 0===r&&(r=0),void 0===s&&(s=360);var o=this.plugin.renderer.height,a=f(h(t.worldX,o-t.worldY,e,i)+d(n));return t.rotation=l(g(a),r,s),this},findBone:function(t){return this.skeleton.findBone(t)},findBoneIndex:function(t){return this.skeleton.findBoneIndex(t)},findSlot:function(t){return this.skeleton.findSlot(t)},findSlotIndex:function(t){return this.skeleton.findSlotIndex(t)},findSkin:function(t){return this.skeletonData.findSkin(t)},findEvent:function(t){return this.skeletonData.findEvent(t)},findAnimation:function(t){return this.skeletonData.findAnimation(t)},findIkConstraint:function(t){return this.skeletonData.findIkConstraint(t)},findTransformConstraint:function(t){return this.skeletonData.findTransformConstraint(t)},findPathConstraint:function(t){return this.skeletonData.findPathConstraint(t)},findPathConstraintIndex:function(t){return this.skeletonData.findPathConstraintIndex(t)},getBounds:function(){return this.plugin.getBounds(this.skeleton)},preUpdate:function(t,e){var i=this.skeleton;this.state.update(e/1e3*this.timeScale),this.state.apply(i)},preDestroy:function(){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.plugin=null,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null}});t.exports=M},function(t,e,i){var n=i(0),a=i(220),r=new n({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once(a.DESTROY,this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var i=[],n=0;n<t.length;n++)i.push(e[t[n]]);return i}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var i in this.list)this.list.hasOwnProperty(i)&&i.match(t)&&(e[i]=this.list[i]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var i in t)this.setValue(i,t[i]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var i=this.get(t);return void 0===i&&(i=0),this.set(t,i+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(i,t){return this._frozen||(this.has(i)?this.values[i]=t:(r=(n=this).list,s=this.events,o=this.parent,Object.defineProperty(this.values,i,{enumerable:!0,configurable:!0,get:function(){return r[i]},set:function(t){var e;n._frozen||(e=r[i],r[i]=t,s.emit(a.CHANGE_DATA,o,i,t,e),s.emit(a.CHANGE_DATA_KEY+i,o,t,e))}}),r[i]=t,s.emit(a.SET_DATA,o,i,t))),this;var n,r,s,o},each:function(t,e){for(var i=[this.parent,null,void 0],n=1;n<arguments.length;n++)i.push(arguments[n]);for(var r in this.list)i[1]=r,i[2]=this.list[r],t.apply(e,i);return this},merge:function(t,e){for(var i in void 0===e&&(e=!0),t)t.hasOwnProperty(i)&&(e||!e&&!this.has(i))&&this.setValue(i,t[i]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(a.REMOVE_DATA,this.parent,t,e)),this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(a.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(a.CHANGE_DATA),this.events.off(a.SET_DATA),this.events.off(a.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=r},function(t,e,i){t.exports={CHANGE_DATA:i(221),CHANGE_DATA_KEY:i(222),DESTROY:i(223),REMOVE_DATA:i(224),SET_DATA:i(225)}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e,i){"use strict";var n=Object.prototype.hasOwnProperty,d="~";function r(){}function a(t,e,i){this.fn=t,this.context=e,this.once=i||!1}function s(t,e,i,n,r){if("function"!=typeof i)throw new TypeError("The listener must be a function");var s=new a(i,n||t,r),o=d?d+e:e;return t._events[o]?t._events[o].fn?t._events[o]=[t._events[o],s]:t._events[o].push(s):(t._events[o]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(d=!1)),o.prototype.eventNames=function(){var t,e,i=[];if(0===this._eventsCount)return i;for(e in t=this._events)n.call(t,e)&&i.push(d?e.slice(1):e);return Object.getOwnPropertySymbols?i.concat(Object.getOwnPropertySymbols(t)):i},o.prototype.listeners=function(t){var e=d?d+t:t,i=this._events[e];if(!i)return[];if(i.fn)return[i.fn];for(var n=0,r=i.length,s=new Array(r);n<r;n++)s[n]=i[n].fn;return s},o.prototype.listenerCount=function(t){var e=d?d+t:t,i=this._events[e];return i?i.fn?1:i.length:0},o.prototype.emit=function(t,e,i,n,r,s){var o=d?d+t:t;if(!this._events[o])return!1;var a,h=this._events[o],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,i),!0;case 4:return h.fn.call(h.context,e,i,n),!0;case 5:return h.fn.call(h.context,e,i,n,r),!0;case 6:return h.fn.call(h.context,e,i,n,r,s),!0}for(f=1,a=new Array(l-1);f<l;f++)a[f-1]=arguments[f];h.fn.apply(h.context,a)}else for(var u,c=h.length,f=0;f<c;f++)switch(h[f].once&&this.removeListener(t,h[f].fn,void 0,!0),l){case 1:h[f].fn.call(h[f].context);break;case 2:h[f].fn.call(h[f].context,e);break;case 3:h[f].fn.call(h[f].context,e,i);break;case 4:h[f].fn.call(h[f].context,e,i,n);break;default:if(!a)for(u=1,a=new Array(l-1);u<l;u++)a[u-1]=arguments[u];h[f].fn.apply(h[f].context,a)}return!0},o.prototype.on=function(t,e,i){return s(this,t,e,i,!1)},o.prototype.once=function(t,e,i){return s(this,t,e,i,!0)},o.prototype.removeListener=function(t,e,i,n){var r=d?d+t:t;if(!this._events[r])return this;if(!e)return l(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||n&&!s.once||i&&s.context!==i||l(this,r);else{for(var o=0,a=[],h=s.length;o<h;o++)(s[o].fn!==e||n&&!s[o].once||i&&s[o].context!==i)&&a.push(s[o]);a.length?this._events[r]=1===a.length?a[0]:a:l(this,r)}return this},o.prototype.removeAllListeners=function(t){var e;return t?(e=d?d+t:t,this._events[e]&&l(this,e)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=d,o.EventEmitter=o,t.exports=o},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,i){t.exports={COMPLETE:i(241),DISPOSE:i(242),END:i(243),EVENT:i(244),INTERRUPTED:i(245),START:i(246)}},function(t,e){t.exports="complete"},function(t,e){t.exports="dispose"},function(t,e){t.exports="end"},function(t,e){t.exports="event"},function(t,e){t.exports="interrupted"},function(t,e){t.exports="start"},function(t,e,i){var n=i(1),r=i(1),n=i(248),r=i(250);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e,i){var g=i(4),v=i(11),m=i(249),M=i(13),x=i(7);t.exports=function(t,e,i,n,r){var s=e.plugin,o=e.skeleton,a=s.sceneRenderer;t.newType&&(t.pipelines.clear(),a.begin());var h=e.scrollFactorX,l=e.scrollFactorY,u=o.color.a;r&&(e.scrollFactorX=r.scrollFactorX,e.scrollFactorY=r.scrollFactorY,o.color.a=g(u*r.alpha,0,1));var c,f,d=m(e,i,n).calc,p=t.height;o.x=d.tx,o.y=p-d.ty,o.scaleX=d.scaleX,o.scaleY=d.scaleY,e.scaleX<0?(o.scaleX*=-1,e.root.rotation=x(M(d.rotationNormalized)-180,0,360)):e.root.rotation=x(M(v(d.rotationNormalized))+90,0,360),e.scaleY<0&&(o.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*M(d.rotationNormalized):e.root.rotation+=2*M(d.rotationNormalized)),!i.renderToTexture&&null===t.currentFramebuffer||(o.y=d.ty,o.scaleY*=-1),o.updateWorldTransform(),a.drawSkeleton(o,e.preMultipliedAlpha),r&&(e.scrollFactorX=h,e.scrollFactorY=l,o.color.a=u),(s.drawDebug||e.drawDebug)&&(c=o.x,f=o.y,o.x=0,o.y=0,a.drawSkeletonDebug(o,e.preMultipliedAlpha),o.x=c,o.y=f),t.nextTypeMatch||(a.end(),t.pipelines.rebind())}},function(t,e,i){var n=i(23),o=new n,a=new n,h=new n,l={camera:o,sprite:a,calc:h};t.exports=function(t,e,i){var n=o,r=a,s=h;return r.applyITRS(t.x,t.y,t.rotation,t.scaleX,t.scaleY),n.copyFrom(e.matrix),i?(n.multiplyWithOffset(i,-e.scrollX*t.scrollFactorX,-e.scrollY*t.scrollFactorY),r.e=t.x,r.f=t.y):(r.e-=e.scrollX*t.scrollFactorX,r.f-=e.scrollY*t.scrollFactorY),n.multiply(r,s),l}},function(t,e,i){var c=i(11),f=i(13),d=i(7);t.exports=function(t,e,i,n){var r=t.currentContext,s=e.plugin,o=e.skeleton,a=s.skeletonRenderer,h=t._tempMatrix1,l=t._tempMatrix2,u=t._tempMatrix3;l.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),h.copyFrom(i.matrix),n?(h.multiplyWithOffset(n,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),l.e=e.x,l.f=e.y):(l.e-=i.scrollX*e.scrollFactorX,l.f-=i.scrollY*e.scrollFactorY),h.multiply(l,u),o.x=u.tx,o.y=u.ty,o.scaleX=u.scaleX,o.scaleY=-1*u.scaleY,e.scaleX<0?(o.scaleX*=-1,e.root.rotation=f(u.rotationNormalized)):e.root.rotation=d(f(c(u.rotationNormalized))+90,0,360),e.scaleY<0&&(o.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*f(u.rotationNormalized):e.root.rotation+=2*f(u.rotationNormalized)),i.renderToTexture&&(o.y=u.ty,o.scaleY*=-1),o.updateWorldTransform(),a.ctx=r,a.debugRendering=s.drawDebug||e.drawDebug,r.save(),a.draw(o),r.restore()}},function(t,e,i){var n=i(0),s=i(252),r=i(338),o=new n({Extends:s,Mixins:[r],initialize:function(t,e,i,n,r){s.call(this,t,i,n,r),this.type="Spine",this.plugin=e},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null,this.plugin=null}});t.exports=o},function(t,e,i){var s=i(253),r=i(17),n=i(0),o=i(290),a=i(54),h=i(52),l=i(25),u=i(334),c=i(337),f=i(2),d=new n({Extends:h,Mixins:[o.AlphaSingle,o.BlendMode,o.ComputedSize,o.Depth,o.Mask,o.Transform,o.Visible,u],initialize:function(t,e,i,n){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new o.TransformMatrix,this.tempTransformMatrix=new o.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,i),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),n&&this.add(n)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){var e;if(void 0===t&&(t=new l),t.setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var i=this.list,n=new l,r=!1;t.setEmpty();for(var s=0;s<i.length;s++){var o=i[s];o.getBounds&&(o.getBounds(n),r?c(n,t,t):(t.setTo(n.x,n.y,n.width,n.height),r=!0))}}return t},addHandler:function(t){t.once(a.DESTROY,this.remove,this),this.exclusive&&(this._displayList.remove(t),t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this),this.scene.sys.displayList.exists(t)||t.emit(a.ADDED_TO_SCENE,t,this.scene)},removeHandler:function(t){t.off(a.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null),this.scene.sys.displayList.exists(t)||t.emit(a.REMOVED_FROM_SCENE,t,this.scene)},pointToContainer:function(t,e){void 0===e&&(e=new f),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new f(t.x,t.y);var i=this.tempTransformMatrix;return i.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),i.invert(),i.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(i,t){return i&&(void 0===t&&(t=function(t,e){return t[i]-e[i]}),s.StableSort(this.list,t)),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,i,n){return s.GetFirst(this.list,t,e,i,n)},getAll:function(t,e,i,n){return s.GetAll(this.list,t,e,i,n)},count:function(t,e,i,n){return s.CountAllMatching(this.list,t,e,i,n)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},remove:function(t,e){var i=s.Remove(this.list,t,this.removeHandler,this);if(e&&i){Array.isArray(i)||(i=[i]);for(var n=0;n<i.length;n++)i[n].destroy()}return this},removeAt:function(t,e){var i=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&i&&i.destroy(),this},removeBetween:function(t,e,i){var n=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(i)for(var r=0;r<n.length;r++)n[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var i=0;i<e.length;i++)e[i].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,i){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),i&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,i,n){return s.SetAll(this.list,t,e,i,n),this},each:function(t,e){for(var i=[null],n=this.list.slice(),r=n.length,s=2;s<arguments.length;s++)i.push(arguments[s]);for(s=0;s<r;s++)i[0]=n[s],t.apply(e,i);return this},iterate:function(t,e){for(var i=[null],n=2;n<arguments.length;n++)i.push(arguments[n]);for(n=0;n<this.list.length;n++)i[0]=this.list[n],t.apply(e,i);return this},setScrollFactor:function(t,e,i){return void 0===e&&(e=t),void 0===i&&(i=!1),this.scrollFactorX=t,this.scrollFactorY=e,i&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=d},function(t,e,i){t.exports={Matrix:i(254),Add:i(263),AddAt:i(264),BringToTop:i(265),CountAllMatching:i(266),Each:i(267),EachInRange:i(268),FindClosestInSorted:i(269),GetAll:i(270),GetFirst:i(271),GetRandom:i(272),MoveDown:i(273),MoveTo:i(274),MoveUp:i(275),NumberArray:i(276),NumberArrayStep:i(277),QuickSelect:i(278),Range:i(279),Remove:i(280),RemoveAt:i(281),RemoveBetween:i(282),RemoveRandomElement:i(283),Replace:i(284),RotateLeft:i(56),RotateRight:i(57),SafeRange:i(5),SendToBack:i(285),SetAll:i(286),Shuffle:i(58),SortByDigits:i(287),SpliceOne:i(16),StableSort:i(288),Swap:i(289)}},function(t,e,i){t.exports={CheckMatrix:i(24),MatrixToString:i(255),ReverseColumns:i(257),ReverseRows:i(258),Rotate180:i(259),RotateLeft:i(260),RotateMatrix:i(15),RotateRight:i(261),Translate:i(262),TransposeMatrix:i(55)}},function(t,e,i){var o=i(256),a=i(24);t.exports=function(t){var e="";if(!a(t))return e;for(var i=0;i<t.length;i++){for(var n=0;n<t[i].length;n++){var r=t[i][n].toString();e+="undefined"!==r?o(r,2):"?",n<t[i].length-1&&(e+=" |")}if(i<t.length-1){e+="\n";for(var s=0;s<t[i].length;s++)e+="---",s<t[i].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t,e,i,n){void 0===e&&(e=0),void 0===i&&(i=" "),void 0===n&&(n=3);var r;if(e+1>=(t=t.toString()).length)switch(n){case 1:t=new Array(e+1-t.length).join(i)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(i)+t+new Array(s+1).join(i);break;default:t+=new Array(e+1-t.length).join(i)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,i){var n=i(15);t.exports=function(t){return n(t,180)}},function(t,e,i){var n=i(15);t.exports=function(t){return n(t,90)}},function(t,e,i){var n=i(15);t.exports=function(t){return n(t,-90)}},function(t,e,i){var s=i(56),o=i(57);t.exports=function(t,e,i){if(void 0===e&&(e=0),void 0===i&&(i=0),0!==i&&(i<0?s(t,Math.abs(i)):o(t,i)),0!==e)for(var n=0;n<t.length;n++){var r=t[n];e<0?s(r,Math.abs(e)):o(r,e)}return t}},function(t,e){t.exports=function(t,e,i,n,r){if(void 0===r&&(r=t),0<i){var s=i-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),n&&n.call(r,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.splice(o,1),o--;if(0===(o=e.length))return null;0<i&&s<o&&(e.splice(s),o=s);for(var a=0;a<o;a++){var h=e[a];t.push(h),n&&n.call(r,h)}return e}},function(t,e){t.exports=function(t,e,i,n,r,s){if(void 0===i&&(i=0),void 0===s&&(s=t),0<n){var o=n-t.length;if(o<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(i,0,e),r&&r.call(s,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.pop(),a--;if(0===(a=e.length))return null;0<n&&o<a&&(e.splice(o),a=o);for(var h=a-1;0<=h;h--){var l=e[h];t.splice(i,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&i<t.length&&(t.splice(i,1),t.push(e)),e}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var s=0;if(a(t,n,r))for(var o=n;o<r;o++){t[o][e]===i&&s++}return s}},function(t,e){t.exports=function(t,e,i){for(var n=[null],r=3;r<arguments.length;r++)n.push(arguments[r]);for(r=0;r<t.length;r++)n[0]=t[r],e.apply(i,n);return t}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),a(t,n,r)){for(var s=[null],o=5;o<arguments.length;o++)s.push(arguments[o]);for(o=n;o<r;o++)s[0]=t[o],e.apply(i,s)}return t}},function(t,e){t.exports=function(t,e,i){if(!e.length)return NaN;if(1===e.length)return e[0];var n,r,s=1;if(i){if(t<e[0][i])return e[0];for(;e[s][i]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),i?(n=e[s-1][i],(r=e[s][i])-t<=t-n?e[s]:e[s-1]):(n=e[s-1],(r=e[s])-t<=t-n?r:n)}},function(t,e,i){var h=i(5);t.exports=function(t,e,i,n,r){void 0===n&&(n=0),void 0===r&&(r=t.length);var s=[];if(h(t,n,r))for(var o=n;o<r;o++){var a=t[o];(!e||e&&void 0===i&&a.hasOwnProperty(e)||e&&void 0!==i&&a[e]===i)&&s.push(a)}return s}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),a(t,n,r))for(var s=n;s<r;s++){var o=t[s];if(!e||e&&void 0===i&&o.hasOwnProperty(e)||e&&void 0!==i&&o[e]===i)return o}return null}},function(t,e){t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return void 0===t[n]?null:t[n]}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return 0<r&&(i=t[r-1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e);if(-1===n||i<0||i>=t.length)throw new Error("Supplied index out of bounds");return n!==i&&(t.splice(n,1),t.splice(i,0,e)),e}},function(t,e){t.exports=function(t,e){var i,n,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(i=t[r+1],n=t.indexOf(i),t[r]=i,t[n]=e),t}},function(t,e){t.exports=function(t,e,i,n){var r,s=[],o=!1;if((i||n)&&(o=!0,i=i||"",n=n||""),e<t)for(r=t;e<=r;r--)o?s.push(i+r.toString()+n):s.push(r);else for(r=t;r<=e;r++)o?s.push(i+r.toString()+n):s.push(r);return s}},function(t,e,i){var o=i(40);t.exports=function(t,e,i){void 0===t&&(t=0),void 0===e&&(e=null),void 0===i&&(i=1),null===e&&(e=t,t=0);for(var n=[],r=Math.max(o((e-t)/(i||1)),0),s=0;s<r;s++)n.push(t),t+=i;return n}},function(t,e){function g(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function v(t,e){return t<e?-1:e<t?1:0}var m=function(t,e,i,n,r){for(void 0===i&&(i=0),void 0===n&&(n=t.length-1),void 0===r&&(r=v);i<n;){var s,o,a,h,l,u,c;600<n-i&&(s=n-i+1,o=e-i+1,a=Math.log(s),h=.5*Math.exp(2*a/3),l=.5*Math.sqrt(a*h*(s-h)/s)*(o-s/2<0?-1:1),u=Math.max(i,Math.floor(e-o*h/s+l)),c=Math.min(n,Math.floor(e+(s-o)*h/s+l)),m(t,e,u,c,r));var f=t[e],d=i,p=n;for(g(t,i,e),0<r(t[n],f)&&g(t,i,n);d<p;){for(g(t,d,p),d++,p--;r(t[d],f)<0;)d++;for(;0<r(t[p],f);)p--}0===r(t[i],f)?g(t,i,p):g(t,++p,n),p<=e&&(i=p+1),e<=p&&(n=p-1)}};t.exports=m},function(t,e,i){var d=i(8),p=i(58);t.exports=function(t,e,i){var n,r=d(i,"max",0),s=d(i,"qty",1),o=d(i,"random",!1),a=d(i,"randomB",!1),h=d(i,"repeat",0),l=d(i,"yoyo",!1),u=[];a&&p(e),-1===h&&(h=0===r?0:(n=t.length*e.length*s,l&&(n*=2),Math.ceil(r/n)));for(var c=0;c<=h;c++){var f=function(t,e,i){for(var n=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var o=0;o<i;o++)n.push({a:t[r],b:e[s]});return n}(t,e,s);o&&p(f),u=u.concat(f),l&&(f.reverse(),u=u.concat(f))}return r&&u.splice(r),u}},function(t,e,i){var a=i(16);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(a(t,s),i&&i.call(n,e),e):null;for(var r=e.length-1;0<=r;){var s,o=e[r];-1!==(s=t.indexOf(o))?(a(t,s),i&&i.call(n,o)):e.pop(),r--}return e}},function(t,e,i){var s=i(16);t.exports=function(t,e,i,n){if(void 0===n&&(n=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return i&&i.call(n,r),r}},function(t,e,i){var l=i(5);t.exports=function(t,e,i,n,r){if(void 0===e&&(e=0),void 0===i&&(i=t.length),void 0===r&&(r=t),l(t,e,i)){var s=i-e,o=t.splice(e,s);if(n)for(var a=0;a<o.length;a++){var h=o[a];n.call(r,h)}return o}return[]}},function(t,e,i){var r=i(16);t.exports=function(t,e,i){void 0===e&&(e=0),void 0===i&&(i=t.length);var n=e+Math.floor(Math.random()*i);return r(t,n)}},function(t,e){t.exports=function(t,e,i){var n=t.indexOf(e),r=t.indexOf(i);return-1!==n&&-1===r&&(t[n]=i,!0)}},function(t,e){t.exports=function(t,e){var i=t.indexOf(e);return-1!==i&&0<i&&(t.splice(i,1),t.unshift(e)),e}},function(t,e,i){var a=i(5);t.exports=function(t,e,i,n,r){if(void 0===n&&(n=0),void 0===r&&(r=t.length),a(t,n,r))for(var s=n;s<r;s++){var o=t[s];o.hasOwnProperty(e)&&(o[e]=i)}return t}},function(t,e){t.exports=function(t){var i=/\D/g;return t.sort(function(t,e){return parseInt(t.replace(i,""),10)-parseInt(e.replace(i,""),10)}),t}},function(t,e){function n(t,e){return String(t).localeCompare(e)}function o(t,e,i,n){for(var r,s,o,a,h=t.length,l=0,u=2*i,c=0;c<h;c+=u)for(s=(r=c+i)+i,h<r&&(r=h),h<s&&(s=h),o=c,a=r;;)if(o<r&&a<s)e(t[o],t[a])<=0?n[l++]=t[o++]:n[l++]=t[a++];else if(o<r)n[l++]=t[o++];else{if(!(a<s))break;n[l++]=t[a++]}}t.exports=function(t,e){void 0===e&&(e=n);var i=function(t,e){var i=t.length;if(i<=1)return t;for(var n=new Array(i),r=1;r<i;r*=2){o(t,e,r,n);var s=t;t=n,n=s}return t}(t,e);return i!==t&&o(i,null,t.length,t),t}},function(t,e){t.exports=function(t,e,i){if(e!==i){var n=t.indexOf(e),r=t.indexOf(i);if(n<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[n]=i,t[r]=e,t}}},function(t,e,i){t.exports={Alpha:i(291),AlphaSingle:i(292),BlendMode:i(293),ComputedSize:i(46),Crop:i(294),Depth:i(47),Flip:i(48),GetBounds:i(295),Mask:i(304),Origin:i(324),PathFollower:i(325),Pipeline:i(328),ScrollFactor:i(49),Size:i(330),Texture:i(331),TextureCrop:i(332),Tint:i(333),ToJSON:i(53),Transform:i(50),TransformMatrix:i(23),Visible:i(51)}},function(t,e,i){var r=i(4),n={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,i,n){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(i,0,1),this._alphaBR=r(n,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=r(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,0===(this._alphaBR=e)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=r(t,0,1);0!==(this._alphaTL=e)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=r(t,0,1);0!==(this._alphaTR=e)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=r(t,0,1);0!==(this._alphaBL=e)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=r(t,0,1);0!==(this._alphaBR=e)&&(this.renderFlags|=2)}}};t.exports=n},function(t,e,i){var n=i(4),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=n(t,0,1);0===(this._alpha=e)?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,i){var n=i(17),r={_blendMode:n.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=n[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e,i){var u=i(25),n=i(39),r=i(2),s={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&n(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,i,n,r,s,o,a,h,l;return void 0===t&&(t=new u),h=(a=(this.parentContainer?(l=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,i=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),n=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),s=t.x,o=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,i=t.y,this.getTopRight(t),n=t.x,r=t.y,this.getBottomLeft(t),s=t.x,o=t.y,this.getBottomRight(t)),t.x),t.y),t.x=Math.min(e,n,s,a),t.y=Math.min(i,r,o,h),t.width=Math.max(e,n,s,a)-t.x,t.height=Math.max(i,r,o,h)-t.y,t}};t.exports=s},function(t,e){t.exports=function(t,e,i){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=i&&t.y+t.height>=i)}},function(t,e,i){var o=i(59),a=i(60);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=a(t)/i);for(var r=0;r<e;r++){var s=r/e;n.push(o(t,s))}return n}},function(t,e,i){var n=i(0),r=i(299),s=i(300),o=i(26),a=i(302),h=i(2),l=new n({initialize:function(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.type=o.LINE,this.x1=t,this.y1=e,this.x2=i,this.y2=n},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,i){return s(this,t,e,i)},getRandomPoint:function(t){return a(this,t)},setTo:function(t,e,i,n){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===i&&(i=0),void 0===n&&(n=0),this.x1=t,this.y1=e,this.x2=i,this.y2=n,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,i){var n=i(10);t.exports=function(t,e,i){return void 0===i&&(i=new n),i.x=t.x1+(t.x2-t.x1)*e,i.y=t.y1+(t.y2-t.y1)*e,i}},function(t,e,i){var f=i(301),d=i(10);t.exports=function(t,e,i,n){void 0===n&&(n=[]),!e&&0<i&&(e=f(t)/i);for(var r=t.x1,s=t.y1,o=t.x2,a=t.y2,h=0;h<e;h++){var l=h/e,u=r+(o-r)*l,c=s+(a-s)*l;n.push(new d(u,c))}return n}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,i){var n=i(10);t.exports=function(t,e){void 0===e&&(e=new n);var i=Math.random();return e.x=t.x1+i*(t.x2-t.x1),e.y=t.y1+i*(t.y2-t.y1),e}},function(t,e,i){var n=i(10);t.exports=function(t,e){return void 0===e&&(e=new n),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,i){var n=i(305),r=i(323),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new n(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,i){var n=i(0),r=i(306),s=new n({initialize:function(t,e){var i=t.sys.game.renderer;this.renderer=i,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,this.createMask(),t.sys.game.events.on(r.CONTEXT_RESTORED,this.createMask,this)},createMask:function(){var t,e,i,n,r,s,o=this.renderer;o.gl&&(this.mainTexture&&this.clearMask(),t=o.width,e=o.height,i=0==(t&t-1)&&0==(e&e-1),n=o.gl,r=i?n.REPEAT:n.CLAMP_TO_EDGE,s=n.LINEAR,this.mainTexture=o.createTexture2D(0,s,s,r,r,n.RGBA,null,t,e),this.maskTexture=o.createTexture2D(0,s,s,r,r,n.RGBA,null,t,e),this.mainFramebuffer=o.createFramebuffer(t,e,this.mainTexture,!0),this.maskFramebuffer=o.createFramebuffer(t,e,this.maskTexture,!0))},clearMask:function(){var t=this.renderer;t.gl&&this.mainTexture&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null)},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,i){t.pipelines.BITMAPMASK_PIPELINE.beginMask(this,e,i)},postRenderWebGL:function(t,e){t.pipelines.BITMAPMASK_PIPELINE.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.clearMask(),this.bitmapMask=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=s},function(t,e,i){t.exports={BLUR:i(307),BOOT:i(308),CONTEXT_LOST:i(309),CONTEXT_RESTORED:i(310),DESTROY:i(311),FOCUS:i(312),HIDDEN:i(313),PAUSE:i(314),POST_RENDER:i(315),POST_STEP:i(316),PRE_RENDER:i(317),PRE_STEP:i(318),READY:i(319),RESUME:i(320),STEP:i(321),VISIBLE:i(322)}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e,i){var n=new(i(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,i){var n=t.gl;t.flush(),0===t.maskStack.length&&(n.enable(n.STENCIL_TEST),n.clear(n.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:i}),this.applyStencil(t,i,!0),t.maskCount++},applyStencil:function(t,e,i){var n=t.gl,r=this.geometryMask,s=t.maskCount;n.colorMask(!1,!1,!1,!1),i?(n.stencilFunc(n.EQUAL,s,255),n.stencilOp(n.KEEP,n.KEEP,n.INCR)):(n.stencilFunc(n.EQUAL,s+1,255),n.stencilOp(n.KEEP,n.KEEP,n.DECR)),r.renderWebGL(t,r,e),t.flush(),n.colorMask(!0,!0,!0,!0),n.stencilOp(n.KEEP,n.KEEP,n.KEEP),i?this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s+1,255):n.stencilFunc(n.EQUAL,s+1,255):this.invertAlpha?n.stencilFunc(n.NOTEQUAL,s,255):n.stencilFunc(n.EQUAL,s,255)},postRenderWebGL:function(t){var e=t.gl;t.maskStack.pop(),t.maskCount--,t.flush();var i,n=t.currentMask;0===t.maskStack.length?(n.mask=null,e.disable(e.STENCIL_TEST)):((i=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,i.camera,!1),t.currentCameraMask.mask!==i.mask?(n.mask=i.mask,n.camera=i.camera):n.mask=null)},preRenderCanvas:function(t,e,i){var n=this.geometryMask;t.currentContext.save(),n.renderCanvas(t,n,i,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=n},function(t,e){var i={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=i},function(t,e,i){var h=i(19),o=i(326),a=i(8),l=i(327),u=i(2),n={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:l.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var i=this.pathTween;return i&&i.isPlaying()&&i.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var i=this.pathTween;i&&i.isPlaying()&&i.stop(),"number"==typeof t&&(t={duration:t}),t.from=a(t,"from",0),t.to=a(t,"to",1);var n=o(t,"positionOnPath",!1);this.rotateToPath=o(t,"rotateToPath",!1),this.pathRotationOffset=a(t,"rotationOffset",0);var r,s=a(t,"startAt",e);return s&&(t.onStart=function(t){var e=t.data[0];e.progress=s,e.elapsed=e.duration*s;var i=e.ease(e.progress);e.current=e.start+(e.end-e.start)*i,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new u(this.x,this.y)),this.pathVector||(this.pathVector=new u),this.pathDelta||(this.pathDelta=new u),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),n&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=l.PLAYING_FORWARD,this.rotateToPath&&(r=this.path.getPoint(.1),this.rotation=Math.atan2(r.y-this.y,r.x-this.x)+h(this.pathRotationOffset)),this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],i=this.pathDelta,n=this.pathVector;if(i.copy(n).negate(),e.state===l.COMPLETE)return this.path.getPoint(1,n),i.add(n),n.add(this.pathOffset),void this.setPosition(n.x,n.y);if(e.state!==l.PLAYING_FORWARD&&e.state!==l.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),n),i.add(n),n.add(this.pathOffset);var r=this.x,s=this.y;this.setPosition(n.x,n.y);var o=this.x-r,a=this.y-s;if(0==o&&0==a)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(a,o)+h(this.pathRotationOffset))}}};t.exports=n},function(t,e){t.exports=function(t,e,i){return t&&t.hasOwnProperty(e)?t[e]:i}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e,i){var n=i(329),r={defaultPipeline:null,pipeline:null,initPipeline:function(t){void 0===t&&(t=n.MULTI_PIPELINE);var e=this.scene.sys.game.renderer.pipelines;return!(!e||!e.has(t))&&(this.defaultPipeline=e.get(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer.pipelines;return e&&e.has(t)&&(this.pipeline=e.get(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=r},function(t,e){t.exports={BITMAPMASK_PIPELINE:"BitmapMaskPipeline",LIGHT_PIPELINE:"Light2D",SINGLE_PIPELINE:"SinglePipeline",MULTI_PIPELINE:"MultiPipeline",ROPE_PIPELINE:"RopePipeline"}},function(t,e){var i={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=i},function(t,e){var i={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,i,n){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,i,n,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,i){return void 0===e&&(e=!0),void 0===i&&(i=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&i&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=i},function(t,e){var i={tintTopLeft:16777215,tintTopRight:16777215,tintBottomLeft:16777215,tintBottomRight:16777215,tintFill:!1,clearTint:function(){return this.setTint(16777215),this},setTint:function(t,e,i,n){return void 0===t&&(t=16777215),void 0===e&&(n=i=e=t),this.tintTopLeft=t,this.tintTopRight=e,this.tintBottomLeft=i,this.tintBottomRight=n,this.tintFill=!1,this},setTintFill:function(t,e,i,n){return this.setTint(t,e,i,n),this.tintFill=!0,this},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){var t=16777215;return this.tintFill||this.tintTopLeft!==t||this.tintTopRight!==t||this.tintBottomLeft!==t||this.tintBottomRight!==t}}};t.exports=i},function(t,e,i){var n=i(1),r=i(1),n=i(335),r=i(336);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);for(var a=e.alpha,h=e.scrollFactorX,l=e.scrollFactorY,u=r,c=r.length,f=0;f<c;f++){var d,p,g,v,m,M,x,y,w=r[f];w.willRender(i)&&(v=void 0!==w.alphaTopLeft?(d=w.alphaTopLeft,p=w.alphaTopRight,g=w.alphaBottomLeft,w.alphaBottomRight):g=p=d=w.alpha,m=w.scrollFactorX,M=w.scrollFactorY,o||w.blendMode===t.currentBlendMode||t.setBlendMode(w.blendMode),(x=w.mask)&&x.preRenderWebGL(t,w,i),(y=w.type)!==t.currentType&&(t.newType=!0,t.currentType=y),t.nextTypeMatch=f<c-1&&u[f+1].type===t.currentType,w.setScrollFactor(m*h,M*l),w.setAlpha(d*a,p*a,g*a,v*a),w.renderWebGL(t,w,i,s),w.setAlpha(d,p,g,v),w.setScrollFactor(m,M),x&&x.postRenderWebGL(t,i),t.newType=!1)}}}},function(t,e){t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u<r.length;u++){var c,f,d,p=r[u];p.willRender(i)&&(c=p.alpha,f=p.scrollFactorX,d=p.scrollFactorY,o||p.blendMode===t.currentBlendMode||t.setBlendMode(p.blendMode),p.setScrollFactor(f*h,d*l),p.setAlpha(c*a),p.renderCanvas(t,p,i,s),p.setAlpha(c),p.setScrollFactor(f,d))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,i){var a=i(25);t.exports=function(t,e,i){void 0===i&&(i=new a);var n=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-n,o=Math.max(t.bottom,e.bottom)-r;return i.setTo(n,r,s,o)}},function(t,e,i){var n=i(1),r=i(1),n=i(339),r=i(340);t.exports={renderWebGL:n,renderCanvas:r}},function(t,e){t.exports=function(t,e,i,n){var r=e.plugin.sceneRenderer,s=e.list;if(0!==s.length){var o=e.localTransform;n?(o.loadIdentity(),o.multiply(n),o.translate(e.x,e.y),o.rotate(e.rotation),o.scale(e.scaleX,e.scaleY)):o.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY),t.newType&&(t.pipelines.clear(),r.begin());var a=t.nextTypeMatch;t.nextTypeMatch=!0,t.newType=!1;for(var h=0;h<s.length;h++){var l,u=s[h];u.willRender(i)&&((l=u.mask)&&(r.end(),t.pipelines.rebind(),l.preRenderWebGL(t,u,i),t.pipelines.clear(),r.begin()),u.renderWebGL(t,u,i,o,e),l&&(r.end(),t.pipelines.rebind(),l.postRenderWebGL(t,i),t.pipelines.clear(),r.begin()))}(t.nextTypeMatch=a)||(r.end(),t.pipelines.rebind())}else r.batcher.isDrawing&&t.finalType&&(r.end(),t.pipelines.rebind())}},function(t,e){t.exports=function(t,e,i,n){var r=e.list;if(0!==r.length){var s=e.localTransform;n?(s.loadIdentity(),s.multiply(n),s.translate(e.x,e.y),s.rotate(e.rotation),s.scale(e.scaleX,e.scaleY)):s.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var a=e._alpha,h=e.scrollFactorX,l=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var u=0;u<r.length;u++){var c,f,d,p=r[u];p.willRender(i)&&(c=p.alpha,f=p.scrollFactorX,d=p.scrollFactorY,o||p.blendMode===t.currentBlendMode||t.setBlendMode(p.blendMode),p.setScrollFactor(f*h,d*l),p.setAlpha(c*a),p.renderCanvas(t,p,i,s),p.setAlpha(c),p.setScrollFactor(f,d))}e.mask&&e.mask.postRenderCanvas(t)}}}]); |