mirror of
https://github.com/photonstorm/phaser
synced 2024-11-22 20:53:39 +00:00
1 line
No EOL
280 KiB
JavaScript
1 line
No EOL
280 KiB
JavaScript
window.SpinePlugin=function(n){var i={};function r(t){if(i[t])return i[t].exports;var e=i[t]={i:t,l:!1,exports:{}};return n[t].call(e.exports,e,e.exports,r),e.l=!0,e.exports}return r.m=n,r.c=i,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=35)}([function(t,e){function s(t,e,n,i){for(var r in e)if(e.hasOwnProperty(r)){var s=(l=e,u=r,f=d=void 0,f=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&f.value&&"object"==typeof f.value&&(f=f.value),!(!f||!((d=f).get&&"function"==typeof d.get||d.set&&"function"==typeof d.set))&&(void 0===f.enumerable&&(f.enumerable=!0),void 0===f.configurable&&(f.configurable=!0),f));if(!1!==s){if(o=(i||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,d,f}function o(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)s(t,e[n].prototype||e[n])}}function p(t){var e,n,i;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");i=t.initialize,delete t.initialize}else{i=t.Extends?(n=t.Extends,function(){n.apply(this,arguments)}):function(){}}t.Extends?(i.prototype=Object.create(t.Extends.prototype),i.prototype.constructor=i,e=t.Extends,delete t.Extends):i.prototype.constructor=i;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),o(i,r),s(i,t,!0,e),i}p.extend=s,p.mixin=o,p.ignoreFinals=!1,t.exports=p},function(t,e){var n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=n},function(t,e){t.exports=function(t){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,n){var i=n(0),r=n(20),s=new i({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,n=t*t+e*e;return 0<n&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this},transformMat3:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},transformMat4:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[4]*n+i[12],this.y=i[1]*e+i[5]*n+i[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e*this.x-n*this.y,n*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){t.exports=function(t,e,n){var i=typeof t;return t&&"number"!=i&&"string"!=i&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:n}},function(t,e){t.exports=function(t,e,n){var i=n-e;return e+((t-e)%i+i)%i}},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,n){var i=n(1);t.exports=function(t){return t>Math.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.RAD_TO_DEG}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n){this.x=0,this.y=0,this.z=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0)},up:function(){return this.x=0,this.y=1,this.z=0,this},clone:function(){return new i(this.x,this.y,this.z)},crossVectors:function(t,e){var n=t.x,i=t.y,r=t.z,s=e.x,o=e.y,a=e.z;return this.x=i*a-r*o,this.y=r*s-n*a,this.z=n*o-i*s,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t,this.z*=t):(this.x=0,this.y=0,this.z=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return Math.sqrt(e*e+n*n+i*i)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0;return e*e+n*n+i*i},length:function(){var t=this.x,e=this.y,n=this.z;return Math.sqrt(t*t+e*e+n*n)},lengthSq:function(){var t=this.x,e=this.y,n=this.z;return t*t+e*e+n*n},normalize:function(){var t=this.x,e=this.y,n=this.z,i=t*t+e*e+n*n;return 0<i&&(i=1/Math.sqrt(i),this.x=t*i,this.y=e*i,this.z=n*i),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z},cross:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z;return this.x=n*o-i*s,this.y=i*r-e*o,this.z=e*s-n*r,this},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=e*r[0]+n*r[3]+i*r[6],this.y=e*r[1]+n*r[4]+i*r[7],this.z=e*r[2]+n*r[5]+i*r[8],this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[4]*n+r[8]*i+r[12],this.y=r[1]*e+r[5]*n+r[9]*i+r[13],this.z=r[2]*e+r[6]*n+r[10]*i+r[14],this},transformCoordinates:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=e*r[0]+n*r[4]+i*r[8]+r[12],o=e*r[1]+n*r[5]+i*r[9]+r[13],a=e*r[2]+n*r[6]+i*r[10]+r[14],h=e*r[3]+n*r[7]+i*r[11]+r[15];return this.x=s/h,this.y=o/h,this.z=a/h,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*i-o*n,l=a*n+o*e-r*i,u=a*i+r*n-s*e,c=-r*e-s*n-o*i;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,n=this.y,i=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],d=r[7],f=r[8],p=r[9],v=r[10],g=r[11],M=r[12],m=r[13],x=r[14],y=1/(e*h+n*d+i*g+r[15]);return this.x=(e*s+n*l+i*f+M)*y,this.y=(e*o+n*u+i*p+m)*y,this.z=(e*a+n*c+i*v+x)*y,this},unproject:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,o=this.x-n,a=s-this.y-1-i,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}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),t.exports=i},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return n;for(var i=e.split("."),r=t,s=n,o=0;o<i.length;o++){if(!r.hasOwnProperty(i[o])){s=n;break}s=r[i[o]],r=r[i[o]]}return s}return n}},function(t,e,n){var i=n(0),r=n(6),s=n(178),o=n(4),a=n(189),h=n(32),l=n(190),u=n(33),c=new i({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 n=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+n),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=o(e,"url"),void 0===this.url?this.url=t.path+n+"."+o(e,"extension",""):"string"==typeof this.url&&0!==this.url.indexOf("blob:")&&0!==this.url.indexOf("data:")&&(this.url=t.path+this.url),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 n=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,i=!(e.target&&200!==e.target.status)||n;4===t.readyState&&400<=t.status&&t.status<=599&&(i=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,i)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,n=this.type;this.loader.emit(s.FILE_COMPLETE,e,n,t),this.loader.emit(s.FILE_KEY_COMPLETE+n+"-"+e,e,n,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,n){var i;"function"==typeof URL?t.src=URL.createObjectURL(e):((i=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||n)+";base64,"+i.result.split(",")[1]},i.onerror=t.onerror,i.readAsDataURL(e))},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var n={},i={install:function(t){for(var e in n)t[e]=n[e]},register:function(t,e){n[t]=e},destroy:function(){n={}}};t.exports=i},function(t,e,n){var u=n(2),c=function(){var t,e,n,i,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)n=o[e],o!==(i=t[e])&&(l&&i&&(u(i)||(r=Array.isArray(i)))?(s=r?(r=!1,n&&Array.isArray(n)?n:[]):n&&u(n)?n:{},o[e]=c(l,s,i)):void 0!==i&&(o[e]=i));return o};t.exports=c},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(i-e,n-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,n){var i=n(5);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){var i=n(5);t.exports=function(t){return i(t,-180,180)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e)<n}},function(t,e,n){var i=n(22);t.exports=function(t,e){return i(t)/i(e)/i(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,n,i,r){var s=.5*(i-e),o=.5*(r-n),a=t*t;return(2*n-2*i+s+o)*(t*a)+(-3*n+3*i-2*s-o)*a+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:n<=t?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var v=n(3);t.exports=function(t,e,n,i,r,s,o,a){void 0===a&&(a=new v);var h=Math.sin(r),l=Math.cos(r),u=l*s,c=h*s,d=-h*o,f=l*o,p=1/(u*f+d*-c);return a.x=f*p*t+-d*p*e+(i*d-n*f)*p,a.y=u*p*e+-c*p*t+(-i*u+n*c)*p,a}},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},fromMat4:function(t){var e=t.val,n=this.val;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=n,t[7]=i,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8],u=l*s-o*h,c=-l*r+o*a,d=h*r-s*a,f=e*u+n*c+i*d;return f?(f=1/f,t[0]=u*f,t[1]=(-l*n+i*h)*f,t[2]=(o*n-i*s)*f,t[3]=c*f,t[4]=(l*e-i*a)*f,t[5]=(-o*e+i*r)*f,t[6]=d*f,t[7]=(-h*e+n*a)*f,t[8]=(s*e-n*r)*f,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=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]=i*h-n*l,t[2]=n*o-i*s,t[3]=o*a-r*l,t[4]=e*l-i*a,t[5]=i*r-e*o,t[6]=r*h-s*a,t[7]=n*a-e*h,t[8]=e*s-n*r,this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=t[6],h=t[7],l=t[8];return e*(l*s-o*h)+n*(-l*r+o*a)+i*(h*r-s*a)},multiply:function(t){var e=this.val,n=e[0],i=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,d=c[0],f=c[1],p=c[2],v=c[3],g=c[4],M=c[5],m=c[6],x=c[7],y=c[8];return e[0]=d*n+f*s+p*h,e[1]=d*i+f*o+p*l,e[2]=d*r+f*a+p*u,e[3]=v*n+g*s+M*h,e[4]=v*i+g*o+M*l,e[5]=v*r+g*a+M*u,e[6]=m*n+x*s+y*h,e[7]=m*i+x*o+y*l,e[8]=m*r+x*a+y*u,this},translate:function(t){var e=this.val,n=t.x,i=t.y;return e[6]=n*e[0]+i*e[3]+e[6],e[7]=n*e[1]+i*e[4]+e[7],e[8]=n*e[2]+i*e[5]+e[8],this},rotate:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*n+h*s,e[1]=l*i+h*o,e[2]=l*r+h*a,e[3]=l*s-h*n,e[4]=l*o-h*i,e[5]=l*a-h*r,this},scale:function(t){var e=this.val,n=t.x,i=t.y;return e[0]=n*e[0],e[1]=n*e[1],e[2]=n*e[2],e[3]=i*e[3],e[4]=i*e[4],e[5]=i*e[5],this},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,o=n+n,a=i+i,h=e*s,l=e*o,u=e*a,c=n*o,d=n*a,f=i*a,p=r*s,v=r*o,g=r*a,M=this.val;return M[0]=1-(c+f),M[3]=l+g,M[6]=u-v,M[1]=l-g,M[4]=1-(h+f),M[7]=d+p,M[2]=u+v,M[5]=d-p,M[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,n=this.val,i=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],d=e[9],f=e[10],p=e[11],v=e[12],g=e[13],M=e[14],m=e[15],x=i*h-r*a,y=i*l-s*a,w=i*u-o*a,E=r*l-s*h,T=r*u-o*h,b=s*u-o*l,A=c*g-d*v,R=c*M-f*v,S=c*m-p*v,I=d*M-f*g,C=d*m-p*g,P=f*m-p*M,L=x*P-y*C+w*I+E*S-T*R+b*A;return L?(L=1/L,n[0]=(h*P-l*C+u*I)*L,n[1]=(l*S-a*P-u*R)*L,n[2]=(a*C-h*S+u*A)*L,n[3]=(s*C-r*P-o*I)*L,n[4]=(i*P-s*S+o*R)*L,n[5]=(r*S-i*C-o*A)*L,n[6]=(g*b-M*T+m*E)*L,n[7]=(M*w-v*b-m*y)*L,n[8]=(v*T-g*w+m*x)*L,this):null}});t.exports=i},function(t,e,n){var i=n(0),r=new i({initialize:function(t){this.val=new Float32Array(16),t?this.copy(t):this.identity()},clone:function(){return new r(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],this},zero:function(){var t=this.val;return t[0]=0,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=0,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=0,this},xyz:function(t,e,n){this.identity();var i=this.val;return i[12]=t,i[13]=e,i[14]=n,this},scaling:function(t,e,n){this.zero();var i=this.val;return i[0]=t,i[5]=e,i[10]=n,i[15]=1,this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=0,t[5]=1,t[6]=0,t[7]=0,t[8]=0,t[9]=0,t[10]=1,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=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]=n,t[9]=r,t[11]=t[14],t[12]=i,t[13]=s,t[14]=o,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=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],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15],M=e*o-n*s,m=e*a-i*s,x=e*h-r*s,y=n*a-i*o,w=n*h-r*o,E=i*h-r*a,T=l*p-u*f,b=l*v-c*f,A=l*g-d*f,R=u*v-c*p,S=u*g-d*p,I=c*g-d*v,C=M*I-m*S+x*R+y*A-w*b+E*T;return C?(C=1/C,t[0]=(o*I-a*S+h*R)*C,t[1]=(i*S-n*I-r*R)*C,t[2]=(p*E-v*w+g*y)*C,t[3]=(c*w-u*E-d*y)*C,t[4]=(a*A-s*I-h*b)*C,t[5]=(e*I-i*A+r*b)*C,t[6]=(v*x-f*E-g*m)*C,t[7]=(l*E-c*x+d*m)*C,t[8]=(s*S-o*A+h*T)*C,t[9]=(n*A-e*S-r*T)*C,t[10]=(f*w-p*x+g*M)*C,t[11]=(u*x-l*w-d*M)*C,t[12]=(o*b-s*R-a*T)*C,t[13]=(e*R-n*b+i*T)*C,t[14]=(p*m-f*y-v*M)*C,t[15]=(l*y-u*m+c*M)*C,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=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],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return t[0]=o*(c*g-d*v)-u*(a*g-h*v)+p*(a*d-h*c),t[1]=-(n*(c*g-d*v)-u*(i*g-r*v)+p*(i*d-r*c)),t[2]=n*(a*g-h*v)-o*(i*g-r*v)+p*(i*h-r*a),t[3]=-(n*(a*d-h*c)-o*(i*d-r*c)+u*(i*h-r*a)),t[4]=-(s*(c*g-d*v)-l*(a*g-h*v)+f*(a*d-h*c)),t[5]=e*(c*g-d*v)-l*(i*g-r*v)+f*(i*d-r*c),t[6]=-(e*(a*g-h*v)-s*(i*g-r*v)+f*(i*h-r*a)),t[7]=e*(a*d-h*c)-s*(i*d-r*c)+l*(i*h-r*a),t[8]=s*(u*g-d*p)-l*(o*g-h*p)+f*(o*d-h*u),t[9]=-(e*(u*g-d*p)-l*(n*g-r*p)+f*(n*d-r*u)),t[10]=e*(o*g-h*p)-s*(n*g-r*p)+f*(n*h-r*o),t[11]=-(e*(o*d-h*u)-s*(n*d-r*u)+l*(n*h-r*o)),t[12]=-(s*(u*v-c*p)-l*(o*v-a*p)+f*(o*c-a*u)),t[13]=e*(u*v-c*p)-l*(n*v-i*p)+f*(n*c-i*u),t[14]=-(e*(o*v-a*p)-s*(n*v-i*p)+f*(n*a-i*o)),t[15]=e*(o*c-a*u)-s*(n*c-i*u)+l*(n*a-i*o),this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=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],d=t[11],f=t[12],p=t[13],v=t[14],g=t[15];return(e*o-n*s)*(c*g-d*v)-(e*a-i*s)*(u*g-d*p)+(e*h-r*s)*(u*v-c*p)+(n*a-i*o)*(l*g-d*f)-(n*h-r*o)*(l*v-c*f)+(i*h-r*a)*(l*p-u*f)},multiply:function(t){var e=this.val,n=e[0],i=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],d=e[10],f=e[11],p=e[12],v=e[13],g=e[14],M=e[15],m=t.val,x=m[0],y=m[1],w=m[2],E=m[3];return e[0]=x*n+y*o+w*u+E*p,e[1]=x*i+y*a+w*c+E*v,e[2]=x*r+y*h+w*d+E*g,e[3]=x*s+y*l+w*f+E*M,x=m[4],y=m[5],w=m[6],E=m[7],e[4]=x*n+y*o+w*u+E*p,e[5]=x*i+y*a+w*c+E*v,e[6]=x*r+y*h+w*d+E*g,e[7]=x*s+y*l+w*f+E*M,x=m[8],y=m[9],w=m[10],E=m[11],e[8]=x*n+y*o+w*u+E*p,e[9]=x*i+y*a+w*c+E*v,e[10]=x*r+y*h+w*d+E*g,e[11]=x*s+y*l+w*f+E*M,x=m[12],y=m[13],w=m[14],E=m[15],e[12]=x*n+y*o+w*u+E*p,e[13]=x*i+y*a+w*c+E*v,e[14]=x*r+y*h+w*d+E*g,e[15]=x*s+y*l+w*f+E*M,this},multiplyLocal:function(t){var e=[],n=this.val,i=t.val;return e[0]=n[0]*i[0]+n[1]*i[4]+n[2]*i[8]+n[3]*i[12],e[1]=n[0]*i[1]+n[1]*i[5]+n[2]*i[9]+n[3]*i[13],e[2]=n[0]*i[2]+n[1]*i[6]+n[2]*i[10]+n[3]*i[14],e[3]=n[0]*i[3]+n[1]*i[7]+n[2]*i[11]+n[3]*i[15],e[4]=n[4]*i[0]+n[5]*i[4]+n[6]*i[8]+n[7]*i[12],e[5]=n[4]*i[1]+n[5]*i[5]+n[6]*i[9]+n[7]*i[13],e[6]=n[4]*i[2]+n[5]*i[6]+n[6]*i[10]+n[7]*i[14],e[7]=n[4]*i[3]+n[5]*i[7]+n[6]*i[11]+n[7]*i[15],e[8]=n[8]*i[0]+n[9]*i[4]+n[10]*i[8]+n[11]*i[12],e[9]=n[8]*i[1]+n[9]*i[5]+n[10]*i[9]+n[11]*i[13],e[10]=n[8]*i[2]+n[9]*i[6]+n[10]*i[10]+n[11]*i[14],e[11]=n[8]*i[3]+n[9]*i[7]+n[10]*i[11]+n[11]*i[15],e[12]=n[12]*i[0]+n[13]*i[4]+n[14]*i[8]+n[15]*i[12],e[13]=n[12]*i[1]+n[13]*i[5]+n[14]*i[9]+n[15]*i[13],e[14]=n[12]*i[2]+n[13]*i[6]+n[14]*i[10]+n[15]*i[14],e[15]=n[12]*i[3]+n[13]*i[7]+n[14]*i[11]+n[15]*i[15],this.fromArray(e)},translate:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[12]=r[0]*e+r[4]*n+r[8]*i+r[12],r[13]=r[1]*e+r[5]*n+r[9]*i+r[13],r[14]=r[2]*e+r[6]*n+r[10]*i+r[14],r[15]=r[3]*e+r[7]*n+r[11]*i+r[15],this},translateXYZ:function(t,e,n){var i=this.val;return i[12]=i[0]*t+i[4]*e+i[8]*n+i[12],i[13]=i[1]*t+i[5]*e+i[9]*n+i[13],i[14]=i[2]*t+i[6]*e+i[10]*n+i[14],i[15]=i[3]*t+i[7]*e+i[11]*n+i[15],this},scale:function(t){var e=t.x,n=t.y,i=t.z,r=this.val;return r[0]=r[0]*e,r[1]=r[1]*e,r[2]=r[2]*e,r[3]=r[3]*e,r[4]=r[4]*n,r[5]=r[5]*n,r[6]=r[6]*n,r[7]=r[7]*n,r[8]=r[8]*i,r[9]=r[9]*i,r[10]=r[10]*i,r[11]=r[11]*i,this},scaleXYZ:function(t,e,n){var i=this.val;return i[0]=i[0]*t,i[1]=i[1]*t,i[2]=i[2]*t,i[3]=i[3]*t,i[4]=i[4]*e,i[5]=i[5]*e,i[6]=i[6]*e,i[7]=i[7]*e,i[8]=i[8]*n,i[9]=i[9]*n,i[10]=i[10]*n,i[11]=i[11]*n,this},makeRotationAxis:function(t,e){var n=Math.cos(e),i=Math.sin(e),r=1-n,s=t.x,o=t.y,a=t.z,h=r*s,l=r*o;return this.fromArray([h*s+n,h*o-i*a,h*a+i*o,0,h*o+i*a,l*o+n,l*a-i*s,0,h*a-i*o,l*a+i*s,r*a*a+n,0,0,0,0,1]),this},rotate:function(t,e){var n=this.val,i=e.x,r=e.y,s=e.z,o=Math.sqrt(i*i+r*r+s*s);if(Math.abs(o)<1e-6)return null;i*=o=1/o,r*=o,s*=o;var a=Math.sin(t),h=Math.cos(t),l=1-h,u=n[0],c=n[1],d=n[2],f=n[3],p=n[4],v=n[5],g=n[6],M=n[7],m=n[8],x=n[9],y=n[10],w=n[11],E=i*i*l+h,T=r*i*l+s*a,b=s*i*l-r*a,A=i*r*l-s*a,R=r*r*l+h,S=s*r*l+i*a,I=i*s*l+r*a,C=r*s*l-i*a,P=s*s*l+h;return n[0]=u*E+p*T+m*b,n[1]=c*E+v*T+x*b,n[2]=d*E+g*T+y*b,n[3]=f*E+M*T+w*b,n[4]=u*A+p*R+m*S,n[5]=c*A+v*R+x*S,n[6]=d*A+g*R+y*S,n[7]=f*A+M*R+w*S,n[8]=u*I+p*C+m*P,n[9]=c*I+v*C+x*P,n[10]=d*I+g*C+y*P,n[11]=f*I+M*C+w*P,this},rotateX:function(t){var e=this.val,n=Math.sin(t),i=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*i+h*n,e[5]=s*i+l*n,e[6]=o*i+u*n,e[7]=a*i+c*n,e[8]=h*i-r*n,e[9]=l*i-s*n,e[10]=u*i-o*n,e[11]=c*i-a*n,this},rotateY:function(t){var e=this.val,n=Math.sin(t),i=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*i-h*n,e[1]=s*i-l*n,e[2]=o*i-u*n,e[3]=a*i-c*n,e[8]=r*n+h*i,e[9]=s*n+l*i,e[10]=o*n+u*i,e[11]=a*n+c*i,this},rotateZ:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],o=e[2],a=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*i+h*n,e[1]=s*i+l*n,e[2]=o*i+u*n,e[3]=a*i+c*n,e[4]=h*i-r*n,e[5]=l*i-s*n,e[6]=u*i-o*n,e[7]=c*i-a*n,this},fromRotationTranslation:function(t,e){var n=this.val,i=t.x,r=t.y,s=t.z,o=t.w,a=i+i,h=r+r,l=s+s,u=i*a,c=i*h,d=i*l,f=r*h,p=r*l,v=s*l,g=o*a,M=o*h,m=o*l;return n[0]=1-(f+v),n[1]=c+m,n[2]=d-M,n[3]=0,n[4]=c-m,n[5]=1-(u+v),n[6]=p+g,n[7]=0,n[8]=d+M,n[9]=p-g,n[10]=1-(u+f),n[11]=0,n[12]=e.x,n[13]=e.y,n[14]=e.z,n[15]=1,this},fromQuat:function(t){var e=this.val,n=t.x,i=t.y,r=t.z,s=t.w,o=n+n,a=i+i,h=r+r,l=n*o,u=n*a,c=n*h,d=i*a,f=i*h,p=r*h,v=s*o,g=s*a,M=s*h;return e[0]=1-(d+p),e[1]=u+M,e[2]=c-g,e[3]=0,e[4]=u-M,e[5]=1-(l+p),e[6]=f+v,e[7]=0,e[8]=c+g,e[9]=f-v,e[10]=1-(l+d),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,n,i,r,s){var o=this.val,a=1/(e-t),h=1/(i-n),l=1/(r-s);return o[0]=2*r*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=2*r*h,o[6]=0,o[7]=0,o[8]=(e+t)*a,o[9]=(i+n)*h,o[10]=(s+r)*l,o[11]=-1,o[12]=0,o[13]=0,o[14]=s*r*2*l,o[15]=0,this},perspective:function(t,e,n,i){var r=this.val,s=1/Math.tan(t/2),o=1/(n-i);return r[0]=s/e,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=s,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=(i+n)*o,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*o,r[15]=0,this},perspectiveLH:function(t,e,n,i){var r=this.val;return r[0]=2*n/t,r[1]=0,r[2]=0,r[3]=0,r[4]=0,r[5]=2*n/e,r[6]=0,r[7]=0,r[8]=0,r[9]=0,r[10]=-i/(n-i),r[11]=1,r[12]=0,r[13]=0,r[14]=n*i/(n-i),r[15]=0,this},ortho:function(t,e,n,i,r,s){var o=this.val,a=0===(a=t-e)?a:1/a,h=0===(h=n-i)?h:1/h,l=0===(l=r-s)?l:1/l;return o[0]=-2*a,o[1]=0,o[2]=0,o[3]=0,o[4]=0,o[5]=-2*h,o[6]=0,o[7]=0,o[8]=0,o[9]=0,o[10]=2*l,o[11]=0,o[12]=(t+e)*a,o[13]=(i+n)*h,o[14]=(s+r)*l,o[15]=1,this},lookAt:function(t,e,n){var i=this.val,r=t.x,s=t.y,o=t.z,a=n.x,h=n.y,l=n.z,u=e.x,c=e.y,d=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(o-d)<1e-6)return this.identity();var f=r-u,p=s-c,v=o-d,g=1/Math.sqrt(f*f+p*p+v*v),M=h*(v*=g)-l*(p*=g),m=l*(f*=g)-a*v,x=a*p-h*f;(g=Math.sqrt(M*M+m*m+x*x))?(M*=g=1/g,m*=g,x*=g):x=m=M=0;var y=p*x-v*m,w=v*M-f*x,E=f*m-p*M;return(g=Math.sqrt(y*y+w*w+E*E))?(y*=g=1/g,w*=g,E*=g):E=w=y=0,i[0]=M,i[1]=y,i[2]=f,i[3]=0,i[4]=m,i[5]=w,i[6]=p,i[7]=0,i[8]=x,i[9]=E,i[10]=v,i[11]=0,i[12]=-(M*r+m*s+x*o),i[13]=-(y*r+w*s+E*o),i[14]=-(f*r+p*s+v*o),i[15]=1,this},yawPitchRoll:function(t,e,n){this.zero(),h.zero(),l.zero();var i=this.val,r=h.val,s=l.val,o=Math.sin(n),a=Math.cos(n);return i[10]=1,i[15]=1,i[0]=a,i[1]=o,i[4]=-o,i[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,n,i,r){return this.yawPitchRoll(t.y,t.x,t.z),h.scaling(n.x,n.y,n.z),l.xyz(e.x,e.y,e.z),this.multiplyLocal(h),this.multiplyLocal(l),void 0!==i&&this.multiplyLocal(i),void 0!==r&&this.multiplyLocal(r),this}}),h=new r,l=new r;t.exports=r},function(t,e,n){var i=n(0),r=n(11),s=n(29),a=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),o=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,d=new i({initialize:function(t,e,n,i){"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w,this},set:function(t,e,n,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},rotationTo:function(t,e){var n=t.x*e.x+t.y*e.y+t.z*e.z;return n<-.999999?(u.copy(o).cross(t).length()<1e-6&&u.copy(l).cross(t),u.normalize(),this.setAxisAngle(u,Math.PI)):.999999<n?(this.x=0,this.y=0,this.z=0,this.w=1,this):(u.copy(t).cross(e),this.x=u.x,this.y=u.y,this.z=u.z,this.w=1+n,this.normalize())},setAxes:function(t,e,n){var i=c.val;return i[0]=e.x,i[3]=e.y,i[6]=e.z,i[1]=n.x,i[4]=n.y,i[7]=n.z,i[2]=-t.x,i[5]=-t.y,i[8]=-t.z,this.fromMat3(c).normalize()},identity:function(){return this.x=0,this.y=0,this.z=0,this.w=1,this},setAxisAngle:function(t,e){e*=.5;var n=Math.sin(e);return this.x=n*t.x,this.y=n*t.y,this.z=n*t.z,this.w=Math.cos(e),this},multiply:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.x,o=t.y,a=t.z,h=t.w;return this.x=e*h+r*s+n*a-i*o,this.y=n*h+r*o+i*s-e*a,this.z=i*h+r*a+e*o-n*s,this.w=r*h-e*s-n*o-i*a,this},slerp:function(t,e){var n=this.x,i=this.y,r=this.z,s=this.w,o=t.x,a=t.y,h=t.z,l=t.w,u=n*o+i*a+r*h+s*l;u<0&&(u=-u,o=-o,a=-a,h=-h,l=-l);var c,d,f=1-e,p=e;return 1e-6<1-u&&(c=Math.acos(u),d=Math.sin(c),f=Math.sin((1-e)*c)/d,p=Math.sin(e*c)/d),this.x=f*n+p*o,this.y=f*i+p*a,this.z=f*r+p*h,this.w=f*s+p*l,this},invert:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i,s=r?1/r:0;return this.x=-t*s,this.y=-e*s,this.z=-n*s,this.w=i*s,this},conjugate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this},rotateX:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+r*s,this.y=n*o+i*s,this.z=i*o-n*s,this.w=r*o-e*s,this},rotateY:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o-i*s,this.y=n*o+r*s,this.z=i*o+e*s,this.w=r*o-n*s,this},rotateZ:function(t){t*=.5;var e=this.x,n=this.y,i=this.z,r=this.w,s=Math.sin(t),o=Math.cos(t);return this.x=e*o+n*s,this.y=n*o-e*s,this.z=i*o+r*s,this.w=r*o-i*s,this},calculateW:function(){var t=this.x,e=this.y,n=this.z;return this.w=-Math.sqrt(1-t*t-e*e-n*n),this},fromMat3:function(t){var e,n,i,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),n=a[e],i=a[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=d},function(t,e,n){var r=n(15),s=n(33);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports=function(){}},function(t,e,n){var u=n(36),i=n(0),p=n(12),r=n(150),s=n(151),v=n(175),h=n(176),c=n(194),o=new i({Extends:s,initialize:function(t,e){s.call(this,t,e);var n=e.game;this.isWebGL=2===n.config.renderType,this.cache=n.cache.addCustom("spine"),this.spineTextures=n.cache.addCustom("spineTextures"),this.json=n.cache.json,this.textures=n.textures,this.drawDebug=!1,this.gl,this.renderer,this.sceneRenderer,this.skeletonRenderer,this.skeletonDebugRenderer,this.plugin=v,this.temp1,this.temp2,this.isWebGL?(this.runtime=v.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=v.canvas,this.renderer=n.renderer,this.getAtlas=this.getAtlasCanvas);var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var 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()})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(r,this.onResize,this)):this.bootCanvas();var t=this.systems.events;t.once("shutdown",this.shutdown,this),t.once("destroy",this.destroy,this)},bootCanvas:function(){this.skeletonRenderer=new v.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new v.webgl.SceneRenderer(this.renderer.canvas,this.gl,!0);function t(t,e){var n;t===this.srcBlend&&e===this.dstBlend||(n=this.context.gl,this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend)))}this.sceneRenderer.batcher.setBlendMode=t,this.sceneRenderer.shapes.setBlendMode=t,this.skeletonRenderer=this.sceneRenderer.skeletonRenderer,this.skeletonDebugRenderer=this.sceneRenderer.skeletonDebugRenderer,this.temp1=new v.webgl.Vector3(0,0,0),this.temp2=new v.webgl.Vector3(0,0,0)},getAtlasCanvas:function(t){var e=this.cache.get(t);if(e){var n,i=this.spineTextures;return i.has(t)?i.get(t):(n=this.textures,new v.TextureAtlas(e.data,function(t){return new v.canvas.CanvasTexture(n.get(e.prefix+t).getSourceImage())}))}console.warn("No atlas data for: "+t)},getAtlasWebGL:function(t){var e=this.cache.get(t);if(e){var n,i,r=this.spineTextures,s=r.has(t)?r.get(t):(n=this.textures,(i=this.sceneRenderer.context.gl).pixelStorei(i.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!1),new v.TextureAtlas(e.data,function(t){return new v.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var 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,n,i,r,s),this.addFile(o.files);return this},worldToLocal:function(t,e,n,i){var r=this.temp1,s=this.temp2,o=this.sceneRenderer.camera;r.set(t+n.x,e-n.y,0);var a=o.viewportWidth,h=o.viewportHeight;return o.screenToWorld(r,a,h),i&&null!==i.parent?(i.parent.worldToLocal(s.set(r.x-n.x,r.y-n.y,0)),new v.Vector2(s.x,s.y)):i?new v.Vector2(r.x-n.x,r.y-n.y):new v.Vector2(r.x,r.y)},getVector2:function(t,e){return new v.Vector2(t,e)},getVector3:function(t,e,n){return new v.webgl.Vector3(t,e,n)},setDebugBones:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBones=t,this},setDebugRegionAttachments:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawRegionAttachments=t,this},setDebugBoundingBoxes:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBoundingBoxes=t,this},setDebugMeshHull:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshHull=t,this},setDebugMeshTriangles:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshTriangles=t,this},setDebugPaths:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawPaths=t,this},setDebugSkeletonXY:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawSkeletonXY=t,this},setDebugClipping:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawClipping=t,this},setEffect:function(t){return this.sceneRenderer.skeletonRenderer.vertexEffect=t,this},createSkeleton:function(t,e){var n,i=t,r=t,s=-1!==t.indexOf(".");s&&(i=(n=t.split(".")).shift(),r=n.join("."));var o=this.cache.get(i),a=this.getAtlas(i);if(!a)return null;this.spineTextures.has(i)||this.spineTextures.add(i,a);var h,l,u=o.preMultipliedAlpha,c=new v.AtlasAttachmentLoader(a),d=new v.SkeletonJson(c);if(l=e||(h=this.json.get(i),s?p(h,r):h)){var f=d.readSkeletonData(l);return{skeletonData:f,skeleton:new v.Skeleton(f),preMultipliedAlpha:u}}return null},createAnimationState:function(t){var e=new v.AnimationStateData(t.data);return{stateData:e,state:new v.AnimationState(e)}},getBounds:function(t){var e=new v.Vector2,n=new v.Vector2;return t.getBounds(e,n,[]),{offset:e,size:n}},onResize:function(){var t=this.renderer,e=this.sceneRenderer,n=t.width,i=t.height;e.camera.position.x=n/2,e.camera.position.y=i/2,e.camera.viewportWidth=n,e.camera.viewportHeight=i},shutdown:function(){this.systems.events.off("shutdown",this.shutdown,this),this.isWebGL&&this.game.scale.off(r,this.onResize,this)},destroy:function(){this.shutdown(),this.sceneRenderer&&this.sceneRenderer.dispose(),this.pluginManager.removeGameObject("spine",!0,!0),this.pluginManager=null,this.game=null,this.scene=null,this.systems=null,this.cache=null,this.spineTextures=null,this.json=null,this.textures=null,this.sceneRenderer=null,this.skeletonRenderer=null,this.gl=null}});t.exports=o},function(t,e,n){var l=n(37),u=n(38);t.exports=function(t,e,n){e.x=u(n,"x",0),e.y=u(n,"y",0),e.depth=u(n,"depth",0),e.flipX=u(n,"flipX",!1),e.flipY=u(n,"flipY",!1);var i=u(n,"scale",null);"number"==typeof i?e.setScale(i):null!==i&&(e.scaleX=u(i,"x",1),e.scaleY=u(i,"y",1));var r=u(n,"scrollFactor",null);"number"==typeof r?e.setScrollFactor(r):null!==r&&(e.scrollFactorX=u(r,"x",1),e.scrollFactorY=u(r,"y",1)),e.rotation=u(n,"rotation",0);var s=u(n,"angle",null);null!==s&&(e.angle=s),e.alpha=u(n,"alpha",1);var o,a,h=u(n,"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(n,"blendMode",l.NORMAL),e.visible=u(n,"visible",!0),u(n,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,n){var r=n(39),s=n(12);t.exports=function(t,e,n){var i=s(t,e,null);if(null===i)return n;if(Array.isArray(i))return r.RND.pick(i);if("object"==typeof i){if(i.hasOwnProperty("randInt"))return r.RND.integerInRange(i.randInt[0],i.randInt[1]);if(i.hasOwnProperty("randFloat"))return r.RND.realInRange(i.randFloat[0],i.randFloat[1])}else if("function"==typeof i)return i(e);return i}},function(t,e,n){var i=n(1),r=n(15)(!1,r={Angle:n(40),Distance:n(49),Easing:n(57),Fuzzy:n(102),Interpolation:n(107),Pow2:n(115),Snap:n(119),RandomDataGenerator:n(123),Average:n(124),Bernstein:n(21),Between:n(125),CatmullRom:n(23),CeilTo:n(126),Clamp:n(9),DegToRad:n(27),Difference:n(127),Factorial:n(22),FloatBetween:n(8),FloorTo:n(128),FromPercent:n(129),GetSpeed:n(130),IsEven:n(131),IsEvenStrict:n(132),Linear:n(24),MaxAdd:n(133),MinSub:n(134),Percent:n(135),RadToDeg:n(10),RandomXY:n(136),RandomXYZ:n(137),RandomXYZW:n(138),Rotate:n(139),RotateAround:n(140),RotateAroundDistance:n(141),RotateTo:n(142),RoundAwayFromZero:n(143),RoundTo:n(144),SinCosTableGenerator:n(145),SmootherStep:n(26),SmoothStep:n(25),ToXY:n(146),TransformXY:n(28),Within:n(147),Wrap:n(5),Vector2:n(3),Vector3:n(11),Vector4:n(148),Matrix3:n(29),Matrix4:n(30),Quaternion:n(31),RotateVec3:n(149)},i);t.exports=r},function(t,e,n){t.exports={Between:n(16),BetweenPoints:n(41),BetweenPointsY:n(42),BetweenY:n(43),CounterClockwise:n(7),Normalize:n(17),Random:n(44),RandomDegrees:n(45),Reverse:n(46),RotateTo:n(47),ShortestBetween:n(48),Wrap:n(18),WrapDegrees:n(19)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(n-t,i-e)}},function(t,e,n){var i=n(8);t.exports=function(){return i(-Math.PI,Math.PI)}},function(t,e,n){var i=n(8);t.exports=function(){return i(-180,180)}},function(t,e,n){var i=n(17);t.exports=function(t){return i(t+Math.PI)}},function(t,e,n){var i=n(1);t.exports=function(t,e,n){return void 0===n&&(n=.05),t===e||(Math.abs(e-t)<=n||Math.abs(e-t)>=i.PI2-n?t=e:(Math.abs(e-t)>Math.PI&&(e<t?e+=i.PI2:e-=i.PI2),t<e?t+=n:e<t&&(t-=n))),t}},function(t,e){t.exports=function(t,e){var n=e-t;return 0==n?0:n-360*Math.floor((n+180)/360)}},function(t,e,n){t.exports={Between:n(50),BetweenPoints:n(51),BetweenPointsSquared:n(52),Chebyshev:n(53),Power:n(54),Snake:n(55),Squared:n(56)}},function(t,e){t.exports=function(t,e,n,i){var r=t-n,s=e-i;return Math.sqrt(r*r+s*s)}},function(t,e){t.exports=function(t,e){var n=t.x-e.x,i=t.y-e.y;return Math.sqrt(n*n+i*i)}},function(t,e){t.exports=function(t,e){var n=t.x-e.x,i=t.y-e.y;return n*n+i*i}},function(t,e){t.exports=function(t,e,n,i){return Math.max(Math.abs(t-n),Math.abs(e-i))}},function(t,e){t.exports=function(t,e,n,i,r){return void 0===r&&(r=2),Math.sqrt(Math.pow(n-t,r)+Math.pow(i-e,r))}},function(t,e){t.exports=function(t,e,n,i){return Math.abs(t-n)+Math.abs(e-i)}},function(t,e){t.exports=function(t,e,n,i){var r=t-n,s=e-i;return r*r+s*s}},function(t,e,n){t.exports={Back:n(58),Bounce:n(62),Circular:n(66),Cubic:n(70),Elastic:n(74),Expo:n(78),Linear:n(82),Quadratic:n(84),Quartic:n(88),Quintic:n(92),Sine:n(96),Stepped:n(100)}},function(t,e,n){t.exports={In:n(59),Out:n(60),InOut:n(61)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),t*t*((e+1)*t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1.70158),--t*t*((e+1)*t+e)+1}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1.70158);var n=1.525*e;return(t*=2)<1?t*t*((1+n)*t-n)*.5:.5*((t-=2)*t*((1+n)*t+n)+2)}},function(t,e,n){t.exports={In:n(63),Out:n(64),InOut:n(65)}},function(t,e){t.exports=function(t){return(t=1-t)<1/2.75?1-7.5625*t*t:t<2/2.75?1-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}},function(t,e){t.exports=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}},function(t,e){t.exports=function(t){var e=!1;return t<.5?(t=1-2*t,e=!0):t=2*t-1,t<1/2.75?t*=7.5625*t:t=t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5}},function(t,e,n){t.exports={In:n(67),Out:n(68),InOut:n(69)}},function(t,e){t.exports=function(t){return 1-Math.sqrt(1-t*t)}},function(t,e){t.exports=function(t){return Math.sqrt(1- --t*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)}},function(t,e,n){t.exports={In:n(71),Out:n(72),InOut:n(73)}},function(t,e){t.exports=function(t){return t*t*t}},function(t,e){t.exports=function(t){return--t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t:.5*((t-=2)*t*t+2)}},function(t,e,n){t.exports={In:n(75),Out:n(76),InOut:n(77)}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),-(e*Math.pow(2,10*--t)*Math.sin((t-i)*(2*Math.PI)/n))}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),e*Math.pow(2,-10*t)*Math.sin((t-i)*(2*Math.PI)/n)+1}},function(t,e){t.exports=function(t,e,n){if(void 0===e&&(e=.1),void 0===n&&(n=.1),0===t)return 0;if(1===t)return 1;var i=n/4;return e<1?e=1:i=n*Math.asin(1/e)/(2*Math.PI),(t*=2)<1?e*Math.pow(2,10*--t)*Math.sin((t-i)*(2*Math.PI)/n)*-.5:e*Math.pow(2,-10*--t)*Math.sin((t-i)*(2*Math.PI)/n)*.5+1}},function(t,e,n){t.exports={In:n(79),Out:n(80),InOut:n(81)}},function(t,e){t.exports=function(t){return Math.pow(2,10*(t-1))-.001}},function(t,e){t.exports=function(t){return 1-Math.pow(2,-10*t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))}},function(t,e,n){t.exports=n(83)},function(t,e){t.exports=function(t){return t}},function(t,e,n){t.exports={In:n(85),Out:n(86),InOut:n(87)}},function(t,e){t.exports=function(t){return t*t}},function(t,e){t.exports=function(t){return t*(2-t)}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t:-.5*(--t*(t-2)-1)}},function(t,e,n){t.exports={In:n(89),Out:n(90),InOut:n(91)}},function(t,e){t.exports=function(t){return t*t*t*t}},function(t,e){t.exports=function(t){return 1- --t*t*t*t}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t:-.5*((t-=2)*t*t*t-2)}},function(t,e,n){t.exports={In:n(93),Out:n(94),InOut:n(95)}},function(t,e){t.exports=function(t){return t*t*t*t*t}},function(t,e){t.exports=function(t){return--t*t*t*t*t+1}},function(t,e){t.exports=function(t){return(t*=2)<1?.5*t*t*t*t*t:.5*((t-=2)*t*t*t*t+2)}},function(t,e,n){t.exports={In:n(97),Out:n(98),InOut:n(99)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:1-Math.cos(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:Math.sin(t*Math.PI/2)}},function(t,e){t.exports=function(t){return 0===t?0:1===t?1:.5*(1-Math.cos(Math.PI*t))}},function(t,e,n){t.exports=n(101)},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t<=0?0:1<=t?1:1/e*(1+(e*t|0))}},function(t,e,n){t.exports={Ceil:n(103),Equal:n(20),Floor:n(104),GreaterThan:n(105),LessThan:n(106)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.ceil(t-e)}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1e-4),Math.floor(t+e)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),e-n<t}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),t<e+n}},function(t,e,n){t.exports={Bezier:n(108),CatmullRom:n(109),CubicBezier:n(110),Linear:n(111),QuadraticBezier:n(112),SmoothStep:n(113),SmootherStep:n(114)}},function(t,e,n){var s=n(21);t.exports=function(t,e){for(var n=0,i=t.length-1,r=0;r<=i;r++)n+=Math.pow(1-e,i-r)*Math.pow(e,r)*t[r]*s(i,r);return n}},function(t,e,n){var s=n(23);t.exports=function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i);return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(i-r,t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n])):e<0?t[0]-(s(-i,t[0],t[0],t[1],t[1])-t[0]):1<e?t[n]-(s(i-n,t[n],t[n],t[n-1],t[n-1])-t[n]):s(i-r,t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2])}},function(t,e){t.exports=function(t,e,n,i,r){return(l=1-t)*l*l*e+3*(h=1-(a=t))*h*a*n+3*(1-(o=t))*o*o*i+(s=t)*s*s*r;var s,o,a,h,l}},function(t,e,n){var s=n(24);t.exports=function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i);return e<0?s(t[0],t[1],i):1<e?s(t[n],t[n-1],n-i):s(t[r],t[n<r+1?n:r+1],i-r)}},function(t,e){t.exports=function(t,e,n,i){return(o=1-t)*o*e+2*(1-(s=t))*s*n+(r=t)*r*i;var r,s,o}},function(t,e,n){var i=n(25);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){var i=n(26);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){t.exports={GetNext:n(116),IsSize:n(117),IsValue:n(118)}},function(t,e){t.exports=function(t){var e=Math.log(t)/.6931471805599453;return 1<<Math.ceil(e)}},function(t,e){t.exports=function(t,e){return 0<t&&0==(t&t-1)&&0<e&&0==(e&e-1)}},function(t,e){t.exports=function(t){return 0<t&&0==(t&t-1)}},function(t,e,n){t.exports={Ceil:n(120),Floor:n(121),To:n(122)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.ceil(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.floor(t/e),i?(n+t)/e:n+t)}},function(t,e){t.exports=function(t,e,n,i){return void 0===n&&(n=0),0===e?t:(t-=n,t=e*Math.round(t/e),i?(n+t)/e:n+t)}},function(t,e,n){var i=new(n(0))({initialize:function(t){void 0===t&&(t=[(Date.now()*Math.random()).toString()]),this.c=1,this.s0=0,this.s1=0,this.s2=0,this.n=0,this.signs=[-1,1],t&&this.init(t)},rnd:function(){var t=2091639*this.s0+2.3283064365386963e-10*this.c;return this.c=0|t,this.s0=this.s1,this.s1=this.s2,this.s2=t-this.c,this.s2},hash:function(t){var e,n=this.n;t=t.toString();for(var i=0;i<t.length;i++)e=.02519603282416938*(n+=t.charCodeAt(i)),e-=n=e>>>0,n=(e*=n)>>>0,n+=4294967296*(e-=n);return 2.3283064365386963e-10*((this.n=n)>>>0)},init:function(t){"string"==typeof t?this.state(t):this.sow(t)},sow:function(t){if(this.n=4022871197,this.s0=this.hash(" "),this.s1=this.hash(" "),this.s2=this.hash(" "),this.c=1,t)for(var e=0;e<t.length&&null!=t[e];e++){var n=t[e];this.s0-=this.hash(n),this.s0+=~~(this.s0<0),this.s1-=this.hash(n),this.s1+=~~(this.s1<0),this.s2-=this.hash(n),this.s2+=~~(this.s2<0)}},integer:function(){return 4294967296*this.rnd()},frac:function(){return this.rnd()+11102230246251565e-32*(2097152*this.rnd()|0)},real:function(){return this.integer()+this.frac()},integerInRange:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},between:function(t,e){return Math.floor(this.realInRange(0,e-t+1)+t)},realInRange:function(t,e){return this.frac()*(e-t)+t},normal:function(){return 1-2*this.frac()},uuid:function(){for(var t="",e="",e=t="";t++<36;e+=~t%5|3*t&4?(15^t?8^this.frac()*(20^t?16:4):4).toString(16):"-");return e},pick:function(t){return t[this.integerInRange(0,t.length-1)]},sign:function(){return this.pick(this.signs)},weightedPick:function(t){return t[~~(Math.pow(this.frac(),2)*(t.length-1)+.5)]},timestamp:function(t,e){return this.realInRange(t||9466848e5,e||1577862e6)},angle:function(){return this.integerInRange(-180,180)},rotation:function(){return this.realInRange(-3.1415926,3.1415926)},state:function(t){return"string"==typeof t&&t.match(/^!rnd/)&&(t=t.split(","),this.c=parseFloat(t[1]),this.s0=parseFloat(t[2]),this.s1=parseFloat(t[3]),this.s2=parseFloat(t[4])),["!rnd",this.c,this.s0,this.s1,this.s2].join(",")},shuffle:function(t){for(var e=t.length-1;0<e;e--){var n=Math.floor(this.frac()*(e+1)),i=t[n];t[n]=t[e],t[e]=i}return t}});t.exports=i},function(t,e){t.exports=function(t){for(var e=0,n=0;n<t.length;n++)e+=+t[n];return e/t.length}},function(t,e){t.exports=function(t,e){return Math.floor(Math.random()*(e-t+1)+t)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.ceil(t*i)/i}},function(t,e){t.exports=function(t,e){return Math.abs(t-e)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.floor(t*i)/i}},function(t,e,n){var i=n(9);t.exports=function(t,e,n){return(n-e)*(t=i(t,0,1))}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,n){return Math.min(t+e,n)}},function(t,e){t.exports=function(t,e,n){return Math.max(t-e,n)}},function(t,e){t.exports=function(t,e,n,i){void 0===n&&(n=e+1);var r=(t-e)/(n-e);return 1<r?void 0!==i?(r=(i-t)/(i-n))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI;return t.x=Math.cos(n)*e,t.y=Math.sin(n)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t.x=Math.cos(n)*r,t.y=Math.sin(n)*r,t.z=i*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e){var n=t.x,i=t.y;return t.x=n*Math.cos(e)-i*Math.sin(e),t.y=n*Math.sin(e)+i*Math.cos(e),t}},function(t,e){t.exports=function(t,e,n,i){var r=Math.cos(i),s=Math.sin(i),o=t.x-e,a=t.y-n;return t.x=o*r-a*s+e,t.y=o*s+a*r+n,t}},function(t,e){t.exports=function(t,e,n,i,r){var s=i+Math.atan2(t.y-n,t.x-e);return t.x=e+r*Math.cos(s),t.y=n+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,n,i,r){return t.x=e+r*Math.cos(i),t.y=n+r*Math.sin(i),t}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=1),i*=Math.PI/t;for(var r=[],s=[],o=0;o<t;o++)e+=(n-=e*i)*i,r[o]=n,s[o]=e;return{sin:s,cos:r,length:t}}},function(t,e,n){var o=n(3);t.exports=function(t,e,n,i){void 0===i&&(i=new o);var r=0,s=0;return 0<t&&t<=e*n&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t,i.set(r,s)),i}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0)},clone:function(){return new i(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,n,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+n*n+i*i+r*r)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return e*e+n*n+i*i+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,o=t.z,a=t.w,h=a*e+s*i-o*n,l=a*n+o*e-r*i,u=a*i+r*n-s*e,c=-r*e-s*n-o*i;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}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,t.exports=i},function(t,e,n){var i=n(11),r=n(30),s=n(31),o=new r,a=new s,h=new i;t.exports=function(t,e,n){return a.setAxisAngle(e,n),o.fromRotationTranslation(a,h.set(0,0,0)),t.transformMat4(o)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(152),r=n(0),s=n(153),o=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=o},function(t,e,n){var i=new(n(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,n){t.exports={ADDED_TO_SCENE:n(154),BOOT:n(155),CREATE:n(156),DESTROY:n(157),PAUSE:n(158),POST_UPDATE:n(159),PRE_UPDATE:n(160),READY:n(161),REMOVED_FROM_SCENE:n(162),RENDER:n(163),RESUME:n(164),SHUTDOWN:n(165),SLEEP:n(166),START:n(167),TRANSITION_COMPLETE:n(168),TRANSITION_INIT:n(169),TRANSITION_OUT:n(170),TRANSITION_START:n(171),TRANSITION_WAKE:n(172),UPDATE:n(173),WAKE:n(174)}},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(qe,t){(function(){var i,t,e,f,n,s,r,o,a,L,h,l,u,c,ht,d,p,v,g,j,M,m,x,y,w,E,T,b,A,R,S,I,C,P,Z,_,k,F,O,V,D,N,U,B,X,Y,z,W,q,G,H,K,Q,J,$,tt,et,nt,it,rt,st,ot,at,lt,ut,ct,dt,ft,pt,vt,gt,Mt,mt,xt,yt,wt,Et,Tt,bt,At,Rt,St,It,Ct,Pt,Lt,_t,kt,Ft,Ot,Vt,Dt,Nt,Ut,Bt,Xt,Yt,zt,Wt,qt,Gt,Ht,jt,Zt,Kt,Qt,Jt,$t,te,ee,ne,ie,re,se,oe=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function ae(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function he(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 le(t){this.atlas=t}function ue(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}function ce(t,e,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=u.Normal,this.skinRequired=!1,this.color=new l.Color,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function de(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n<t.bones.length;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)}function fe(t){var e=v.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 pe(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,i=t.bones.length;n<i;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}function ve(t){var e=x.call(this,t,0,!1)||this;return e.bones=new Array,e}function ge(t){this.toLoad=new Array,this.assets={},this.clientId=t}function Me(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function me(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var n,i=t.bones[e],r=void 0;null==i.parent?r=new S.Bone(i,this,null):(n=this.bones[i.parent.index],r=new S.Bone(i,this,n),n.children.push(r)),this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var s=t.slots[e],r=this.bones[s.boneData.index],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 xe(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new C.Pool(function(){return C.Utils.newFloatArray(16)})}function ye(){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 we(){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 Ee(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 O.Color,this.darkColor=null==t.darkColor?null:new O.Color,this.setToSetupPose()}function Te(t,e,n){if(this.color=new D.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function be(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n<t.bones.length;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)}function Ae(t){var e=X.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 Re(){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 Se(t){var e=Q.call(this,t)||this;return e.color=new K.Color(1,1,1,1),e}function Ie(t){var e=tt.call(this,t)||this;return e.color=new $.Color(.2275,.2275,.8078,1),e}function Ce(t){var e=it.call(this,t)||this;return e.color=new nt.Color(1,1,1,1),e.tempColor=new nt.Color(0,0,0,0),e}function Pe(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 Le(t){var e=ut.call(this,t)||this;return e.color=new lt.Color(.38,.94,0,1),e}function _e(t){var e=ft.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 dt.Color(1,1,1,1),e.offset=dt.Utils.newFloatArray(8),e.uvs=dt.Utils.newFloatArray(8),e.tempColor=new dt.Color(1,1,1,1),e}function ke(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}function Fe(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}function Oe(e,t){return void 0===t&&(t=""),wt.call(this,function(t){return new xt.webgl.GLTexture(e,t)},t)||this}function Ve(t,e){this.position=new bt.Vector3(0,0,0),this.direction=new bt.Vector3(0,0,-1),this.up=new bt.Vector3(0,1,0),this.near=0,this.far=100,this.zoom=1,this.viewportWidth=0,this.viewportHeight=0,this.projectionView=new bt.Matrix4,this.inverseProjectionView=new bt.Matrix4,this.projection=new bt.Matrix4,this.view=new bt.Matrix4,this.tmp=new bt.Vector3,this.viewportWidth=t,this.viewportHeight=e,this.update()}function De(t,e,n){void 0===n&&(n=!1);var i=It.call(this,e)||this;return i.texture=null,i.boundUnit=0,i.useMipMaps=!1,i.context=t instanceof St.ManagedWebGLRenderingContext?t:new St.ManagedWebGLRenderingContext(t),i.useMipMaps=n,i.restore(),i.context.addRestorable(i),i}function Ne(t,e,n){if(void 0===e&&(e=!0),void 0===n&&(n=10920),this.isDrawing=!1,this.shader=null,this.lastTexture=null,this.verticesLength=0,this.indicesLength=0,10920<n)throw new Error("Can't have more than 10920 triangles per batch: "+n);this.context=t instanceof kt.ManagedWebGLRenderingContext?t:new kt.ManagedWebGLRenderingContext(t);var i=e?[new kt.Position2Attribute,new kt.ColorAttribute,new kt.TexCoordAttribute,new kt.Color2Attribute]:[new kt.Position2Attribute,new kt.ColorAttribute,new kt.TexCoordAttribute];this.mesh=new kt.Mesh(t,i,n,3*n),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function Ue(t,e,n){void 0===n&&(n=!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 Ot.Color(1,1,1,1),this.canvas=t,this.context=e instanceof Vt.ManagedWebGLRenderingContext?e:new Vt.ManagedWebGLRenderingContext(e),this.twoColorTint=n,this.camera=new Vt.OrthoCamera(t.width,t.height),this.batcherShader=n?Vt.Shader.newTwoColoredTextured(this.context):Vt.Shader.newColoredTextured(this.context),this.batcher=new Vt.PolygonBatcher(this.context,n),this.shapesShader=Vt.Shader.newColored(this.context),this.shapes=new Vt.ShapeRenderer(this.context),this.skeletonRenderer=new Vt.SkeletonRenderer(this.context,n),this.skeletonDebugRenderer=new Vt.SkeletonDebugRenderer(this.context)}function Be(t,e,n){this.vertexShader=e,this.fragmentShader=n,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=n,this.context=t instanceof Xt.ManagedWebGLRenderingContext?t:new Xt.ManagedWebGLRenderingContext(t),this.context.addRestorable(this),this.compile()}function Xe(t,e){if(void 0===e&&(e=10920),this.isDrawing=!1,this.shapeType=qt.Filled,this.color=new zt.Color(1,1,1,1),this.vertexIndex=0,this.tmp=new zt.Vector2,10920<e)throw new Error("Can't have more than 10920 triangles per batch: "+e);this.context=t instanceof Wt.ManagedWebGLRenderingContext?t:new Wt.ManagedWebGLRenderingContext(t),this.mesh=new Wt.Mesh(t,[new Wt.Position2Attribute,new Wt.ColorAttribute],e,0),this.srcBlend=this.context.gl.SRC_ALPHA,this.dstBlend=this.context.gl.ONE_MINUS_SRC_ALPHA}function Ye(t){this.boneLineColor=new jt.Color(1,0,0,1),this.boneOriginColor=new jt.Color(0,1,0,1),this.attachmentLineColor=new jt.Color(0,0,1,.5),this.triangleLineColor=new jt.Color(1,.64,0,.5),this.pathColor=(new jt.Color).setFromString("FF7F00"),this.clipColor=new jt.Color(.8,0,0,2),this.aabbColor=new jt.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 jt.SkeletonBounds,this.temp=new Array,this.vertices=jt.Utils.newFloatArray(2048),this.context=t instanceof Zt.ManagedWebGLRenderingContext?t:new Zt.ManagedWebGLRenderingContext(t)}function ze(t,e){void 0===e&&(e=!0),this.premultipliedAlpha=!1,this.vertexEffect=null,this.tempColor=new Qt.Color,this.tempColor2=new Qt.Color,this.vertexSize=8,this.twoColorTint=!1,this.renderable=new $t(null,0,0),this.clipper=new Qt.SkeletonClipping,this.temp=new Qt.Vector2,this.temp2=new Qt.Vector2,this.temp3=new Qt.Color,this.temp4=new Qt.Color,(this.twoColorTint=e)&&(this.vertexSize+=4),this.vertices=Qt.Utils.newFloatArray(1024*this.vertexSize)}function We(t,e,n){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),this.x=0,this.y=0,this.z=0,this.x=t,this.y=e,this.z=n}!function(X){var Y,t,g,e,n,i,z=(r.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},r.prototype.apply=function(t,e,n,i,r,s,o,a){if(null==t)throw new Error("skeleton cannot be null.");i&&0!=this.duration&&(n%=this.duration,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l<u;l++)h[l].apply(t,e,n,r,s,o,a)},r.binarySearch=function(t,e,n){void 0===n&&(n=1);var i=0,r=t.length/n-2;if(0==r)return n;for(var s=r>>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i<e.length;i++)this.timelineIds[e[i].getPropertyId()]=!0;this.duration=n}X.Animation=z,(t=Y=X.MixBlend||(X.MixBlend={}))[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",(e=g=X.MixDirection||(X.MixDirection={}))[e.mixIn=0]="mixIn",e[e.mixOut=1]="mixOut",(i=n=X.TimelineType||(X.TimelineType={}))[i.rotate=0]="rotate",i[i.translate=1]="translate",i[i.scale=2]="scale",i[i.shear=3]="shear",i[i.attachment=4]="attachment",i[i.color=5]="color",i[i.deform=6]="deform",i[i.event=7]="event",i[i.drawOrder=8]="drawOrder",i[i.ikConstraint=9]="ikConstraint",i[i.transformConstraint=10]="transformConstraint",i[i.pathConstraintPosition=11]="pathConstraintPosition",i[i.pathConstraintSpacing=12]="pathConstraintSpacing",i[i.pathConstraintMix=13]="pathConstraintMix",i[i.twoColor=14]="twoColor";var s=(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 n=this.curves[e];return n==m.LINEAR?m.LINEAR:n==m.STEPPED?m.STEPPED:m.BEZIER},m.prototype.setCurve=function(t,e,n,i,r){var s=.03*(2*-e+i),o=.03*(2*-n+r),a=.006*(3*(e-i)+1),h=.006*(3*(n-r)+1),l=2*s+a,u=2*o+h,c=.3*e+s+.16666667*a,d=.3*n+o+.16666667*h,f=t*m.BEZIER_SIZE,p=this.curves;p[f++]=m.BEZIER;for(var v=c,g=d,M=f+m.BEZIER_SIZE-1;f<M;f+=2)p[f]=v,p[f+1]=g,c+=l,d+=u,l+=a,u+=h,v+=c,g+=d},m.prototype.getCurvePercent=function(t,e){e=X.MathUtils.clamp(e,0,1);var n=this.curves,i=t*m.BEZIER_SIZE,r=n[i];if(r==m.LINEAR)return e;if(r==m.STEPPED)return 0;for(var s=0,o=++i,a=i+m.BEZIER_SIZE-1;i<a;i+=2)if(e<=(s=n[i])){var h=void 0,l=void 0;return(l=i==o?h=0:(h=n[i-2],n[i-1]))+(n[i+1]-l)*(e-h)/(s-h)}var u=n[i-1];return u+(1-u)*(e-s)/(1-s)},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=X.Utils.newFloatArray((t-1)*m.BEZIER_SIZE)}X.CurveTimeline=s;var o,a=(oe(M,o=s),M.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},M.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+M.ROTATION]=n},M.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return void(h.rotation=h.data.rotation);case Y.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(n>=a[a.length-M.ENTRIES]){var u=a[a.length+M.PREV_ROTATION];switch(s){case Y.setup:h.rotation=h.data.rotation+u*r;break;case Y.first:case Y.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case Y.add:h.rotation+=u*r}}else{var c=z.binarySearch(a,n,M.ENTRIES),d=a[c+M.PREV_ROTATION],f=a[c],p=this.getCurvePercent((c>>1)-1,1-(n-f)/(a[c+M.PREV_TIME]-f)),v=d+((v=a[c+M.ROTATION]-d)-360*(16384-(16384.499999999996-v/360|0)))*p;switch(s){case Y.setup:h.rotation=h.data.rotation+(v-360*(16384-(16384.499999999996-v/360|0)))*r;break;case Y.first:case Y.replace:v+=h.data.rotation-h.rotation;case Y.add:h.rotation+=(v-360*(16384-(16384.499999999996-v/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=X.Utils.newFloatArray(t<<1),e}X.RotateTimeline=a;var h,l=(oe(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return h.x=h.data.x,void(h.y=h.data.y);case Y.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,u,c,d=0,f=0;switch(n>=a[a.length-p.ENTRIES]?(d=a[a.length+p.PREV_X],f=a[a.length+p.PREV_Y]):(d=a[(l=z.binarySearch(a,n,p.ENTRIES))+p.PREV_X],f=a[l+p.PREV_Y],u=a[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(a[l+p.PREV_TIME]-u)),d+=(a[l+p.X]-d)*c,f+=(a[l+p.Y]-f)*c),s){case Y.setup:h.x=h.data.x+d*r,h.y=h.data.y+f*r;break;case Y.first:case Y.replace:h.x+=(h.data.x+d-h.x)*r,h.y+=(h.data.y+f-h.y)*r;break;case Y.add:h.x+=d*r,h.y+=f*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=X.Utils.newFloatArray(t*p.ENTRIES),e}X.TranslateTimeline=l;var u,c=(oe(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case Y.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,u,c,d=0,f=0;if(f=n>=a[a.length-x.ENTRIES]?(d=a[a.length+x.PREV_X]*h.data.scaleX,a[a.length+x.PREV_Y]*h.data.scaleY):(d=a[(l=z.binarySearch(a,n,x.ENTRIES))+x.PREV_X],f=a[l+x.PREV_Y],u=a[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(a[l+x.PREV_TIME]-u)),d=(d+(a[l+x.X]-d)*c)*h.data.scaleX,(f+(a[l+x.Y]-f)*c)*h.data.scaleY),1==r)s==Y.add?(h.scaleX+=d-h.data.scaleX,h.scaleY+=f-h.data.scaleY):(h.scaleX=d,h.scaleY=f);else{var p=0,v=0;if(o==g.mixOut)switch(s){case Y.setup:p=h.data.scaleX,v=h.data.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.first:case Y.replace:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-p)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-v)*r;break;case Y.add:p=h.scaleX,v=h.scaleY,h.scaleX=p+(Math.abs(d)*X.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=v+(Math.abs(f)*X.MathUtils.signum(v)-h.data.scaleY)*r}else switch(s){case Y.setup:p=Math.abs(h.data.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.data.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.first:case Y.replace:p=Math.abs(h.scaleX)*X.MathUtils.signum(d),v=Math.abs(h.scaleY)*X.MathUtils.signum(f),h.scaleX=p+(d-p)*r,h.scaleY=v+(f-v)*r;break;case Y.add:p=X.MathUtils.signum(d),v=X.MathUtils.signum(f),h.scaleX=Math.abs(h.scaleX)*p+(d-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*v+(f-Math.abs(h.data.scaleY)*v)*r}}}},x);function x(t){return u.call(this,t)||this}X.ScaleTimeline=c;var d,f=(oe(v,d=l),v.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},v.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case Y.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,u,c,d=0,f=0;switch(n>=a[a.length-v.ENTRIES]?(d=a[a.length+v.PREV_X],f=a[a.length+v.PREV_Y]):(d=a[(l=z.binarySearch(a,n,v.ENTRIES))+v.PREV_X],f=a[l+v.PREV_Y],u=a[l],c=this.getCurvePercent(l/v.ENTRIES-1,1-(n-u)/(a[l+v.PREV_TIME]-u)),d+=(a[l+v.X]-d)*c,f+=(a[l+v.Y]-f)*c),s){case Y.setup:h.shearX=h.data.shearX+d*r,h.shearY=h.data.shearY+f*r;break;case Y.first:case Y.replace:h.shearX+=(h.data.shearX+d-h.shearX)*r,h.shearY+=(h.data.shearY+f-h.shearY)*r;break;case Y.add:h.shearX+=d*r,h.shearY+=f*r}}},v);function v(t){return d.call(this,t)||this}X.ShearTimeline=f;var y,w=(oe(E,y=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n<h[0])switch(s){case Y.setup:return void a.color.setFromColor(a.data.color);case Y.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,d,f,p,v=0,g=0,M=0,m=0;n>=h[h.length-E.ENTRIES]?(v=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],M=h[c+E.PREV_B],m=h[c+E.PREV_A]):(v=h[(d=z.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[d+E.PREV_G],M=h[d+E.PREV_B],m=h[d+E.PREV_A],f=h[d],p=this.getCurvePercent(d/E.ENTRIES-1,1-(n-f)/(h[d+E.PREV_TIME]-f)),v+=(h[d+E.R]-v)*p,g+=(h[d+E.G]-g)*p,M+=(h[d+E.B]-M)*p,m+=(h[d+E.A]-m)*p),1==r?a.color.set(v,g,M,m):(l=a.color,s==Y.setup&&l.setFromColor(a.data.color),l.add((v-l.r)*r,(g-l.g)*r,(M-l.b)*r,(m-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=y.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*E.ENTRIES),e}X.ColorTimeline=w;var T,b=(oe(A,T=s),A.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},A.prototype.setFrame=function(t,e,n,i,r,s,o,a,h){t*=A.ENTRIES,this.frames[t]=e,this.frames[t+A.R]=n,this.frames[t+A.G]=i,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,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=this.frames;if(n<h[0])switch(s){case Y.setup:return a.color.setFromColor(a.data.color),void a.darkColor.setFromColor(a.data.darkColor);case Y.first:var l=a.color,u=a.darkColor,c=a.data.color,d=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((d.r-u.r)*r,(d.g-u.g)*r,(d.b-u.b)*r,0)}else{var f,p,v,g,M=0,m=0,x=0,y=0,w=0,E=0,T=0;n>=h[h.length-A.ENTRIES]?(M=h[(f=h.length)+A.PREV_R],m=h[f+A.PREV_G],x=h[f+A.PREV_B],y=h[f+A.PREV_A],w=h[f+A.PREV_R2],E=h[f+A.PREV_G2],T=h[f+A.PREV_B2]):(M=h[(p=z.binarySearch(h,n,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],E=h[p+A.PREV_G2],T=h[p+A.PREV_B2],v=h[p],g=this.getCurvePercent(p/A.ENTRIES-1,1-(n-v)/(h[p+A.PREV_TIME]-v)),M+=(h[p+A.R]-M)*g,m+=(h[p+A.G]-m)*g,x+=(h[p+A.B]-x)*g,y+=(h[p+A.A]-y)*g,w+=(h[p+A.R2]-w)*g,E+=(h[p+A.G2]-E)*g,T+=(h[p+A.B2]-T)*g),1==r?(a.color.set(M,m,x,y),a.darkColor.set(w,E,T,1)):(l=a.color,u=a.darkColor,s==Y.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,(E-u.g)*r,(T-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=T.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*A.ENTRIES),e}X.TwoColorTimeline=b;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u=t.slots[this.slotIndex];u.bone.active&&(o!=g.mixOut?n<(a=this.frames)[0]?s!=Y.setup&&s!=Y.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=a[a.length-1]?a.length-1:z.binarySearch(a,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==Y.setup&&this.setAttachment(t,u,u.data.attachmentName))},S.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},S);function S(t){this.frames=X.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}X.AttachmentTimeline=R;var I,C=null,P=(oe(L,I=s),L.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},L.prototype.apply=function(t,e,n,i,r,s,o){var a=t.slots[this.slotIndex];if(a.bone.active){var h=a.getAttachment();if(h instanceof X.VertexAttachment&&h.deformAttachment==this.attachment){var l=a.deform;0==l.length&&(s=Y.setup);var u=this.frameVertices,c=u[0].length,d=this.frames;if(n<d[0]){var f=h;switch(s){case Y.setup:return void(l.length=0);case Y.first:if(1==r){l.length=0;break}var p=X.Utils.setArraySize(l,c);if(null==f.bones)for(var v=f.vertices,g=0;g<c;g++)p[g]+=(v[g]-p[g])*r;else for(r=1-r,g=0;g<c;g++)p[g]*=r}}else{var M=X.Utils.setArraySize(l,c);if(n>=d[d.length-1]){var m=u[d.length-1];if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var v=f.vertices,x=0;x<c;x++)M[x]+=m[x]-v[x];else for(var y=0;y<c;y++)M[y]+=m[y];else X.Utils.arrayCopy(m,0,M,0,c);else switch(s){case Y.setup:if(null==h.bones)for(var v=h.vertices,w=0;w<c;w++){var E=v[w];M[w]=E+(m[w]-E)*r}else for(var T=0;T<c;T++)M[T]=m[T]*r;break;case Y.first:case Y.replace:for(var b=0;b<c;b++)M[b]+=(m[b]-M[b])*r;break;case Y.add:if(null==(f=h).bones)for(var v=f.vertices,A=0;A<c;A++)M[A]+=(m[A]-v[A])*r;else for(var R=0;R<c;R++)M[R]+=m[R]*r}}else{var S=z.binarySearch(d,n),I=u[S-1],C=u[S],P=d[S],L=this.getCurvePercent(S-1,1-(n-P)/(d[S-1]-P));if(1==r)if(s==Y.add)if(null==(f=h).bones)for(var v=f.vertices,_=0;_<c;_++){var k=I[_];M[_]+=k+(C[_]-k)*L-v[_]}else for(var F=0;F<c;F++)k=I[F],M[F]+=k+(C[F]-k)*L;else for(var O=0;O<c;O++)k=I[O],M[O]=k+(C[O]-k)*L;else switch(s){case Y.setup:if(null==h.bones)for(var v=h.vertices,V=0;V<c;V++)k=I[V],E=v[V],M[V]=E+(k+(C[V]-k)*L-E)*r;else for(var D=0;D<c;D++)k=I[D],M[D]=(k+(C[D]-k)*L)*r;break;case Y.first:case Y.replace:for(var N=0;N<c;N++)k=I[N],M[N]+=(k+(C[N]-k)*L-M[N])*r;break;case Y.add:if(null==(f=h).bones)for(var v=f.vertices,U=0;U<c;U++)k=I[U],M[U]+=(k+(C[U]-k)*L-v[U])*r;else for(var B=0;B<c;B++)k=I[B],M[B]+=(k+(C[B]-k)*L)*r}}}}}},L);function L(t){var e=I.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==C&&(C=X.Utils.newFloatArray(64)),e}X.DeformTimeline=P;var _=(k.prototype.getPropertyId=function(){return n.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,n,i,r,s,o){if(null!=i){var a=this.frames,h=this.frames.length;if(n<e)this.apply(t,e,Number.MAX_VALUE,i,r,s,o),e=-1;else if(e>=a[h-1])return;if(!(n<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&&n>=a[l];l++)i.push(this.events[l])}}},k);function k(t){this.frames=X.Utils.newFloatArray(t),this.events=new Array(t)}X.EventTimeline=_;var F=(O.prototype.getPropertyId=function(){return n.drawOrder<<24},O.prototype.getFrameCount=function(){return this.frames.length},O.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},O.prototype.apply=function(t,e,n,i,r,s,o){var a=t.drawOrder,h=t.slots;if(o!=g.mixOut){var l=this.frames;if(n<l[0])s!=Y.setup&&s!=Y.first||X.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var u=0,u=n>=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)X.Utils.arrayCopy(h,0,a,0,h.length);else for(var d=0,f=c.length;d<f;d++)a[d]=h[c[d]]}}else s==Y.setup&&X.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},O);function O(t){this.frames=X.Utils.newFloatArray(t),this.drawOrders=new Array(t)}X.DrawOrderTimeline=F;var V,D=(oe(N,V=s),N.prototype.getPropertyId=function(){return(n.ikConstraint<<24)+this.ikConstraintIndex},N.prototype.setFrame=function(t,e,n,i,r,s,o){t*=N.ENTRIES,this.frames[t]=e,this.frames[t+N.MIX]=n,this.frames[t+N.SOFTNESS]=i,this.frames[t+N.BEND_DIRECTION]=r,this.frames[t+N.COMPRESS]=s?1:0,this.frames[t+N.STRETCH]=o?1:0},N.prototype.apply=function(t,e,n,i,r,s,o){var a,h,l,u,c,d=this.frames,f=t.ikConstraints[this.ikConstraintIndex];if(f.active)if(n<d[0])switch(s){case Y.setup:return f.mix=f.data.mix,f.softness=f.data.softness,f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,void(f.stretch=f.data.stretch);case Y.first:f.mix+=(f.data.mix-f.mix)*r,f.softness+=(f.data.softness-f.softness)*r,f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch}else n>=d[d.length-N.ENTRIES]?s==Y.setup?(f.mix=f.data.mix+(d[d.length+N.PREV_MIX]-f.data.mix)*r,f.softness=f.data.softness+(d[d.length+N.PREV_SOFTNESS]-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(f.mix+=(d[d.length+N.PREV_MIX]-f.mix)*r,f.softness+=(d[d.length+N.PREV_SOFTNESS]-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[d.length+N.PREV_BEND_DIRECTION],f.compress=0!=d[d.length+N.PREV_COMPRESS],f.stretch=0!=d[d.length+N.PREV_STRETCH])):(h=d[(a=z.binarySearch(d,n,N.ENTRIES))+N.PREV_MIX],l=d[a+N.PREV_SOFTNESS],u=d[a],c=this.getCurvePercent(a/N.ENTRIES-1,1-(n-u)/(d[a+N.PREV_TIME]-u)),s==Y.setup?(f.mix=f.data.mix+(h+(d[a+N.MIX]-h)*c-f.data.mix)*r,f.softness=f.data.softness+(l+(d[a+N.SOFTNESS]-l)*c-f.data.softness)*r,o==g.mixOut?(f.bendDirection=f.data.bendDirection,f.compress=f.data.compress,f.stretch=f.data.stretch):(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[a+N.PREV_STRETCH])):(f.mix+=(h+(d[a+N.MIX]-h)*c-f.mix)*r,f.softness+=(l+(d[a+N.SOFTNESS]-l)*c-f.softness)*r,o==g.mixIn&&(f.bendDirection=d[a+N.PREV_BEND_DIRECTION],f.compress=0!=d[a+N.PREV_COMPRESS],f.stretch=0!=d[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=X.Utils.newFloatArray(t*N.ENTRIES),e}X.IkConstraintTimeline=D;var U,B=(oe(W,U=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n<a[0]){var l=h.data;switch(s){case Y.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case Y.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,d,f,p=0,v=0,g=0,M=0;n>=a[a.length-W.ENTRIES]?(p=a[(u=a.length)+W.PREV_ROTATE],v=a[u+W.PREV_TRANSLATE],g=a[u+W.PREV_SCALE],M=a[u+W.PREV_SHEAR]):(p=a[(c=z.binarySearch(a,n,W.ENTRIES))+W.PREV_ROTATE],v=a[c+W.PREV_TRANSLATE],g=a[c+W.PREV_SCALE],M=a[c+W.PREV_SHEAR],d=a[c],f=this.getCurvePercent(c/W.ENTRIES-1,1-(n-d)/(a[c+W.PREV_TIME]-d)),p+=(a[c+W.ROTATE]-p)*f,v+=(a[c+W.TRANSLATE]-v)*f,g+=(a[c+W.SCALE]-g)*f,M+=(a[c+W.SHEAR]-M)*f),s==Y.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(v-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(M-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(v-h.translateMix)*r,h.scaleMix+=(g-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=U.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*W.ENTRIES),e}X.TransformConstraintTimeline=B;var q,G=(oe(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return void(h.position=h.data.position);case Y.first:h.position+=(h.data.position-h.position)*r}else{var l,u,c,d=0;n>=a[a.length-H.ENTRIES]?d=a[a.length+H.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,H.ENTRIES))+H.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(a[l+H.PREV_TIME]-u)),d+=(a[l+H.VALUE]-d)*c),s==Y.setup?h.position=h.data.position+(d-h.data.position)*r:h.position+=(d-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=X.Utils.newFloatArray(t*H.ENTRIES),e}X.PathConstraintPositionTimeline=G;var j,Z=(oe(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return void(h.spacing=h.data.spacing);case Y.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,u,c,d=0;n>=a[a.length-K.ENTRIES]?d=a[a.length+K.PREV_VALUE]:(d=a[(l=z.binarySearch(a,n,K.ENTRIES))+K.PREV_VALUE],u=a[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(a[l+K.PREV_TIME]-u)),d+=(a[l+K.VALUE]-d)*c),s==Y.setup?h.spacing=h.data.spacing+(d-h.data.spacing)*r:h.spacing+=(d-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}X.PathConstraintSpacingTimeline=Z;var Q,J=(oe($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,o){var a=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<a[0])switch(s){case Y.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case Y.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,u,c,d=0,f=0;n>=a[a.length-$.ENTRIES]?(d=a[a.length+$.PREV_ROTATE],f=a[a.length+$.PREV_TRANSLATE]):(d=a[(l=z.binarySearch(a,n,$.ENTRIES))+$.PREV_ROTATE],f=a[l+$.PREV_TRANSLATE],u=a[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(a[l+$.PREV_TIME]-u)),d+=(a[l+$.ROTATE]-d)*c,f+=(a[l+$.TRANSLATE]-f)*c),s==Y.setup?(h.rotateMix=h.data.rotateMix+(d-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(f-h.data.translateMix)*r):(h.rotateMix+=(d-h.rotateMix)*r,h.translateMix+=(f-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=X.Utils.newFloatArray(t*$.ENTRIES),e}X.PathConstraintMixTimeline=J}(re=re||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n<i;n++){var r=e[n];if(null!=r){r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var s=t*r.timeScale;if(0<r.delay){if(r.delay-=s,0<r.delay)continue;s=-r.delay,r.delay=0}var 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(n,o,!0);null!=o.mixingFrom;)o.mixTime+=t,o=o.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0<t.mixTime&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r<s;r++){var o=n[r];if(!(null==o||0<o.delay)){i=!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,d=o.animation.timelines;if(0==r&&1==h||a==R.MixBlend.add)for(var f=0;f<c;f++){R.Utils.webkit602BugfixHelper(h,a);var p=d[f];p instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(p,t,u,a,!0):p.apply(t,l,u,e,h,a,R.MixDirection.mixIn)}else{var v=o.timelineMode,g=0==o.timelinesRotation.length;g&&R.Utils.setArraySize(o.timelinesRotation,c<<1,null);for(var M=o.timelinesRotation,f=0;f<c;f++){var m=d[f],x=v[f]==S.SUBSEQUENT?a:R.MixBlend.setup;m instanceof R.RotateTimeline?this.applyRotateTimeline(m,t,u,h,x,M,f<<1,g):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,E=0,T=t.slots.length;E<T;E++){var b,A=w[E];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(),i},S.prototype.applyMixingFrom=function(t,e,n){var i=t.mixingFrom;null!=i.mixingFrom&&this.applyMixingFrom(i,e,n);var r=0;0==t.mixDuration?(r=1,n==R.MixBlend.first&&(n=R.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),n!=R.MixBlend.first&&(n=i.mixBlend));var s=r<i.eventThreshold?this.events:null,o=r<i.attachmentThreshold,a=r<i.drawOrderThreshold,h=i.animationLast,l=i.getAnimationTime(),u=i.animation.timelines.length,c=i.animation.timelines,d=i.alpha*t.interruptAlpha,f=d*(1-r);if(n==R.MixBlend.add)for(var p=0;p<u;p++)c[p].apply(e,h,l,s,f,n,R.MixDirection.mixOut);else{var v=i.timelineMode,g=i.timelineHoldMix,M=0==i.timelinesRotation.length;M&&R.Utils.setArraySize(i.timelinesRotation,u<<1,null);for(var m=i.timelinesRotation,p=i.totalAlpha=0;p<u;p++){var x=c[p],y=R.MixDirection.mixOut,w=void 0,E=0;switch(v[p]){case S.SUBSEQUENT:if(!a&&x instanceof R.DrawOrderTimeline)continue;w=n,E=f;break;case S.FIRST:w=R.MixBlend.setup,E=f;break;case S.HOLD_SUBSEQUENT:w=n,E=d;break;case S.HOLD_FIRST:w=R.MixBlend.setup,E=d;break;default:w=R.MixBlend.setup;var T=g[p],E=d*Math.max(0,1-T.mixTime/T.mixDuration)}i.totalAlpha+=E,x instanceof R.RotateTimeline?this.applyRotateTimeline(x,e,l,E,w,m,p<<1,M):x instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,w,o):(R.Utils.webkit602BugfixHelper(E,n),a&&x instanceof R.DrawOrderTimeline&&w==R.MixBlend.setup&&(y=R.MixDirection.mixIn),x.apply(e,h,l,s,E,w,y))}}return 0<t.mixDuration&&this.queueEvents(i,l),this.events.length=0,i.nextAnimationLast=l,i.nextTrackLast=i.trackTime,r},S.prototype.applyAttachmentTimeline=function(t,e,n,i,r){var s,o,a=e.slots[t.slotIndex];a.bone.active&&(n<(s=t.frames)[0]?i!=R.MixBlend.setup&&i!=R.MixBlend.first||this.setAttachment(e,a,a.data.attachmentName,r):(o=n>=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-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,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,o,a){if(a&&(s[o]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,d=0;if(n<l[0])switch(r){case R.MixBlend.setup:u.rotation=u.data.rotation;default:return;case R.MixBlend.first:c=u.rotation,d=u.data.rotation}else{var f,p,v,g,c=r==R.MixBlend.setup?u.data.rotation:u.rotation;n>=l[l.length-R.RotateTimeline.ENTRIES]?d=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(f=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],v=l[f],g=h.getCurvePercent((f>>1)-1,1-(n-v)/(l[f+R.RotateTimeline.PREV_TIME]-v)),d=l[f+R.RotateTimeline.ROTATION]-p,d=p+(d-=360*(16384-(16384.499999999996-d/360|0)))*g+u.data.rotation,d-=360*(16384-(16384.499999999996-d/360|0)))}var M,m,x,y,w=0,E=d-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?w=s[o]:(m=M=0,m=a?(M=0,E):(M=s[o],s[o+1]),x=0<E,y=0<=M,R.MathUtils.signum(m)!=R.MathUtils.signum(E)&&Math.abs(m)<=90&&(180<Math.abs(M)&&(M+=360*R.MathUtils.signum(M)),y=x),w=E+M-M%360,y!=x&&(w+=360*R.MathUtils.signum(M)),s[o]=w),s[o+1]=E,c+=w*i,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}}else t.apply(e,0,n,null,1,r,R.MixDirection.mixIn)},S.prototype.queueEvents=function(t,e){for(var n=t.animationStart,i=t.animationEnd,r=i-n,s=t.trackLast%r,o=this.events,a=0,h=o.length;a<h;a++){var l=o[a];if(l.time<s)break;l.time>i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast<i)&&this.queue.complete(t);a<h;a++)o[a].time<n||this.queue.event(t,o[a])},S.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,n=this.tracks.length;e<n;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},S.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0<i.mixDuration&&(e.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(e)},S.prototype.setAnimation=function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,i,n)},S.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var i=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,i=!1):this.disposeNext(r));var s=this.trackEntry(t,e,n,r);return this.setCurrent(t,s,i),this.queue.drain(),s},S.prototype.addAnimation=function(t,e,n,i){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,i)},S.prototype.addAnimationWith=function(t,e,n,i){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s,o=this.trackEntry(t,e,n,r);return null==r?(this.setCurrent(t,o,!0),this.queue.drain()):(r.next=o,i<=0&&(0!=(s=r.animationEnd-r.animationStart)?(r.loop?i+=s*(1+(r.trackTime/s|0)):i+=Math.max(s,r.trackTime),i-=this.data.getMix(r.animation,e)):i=r.trackTime)),o.delay=i,o},S.prototype.setEmptyAnimation=function(t,e){var n=this.setAnimationWith(t,S.emptyAnimation,!1);return n.mixDuration=e,n.trackEnd=e,n},S.prototype.addEmptyAnimation=function(t,e,n){n<=0&&(n-=e);var i=this.addAnimationWith(t,S.emptyAnimation,!1,n);return i.mixDuration=e,i.trackEnd=e,i},S.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n<i;n++){var r=this.tracks[n];null!=r&&this.setEmptyAnimation(r.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},S.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(R.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},S.prototype.trackEntry=function(t,e,n,i){var r=this.trackEntryPool.obtain();return r.trackIndex=t,r.animation=e,r.loop=n,r.holdPrevious=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.interruptAlpha=1,r.mixTime=0,r.mixDuration=null==i?0:this.data.getMix(i.animation,e),r.mixBlend=R.MixBlend.replace,r},S.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},S.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var t=0,e=this.tracks.length;t<e;t++){var n=this.tracks[t];if(null!=n){for(;null!=n.mixingFrom;)n=n.mixingFrom;for(;null!=n.mixingFrom&&n.mixBlend==R.MixBlend.add||this.computeHold(n),null!=(n=n.mixingTo););}}},S.prototype.computeHold=function(t){var e=t.mixingTo,n=t.animation.timelines,i=t.animation.timelines.length,r=R.Utils.setArraySize(t.timelineMode,i);t.timelineHoldMix.length=0;var s=R.Utils.setArraySize(t.timelineHoldMix,i),o=this.propertyIDs;if(null!=e&&e.holdPrevious)for(var a=0;a<i;a++)r[a]=o.add(n[a].getPropertyId())?S.HOLD_FIRST:S.HOLD_SUBSEQUENT;else t:for(a=0;a<i;a++){var h=n[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=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var a,i,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,n=0;n<t.length;n+=2){var i=t[n],r=t[n+1];switch(i){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+n++];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,(i=a=R.EventType||(R.EventType={}))[i.start=0]="start",i[i.interrupt=1]="interrupt",i[i.end=2]="end",i[i.dispose=3]="dispose",i[i.complete=4]="complete",i[i.event=5]="event";var 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}(re=re||{}),t=re=re||{},ae.prototype.setMix=function(t,e,n){var i=this.skeletonData.findAnimation(t);if(null==i)throw new Error("Animation not found: "+t);var r=this.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);this.setMixWith(i,r,n)},ae.prototype.setMixWith=function(t,e,n){if(null==t)throw new Error("from cannot be null.");if(null==e)throw new Error("to cannot be null.");var i=t.name+"."+e.name;this.animationToMixTime[i]=n},ae.prototype.getMix=function(t,e){var n=t.name+"."+e.name,i=this.animationToMixTime[n];return void 0===i?this.defaultMix:i},e=ae,t.AnimationStateData=e,f=re=re||{},he.prototype.downloadText=function(t,e,n){var i=new XMLHttpRequest;i.overrideMimeType("text/html"),this.rawDataUris[t]&&(t=this.rawDataUris[t]),i.open("GET",t,!0),i.onload=function(){200==i.status?e(i.responseText):n(i.status,i.responseText)},i.onerror=function(){n(i.status,i.responseText)},i.send()},he.prototype.downloadBinary=function(t,e,n){var i=new XMLHttpRequest;this.rawDataUris[t]&&(t=this.rawDataUris[t]),i.open("GET",t,!0),i.responseType="arraybuffer",i.onload=function(){200==i.status?e(new Uint8Array(i.response)):n(i.status,i.responseText)},i.onerror=function(){n(i.status,i.responseText)},i.send()},he.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},he.prototype.loadBinary=function(n,e,i){var r=this;void 0===e&&(e=null),void 0===i&&(i=null),n=this.pathPrefix+n,this.toLoad++,this.downloadBinary(n,function(t){r.assets[n]=t,e&&e(n,t),r.toLoad--,r.loaded++},function(t,e){r.errors[n]="Couldn't load binary "+n+": status "+status+", "+e,i&&i(n,"Couldn't load binary "+n+": status "+status+", "+e),r.toLoad--,r.loaded++})},he.prototype.loadText=function(n,e,i){var r=this;void 0===e&&(e=null),void 0===i&&(i=null),n=this.pathPrefix+n,this.toLoad++,this.downloadText(n,function(t){r.assets[n]=t,e&&e(n,t),r.toLoad--,r.loaded++},function(t,e){r.errors[n]="Couldn't load text "+n+": status "+status+", "+e,i&&i(n,"Couldn't load text "+n+": status "+status+", "+e),r.toLoad--,r.loaded++})},he.prototype.loadTexture=function(n,i,e){var r=this;void 0===i&&(i=null),void 0===e&&(e=null);var s=n=this.pathPrefix+n;this.toLoad++;var o=new Image;o.crossOrigin="anonymous",o.onload=function(t){var e=r.textureLoader(o);r.assets[s]=e,r.toLoad--,r.loaded++,i&&i(n,o)},o.onerror=function(t){r.errors[n]="Couldn't load image "+n,r.toLoad--,r.loaded++,e&&e(n,"Couldn't load image "+n)},this.rawDataUris[n]&&(n=this.rawDataUris[n]),o.src=n},he.prototype.loadTextureAtlas=function(h,l,u){var c=this;void 0===l&&(l=null),void 0===u&&(u=null);var d=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 f.TextureAtlas(s,function(t){a.push(""==d?t:d+"/"+t);var e=document.createElement("img");return e.width=16,e.height=16,new f.FakeTexture(e)})}catch(t){var e=t;return c.errors[h]="Couldn't load texture atlas "+h+": "+e.message,u&&u(h,"Couldn't load texture atlas "+h+": "+e.message),c.toLoad--,void c.loaded++}for(var t=0,n=a;t<n.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 n=new f.TextureAtlas(s,function(t){return c.get(""==d?t:d+"/"+t)});c.assets[h]=n,l&&l(h,n),c.toLoad--,c.loaded++}catch(t){var i=t;c.errors[h]="Couldn't load texture atlas "+h+": "+i.message,u&&u(h,"Couldn't load texture atlas "+h+": "+i.message),c.toLoad--,c.loaded++}},function(t,e){r=!0,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++)})}(n[t])},function(t,e){c.errors[h]="Couldn't load texture atlas "+h+": status "+status+", "+e,u&&u(h,"Couldn't load texture atlas "+h+": status "+status+", "+e),c.toLoad--,c.loaded++})},he.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},he.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},he.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},he.prototype.isLoadingComplete=function(){return 0==this.toLoad},he.prototype.getToLoad=function(){return this.toLoad},he.prototype.getLoaded=function(){return this.loaded},he.prototype.dispose=function(){this.removeAll()},he.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},he.prototype.getErrors=function(){return this.errors},n=he,f.AssetManager=n,s=re=re||{},le.prototype.newRegionAttachment=function(t,e,n){var i=this.atlas.findRegion(n);if(null==i)throw new Error("Region not found in atlas: "+n+" (region attachment: "+e+")");i.renderObject=i;var r=new s.RegionAttachment(e);return r.setRegion(i),r},le.prototype.newMeshAttachment=function(t,e,n){var i=this.atlas.findRegion(n);if(null==i)throw new Error("Region not found in atlas: "+n+" (mesh attachment: "+e+")");i.renderObject=i;var r=new s.MeshAttachment(e);return r.region=i,r},le.prototype.newBoundingBoxAttachment=function(t,e){return new s.BoundingBoxAttachment(e)},le.prototype.newPathAttachment=function(t,e){return new s.PathAttachment(e)},le.prototype.newPointAttachment=function(t,e){return new s.PointAttachment(e)},le.prototype.newClippingAttachment=function(t,e){return new s.ClippingAttachment(e)},r=le,s.AtlasAttachmentLoader=r,o=re=re||{},(a=o.BlendMode||(o.BlendMode={}))[a.Normal=0]="Normal",a[a.Additive=1]="Additive",a[a.Multiply=2]="Multiply",a[a.Screen=3]="Screen",L=re=re||{},ue.prototype.isActive=function(){return this.active},ue.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},ue.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},ue.prototype.updateWorldTransformWith=function(t,e,n,i,r,s,o){this.ax=t,this.ay=e,this.arotation=n,this.ascaleX=i,this.ascaleY=r,this.ashearX=s,this.ashearY=o,this.appliedValid=!0;var a=this.parent;if(null==a){var h=this.skeleton,l=n+90+o,u=h.scaleX,c=h.scaleY;return this.a=L.MathUtils.cosDeg(n+s)*i*u,this.b=L.MathUtils.cosDeg(l)*r*u,this.c=L.MathUtils.sinDeg(n+s)*i*c,this.d=L.MathUtils.sinDeg(l)*r*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var d=a.a,f=a.b,p=a.c,v=a.d;switch(this.worldX=d*t+f*e+a.worldX,this.worldY=p*t+v*e+a.worldY,this.data.transformMode){case L.TransformMode.Normal:var l=n+90+o,g=L.MathUtils.cosDeg(n+s)*i,M=L.MathUtils.cosDeg(l)*r,m=L.MathUtils.sinDeg(n+s)*i,x=L.MathUtils.sinDeg(l)*r;return this.a=d*g+f*m,this.b=d*M+f*x,this.c=p*g+v*m,void(this.d=p*M+v*x);case L.TransformMode.OnlyTranslation:l=n+90+o,this.a=L.MathUtils.cosDeg(n+s)*i,this.b=L.MathUtils.cosDeg(l)*r,this.c=L.MathUtils.sinDeg(n+s)*i,this.d=L.MathUtils.sinDeg(l)*r;break;case L.TransformMode.NoRotationOrReflection:var y=0,w=n+s-(y=1e-4<(T=d*d+p*p)?(T=Math.abs(d*v-f*p)/T,d/=this.skeleton.scaleX,f=(p/=this.skeleton.scaleY)*T,v=d*T,Math.atan2(p,d)*L.MathUtils.radDeg):(p=d=0,90-Math.atan2(v,f)*L.MathUtils.radDeg)),E=n+o-y+90,g=L.MathUtils.cosDeg(w)*i,M=L.MathUtils.cosDeg(E)*r,m=L.MathUtils.sinDeg(w)*i,x=L.MathUtils.sinDeg(E)*r;this.a=d*g-f*m,this.b=d*M-f*x,this.c=p*g+v*m,this.d=p*M+v*x;break;case L.TransformMode.NoScale:case L.TransformMode.NoScaleOrReflection:var T,b=L.MathUtils.cosDeg(n),A=L.MathUtils.sinDeg(n),R=(d*b+f*A)/this.skeleton.scaleX,S=(p*b+v*A)/this.skeleton.scaleY;1e-5<(T=Math.sqrt(R*R+S*S))&&(T=1/T),R*=T,S*=T,T=Math.sqrt(R*R+S*S),this.data.transformMode==L.TransformMode.NoScale&&d*v-f*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T);var I=Math.PI/2+Math.atan2(S,R),C=Math.cos(I)*T,P=Math.sin(I)*T,g=L.MathUtils.cosDeg(s)*i,M=L.MathUtils.cosDeg(90+o)*r,m=L.MathUtils.sinDeg(s)*i,x=L.MathUtils.sinDeg(90+o)*r;this.a=R*g+C*m,this.b=R*M+C*x,this.c=S*g+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},ue.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},ue.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*L.MathUtils.radDeg},ue.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*L.MathUtils.radDeg},ue.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},ue.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},ue.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)*L.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)*L.MathUtils.radDeg);var e=t.a,n=t.b,i=t.c,r=t.d,s=1/(e*r-n*i),o=this.worldX-t.worldX,a=this.worldY-t.worldY;this.ax=o*r*s-a*n*s,this.ay=a*e*s-o*i*s;var h,l=s*r,u=s*e,c=s*n,d=s*i,f=l*this.a-c*this.c,p=l*this.b-c*this.d,v=u*this.c-d*this.a,g=u*this.d-d*this.b;this.ashearX=0,this.ascaleX=Math.sqrt(f*f+v*v),1e-4<this.ascaleX?(h=f*g-p*v,this.ascaleY=h/this.ascaleX,this.ashearY=Math.atan2(f*p+v*g,h)*L.MathUtils.radDeg,this.arotation=Math.atan2(v,f)*L.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*L.MathUtils.radDeg)},ue.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),o=t.x-this.worldX,a=t.y-this.worldY;return t.x=o*r*s-a*n*s,t.y=a*e*s-o*i*s,t},ue.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},ue.prototype.worldToLocalRotation=function(t){var e=L.MathUtils.sinDeg(t),n=L.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*L.MathUtils.radDeg+this.rotation-this.shearX},ue.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=L.MathUtils.sinDeg(t),n=L.MathUtils.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*L.MathUtils.radDeg},ue.prototype.rotateWorld=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=L.MathUtils.cosDeg(t),o=L.MathUtils.sinDeg(t);this.a=s*e-o*i,this.b=s*n-o*r,this.c=o*e+s*i,this.d=o*n+s*r,this.appliedValid=!1},h=ue,L.Bone=h,(l=re=re||{}).BoneData=ce,(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",(re||(re={})).ConstraintData=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n},(re||(re={})).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(re||(re={})).EventData=function(t){this.name=t},ht=re=re||{},de.prototype.isActive=function(){return this.active},de.prototype.apply=function(){this.update()},de.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)}},de.prototype.apply1=function(t,e,n,i,r,s,o){t.appliedValid||t.updateAppliedTransform();var a=t.parent,h=a.a,l=a.b,u=a.c,c=a.d,d=-t.ashearX-t.arotation,f=0,p=0;switch(t.data.transformMode){case ht.TransformMode.OnlyTranslation:f=e-t.worldX,p=n-t.worldY;break;case ht.TransformMode.NoRotationOrReflection:var v=Math.abs(h*c-l*u)/(h*h+u*u),g=h/t.skeleton.scaleX,M=u/t.skeleton.scaleY,l=-M*v*t.skeleton.scaleX,c=g*v*t.skeleton.scaleY;d+=Math.atan2(M,g)*ht.MathUtils.radDeg;default:var m=e-a.worldX,x=n-a.worldY,y=h*c-l*u,f=(m*c-x*l)/y-t.ax,p=(x*h-m*u)/y-t.ay}d+=Math.atan2(p,f)*ht.MathUtils.radDeg,t.ascaleX<0&&(d+=180),180<d?d-=360:d<-180&&(d+=360);var w=t.ascaleX,E=t.ascaleY;if(i||r){switch(t.data.transformMode){case ht.TransformMode.NoScale:case ht.TransformMode.NoScaleOrReflection:f=e-t.worldX,p=n-t.worldY}var T=t.data.length*w,b=Math.sqrt(f*f+p*p);(i&&b<T||r&&T<b&&1e-4<T)&&(w*=v=(b/T-1)*o+1,s&&(E*=v))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+d*o,w,E,t.ashearX,t.ashearY)},de.prototype.apply2=function(t,e,n,i,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,d=t.ascaleY,f=e.ascaleX,p=0,v=0,g=0,g=u<0?(u=-u,p=180,-1):(p=0,1);d<0&&(d=-d,g=-g),v=f<0?(f=-f,180):0;var M=e.ax,m=0,x=0,y=0,w=t.a,E=t.b,T=t.c,b=t.d,A=Math.abs(u-d)<=1e-4,y=A?(x=w*M+E*(m=e.ay)+t.worldX,T*M+b*m+t.worldY):(m=0,x=w*M+t.worldX,T*M+t.worldY),R=t.parent,w=R.a,E=R.b;T=R.c;var S,I=1/(w*(b=R.d)-E*T),C=x-R.worldX,P=y-R.worldY,L=(C*b-P*E)*I-h,_=(P*w-C*T)*I-l,k=Math.sqrt(L*L+_*_),F=e.data.length*f;if(k<1e-4)return this.apply1(t,n,i,!1,s,!1,a),void e.updateWorldTransformWith(M,m,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var O,V,D,N=((C=n-R.worldX)*b-(P=i-R.worldY)*E)*I-h,U=(P*w-C*T)*I-l,B=N*N+U*U;0!=o&&(o*=u*(f+1)/2,0<(V=(O=Math.sqrt(B))-k-F*u+o)&&(B=(N-=(D=(V-o*(1-(D=Math.min(1,V/(2*o))-1)*D))/O)*N)*N+(U-=D*U)*U));t:if(A){var X=(B-k*k-(F*=u)*F)/(2*k*F);X<-1?X=-1:1<X&&(X=1,s&&(c*=(Math.sqrt(B)/(k+F)-1)*a+1)),S=Math.acos(X)*r,w=k+F*X,E=F*Math.sin(S),st=Math.atan2(U*w-N*E,N*w+U*E)}else{var Y=(w=u*F)*w,z=(E=d*F)*E,W=Math.atan2(U,N),q=-2*z*k,G=z-Y;if(0<=(b=q*q-4*G*(T=z*k*k+Y*B-Y*z))){var H=Math.sqrt(b);q<0&&(H=-H);var j=(H=-(q+H)/2)/G,Z=T/H,K=Math.abs(j)<Math.abs(Z)?j:Z;if(K*K<=B){P=Math.sqrt(B-K*K)*r,st=W-Math.atan2(P,K),S=Math.atan2(P/d,(K-k)/u);break t}}var Q=ht.MathUtils.PI,J=k-w,$=J*J,tt=0,et=0,nt=k+w,it=nt*nt,rt=0;-1<=(T=-w*k/(Y-z))&&T<=1&&(T=Math.acos(T),(b=(C=w*Math.cos(T)+k)*C+(P=E*Math.sin(T))*P)<$&&(Q=T,$=b,J=C,tt=P),it<b&&(et=T,it=b,nt=C,rt=P)),S=B<=($+it)/2?(st=W-Math.atan2(tt*r,J),Q*r):(st=W-Math.atan2(rt*r,nt),et*r)}var st,ot=Math.atan2(m,M)*g,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)*g+v-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()},d=de,ht.IkConstraint=d,p=re=re||{},v=p.ConstraintData,oe(fe,v),g=fe,p.IkConstraintData=g,j=re=re||{},pe.prototype.isActive=function(){return this.active},pe.prototype.apply=function(){this.update()},pe.prototype.update=function(){var t=this.target.getAttachment();if(t instanceof j.PathAttachment){var e=this.rotateMix,n=this.translateMix,i=0<e;if(0<n||i){var r=this.data,s=r.spacingMode==j.SpacingMode.Percent,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,d=j.Utils.setArraySize(this.spaces,u),f=null,p=this.spacing;if(h||!s){h&&(f=j.Utils.setArraySize(this.lengths,l));for(var v=r.spacingMode==j.SpacingMode.Length,g=0,M=u-1;g<M;){var m,x,y=(R=c[g]).data.length;y<pe.epsilon?(h&&(f[g]=0),d[++g]=0):s?(h&&(I=y*R.a,C=y*R.c,m=Math.sqrt(I*I+C*C),f[g]=m),d[++g]=p):(I=y*R.a,C=y*R.c,x=Math.sqrt(I*I+C*C),h&&(f[g]=x),d[++g]=(v?y+p:p)*x/y)}}else for(g=1;g<u;g++)d[g]=p;var w=this.computeWorldPositions(t,u,a,r.positionMode==j.PositionMode.Percent,s),E=w[0],T=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,g=0,S=3;g<l;g++,S+=3){(R=c[g]).worldX+=(E-R.worldX)*n,R.worldY+=(T-R.worldY)*n;var I,C,P,L,_,k,F,O,V,D,N,U,B=(I=w[S])-E,X=(C=w[S+1])-T;!h||0!=(P=f[g])&&(L=(Math.sqrt(B*B+X*X)/P-1)*e+1,R.a*=L,R.c*=L),E=I,T=C,i&&(_=R.a,k=R.b,F=R.c,O=R.d,D=V=U=0,U=a?w[S-1]:0==d[g+1]?w[S+2]:Math.atan2(X,B),U-=Math.atan2(F,_),A?(V=Math.cos(U),D=Math.sin(U),E+=((N=R.data.length)*(V*_-D*F)-B)*e,T+=(N*(D*_+V*F)-X)*e):U+=b,U>j.MathUtils.PI?U-=j.MathUtils.PI2:U<-j.MathUtils.PI&&(U+=j.MathUtils.PI2),U*=e,V=Math.cos(U),D=Math.sin(U),R.a=V*_-D*F,R.b=V*k-D*O,R.c=D*_+V*F,R.d=D*k+V*O),R.appliedValid=!1}}}},pe.prototype.computeWorldPositions=function(t,e,n,i,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,d=c/6,f=pe.NONE;if(!t.constantSpeed){var p=t.lengths,v=p[d-=u?1:2];if(i&&(o*=v),r)for(var g=1;g<e;g++)a[g]*=v;l=j.Utils.setArraySize(this.world,8);for(var g=0,M=0,m=0;g<e;g++,M+=3){var x=o+=z=a[g];if(u)(x%=v)<0&&(x+=v),m=0;else{if(x<0){f!=pe.BEFORE&&(f=pe.BEFORE,t.computeWorldVertices(s,2,4,l,0,2)),this.addBeforePosition(x,l,0,h,M);continue}if(v<x){f!=pe.AFTER&&(f=pe.AFTER,t.computeWorldVertices(s,c-6,4,l,0,2)),this.addAfterPosition(x-v,l,0,h,M);continue}}for(;;m++){var y=p[m];if(!(y<x)){0==m?x/=y:x=(x-(G=p[m-1]))/(y-G);break}}m!=f&&(f=m,u&&m==d?(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,n||0<g&&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]):(d--,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,d),E=0,T=l[0],b=l[1],A=0,R=0,S=0,I=0,C=0,P=0,L=0,_=0,k=0,F=0,O=0,V=0,D=0,N=0,g=0,U=2;g<d;g++,U+=6)A=l[U],R=l[U+1],S=l[U+2],I=l[U+3],O=2*(L=.1875*(T-2*A+S))+(k=.09375*(3*(A-S)-T+(C=l[U+4]))),V=2*(_=.1875*(b-2*R+I))+(F=.09375*(3*(R-I)-b+(P=l[U+5]))),D=.75*(A-T)+L+.16666667*k,N=.75*(R-b)+_+.16666667*F,E+=Math.sqrt(D*D+N*N),D+=O,N+=V,O+=k,V+=F,E+=Math.sqrt(D*D+N*N),D+=O,N+=V,E+=Math.sqrt(D*D+N*N),D+=O+k,N+=V+F,E+=Math.sqrt(D*D+N*N),w[g]=E,T=C,b=P;if(o*=i?E:E/t.lengths[d-1],r)for(g=1;g<e;g++)a[g]*=E;for(var B=this.segments,X=0,g=0,M=0,m=0,Y=0;g<e;g++,M+=3){var z,x=o+=z=a[g];if(u)(x%=E)<0&&(x+=E),m=0;else{if(x<0){this.addBeforePosition(x,l,0,h,M);continue}if(E<x){this.addAfterPosition(x-E,l,c-4,h,M);continue}}for(;;m++){var W=w[m];if(!(W<x)){0==m?x/=W:x=(x-(G=w[m-1]))/(W-G);break}}if(m!=f){var q=6*(f=m),T=l[q],b=l[q+1],A=l[q+2],R=l[q+3],S=l[q+4],I=l[q+5],O=2*(L=.03*(T-2*A+S))+(k=.006*(3*(A-S)-T+(C=l[q+6]))),V=2*(_=.03*(b-2*R+I))+(F=.006*(3*(R-I)-b+(P=l[q+7]))),D=.3*(A-T)+L+.16666667*k,N=.3*(R-b)+_+.16666667*F,X=Math.sqrt(D*D+N*N);for(B[0]=X,q=1;q<8;q++)D+=O,N+=V,O+=k,V+=F,X+=Math.sqrt(D*D+N*N),B[q]=X;D+=O,N+=V,X+=Math.sqrt(D*D+N*N),B[8]=X,D+=O+k,N+=V+F,X+=Math.sqrt(D*D+N*N),B[9]=X,Y=0}for(x*=X;;Y++){var G,H=B[Y];if(!(H<x)){0==Y?x/=H:x=Y+(x-(G=B[Y-1]))/(H-G);break}}this.addCurvePosition(.1*x,T,b,A,R,S,I,C,P,h,M,n||0<g&&0==z)}return h},pe.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],o=e[n+1],a=e[n+2]-s,h=e[n+3]-o,l=Math.atan2(h,a);i[r]=s+t*Math.cos(l),i[r+1]=o+t*Math.sin(l),i[r+2]=l},pe.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],o=e[n+3],a=s-e[n],h=o-e[n+1],l=Math.atan2(h,a);i[r]=s+t*Math.cos(l),i[r+1]=o+t*Math.sin(l),i[r+2]=l},pe.prototype.addCurvePosition=function(t,e,n,i,r,s,o,a,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var d=t*t,f=d*t,p=1-t,v=p*p,g=v*p,M=p*t,m=3*M,x=p*m,y=m*t,w=e*g+i*x+s*y+a*f,E=n*g+r*x+o*y+h*f;l[u]=w,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(E-(n*v+r*M*2+o*d),w-(e*v+i*M*2+s*d)))},pe.NONE=-1,pe.BEFORE=-2,pe.AFTER=-3,pe.epsilon=1e-5,M=pe,j.PathConstraint=M,m=re=re||{},x=m.ConstraintData,oe(ve,x),T=ve,m.PathConstraintData=T,(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",(E=m.RotateMode||(m.RotateMode={}))[E.Tangent=0]="Tangent",E[E.Chain=1]="Chain",E[E.ChainScale=2]="ChainScale",b=re=re||{},ge.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},A=ge,Me.prototype.queueAsset=function(t,e,n){var i=this.clientAssets[t];return null==i&&(i=new A(t),this.clientAssets[t]=i),null!==e&&(i.textureLoader=e),i.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},Me.prototype.loadText=function(t,e){var n,i=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((n=new XMLHttpRequest).overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(200<=n.status&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send())},Me.prototype.loadJson=function(t,e){var n,i=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((n=new XMLHttpRequest).overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(200<=n.status&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send())},Me.prototype.loadTexture=function(t,e,n){var i,r=this;n=this.pathPrefix+n,this.queueAsset(t,e,n)&&((i=new Image).crossOrigin="anonymous",i.onload=function(t){r.rawAssets[n]=i},i.onerror=function(t){r.errors[n]="Couldn't load image "+n},i.src=n)},Me.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},Me.prototype.updateClientAssets=function(t){for(var e=0;e<t.toLoad.length;e++){var n=t.toLoad[e],i=t.assets[n];if(null==i){var r=this.rawAssets[n];if(null==r)continue;r instanceof HTMLImageElement?t.assets[n]=t.textureLoader(r):t.assets[n]=r}}},Me.prototype.isLoadingComplete=function(t){var e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())},Me.prototype.dispose=function(){},Me.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Me.prototype.getErrors=function(){return this.errors},R=Me,b.SharedAssetManager=R,S=re=re||{},me.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var i=this.skin.bones,e=0,n=this.skin.bones.length;e<n;e++)for(var r=this.bones[i[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,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 d=0;d<h;d++)if((f=s[d]).data.order==e){this.sortIkConstraint(f);continue t}for(d=0;d<l;d++)if((f=o[d]).data.order==e){this.sortTransformConstraint(f);continue t}for(var f,d=0;d<u;d++)if((f=a[d]).data.order==e){this.sortPathConstraint(f);continue t}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},me.prototype.sortIkConstraint=function(t){var e,n,i,r;t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active&&(e=t.target,this.sortBone(e),i=(n=t.bones)[0],this.sortBone(i),1<n.length&&(r=n[n.length-1],-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)),this._updateCache.push(t),this.sortReset(i.children),n[n.length-1].sorted=!0)},me.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,n=e.data.index,i=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var r=0,s=this.data.skins.length;r<s;r++)this.sortPathConstraintAttachment(this.data.skins[r],n,i);var o=e.getAttachment();o instanceof S.PathAttachment&&this.sortPathConstraintAttachmentWith(o,i);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}},me.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,n=e.length;if(t.data.local)for(var i=0;i<n;i++){var r=e[i];this.sortBone(r.parent),-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)}else for(i=0;i<n;i++)this.sortBone(e[i]);this._updateCache.push(t);for(var s=0;s<n;s++)this.sortReset(e[s].children);for(s=0;s<n;s++)e[s].sorted=!0}},me.prototype.sortPathConstraintAttachment=function(t,e,n){var i=t.attachments[e];if(i)for(var r in i)this.sortPathConstraintAttachmentWith(i[r],n)},me.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof S.PathAttachment){var n=t.bones;if(null==n)this.sortBone(e);else for(var i=this.bones,r=0;r<n.length;)for(var s=n[r++],o=r+s;r<o;r++){var a=n[r];this.sortBone(i[a])}}},me.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},me.prototype.sortReset=function(t){for(var e=0,n=t.length;e<n;e++){var i=t[e];i.active&&(i.sorted&&this.sortReset(i.children),i.sorted=!1)}},me.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,n=t.length;e<n;e++){var i=t[e];i.ax=i.x,i.ay=i.y,i.arotation=i.rotation,i.ascaleX=i.scaleX,i.ascaleY=i.scaleY,i.ashearX=i.shearX,i.ashearY=i.shearY,i.appliedValid=!0}for(var r=this._updateCache,e=0,n=r.length;e<n;e++)r[e].update()},me.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},me.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;e<n;e++)(a=i[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,n=r.length;e<n;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,n=o.length;e<n;e++){var a,s=(a=o[e]).data;a.position=s.position,a.spacing=s.spacing,a.rotateMix=s.rotateMix,a.translateMix=s.translateMix}},me.prototype.setSlotsToSetupPose=function(){var t=this.slots;S.Utils.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,n=t.length;e<n;e++)t[e].setToSetupPose()},me.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},me.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},me.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++)if(e[n].data.name==t)return n;return-1},me.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},me.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++)if(e[n].data.name==t)return n;return-1},me.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},me.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;n<i;n++){var r,s=e[n],o=s.data.attachmentName;null==o||null!=(r=t.getAttachment(n,o))&&s.setAttachment(r)}this.skin=t,this.updateCache()}},me.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},me.prototype.getAttachment=function(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){var n=this.skin.getAttachment(t,e);if(null!=n)return n}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},me.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var n=this.slots,i=0,r=n.length;i<r;i++){var s=n[i];if(s.data.name==t){var o=null;if(null!=e&&null==(o=this.getAttachment(i,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(o)}}throw new Error("Slot not found: "+t)},me.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},me.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},me.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},me.prototype.getBounds=function(t,e,n){if(void 0===n&&(n=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var i=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,a=Number.NEGATIVE_INFINITY,h=0,l=i.length;h<l;h++){var u=i[h];if(u.bone.active){var c,d=0,f=null,p=u.getAttachment();if(p instanceof S.RegionAttachment?(d=8,f=S.Utils.setArraySize(n,d,0),p.computeWorldVertices(u.bone,f,0,2)):p instanceof S.MeshAttachment&&(d=(c=p).worldVerticesLength,f=S.Utils.setArraySize(n,d,0),c.computeWorldVertices(u,0,d,f,0,2)),null!=f)for(var v=0,g=f.length;v<g;v+=2)var M=f[v],m=f[v+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)},me.prototype.update=function(t){this.time+=t},I=me,S.Skeleton=I,function(W){var t=(q.prototype.readSkeletonData=function(t){var e=this.scale,n=new W.SkeletonData;n.name="";var i=new x(t);if(n.hash=i.readString(),n.version=i.readString(),"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=i.readFloat(),n.y=i.readFloat(),n.width=i.readFloat(),n.height=i.readFloat();var r=i.readBoolean();r&&(n.fps=i.readFloat(),n.imagesPath=i.readString(),n.audioPath=i.readString());for(var s=0,s=i.readInt(!0),o=0;o<s;o++)i.strings.push(i.readString());for(s=i.readInt(!0),o=0;o<s;o++){var a=i.readString(),h=0==o?null:n.bones[i.readInt(!0)];(c=new W.BoneData(o,a,h)).rotation=i.readFloat(),c.x=i.readFloat()*e,c.y=i.readFloat()*e,c.scaleX=i.readFloat(),c.scaleY=i.readFloat(),c.shearX=i.readFloat(),c.shearY=i.readFloat(),c.length=i.readFloat()*e,c.transformMode=q.TransformModeValues[i.readInt(!0)],c.skinRequired=i.readBoolean(),r&&W.Color.rgba8888ToColor(c.color,i.readInt32()),n.bones.push(c)}for(s=i.readInt(!0),o=0;o<s;o++){var l=i.readString(),u=n.bones[i.readInt(!0)],c=new W.SlotData(o,l,u);W.Color.rgba8888ToColor(c.color,i.readInt32());var d=i.readInt32();-1!=d&&W.Color.rgb888ToColor(c.darkColor=new W.Color,d),c.attachmentName=i.readStringRef(),c.blendMode=q.BlendModeValues[i.readInt(!0)],n.slots.push(c)}s=i.readInt(!0);for(var o=0,f=void 0;o<s;o++){(c=new W.IkConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),f=i.readInt(!0);for(var p=0;p<f;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.mix=i.readFloat(),c.softness=i.readFloat()*e,c.bendDirection=i.readByte(),c.compress=i.readBoolean(),c.stretch=i.readBoolean(),c.uniform=i.readBoolean(),n.ikConstraints.push(c)}for(s=i.readInt(!0),f=void(o=0);o<s;o++){for((c=new W.TransformConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),f=i.readInt(!0),p=0;p<f;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.local=i.readBoolean(),c.relative=i.readBoolean(),c.offsetRotation=i.readFloat(),c.offsetX=i.readFloat()*e,c.offsetY=i.readFloat()*e,c.offsetScaleX=i.readFloat(),c.offsetScaleY=i.readFloat(),c.offsetShearY=i.readFloat(),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),c.scaleMix=i.readFloat(),c.shearMix=i.readFloat(),n.transformConstraints.push(c)}for(s=i.readInt(!0),f=void(o=0);o<s;o++){for((c=new W.PathConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),f=i.readInt(!0),p=0;p<f;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.slots[i.readInt(!0)],c.positionMode=q.PositionModeValues[i.readInt(!0)],c.spacingMode=q.SpacingModeValues[i.readInt(!0)],c.rotateMode=q.RotateModeValues[i.readInt(!0)],c.offsetRotation=i.readFloat(),c.position=i.readFloat(),c.positionMode==W.PositionMode.Fixed&&(c.position*=e),c.spacing=i.readFloat(),c.spacingMode!=W.SpacingMode.Length&&c.spacingMode!=W.SpacingMode.Fixed||(c.spacing*=e),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),n.pathConstraints.push(c)}var v=this.readSkin(i,n,!0,r);for(null!=v&&(n.defaultSkin=v,n.skins.push(v)),o=n.skins.length,W.Utils.setArraySize(n.skins,s=o+i.readInt(!0));o<s;o++)n.skins[o]=this.readSkin(i,n,!1,r);for(s=this.linkedMeshes.length,o=0;o<s;o++){var g=this.linkedMeshes[o],M=null==g.skin?n.defaultSkin:n.findSkin(g.skin);if(null==M)throw new Error("Skin not found: "+g.skin);var m=M.getAttachment(g.slotIndex,g.parent);if(null==m)throw new Error("Parent mesh not found: "+g.parent);g.mesh.deformAttachment=g.inheritDeform?m:g.mesh,g.mesh.setParentMesh(m),g.mesh.updateUVs()}for(this.linkedMeshes.length=0,s=i.readInt(!0),o=0;o<s;o++)(c=new W.EventData(i.readStringRef())).intValue=i.readInt(!1),c.floatValue=i.readFloat(),c.stringValue=i.readString(),c.audioPath=i.readString(),null!=c.audioPath&&(c.volume=i.readFloat(),c.balance=i.readFloat()),n.events.push(c);for(s=i.readInt(!0),o=0;o<s;o++)n.animations.push(this.readAnimation(i,i.readString(),n));return n},q.prototype.readSkin=function(t,e,n,i){var r=null,s=0;if(n){if(0==(s=t.readInt(!0)))return null;r=new W.Skin("default")}else{(r=new W.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var 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(),d=this.readAttachment(t,e,r,h,c,i);null!=d&&r.setAttachment(h,c,d)}return r},q.prototype.readAttachment=function(t,e,n,i,r,s){var o=this.scale,a=t.readStringRef();null==a&&(a=r);var h=t.readByte();switch(q.AttachmentTypeValues[h]){case W.AttachmentType.Region:var l=t.readStringRef(),u=t.readFloat(),c=t.readFloat(),d=t.readFloat(),f=t.readFloat(),p=t.readFloat(),v=t.readFloat(),g=t.readFloat(),M=t.readInt32();null==l&&(l=a);var m=this.attachmentLoader.newRegionAttachment(n,a,l);return null==m?null:(m.path=l,m.x=c*o,m.y=d*o,m.scaleX=f,m.scaleY=p,m.rotation=u,m.width=v*o,m.height=g*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(n,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),E=this.readFloatArray(t,x<<1,1),T=this.readShortArray(t),y=this.readVertices(t,x),b=t.readInt(!0),A=null,v=0,g=0;return s&&(A=this.readShortArray(t),v=t.readFloat(),g=t.readFloat()),null==l&&(l=a),null==(R=this.attachmentLoader.newMeshAttachment(n,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=T,R.regionUVs=E,R.updateUVs(),R.hullLength=b<<1,s&&(R.edges=A,R.width=v*o,R.height=g*o),R);case W.AttachmentType.LinkedMesh:var R,l=t.readStringRef(),M=t.readInt32(),S=t.readStringRef(),I=t.readStringRef(),C=t.readBoolean(),v=0,g=0;return s&&(v=t.readFloat(),g=t.readFloat()),null==l&&(l=a),null==(R=this.attachmentLoader.newMeshAttachment(n,a,l))?null:(R.path=l,W.Color.rgba8888ToColor(R.color,M),s&&(R.width=v*o,R.height=g*o),this.linkedMeshes.push(new N(R,S,i,I,C)),R);case W.AttachmentType.Path:for(var P=t.readBoolean(),L=t.readBoolean(),x=t.readInt(!0),y=this.readVertices(t,x),_=W.Utils.newArray(x/3,0),k=0,F=_.length;k<F;k++)_[k]=t.readFloat()*o;return M=s?t.readInt32():0,null==(l=this.attachmentLoader.newPathAttachment(n,a))?null:(l.closed=P,l.constantSpeed=L,l.worldVerticesLength=x<<1,l.vertices=y.vertices,l.bones=y.bones,l.lengths=_,s&&W.Color.rgba8888ToColor(l.color,M),l);case W.AttachmentType.Point:var u=t.readFloat(),c=t.readFloat(),d=t.readFloat(),M=s?t.readInt32():0,O=this.attachmentLoader.newPointAttachment(n,a);return null==O?null:(O.x=c*o,O.y=d*o,O.rotation=u,s&&W.Color.rgba8888ToColor(O.color,M),O);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(n,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},q.prototype.readVertices=function(t,e){var n=e<<1,i=new u,r=this.scale;if(!t.readBoolean())return i.vertices=this.readFloatArray(t,n,r),i;for(var s=new Array,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 i.vertices=W.Utils.toFloatArray(s),i.bones=o,i},q.prototype.readFloatArray=function(t,e,n){var i=new Array(e);if(1==n)for(var r=0;r<e;r++)i[r]=t.readFloat();else for(r=0;r<e;r++)i[r]=t.readFloat()*n;return i},q.prototype.readShortArray=function(t){for(var e=t.readInt(!0),n=new Array(e),i=0;i<e;i++)n[i]=t.readShort();return n},q.prototype.readAnimation=function(t,e,n){for(var i=new Array,r=this.scale,s=0,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,d=t.readInt(!0);c<d;c++){var f=t.readByte(),p=t.readInt(!0);switch(f){case q.SLOT_ATTACHMENT:(m=new W.AttachmentTimeline(p)).slotIndex=u;for(var v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readStringRef());i.push(m),s=Math.max(s,m.frames[p-1]);break;case q.SLOT_COLOR:for((m=new W.ColorTimeline(p)).slotIndex=u,v=0;v<p;v++){var g=t.readFloat();W.Color.rgba8888ToColor(o,t.readInt32()),m.setFrame(v,g,o.r,o.g,o.b,o.a),v<p-1&&this.readCurve(t,v,m)}i.push(m),s=Math.max(s,m.frames[(p-1)*W.ColorTimeline.ENTRIES]);break;case q.SLOT_TWO_COLOR:for((m=new W.TwoColorTimeline(p)).slotIndex=u,v=0;v<p;v++)g=t.readFloat(),W.Color.rgba8888ToColor(o,t.readInt32()),W.Color.rgb888ToColor(a,t.readInt32()),m.setFrame(v,g,o.r,o.g,o.b,o.a,a.r,a.g,a.b),v<p-1&&this.readCurve(t,v,m);i.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,d=t.readInt(!0);c<d;c++)switch(f=t.readByte(),p=t.readInt(!0),f){case q.BONE_ROTATE:for((m=new W.RotateTimeline(p)).boneIndex=M,v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readFloat()),v<p-1&&this.readCurve(t,v,m);i.push(m),s=Math.max(s,m.frames[(p-1)*W.RotateTimeline.ENTRIES]);break;case q.BONE_TRANSLATE:case q.BONE_SCALE:case q.BONE_SHEAR:var m=void 0,x=1;for(f==q.BONE_SCALE?m=new W.ScaleTimeline(p):f==q.BONE_SHEAR?m=new W.ShearTimeline(p):(m=new W.TranslateTimeline(p),x=r),m.boneIndex=M,v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readFloat()*x,t.readFloat()*x),v<p-1&&this.readCurve(t,v,m);i.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,v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readFloat(),t.readFloat()*r,t.readByte(),t.readBoolean(),t.readBoolean()),v<p-1&&this.readCurve(t,v,m);i.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,v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat()),v<p-1&&this.readCurve(t,v,m);i.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=n.pathConstraints[y],c=0,d=t.readInt(!0);c<d;c++)switch(f=t.readByte(),p=t.readInt(!0),f){case q.PATH_POSITION:case q.PATH_SPACING:var m=void 0,x=1;for(f==q.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,v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readFloat()*x),v<p-1&&this.readCurve(t,v,m);i.push(m),s=Math.max(s,m.frames[(p-1)*W.PathConstraintPositionTimeline.ENTRIES]);break;case q.PATH_MIX:for((m=new W.PathConstraintMixTimeline(p)).pathConstraintIndex=y,v=0;v<p;v++)m.setFrame(v,t.readFloat(),t.readFloat(),t.readFloat()),v<p-1&&this.readCurve(t,v,m);i.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 E=n.skins[t.readInt(!0)],c=0,d=t.readInt(!0);c<d;c++)for(var u=t.readInt(!0),T=0,b=t.readInt(!0);T<b;T++){var A=E.getAttachment(u,t.readStringRef()),R=null!=A.bones,S=A.vertices,I=R?S.length/3*2:S.length,p=t.readInt(!0);for((m=new W.DeformTimeline(p)).slotIndex=u,m.attachment=A,v=0;v<p;v++){var g=t.readFloat(),C=void 0,P=t.readInt(!0);if(0==P)C=R?W.Utils.newFloatArray(I):S;else{C=W.Utils.newFloatArray(I);var L=t.readInt(!0);if(P+=L,1==r)for(var _=L;_<P;_++)C[_]=t.readFloat();else for(_=L;_<P;_++)C[_]=t.readFloat()*r;if(!R)for(var _=0,k=C.length;_<k;_++)C[_]+=S[_]}m.setFrame(v,g,C),v<p-1&&this.readCurve(t,v,m)}i.push(m),s=Math.max(s,m.frames[p-1])}var F=t.readInt(!0);if(0<F){for(var m=new W.DrawOrderTimeline(F),O=n.slots.length,h=0;h<F;h++){for(var g=t.readFloat(),V=t.readInt(!0),D=W.Utils.newArray(O,0),c=O-1;0<=c;c--)D[c]=-1;for(var N=W.Utils.newArray(O-V,0),U=0,B=0,c=0;c<V;c++){for(u=t.readInt(!0);U!=u;)N[B++]=U++;D[U+t.readInt(!0)]=U++}for(;U<O;)N[B++]=U++;for(c=O-1;0<=c;c--)-1==D[c]&&(D[c]=N[--B]);m.setFrame(h,g,D)}i.push(m),s=Math.max(s,m.frames[F-1])}var X=t.readInt(!0);if(0<X){for(m=new W.EventTimeline(X),h=0;h<X;h++){var g=t.readFloat(),Y=n.events[t.readInt(!0)],z=new W.Event(g,Y);z.intValue=t.readInt(!1),z.floatValue=t.readFloat(),z.stringValue=t.readBoolean()?t.readString():Y.stringValue,null!=z.data.audioPath&&(z.volume=t.readFloat(),z.balance=t.readFloat()),m.setFrame(h,z)}i.push(m),s=Math.max(s,m.frames[X-1])}return new W.Animation(e,i,s)},q.prototype.readCurve=function(t,e,n){switch(t.readByte()){case q.CURVE_STEPPED:n.setStepped(e);break;case q.CURVE_BEZIER:this.setCurve(n,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},q.prototype.setCurve=function(t,e,n,i,r,s){t.setCurve(e,n,i,r,s)},q.AttachmentTypeValues=[0,1,2,3,4,5,6],q.TransformModeValues=[W.TransformMode.Normal,W.TransformMode.OnlyTranslation,W.TransformMode.NoRotationOrReflection,W.TransformMode.NoScale,W.TransformMode.NoScaleOrReflection],q.PositionModeValues=[W.PositionMode.Fixed,W.PositionMode.Percent],q.SpacingModeValues=[W.SpacingMode.Length,W.SpacingMode.Fixed,W.SpacingMode.Percent],q.RotateModeValues=[W.RotateMode.Tangent,W.RotateMode.Chain,W.RotateMode.ChainScale],q.BlendModeValues=[W.BlendMode.Normal,W.BlendMode.Additive,W.BlendMode.Multiply,W.BlendMode.Screen],q.BONE_ROTATE=0,q.BONE_TRANSLATE=1,q.BONE_SCALE=2,q.BONE_SHEAR=3,q.SLOT_ATTACHMENT=0,q.SLOT_COLOR=1,q.SLOT_TWO_COLOR=2,q.PATH_POSITION=0,q.PATH_SPACING=1,q.PATH_MIX=2,q.CURVE_LINEAR=0,q.CURVE_STEPPED=1,q.CURVE_BEZIER=2,q);function q(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}W.SkeletonBinary=t;var x=(e.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},e.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},e.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},e.prototype.readInt=function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&this.readByte())<<28)))),t?n:n>>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n<t;){var i=this.readByte();switch(i>>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(re=re||{}),C=re=re||{},xe.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,o=s.length;n.length=0,r.freeAll(i);for(var a=i.length=0;a<o;a++){var h,l,u,c=s[a];c.bone.active&&(h=c.getAttachment())instanceof C.BoundingBoxAttachment&&(l=h,n.push(l),(u=r.obtain()).length!=l.worldVerticesLength&&(u=C.Utils.newFloatArray(l.worldVerticesLength)),i.push(u),l.computeWorldVertices(c,0,l.worldVerticesLength,u,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},xe.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,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],d=h[l+1],t=Math.min(t,c),e=Math.min(e,d),n=Math.max(n,c),i=Math.max(i,d);this.minX=t,this.minY=e,this.maxX=n,this.maxY=i},xe.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},xe.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,o=this.maxX,a=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||o<=t&&o<=n||a<=e&&a<=i)return!1;var h=(i-e)/(n-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},xe.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},xe.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i<r;i++)if(this.containsPointPolygon(n[i],t,e))return this.boundingBoxes[i];return null},xe.prototype.containsPointPolygon=function(t,e,n){for(var i=t,r=t.length,s=r-2,o=!1,a=0;a<r;a+=2){var h,l=i[a+1],u=i[s+1];!(l<n&&n<=u||u<n&&n<=l)||(h=i[a])+(n-l)/(u-l)*(i[s]-h)<e&&(o=!o),s=a}return o},xe.prototype.intersectsSegment=function(t,e,n,i){for(var r=this.polygons,s=0,o=r.length;s<o;s++)if(this.intersectsSegmentPolygon(r[s],t,e,n,i))return this.boundingBoxes[s];return null},xe.prototype.intersectsSegmentPolygon=function(t,e,n,i,r){for(var s=t,o=t.length,a=e-i,h=n-r,l=e*r-n*i,u=s[o-2],c=s[o-1],d=0;d<o;d+=2){var f=s[d],p=s[d+1],v=u*p-c*f,g=u-f,M=c-p,m=a*M-h*g,x=(l*g-a*v)/m;if((u<=x&&x<=f||f<=x&&x<=u)&&(e<=x&&x<=i||i<=x&&x<=e)){var y=(l*M-h*v)/m;if((c<=y&&y<=p||p<=y&&y<=c)&&(n<=y&&y<=r||r<=y&&y<=n))return!0}u=f,c=p}return!1},xe.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]},xe.prototype.getWidth=function(){return this.maxX-this.minX},xe.prototype.getHeight=function(){return this.maxY-this.minY},P=xe,C.SkeletonBounds=P,Z=re=re||{},ye.prototype.clipStart=function(t,e){if(null!=this.clipAttachment)return 0;var n=(this.clipAttachment=e).worldVerticesLength,i=Z.Utils.setArraySize(this.clippingPolygon,n);e.computeWorldVertices(t,0,n,i,0,2);var r=this.clippingPolygon;ye.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];ye.makeClockwise(h),h.push(h[0]),h.push(h[1])}return s.length},ye.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},ye.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},ye.prototype.isClipping=function(){return null!=this.clipAttachment},ye.prototype.clipTriangles=function(t,e,n,i,r,s,o,a){var h=this.clipOutput,l=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,d=this.clippingPolygons.length,f=a?12:8,p=0;l.length=0;t:for(var v=u.length=0;v<i;v+=3)for(var g=n[v]<<1,M=t[g],m=t[1+g],x=r[g],y=r[1+g],w=t[g=n[v+1]<<1],E=t[1+g],T=r[g],b=r[1+g],A=t[g=n[v+2]<<1],R=t[1+g],S=r[g],I=r[1+g],C=0;C<d;C++){var P=l.length;if(!this.clip(M,m,w,E,A,R,c[C],h)){(U=Z.Utils.setArraySize(l,P+3*f))[P]=M,U[P+1]=m,U[P+2]=s.r,U[P+3]=s.g,U[P+4]=s.b,U[P+5]=s.a,a?(U[P+6]=x,U[P+7]=y,U[P+8]=o.r,U[P+9]=o.g,U[P+10]=o.b,U[P+11]=o.a,U[P+12]=w,U[P+13]=E,U[P+14]=s.r,U[P+15]=s.g,U[P+16]=s.b,U[P+17]=s.a,U[P+18]=T,U[P+19]=b,U[P+20]=o.r,U[P+21]=o.g,U[P+22]=o.b,U[P+23]=o.a,U[P+24]=A,U[P+25]=R,U[P+26]=s.r,U[P+27]=s.g,U[P+28]=s.b,U[P+29]=s.a,U[P+30]=S,U[P+31]=I,U[P+32]=o.r,U[P+33]=o.g,U[P+34]=o.b,U[P+35]=o.a):(U[P+6]=x,U[P+7]=y,U[P+8]=w,U[P+9]=E,U[P+10]=s.r,U[P+11]=s.g,U[P+12]=s.b,U[P+13]=s.a,U[P+14]=T,U[P+15]=b,U[P+16]=A,U[P+17]=R,U[P+18]=s.r,U[P+19]=s.g,U[P+20]=s.b,U[P+21]=s.a,U[P+22]=S,U[P+23]=I),P=u.length,(j=Z.Utils.setArraySize(u,P+3))[P]=p,j[P+1]=p+1,j[P+2]=p+2,p+=3;continue t}var L=h.length;if(0!=L){for(var _=E-R,k=A-w,F=M-A,O=R-m,V=1/(_*F+k*(m-R)),D=L>>1,N=this.clipOutput,U=Z.Utils.setArraySize(l,P+D*f),B=0;B<L;B+=2){var X=N[B],Y=N[B+1];U[P]=X,U[P+1]=Y,U[P+2]=s.r,U[P+3]=s.g,U[P+4]=s.b,U[P+5]=s.a;var z=X-A,W=Y-R,q=(_*z+k*W)*V,G=(O*z+F*W)*V,H=1-q-G;U[P+6]=x*q+T*G+S*H,U[P+7]=y*q+b*G+I*H,a&&(U[P+8]=o.r,U[P+9]=o.g,U[P+10]=o.b,U[P+11]=o.a),P+=f}P=u.length;var j=Z.Utils.setArraySize(u,P+3*(D-2));for(D--,B=1;B<D;B++)j[P]=p,j[P+1]=p+B,j[P+2]=p+B+1,P+=3;p+=1+D}}},ye.prototype.clip=function(t,e,n,i,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(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),a.length=0;for(var c=o,d=o.length-4,f=0;;f+=2){for(var p=c[f],v=c[f+1],g=c[f+2],M=c[f+3],m=p-g,x=v-M,y=u,w=u.length-2,E=a.length,T=0;T<w;T+=2){var b=y[T],A=y[T+1],R=y[T+2],S=y[T+3],I=0<m*(S-M)-x*(R-g);if(0<m*(A-M)-x*(b-g)){if(I){a.push(R),a.push(S);continue}var C,P,L,_=(C=S-A)*(g-p)-(P=R-b)*(M-v);1e-6<Math.abs(_)?(L=(P*(v-A)-C*(p-b))/_,a.push(p+(g-p)*L),a.push(v+(M-v)*L)):(a.push(p),a.push(v))}else I&&(_=(C=S-A)*(g-p)-(P=R-b)*(M-v),1e-6<Math.abs(_)?(L=(P*(v-A)-C*(p-b))/_,a.push(p+(g-p)*L),a.push(v+(M-v)*L)):(a.push(p),a.push(v)),a.push(R),a.push(S));l=!0}if(E==a.length)return!(h.length=0);if(a.push(a[0]),a.push(a[1]),f==d)break;var k=a;(a=u).length=0,u=k}if(h!=a)for(var f=h.length=0,F=a.length-2;f<F;f++)h[f]=a[f];else h.length=h.length-2;return l},ye.makeClockwise=function(t){for(var e,n,i,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],n=r[a+1],i=r[a+2],o+=e*r[a+3]-i*n;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],d=l-a;r[a]=r[d],r[a+1]=r[1+d],r[d]=u,r[1+d]=c}},_=ye,Z.SkeletonClipping=_,k=re=re||{},we.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},we.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},we.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},we.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},F=we,k.SkeletonData=F,function(tt){var t=(F.prototype.readSkeletonData=function(t){var e=this.scale,n=new tt.SkeletonData,i="string"==typeof t?JSON.parse(t):t,r=i.skeleton;if(null!=r){if(n.hash=r.hash,n.version=r.spine,"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height,n.fps=r.fps,n.imagesPath=r.images}if(i.bones)for(var s=0;s<i.bones.length;s++){var o=i.bones[s],a=null,h=this.getValue(o,"parent",null);if(null!=h&&null==(a=n.findBone(h)))throw new Error("Parent bone not found: "+h);(d=new tt.BoneData(n.bones.length,o.name,a)).length=this.getValue(o,"length",0)*e,d.x=this.getValue(o,"x",0)*e,d.y=this.getValue(o,"y",0)*e,d.rotation=this.getValue(o,"rotation",0),d.scaleX=this.getValue(o,"scaleX",1),d.scaleY=this.getValue(o,"scaleY",1),d.shearX=this.getValue(o,"shearX",0),d.shearY=this.getValue(o,"shearY",0),d.transformMode=F.transformModeFromString(this.getValue(o,"transform","normal")),d.skinRequired=this.getValue(o,"skin",!1),n.bones.push(d)}if(i.slots)for(s=0;s<i.slots.length;s++){var l=(b=i.slots[s]).name,u=b.bone,c=n.findBone(u);if(null==c)throw new Error("Slot bone not found: "+u);var d=new tt.SlotData(n.slots.length,l,c),f=this.getValue(b,"color",null);null!=f&&d.color.setFromString(f);var p=this.getValue(b,"dark",null);null!=p&&(d.darkColor=new tt.Color(1,1,1,1),d.darkColor.setFromString(p)),d.attachmentName=this.getValue(b,"attachment",null),d.blendMode=F.blendModeFromString(this.getValue(b,"blend","normal")),n.slots.push(d)}if(i.ik)for(s=0;s<i.ik.length;s++){var v=i.ik[s];(d=new tt.IkConstraintData(v.name)).order=this.getValue(v,"order",0),d.skinRequired=this.getValue(v,"skin",!1);for(var g=0;g<v.bones.length;g++){if(u=v.bones[g],null==(y=n.findBone(u)))throw new Error("IK bone not found: "+u);d.bones.push(y)}var M=v.target;if(d.target=n.findBone(M),null==d.target)throw new Error("IK target bone not found: "+M);d.mix=this.getValue(v,"mix",1),d.softness=this.getValue(v,"softness",0)*e,d.bendDirection=this.getValue(v,"bendPositive",!0)?1:-1,d.compress=this.getValue(v,"compress",!1),d.stretch=this.getValue(v,"stretch",!1),d.uniform=this.getValue(v,"uniform",!1),n.ikConstraints.push(d)}if(i.transform)for(s=0;s<i.transform.length;s++){for(v=i.transform[s],(d=new tt.TransformConstraintData(v.name)).order=this.getValue(v,"order",0),d.skinRequired=this.getValue(v,"skin",!1),g=0;g<v.bones.length;g++){if(u=v.bones[g],null==(y=n.findBone(u)))throw new Error("Transform constraint bone not found: "+u);d.bones.push(y)}if(M=v.target,d.target=n.findBone(M),null==d.target)throw new Error("Transform constraint target bone not found: "+M);d.local=this.getValue(v,"local",!1),d.relative=this.getValue(v,"relative",!1),d.offsetRotation=this.getValue(v,"rotation",0),d.offsetX=this.getValue(v,"x",0)*e,d.offsetY=this.getValue(v,"y",0)*e,d.offsetScaleX=this.getValue(v,"scaleX",0),d.offsetScaleY=this.getValue(v,"scaleY",0),d.offsetShearY=this.getValue(v,"shearY",0),d.rotateMix=this.getValue(v,"rotateMix",1),d.translateMix=this.getValue(v,"translateMix",1),d.scaleMix=this.getValue(v,"scaleMix",1),d.shearMix=this.getValue(v,"shearMix",1),n.transformConstraints.push(d)}if(i.path)for(s=0;s<i.path.length;s++){for(v=i.path[s],(d=new tt.PathConstraintData(v.name)).order=this.getValue(v,"order",0),d.skinRequired=this.getValue(v,"skin",!1),g=0;g<v.bones.length;g++){if(u=v.bones[g],null==(y=n.findBone(u)))throw new Error("Transform constraint bone not found: "+u);d.bones.push(y)}if(M=v.target,d.target=n.findSlot(M),null==d.target)throw new Error("Path target slot not found: "+M);d.positionMode=F.positionModeFromString(this.getValue(v,"positionMode","percent")),d.spacingMode=F.spacingModeFromString(this.getValue(v,"spacingMode","length")),d.rotateMode=F.rotateModeFromString(this.getValue(v,"rotateMode","tangent")),d.offsetRotation=this.getValue(v,"rotation",0),d.position=this.getValue(v,"position",0),d.positionMode==tt.PositionMode.Fixed&&(d.position*=e),d.spacing=this.getValue(v,"spacing",0),d.spacingMode!=tt.SpacingMode.Length&&d.spacingMode!=tt.SpacingMode.Fixed||(d.spacing*=e),d.rotateMix=this.getValue(v,"rotateMix",1),d.translateMix=this.getValue(v,"translateMix",1),n.pathConstraints.push(d)}if(i.skins)for(s=0;s<i.skins.length;s++){var m=i.skins[s],x=new tt.Skin(m.name);if(m.bones)for(var y,w=0;w<m.bones.length;w++){if(null==(y=n.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==(E=n.findIkConstraint(m.ik[w])))throw new Error("Skin IK constraint not found: "+m.ik[s]);x.constraints.push(E)}if(m.transform)for(w=0;w<m.transform.length;w++){if(null==(E=n.findTransformConstraint(m.transform[w])))throw new Error("Skin transform constraint not found: "+m.transform[s]);x.constraints.push(E)}if(m.path)for(var E,w=0;w<m.path.length;w++){if(null==(E=n.findPathConstraint(m.path[w])))throw new Error("Skin path constraint not found: "+m.path[s]);x.constraints.push(E)}for(var l in m.attachments){var T=n.findSlot(l);if(null==T)throw new Error("Slot not found: "+l);var b=m.attachments[l];for(var A in b){var R=this.readAttachment(b[A],x,T.index,A,n);null!=R&&x.setAttachment(T.index,A,R)}}n.skins.push(x),"default"==x.name&&(n.defaultSkin=x)}for(var s=0,S=this.linkedMeshes.length;s<S;s++){var I=this.linkedMeshes[s];if(null==(x=null==I.skin?n.defaultSkin:n.findSkin(I.skin)))throw new Error("Skin not found: "+I.skin);var C=x.getAttachment(I.slotIndex,I.parent);if(null==C)throw new Error("Parent mesh not found: "+I.parent);I.mesh.deformAttachment=I.inheritDeform?C:I.mesh,I.mesh.setParentMesh(C),I.mesh.updateUVs()}if(this.linkedMeshes.length=0,i.events)for(var P in i.events){var L=i.events[P];(d=new tt.EventData(P)).intValue=this.getValue(L,"int",0),d.floatValue=this.getValue(L,"float",0),d.stringValue=this.getValue(L,"string",""),d.audioPath=this.getValue(L,"audio",null),null!=d.audioPath&&(d.volume=this.getValue(L,"volume",1),d.balance=this.getValue(L,"balance",0)),n.events.push(d)}if(i.animations)for(var _ in i.animations){var k=i.animations[_];this.readAnimation(k,_,n)}return n},F.prototype.readAttachment=function(t,e,n,i,r){var s=this.scale;switch(i=this.getValue(t,"name",i),this.getValue(t,"type","region")){case"region":var o=this.getValue(t,"path",i),a=this.attachmentLoader.newRegionAttachment(e,i,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,i);return null==h?null:(this.readVertices(t,h,t.vertexCount<<1),null!=(x=this.getValue(t,"color",null))&&h.color.setFromString(x),h);case"mesh":case"linkedmesh":var o=this.getValue(t,"path",i),l=this.attachmentLoader.newMeshAttachment(e,i,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),n,u,this.getValue(t,"deform",!0))),l;var c=t.uvs;return this.readVertices(t,l,c.length),l.triangles=t.triangles,l.regionUVs=c,l.updateUVs(),l.edges=this.getValue(t,"edges",null),l.hullLength=2*this.getValue(t,"hull",0),l;case"path":if(null==(o=this.attachmentLoader.newPathAttachment(e,i)))return null;o.closed=this.getValue(t,"closed",!1),o.constantSpeed=this.getValue(t,"constantSpeed",!0);var d=t.vertexCount;this.readVertices(t,o,d<<1);for(var f=tt.Utils.newArray(d/3,0),p=0;p<t.lengths.length;p++)f[p]=t.lengths[p]*s;return o.lengths=f,null!=(x=this.getValue(t,"color",null))&&o.color.setFromString(x),o;case"point":var v=this.attachmentLoader.newPointAttachment(e,i);return null==v?null:(v.x=this.getValue(t,"x",0)*s,v.y=this.getValue(t,"y",0)*s,v.rotation=this.getValue(t,"rotation",0),null!=(x=this.getValue(t,"color",null))&&v.color.setFromString(x),v);case"clipping":var g=this.attachmentLoader.newClippingAttachment(e,i);if(null==g)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);g.endSlot=m}var x,d=t.vertexCount;return this.readVertices(t,g,d<<1),null!=(x=this.getValue(t,"color",null))&&g.color.setFromString(x),g}return null},F.prototype.readVertices=function(t,e,n){var i=this.scale;e.worldVerticesLength=n;var r=t.vertices;if(n!=r.length){for(var s=new Array,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]*i),s.push(r[a+2]*i),s.push(r[a+3])}e.bones=o,e.vertices=tt.Utils.toFloatArray(s)}else{var c=tt.Utils.toFloatArray(r);if(1!=i)for(var a=0,h=r.length;a<h;a++)c[a]*=i;e.vertices=c}},F.prototype.readAnimation=function(t,e,n){var i=this.scale,r=new Array,s=0;if(t.slots)for(var o in t.slots){var a=t.slots[o];if(-1==(Z=n.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 d=l[c];x.setFrame(u++,this.getValue(d,"time",0),d.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 d=l[c],f=new tt.Color;f.setFromString(d.color),x.setFrame(u,this.getValue(d,"time",0),f.r,f.g,f.b,f.a),this.readCurve(d,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 d=l[c],p=new tt.Color,v=new tt.Color;p.setFromString(d.light),v.setFromString(d.dark),x.setFrame(u,this.getValue(d,"time",0),p.r,p.g,p.b,p.a,v.r,v.g,v.b),this.readCurve(d,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TwoColorTimeline.ENTRIES])}}}if(t.bones)for(var g in t.bones){var M=t.bones[g],m=n.findBoneIndex(g);if(-1==m)throw new Error("Bone not found: "+g);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++)d=l[c],x.setFrame(u,this.getValue(d,"time",0),this.getValue(d,"angle",0)),this.readCurve(d,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+" ("+g+")");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=i),x.boneIndex=m,c=u=0;c<l.length;c++){var d=l[c],E=this.getValue(d,"x",w),T=this.getValue(d,"y",w);x.setFrame(u,this.getValue(d,"time",0),E*y,T*y),this.readCurve(d,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=n.findIkConstraint(b);for((x=new tt.IkConstraintTimeline(A.length)).ikConstraintIndex=n.ikConstraints.indexOf(R),c=u=0;c<A.length;c++)d=A[c],x.setFrame(u,this.getValue(d,"time",0),this.getValue(d,"mix",1),this.getValue(d,"softness",0)*i,this.getValue(d,"bendPositive",!0)?1:-1,this.getValue(d,"compress",!1),this.getValue(d,"stretch",!1)),this.readCurve(d,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=n.findTransformConstraint(b),(x=new tt.TransformConstraintTimeline(A.length)).transformConstraintIndex=n.transformConstraints.indexOf(R),c=u=0;c<A.length;c++)d=A[c],x.setFrame(u,this.getValue(d,"time",0),this.getValue(d,"rotateMix",1),this.getValue(d,"translateMix",1),this.getValue(d,"scaleMix",1),this.getValue(d,"shearMix",1)),this.readCurve(d,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=n.findPathConstraintIndex(b);if(-1==S)throw new Error("Path constraint not found: "+b);var I=n.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),I.spacingMode!=tt.SpacingMode.Length&&I.spacingMode!=tt.SpacingMode.Fixed||(y=i)):(x=new tt.PathConstraintPositionTimeline(l.length),I.positionMode==tt.PositionMode.Fixed&&(y=i)),x.pathConstraintIndex=S,c=u=0;c<l.length;c++)d=l[c],x.setFrame(u,this.getValue(d,"time",0),this.getValue(d,h,0)*y),this.readCurve(d,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++)d=l[c],x.setFrame(u,this.getValue(d,"time",0),this.getValue(d,"rotateMix",1),this.getValue(d,"translateMix",1)),this.readCurve(d,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintMixTimeline.ENTRIES])}}if(t.deform)for(var C in t.deform){var P=t.deform[C],L=n.findSkin(C);if(null==L)throw new Error("Skin not found: "+C);for(var o in P){if(a=P[o],-1==(Z=n.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==_)throw new Error("Deform attachment not found: "+l.name);var k=null!=_.bones,F=_.vertices,O=k?F.length/3*2:F.length;(x=new tt.DeformTimeline(l.length)).slotIndex=Z,x.attachment=_;for(var u=0,V=0;V<l.length;V++){var d=l[V],D=void 0,N=this.getValue(d,"vertices",null);if(null==N)D=k?tt.Utils.newFloatArray(O):F;else{D=tt.Utils.newFloatArray(O);var U=this.getValue(d,"offset",0);if(tt.Utils.arrayCopy(N,0,D,U,N.length),1!=i)for(var B=(c=U)+N.length;c<B;c++)D[c]*=i;if(!k)for(c=0;c<O;c++)D[c]+=F[c]}x.setFrame(u,this.getValue(d,"time",0),D),this.readCurve(d,x,u),u++}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}}}var X=t.drawOrder;if(null==X&&(X=t.draworder),null!=X){for(var x=new tt.DrawOrderTimeline(X.length),Y=n.slots.length,u=0,V=0;V<X.length;V++){var z=X[V],W=null,q=this.getValue(z,"offsets",null);if(null!=q){W=tt.Utils.newArray(Y,-1);for(var G=tt.Utils.newArray(Y-q.length,0),H=0,j=0,c=0;c<q.length;c++){var Z,K=q[c];if(-1==(Z=n.findSlotIndex(K.slot)))throw new Error("Slot not found: "+K.slot);for(;H!=Z;)G[j++]=H++;W[H+K.offset]=H++}for(;H<Y;)G[j++]=H++;for(c=Y-1;0<=c;c--)-1==W[c]&&(W[c]=G[--j])}x.setFrame(u++,this.getValue(z,"time",0),W)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(t.events){for(x=new tt.EventTimeline(t.events.length),c=u=0;c<t.events.length;c++){var Q=t.events[c],J=n.findEvent(Q.name);if(null==J)throw new Error("Event not found: "+Q.name);var $=new tt.Event(tt.Utils.toSinglePrecision(this.getValue(Q,"time",0)),J);$.intValue=this.getValue(Q,"int",J.intValue),$.floatValue=this.getValue(Q,"float",J.floatValue),$.stringValue=this.getValue(Q,"string",J.stringValue),null!=$.data.audioPath&&($.volume=this.getValue(Q,"volume",1),$.balance=this.getValue(Q,"balance",0)),x.setFrame(u++,$)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(isNaN(s))throw new Error("Error while parsing animation, duration is NaN");n.animations.push(new tt.Animation(e,r,s))},F.prototype.readCurve=function(t,e,n){var i;t.hasOwnProperty("curve")&&("stepped"==t.curve?e.setStepped(n):(i=t.curve,e.setCurve(n,i,this.getValue(t,"c2",0),this.getValue(t,"c3",1),this.getValue(t,"c4",1))))},F.prototype.getValue=function(t,e,n){return void 0!==t[e]?t[e]:n},F.blendModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.BlendMode.Normal;if("additive"==t)return tt.BlendMode.Additive;if("multiply"==t)return tt.BlendMode.Multiply;if("screen"==t)return tt.BlendMode.Screen;throw new Error("Unknown blend mode: "+t)},F.positionModeFromString=function(t){if("fixed"==(t=t.toLowerCase()))return tt.PositionMode.Fixed;if("percent"==t)return tt.PositionMode.Percent;throw new Error("Unknown position mode: "+t)},F.spacingModeFromString=function(t){if("length"==(t=t.toLowerCase()))return tt.SpacingMode.Length;if("fixed"==t)return tt.SpacingMode.Fixed;if("percent"==t)return tt.SpacingMode.Percent;throw new Error("Unknown position mode: "+t)},F.rotateModeFromString=function(t){if("tangent"==(t=t.toLowerCase()))return tt.RotateMode.Tangent;if("chain"==t)return tt.RotateMode.Chain;if("chainscale"==t)return tt.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+t)},F.transformModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.TransformMode.Normal;if("onlytranslation"==t)return tt.TransformMode.OnlyTranslation;if("norotationorreflection"==t)return tt.TransformMode.NoRotationOrReflection;if("noscale"==t)return tt.TransformMode.NoScale;if("noscaleorreflection"==t)return tt.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+t)},F);function F(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}tt.SkeletonJson=t;var y=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r}}(re=re||{}),function(h){var s=function(t,e,n){this.slotIndex=t,this.name=e,this.attachment=n};h.SkinEntry=s;var t=(e.prototype.setAttachment=function(t,e,n){if(null==n)throw new Error("attachment cannot be null.");var i=this.attachments;t>=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],i=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==n){i=!0;break}i||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],i=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){i=!0;break}i||this.constraints.push(s)}for(var 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 n=t.bones[e],i=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==n){i=!0;break}i||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],i=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){i=!0;break}i||this.constraints.push(s)}for(var 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 n=this.attachments[t];return n?n[e]:null},e.prototype.removeAttachment=function(t,e){var n=this.attachments[t];n&&(n[e]=null)},e.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var n=this.attachments[e];if(n)for(var i in n){var r=n[i];r&&t.push(new s(e,i,r))}}return t},e.prototype.getAttachmentsForSlot=function(t,e){var n=this.attachments[t];if(n)for(var i in n){var r=n[i];r&&e.push(new s(t,i,r))}},e.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},e.prototype.attachAll=function(t,e){for(var n=0,i=0;i<t.slots.length;i++){var r=t.slots[i],s=r.getAttachment();if(s&&n<e.attachments.length){var o=e.attachments[n];for(var a in o)if(s==o[a]){var h=this.getAttachment(n,a);null!=h&&r.setAttachment(h);break}}n++}},e);function e(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}h.Skin=t}(re=re||{}),O=re=re||{},Ee.prototype.getSkeleton=function(){return this.bone.skeleton},Ee.prototype.getAttachment=function(){return this.attachment},Ee.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)},Ee.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},Ee.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},Ee.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=Ee,O.Slot=V,(D=re=re||{}).SlotData=Te,function(t){var e,n,i,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 i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},o);function o(t){this._image=t}t.Texture=s,(n=e=t.TextureFilter||(t.TextureFilter={}))[n.Nearest=9728]="Nearest",n[n.Linear=9729]="Linear",n[n.MipMap=9987]="MipMap",n[n.MipMapNearestNearest=9984]="MipMapNearestNearest",n[n.MipMapLinearNearest=9985]="MipMapLinearNearest",n[n.MipMapNearestLinear=9986]="MipMapNearestLinear",n[n.MipMapLinearLinear=9987]="MipMapLinearLinear",(r=i=t.TextureWrap||(t.TextureWrap={}))[r.MirroredRepeat=33648]="MirroredRepeat",r[r.ClampToEdge=33071]="ClampToEdge",r[r.Repeat=10497]="Repeat";function 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=(oe(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}(re=re||{}),function(f){var t=(e.prototype.load=function(t,e){if(null==e)throw new Error("textureLoader cannot be null.");for(var n=new p(t),i=new Array(4),r=null;;){var s,o,a,h,l,u,c,d=n.readLine();if(null==d)break;0==(d=d.trim()).length?r=null:r?((s=new g).name=d,s.page=r,"true"==(o=n.readValue()).toLocaleLowerCase()?s.degrees=90:"false"==o.toLocaleLowerCase()?s.degrees=0:s.degrees=parseFloat(o),s.rotate=90==s.degrees,n.readTuple(i),a=parseInt(i[0]),h=parseInt(i[1]),n.readTuple(i),l=parseInt(i[0]),u=parseInt(i[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==n.readTuple(i)&&4==n.readTuple(i)&&n.readTuple(i),s.originalWidth=parseInt(i[0]),s.originalHeight=parseInt(i[1]),n.readTuple(i),s.offsetX=parseInt(i[0]),s.offsetY=parseInt(i[1]),s.index=parseInt(n.readValue()),s.texture=r.texture,this.regions.push(s)):((r=new v).name=d,2==n.readTuple(i)&&(r.width=parseInt(i[0]),r.height=parseInt(i[1]),n.readTuple(i)),n.readTuple(i),r.minFilter=f.Texture.filterFromString(i[0]),r.magFilter=f.Texture.filterFromString(i[1]),c=n.readValue(),r.uWrap=f.TextureWrap.ClampToEdge,r.vWrap=f.TextureWrap.ClampToEdge,"x"==c?r.uWrap=f.TextureWrap.Repeat:"y"==c?r.vWrap=f.TextureWrap.Repeat:"xy"==c&&(r.uWrap=r.vWrap=f.TextureWrap.Repeat),r.texture=e(d),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)}f.TextureAtlas=t;var p=(n.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var v=function(){};f.TextureAtlasPage=v;var i,g=(i=f.TextureRegion,oe(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}f.TextureAtlasRegion=g}(re=re||{}),N=re=re||{},be.prototype.isActive=function(){return this.active},be.prototype.apply=function(){this.update()},be.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},be.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=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,d=this.bones,f=0,p=d.length;f<p;f++){var v,g,M,m,x,y,w,E,T,b,A,R=d[f],S=!1;0!=t&&(v=R.a,w=R.b,g=R.c,E=R.d,(b=Math.atan2(a,s)-Math.atan2(g,v)+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*v-m*g,R.b=M*w-m*E,R.c=m*v+M*g,R.d=m*w+M*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0<n&&(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)*n)/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)*n)/A),R.b*=A,R.d*=A,S=!0),0<i&&(w=R.b,E=R.d,T=Math.atan2(E,w),(b=Math.atan2(h,o)-Math.atan2(a,s)-(T-Math.atan2(R.c,R.a)))>N.MathUtils.PI?b-=N.MathUtils.PI2:b<-N.MathUtils.PI&&(b+=N.MathUtils.PI2),b=T+(b+c)*i,A=Math.sqrt(w*w+E*E),R.b=Math.cos(b)*A,R.d=Math.sin(b)*A,S=!0),S&&(R.appliedValid=!1)}},be.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=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,d=this.bones,f=0,p=d.length;f<p;f++){var v,g,M,m,x,y,w,E,T,b=d[f],A=!1;0!=t&&(v=b.a,w=b.b,g=b.c,E=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*v-m*g,b.b=M*w-m*E,b.c=m*v+M*g,b.d=m*w+M*E,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<n&&(T=(Math.sqrt(s*s+a*a)-1+this.data.offsetScaleX)*n+1,b.a*=T,b.c*=T,T=(Math.sqrt(o*o+h*h)-1+this.data.offsetScaleY)*n+1,b.b*=T,b.d*=T,A=!0),0<i&&((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,E=b.d,y=Math.atan2(E,w)+(y-N.MathUtils.PI/2+c)*i,T=Math.sqrt(w*w+E*E),b.b=Math.cos(y)*T,b.d=Math.sin(y)*T,A=!0),A&&(b.appliedValid=!1)}},be.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,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 d=h.ascaleX,f=h.ascaleY;0!=n&&(1e-5<d&&(d=(d+(r.ascaleX-d+this.data.offsetScaleX)*n)/d),1e-5<f&&(f=(f+(r.ascaleY-f+this.data.offsetScaleY)*n)/f));var p,v=h.ashearY;0!=i&&(p=r.ashearY-v+this.data.offsetShearY,p-=360*(16384-(16384.499999999996-p/360|0)),h.shearY+=p*i),h.updateWorldTransformWith(u,c,l,d,f,h.ashearX,v)}},be.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,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 d=h.ascaleX,f=h.ascaleY;0!=n&&(1e-5<d&&(d*=(r.ascaleX-1+this.data.offsetScaleX)*n+1),1e-5<f&&(f*=(r.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=i&&(p+=(r.ashearY+this.data.offsetShearY)*i),h.updateWorldTransformWith(u,c,l,d,f,h.ashearX,p)}},U=be,N.TransformConstraint=U,B=re=re||{},X=B.ConstraintData,oe(Ae,X),Y=Ae,B.TransformConstraintData=Y,z=re=re||{},Re.prototype.triangulate=function(t){for(var e=t,n=t.length>>1,i=this.indicesArray,r=i.length=0;r<n;r++)i[r]=r;for(var s=this.isConcaveArray,r=s.length=0,o=n;r<o;++r)s[r]=Re.isConcave(r,n,e,i);var a=this.triangles;for(a.length=0;3<n;){for(var h=n-1,r=0,l=1;;){t:if(!s[r]){for(var u=i[h]<<1,c=i[r]<<1,d=i[l]<<1,f=e[u],p=e[1+u],v=e[c],g=e[1+c],M=e[d],m=e[1+d],x=(l+1)%n;x!=h;x=(x+1)%n)if(s[x]){var y=i[x]<<1,w=e[y],E=e[1+y];if(Re.positiveArea(M,m,f,p,w,E)&&Re.positiveArea(f,p,v,g,w,E)&&Re.positiveArea(v,g,M,m,w,E))break t}break}if(0==l){do{if(!s[r])break;r--}while(0<r);break}h=r,l=((r=l)+1)%n}a.push(i[(n+r-1)%n]),a.push(i[r]),a.push(i[(r+1)%n]),i.splice(r,1),s.splice(r,1);var T=(--n+r-1)%n,b=r==n?0:r;s[T]=Re.isConcave(T,n,e,i),s[b]=Re.isConcave(b,n,e,i)}return 3==n&&(a.push(i[2]),a.push(i[0]),a.push(i[1])),a},Re.prototype.decompose=function(t,e){var n=t,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;for(var o=this.polygonPool.obtain(),a=-1,h=o.length=0,l=0,u=e.length;l<u;l+=3){var c=e[l]<<1,d=e[l+1]<<1,f=e[l+2]<<1,p=n[c],v=n[1+c],g=n[d],M=n[1+d],m=n[f],x=n[1+f],y=!1;a==c&&(w=o.length-4,S=Re.winding(o[w],o[w+1],o[w+2],o[w+3],m,x),I=Re.winding(m,x,o[0],o[1],o[2],o[3]),S==h&&I==h&&(o.push(m),o.push(x),s.push(f),y=!0)),y||(0<o.length?(i.push(o),r.push(s)):(this.polygonPool.free(o),this.polygonIndicesPool.free(s)),(o=this.polygonPool.obtain()).length=0,o.push(p),o.push(v),o.push(g),o.push(M),o.push(m),o.push(x),(s=this.polygonIndicesPool.obtain()).length=0,s.push(c),s.push(d),s.push(f),h=Re.winding(p,v,g,M,m,x),a=c)}for(0<o.length&&(i.push(o),r.push(s)),l=0,u=i.length;l<u;l++)if(0!=(s=r[l]).length)for(var w,E,T,b,A,R,S,I,C=s[0],P=s[s.length-1],L=(o=i[l])[w=o.length-4],_=o[w+1],k=o[w+2],F=o[w+3],O=o[0],V=o[1],D=o[2],N=o[3],U=Re.winding(L,_,k,F,O,V),B=0;B<u;B++)B!=l&&3==(E=r[B]).length&&(T=E[0],b=E[1],A=E[2],m=(R=i[B])[R.length-2],x=R[R.length-1],T==C&&b==P&&(S=Re.winding(L,_,k,F,m,x),I=Re.winding(m,x,O,V,D,N),S==U&&I==U&&(R.length=0,E.length=0,o.push(m),o.push(x),s.push(A),L=k,_=F,k=m,F=x,B=0)));for(l=i.length-1;0<=l;l--)0==(o=i[l]).length&&(i.splice(l,1),this.polygonPool.free(o),s=r[l],r.splice(l,1),this.polygonIndicesPool.free(s));return i},Re.isConcave=function(t,e,n,i){var r=i[(e+t-1)%e]<<1,s=i[t]<<1,o=i[(t+1)%e]<<1;return!this.positiveArea(n[r],n[1+r],n[s],n[1+s],n[o],n[1+o])},Re.positiveArea=function(t,e,n,i,r,s){return 0<=t*(s-i)+n*(e-s)+r*(i-e)},Re.winding=function(t,e,n,i,r,s){var o=n-t,a=i-e;return 0<=r*a-s*o+o*e-t*a?1:-1},W=Re,z.Triangulator=W,function(t){var e=(n.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},n.prototype.contains=function(t){return null!=this.array[0|t]},n.prototype.remove=function(t){this.array[0|t]=void 0},n.prototype.clear=function(){this.array.length=0},n);function n(){this.array=new Array}t.IntSet=e;var i=(r.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},r.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},r.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},r.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},r.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},r.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(o.clamp=function(t,e,n){return t<e?e:n<t?n: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,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},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,n){return t+(e-t)*this.applyInternal(n)},h);function h(){}t.Interpolation=a;var l,u=(oe(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 d,f=(oe(p,d=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 d.call(this,t)||this}t.PowOut=f;var v=(g.arrayCopy=function(t,e,n,i,r){for(var s=e,o=i;s<e+r;s++,o++)n[o]=t[s]},g.setArraySize=function(t,e,n){void 0===n&&(n=0);var i=t.length;if(i==e)return t;if(i<(t.length=e))for(var r=i;r<e;r++)t[r]=n;return t},g.ensureArrayCapacity=function(t,e,n){return void 0===n&&(n=0),t.length>=e?t:g.setArraySize(t,e,n)},g.newArray=function(t,e){for(var n=new Array(t),i=0;i<t;i++)n[i]=e;return n},g.newFloatArray=function(t){if(g.SUPPORTS_TYPED_ARRAYS)return new Float32Array(t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=0;return e},g.newShortArray=function(t){if(g.SUPPORTS_TYPED_ARRAYS)return new Int16Array(t);for(var e=new Array(t),n=0;n<e.length;n++)e[n]=0;return e},g.toFloatArray=function(t){return g.SUPPORTS_TYPED_ARRAYS?new Float32Array(t):t},g.toSinglePrecision=function(t){return g.SUPPORTS_TYPED_ARRAYS?Math.fround(t):t},g.webkit602BugfixHelper=function(t,e){},g.contains=function(t,e,n){void 0===n&&(n=!0);for(var i=0;i<t.length;i++)if(t[i]==e)return!0;return!1},g.SUPPORTS_TYPED_ARRAYS="undefined"!=typeof Float32Array,g);function g(){}t.Utils=v;var M=(m.logBones=function(t){for(var e=0;e<t.bones.length;e++){var n=t.bones[e];console.log(n.data.name+", "+n.a+", "+n.b+", "+n.c+", "+n.d+", "+n.worldX+", "+n.worldY)}},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=(E.prototype.set=function(t,e){return this.x=t,this.y=e,this},E.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},E.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},E);function E(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}t.Vector2=w;var T=(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=T;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}(re=re||{}),Math.fround||(Math.fround=(q=new Float32Array(1),function(t){return q[0]=t,q[0]})),function(e){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}e.Attachment=t;var n,i=(oe(r,n=t),r.prototype.computeWorldVertices=function(t,e,n,i,r,s){n=r+(n>>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,d=0;d<e;d+=2)u+=(g=l[u])+1,c+=g;var f=o.bones;if(0==a.length)for(E=r,T=3*c;E<n;E+=s){var p=0,v=0,g=l[u++];for(g+=u;u<g;u++,T+=3){var M=f[l[u]],m=h[T],x=h[T+1],y=h[T+2];p+=(m*M.a+x*M.b+M.worldX)*y,v+=(m*M.c+x*M.d+M.worldY)*y}i[E]=p,i[E+1]=v}else for(var w=a,E=r,T=3*c,b=c<<1;E<n;E+=s){for(v=p=0,g=l[u++],g+=u;u<g;u++,T+=3,b+=2)M=f[l[u]],m=h[T]+w[b],x=h[T+1]+w[b+1],y=h[T+2],p+=(m*M.a+x*M.b+M.worldX)*y,v+=(m*M.c+x*M.d+M.worldY)*y;i[E]=p,i[E+1]=v}}else{0<a.length&&(h=a);for(var A=(M=t.bone).worldX,R=M.worldY,S=M.a,T=M.b,I=M.c,C=M.d,P=e,E=r;E<n;P+=2,E+=s){var m=h[P],x=h[P+1];i[E]=m*S+x*T+A,i[E+1]=m*I+x*C+R}}},r.prototype.copyTo=function(t){null!=this.bones?(t.bones=new Array(this.bones.length),e.Utils.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,null!=this.vertices?(t.vertices=e.Utils.newFloatArray(this.vertices.length),e.Utils.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)):t.vertices=null,t.worldVerticesLength=this.worldVerticesLength,t.deformAttachment=this.deformAttachment},r.nextID=0,r);function r(t){var e=n.call(this,t)||this;return e.id=(65535&r.nextID++)<<11,e.worldVerticesLength=0,e.deformAttachment=e}e.VertexAttachment=i}(re=re||{}),G=re=re||{},(H=G.AttachmentType||(G.AttachmentType={}))[H.Region=0]="Region",H[H.BoundingBox=1]="BoundingBox",H[H.Mesh=2]="Mesh",H[H.LinkedMesh=3]="LinkedMesh",H[H.Path=4]="Path",H[H.Point=5]="Point",H[H.Clipping=6]="Clipping",K=re=re||{},Q=K.VertexAttachment,oe(Se,Q),Se.prototype.copy=function(){var t=new Se(name);return this.copyTo(t),t.color.setFromColor(this.color),t},J=Se,K.BoundingBoxAttachment=J,$=re=re||{},tt=$.VertexAttachment,oe(Ie,tt),Ie.prototype.copy=function(){var t=new Ie(name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},et=Ie,$.ClippingAttachment=et,nt=re=re||{},it=nt.VertexAttachment,oe(Ce,it),Ce.prototype.updateUVs=function(){var t=this.regionUVs;null!=this.uvs&&this.uvs.length==t.length||(this.uvs=nt.Utils.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,i=this.region.u,r=this.region.v,s=0,o=0;if(this.region instanceof nt.TextureAtlasRegion){var a=this.region,h=a.texture.getImage().width,l=a.texture.getImage().height;switch(a.degrees){case 90:i-=(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<n;u+=2)e[u]=i+t[u+1]*s,e[u+1]=r+(1-t[u])*o;return;case 180:for(i-=(a.originalWidth-a.offsetX-a.width)/h,r-=a.offsetY/l,s=a.originalWidth/h,o=a.originalHeight/l,u=0;u<n;u+=2)e[u]=i+(1-t[u])*s,e[u+1]=r+(1-t[u+1])*o;return;case 270:for(i-=a.offsetY/h,r-=a.offsetX/l,s=a.originalHeight/h,o=a.originalWidth/l,u=0;u<n;u+=2)e[u]=i+(1-t[u+1])*s,e[u+1]=r+t[u]*o;return}i-=a.offsetX/h,r-=(a.originalHeight-a.offsetY-a.height)/l,s=a.originalWidth/h,o=a.originalHeight/l}else null==this.region?(i=r=0,s=o=1):(s=this.region.u2-i,o=this.region.v2-r);for(u=0;u<n;u+=2)e[u]=i+t[u]*s,e[u+1]=r+t[u+1]*o},Ce.prototype.getParentMesh=function(){return this.parentMesh},Ce.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)},Ce.prototype.copy=function(){if(null!=this.parentMesh)return this.newLinkedMesh();var t=new Ce(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),nt.Utils.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),nt.Utils.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),nt.Utils.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,null!=this.edges&&(t.edges=new Array(this.edges.length),nt.Utils.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},Ce.prototype.newLinkedMesh=function(){var t=new Ce(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=Ce,nt.MeshAttachment=rt,st=re=re||{},ot=st.VertexAttachment,oe(Pe,ot),Pe.prototype.copy=function(){var t=new Pe(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=Pe,st.PathAttachment=at,lt=re=re||{},ut=lt.VertexAttachment,oe(Le,ut),Le.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},Le.prototype.computeWorldRotation=function(t){var e=lt.MathUtils.cosDeg(this.rotation),n=lt.MathUtils.sinDeg(this.rotation),i=e*t.a+n*t.b,r=e*t.c+n*t.d;return Math.atan2(r,i)*lt.MathUtils.radDeg},Le.prototype.copy=function(){var t=new Le(name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},ct=Le,lt.PointAttachment=ct,dt=re=re||{},ft=dt.Attachment,oe(_e,ft),_e.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.region.offsetX*t,i=-this.height/2*this.scaleY+this.region.offsetY*e,r=n+this.region.width*t,s=i+this.region.height*e,o=this.rotation*Math.PI/180,a=Math.cos(o),h=Math.sin(o),l=n*a+this.x,u=n*h,c=i*a+this.y,d=i*h,f=r*a+this.x,p=r*h,v=s*a+this.y,g=s*h,M=this.offset;M[_e.OX1]=l-d,M[_e.OY1]=c+u,M[_e.OX2]=l-g,M[_e.OY2]=v+u,M[_e.OX3]=f-g,M[_e.OY3]=v+p,M[_e.OX4]=f-d,M[_e.OY4]=c+p},_e.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)},_e.prototype.computeWorldVertices=function(t,e,n,i){var r=this.offset,s=t.worldX,o=t.worldY,a=t.a,h=t.b,l=t.c,u=t.d,c=r[_e.OX1],d=r[_e.OY1];e[n]=c*a+d*h+s,e[n+1]=c*l+d*u+o,n+=i,c=r[_e.OX2],d=r[_e.OY2],e[n]=c*a+d*h+s,e[n+1]=c*l+d*u+o,n+=i,c=r[_e.OX3],d=r[_e.OY3],e[n]=c*a+d*h+s,e[n+1]=c*l+d*u+o,n+=i,c=r[_e.OX4],d=r[_e.OY4],e[n]=c*a+d*h+s,e[n+1]=c*l+d*u+o},_e.prototype.copy=function(){var t=new _e(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,dt.Utils.arrayCopy(this.uvs,0,t.uvs,0,8),dt.Utils.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t},_e.OX1=0,_e.OY1=1,_e.OX2=2,_e.OY2=3,_e.OX3=4,_e.OY3=5,_e.OX4=6,_e.OY4=7,_e.X1=0,_e.Y1=1,_e.C1R=2,_e.C1G=3,_e.C1B=4,_e.C1A=5,_e.U1=6,_e.V1=7,_e.X2=8,_e.Y2=9,_e.C2R=10,_e.C2G=11,_e.C2B=12,_e.C2A=13,_e.U2=14,_e.V2=15,_e.X3=16,_e.Y3=17,_e.C3R=18,_e.C3G=19,_e.C3B=20,_e.C3A=21,_e.U3=22,_e.V3=23,_e.X4=24,_e.Y4=25,_e.C4R=26,_e.C4G=27,_e.C4B=28,_e.C4A=29,_e.U4=30,_e.V4=31,pt=_e,dt.RegionAttachment=pt,vt=re=re||{},ke.prototype.begin=function(t){},ke.prototype.transform=function(t,e,n,i){t.x+=vt.MathUtils.randomTriangular(-this.jitterX,this.jitterY),t.y+=vt.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},ke.prototype.end=function(){},gt=ke,vt.JitterEffect=gt,Mt=re=re||{},Fe.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},Fe.prototype.transform=function(t,e,n,i){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=Fe.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)},Fe.prototype.end=function(){},Fe.interpolation=new Mt.PowOut(2),mt=Fe,Mt.SwirlEffect=mt,xt=re=re||{},yt=xt.webgl||(xt.webgl={}),wt=xt.AssetManager,oe(Oe,wt),Et=Oe,yt.AssetManager=Et,Tt=re=re||{},bt=Tt.webgl||(Tt.webgl={}),Ve.prototype.update=function(){var t=this.projection,e=this.view,n=this.projectionView,i=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),n.set(t.values),n.multiply(e),i.set(n.values).invert()},Ve.prototype.screenToWorld=function(t,e,n){var i=t.x,r=n-t.y-1,s=this.tmp;return s.x=2*i/e-1,s.y=2*r/n-1,s.z=2*t.z-1,s.project(this.inverseProjectionView),t.set(s.x,s.y,s.z),t},Ve.prototype.setViewport=function(t,e){this.viewportWidth=t,this.viewportHeight=e},At=Ve,bt.OrthoCamera=At,Rt=re=re||{},St=Rt.webgl||(Rt.webgl={}),It=Rt.Texture,oe(De,It),De.prototype.setFilters=function(t,e){var n=this.context.gl;this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,De.validateMagFilter(e))},De.validateMagFilter=function(t){switch(t){case Rt.TextureFilter.MipMap:case Rt.TextureFilter.MipMapLinearLinear:case Rt.TextureFilter.MipMapLinearNearest:case Rt.TextureFilter.MipMapNearestLinear:case Rt.TextureFilter.MipMapNearestNearest:return Rt.TextureFilter.Linear;default:return t}},De.prototype.setWraps=function(t,e){var n=this.context.gl;this.bind(),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,t),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,e)},De.prototype.update=function(t){var e=this.context.gl;this.texture||(this.texture=this.context.gl.createTexture()),this.bind(),De.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)},De.prototype.restore=function(){this.texture=null,this.update(this.useMipMaps)},De.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)},De.prototype.unbind=function(){var t=this.context.gl;t.activeTexture(t.TEXTURE0+this.boundUnit),t.bindTexture(t.TEXTURE_2D,null)},De.prototype.dispose=function(){this.context.removeRestorable(this),this.context.gl.deleteTexture(this.texture)},De.DISABLE_UNPACK_PREMULTIPLIED_ALPHA_WEBGL=!1,Ct=De,St.GLTexture=Ct,function(f){f.M00=0,f.M01=4,f.M02=8,f.M03=12,f.M10=1,f.M11=5,f.M12=9,f.M13=13,f.M20=2,f.M21=6,f.M22=10,f.M23=14,f.M30=3,f.M31=7,f.M32=11,f.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[f.M00]=e[f.M00],t[f.M01]=e[f.M10],t[f.M02]=e[f.M20],t[f.M03]=e[f.M30],t[f.M10]=e[f.M01],t[f.M11]=e[f.M11],t[f.M12]=e[f.M21],t[f.M13]=e[f.M31],t[f.M20]=e[f.M02],t[f.M21]=e[f.M12],t[f.M22]=e[f.M22],t[f.M23]=e[f.M32],t[f.M30]=e[f.M03],t[f.M31]=e[f.M13],t[f.M32]=e[f.M23],t[f.M33]=e[f.M33],this.set(t)},a.prototype.identity=function(){var t=this.values;return t[f.M00]=1,t[f.M01]=0,t[f.M02]=0,t[f.M03]=0,t[f.M10]=0,t[f.M11]=1,t[f.M12]=0,t[f.M13]=0,t[f.M20]=0,t[f.M21]=0,t[f.M22]=1,t[f.M23]=0,t[f.M30]=0,t[f.M31]=0,t[f.M32]=0,t[f.M33]=1,this},a.prototype.invert=function(){var t=this.values,e=this.temp,n=t[f.M30]*t[f.M21]*t[f.M12]*t[f.M03]-t[f.M20]*t[f.M31]*t[f.M12]*t[f.M03]-t[f.M30]*t[f.M11]*t[f.M22]*t[f.M03]+t[f.M10]*t[f.M31]*t[f.M22]*t[f.M03]+t[f.M20]*t[f.M11]*t[f.M32]*t[f.M03]-t[f.M10]*t[f.M21]*t[f.M32]*t[f.M03]-t[f.M30]*t[f.M21]*t[f.M02]*t[f.M13]+t[f.M20]*t[f.M31]*t[f.M02]*t[f.M13]+t[f.M30]*t[f.M01]*t[f.M22]*t[f.M13]-t[f.M00]*t[f.M31]*t[f.M22]*t[f.M13]-t[f.M20]*t[f.M01]*t[f.M32]*t[f.M13]+t[f.M00]*t[f.M21]*t[f.M32]*t[f.M13]+t[f.M30]*t[f.M11]*t[f.M02]*t[f.M23]-t[f.M10]*t[f.M31]*t[f.M02]*t[f.M23]-t[f.M30]*t[f.M01]*t[f.M12]*t[f.M23]+t[f.M00]*t[f.M31]*t[f.M12]*t[f.M23]+t[f.M10]*t[f.M01]*t[f.M32]*t[f.M23]-t[f.M00]*t[f.M11]*t[f.M32]*t[f.M23]-t[f.M20]*t[f.M11]*t[f.M02]*t[f.M33]+t[f.M10]*t[f.M21]*t[f.M02]*t[f.M33]+t[f.M20]*t[f.M01]*t[f.M12]*t[f.M33]-t[f.M00]*t[f.M21]*t[f.M12]*t[f.M33]-t[f.M10]*t[f.M01]*t[f.M22]*t[f.M33]+t[f.M00]*t[f.M11]*t[f.M22]*t[f.M33];if(0==n)throw new Error("non-invertible matrix");var i=1/n;return e[f.M00]=t[f.M12]*t[f.M23]*t[f.M31]-t[f.M13]*t[f.M22]*t[f.M31]+t[f.M13]*t[f.M21]*t[f.M32]-t[f.M11]*t[f.M23]*t[f.M32]-t[f.M12]*t[f.M21]*t[f.M33]+t[f.M11]*t[f.M22]*t[f.M33],e[f.M01]=t[f.M03]*t[f.M22]*t[f.M31]-t[f.M02]*t[f.M23]*t[f.M31]-t[f.M03]*t[f.M21]*t[f.M32]+t[f.M01]*t[f.M23]*t[f.M32]+t[f.M02]*t[f.M21]*t[f.M33]-t[f.M01]*t[f.M22]*t[f.M33],e[f.M02]=t[f.M02]*t[f.M13]*t[f.M31]-t[f.M03]*t[f.M12]*t[f.M31]+t[f.M03]*t[f.M11]*t[f.M32]-t[f.M01]*t[f.M13]*t[f.M32]-t[f.M02]*t[f.M11]*t[f.M33]+t[f.M01]*t[f.M12]*t[f.M33],e[f.M03]=t[f.M03]*t[f.M12]*t[f.M21]-t[f.M02]*t[f.M13]*t[f.M21]-t[f.M03]*t[f.M11]*t[f.M22]+t[f.M01]*t[f.M13]*t[f.M22]+t[f.M02]*t[f.M11]*t[f.M23]-t[f.M01]*t[f.M12]*t[f.M23],e[f.M10]=t[f.M13]*t[f.M22]*t[f.M30]-t[f.M12]*t[f.M23]*t[f.M30]-t[f.M13]*t[f.M20]*t[f.M32]+t[f.M10]*t[f.M23]*t[f.M32]+t[f.M12]*t[f.M20]*t[f.M33]-t[f.M10]*t[f.M22]*t[f.M33],e[f.M11]=t[f.M02]*t[f.M23]*t[f.M30]-t[f.M03]*t[f.M22]*t[f.M30]+t[f.M03]*t[f.M20]*t[f.M32]-t[f.M00]*t[f.M23]*t[f.M32]-t[f.M02]*t[f.M20]*t[f.M33]+t[f.M00]*t[f.M22]*t[f.M33],e[f.M12]=t[f.M03]*t[f.M12]*t[f.M30]-t[f.M02]*t[f.M13]*t[f.M30]-t[f.M03]*t[f.M10]*t[f.M32]+t[f.M00]*t[f.M13]*t[f.M32]+t[f.M02]*t[f.M10]*t[f.M33]-t[f.M00]*t[f.M12]*t[f.M33],e[f.M13]=t[f.M02]*t[f.M13]*t[f.M20]-t[f.M03]*t[f.M12]*t[f.M20]+t[f.M03]*t[f.M10]*t[f.M22]-t[f.M00]*t[f.M13]*t[f.M22]-t[f.M02]*t[f.M10]*t[f.M23]+t[f.M00]*t[f.M12]*t[f.M23],e[f.M20]=t[f.M11]*t[f.M23]*t[f.M30]-t[f.M13]*t[f.M21]*t[f.M30]+t[f.M13]*t[f.M20]*t[f.M31]-t[f.M10]*t[f.M23]*t[f.M31]-t[f.M11]*t[f.M20]*t[f.M33]+t[f.M10]*t[f.M21]*t[f.M33],e[f.M21]=t[f.M03]*t[f.M21]*t[f.M30]-t[f.M01]*t[f.M23]*t[f.M30]-t[f.M03]*t[f.M20]*t[f.M31]+t[f.M00]*t[f.M23]*t[f.M31]+t[f.M01]*t[f.M20]*t[f.M33]-t[f.M00]*t[f.M21]*t[f.M33],e[f.M22]=t[f.M01]*t[f.M13]*t[f.M30]-t[f.M03]*t[f.M11]*t[f.M30]+t[f.M03]*t[f.M10]*t[f.M31]-t[f.M00]*t[f.M13]*t[f.M31]-t[f.M01]*t[f.M10]*t[f.M33]+t[f.M00]*t[f.M11]*t[f.M33],e[f.M23]=t[f.M03]*t[f.M11]*t[f.M20]-t[f.M01]*t[f.M13]*t[f.M20]-t[f.M03]*t[f.M10]*t[f.M21]+t[f.M00]*t[f.M13]*t[f.M21]+t[f.M01]*t[f.M10]*t[f.M23]-t[f.M00]*t[f.M11]*t[f.M23],e[f.M30]=t[f.M12]*t[f.M21]*t[f.M30]-t[f.M11]*t[f.M22]*t[f.M30]-t[f.M12]*t[f.M20]*t[f.M31]+t[f.M10]*t[f.M22]*t[f.M31]+t[f.M11]*t[f.M20]*t[f.M32]-t[f.M10]*t[f.M21]*t[f.M32],e[f.M31]=t[f.M01]*t[f.M22]*t[f.M30]-t[f.M02]*t[f.M21]*t[f.M30]+t[f.M02]*t[f.M20]*t[f.M31]-t[f.M00]*t[f.M22]*t[f.M31]-t[f.M01]*t[f.M20]*t[f.M32]+t[f.M00]*t[f.M21]*t[f.M32],e[f.M32]=t[f.M02]*t[f.M11]*t[f.M30]-t[f.M01]*t[f.M12]*t[f.M30]-t[f.M02]*t[f.M10]*t[f.M31]+t[f.M00]*t[f.M12]*t[f.M31]+t[f.M01]*t[f.M10]*t[f.M32]-t[f.M00]*t[f.M11]*t[f.M32],e[f.M33]=t[f.M01]*t[f.M12]*t[f.M20]-t[f.M02]*t[f.M11]*t[f.M20]+t[f.M02]*t[f.M10]*t[f.M21]-t[f.M00]*t[f.M12]*t[f.M21]-t[f.M01]*t[f.M10]*t[f.M22]+t[f.M00]*t[f.M11]*t[f.M22],t[f.M00]=e[f.M00]*i,t[f.M01]=e[f.M01]*i,t[f.M02]=e[f.M02]*i,t[f.M03]=e[f.M03]*i,t[f.M10]=e[f.M10]*i,t[f.M11]=e[f.M11]*i,t[f.M12]=e[f.M12]*i,t[f.M13]=e[f.M13]*i,t[f.M20]=e[f.M20]*i,t[f.M21]=e[f.M21]*i,t[f.M22]=e[f.M22]*i,t[f.M23]=e[f.M23]*i,t[f.M30]=e[f.M30]*i,t[f.M31]=e[f.M31]*i,t[f.M32]=e[f.M32]*i,t[f.M33]=e[f.M33]*i,this},a.prototype.determinant=function(){var t=this.values;return t[f.M30]*t[f.M21]*t[f.M12]*t[f.M03]-t[f.M20]*t[f.M31]*t[f.M12]*t[f.M03]-t[f.M30]*t[f.M11]*t[f.M22]*t[f.M03]+t[f.M10]*t[f.M31]*t[f.M22]*t[f.M03]+t[f.M20]*t[f.M11]*t[f.M32]*t[f.M03]-t[f.M10]*t[f.M21]*t[f.M32]*t[f.M03]-t[f.M30]*t[f.M21]*t[f.M02]*t[f.M13]+t[f.M20]*t[f.M31]*t[f.M02]*t[f.M13]+t[f.M30]*t[f.M01]*t[f.M22]*t[f.M13]-t[f.M00]*t[f.M31]*t[f.M22]*t[f.M13]-t[f.M20]*t[f.M01]*t[f.M32]*t[f.M13]+t[f.M00]*t[f.M21]*t[f.M32]*t[f.M13]+t[f.M30]*t[f.M11]*t[f.M02]*t[f.M23]-t[f.M10]*t[f.M31]*t[f.M02]*t[f.M23]-t[f.M30]*t[f.M01]*t[f.M12]*t[f.M23]+t[f.M00]*t[f.M31]*t[f.M12]*t[f.M23]+t[f.M10]*t[f.M01]*t[f.M32]*t[f.M23]-t[f.M00]*t[f.M11]*t[f.M32]*t[f.M23]-t[f.M20]*t[f.M11]*t[f.M02]*t[f.M33]+t[f.M10]*t[f.M21]*t[f.M02]*t[f.M33]+t[f.M20]*t[f.M01]*t[f.M12]*t[f.M33]-t[f.M00]*t[f.M21]*t[f.M12]*t[f.M33]-t[f.M10]*t[f.M01]*t[f.M22]*t[f.M33]+t[f.M00]*t[f.M11]*t[f.M22]*t[f.M33]},a.prototype.translate=function(t,e,n){var i=this.values;return i[f.M03]+=t,i[f.M13]+=e,i[f.M23]+=n,this},a.prototype.copy=function(){return(new a).set(this.values)},a.prototype.projection=function(t,e,n,i){this.identity();var r=1/Math.tan(n*(Math.PI/180)/2),s=(e+t)/(t-e),o=2*e*t/(t-e),a=this.values;return a[f.M00]=r/i,a[f.M10]=0,a[f.M20]=0,a[f.M30]=0,a[f.M01]=0,a[f.M11]=r,a[f.M21]=0,a[f.M31]=0,a[f.M02]=0,a[f.M12]=0,a[f.M22]=s,a[f.M32]=-1,a[f.M03]=0,a[f.M13]=0,a[f.M23]=o,a[f.M33]=0,this},a.prototype.ortho2d=function(t,e,n,i){return this.ortho(t,t+n,e,e+i,0,1)},a.prototype.ortho=function(t,e,n,i,r,s){this.identity();var o=2/(e-t),a=2/(i-n),h=-2/(s-r),l=-(e+t)/(e-t),u=-(i+n)/(i-n),c=-(s+r)/(s-r),d=this.values;return d[f.M00]=o,d[f.M10]=0,d[f.M20]=0,d[f.M30]=0,d[f.M01]=0,d[f.M11]=a,d[f.M21]=0,d[f.M31]=0,d[f.M02]=0,d[f.M12]=0,d[f.M22]=h,d[f.M32]=0,d[f.M03]=l,d[f.M13]=u,d[f.M23]=c,d[f.M33]=1,this},a.prototype.multiply=function(t){var e=this.temp,n=this.values,i=t.values;return e[f.M00]=n[f.M00]*i[f.M00]+n[f.M01]*i[f.M10]+n[f.M02]*i[f.M20]+n[f.M03]*i[f.M30],e[f.M01]=n[f.M00]*i[f.M01]+n[f.M01]*i[f.M11]+n[f.M02]*i[f.M21]+n[f.M03]*i[f.M31],e[f.M02]=n[f.M00]*i[f.M02]+n[f.M01]*i[f.M12]+n[f.M02]*i[f.M22]+n[f.M03]*i[f.M32],e[f.M03]=n[f.M00]*i[f.M03]+n[f.M01]*i[f.M13]+n[f.M02]*i[f.M23]+n[f.M03]*i[f.M33],e[f.M10]=n[f.M10]*i[f.M00]+n[f.M11]*i[f.M10]+n[f.M12]*i[f.M20]+n[f.M13]*i[f.M30],e[f.M11]=n[f.M10]*i[f.M01]+n[f.M11]*i[f.M11]+n[f.M12]*i[f.M21]+n[f.M13]*i[f.M31],e[f.M12]=n[f.M10]*i[f.M02]+n[f.M11]*i[f.M12]+n[f.M12]*i[f.M22]+n[f.M13]*i[f.M32],e[f.M13]=n[f.M10]*i[f.M03]+n[f.M11]*i[f.M13]+n[f.M12]*i[f.M23]+n[f.M13]*i[f.M33],e[f.M20]=n[f.M20]*i[f.M00]+n[f.M21]*i[f.M10]+n[f.M22]*i[f.M20]+n[f.M23]*i[f.M30],e[f.M21]=n[f.M20]*i[f.M01]+n[f.M21]*i[f.M11]+n[f.M22]*i[f.M21]+n[f.M23]*i[f.M31],e[f.M22]=n[f.M20]*i[f.M02]+n[f.M21]*i[f.M12]+n[f.M22]*i[f.M22]+n[f.M23]*i[f.M32],e[f.M23]=n[f.M20]*i[f.M03]+n[f.M21]*i[f.M13]+n[f.M22]*i[f.M23]+n[f.M23]*i[f.M33],e[f.M30]=n[f.M30]*i[f.M00]+n[f.M31]*i[f.M10]+n[f.M32]*i[f.M20]+n[f.M33]*i[f.M30],e[f.M31]=n[f.M30]*i[f.M01]+n[f.M31]*i[f.M11]+n[f.M32]*i[f.M21]+n[f.M33]*i[f.M31],e[f.M32]=n[f.M30]*i[f.M02]+n[f.M31]*i[f.M12]+n[f.M32]*i[f.M22]+n[f.M33]*i[f.M32],e[f.M33]=n[f.M30]*i[f.M03]+n[f.M31]*i[f.M13]+n[f.M32]*i[f.M23]+n[f.M33]*i[f.M33],this.set(this.temp)},a.prototype.multiplyLeft=function(t){var e=this.temp,n=this.values,i=t.values;return e[f.M00]=i[f.M00]*n[f.M00]+i[f.M01]*n[f.M10]+i[f.M02]*n[f.M20]+i[f.M03]*n[f.M30],e[f.M01]=i[f.M00]*n[f.M01]+i[f.M01]*n[f.M11]+i[f.M02]*n[f.M21]+i[f.M03]*n[f.M31],e[f.M02]=i[f.M00]*n[f.M02]+i[f.M01]*n[f.M12]+i[f.M02]*n[f.M22]+i[f.M03]*n[f.M32],e[f.M03]=i[f.M00]*n[f.M03]+i[f.M01]*n[f.M13]+i[f.M02]*n[f.M23]+i[f.M03]*n[f.M33],e[f.M10]=i[f.M10]*n[f.M00]+i[f.M11]*n[f.M10]+i[f.M12]*n[f.M20]+i[f.M13]*n[f.M30],e[f.M11]=i[f.M10]*n[f.M01]+i[f.M11]*n[f.M11]+i[f.M12]*n[f.M21]+i[f.M13]*n[f.M31],e[f.M12]=i[f.M10]*n[f.M02]+i[f.M11]*n[f.M12]+i[f.M12]*n[f.M22]+i[f.M13]*n[f.M32],e[f.M13]=i[f.M10]*n[f.M03]+i[f.M11]*n[f.M13]+i[f.M12]*n[f.M23]+i[f.M13]*n[f.M33],e[f.M20]=i[f.M20]*n[f.M00]+i[f.M21]*n[f.M10]+i[f.M22]*n[f.M20]+i[f.M23]*n[f.M30],e[f.M21]=i[f.M20]*n[f.M01]+i[f.M21]*n[f.M11]+i[f.M22]*n[f.M21]+i[f.M23]*n[f.M31],e[f.M22]=i[f.M20]*n[f.M02]+i[f.M21]*n[f.M12]+i[f.M22]*n[f.M22]+i[f.M23]*n[f.M32],e[f.M23]=i[f.M20]*n[f.M03]+i[f.M21]*n[f.M13]+i[f.M22]*n[f.M23]+i[f.M23]*n[f.M33],e[f.M30]=i[f.M30]*n[f.M00]+i[f.M31]*n[f.M10]+i[f.M32]*n[f.M20]+i[f.M33]*n[f.M30],e[f.M31]=i[f.M30]*n[f.M01]+i[f.M31]*n[f.M11]+i[f.M32]*n[f.M21]+i[f.M33]*n[f.M31],e[f.M32]=i[f.M30]*n[f.M02]+i[f.M31]*n[f.M12]+i[f.M32]*n[f.M22]+i[f.M33]*n[f.M32],e[f.M33]=i[f.M30]*n[f.M03]+i[f.M31]*n[f.M13]+i[f.M32]*n[f.M23]+i[f.M33]*n[f.M33],this.set(this.temp)},a.prototype.lookAt=function(t,e,n){a.initTemps();var i=a.xAxis,r=a.yAxis,s=a.zAxis;s.setFrom(e).normalize(),i.setFrom(e).normalize(),i.cross(n).normalize(),r.setFrom(i).cross(s).normalize(),this.identity();var o=this.values;return o[f.M00]=i.x,o[f.M01]=i.y,o[f.M02]=i.z,o[f.M10]=r.x,o[f.M11]=r.y,o[f.M12]=r.z,o[f.M20]=-s.x,o[f.M21]=-s.y,o[f.M22]=-s.z,a.tmpMatrix.identity(),a.tmpMatrix.values[f.M03]=-t.x,a.tmpMatrix.values[f.M13]=-t.y,a.tmpMatrix.values[f.M23]=-t.z,this.multiply(a.tmpMatrix),this},a.initTemps=function(){null===a.xAxis&&(a.xAxis=new f.Vector3),null===a.yAxis&&(a.yAxis=new f.Vector3),null===a.zAxis&&(a.zAxis=new f.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[f.M00]=1,t[f.M11]=1,t[f.M22]=1,t[f.M33]=1}f.Matrix4=t}((Pt=re=re||{}).webgl||(Pt.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,n,i){var r=this.context.gl;(this.dirtyVertices||this.dirtyIndices)&&this.update(),this.bind(t),0<this.indicesLength?r.drawElements(e,i,r.UNSIGNED_SHORT,2*n):r.drawArrays(e,n,i),this.unbind(t)},e.prototype.bind=function(t){var e=this.context.gl;e.bindBuffer(e.ARRAY_BUFFER,this.verticesBuffer);for(var n=0,i=0;i<this.attributes.length;i++){var r=this.attributes[i],s=t.getAttributeLocation(r.name);e.enableVertexAttribArray(s),e.vertexAttribPointer(s,r.numElements,e.FLOAT,!1,4*this.elementsPerVertex,4*n),n+=r.numElements}0<this.indicesLength&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,this.indicesBuffer)},e.prototype.unbind=function(t){for(var e=this.context.gl,n=0;n<this.attributes.length;n++){var i=this.attributes[n],r=t.getAttributeLocation(i.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,n,i){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(n*this.elementsPerVertex),this.indices=new Uint16Array(i),this.context.addRestorable(this)}s.Mesh=t;function n(t,e,n){this.name=t,this.type=e,this.numElements=n}s.VertexAttribute=n;var i,r=(oe(o,i=n),o);function o(){return i.call(this,s.Shader.POSITION,M.Float,2)||this}s.Position2Attribute=r;var a,h=(oe(l,a=n),l);function l(){return a.call(this,s.Shader.POSITION,M.Float,3)||this}s.Position3Attribute=h;var u,c=(oe(d,u=n),d);function d(t){return void 0===t&&(t=0),u.call(this,s.Shader.TEXCOORDS+(0==t?"":t),M.Float,2)||this}s.TexCoordAttribute=c;var f,p=(oe(v,f=n),v);function v(){return f.call(this,s.Shader.COLOR,M.Float,4)||this}s.ColorAttribute=p;var g,M,m,x=(oe(y,g=n),y);function y(){return g.call(this,s.Shader.COLOR2,M.Float,4)||this}s.Color2Attribute=x,(m=M=s.VertexAttributeType||(s.VertexAttributeType={}))[m.Float=0]="Float"}((Lt=re=re||{}).webgl||(Lt.webgl={})),_t=re=re||{},kt=_t.webgl||(_t.webgl={}),Ne.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)},Ne.prototype.setBlendMode=function(t,e){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))},Ne.prototype.draw=function(t,e,n){t!=this.lastTexture?(this.flush(),this.lastTexture=t):(this.verticesLength+e.length>this.mesh.getVertices().length||this.indicesLength+n.length>this.mesh.getIndices().length)&&this.flush();var i=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<n.length;s++,o++)r[s]=n[o]+i;this.indicesLength+=n.length,this.mesh.setIndicesLength(this.indicesLength)},Ne.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++)},Ne.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)},Ne.prototype.getDrawCalls=function(){return this.drawCalls},Ne.prototype.dispose=function(){this.mesh.dispose()},Ft=Ne,kt.PolygonBatcher=Ft,Ot=re=re||{},Vt=Ot.webgl||(Ot.webgl={}),Ue.prototype.begin=function(){this.camera.update(),this.enableRenderer(this.batcher)},Ue.prototype.drawSkeleton=function(t,e,n,i){void 0===e&&(e=!1),void 0===n&&(n=-1),void 0===i&&(i=-1),this.enableRenderer(this.batcher),this.skeletonRenderer.premultipliedAlpha=e,this.skeletonRenderer.draw(this.batcher,t,n,i)},Ue.prototype.drawSkeletonDebug=function(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=null),this.enableRenderer(this.shapes),this.skeletonDebugRenderer.premultipliedAlpha=e,this.skeletonDebugRenderer.draw(this.shapes,t,n)},Ue.prototype.drawTexture=function(t,e,n,i,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++]=n,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+i,o[a++]=n,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+i,o[a++]=n+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++]=n+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)},Ue.prototype.drawTextureUV=function(t,e,n,i,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++]=n,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+i,u[c++]=n,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+i,u[c++]=n+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++]=n+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)},Ue.prototype.drawTextureRotated=function(t,e,n,i,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,d=this.QUAD,f=e+s,p=n+o,v=-s,g=-o,M=i-s,m=r-o,x=v,y=g,w=v,E=m,T=M,b=m,A=M,R=g,S=0,I=0,C=0,P=0,L=0,_=0,k=0,F=0;P=0!=a?(C=(L=(u=Ot.MathUtils.cosDeg(a))*T-(c=Ot.MathUtils.sinDeg(a))*b)+((S=u*x-c*y)-(k=u*w-c*E)),(_=c*T+u*b)+((I=c*x+u*y)-(F=c*w+u*E))):(S=x,I=y,k=w,F=E,L=T,_=b,C=A,R),S+=f,I+=p,C+=f,P+=p,L+=f,_+=p,k+=f,F+=p;var O=0;d[O++]=S,d[O++]=I,d[O++]=h.r,d[O++]=h.g,d[O++]=h.b,d[O++]=h.a,d[O++]=0,d[O++]=1,this.twoColorTint&&(d[O++]=0,d[O++]=0,d[O++]=0,d[O++]=0),d[O++]=C,d[O++]=P,d[O++]=h.r,d[O++]=h.g,d[O++]=h.b,d[O++]=h.a,d[O++]=1,d[O++]=1,this.twoColorTint&&(d[O++]=0,d[O++]=0,d[O++]=0,d[O++]=0),d[O++]=L,d[O++]=_,d[O++]=h.r,d[O++]=h.g,d[O++]=h.b,d[O++]=h.a,d[O++]=1,d[O++]=0,this.twoColorTint&&(d[O++]=0,d[O++]=0,d[O++]=0,d[O++]=0),d[O++]=k,d[O++]=F,d[O++]=h.r,d[O++]=h.g,d[O++]=h.b,d[O++]=h.a,d[O++]=0,d[O++]=0,this.twoColorTint&&(d[O++]=0,d[O++]=0,d[O++]=0,d[O++]=0),this.batcher.draw(t,d,this.QUAD_TRIANGLES)},Ue.prototype.drawRegion=function(t,e,n,i,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++]=n,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+i,a[h++]=n,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+i,a[h++]=n+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++]=n+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)},Ue.prototype.line=function(t,e,n,i,r,s){void 0===r&&(r=null),void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.line(t,e,n,i,r)},Ue.prototype.triangle=function(t,e,n,i,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,n,i,r,s,o,a,h,l)},Ue.prototype.quad=function(t,e,n,i,r,s,o,a,h,l,u,c,d){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===d&&(d=null),this.enableRenderer(this.shapes),this.shapes.quad(t,e,n,i,r,s,o,a,h,l,u,c,d)},Ue.prototype.rect=function(t,e,n,i,r,s){void 0===s&&(s=null),this.enableRenderer(this.shapes),this.shapes.rect(t,e,n,i,r,s)},Ue.prototype.rectLine=function(t,e,n,i,r,s,o){void 0===o&&(o=null),this.enableRenderer(this.shapes),this.shapes.rectLine(t,e,n,i,r,s,o)},Ue.prototype.polygon=function(t,e,n,i){void 0===i&&(i=null),this.enableRenderer(this.shapes),this.shapes.polygon(t,e,n,i)},Ue.prototype.circle=function(t,e,n,i,r,s){void 0===r&&(r=null),void 0===s&&(s=0),this.enableRenderer(this.shapes),this.shapes.circle(t,e,n,i,r,s)},Ue.prototype.curve=function(t,e,n,i,r,s,o,a,h,l){void 0===l&&(l=null),this.enableRenderer(this.shapes),this.shapes.curve(t,e,n,i,r,s,o,a,h,l)},Ue.prototype.end=function(){this.activeRenderer===this.batcher?this.batcher.end():this.activeRenderer===this.shapes&&this.shapes.end(),this.activeRenderer=null},Ue.prototype.resize=function(t){var e,n,i,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===Dt.Stretch||(t===Dt.Expand?this.camera.setViewport(a,h):t===Dt.Fit&&(e=o.width,n=o.height,i=this.camera.viewportWidth,s=(r=this.camera.viewportHeight)/i<n/e?i/e:r/n,this.camera.viewportWidth=e*s,this.camera.viewportHeight=n*s)),this.camera.update()},Ue.prototype.enableRenderer=function(t){this.activeRenderer!==t&&(this.end(),t instanceof Vt.PolygonBatcher?(this.batcherShader.bind(),this.batcherShader.setUniform4x4f(Vt.Shader.MVP_MATRIX,this.camera.projectionView.values),this.batcherShader.setUniformi("u_texture",0),this.batcher.begin(this.batcherShader),this.activeRenderer=this.batcher):t instanceof Vt.ShapeRenderer?(this.shapesShader.bind(),this.shapesShader.setUniform4x4f(Vt.Shader.MVP_MATRIX,this.camera.projectionView.values),this.shapes.begin(this.shapesShader),this.activeRenderer=this.shapes):this.activeRenderer=this.skeletonDebugRenderer)},Ue.prototype.dispose=function(){this.batcher.dispose(),this.batcherShader.dispose(),this.shapes.dispose(),this.shapesShader.dispose(),this.skeletonDebugRenderer.dispose()},Ut=Ue,Vt.SceneRenderer=Ut,(Nt=Dt=Vt.ResizeMode||(Vt.ResizeMode={}))[Nt.Stretch=0]="Stretch",Nt[Nt.Expand=1]="Expand",Nt[Nt.Fit=2]="Fit",Bt=re=re||{},Xt=Bt.webgl||(Bt.webgl={}),Be.prototype.getProgram=function(){return this.program},Be.prototype.getVertexShader=function(){return this.vertexShader},Be.prototype.getFragmentShader=function(){return this.fragmentShader},Be.prototype.getVertexShaderSource=function(){return this.vsSource},Be.prototype.getFragmentSource=function(){return this.fsSource},Be.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}},Be.prototype.compileShader=function(t,e){var n=this.context.gl,i=n.createShader(t);if(n.shaderSource(i,e),n.compileShader(i),!n.getShaderParameter(i,n.COMPILE_STATUS)){var r="Couldn't compile shader: "+n.getShaderInfoLog(i);if(n.deleteShader(i),!n.isContextLost())throw new Error(r)}return i},Be.prototype.compileProgram=function(t,e){var n=this.context.gl,i=n.createProgram();if(n.attachShader(i,t),n.attachShader(i,e),n.linkProgram(i),!n.getProgramParameter(i,n.LINK_STATUS)){var r="Couldn't compile shader program: "+n.getProgramInfoLog(i);if(n.deleteProgram(i),!n.isContextLost())throw new Error(r)}return i},Be.prototype.restore=function(){this.compile()},Be.prototype.bind=function(){this.context.gl.useProgram(this.program)},Be.prototype.unbind=function(){this.context.gl.useProgram(null)},Be.prototype.setUniformi=function(t,e){this.context.gl.uniform1i(this.getUniformLocation(t),e)},Be.prototype.setUniformf=function(t,e){this.context.gl.uniform1f(this.getUniformLocation(t),e)},Be.prototype.setUniform2f=function(t,e,n){this.context.gl.uniform2f(this.getUniformLocation(t),e,n)},Be.prototype.setUniform3f=function(t,e,n,i){this.context.gl.uniform3f(this.getUniformLocation(t),e,n,i)},Be.prototype.setUniform4f=function(t,e,n,i,r){this.context.gl.uniform4f(this.getUniformLocation(t),e,n,i,r)},Be.prototype.setUniform2x2f=function(t,e){var n=this.context.gl;this.tmp2x2.set(e),n.uniformMatrix2fv(this.getUniformLocation(t),!1,this.tmp2x2)},Be.prototype.setUniform3x3f=function(t,e){var n=this.context.gl;this.tmp3x3.set(e),n.uniformMatrix3fv(this.getUniformLocation(t),!1,this.tmp3x3)},Be.prototype.setUniform4x4f=function(t,e){var n=this.context.gl;this.tmp4x4.set(e),n.uniformMatrix4fv(this.getUniformLocation(t),!1,this.tmp4x4)},Be.prototype.getUniformLocation=function(t){var e=this.context.gl,n=e.getUniformLocation(this.program,t);if(!n&&!e.isContextLost())throw new Error("Couldn't find location for uniform "+t);return n},Be.prototype.getAttributeLocation=function(t){var e=this.context.gl,n=e.getAttribLocation(this.program,t);if(-1==n&&!e.isContextLost())throw new Error("Couldn't find location for attribute "+t);return n},Be.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)},Be.newColoredTextured=function(t){return new Be(t,"\n\t\t\t\tattribute vec4 "+Be.POSITION+";\n\t\t\t\tattribute vec4 "+Be.COLOR+";\n\t\t\t\tattribute vec2 "+Be.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+Be.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 = "+Be.COLOR+";\n\t\t\t\t\tv_texCoords = "+Be.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+Be.MVP_MATRIX+" * "+Be.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")},Be.newTwoColoredTextured=function(t){return new Be(t,"\n\t\t\t\tattribute vec4 "+Be.POSITION+";\n\t\t\t\tattribute vec4 "+Be.COLOR+";\n\t\t\t\tattribute vec4 "+Be.COLOR2+";\n\t\t\t\tattribute vec2 "+Be.TEXCOORDS+";\n\t\t\t\tuniform mat4 "+Be.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 = "+Be.COLOR+";\n\t\t\t\t\tv_dark = "+Be.COLOR2+";\n\t\t\t\t\tv_texCoords = "+Be.TEXCOORDS+";\n\t\t\t\t\tgl_Position = "+Be.MVP_MATRIX+" * "+Be.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")},Be.newColored=function(t){return new Be(t,"\n\t\t\t\tattribute vec4 "+Be.POSITION+";\n\t\t\t\tattribute vec4 "+Be.COLOR+";\n\t\t\t\tuniform mat4 "+Be.MVP_MATRIX+";\n\t\t\t\tvarying vec4 v_color;\n\n\t\t\t\tvoid main () {\n\t\t\t\t\tv_color = "+Be.COLOR+";\n\t\t\t\t\tgl_Position = "+Be.MVP_MATRIX+" * "+Be.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")},Be.MVP_MATRIX="u_projTrans",Be.POSITION="a_position",Be.COLOR="a_color",Be.COLOR2="a_color2",Be.TEXCOORDS="a_texCoords",Be.SAMPLER="u_texture",Yt=Be,Xt.Shader=Yt,zt=re=re||{},Wt=zt.webgl||(zt.webgl={}),Xe.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)},Xe.prototype.setBlendMode=function(t,e){var n=this.context.gl;this.srcBlend=t,this.dstBlend=e,this.isDrawing&&(this.flush(),n.blendFunc(this.srcBlend,this.dstBlend))},Xe.prototype.setColor=function(t){this.color.setFromColor(t)},Xe.prototype.setColorWith=function(t,e,n,i){this.color.set(t,e,n,i)},Xe.prototype.point=function(t,e,n){void 0===n&&(n=null),this.check(qt.Point,1),null===n&&(n=this.color),this.vertex(t,e,n)},Xe.prototype.line=function(t,e,n,i,r){void 0===r&&(r=null),this.check(qt.Line,2),this.mesh.getVertices(),this.vertexIndex,null===r&&(r=this.color),this.vertex(t,e,r),this.vertex(n,i,r)},Xe.prototype.triangle=function(t,e,n,i,r,s,o,a,h,l){void 0===a&&(a=null),void 0===h&&(h=null),void 0===l&&(l=null),this.check(t?qt.Filled:qt.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,n,a),this.vertex(i,r,h),this.vertex(s,o,l)):(this.vertex(e,n,a),this.vertex(i,r,h),this.vertex(i,r,a),this.vertex(s,o,h),this.vertex(s,o,a),this.vertex(e,n,h))},Xe.prototype.quad=function(t,e,n,i,r,s,o,a,h,l,u,c,d){void 0===l&&(l=null),void 0===u&&(u=null),void 0===c&&(c=null),void 0===d&&(d=null),this.check(t?qt.Filled:qt.Line,3),this.mesh.getVertices(),this.vertexIndex,null===l&&(l=this.color),null===u&&(u=this.color),null===c&&(c=this.color),null===d&&(d=this.color),t?(this.vertex(e,n,l),this.vertex(i,r,u),this.vertex(s,o,c),this.vertex(s,o,c)):(this.vertex(e,n,l),this.vertex(i,r,u),this.vertex(i,r,u),this.vertex(s,o,c),this.vertex(s,o,c),this.vertex(a,h,d)),this.vertex(a,h,d),this.vertex(e,n,l)},Xe.prototype.rect=function(t,e,n,i,r,s){void 0===s&&(s=null),this.quad(t,e,n,e+i,n,e+i,n+r,e,n+r,s,s,s,s)},Xe.prototype.rectLine=function(t,e,n,i,r,s,o){void 0===o&&(o=null),this.check(t?qt.Filled:qt.Line,8),null===o&&(o=this.color);var a=this.tmp.set(r-n,e-i);a.normalize(),s*=.5;var h=a.x*s,l=a.y*s;t?(this.vertex(e+h,n+l,o),this.vertex(e-h,n-l,o),this.vertex(i+h,r+l,o),this.vertex(i-h,r-l,o),this.vertex(i+h,r+l,o)):(this.vertex(e+h,n+l,o),this.vertex(e-h,n-l,o),this.vertex(i+h,r+l,o),this.vertex(i-h,r-l,o),this.vertex(i+h,r+l,o),this.vertex(e+h,n+l,o),this.vertex(i-h,r-l,o)),this.vertex(e-h,n-l,o)},Xe.prototype.x=function(t,e,n){this.line(t-n,e-n,t+n,e+n),this.line(t-n,e+n,t+n,e-n)},Xe.prototype.polygon=function(t,e,n,i){if(void 0===i&&(i=null),n<3)throw new Error("Polygon must contain at least 3 vertices");this.check(qt.Line,2*n),null===i&&(i=this.color),this.mesh.getVertices(),this.vertexIndex,n<<=1;for(var r=t[e<<=1],s=t[e+1],o=e+n,a=e,h=e+n-2;a<h;a+=2){var l=t[a],u=t[a+1],c=0,d=0,d=o<=a+2?(c=r,s):(c=t[a+2],t[a+3]);this.vertex(l,u,i),this.vertex(c,d,i)}},Xe.prototype.circle=function(t,e,n,i,r,s){if(void 0===r&&(r=null),void 0===s&&(s=0),0===s&&(s=Math.max(1,6*zt.MathUtils.cbrt(i)|0)),s<=0)throw new Error("segments must be > 0.");null===r&&(r=this.color);var o=2*zt.MathUtils.PI/s,a=Math.cos(o),h=Math.sin(o),l=i,u=0;if(t){for(this.check(qt.Filled,3*s+3),s--,d=0;d<s;d++){this.vertex(e,n,r),this.vertex(e+l,n+u,r);var c=l;l=a*l-h*u,u=h*c+a*u,this.vertex(e+l,n+u,r)}this.vertex(e,n,r),this.vertex(e+l,n+u,r)}else{this.check(qt.Line,2*s+2);for(var d=0;d<s;d++){this.vertex(e+l,n+u,r);var f=l,l=a*l-h*u,u=h*f+a*u;this.vertex(e+l,n+u,r)}this.vertex(e+l,n+u,r)}l=i,u=0,this.vertex(e+l,n+u,r)},Xe.prototype.curve=function(t,e,n,i,r,s,o,a,h,l){void 0===l&&(l=null),this.check(qt.Line,2*h+2),null===l&&(l=this.color);for(var u=1/h,c=u*u,d=u*u*u,f=3*u,p=3*c,v=6*c,g=6*d,M=t-2*n+r,m=e-2*i+s,x=3*(n-r)-t+o,y=3*(i-s)-e+a,w=t,E=e,T=(n-t)*f+M*p+x*d,b=(i-e)*f+m*p+y*d,A=M*v+x*g,R=m*v+y*g,S=x*g,I=y*g;0<h--;)this.vertex(w,E,l),w+=T,E+=b,T+=A,b+=R,A+=S,R+=I,this.vertex(w,E,l);this.vertex(w,E,l),this.vertex(o,a,l)},Xe.prototype.vertex=function(t,e,n){var i=this.vertexIndex,r=this.mesh.getVertices();r[i++]=t,r[i++]=e,r[i++]=n.r,r[i++]=n.g,r[i++]=n.b,r[i++]=n.a,this.vertexIndex=i},Xe.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},Xe.prototype.flush=function(){0!=this.vertexIndex&&(this.mesh.setVerticesLength(this.vertexIndex),this.mesh.draw(this.shader,this.shapeType),this.vertexIndex=0)},Xe.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},Xe.prototype.dispose=function(){this.mesh.dispose()},Ht=Xe,Wt.ShapeRenderer=Ht,(Gt=qt=Wt.ShapeType||(Wt.ShapeType={}))[Gt.Point=0]="Point",Gt[Gt.Line=1]="Line",Gt[Gt.Filled=4]="Filled",jt=re=re||{},Zt=jt.webgl||(jt.webgl={}),Ye.prototype.draw=function(t,e,n){void 0===n&&(n=null);var i=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];n&&-1<n.indexOf(u.data.name)||null!=u.parent&&(E=i+u.data.length*u.a+u.worldX,T=r+u.data.length*u.c+u.worldY,t.rectLine(!0,i+u.worldX,r+u.worldY,E,T,this.boneWidth*this.scale))}this.drawSkeletonXY&&t.x(i,r,4*this.scale)}if(this.drawRegionAttachments)for(t.setColor(this.attachmentLineColor),h=0,l=(U=e.slots).length;h<l;h++)(X=(B=U[h]).getAttachment())instanceof jt.RegionAttachment&&(d=this.vertices,X.computeWorldVertices(B.bone,d,0,2),t.line(d[0],d[1],d[2],d[3]),t.line(d[2],d[3],d[4],d[5]),t.line(d[4],d[5],d[6],d[7]),t.line(d[6],d[7],d[0],d[1]));if(this.drawMeshHull||this.drawMeshTriangles)for(h=0,l=(U=e.slots).length;h<l;h++)if((B=U[h]).bone.active&&(X=B.getAttachment())instanceof jt.MeshAttachment){var c=X,d=this.vertices;c.computeWorldVertices(B,0,c.worldVerticesLength,d,0,2);var f=c.triangles,p=c.hullLength;if(this.drawMeshTriangles){t.setColor(this.triangleLineColor);for(var v=0,g=f.length;v<g;v+=3){var M=2*f[v],m=2*f[v+1],x=2*f[v+2];t.triangle(!1,d[M],d[1+M],d[m],d[1+m],d[x],d[1+x])}}if(this.drawMeshHull&&0<p){t.setColor(this.attachmentLineColor);for(var y=d[(p=2*(p>>1))-2],w=d[p-1],v=0,g=p;v<g;v+=2){var E=d[v],T=d[v+1];t.line(E,T,y,w),y=E,w=T}}}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=(U=e.slots).length;h<l;h++)if((B=U[h]).bone.active&&(X=B.getAttachment())instanceof jt.PathAttachment){var I=X,g=I.worldVerticesLength,C=this.temp=jt.Utils.setArraySize(this.temp,g,0);I.computeWorldVertices(B,0,g,C,0,2);var P=this.pathColor,L=C[2],_=C[3],k=0,F=0;for(I.closed&&(t.setColor(P),O=C[0],V=C[1],D=C[g-2],N=C[g-1],k=C[g-4],F=C[g-3],t.curve(L,_,O,V,D,N,k,F,32),t.setColor(Ye.LIGHT_GRAY),t.line(L,_,O,V),t.line(k,F,D,N)),g-=4,v=4;v<g;v+=6){var O=C[v],V=C[v+1],D=C[v+2],N=C[v+3];k=C[v+4],F=C[v+5],t.setColor(P),t.curve(L,_,O,V,D,N,k,F,32),t.setColor(Ye.LIGHT_GRAY),t.line(L,_,O,V),t.line(k,F,D,N),L=k,_=F}}if(this.drawBones)for(t.setColor(this.boneOriginColor),h=0,l=a.length;h<l;h++)u=a[h],n&&-1<n.indexOf(u.data.name)||t.circle(!0,i+u.worldX,r+u.worldY,3*this.scale,Ye.GREEN,8);if(this.drawClipping){var U=e.slots;t.setColor(this.clipColor);for(var B,X,h=0,l=U.length;h<l;h++)if((B=U[h]).bone.active&&(X=B.getAttachment())instanceof jt.ClippingAttachment){var Y=X,g=Y.worldVerticesLength,C=this.temp=jt.Utils.setArraySize(this.temp,g,0);Y.computeWorldVertices(B,0,g,C,0,2);for(var z=0,W=C.length;z<W;z+=2)E=C[z],T=C[z+1],k=C[(z+2)%C.length],F=C[(z+3)%C.length],t.line(E,T,k,F)}}},Ye.prototype.dispose=function(){},Ye.LIGHT_GRAY=new jt.Color(192/255,192/255,192/255,1),Ye.GREEN=new jt.Color(0,1,0,1),Kt=Ye,Zt.SkeletonDebugRenderer=Kt,Qt=re=re||{},Jt=Qt.webgl||(Qt.webgl={}),$t=function(t,e,n){this.vertices=t,this.numVertices=e,this.numFloats=n},ze.prototype.draw=function(t,e,n,i){void 0===n&&(n=-1),void 0===i&&(i=-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,d=this.renderable,f=null,p=null,v=e.drawOrder,g=null,M=e.color,m=o?12:8,x=!1;-1==n&&(x=!0);for(var y=0,w=v.length;y<w;y++){var E=r.isClipping()?2:m,T=v[y];if(T.bone.active)if(0<=n&&n==T.data.index&&(x=!0),x){0<=i&&i==T.data.index&&(x=!1);var b=T.getAttachment(),A=null;if(b instanceof Qt.RegionAttachment){var R=b;d.vertices=this.vertices,d.numVertices=4,d.numFloats=E<<2,R.computeWorldVertices(T.bone,d.vertices,0,E),p=ze.QUAD_TRIANGLES,f=R.uvs,A=R.region.renderObject.texture,g=R.color}else{if(!(b instanceof Qt.MeshAttachment)){if(b instanceof Qt.ClippingAttachment){r.clipStart(T,b);continue}r.clipEndWithSlot(T);continue}var S=b;d.vertices=this.vertices,d.numVertices=S.worldVerticesLength>>1,d.numFloats=d.numVertices*E,d.numFloats>d.vertices.length&&(d.vertices=this.vertices=Qt.Utils.newFloatArray(d.numFloats)),S.computeWorldVertices(T,0,S.worldVerticesLength,d.vertices,0,E),p=S.triangles,A=S.region.renderObject.texture,f=S.uvs,g=S.color}if(null!=A){var I=T.color,C=this.tempColor;C.r=M.r*I.r*g.r,C.g=M.g*I.g*g.g,C.b=M.b*I.b*g.b,C.a=M.a*I.a*g.a,s&&(C.r*=C.a,C.g*=C.a,C.b*=C.a);var P=this.tempColor2;null==T.darkColor?P.set(0,0,0,1):(s?(P.r=T.darkColor.r*C.a,P.g=T.darkColor.g*C.a,P.b=T.darkColor.b*C.a):P.setFromColor(T.darkColor),P.a=s?1:0);var L=T.data.blendMode;if(L!=a&&(a=L,t.setBlendMode(Jt.WebGLBlendModeConverter.getSourceGLBlendMode(a,s),Jt.WebGLBlendModeConverter.getDestGLBlendMode(a))),r.isClipping()){r.clipTriangles(d.vertices,d.numFloats,p,p.length,f,C,P,o);var _=new Float32Array(r.clippedVertices),k=r.clippedTriangles;if(null!=this.vertexEffect){var F=this.vertexEffect,O=_;if(o)for(var V=0,D=_.length;V<D;V+=m)h.x=O[V],h.y=O[V+1],u.set(O[V+2],O[V+3],O[V+4],O[V+5]),l.x=O[V+6],l.y=O[V+7],c.set(O[V+8],O[V+9],O[V+10],O[V+11]),F.transform(h,l,u,c),O[V]=h.x,O[V+1]=h.y,O[V+2]=u.r,O[V+3]=u.g,O[V+4]=u.b,O[V+5]=u.a,O[V+6]=l.x,O[V+7]=l.y,O[V+8]=c.r,O[V+9]=c.g,O[V+10]=c.b,O[V+11]=c.a;else for(var V=0,N=_.length;V<N;V+=m)h.x=O[V],h.y=O[V+1],u.set(O[V+2],O[V+3],O[V+4],O[V+5]),l.x=O[V+6],l.y=O[V+7],c.set(0,0,0,0),F.transform(h,l,u,c),O[V]=h.x,O[V+1]=h.y,O[V+2]=u.r,O[V+3]=u.g,O[V+4]=u.b,O[V+5]=u.a,O[V+6]=l.x,O[V+7]=l.y}t.draw(A,_,k)}else{if(O=d.vertices,null!=this.vertexEffect)if(F=this.vertexEffect,o)for(var V=0,U=0,B=d.numFloats;V<B;V+=m,U+=2)h.x=O[V],h.y=O[V+1],l.x=f[U],l.y=f[U+1],u.setFromColor(C),c.setFromColor(P),F.transform(h,l,u,c),O[V]=h.x,O[V+1]=h.y,O[V+2]=u.r,O[V+3]=u.g,O[V+4]=u.b,O[V+5]=u.a,O[V+6]=l.x,O[V+7]=l.y,O[V+8]=c.r,O[V+9]=c.g,O[V+10]=c.b,O[V+11]=c.a;else for(var V=0,U=0,X=d.numFloats;V<X;V+=m,U+=2)h.x=O[V],h.y=O[V+1],l.x=f[U],l.y=f[U+1],u.setFromColor(C),c.set(0,0,0,0),F.transform(h,l,u,c),O[V]=h.x,O[V+1]=h.y,O[V+2]=u.r,O[V+3]=u.g,O[V+4]=u.b,O[V+5]=u.a,O[V+6]=l.x,O[V+7]=l.y;else if(o)for(var V=2,U=0,Y=d.numFloats;V<Y;V+=m,U+=2)O[V]=C.r,O[V+1]=C.g,O[V+2]=C.b,O[V+3]=C.a,O[V+4]=f[U],O[V+5]=f[U+1],O[V+6]=P.r,O[V+7]=P.g,O[V+8]=P.b,O[V+9]=P.a;else for(var V=2,U=0,z=d.numFloats;V<z;V+=m,U+=2)O[V]=C.r,O[V+1]=C.g,O[V+2]=C.b,O[V+3]=C.a,O[V+4]=f[U],O[V+5]=f[U+1];var W=d.vertices.subarray(0,d.numFloats);t.draw(A,W,p)}}r.clipEndWithSlot(T)}else r.clipEndWithSlot(T);else r.clipEndWithSlot(T)}r.clipEnd()},ze.QUAD_TRIANGLES=[0,1,2,2,3,0],te=ze,Jt.SkeletonRenderer=te,ee=re=re||{},ne=ee.webgl||(ee.webgl={}),We.prototype.setFrom=function(t){return this.x=t.x,this.y=t.y,this.z=t.z,this},We.prototype.set=function(t,e,n){return this.x=t,this.y=e,this.z=n,this},We.prototype.add=function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z,this},We.prototype.sub=function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z,this},We.prototype.scale=function(t){return this.x*=t,this.y*=t,this.z*=t,this},We.prototype.normalize=function(){var t=this.length();return 0==t||(t=1/t,this.x*=t,this.y*=t,this.z*=t),this},We.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)},We.prototype.multiply=function(t){var e=t.values;return this.set(this.x*e[ne.M00]+this.y*e[ne.M01]+this.z*e[ne.M02]+e[ne.M03],this.x*e[ne.M10]+this.y*e[ne.M11]+this.z*e[ne.M12]+e[ne.M13],this.x*e[ne.M20]+this.y*e[ne.M21]+this.z*e[ne.M22]+e[ne.M23])},We.prototype.project=function(t){var e=t.values,n=1/(this.x*e[ne.M30]+this.y*e[ne.M31]+this.z*e[ne.M32]+e[ne.M33]);return this.set((this.x*e[ne.M00]+this.y*e[ne.M01]+this.z*e[ne.M02]+e[ne.M03])*n,(this.x*e[ne.M10]+this.y*e[ne.M11]+this.z*e[ne.M12]+e[ne.M13])*n,(this.x*e[ne.M20]+this.y*e[ne.M21]+this.z*e[ne.M22]+e[ne.M23])*n)},We.prototype.dot=function(t){return this.x*t.x+this.y*t.y+this.z*t.z},We.prototype.length=function(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)},We.prototype.distance=function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z;return Math.sqrt(e*e+n*n+i*i)},ie=We,ne.Vector3=ie,function(t){var e=(n.prototype.addRestorable=function(t){this.restorables.push(t)},n.prototype.removeRestorable=function(t){var e=this.restorables.indexOf(t);-1<e&&this.restorables.splice(e,1)},n);function n(t,e){var n,i=this;void 0===e&&(e={alpha:"true"}),this.restorables=new Array,t instanceof HTMLCanvasElement?(n=t,this.gl=n.getContext("webgl2",e)||n.getContext("webgl",e),(this.canvas=n).addEventListener("webglcontextlost",function(t){t&&t.preventDefault()}),n.addEventListener("webglcontextrestored",function(t){for(var e=0,n=i.restorables.length;e<n;e++)i.restorables[e].restore()})):(this.gl=t,this.canvas=this.gl.canvas)}t.ManagedWebGLRenderingContext=e;var i=(r.getDestGLBlendMode=function(t){switch(t){case se.BlendMode.Normal:return r.ONE_MINUS_SRC_ALPHA;case se.BlendMode.Additive:return r.ONE;case se.BlendMode.Multiply:case se.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 se.BlendMode.Normal:case se.BlendMode.Additive:return e?r.ONE:r.SRC_ALPHA;case se.BlendMode.Multiply:return r.DST_COLOR;case se.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=i}((se=re=re||{}).webgl||(se.webgl={})),qe.exports=re}).call(window)},function(t,e,n){var i=n(0),m=n(4),x=n(177),f=n(2),p=n(191),v=n(192),g=n(193),r=new i({Extends:v,initialize:function(t,e,n,i,r,s,o){var a,h,l,u=[],c=t.cacheManager.custom.spine;if(f(e)){var d=e;for(e=m(d,"key"),h=new p(t,{key:e,url:m(d,"jsonURL"),extension:m(d,"jsonExtension","json"),xhrSettings:m(d,"jsonXhrSettings")}),i=m(d,"atlasURL"),r=m(d,"preMultipliedAlpha"),Array.isArray(i)||(i=[i]),a=0;a<i.length;a++)(l=new g(t,{key:e+"_"+a,url:i[a],extension:m(d,"atlasExtension","atlas"),xhrSettings:m(d,"atlasXhrSettings")})).cache=c,u.push(l)}else for(h=new p(t,e,n,s),Array.isArray(i)||(i=[i]),a=0;a<i.length;a++)(l=new g(t,e+"_"+a,i[a],o)).cache=c,u.push(l);u.unshift(h),v.call(this,t,"spine",e,u),this.config.preMultipliedAlpha=r},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"text"===t.type)){for(var e=t.data.split("\n"),n=[],i=0;i<e.length;i++){var r=e[i];""===r.trim()&&i<e.length-1&&(r=e[i+1],n.push(r))}var s=this.config,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],d=m(s,"prefix",this.prefix),f=m(s,"textureXhrSettings");o.setBaseURL(u),o.setPath(c),o.setPrefix(d);for(var p=0;p<n.length;p++){var v=n[p],g=this.prefix+v,M=new x(o,g,v,f);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="",n="",i=!!this.config.preMultipliedAlpha,r=1;r<this.files.length;r++){var s,o,a,h=this.files[r];"text"===h.type?(e=h.key.replace(/_[\d]$/,""),t=h.cache,n=n.concat(h.data)):(o=(s=h.key.trim()).indexOf("_"),a=s.substr(o+1),this.loader.textureManager.addImage(a,h.data)),h.pendingDestroy()}t.add(e,{preMultipliedAlpha:i,data:n,prefix:this.prefix}),this.complete=!0}}});t.exports=r},function(t,e,n){var i=n(0),r=n(6),c=n(13),s=n(14),d=n(4),f=n(2),o=new i({Extends:c,initialize:function t(e,n,i,r,s){var o,a,h="png";f(n)&&(n=d(a=n,"key"),i=d(a,"url"),o=d(a,"normalMap"),r=d(a,"xhrSettings"),h=d(a,"extension",h),s=d(a,"frameConfig")),Array.isArray(i)&&(o=i[1],i=i[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:n,url:i,xhrSettings:r,config:s};c.call(this,e,u),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,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new o(this,t[i]));else this.addFile(new o(this,t,e,n));return this}),t.exports=o},function(t,e,n){t.exports={ADD:n(179),COMPLETE:n(180),FILE_COMPLETE:n(181),FILE_KEY_COMPLETE:n(182),FILE_LOAD_ERROR:n(183),FILE_LOAD:n(184),FILE_PROGRESS:n(185),POST_PROCESS:n(186),PROGRESS:n(187),START:n(188)}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,n){var s=n(32);t.exports=function(t,e){var n=s(e,t.xhrSettings),i=new XMLHttpRequest;if(i.open("GET",t.src,n.async,n.user,n.password),i.responseType=t.xhrSettings.responseType,i.timeout=n.timeout,n.headers)for(var r in n.headers)i.setRequestHeader(r,n.headers[r]);return n.header&&n.headerValue&&i.setRequestHeader(n.header,n.headerValue),n.requestedWith&&i.setRequestHeader("X-Requested-With",n.requestedWith),n.overrideMimeType&&i.overrideMimeType(n.overrideMimeType),n.withCredentials&&(i.withCredentials=!0),i.onload=t.onLoad.bind(t,i),i.onerror=t.onError.bind(t,i),i.onprogress=t.onProgress.bind(t),i.send(),i}},function(t,e,n){var i=n(0),h=n(6),l=n(13),r=n(14),u=n(4),c=n(12),d=n(2),s=new i({Extends:l,initialize:function(t,e,n,i,r){var s,o="json";d(e)&&(e=u(s=e,"key"),n=u(s,"url"),i=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:n,xhrSettings:i,config:r};l.call(this,t,a),d(n)&&(this.data=r?c(n,r):n,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});r.register("json",function(t,e,n,i){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,i,n));return this}),t.exports=s},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){this.loader=t,this.type=e,this.key=n,this.multiKeyIndex=t.multiKeyIndex++,this.files=i,this.complete=!1,this.pending=i.length,this.failed=0,this.config={},this.baseURL=t.baseURL,this.path=t.path,this.prefix=t.prefix;for(var r=0;r<i.length;r++)i[r].multiFile=this},isReadyToProcess:function(){return 0===this.pending&&0===this.failed&&!this.complete},addToMultiFile:function(t){return this.files.push(t),(t.multiFile=this).pending++,this.complete=!1,this},onFileComplete:function(t){-1!==this.files.indexOf(t)&&this.pending--},onFileFailed:function(t){-1!==this.files.indexOf(t)&&this.failed++}});t.exports=i},function(t,e,n){var i=n(0),r=n(6),a=n(13),s=n(14),h=n(4),l=n(2),o=new i({Extends:a,initialize:function(t,e,n,i){var r,s="txt";l(e)&&(e=h(r=e,"key"),n=h(r,"url"),i=h(r,"xhrSettings"),s=h(r,"extension",s));var o={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:n,xhrSettings:i};a.call(this,t,o)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new o(this,t[i]));else this.addFile(new o(this,t,e,n));return this}),t.exports=o},function(t,e,n){var h=n(16),l=n(9),i=n(0),r=n(195),s=n(196),o=n(197),a=n(198),u=n(199),c=n(201),d=n(7),f=n(27),p=n(202),v=n(10),g=n(225),M=n(232),m=new i({Extends:p,Mixins:[r,s,o,a,u,c,M],initialize:function(t,e,n,i,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=0,this.setPosition(n,i),r&&this.setSkeleton(r,s,o)},willRender:function(){return!0},setAlpha:function(t,e){var n;return void 0===t&&(t=1),e?(n=this.findSlot(e))&&(n.color.a=l(t,0,1)):this.alpha=t,this},alpha:{get:function(){return this.skeleton.color.a},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.a=e),0===e?this.renderFlags&=-3:this.renderFlags|=2}},red:{get:function(){return this.skeleton.color.r},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.r=e)}},green:{get:function(){return this.skeleton.color.g},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.g=e)}},blue:{get:function(){return this.skeleton.color.b},set:function(t){var e=l(t,0,1);this.skeleton&&(this.skeleton.color.b=e)}},setColor:function(t,e){void 0===t&&(t=16777215);var n,i=(t>>16&255)/255,r=(t>>8&255)/255,s=(255&t)/255,o=16777215<t?(t>>>24)/255:null,a=this.skeleton;return!e||(n=this.findSlot(e))&&(a=n),a.color.r=i,a.color.g=r,a.color.b=s,null!==o&&(a.color.a=o),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=v(d(this.rotation))+90),this.state.apply(s),s.updateCache(),this.updateSize()},onComplete:function(t){this.emit(g.COMPLETE,t)},onDispose:function(t){this.emit(g.DISPOSE,t)},onEnd:function(t){this.emit(g.END,t)},onEvent:function(t,e){this.emit(g.EVENT,t,e)},onInterrupted:function(t){this.emit(g.INTERRUPTED,t)},onStart:function(t){this.emit(g.START,t)},refresh:function(){return this.root&&(this.root.rotation=v(d(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.bones.length;n++)t.push(e.bones[n].name);return t},getSkinList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.skins.length;n++)t.push(e.skins[n].name);return t},getSlotList:function(){for(var t=[],e=this.skeleton,n=0;n<e.slots.length;n++)t.push(e.slots[n].data.name);return t},getAnimationList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.animations.length;n++)t.push(e.animations[n].name);return t},getCurrentAnimation:function(t){void 0===t&&(t=0);var e=this.state.getCurrent(t);if(e)return e.animation},play:function(t,e,n){return this.setAnimation(0,t,e,n),this},setAnimation:function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=!1),i&&this.state){var r=this.state.getCurrent(0);if(r&&r.animation.name===e&&!r.isComplete())return}if(this.findAnimation(e))return this.state.setAnimation(t,e,n)},addAnimation:function(t,e,n,i){return this.state.addAnimation(t,e,n,i)},setEmptyAnimation:function(t,e){return this.state.setEmptyAnimation(t,e)},clearTrack:function(t){return this.state.clearTrack(t),this},clearTracks:function(){return this.state.clearTracks(),this},setSkinByName:function(t){var e=this.skeleton;return e.setSkinByName(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setSkin:function(t){var e=this.skeleton;return e.setSkin(t),e.setSlotsToSetupPose(),this.state.apply(e),this},setMix:function(t,e,n){return this.stateData.setMix(t,e,n),this},getAttachment:function(t,e){return this.skeleton.getAttachment(t,e)},getAttachmentByName:function(t,e){return this.skeleton.getAttachmentByName(t,e)},setAttachment:function(t,e){if(Array.isArray(t)&&Array.isArray(e)&&t.length===e.length)for(var n=0;n<t.length;n++)this.skeleton.setAttachment(t[n],e[n]);else this.skeleton.setAttachment(t,e);return this},setToSetupPose:function(){return this.skeleton.setToSetupPose(),this},setSlotsToSetupPose:function(){return this.skeleton.setSlotsToSetupPose(),this},setBonesToSetupPose:function(){return this.skeleton.setBonesToSetupPose(),this},getRootBone:function(){return this.skeleton.getRootBone()},angleBoneToXY:function(t,e,n,i,r,s){void 0===i&&(i=0),void 0===r&&(r=0),void 0===s&&(s=360);var o=this.plugin.renderer.height,a=d(h(t.worldX,o-t.worldY,e,n)+f(i));return t.rotation=l(v(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 n=this.skeleton;this.state.update(e/1e3*this.timeScale),this.state.apply(n)},preDestroy:function(){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.plugin=null,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null}});t.exports=m},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){var n={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=n},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var n={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=n},function(t,e,n){var i=n(1),r=n(200),h=n(28),s=n(18),o=n(19),l=n(3),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*i.RAD_TO_DEG)},set:function(t){this.rotation=o(t)*i.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.z=n,this.w=i,this},setRandomPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=this.scene.sys.scale.width),void 0===i&&(i=this.scene.sys.scale.height),this.x=t+Math.random()*n,this.y=e+Math.random()*i,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var n=this.parentContainer;if(!n)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);n;)e.applyITRS(n.x,n.y,n._rotation,n._scaleX,n._scaleY),e.multiply(t,t),n=n.parentContainer;return t},getLocalPoint:function(t,e,n,i){n=n||new l;var r=(i=i||this.scene.sys.cameras.main).scrollX,s=i.scrollY,o=t+r*this.scrollFactorX-r,a=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(o,a,n):h(o,a,this.x,this.y,this.rotation,this.scaleX,this.scaleY,n),this._originComponent&&(n.x+=this._displayOriginX,n.y+=this._displayOriginY),n},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=a},function(t,e,n){var i=n(0),s=n(1),c=n(3),r=new i({initialize:function(t,e,n,i,r,s){void 0===t&&(t=1),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=1),void 0===r&&(r=0),void 0===s&&(s=0),this.matrix=new Float32Array([t,e,n,i,r,s,0,0,1]),this.decomposedMatrix={translateX:0,translateY:0,scaleX:1,scaleY:1,rotation:0}},a:{get:function(){return this.matrix[0]},set:function(t){this.matrix[0]=t}},b:{get:function(){return this.matrix[1]},set:function(t){this.matrix[1]=t}},c:{get:function(){return this.matrix[2]},set:function(t){this.matrix[2]=t}},d:{get:function(){return this.matrix[3]},set:function(t){this.matrix[3]=t}},e:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},f:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},tx:{get:function(){return this.matrix[4]},set:function(t){this.matrix[4]=t}},ty:{get:function(){return this.matrix[5]},set:function(t){this.matrix[5]=t}},rotation:{get:function(){return Math.acos(this.a/this.scaleX)*(Math.atan(-this.c/this.a)<0?-1:1)}},rotationNormalized:{get:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3];return e||n?0<n?Math.acos(e/this.scaleX):-Math.acos(e/this.scaleX):i||r?s.TAU-(0<r?Math.acos(-i/this.scaleY):-Math.acos(i/this.scaleY)):0}},scaleX:{get:function(){return Math.sqrt(this.a*this.a+this.b*this.b)}},scaleY:{get:function(){return Math.sqrt(this.c*this.c+this.d*this.d)}},loadIdentity:function(){var t=this.matrix;return t[0]=1,t[1]=0,t[2]=0,t[3]=1,t[4]=0,t[5]=0,this},translate:function(t,e){var n=this.matrix;return n[4]=n[0]*t+n[2]*e+n[4],n[5]=n[1]*t+n[3]*e+n[5],this},scale:function(t,e){var n=this.matrix;return n[0]*=t,n[1]*=t,n[2]*=e,n[3]*=e,this},rotate:function(t){var e=Math.sin(t),n=Math.cos(t),i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3];return i[0]=r*n+o*e,i[1]=s*n+a*e,i[2]=r*-e+o*n,i[3]=s*-e+a*n,this},multiply:function(t,e){var n=this.matrix,i=t.matrix,r=n[0],s=n[1],o=n[2],a=n[3],h=n[4],l=n[5],u=i[0],c=i[1],d=i[2],f=i[3],p=i[4],v=i[5],g=void 0===e?this:e;return g.a=u*r+c*o,g.b=u*s+c*a,g.c=d*r+f*o,g.d=d*s+f*a,g.e=p*r+v*o+h,g.f=p*s+v*a+l,g},multiplyWithOffset:function(t,e,n){var i=this.matrix,r=t.matrix,s=i[0],o=i[1],a=i[2],h=i[3],l=e*s+n*a+i[4],u=e*o+n*h+i[5],c=r[0],d=r[1],f=r[2],p=r[3],v=r[4],g=r[5];return i[0]=c*s+d*a,i[1]=c*o+d*h,i[2]=f*s+p*a,i[3]=f*o+p*h,i[4]=v*s+g*a+l,i[5]=v*o+g*h+u,this},transform:function(t,e,n,i,r,s){var o=this.matrix,a=o[0],h=o[1],l=o[2],u=o[3],c=o[4],d=o[5];return o[0]=t*a+e*l,o[1]=t*h+e*u,o[2]=n*a+i*l,o[3]=n*h+i*u,o[4]=r*a+s*l+c,o[5]=r*h+s*u+d,this},transformPoint:function(t,e,n){void 0===n&&(n={x:0,y:0});var i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5];return n.x=t*r+e*o+h,n.y=t*s+e*a+l,n},invert:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],o=t[5],a=e*r-n*i;return t[0]=r/a,t[1]=-n/a,t[2]=-i/a,t[3]=e/a,t[4]=(i*o-r*s)/a,t[5]=-(e*o-n*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,n,i,r,s){var o=this.matrix;return o[0]=t,o[1]=e,o[2]=n,o[3]=i,o[4]=r,o[5]=s,this},decomposeMatrix:function(){var t,e,n=this.decomposedMatrix,i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=r*a-s*o;return n.translateX=i[4],n.translateY=i[5],r||s?(t=Math.sqrt(r*r+s*s),n.rotation=0<s?Math.acos(r/t):-Math.acos(r/t),n.scaleX=t,n.scaleY=h/t):o||a?(e=Math.sqrt(o*o+a*a),n.rotation=.5*Math.PI-(0<a?Math.acos(-o/e):-Math.acos(o/e)),n.scaleX=h/e,n.scaleY=e):(n.rotation=0,n.scaleX=0,n.scaleY=0),n},applyITRS:function(t,e,n,i,r){var s=this.matrix,o=Math.sin(n),a=Math.cos(n);return s[4]=t,s[5]=e,s[0]=a*i,s[1]=o*i,s[2]=-o*r,s[3]=a*r,this},applyInverse:function(t,e,n){void 0===n&&(n=new c);var i=this.matrix,r=i[0],s=i[1],o=i[2],a=i[3],h=i[4],l=i[5],u=1/(r*a+o*-s);return n.x=a*u*t+-o*u*e+(l*o-h*a)*u,n.y=r*u*e+-s*u*t+(-l*r+h*s)*u,n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,n){var i=this.getX(t,e);return n&&(i=Math.round(i)),i},getYRound:function(t,e,n){var i=this.getY(t,e);return n&&(i=Math.round(i)),i},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e){var n={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=n},function(t,e,n){var i=n(0),r=n(203),s=n(204),o=n(210),a=n(211),h=new i({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,n){return this.scene.sys.input.enable(this,t,e,n),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return n.unshift(this.scene.sys.displayList.getIndex(t)),n},destroy:function(t){var e;void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(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,n){var i=n(0),a=n(205),r=new i({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var n in this.list)this.list.hasOwnProperty(n)&&n.match(t)&&(e[n]=this.list[n]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var n in t)this.setValue(n,t[n]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var n=this.get(t);return void 0===n&&(n=0),this.set(t,n+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(n,t){return this._frozen||(this.has(n)?this.values[n]=t:(r=(i=this).list,s=this.events,o=this.parent,Object.defineProperty(this.values,n,{enumerable:!0,configurable:!0,get:function(){return r[n]},set:function(t){var e;i._frozen||(e=r[n],r[n]=t,s.emit(a.CHANGE_DATA,o,n,t,e),s.emit(a.CHANGE_DATA_KEY+n,o,t,e))}}),r[n]=t,s.emit(a.SET_DATA,o,n,t))),this;var i,r,s,o},each:function(t,e){for(var n=[this.parent,null,void 0],i=1;i<arguments.length;i++)n.push(arguments[i]);for(var r in this.list)n[1]=r,n[2]=this.list[r],t.apply(e,n);return this},merge:function(t,e){for(var n in void 0===e&&(e=!0),t)t.hasOwnProperty(n)&&(e||!e&&!this.has(n))&&this.setValue(n,t[n]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(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,n){t.exports={CHANGE_DATA:n(206),CHANGE_DATA_KEY:n(207),REMOVE_DATA:n(208),SET_DATA:n(209)}},function(t,e){t.exports="changedata"},function(t,e){t.exports="changedata-"},function(t,e){t.exports="removedata"},function(t,e){t.exports="setdata"},function(t,e,n){"use strict";var i=Object.prototype.hasOwnProperty,f="~";function r(){}function a(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,i,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new a(n,i||t,r),o=f?f+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__||(f=!1)),o.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(f?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},o.prototype.listeners=function(t){var e=f?f+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,s=new Array(r);i<r;i++)s[i]=n[i].fn;return s},o.prototype.listenerCount=function(t){var e=f?f+t:t,n=this._events[e];return n?n.fn?1:n.length:0},o.prototype.emit=function(t,e,n,i,r,s){var o=f?f+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,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,r),!0;case 6:return h.fn.call(h.context,e,n,i,r,s),!0}for(d=1,a=new Array(l-1);d<l;d++)a[d-1]=arguments[d];h.fn.apply(h.context,a)}else for(var u,c=h.length,d=0;d<c;d++)switch(h[d].once&&this.removeListener(t,h[d].fn,void 0,!0),l){case 1:h[d].fn.call(h[d].context);break;case 2:h[d].fn.call(h[d].context,e);break;case 3:h[d].fn.call(h[d].context,e,n);break;case 4:h[d].fn.call(h[d].context,e,n,i);break;default:if(!a)for(u=1,a=new Array(l-1);u<l;u++)a[u-1]=arguments[u];h[d].fn.apply(h[d].context,a)}return!0},o.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},o.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},o.prototype.removeListener=function(t,e,n,i){var r=f?f+t:t;if(!this._events[r])return this;if(!e)return l(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,r);else{for(var o=0,a=[],h=s.length;o<h;o++)(s[o].fn!==e||i&&!s[o].once||n&&s[o].context!==n)&&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=f?f+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=f,o.EventEmitter=o,t.exports=o},function(t,e,n){t.exports={ADDED_TO_SCENE:n(212),DESTROY:n(213),REMOVED_FROM_SCENE:n(214),VIDEO_COMPLETE:n(215),VIDEO_CREATED:n(216),VIDEO_ERROR:n(217),VIDEO_LOOP:n(218),VIDEO_PLAY:n(219),VIDEO_SEEKED:n(220),VIDEO_SEEKING:n(221),VIDEO_STOP:n(222),VIDEO_TIMEOUT:n(223),VIDEO_UNLOCKED:n(224)}},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="destroy"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="complete"},function(t,e){t.exports="created"},function(t,e){t.exports="error"},function(t,e){t.exports="loop"},function(t,e){t.exports="play"},function(t,e){t.exports="seeked"},function(t,e){t.exports="seeking"},function(t,e){t.exports="stop"},function(t,e){t.exports="timeout"},function(t,e){t.exports="unlocked"},function(t,e,n){t.exports={COMPLETE:n(226),DISPOSE:n(227),END:n(228),EVENT:n(229),INTERRUPTED:n(230),START:n(231)}},function(t,e){t.exports="complete"},function(t,e){t.exports="dispose"},function(t,e){t.exports="end"},function(t,e){t.exports="event"},function(t,e){t.exports="interrupted"},function(t,e){t.exports="start"},function(t,e,n){var i=n(34),r=n(34),i=n(233);t.exports={renderWebGL:i,renderCanvas:r}},function(t,e,n){var v=n(7),g=n(10),M=n(5);t.exports=function(t,e,n,i,r){var s=e.plugin,o=e.skeleton,a=s.sceneRenderer,h=!(15!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id);if(!o||!h)return t.currentType="",void(t.nextTypeMatch||(a.end(),t.rebindPipeline(t.pipelines.MultiPipeline)));t.newType&&t.clearPipeline();var l=t._tempMatrix1,u=t._tempMatrix2,c=t._tempMatrix3;u.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),l.copyFrom(i.matrix),r?(l.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),u.e=e.x,u.f=e.y):(u.e-=i.scrollX*e.scrollFactorX,u.f-=i.scrollY*e.scrollFactorY),l.multiply(u,c);var d,f,p=t.height;o.x=c.tx,o.y=p-c.ty,o.scaleX=c.scaleX,o.scaleY=c.scaleY,e.scaleX<0?(o.scaleX*=-1,e.root.rotation=g(c.rotationNormalized)):e.root.rotation=M(g(v(c.rotationNormalized))+90,0,360),e.scaleY<0&&(o.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*g(c.rotationNormalized):e.root.rotation+=2*g(c.rotationNormalized)),i.renderToTexture&&(o.y=c.ty,o.scaleY*=-1),o.updateWorldTransform(),t.newType&&a.begin(),a.drawSkeleton(o,e.preMultipliedAlpha),(s.drawDebug||e.drawDebug)&&(d=o.x,f=o.y,o.x=0,o.y=0,a.drawSkeletonDebug(o,e.preMultipliedAlpha),o.x=d,o.y=f),t.nextTypeMatch||(a.end(),t.rebindPipeline(t.pipelines.MultiPipeline))}}]); |