phaser/plugins/spine/dist/SpineCanvasPlugin.min.js
2020-08-25 13:43:08 +01:00

1 line
No EOL
234 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,d=f=void 0,d=(c=n)?l[u]:Object.getOwnPropertyDescriptor(l,u),!c&&d.value&&"object"==typeof d.value&&(d=d.value),!(!d||!((f=d).get&&"function"==typeof f.get||f.set&&"function"==typeof f.set))&&(void 0===d.enumerable&&(d.enumerable=!0),void 0===d.configurable&&(d.configurable=!0),d));if(!1!==s){if(a=(i||t).prototype,o=r,h=void 0,(h=Object.getOwnPropertyDescriptor(a,o))&&(h.value&&"object"==typeof h.value&&(h=h.value),!1===h.configurable)){if(p.ignoreFinals)continue;throw new Error("cannot override final property '"+r+"', set Class.ignoreFinals = true to skip")}Object.defineProperty(t.prototype,r,s)}else t.prototype[r]=e[r]}var a,o,h,l,u,c,f,d}function a(t,e){if(e){Array.isArray(e)||(e=[e]);for(var n=0;n<e.length;n++)s(t,e[n].prototype||e[n])}}function p(t){var e,n,i;if((t=t||{}).initialize){if("function"!=typeof t.initialize)throw new Error("initialize must be a function");i=t.initialize,delete t.initialize}else{i=t.Extends?(n=t.Extends,function(){n.apply(this,arguments)}):function(){}}t.Extends?(i.prototype=Object.create(t.Extends.prototype),i.prototype.constructor=i,e=t.Extends,delete t.Extends):i.prototype.constructor=i;var r=null;return t.Mixins&&(r=t.Mixins,delete t.Mixins),a(i,r),s(i,t,!0,e),i}p.extend=s,p.mixin=a,p.ignoreFinals=!1,t.exports=p},function(t,e){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,a=e.y,o=e.z;return this.x=i*o-r*a,this.y=r*s-n*o,this.z=n*a-i*s,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this},set:function(t,e,n){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0):(this.x=t||0,this.y=e||0,this.z=n||0),this},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,a=t.z;return this.x=n*a-i*s,this.y=i*r-e*a,this.z=e*s-n*r,this},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this},transformMat3:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=e*r[0]+n*r[3]+i*r[6],this.y=e*r[1]+n*r[4]+i*r[7],this.z=e*r[2]+n*r[5]+i*r[8],this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=t.val;return this.x=r[0]*e+r[4]*n+r[8]*i+r[12],this.y=r[1]*e+r[5]*n+r[9]*i+r[13],this.z=r[2]*e+r[6]*n+r[10]*i+r[14],this},transformCoordinates:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=e*r[0]+n*r[4]+i*r[8]+r[12],a=e*r[1]+n*r[5]+i*r[9]+r[13],o=e*r[2]+n*r[6]+i*r[10]+r[14],h=e*r[3]+n*r[7]+i*r[11]+r[15];return this.x=s/h,this.y=a/h,this.z=o/h,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*i-a*n,l=o*n+a*e-r*i,u=o*i+r*n-s*e,c=-r*e-s*n-a*i;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},project:function(t){var e=this.x,n=this.y,i=this.z,r=t.val,s=r[0],a=r[1],o=r[2],h=r[3],l=r[4],u=r[5],c=r[6],f=r[7],d=r[8],p=r[9],m=r[10],g=r[11],v=r[12],y=r[13],x=r[14],w=1/(e*h+n*f+i*g+r[15]);return this.x=(e*s+n*l+i*d+v)*w,this.y=(e*a+n*u+i*p+y)*w,this.z=(e*o+n*c+i*m+x)*w,this},unproject:function(t,e){var n=t.x,i=t.y,r=t.z,s=t.w,a=this.x-n,o=s-this.y-1-i,h=this.z;return this.x=2*a/r-1,this.y=2*o/s-1,this.z=2*h-1,this.project(e)},reset:function(){return this.x=0,this.y=0,this.z=0,this}});i.ZERO=new i,i.RIGHT=new i(1,0,0),i.LEFT=new i(-1,0,0),i.UP=new i(0,-1,0),i.DOWN=new i(0,1,0),i.FORWARD=new i(0,0,1),i.BACK=new i(0,0,-1),i.ONE=new i(1,1,1),t.exports=i},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return n;for(var i=e.split("."),r=t,s=n,a=0;a<i.length;a++){if(!r.hasOwnProperty(i[a])){s=n;break}s=r[i[a]],r=r[i[a]]}return s}return n}},function(t,e,n){var i=n(0),r=n(6),s=n(178),a=n(4),o=n(189),h=n(32),l=n(190),u=n(33),c=new i({initialize:function(t,e){this.loader=t,this.cache=a(e,"cache",!1),this.type=a(e,"type",!1),this.key=a(e,"key",!1);var n=this.key;if(t.prefix&&""!==t.prefix&&(this.key=t.prefix+n),!this.type||!this.key)throw new Error("Error calling 'Loader."+this.type+"' invalid key provided.");this.url=a(e,"url"),void 0===this.url?this.url=t.path+n+"."+a(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(a(e,"responseType",void 0)),a(e,"xhrSettings",!1)&&(this.xhrSettings=h(this.xhrSettings,a(e,"xhrSettings",{}))),this.xhrLoader=null,this.state="function"==typeof this.url?r.FILE_POPULATED:r.FILE_PENDING,this.bytesTotal=0,this.bytesLoaded=-1,this.percentComplete=-1,this.crossOrigin=void 0,this.data=void 0,this.config=a(e,"config",{}),this.multiFile,this.linkFile},setLink:function(t){(this.linkFile=t).linkFile=this},resetXHR:function(){this.xhrLoader&&(this.xhrLoader.onload=void 0,this.xhrLoader.onerror=void 0,this.xhrLoader.onprogress=void 0)},load:function(){this.state===r.FILE_POPULATED?this.loader.nextFile(this,!0):(this.state=r.FILE_LOADING,this.src=o(this,this.loader.baseURL),0===this.src.indexOf("data:")?console.warn("Local data URIs are not supported: "+this.key):this.xhrLoader=l(this,this.loader.xhr))},onLoad:function(t,e){var n=t.responseURL&&0===t.responseURL.indexOf("file://")&&0===e.target.status,i=!(e.target&&200!==e.target.status)||n;4===t.readyState&&400<=t.status&&t.status<=599&&(i=!1),this.state=r.FILE_LOADED,this.resetXHR(),this.loader.nextFile(this,i)},onError:function(){this.resetXHR(),this.loader.nextFile(this,!1)},onProgress:function(t){t.lengthComputable&&(this.bytesLoaded=t.loaded,this.bytesTotal=t.total,this.percentComplete=Math.min(this.bytesLoaded/this.bytesTotal,1),this.loader.emit(s.FILE_PROGRESS,this,this.percentComplete))},onProcess:function(){this.state=r.FILE_PROCESSING,this.onProcessComplete()},onProcessComplete:function(){this.state=r.FILE_COMPLETE,this.multiFile&&this.multiFile.onFileComplete(this),this.loader.fileProcessComplete(this)},onProcessError:function(){this.state=r.FILE_ERRORED,this.multiFile&&this.multiFile.onFileFailed(this),this.loader.fileProcessComplete(this)},hasCacheConflict:function(){return this.cache&&this.cache.exists(this.key)},addToCache:function(){this.cache&&this.cache.add(this.key,this.data),this.pendingDestroy()},pendingDestroy:function(t){void 0===t&&(t=this.data);var e=this.key,n=this.type;this.loader.emit(s.FILE_COMPLETE,e,n,t),this.loader.emit(s.FILE_KEY_COMPLETE+n+"-"+e,e,n,t),this.loader.flagForRemoval(this)},destroy:function(){this.loader=null,this.cache=null,this.xhrSettings=null,this.multiFile=null,this.linkFile=null,this.data=null}});c.createObjectURL=function(t,e,n){var i;"function"==typeof URL?t.src=URL.createObjectURL(e):((i=new FileReader).onload=function(){t.removeAttribute("crossOrigin"),t.src="data:"+(e.type||n)+";base64,"+i.result.split(",")[1]},i.onerror=t.onerror,i.readAsDataURL(e))},c.revokeObjectURL=function(t){"function"==typeof URL&&URL.revokeObjectURL(t.src)},t.exports=c},function(t,e){var n={},i={install:function(t){for(var e in n)t[e]=n[e]},register:function(t,e){n[t]=e},destroy:function(){n={}}};t.exports=i},function(t,e,n){var u=n(2),c=function(){var t,e,n,i,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);o<h;o++)if(null!=(t=arguments[o]))for(e in t)n=a[e],a!==(i=t[e])&&(l&&i&&(u(i)||(r=Array.isArray(i)))?(s=r?(r=!1,n&&Array.isArray(n)?n:[]):n&&u(n)?n:{},a[e]=c(l,s,i)):void 0!==i&&(a[e]=i));return a};t.exports=c},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(i-e,n-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,n){var i=n(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),a=.5*(r-n),o=t*t;return(2*n-2*i+s+a)*(t*o)+(-3*n+3*i-2*s-a)*o+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:n<=t?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e,n){var i=n(1);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var m=n(3);t.exports=function(t,e,n,i,r,s,a,o){void 0===o&&(o=new m);var h=Math.sin(r),l=Math.cos(r),u=l*s,c=h*s,f=-h*a,d=l*a,p=1/(u*d+f*-c);return o.x=d*p*t+-f*p*e+(i*f-n*d)*p,o.y=u*p*e+-c*p*t+(-i*u+n*c)*p,o}},function(t,e,n){var i=new(n(0))({initialize:function(t){this.val=new Float32Array(9),t?this.copy(t):this.identity()},clone:function(){return new i(this)},set:function(t){return this.copy(t)},copy:function(t){var e=this.val,n=t.val;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this},fromMat4:function(t){var e=t.val,n=this.val;return n[0]=e[0],n[1]=e[1],n[2]=e[2],n[3]=e[4],n[4]=e[5],n[5]=e[6],n[6]=e[8],n[7]=e[9],n[8]=e[10],this},fromArray:function(t){var e=this.val;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],this},identity:function(){var t=this.val;return t[0]=1,t[1]=0,t[2]=0,t[3]=0,t[4]=1,t[5]=0,t[6]=0,t[7]=0,t[8]=1,this},transpose:function(){var t=this.val,e=t[1],n=t[2],i=t[5];return t[1]=t[3],t[2]=t[6],t[3]=e,t[5]=t[7],t[6]=n,t[7]=i,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=l*s-a*h,c=-l*r+a*o,f=h*r-s*o,d=e*u+n*c+i*f;return d?(d=1/d,t[0]=u*d,t[1]=(-l*n+i*h)*d,t[2]=(a*n-i*s)*d,t[3]=c*d,t[4]=(l*e-i*o)*d,t[5]=(-a*e+i*r)*d,t[6]=f*d,t[7]=(-h*e+n*o)*d,t[8]=(s*e-n*r)*d,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return t[0]=s*l-a*h,t[1]=i*h-n*l,t[2]=n*a-i*s,t[3]=a*o-r*l,t[4]=e*l-i*o,t[5]=i*r-e*a,t[6]=r*h-s*o,t[7]=n*o-e*h,t[8]=e*s-n*r,this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8];return e*(l*s-a*h)+n*(-l*r+a*o)+i*(h*r-s*o)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=t.val,f=c[0],d=c[1],p=c[2],m=c[3],g=c[4],v=c[5],y=c[6],x=c[7],w=c[8];return e[0]=f*n+d*s+p*h,e[1]=f*i+d*a+p*l,e[2]=f*r+d*o+p*u,e[3]=m*n+g*s+v*h,e[4]=m*i+g*a+v*l,e[5]=m*r+g*o+v*u,e[6]=y*n+x*s+w*h,e[7]=y*i+x*a+w*l,e[8]=y*r+x*o+w*u,this},translate:function(t){var e=this.val,n=t.x,i=t.y;return e[6]=n*e[0]+i*e[3]+e[6],e[7]=n*e[1]+i*e[4]+e[7],e[8]=n*e[2]+i*e[5]+e[8],this},rotate:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=Math.sin(t),l=Math.cos(t);return e[0]=l*n+h*s,e[1]=l*i+h*a,e[2]=l*r+h*o,e[3]=l*s-h*n,e[4]=l*a-h*i,e[5]=l*o-h*r,this},scale:function(t){var e=this.val,n=t.x,i=t.y;return e[0]=n*e[0],e[1]=n*e[1],e[2]=n*e[2],e[3]=i*e[3],e[4]=i*e[4],e[5]=i*e[5],this},fromQuat:function(t){var e=t.x,n=t.y,i=t.z,r=t.w,s=e+e,a=n+n,o=i+i,h=e*s,l=e*a,u=e*o,c=n*a,f=n*o,d=i*o,p=r*s,m=r*a,g=r*o,v=this.val;return v[0]=1-(c+d),v[3]=l+g,v[6]=u-m,v[1]=l-g,v[4]=1-(h+d),v[7]=f+p,v[2]=u+m,v[5]=f-p,v[8]=1-(h+c),this},normalFromMat4:function(t){var e=t.val,n=this.val,i=e[0],r=e[1],s=e[2],a=e[3],o=e[4],h=e[5],l=e[6],u=e[7],c=e[8],f=e[9],d=e[10],p=e[11],m=e[12],g=e[13],v=e[14],y=e[15],x=i*h-r*o,w=i*l-s*o,M=i*u-a*o,E=r*l-s*h,T=r*u-a*h,A=s*u-a*l,b=c*g-f*m,R=c*v-d*m,S=c*y-p*m,I=f*v-d*g,C=f*y-p*g,P=d*y-p*v,k=x*P-w*C+M*I+E*S-T*R+A*b;return k?(k=1/k,n[0]=(h*P-l*C+u*I)*k,n[1]=(l*S-o*P-u*R)*k,n[2]=(o*C-h*S+u*b)*k,n[3]=(s*C-r*P-a*I)*k,n[4]=(i*P-s*S+a*R)*k,n[5]=(r*S-i*C-a*b)*k,n[6]=(g*A-v*T+y*E)*k,n[7]=(v*M-m*A-y*w)*k,n[8]=(m*T-g*M+y*x)*k,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],a=t[11];return t[1]=t[4],t[2]=t[8],t[3]=t[12],t[4]=e,t[6]=t[9],t[7]=t[13],t[8]=n,t[9]=r,t[11]=t[14],t[12]=i,t[13]=s,t[14]=a,this},invert:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15],v=e*a-n*s,y=e*o-i*s,x=e*h-r*s,w=n*o-i*a,M=n*h-r*a,E=i*h-r*o,T=l*p-u*d,A=l*m-c*d,b=l*g-f*d,R=u*m-c*p,S=u*g-f*p,I=c*g-f*m,C=v*I-y*S+x*R+w*b-M*A+E*T;return C?(C=1/C,t[0]=(a*I-o*S+h*R)*C,t[1]=(i*S-n*I-r*R)*C,t[2]=(p*E-m*M+g*w)*C,t[3]=(c*M-u*E-f*w)*C,t[4]=(o*b-s*I-h*A)*C,t[5]=(e*I-i*b+r*A)*C,t[6]=(m*x-d*E-g*y)*C,t[7]=(l*E-c*x+f*y)*C,t[8]=(s*S-a*b+h*T)*C,t[9]=(n*b-e*S-r*T)*C,t[10]=(d*M-p*x+g*v)*C,t[11]=(u*x-l*M-f*v)*C,t[12]=(a*A-s*R-o*T)*C,t[13]=(e*R-n*A+i*T)*C,t[14]=(p*y-d*w-m*v)*C,t[15]=(l*w-u*y+c*v)*C,this):null},adjoint:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return t[0]=a*(c*g-f*m)-u*(o*g-h*m)+p*(o*f-h*c),t[1]=-(n*(c*g-f*m)-u*(i*g-r*m)+p*(i*f-r*c)),t[2]=n*(o*g-h*m)-a*(i*g-r*m)+p*(i*h-r*o),t[3]=-(n*(o*f-h*c)-a*(i*f-r*c)+u*(i*h-r*o)),t[4]=-(s*(c*g-f*m)-l*(o*g-h*m)+d*(o*f-h*c)),t[5]=e*(c*g-f*m)-l*(i*g-r*m)+d*(i*f-r*c),t[6]=-(e*(o*g-h*m)-s*(i*g-r*m)+d*(i*h-r*o)),t[7]=e*(o*f-h*c)-s*(i*f-r*c)+l*(i*h-r*o),t[8]=s*(u*g-f*p)-l*(a*g-h*p)+d*(a*f-h*u),t[9]=-(e*(u*g-f*p)-l*(n*g-r*p)+d*(n*f-r*u)),t[10]=e*(a*g-h*p)-s*(n*g-r*p)+d*(n*h-r*a),t[11]=-(e*(a*f-h*u)-s*(n*f-r*u)+l*(n*h-r*a)),t[12]=-(s*(u*m-c*p)-l*(a*m-o*p)+d*(a*c-o*u)),t[13]=e*(u*m-c*p)-l*(n*m-i*p)+d*(n*c-i*u),t[14]=-(e*(a*m-o*p)-s*(n*m-i*p)+d*(n*o-i*a)),t[15]=e*(a*c-o*u)-s*(n*c-i*u)+l*(n*o-i*a),this},determinant:function(){var t=this.val,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=t[6],h=t[7],l=t[8],u=t[9],c=t[10],f=t[11],d=t[12],p=t[13],m=t[14],g=t[15];return(e*a-n*s)*(c*g-f*m)-(e*o-i*s)*(u*g-f*p)+(e*h-r*s)*(u*m-c*p)+(n*o-i*a)*(l*g-f*d)-(n*h-r*a)*(l*m-c*d)+(i*h-r*o)*(l*p-u*d)},multiply:function(t){var e=this.val,n=e[0],i=e[1],r=e[2],s=e[3],a=e[4],o=e[5],h=e[6],l=e[7],u=e[8],c=e[9],f=e[10],d=e[11],p=e[12],m=e[13],g=e[14],v=e[15],y=t.val,x=y[0],w=y[1],M=y[2],E=y[3];return e[0]=x*n+w*a+M*u+E*p,e[1]=x*i+w*o+M*c+E*m,e[2]=x*r+w*h+M*f+E*g,e[3]=x*s+w*l+M*d+E*v,x=y[4],w=y[5],M=y[6],E=y[7],e[4]=x*n+w*a+M*u+E*p,e[5]=x*i+w*o+M*c+E*m,e[6]=x*r+w*h+M*f+E*g,e[7]=x*s+w*l+M*d+E*v,x=y[8],w=y[9],M=y[10],E=y[11],e[8]=x*n+w*a+M*u+E*p,e[9]=x*i+w*o+M*c+E*m,e[10]=x*r+w*h+M*f+E*g,e[11]=x*s+w*l+M*d+E*v,x=y[12],w=y[13],M=y[14],E=y[15],e[12]=x*n+w*a+M*u+E*p,e[13]=x*i+w*o+M*c+E*m,e[14]=x*r+w*h+M*f+E*g,e[15]=x*s+w*l+M*d+E*v,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,a=t.y,o=t.z,h=r*s,l=r*a;return this.fromArray([h*s+n,h*a-i*o,h*o+i*a,0,h*a+i*o,l*a+n,l*o-i*s,0,h*o-i*a,l*o+i*s,r*o*o+n,0,0,0,0,1]),this},rotate:function(t,e){var n=this.val,i=e.x,r=e.y,s=e.z,a=Math.sqrt(i*i+r*r+s*s);if(Math.abs(a)<1e-6)return null;i*=a=1/a,r*=a,s*=a;var o=Math.sin(t),h=Math.cos(t),l=1-h,u=n[0],c=n[1],f=n[2],d=n[3],p=n[4],m=n[5],g=n[6],v=n[7],y=n[8],x=n[9],w=n[10],M=n[11],E=i*i*l+h,T=r*i*l+s*o,A=s*i*l-r*o,b=i*r*l-s*o,R=r*r*l+h,S=s*r*l+i*o,I=i*s*l+r*o,C=r*s*l-i*o,P=s*s*l+h;return n[0]=u*E+p*T+y*A,n[1]=c*E+m*T+x*A,n[2]=f*E+g*T+w*A,n[3]=d*E+v*T+M*A,n[4]=u*b+p*R+y*S,n[5]=c*b+m*R+x*S,n[6]=f*b+g*R+w*S,n[7]=d*b+v*R+M*S,n[8]=u*I+p*C+y*P,n[9]=c*I+m*C+x*P,n[10]=f*I+g*C+w*P,n[11]=d*I+v*C+M*P,this},rotateX:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[4],s=e[5],a=e[6],o=e[7],h=e[8],l=e[9],u=e[10],c=e[11];return e[4]=r*i+h*n,e[5]=s*i+l*n,e[6]=a*i+u*n,e[7]=o*i+c*n,e[8]=h*i-r*n,e[9]=l*i-s*n,e[10]=u*i-a*n,e[11]=c*i-o*n,this},rotateY:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[8],l=e[9],u=e[10],c=e[11];return e[0]=r*i-h*n,e[1]=s*i-l*n,e[2]=a*i-u*n,e[3]=o*i-c*n,e[8]=r*n+h*i,e[9]=s*n+l*i,e[10]=a*n+u*i,e[11]=o*n+c*i,this},rotateZ:function(t){var e=this.val,n=Math.sin(t),i=Math.cos(t),r=e[0],s=e[1],a=e[2],o=e[3],h=e[4],l=e[5],u=e[6],c=e[7];return e[0]=r*i+h*n,e[1]=s*i+l*n,e[2]=a*i+u*n,e[3]=o*i+c*n,e[4]=h*i-r*n,e[5]=l*i-s*n,e[6]=u*i-a*n,e[7]=c*i-o*n,this},fromRotationTranslation:function(t,e){var n=this.val,i=t.x,r=t.y,s=t.z,a=t.w,o=i+i,h=r+r,l=s+s,u=i*o,c=i*h,f=i*l,d=r*h,p=r*l,m=s*l,g=a*o,v=a*h,y=a*l;return n[0]=1-(d+m),n[1]=c+y,n[2]=f-v,n[3]=0,n[4]=c-y,n[5]=1-(u+m),n[6]=p+g,n[7]=0,n[8]=f+v,n[9]=p-g,n[10]=1-(u+d),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,a=n+n,o=i+i,h=r+r,l=n*a,u=n*o,c=n*h,f=i*o,d=i*h,p=r*h,m=s*a,g=s*o,v=s*h;return e[0]=1-(f+p),e[1]=u+v,e[2]=c-g,e[3]=0,e[4]=u-v,e[5]=1-(l+p),e[6]=d+m,e[7]=0,e[8]=c+g,e[9]=d-m,e[10]=1-(l+f),e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this},frustum:function(t,e,n,i,r,s){var a=this.val,o=1/(e-t),h=1/(i-n),l=1/(r-s);return a[0]=2*r*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=2*r*h,a[6]=0,a[7]=0,a[8]=(e+t)*o,a[9]=(i+n)*h,a[10]=(s+r)*l,a[11]=-1,a[12]=0,a[13]=0,a[14]=s*r*2*l,a[15]=0,this},perspective:function(t,e,n,i){var r=this.val,s=1/Math.tan(t/2),a=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)*a,r[11]=-1,r[12]=0,r[13]=0,r[14]=2*i*n*a,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 a=this.val,o=0===(o=t-e)?o:1/o,h=0===(h=n-i)?h:1/h,l=0===(l=r-s)?l:1/l;return a[0]=-2*o,a[1]=0,a[2]=0,a[3]=0,a[4]=0,a[5]=-2*h,a[6]=0,a[7]=0,a[8]=0,a[9]=0,a[10]=2*l,a[11]=0,a[12]=(t+e)*o,a[13]=(i+n)*h,a[14]=(s+r)*l,a[15]=1,this},lookAt:function(t,e,n){var i=this.val,r=t.x,s=t.y,a=t.z,o=n.x,h=n.y,l=n.z,u=e.x,c=e.y,f=e.z;if(Math.abs(r-u)<1e-6&&Math.abs(s-c)<1e-6&&Math.abs(a-f)<1e-6)return this.identity();var d=r-u,p=s-c,m=a-f,g=1/Math.sqrt(d*d+p*p+m*m),v=h*(m*=g)-l*(p*=g),y=l*(d*=g)-o*m,x=o*p-h*d;(g=Math.sqrt(v*v+y*y+x*x))?(v*=g=1/g,y*=g,x*=g):x=y=v=0;var w=p*x-m*y,M=m*v-d*x,E=d*y-p*v;return(g=Math.sqrt(w*w+M*M+E*E))?(w*=g=1/g,M*=g,E*=g):E=M=w=0,i[0]=v,i[1]=w,i[2]=d,i[3]=0,i[4]=y,i[5]=M,i[6]=p,i[7]=0,i[8]=x,i[9]=E,i[10]=m,i[11]=0,i[12]=-(v*r+y*s+x*a),i[13]=-(w*r+M*s+E*a),i[14]=-(d*r+p*s+m*a),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,a=Math.sin(n),o=Math.cos(n);return i[10]=1,i[15]=1,i[0]=o,i[1]=a,i[4]=-a,i[5]=o,a=Math.sin(e),o=Math.cos(e),r[0]=1,r[15]=1,r[5]=o,r[10]=o,r[9]=-a,r[6]=a,a=Math.sin(t),o=Math.cos(t),s[5]=1,s[15]=1,s[0]=o,s[2]=-a,s[8]=a,s[10]=o,this.multiplyLocal(h),this.multiplyLocal(l),this},setWorldMatrix:function(t,e,n,i,r){return this.yawPitchRoll(t.y,t.x,t.z),h.scaling(n.x,n.y,n.z),l.xyz(e.x,e.y,e.z),this.multiplyLocal(h),this.multiplyLocal(l),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),o=new Int8Array([1,2,0]),h=new Float32Array([0,0,0]),a=new r(1,0,0),l=new r(0,1,0),u=new r,c=new s,f=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(a).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,a=t.y,o=t.z,h=t.w;return this.x=e*h+r*s+n*o-i*a,this.y=n*h+r*a+i*s-e*o,this.z=i*h+r*o+e*a-n*s,this.w=r*h-e*s-n*a-i*o,this},slerp:function(t,e){var n=this.x,i=this.y,r=this.z,s=this.w,a=t.x,o=t.y,h=t.z,l=t.w,u=n*a+i*o+r*h+s*l;u<0&&(u=-u,a=-a,o=-o,h=-h,l=-l);var c,f,d=1-e,p=e;return 1e-6<1-u&&(c=Math.acos(u),f=Math.sin(c),d=Math.sin((1-e)*c)/f,p=Math.sin(e*c)/f),this.x=d*n+p*a,this.y=d*i+p*o,this.z=d*r+p*h,this.w=d*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),a=Math.cos(t);return this.x=e*a+r*s,this.y=n*a+i*s,this.z=i*a-n*s,this.w=r*a-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),a=Math.cos(t);return this.x=e*a-i*s,this.y=n*a+r*s,this.z=i*a+e*s,this.w=r*a-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),a=Math.cos(t);return this.x=e*a+n*s,this.y=n*a-e*s,this.z=i*a+r*s,this.w=r*a-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,a=s[0]+s[4]+s[8];return 0<a?(r=Math.sqrt(a+1),this.w=.5*r,r=.5/r,this.x=(s[7]-s[5])*r,this.y=(s[2]-s[6])*r,this.z=(s[3]-s[1])*r):(e=0,s[4]>s[0]&&(e=1),s[8]>s[3*e+e]&&(e=2),n=o[e],i=o[n],r=Math.sqrt(s[3*e+e]-s[3*n+n]-s[3*i+i]+1),h[e]=.5*r,r=.5/r,h[n]=(s[3*n+e]+s[3*e+n])*r,h[i]=(s[3*i+e]+s[3*e+i])*r,this.x=h[0],this.y=h[1],this.z=h[2],this.w=(s[3*i+n]-s[3*n+i])*r),this}});t.exports=f},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),m=n(175),h=n(176),c=n(194),a=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=m,this.temp1,this.temp2,this.isWebGL?(this.runtime=m.webgl,this.renderer=n.renderer,this.gl=n.renderer.gl,this.getAtlas=this.getAtlasWebGL):(this.runtime=m.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 a=p(t,"skinName",!1);a&&s.setSkinByName(a);var o=p(t,"slotName",!1),h=p(t,"attachmentName",null);return o&&s.setAttachment(o,h),s.refresh()})},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 m.canvas.SkeletonRenderer(this.scene.sys.context)},bootWebGL:function(){this.sceneRenderer=new m.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 m.webgl.Vector3(0,0,0),this.temp2=new m.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 m.TextureAtlas(e.data,function(t){return new m.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 m.TextureAtlas(e.data,function(t){return new m.webgl.GLTexture(i,n.get(e.prefix+t).getSourceImage(),!1)}));return s}console.warn("No atlas data for: "+t)},spineFileCallback:function(t,e,n,i,r,s){var a;if(Array.isArray(t))for(var o=0;o<t.length;o++)a=new h(this,t[o]),this.addFile(a.files);else a=new h(this,t,e,n,i,r,s),this.addFile(a.files);return this},worldToLocal:function(t,e,n,i){var r=this.temp1,s=this.temp2,a=this.sceneRenderer.camera;r.set(t+n.x,e-n.y,0);var o=a.viewportWidth,h=a.viewportHeight;return a.screenToWorld(r,o,h),i&&null!==i.parent?(i.parent.worldToLocal(s.set(r.x-n.x,r.y-n.y,0)),new m.Vector2(s.x,s.y)):i?new m.Vector2(r.x-n.x,r.y-n.y):new m.Vector2(r.x,r.y)},getVector2:function(t,e){return new m.Vector2(t,e)},getVector3:function(t,e,n){return new m.webgl.Vector3(t,e,n)},setDebugBones:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBones=t,this},setDebugRegionAttachments:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawRegionAttachments=t,this},setDebugBoundingBoxes:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawBoundingBoxes=t,this},setDebugMeshHull:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshHull=t,this},setDebugMeshTriangles:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawMeshTriangles=t,this},setDebugPaths:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawPaths=t,this},setDebugSkeletonXY:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawSkeletonXY=t,this},setDebugClipping:function(t){return void 0===t&&(t=!0),this.skeletonDebugRenderer.drawClipping=t,this},setEffect:function(t){return this.sceneRenderer.skeletonRenderer.vertexEffect=t,this},createSkeleton:function(t,e){var n,i=t,r=t,s=-1!==t.indexOf(".");s&&(i=(n=t.split(".")).shift(),r=n.join("."));var a=this.cache.get(i),o=this.getAtlas(i);if(!o)return null;this.spineTextures.has(i)||this.spineTextures.add(i,o);var h,l,u=a.preMultipliedAlpha,c=new m.AtlasAttachmentLoader(o),f=new m.SkeletonJson(c);if(l=e||(h=this.json.get(i),s?p(h,r):h)){var d=f.readSkeletonData(l);return{skeletonData:d,skeleton:new m.Skeleton(d),preMultipliedAlpha:u}}return null},createAnimationState:function(t){var e=new m.AnimationStateData(t.data);return{stateData:e,state:new m.AnimationState(e)}},getBounds:function(t){var e=new m.Vector2,n=new m.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=a},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 a,o,h=u(n,"origin",null);return"number"==typeof h?e.setOrigin(h):null!==h&&(a=u(h,"x",.5),o=u(h,"y",.5),e.setOrigin(a,o)),e.blendMode=u(n,"blendMode",l.NORMAL),e.visible=u(n,"visible",!0),u(n,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e){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-(o=t))*h*o*n+3*(1-(a=t))*a*a*i+(s=t)*s*s*r;var s,a,o,h,l}},function(t,e,n){var s=n(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(a=1-t)*a*e+2*(1-(s=t))*s*n+(r=t)*r*i;var r,s,a}},function(t,e,n){var i=n(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),a=t.x-e,o=t.y-n;return t.x=a*r-o*s+e,t.y=a*s+o*r+n,t}},function(t,e){t.exports=function(t,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=[],a=0;a<t;a++)e+=(n-=e*i)*i,r[a]=n,s[a]=e;return{sin:s,cos:r,length:t}}},function(t,e,n){var a=n(3);t.exports=function(t,e,n,i){void 0===i&&(i=new a);var r=0,s=0;return 0<t&&t<=e*n&&(r=e-1<t?t-(s=Math.floor(t/e))*e:t,i.set(r,s)),i}},function(t,e){t.exports=function(t,e,n){return Math.abs(t-e)<=n}},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){this.x=0,this.y=0,this.z=0,this.w=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0)},clone:function(){return new i(this.x,this.y,this.z,this.w)},copy:function(t){return this.x=t.x,this.y=t.y,this.z=t.z||0,this.w=t.w||0,this},equals:function(t){return this.x===t.x&&this.y===t.y&&this.z===t.z&&this.w===t.w},set:function(t,e,n,i){return"object"==typeof t?(this.x=t.x||0,this.y=t.y||0,this.z=t.z||0,this.w=t.w||0):(this.x=t||0,this.y=e||0,this.z=n||0,this.w=i||0),this},add:function(t){return this.x+=t.x,this.y+=t.y,this.z+=t.z||0,this.w+=t.w||0,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this.z-=t.z||0,this.w-=t.w||0,this},scale:function(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this},length:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return Math.sqrt(t*t+e*e+n*n+i*i)},lengthSq:function(){var t=this.x,e=this.y,n=this.z,i=this.w;return t*t+e*e+n*n+i*i},normalize:function(){var t=this.x,e=this.y,n=this.z,i=this.w,r=t*t+e*e+n*n+i*i;return 0<r&&(r=1/Math.sqrt(r),this.x=t*r,this.y=e*r,this.z=n*r,this.w=i*r),this},dot:function(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.w},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y,r=this.z,s=this.w;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this.z=r+e*(t.z-r),this.w=s+e*(t.w-s),this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z||1,this.w*=t.w||1,this},divide:function(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z||1,this.w/=t.w||1,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return Math.sqrt(e*e+n*n+i*i+r*r)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y,i=t.z-this.z||0,r=t.w-this.w||0;return e*e+n*n+i*i+r*r},negate:function(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this},transformMat4:function(t){var e=this.x,n=this.y,i=this.z,r=this.w,s=t.val;return this.x=s[0]*e+s[4]*n+s[8]*i+s[12]*r,this.y=s[1]*e+s[5]*n+s[9]*i+s[13]*r,this.z=s[2]*e+s[6]*n+s[10]*i+s[14]*r,this.w=s[3]*e+s[7]*n+s[11]*i+s[15]*r,this},transformQuat:function(t){var e=this.x,n=this.y,i=this.z,r=t.x,s=t.y,a=t.z,o=t.w,h=o*e+s*i-a*n,l=o*n+a*e-r*i,u=o*i+r*n-s*e,c=-r*e-s*n-a*i;return this.x=h*o+c*-r+l*-a-u*-s,this.y=l*o+c*-s+u*-r-h*-a,this.z=u*o+c*-a+h*-s-l*-r,this},reset:function(){return this.x=0,this.y=0,this.z=0,this.w=0,this}});i.prototype.sub=i.prototype.subtract,i.prototype.mul=i.prototype.multiply,i.prototype.div=i.prototype.divide,i.prototype.dist=i.prototype.distance,i.prototype.distSq=i.prototype.distanceSq,i.prototype.len=i.prototype.length,i.prototype.lenSq=i.prototype.lengthSq,t.exports=i},function(t,e,n){var i=n(11),r=n(30),s=n(31),a=new r,o=new s,h=new i;t.exports=function(t,e,n){return o.setAxisAngle(e,n),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(152),r=n(0),s=n(153),a=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},function(t,e,n){var i=new(n(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,n){t.exports={ADDED_TO_SCENE:n(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(le,t){(function(){var i,t,e,d,n,s,r,a,o,k,h,l,u,c,ht,f,p,m,g,j,v,y,x,w,M,E,T,A,b,R,S,I,C,P,Z,F,V,O,_,L,D,N,Y,X,U,z,B,q,W,G,H,K,Q,J,$,tt,et,nt,it,rt,st,at,ot,lt,ut,ct,ft,dt,pt,mt,gt,vt,yt,xt,wt,Mt,Et,Tt,At,bt,Rt,St,It,Ct,Pt,kt=this&&this.__extends||(i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)},function(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)});function Ft(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function Vt(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 Ot(t){this.atlas=t}function _t(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 Lt(t,e,n){if(this.x=0,this.y=0,this.rotation=0,this.scaleX=1,this.scaleY=1,this.shearX=0,this.shearY=0,this.transformMode=u.Normal,this.skinRequired=!1,this.color=new l.Color,t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");this.index=t,this.name=e,this.parent=n}function Dt(t,e){if(this.bendDirection=0,this.compress=!1,this.stretch=!1,this.mix=1,this.softness=0,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.mix=t.mix,this.softness=t.softness,this.bendDirection=t.bendDirection,this.compress=t.compress,this.stretch=t.stretch,this.bones=new Array;for(var n=0;n<t.bones.length;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)}function Nt(t){var e=m.call(this,t,0,!1)||this;return e.bones=new Array,e.bendDirection=1,e.compress=!1,e.stretch=!1,e.uniform=!1,e.mix=1,e.softness=0,e}function Yt(t,e){if(this.position=0,this.spacing=0,this.rotateMix=0,this.translateMix=0,this.spaces=new Array,this.positions=new Array,this.world=new Array,this.curves=new Array,this.lengths=new Array,this.segments=new Array,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.bones=new Array;for(var n=0,i=t.bones.length;n<i;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findSlot(t.target.name),this.position=t.position,this.spacing=t.spacing,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix}function Xt(t){var e=x.call(this,t,0,!1)||this;return e.bones=new Array,e}function Ut(t){this.toLoad=new Array,this.assets={},this.clientId=t}function zt(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function Bt(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var n,i=t.bones[e],r=void 0;null==i.parent?r=new S.Bone(i,this,null):(n=this.bones[i.parent.index],r=new S.Bone(i,this,n),n.children.push(r)),this.bones.push(r)}this.slots=new Array,this.drawOrder=new Array;for(e=0;e<t.slots.length;e++){var s=t.slots[e],r=this.bones[s.boneData.index],a=new S.Slot(s,r);this.slots.push(a),this.drawOrder.push(a)}this.ikConstraints=new Array;for(e=0;e<t.ikConstraints.length;e++){var o=t.ikConstraints[e];this.ikConstraints.push(new S.IkConstraint(o,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var h=t.transformConstraints[e];this.transformConstraints.push(new S.TransformConstraint(h,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var l=t.pathConstraints[e];this.pathConstraints.push(new S.PathConstraint(l,this))}this.color=new S.Color(1,1,1,1),this.updateCache()}function qt(){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 Wt(){this.triangulator=new Z.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}function Gt(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}function Ht(t,e){if(this.deform=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new _.Color,this.darkColor=null==t.darkColor?null:new _.Color,this.setToSetupPose()}function jt(t,e,n){if(this.color=new D.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Zt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new N.Vector2,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.rotateMix=t.rotateMix,this.translateMix=t.translateMix,this.scaleMix=t.scaleMix,this.shearMix=t.shearMix,this.bones=new Array;for(var n=0;n<t.bones.length;n++)this.bones.push(e.findBone(t.bones[n].name));this.target=e.findBone(t.target.name)}function Kt(t){var e=U.call(this,t,0,!1)||this;return e.bones=new Array,e.rotateMix=0,e.translateMix=0,e.scaleMix=0,e.shearMix=0,e.offsetRotation=0,e.offsetX=0,e.offsetY=0,e.offsetScaleX=0,e.offsetScaleY=0,e.offsetShearY=0,e.relative=!1,e.local=!1,e}function Qt(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new B.Pool(function(){return new Array}),this.polygonIndicesPool=new B.Pool(function(){return new Array})}function Jt(t){var e=Q.call(this,t)||this;return e.color=new K.Color(1,1,1,1),e}function $t(t){var e=tt.call(this,t)||this;return e.color=new $.Color(.2275,.2275,.8078,1),e}function te(t){var e=it.call(this,t)||this;return e.color=new nt.Color(1,1,1,1),e.tempColor=new nt.Color(0,0,0,0),e}function ee(t){var e=at.call(this,t)||this;return e.closed=!1,e.constantSpeed=!1,e.color=new st.Color(1,1,1,1),e}function ne(t){var e=ut.call(this,t)||this;return e.color=new lt.Color(.38,.94,0,1),e}function ie(t){var e=dt.call(this,t)||this;return e.x=0,e.y=0,e.scaleX=1,e.scaleY=1,e.rotation=0,e.width=0,e.height=0,e.color=new ft.Color(1,1,1,1),e.offset=ft.Utils.newFloatArray(8),e.uvs=ft.Utils.newFloatArray(8),e.tempColor=new ft.Color(1,1,1,1),e}function re(t,e){this.jitterX=0,this.jitterY=0,this.jitterX=t,this.jitterY=e}function se(t){this.centerX=0,this.centerY=0,this.radius=0,this.angle=0,this.worldX=0,this.worldY=0,this.radius=t}function ae(t){return void 0===t&&(t=""),Mt.call(this,function(t){return new xt.canvas.CanvasTexture(t)},t)||this}function oe(t){return bt.call(this,t)||this}function he(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=It.Utils.newFloatArray(8192),this.tempColor=new It.Color,this.ctx=t}!function(U){var z,t,g,e,n,i,B=(r.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},r.prototype.apply=function(t,e,n,i,r,s,a,o){if(null==t)throw new Error("skeleton cannot be null.");i&&0!=this.duration&&(n%=this.duration,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l<u;l++)h[l].apply(t,e,n,r,s,a,o)},r.binarySearch=function(t,e,n){void 0===n&&(n=1);var i=0,r=t.length/n-2;if(0==r)return n;for(var s=r>>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i<e.length;i++)this.timelineIds[e[i].getPropertyId()]=!0;this.duration=n}U.Animation=B,(t=z=U.MixBlend||(U.MixBlend={}))[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",(e=g=U.MixDirection||(U.MixDirection={}))[e.mixIn=0]="mixIn",e[e.mixOut=1]="mixOut",(i=n=U.TimelineType||(U.TimelineType={}))[i.rotate=0]="rotate",i[i.translate=1]="translate",i[i.scale=2]="scale",i[i.shear=3]="shear",i[i.attachment=4]="attachment",i[i.color=5]="color",i[i.deform=6]="deform",i[i.event=7]="event",i[i.drawOrder=8]="drawOrder",i[i.ikConstraint=9]="ikConstraint",i[i.transformConstraint=10]="transformConstraint",i[i.pathConstraintPosition=11]="pathConstraintPosition",i[i.pathConstraintSpacing=12]="pathConstraintSpacing",i[i.pathConstraintMix=13]="pathConstraintMix",i[i.twoColor=14]="twoColor";var s=(y.prototype.getFrameCount=function(){return this.curves.length/y.BEZIER_SIZE+1},y.prototype.setLinear=function(t){this.curves[t*y.BEZIER_SIZE]=y.LINEAR},y.prototype.setStepped=function(t){this.curves[t*y.BEZIER_SIZE]=y.STEPPED},y.prototype.getCurveType=function(t){var e=t*y.BEZIER_SIZE;if(e==this.curves.length)return y.LINEAR;var n=this.curves[e];return n==y.LINEAR?y.LINEAR:n==y.STEPPED?y.STEPPED:y.BEZIER},y.prototype.setCurve=function(t,e,n,i,r){var s=.03*(2*-e+i),a=.03*(2*-n+r),o=.006*(3*(e-i)+1),h=.006*(3*(n-r)+1),l=2*s+o,u=2*a+h,c=.3*e+s+.16666667*o,f=.3*n+a+.16666667*h,d=t*y.BEZIER_SIZE,p=this.curves;p[d++]=y.BEZIER;for(var m=c,g=f,v=d+y.BEZIER_SIZE-1;d<v;d+=2)p[d]=m,p[d+1]=g,c+=l,f+=u,l+=o,u+=h,m+=c,g+=f},y.prototype.getCurvePercent=function(t,e){e=U.MathUtils.clamp(e,0,1);var n=this.curves,i=t*y.BEZIER_SIZE,r=n[i];if(r==y.LINEAR)return e;if(r==y.STEPPED)return 0;for(var s=0,a=++i,o=i+y.BEZIER_SIZE-1;i<o;i+=2)if(e<=(s=n[i])){var h=void 0,l=void 0;return(l=i==a?h=0:(h=n[i-2],n[i-1]))+(n[i+1]-l)*(e-h)/(s-h)}var u=n[i-1];return u+(1-u)*(e-s)/(1-s)},y.LINEAR=0,y.STEPPED=1,y.BEZIER=2,y.BEZIER_SIZE=19,y);function y(t){if(t<=0)throw new Error("frameCount must be > 0: "+t);this.curves=U.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}U.CurveTimeline=s;var a,o=(kt(v,a=s),v.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=n},v.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return void(h.rotation=h.data.rotation);case z.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(n>=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case z.setup:h.rotation=h.data.rotation+u*r;break;case z.first:case z.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case z.add:h.rotation+=u*r}}else{var c=B.binarySearch(o,n,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(n-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case z.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case z.first:case z.replace:m+=h.data.rotation-h.rotation;case z.add:h.rotation+=(m-360*(16384-(16384.499999999996-m/360|0)))*r}}},v.ENTRIES=2,v.PREV_TIME=-2,v.PREV_ROTATION=-1,v.ROTATION=1,v);function v(t){var e=a.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t<<1),e}U.RotateTimeline=o;var h,l=(kt(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return h.x=h.data.x,void(h.y=h.data.y);case z.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,u,c,f=0,d=0;switch(n>=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=B.binarySearch(o,n,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case z.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case z.first:case z.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case z.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*p.ENTRIES),e}U.TranslateTimeline=l;var u,c=(kt(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case z.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,u,c,f=0,d=0;if(d=n>=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=B.binarySearch(o,n,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==z.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case z.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case z.first:case z.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-m)*r;break;case z.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*U.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*U.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case z.setup:p=Math.abs(h.data.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case z.first:case z.replace:p=Math.abs(h.scaleX)*U.MathUtils.signum(f),m=Math.abs(h.scaleY)*U.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case z.add:p=U.MathUtils.signum(f),m=U.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}U.ScaleTimeline=c;var f,d=(kt(m,f=l),m.prototype.getPropertyId=function(){return(n.shear<<24)+this.boneIndex},m.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case z.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,u,c,f=0,d=0;switch(n>=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=B.binarySearch(o,n,m.ENTRIES))+m.PREV_X],d=o[l+m.PREV_Y],u=o[l],c=this.getCurvePercent(l/m.ENTRIES-1,1-(n-u)/(o[l+m.PREV_TIME]-u)),f+=(o[l+m.X]-f)*c,d+=(o[l+m.Y]-d)*c),s){case z.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case z.first:case z.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case z.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}U.ShearTimeline=d;var w,M=(kt(E,w=s),E.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},E.prototype.setFrame=function(t,e,n,i,r,s){t*=E.ENTRIES,this.frames[t]=e,this.frames[t+E.R]=n,this.frames[t+E.G]=i,this.frames[t+E.B]=r,this.frames[t+E.A]=s},E.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n<h[0])switch(s){case z.setup:return void o.color.setFromColor(o.data.color);case z.first:var l=o.color,u=o.data.color;l.add((u.r-l.r)*r,(u.g-l.g)*r,(u.b-l.b)*r,(u.a-l.a)*r)}else{var c,f,d,p,m=0,g=0,v=0,y=0;n>=h[h.length-E.ENTRIES]?(m=h[(c=h.length)+E.PREV_R],g=h[c+E.PREV_G],v=h[c+E.PREV_B],y=h[c+E.PREV_A]):(m=h[(f=B.binarySearch(h,n,E.ENTRIES))+E.PREV_R],g=h[f+E.PREV_G],v=h[f+E.PREV_B],y=h[f+E.PREV_A],d=h[f],p=this.getCurvePercent(f/E.ENTRIES-1,1-(n-d)/(h[f+E.PREV_TIME]-d)),m+=(h[f+E.R]-m)*p,g+=(h[f+E.G]-g)*p,v+=(h[f+E.B]-v)*p,y+=(h[f+E.A]-y)*p),1==r?o.color.set(m,g,v,y):(l=o.color,s==z.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(y-l.a)*r))}}},E.ENTRIES=5,E.PREV_TIME=-5,E.PREV_R=-4,E.PREV_G=-3,E.PREV_B=-2,E.PREV_A=-1,E.R=1,E.G=2,E.B=3,E.A=4,E);function E(t){var e=w.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*E.ENTRIES),e}U.ColorTimeline=M;var T,A=(kt(b,T=s),b.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},b.prototype.setFrame=function(t,e,n,i,r,s,a,o,h){t*=b.ENTRIES,this.frames[t]=e,this.frames[t+b.R]=n,this.frames[t+b.G]=i,this.frames[t+b.B]=r,this.frames[t+b.A]=s,this.frames[t+b.R2]=a,this.frames[t+b.G2]=o,this.frames[t+b.B2]=h},b.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n<h[0])switch(s){case z.setup:return o.color.setFromColor(o.data.color),void o.darkColor.setFromColor(o.data.darkColor);case z.first:var l=o.color,u=o.darkColor,c=o.data.color,f=o.data.darkColor;l.add((c.r-l.r)*r,(c.g-l.g)*r,(c.b-l.b)*r,(c.a-l.a)*r),u.add((f.r-u.r)*r,(f.g-u.g)*r,(f.b-u.b)*r,0)}else{var d,p,m,g,v=0,y=0,x=0,w=0,M=0,E=0,T=0;n>=h[h.length-b.ENTRIES]?(v=h[(d=h.length)+b.PREV_R],y=h[d+b.PREV_G],x=h[d+b.PREV_B],w=h[d+b.PREV_A],M=h[d+b.PREV_R2],E=h[d+b.PREV_G2],T=h[d+b.PREV_B2]):(v=h[(p=B.binarySearch(h,n,b.ENTRIES))+b.PREV_R],y=h[p+b.PREV_G],x=h[p+b.PREV_B],w=h[p+b.PREV_A],M=h[p+b.PREV_R2],E=h[p+b.PREV_G2],T=h[p+b.PREV_B2],m=h[p],g=this.getCurvePercent(p/b.ENTRIES-1,1-(n-m)/(h[p+b.PREV_TIME]-m)),v+=(h[p+b.R]-v)*g,y+=(h[p+b.G]-y)*g,x+=(h[p+b.B]-x)*g,w+=(h[p+b.A]-w)*g,M+=(h[p+b.R2]-M)*g,E+=(h[p+b.G2]-E)*g,T+=(h[p+b.B2]-T)*g),1==r?(o.color.set(v,y,x,w),o.darkColor.set(M,E,T,1)):(l=o.color,u=o.darkColor,s==z.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(y-l.g)*r,(x-l.b)*r,(w-l.a)*r),u.add((M-u.r)*r,(E-u.g)*r,(T-u.b)*r,0))}}},b.ENTRIES=8,b.PREV_TIME=-8,b.PREV_R=-7,b.PREV_G=-6,b.PREV_B=-5,b.PREV_A=-4,b.PREV_R2=-3,b.PREV_G2=-2,b.PREV_B2=-1,b.R=1,b.G=2,b.B=3,b.A=4,b.R2=5,b.G2=6,b.B2=7,b);function b(t){var e=T.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*b.ENTRIES),e}U.TwoColorTimeline=A;var R=(S.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},S.prototype.getFrameCount=function(){return this.frames.length},S.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},S.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u=t.slots[this.slotIndex];u.bone.active&&(a!=g.mixOut?n<(o=this.frames)[0]?s!=z.setup&&s!=z.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=o[o.length-1]?o.length-1:B.binarySearch(o,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==z.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=U.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}U.AttachmentTimeline=R;var I,C=null,P=(kt(k,I=s),k.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},k.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},k.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof U.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=z.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(n<f[0]){var d=h;switch(s){case z.setup:return void(l.length=0);case z.first:if(1==r){l.length=0;break}var p=U.Utils.setArraySize(l,c);if(null==d.bones)for(var m=d.vertices,g=0;g<c;g++)p[g]+=(m[g]-p[g])*r;else for(r=1-r,g=0;g<c;g++)p[g]*=r}}else{var v=U.Utils.setArraySize(l,c);if(n>=f[f.length-1]){var y=u[f.length-1];if(1==r)if(s==z.add)if(null==(d=h).bones)for(var m=d.vertices,x=0;x<c;x++)v[x]+=y[x]-m[x];else for(var w=0;w<c;w++)v[w]+=y[w];else U.Utils.arrayCopy(y,0,v,0,c);else switch(s){case z.setup:if(null==h.bones)for(var m=h.vertices,M=0;M<c;M++){var E=m[M];v[M]=E+(y[M]-E)*r}else for(var T=0;T<c;T++)v[T]=y[T]*r;break;case z.first:case z.replace:for(var A=0;A<c;A++)v[A]+=(y[A]-v[A])*r;break;case z.add:if(null==(d=h).bones)for(var m=d.vertices,b=0;b<c;b++)v[b]+=(y[b]-m[b])*r;else for(var R=0;R<c;R++)v[R]+=y[R]*r}}else{var S=B.binarySearch(f,n),I=u[S-1],C=u[S],P=f[S],k=this.getCurvePercent(S-1,1-(n-P)/(f[S-1]-P));if(1==r)if(s==z.add)if(null==(d=h).bones)for(var m=d.vertices,F=0;F<c;F++){var V=I[F];v[F]+=V+(C[F]-V)*k-m[F]}else for(var O=0;O<c;O++)V=I[O],v[O]+=V+(C[O]-V)*k;else for(var _=0;_<c;_++)V=I[_],v[_]=V+(C[_]-V)*k;else switch(s){case z.setup:if(null==h.bones)for(var m=h.vertices,L=0;L<c;L++)V=I[L],E=m[L],v[L]=E+(V+(C[L]-V)*k-E)*r;else for(var D=0;D<c;D++)V=I[D],v[D]=(V+(C[D]-V)*k)*r;break;case z.first:case z.replace:for(var N=0;N<c;N++)V=I[N],v[N]+=(V+(C[N]-V)*k-v[N])*r;break;case z.add:if(null==(d=h).bones)for(var m=d.vertices,Y=0;Y<c;Y++)V=I[Y],v[Y]+=(V+(C[Y]-V)*k-m[Y])*r;else for(var X=0;X<c;X++)V=I[X],v[X]+=(V+(C[X]-V)*k)*r}}}}}},k);function k(t){var e=I.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==C&&(C=U.Utils.newFloatArray(64)),e}U.DeformTimeline=P;var F=(V.prototype.getPropertyId=function(){return n.event<<24},V.prototype.getFrameCount=function(){return this.frames.length},V.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},V.prototype.apply=function(t,e,n,i,r,s,a){if(null!=i){var o=this.frames,h=this.frames.length;if(n<e)this.apply(t,e,Number.MAX_VALUE,i,r,s,a),e=-1;else if(e>=o[h-1])return;if(!(n<o[0])){var l=0;if(e<o[0])l=0;else for(var u=o[l=B.binarySearch(o,e)];0<l&&o[l-1]==u;)l--;for(;l<h&&n>=o[l];l++)i.push(this.events[l])}}},V);function V(t){this.frames=U.Utils.newFloatArray(t),this.events=new Array(t)}U.EventTimeline=F;var O=(_.prototype.getPropertyId=function(){return n.drawOrder<<24},_.prototype.getFrameCount=function(){return this.frames.length},_.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},_.prototype.apply=function(t,e,n,i,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(n<l[0])s!=z.setup&&s!=z.first||U.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var u=0,u=n>=l[l.length-1]?l.length-1:B.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)U.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f<d;f++)o[f]=h[c[f]]}}else s==z.setup&&U.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},_);function _(t){this.frames=U.Utils.newFloatArray(t),this.drawOrders=new Array(t)}U.DrawOrderTimeline=O;var L,D=(kt(N,L=s),N.prototype.getPropertyId=function(){return(n.ikConstraint<<24)+this.ikConstraintIndex},N.prototype.setFrame=function(t,e,n,i,r,s,a){t*=N.ENTRIES,this.frames[t]=e,this.frames[t+N.MIX]=n,this.frames[t+N.SOFTNESS]=i,this.frames[t+N.BEND_DIRECTION]=r,this.frames[t+N.COMPRESS]=s?1:0,this.frames[t+N.STRETCH]=a?1:0},N.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u,c,f=this.frames,d=t.ikConstraints[this.ikConstraintIndex];if(d.active)if(n<f[0])switch(s){case z.setup:return d.mix=d.data.mix,d.softness=d.data.softness,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,void(d.stretch=d.data.stretch);case z.first:d.mix+=(d.data.mix-d.mix)*r,d.softness+=(d.data.softness-d.softness)*r,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch}else n>=f[f.length-N.ENTRIES]?s==z.setup?(d.mix=d.data.mix+(f[f.length+N.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+N.PREV_SOFTNESS]-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(d.mix+=(f[f.length+N.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+N.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+N.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+N.PREV_COMPRESS],d.stretch=0!=f[f.length+N.PREV_STRETCH])):(h=f[(o=B.binarySearch(f,n,N.ENTRIES))+N.PREV_MIX],l=f[o+N.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/N.ENTRIES-1,1-(n-u)/(f[o+N.PREV_TIME]-u)),s==z.setup?(d.mix=d.data.mix+(h+(f[o+N.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+N.SOFTNESS]-l)*c-d.data.softness)*r,a==g.mixOut?(d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch):(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])):(d.mix+=(h+(f[o+N.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+N.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+N.PREV_BEND_DIRECTION],d.compress=0!=f[o+N.PREV_COMPRESS],d.stretch=0!=f[o+N.PREV_STRETCH])))},N.ENTRIES=6,N.PREV_TIME=-6,N.PREV_MIX=-5,N.PREV_SOFTNESS=-4,N.PREV_BEND_DIRECTION=-3,N.PREV_COMPRESS=-2,N.PREV_STRETCH=-1,N.MIX=1,N.SOFTNESS=2,N.BEND_DIRECTION=3,N.COMPRESS=4,N.STRETCH=5,N);function N(t){var e=L.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*N.ENTRIES),e}U.IkConstraintTimeline=D;var Y,X=(kt(q,Y=s),q.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},q.prototype.setFrame=function(t,e,n,i,r,s){t*=q.ENTRIES,this.frames[t]=e,this.frames[t+q.ROTATE]=n,this.frames[t+q.TRANSLATE]=i,this.frames[t+q.SCALE]=r,this.frames[t+q.SHEAR]=s},q.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n<o[0]){var l=h.data;switch(s){case z.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case z.first:h.rotateMix+=(l.rotateMix-h.rotateMix)*r,h.translateMix+=(l.translateMix-h.translateMix)*r,h.scaleMix+=(l.scaleMix-h.scaleMix)*r,h.shearMix+=(l.shearMix-h.shearMix)*r}}else{var u,c,f,d,p=0,m=0,g=0,v=0;n>=o[o.length-q.ENTRIES]?(p=o[(u=o.length)+q.PREV_ROTATE],m=o[u+q.PREV_TRANSLATE],g=o[u+q.PREV_SCALE],v=o[u+q.PREV_SHEAR]):(p=o[(c=B.binarySearch(o,n,q.ENTRIES))+q.PREV_ROTATE],m=o[c+q.PREV_TRANSLATE],g=o[c+q.PREV_SCALE],v=o[c+q.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/q.ENTRIES-1,1-(n-f)/(o[c+q.PREV_TIME]-f)),p+=(o[c+q.ROTATE]-p)*d,m+=(o[c+q.TRANSLATE]-m)*d,g+=(o[c+q.SCALE]-g)*d,v+=(o[c+q.SHEAR]-v)*d),s==z.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(m-l.translateMix)*r,h.scaleMix=l.scaleMix+(g-l.scaleMix)*r,h.shearMix=l.shearMix+(v-l.shearMix)*r):(h.rotateMix+=(p-h.rotateMix)*r,h.translateMix+=(m-h.translateMix)*r,h.scaleMix+=(g-h.scaleMix)*r,h.shearMix+=(v-h.shearMix)*r)}},q.ENTRIES=5,q.PREV_TIME=-5,q.PREV_ROTATE=-4,q.PREV_TRANSLATE=-3,q.PREV_SCALE=-2,q.PREV_SHEAR=-1,q.ROTATE=1,q.TRANSLATE=2,q.SCALE=3,q.SHEAR=4,q);function q(t){var e=Y.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*q.ENTRIES),e}U.TransformConstraintTimeline=X;var W,G=(kt(H,W=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return void(h.position=h.data.position);case z.first:h.position+=(h.data.position-h.position)*r}else{var l,u,c,f=0;n>=o[o.length-H.ENTRIES]?f=o[o.length+H.PREV_VALUE]:(f=o[(l=B.binarySearch(o,n,H.ENTRIES))+H.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(o[l+H.PREV_TIME]-u)),f+=(o[l+H.VALUE]-f)*c),s==z.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=W.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*H.ENTRIES),e}U.PathConstraintPositionTimeline=G;var j,Z=(kt(K,j=G),K.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},K.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return void(h.spacing=h.data.spacing);case z.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,u,c,f=0;n>=o[o.length-K.ENTRIES]?f=o[o.length+K.PREV_VALUE]:(f=o[(l=B.binarySearch(o,n,K.ENTRIES))+K.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/K.ENTRIES-1,1-(n-u)/(o[l+K.PREV_TIME]-u)),f+=(o[l+K.VALUE]-f)*c),s==z.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},K);function K(t){return j.call(this,t)||this}U.PathConstraintSpacingTimeline=Z;var Q,J=(kt($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case z.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case z.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,u,c,f=0,d=0;n>=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=B.binarySearch(o,n,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==z.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=U.Utils.newFloatArray(t*$.ENTRIES),e}U.PathConstraintMixTimeline=J}(St=St||{}),function(R){var t=(S.prototype.update=function(t){t*=this.timeScale;for(var e=this.tracks,n=0,i=e.length;n<i;n++){var r=e[n];if(null!=r){r.animationLast=r.nextAnimationLast,r.trackLast=r.nextTrackLast;var s=t*r.timeScale;if(0<r.delay){if(r.delay-=s,0<r.delay)continue;s=-r.delay,r.delay=0}var a=r.next;if(null!=a){var o=r.trackLast-a.delay;if(0<=o){for(a.delay=0,a.trackTime+=0==r.timeScale?0:(o/r.timeScale+t)*a.timeScale,r.trackTime+=s,this.setCurrent(n,a,!0);null!=a.mixingFrom;)a.mixTime+=t,a=a.mixingFrom;continue}}else if(r.trackLast>=r.trackEnd&&null==r.mixingFrom){e[n]=null,this.queue.end(r),this.disposeNext(r);continue}if(null!=r.mixingFrom&&this.updateMixingFrom(r,t)){var h=r.mixingFrom;for((r.mixingFrom=null)!=h&&(h.mixingTo=null);null!=h;)this.queue.end(h),h=h.mixingFrom}r.trackTime+=s}}this.queue.drain()},S.prototype.updateMixingFrom=function(t,e){var n=t.mixingFrom;if(null==n)return!0;var i=this.updateMixingFrom(n,e);return n.animationLast=n.nextAnimationLast,n.trackLast=n.nextTrackLast,0<t.mixTime&&t.mixTime>=t.mixDuration?(0!=n.totalAlpha&&0!=t.mixDuration||(t.mixingFrom=n.mixingFrom,null!=n.mixingFrom&&(n.mixingFrom.mixingTo=t),t.interruptAlpha=n.interruptAlpha,this.queue.end(n)),i):(n.trackTime+=e*n.timeScale,t.mixTime+=e,!1)},S.prototype.apply=function(t){if(null==t)throw new Error("skeleton cannot be null.");this.animationsChanged&&this._animationsChanged();for(var e=this.events,n=this.tracks,i=!1,r=0,s=n.length;r<s;r++){var a=n[r];if(!(null==a||0<a.delay)){i=!0;var o=0==r?R.MixBlend.first:a.mixBlend,h=a.alpha;null!=a.mixingFrom?h*=this.applyMixingFrom(a,t,o):a.trackTime>=a.trackEnd&&null==a.next&&(h=0);var l=a.animationLast,u=a.getAnimationTime(),c=a.animation.timelines.length,f=a.animation.timelines;if(0==r&&1==h||o==R.MixBlend.add)for(var d=0;d<c;d++){R.Utils.webkit602BugfixHelper(h,o);var p=f[d];p instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(p,t,u,o,!0):p.apply(t,l,u,e,h,o,R.MixDirection.mixIn)}else{var m=a.timelineMode,g=0==a.timelinesRotation.length;g&&R.Utils.setArraySize(a.timelinesRotation,c<<1,null);for(var v=a.timelinesRotation,d=0;d<c;d++){var y=f[d],x=m[d]==S.SUBSEQUENT?o:R.MixBlend.setup;y instanceof R.RotateTimeline?this.applyRotateTimeline(y,t,u,h,x,v,d<<1,g):y instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(y,t,u,o,!0):(R.Utils.webkit602BugfixHelper(h,o),y.apply(t,l,u,e,h,x,R.MixDirection.mixIn))}}this.queueEvents(a,u),e.length=0,a.nextAnimationLast=u,a.nextTrackLast=a.trackTime}}for(var w=this.unkeyedState+S.SETUP,M=t.slots,E=0,T=t.slots.length;E<T;E++){var A,b=M[E];b.attachmentState==w&&(A=b.data.attachmentName,b.attachment=null==A?null:t.getAttachment(b.data.index,A))}return this.unkeyedState+=2,this.queue.drain(),i},S.prototype.applyMixingFrom=function(t,e,n){var i=t.mixingFrom;null!=i.mixingFrom&&this.applyMixingFrom(i,e,n);var r=0;0==t.mixDuration?(r=1,n==R.MixBlend.first&&(n=R.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),n!=R.MixBlend.first&&(n=i.mixBlend));var s=r<i.eventThreshold?this.events:null,a=r<i.attachmentThreshold,o=r<i.drawOrderThreshold,h=i.animationLast,l=i.getAnimationTime(),u=i.animation.timelines.length,c=i.animation.timelines,f=i.alpha*t.interruptAlpha,d=f*(1-r);if(n==R.MixBlend.add)for(var p=0;p<u;p++)c[p].apply(e,h,l,s,d,n,R.MixDirection.mixOut);else{var m=i.timelineMode,g=i.timelineHoldMix,v=0==i.timelinesRotation.length;v&&R.Utils.setArraySize(i.timelinesRotation,u<<1,null);for(var y=i.timelinesRotation,p=i.totalAlpha=0;p<u;p++){var x=c[p],w=R.MixDirection.mixOut,M=void 0,E=0;switch(m[p]){case S.SUBSEQUENT:if(!o&&x instanceof R.DrawOrderTimeline)continue;M=n,E=d;break;case S.FIRST:M=R.MixBlend.setup,E=d;break;case S.HOLD_SUBSEQUENT:M=n,E=f;break;case S.HOLD_FIRST:M=R.MixBlend.setup,E=f;break;default:M=R.MixBlend.setup;var T=g[p],E=f*Math.max(0,1-T.mixTime/T.mixDuration)}i.totalAlpha+=E,x instanceof R.RotateTimeline?this.applyRotateTimeline(x,e,l,E,M,y,p<<1,v):x instanceof R.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,M,a):(R.Utils.webkit602BugfixHelper(E,n),o&&x instanceof R.DrawOrderTimeline&&M==R.MixBlend.setup&&(w=R.MixDirection.mixIn),x.apply(e,h,l,s,E,M,w))}}return 0<t.mixDuration&&this.queueEvents(i,l),this.events.length=0,i.nextAnimationLast=l,i.nextTrackLast=i.trackTime,r},S.prototype.applyAttachmentTimeline=function(t,e,n,i,r){var s,a,o=e.slots[t.slotIndex];o.bone.active&&(n<(s=t.frames)[0]?i!=R.MixBlend.setup&&i!=R.MixBlend.first||this.setAttachment(e,o,o.data.attachmentName,r):(a=n>=s[s.length-1]?s.length-1:R.Animation.binarySearch(s,n)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+S.SETUP))},S.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+S.CURRENT)},S.prototype.applyRotateTimeline=function(t,e,n,i,r,s,a,o){if(o&&(s[a]=0),1!=i){var h=t,l=h.frames,u=e.bones[h.boneIndex];if(u.active){var c=0,f=0;if(n<l[0])switch(r){case R.MixBlend.setup:u.rotation=u.data.rotation;default:return;case R.MixBlend.first:c=u.rotation,f=u.data.rotation}else{var d,p,m,g,c=r==R.MixBlend.setup?u.data.rotation:u.rotation;n>=l[l.length-R.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+R.RotateTimeline.PREV_ROTATION]:(p=l[(d=R.Animation.binarySearch(l,n,R.RotateTimeline.ENTRIES))+R.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(n-m)/(l[d+R.RotateTimeline.PREV_TIME]-m)),f=l[d+R.RotateTimeline.ROTATION]-p,f=p+(f-=360*(16384-(16384.499999999996-f/360|0)))*g+u.data.rotation,f-=360*(16384-(16384.499999999996-f/360|0)))}var v,y,x,w,M=0,E=f-c;0==(E-=360*(16384-(16384.499999999996-E/360|0)))?M=s[a]:(y=v=0,y=o?(v=0,E):(v=s[a],s[a+1]),x=0<E,w=0<=v,R.MathUtils.signum(y)!=R.MathUtils.signum(E)&&Math.abs(y)<=90&&(180<Math.abs(v)&&(v+=360*R.MathUtils.signum(v)),w=x),M=E+v-v%360,w!=x&&(M+=360*R.MathUtils.signum(v)),s[a]=M),s[a+1]=E,c+=M*i,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}}else t.apply(e,0,n,null,1,r,R.MixDirection.mixIn)},S.prototype.queueEvents=function(t,e){for(var n=t.animationStart,i=t.animationEnd,r=i-n,s=t.trackLast%r,a=this.events,o=0,h=a.length;o<h;o++){var l=a[o];if(l.time<s)break;l.time>i||this.queue.event(t,l)}for((t.loop?0==r||s>t.trackTime%r:i<=e&&t.animationLast<i)&&this.queue.complete(t);o<h;o++)a[o].time<n||this.queue.event(t,a[o])},S.prototype.clearTracks=function(){var t=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var e=0,n=this.tracks.length;e<n;e++)this.clearTrack(e);this.tracks.length=0,this.queue.drainDisabled=t,this.queue.drain()},S.prototype.clearTrack=function(t){if(!(t>=this.tracks.length)){var e=this.tracks[t];if(null!=e){this.queue.end(e),this.disposeNext(e);for(var n=e;;){var i=n.mixingFrom;if(null==i)break;this.queue.end(i),n.mixingFrom=null,n.mixingTo=null,n=i}this.tracks[e.trackIndex]=null,this.queue.drain()}}},S.prototype.setCurrent=function(t,e,n){var i=this.expandToIndex(t);this.tracks[t]=e,null!=i&&(n&&this.queue.interrupt(i),((e.mixingFrom=i).mixingTo=e).mixTime=0,null!=i.mixingFrom&&0<i.mixDuration&&(e.interruptAlpha*=Math.min(1,i.mixTime/i.mixDuration)),i.timelinesRotation.length=0),this.queue.start(e)},S.prototype.setAnimation=function(t,e,n){var i=this.data.skeletonData.findAnimation(e);if(null==i)throw new Error("Animation not found: "+e);return this.setAnimationWith(t,i,n)},S.prototype.setAnimationWith=function(t,e,n){if(null==e)throw new Error("animation cannot be null.");var i=!0,r=this.expandToIndex(t);null!=r&&(-1==r.nextTrackLast?(this.tracks[t]=r.mixingFrom,this.queue.interrupt(r),this.queue.end(r),this.disposeNext(r),r=r.mixingFrom,i=!1):this.disposeNext(r));var s=this.trackEntry(t,e,n,r);return this.setCurrent(t,s,i),this.queue.drain(),s},S.prototype.addAnimation=function(t,e,n,i){var r=this.data.skeletonData.findAnimation(e);if(null==r)throw new Error("Animation not found: "+e);return this.addAnimationWith(t,r,n,i)},S.prototype.addAnimationWith=function(t,e,n,i){if(null==e)throw new Error("animation cannot be null.");var r=this.expandToIndex(t);if(null!=r)for(;null!=r.next;)r=r.next;var s,a=this.trackEntry(t,e,n,r);return null==r?(this.setCurrent(t,a,!0),this.queue.drain()):(r.next=a,i<=0&&(0!=(s=r.animationEnd-r.animationStart)?(r.loop?i+=s*(1+(r.trackTime/s|0)):i+=Math.max(s,r.trackTime),i-=this.data.getMix(r.animation,e)):i=r.trackTime)),a.delay=i,a},S.prototype.setEmptyAnimation=function(t,e){var n=this.setAnimationWith(t,S.emptyAnimation,!1);return n.mixDuration=e,n.trackEnd=e,n},S.prototype.addEmptyAnimation=function(t,e,n){n<=0&&(n-=e);var i=this.addAnimationWith(t,S.emptyAnimation,!1,n);return i.mixDuration=e,i.trackEnd=e,i},S.prototype.setEmptyAnimations=function(t){var e=this.queue.drainDisabled;this.queue.drainDisabled=!0;for(var n=0,i=this.tracks.length;n<i;n++){var r=this.tracks[n];null!=r&&this.setEmptyAnimation(r.trackIndex,t)}this.queue.drainDisabled=e,this.queue.drain()},S.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(R.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},S.prototype.trackEntry=function(t,e,n,i){var r=this.trackEntryPool.obtain();return r.trackIndex=t,r.animation=e,r.loop=n,r.holdPrevious=!1,r.eventThreshold=0,r.attachmentThreshold=0,r.drawOrderThreshold=0,r.animationStart=0,r.animationEnd=e.duration,r.animationLast=-1,r.nextAnimationLast=-1,r.delay=0,r.trackTime=0,r.trackLast=-1,r.nextTrackLast=-1,r.trackEnd=Number.MAX_VALUE,r.timeScale=1,r.alpha=1,r.interruptAlpha=1,r.mixTime=0,r.mixDuration=null==i?0:this.data.getMix(i.animation,e),r.mixBlend=R.MixBlend.replace,r},S.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},S.prototype._animationsChanged=function(){this.animationsChanged=!1,this.propertyIDs.clear();for(var t=0,e=this.tracks.length;t<e;t++){var n=this.tracks[t];if(null!=n){for(;null!=n.mixingFrom;)n=n.mixingFrom;for(;null!=n.mixingFrom&&n.mixBlend==R.MixBlend.add||this.computeHold(n),null!=(n=n.mixingTo););}}},S.prototype.computeHold=function(t){var e=t.mixingTo,n=t.animation.timelines,i=t.animation.timelines.length,r=R.Utils.setArraySize(t.timelineMode,i);t.timelineHoldMix.length=0;var s=R.Utils.setArraySize(t.timelineHoldMix,i),a=this.propertyIDs;if(null!=e&&e.holdPrevious)for(var o=0;o<i;o++)r[o]=a.add(n[o].getPropertyId())?S.HOLD_FIRST:S.HOLD_SUBSEQUENT;else t:for(o=0;o<i;o++){var h=n[o],l=h.getPropertyId();if(a.add(l))if(null==e||h instanceof R.AttachmentTimeline||h instanceof R.DrawOrderTimeline||h instanceof R.EventTimeline||!e.animation.hasTimeline(l))r[o]=S.FIRST;else{for(var u=e.mixingTo;null!=u;u=u.mixingTo)if(!u.animation.hasTimeline(l)){if(0<t.mixDuration){r[o]=S.HOLD_MIX,s[o]=u;continue t}break}r[o]=S.HOLD_FIRST}else r[o]=S.SUBSEQUENT}},S.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},S.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},S.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},S.prototype.clearListeners=function(){this.listeners.length=0},S.prototype.clearListenerNotifications=function(){this.queue.clear()},S.emptyAnimation=new R.Animation("<empty>",[],0),S.SUBSEQUENT=0,S.FIRST=1,S.HOLD_SUBSEQUENT=2,S.HOLD_FIRST=3,S.HOLD_MIX=4,S.SETUP=1,S.CURRENT=2,S);function S(t){this.tracks=new Array,this.timeScale=1,this.unkeyedState=0,this.events=new Array,this.listeners=new Array,this.queue=new r(this),this.propertyIDs=new R.IntSet,this.animationsChanged=!1,this.trackEntryPool=new R.Pool(function(){return new e}),this.data=t}R.AnimationState=t;var e=(n.prototype.reset=function(){this.next=null,this.mixingFrom=null,this.mixingTo=null,this.animation=null,this.listener=null,this.timelineMode.length=0,this.timelineHoldMix.length=0,this.timelinesRotation.length=0},n.prototype.getAnimationTime=function(){if(this.loop){var t=this.animationEnd-this.animationStart;return 0==t?this.animationStart:this.trackTime%t+this.animationStart}return Math.min(this.trackTime+this.animationStart,this.animationEnd)},n.prototype.setAnimationLast=function(t){this.animationLast=t,this.nextAnimationLast=t},n.prototype.isComplete=function(){return this.trackTime>=this.animationEnd-this.animationStart},n.prototype.resetRotationDirections=function(){this.timelinesRotation.length=0},n);function n(){this.mixBlend=R.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}R.TrackEntry=e;var o,i,r=(s.prototype.start=function(t){this.objects.push(o.start),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.interrupt=function(t){this.objects.push(o.interrupt),this.objects.push(t)},s.prototype.end=function(t){this.objects.push(o.end),this.objects.push(t),this.animState.animationsChanged=!0},s.prototype.dispose=function(t){this.objects.push(o.dispose),this.objects.push(t)},s.prototype.complete=function(t){this.objects.push(o.complete),this.objects.push(t)},s.prototype.event=function(t,e){this.objects.push(o.event),this.objects.push(t),this.objects.push(e)},s.prototype.drain=function(){if(!this.drainDisabled){this.drainDisabled=!0;for(var t=this.objects,e=this.animState.listeners,n=0;n<t.length;n+=2){var i=t[n],r=t[n+1];switch(i){case o.start:null!=r.listener&&r.listener.start&&r.listener.start(r);for(var s=0;s<e.length;s++)e[s].start&&e[s].start(r);break;case o.interrupt:for(null!=r.listener&&r.listener.interrupt&&r.listener.interrupt(r),s=0;s<e.length;s++)e[s].interrupt&&e[s].interrupt(r);break;case o.end:for(null!=r.listener&&r.listener.end&&r.listener.end(r),s=0;s<e.length;s++)e[s].end&&e[s].end(r);case o.dispose:for(null!=r.listener&&r.listener.dispose&&r.listener.dispose(r),s=0;s<e.length;s++)e[s].dispose&&e[s].dispose(r);this.animState.trackEntryPool.free(r);break;case o.complete:for(null!=r.listener&&r.listener.complete&&r.listener.complete(r),s=0;s<e.length;s++)e[s].complete&&e[s].complete(r);break;case o.event:var a=t[2+n++];for(null!=r.listener&&r.listener.event&&r.listener.event(r,a),s=0;s<e.length;s++)e[s].event&&e[s].event(r,a)}}this.clear(),this.drainDisabled=!1}},s.prototype.clear=function(){this.objects.length=0},s);function s(t){this.objects=[],this.drainDisabled=!1,this.animState=t}R.EventQueue=r,(i=o=R.EventType||(R.EventType={}))[i.start=0]="start",i[i.interrupt=1]="interrupt",i[i.end=2]="end",i[i.dispose=3]="dispose",i[i.complete=4]="complete",i[i.event=5]="event";var a=(h.prototype.start=function(t){},h.prototype.interrupt=function(t){},h.prototype.end=function(t){},h.prototype.dispose=function(t){},h.prototype.complete=function(t){},h.prototype.event=function(t,e){},h);function h(){}R.AnimationStateAdapter=a}(St=St||{}),t=St=St||{},Ft.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)},Ft.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},Ft.prototype.getMix=function(t,e){var n=t.name+"."+e.name,i=this.animationToMixTime[n];return void 0===i?this.defaultMix:i},e=Ft,t.AnimationStateData=e,d=St=St||{},Vt.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()},Vt.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()},Vt.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},Vt.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++})},Vt.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++})},Vt.prototype.loadTexture=function(n,i,e){var r=this;void 0===i&&(i=null),void 0===e&&(e=null);var s=n=this.pathPrefix+n;this.toLoad++;var a=new Image;a.crossOrigin="anonymous",a.onload=function(t){var e=r.textureLoader(a);r.assets[s]=e,r.toLoad--,r.loaded++,i&&i(n,a)},a.onerror=function(t){r.errors[n]="Couldn't load image "+n,r.toLoad--,r.loaded++,e&&e(n,"Couldn't load image "+n)},this.rawDataUris[n]&&(n=this.rawDataUris[n]),a.src=n},Vt.prototype.loadTextureAtlas=function(h,l,u){var c=this;void 0===l&&(l=null),void 0===u&&(u=null);var f=0<=h.lastIndexOf("/")?h.substring(0,h.lastIndexOf("/")):"";h=this.pathPrefix+h,this.toLoad++,this.downloadText(h,function(s){var a={count:0},o=new Array;try{new d.TextureAtlas(s,function(t){o.push(""==f?t:f+"/"+t);var e=document.createElement("img");return e.width=16,e.height=16,new d.FakeTexture(e)})}catch(t){var e=t;return c.errors[h]="Couldn't load texture atlas "+h+": "+e.message,u&&u(h,"Couldn't load texture atlas "+h+": "+e.message),c.toLoad--,void c.loaded++}for(var t=0,n=o;t<n.length;t++)!function(t){var r=!1;c.loadTexture(t,function(t,e){if(a.count++,a.count==o.length)if(r)c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++;else try{var n=new d.TextureAtlas(s,function(t){return c.get(""==f?t:f+"/"+t)});c.assets[h]=n,l&&l(h,n),c.toLoad--,c.loaded++}catch(t){var i=t;c.errors[h]="Couldn't load texture atlas "+h+": "+i.message,u&&u(h,"Couldn't load texture atlas "+h+": "+i.message),c.toLoad--,c.loaded++}},function(t,e){r=!0,a.count++,a.count==o.length&&(c.errors[h]="Couldn't load texture atlas page "+t+"} of atlas "+h,u&&u(h,"Couldn't load texture atlas page "+t+" of atlas "+h),c.toLoad--,c.loaded++)})}(n[t])},function(t,e){c.errors[h]="Couldn't load texture atlas "+h+": status "+status+", "+e,u&&u(h,"Couldn't load texture atlas "+h+": status "+status+", "+e),c.toLoad--,c.loaded++})},Vt.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},Vt.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},Vt.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},Vt.prototype.isLoadingComplete=function(){return 0==this.toLoad},Vt.prototype.getToLoad=function(){return this.toLoad},Vt.prototype.getLoaded=function(){return this.loaded},Vt.prototype.dispose=function(){this.removeAll()},Vt.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Vt.prototype.getErrors=function(){return this.errors},n=Vt,d.AssetManager=n,s=St=St||{},Ot.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},Ot.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},Ot.prototype.newBoundingBoxAttachment=function(t,e){return new s.BoundingBoxAttachment(e)},Ot.prototype.newPathAttachment=function(t,e){return new s.PathAttachment(e)},Ot.prototype.newPointAttachment=function(t,e){return new s.PointAttachment(e)},Ot.prototype.newClippingAttachment=function(t,e){return new s.ClippingAttachment(e)},r=Ot,s.AtlasAttachmentLoader=r,a=St=St||{},(o=a.BlendMode||(a.BlendMode={}))[o.Normal=0]="Normal",o[o.Additive=1]="Additive",o[o.Multiply=2]="Multiply",o[o.Screen=3]="Screen",k=St=St||{},_t.prototype.isActive=function(){return this.active},_t.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},_t.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},_t.prototype.updateWorldTransformWith=function(t,e,n,i,r,s,a){this.ax=t,this.ay=e,this.arotation=n,this.ascaleX=i,this.ascaleY=r,this.ashearX=s,this.ashearY=a,this.appliedValid=!0;var o=this.parent;if(null==o){var h=this.skeleton,l=n+90+a,u=h.scaleX,c=h.scaleY;return this.a=k.MathUtils.cosDeg(n+s)*i*u,this.b=k.MathUtils.cosDeg(l)*r*u,this.c=k.MathUtils.sinDeg(n+s)*i*c,this.d=k.MathUtils.sinDeg(l)*r*c,this.worldX=t*u+h.x,void(this.worldY=e*c+h.y)}var f=o.a,d=o.b,p=o.c,m=o.d;switch(this.worldX=f*t+d*e+o.worldX,this.worldY=p*t+m*e+o.worldY,this.data.transformMode){case k.TransformMode.Normal:var l=n+90+a,g=k.MathUtils.cosDeg(n+s)*i,v=k.MathUtils.cosDeg(l)*r,y=k.MathUtils.sinDeg(n+s)*i,x=k.MathUtils.sinDeg(l)*r;return this.a=f*g+d*y,this.b=f*v+d*x,this.c=p*g+m*y,void(this.d=p*v+m*x);case k.TransformMode.OnlyTranslation:l=n+90+a,this.a=k.MathUtils.cosDeg(n+s)*i,this.b=k.MathUtils.cosDeg(l)*r,this.c=k.MathUtils.sinDeg(n+s)*i,this.d=k.MathUtils.sinDeg(l)*r;break;case k.TransformMode.NoRotationOrReflection:var w=0,M=n+s-(w=1e-4<(T=f*f+p*p)?(T=Math.abs(f*m-d*p)/T,f/=this.skeleton.scaleX,d=(p/=this.skeleton.scaleY)*T,m=f*T,Math.atan2(p,f)*k.MathUtils.radDeg):(p=f=0,90-Math.atan2(m,d)*k.MathUtils.radDeg)),E=n+a-w+90,g=k.MathUtils.cosDeg(M)*i,v=k.MathUtils.cosDeg(E)*r,y=k.MathUtils.sinDeg(M)*i,x=k.MathUtils.sinDeg(E)*r;this.a=f*g-d*y,this.b=f*v-d*x,this.c=p*g+m*y,this.d=p*v+m*x;break;case k.TransformMode.NoScale:case k.TransformMode.NoScaleOrReflection:var T,A=k.MathUtils.cosDeg(n),b=k.MathUtils.sinDeg(n),R=(f*A+d*b)/this.skeleton.scaleX,S=(p*A+m*b)/this.skeleton.scaleY;1e-5<(T=Math.sqrt(R*R+S*S))&&(T=1/T),R*=T,S*=T,T=Math.sqrt(R*R+S*S),this.data.transformMode==k.TransformMode.NoScale&&f*m-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(T=-T);var I=Math.PI/2+Math.atan2(S,R),C=Math.cos(I)*T,P=Math.sin(I)*T,g=k.MathUtils.cosDeg(s)*i,v=k.MathUtils.cosDeg(90+a)*r,y=k.MathUtils.sinDeg(s)*i,x=k.MathUtils.sinDeg(90+a)*r;this.a=R*g+C*y,this.b=R*v+C*x,this.c=S*g+P*y,this.d=S*v+P*x}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},_t.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},_t.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*k.MathUtils.radDeg},_t.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*k.MathUtils.radDeg},_t.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},_t.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},_t.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t=this.parent;if(null==t)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*k.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*k.MathUtils.radDeg);var e=t.a,n=t.b,i=t.c,r=t.d,s=1/(e*r-n*i),a=this.worldX-t.worldX,o=this.worldY-t.worldY;this.ax=a*r*s-o*n*s,this.ay=o*e*s-a*i*s;var h,l=s*r,u=s*e,c=s*n,f=s*i,d=l*this.a-c*this.c,p=l*this.b-c*this.d,m=u*this.c-f*this.a,g=u*this.d-f*this.b;this.ashearX=0,this.ascaleX=Math.sqrt(d*d+m*m),1e-4<this.ascaleX?(h=d*g-p*m,this.ascaleY=h/this.ascaleX,this.ashearY=Math.atan2(d*p+m*g,h)*k.MathUtils.radDeg,this.arotation=Math.atan2(m,d)*k.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*k.MathUtils.radDeg)},_t.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*n*s,t.y=o*e*s-a*i*s,t},_t.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},_t.prototype.worldToLocalRotation=function(t){var e=k.MathUtils.sinDeg(t),n=k.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*k.MathUtils.radDeg+this.rotation-this.shearX},_t.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=k.MathUtils.sinDeg(t),n=k.MathUtils.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*k.MathUtils.radDeg},_t.prototype.rotateWorld=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=k.MathUtils.cosDeg(t),a=k.MathUtils.sinDeg(t);this.a=s*e-a*i,this.b=s*n-a*r,this.c=a*e+s*i,this.d=a*n+s*r,this.appliedValid=!1},h=_t,k.Bone=h,(l=St=St||{}).BoneData=Lt,(c=u=l.TransformMode||(l.TransformMode={}))[c.Normal=0]="Normal",c[c.OnlyTranslation=1]="OnlyTranslation",c[c.NoRotationOrReflection=2]="NoRotationOrReflection",c[c.NoScale=3]="NoScale",c[c.NoScaleOrReflection=4]="NoScaleOrReflection",(St||(St={})).ConstraintData=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n},(St||(St={})).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(St||(St={})).EventData=function(t){this.name=t},ht=St=St||{},Dt.prototype.isActive=function(){return this.active},Dt.prototype.apply=function(){this.update()},Dt.prototype.update=function(){var t=this.target,e=this.bones;switch(e.length){case 1:this.apply1(e[0],t.worldX,t.worldY,this.compress,this.stretch,this.data.uniform,this.mix);break;case 2:this.apply2(e[0],e[1],t.worldX,t.worldY,this.bendDirection,this.stretch,this.softness,this.mix)}},Dt.prototype.apply1=function(t,e,n,i,r,s,a){t.appliedValid||t.updateAppliedTransform();var o=t.parent,h=o.a,l=o.b,u=o.c,c=o.d,f=-t.ashearX-t.arotation,d=0,p=0;switch(t.data.transformMode){case ht.TransformMode.OnlyTranslation:d=e-t.worldX,p=n-t.worldY;break;case ht.TransformMode.NoRotationOrReflection:var m=Math.abs(h*c-l*u)/(h*h+u*u),g=h/t.skeleton.scaleX,v=u/t.skeleton.scaleY,l=-v*m*t.skeleton.scaleX,c=g*m*t.skeleton.scaleY;f+=Math.atan2(v,g)*ht.MathUtils.radDeg;default:var y=e-o.worldX,x=n-o.worldY,w=h*c-l*u,d=(y*c-x*l)/w-t.ax,p=(x*h-y*u)/w-t.ay}f+=Math.atan2(p,d)*ht.MathUtils.radDeg,t.ascaleX<0&&(f+=180),180<f?f-=360:f<-180&&(f+=360);var M=t.ascaleX,E=t.ascaleY;if(i||r){switch(t.data.transformMode){case ht.TransformMode.NoScale:case ht.TransformMode.NoScaleOrReflection:d=e-t.worldX,p=n-t.worldY}var T=t.data.length*M,A=Math.sqrt(d*d+p*p);(i&&A<T||r&&T<A&&1e-4<T)&&(M*=m=(A/T-1)*a+1,s&&(E*=m))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,M,E,t.ashearX,t.ashearY)},Dt.prototype.apply2=function(t,e,n,i,r,s,a,o){if(0!=o){t.appliedValid||t.updateAppliedTransform(),e.appliedValid||e.updateAppliedTransform();var h=t.ax,l=t.ay,u=t.ascaleX,c=u,f=t.ascaleY,d=e.ascaleX,p=0,m=0,g=0,g=u<0?(u=-u,p=180,-1):(p=0,1);f<0&&(f=-f,g=-g),m=d<0?(d=-d,180):0;var v=e.ax,y=0,x=0,w=0,M=t.a,E=t.b,T=t.c,A=t.d,b=Math.abs(u-f)<=1e-4,w=b?(x=M*v+E*(y=e.ay)+t.worldX,T*v+A*y+t.worldY):(y=0,x=M*v+t.worldX,T*v+t.worldY),R=t.parent,M=R.a,E=R.b;T=R.c;var S,I=1/(M*(A=R.d)-E*T),C=x-R.worldX,P=w-R.worldY,k=(C*A-P*E)*I-h,F=(P*M-C*T)*I-l,V=Math.sqrt(k*k+F*F),O=e.data.length*d;if(V<1e-4)return this.apply1(t,n,i,!1,s,!1,o),void e.updateWorldTransformWith(v,y,0,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY);var _,L,D,N=((C=n-R.worldX)*A-(P=i-R.worldY)*E)*I-h,Y=(P*M-C*T)*I-l,X=N*N+Y*Y;0!=a&&(a*=u*(d+1)/2,0<(L=(_=Math.sqrt(X))-V-O*u+a)&&(X=(N-=(D=(L-a*(1-(D=Math.min(1,L/(2*a))-1)*D))/_)*N)*N+(Y-=D*Y)*Y));t:if(b){var U=(X-V*V-(O*=u)*O)/(2*V*O);U<-1?U=-1:1<U&&(U=1,s&&(c*=(Math.sqrt(X)/(V+O)-1)*o+1)),S=Math.acos(U)*r,M=V+O*U,E=O*Math.sin(S),st=Math.atan2(Y*M-N*E,N*M+Y*E)}else{var z=(M=u*O)*M,B=(E=f*O)*E,q=Math.atan2(Y,N),W=-2*B*V,G=B-z;if(0<=(A=W*W-4*G*(T=B*V*V+z*X-z*B))){var H=Math.sqrt(A);W<0&&(H=-H);var j=(H=-(W+H)/2)/G,Z=T/H,K=Math.abs(j)<Math.abs(Z)?j:Z;if(K*K<=X){P=Math.sqrt(X-K*K)*r,st=q-Math.atan2(P,K),S=Math.atan2(P/f,(K-V)/u);break t}}var Q=ht.MathUtils.PI,J=V-M,$=J*J,tt=0,et=0,nt=V+M,it=nt*nt,rt=0;-1<=(T=-M*V/(z-B))&&T<=1&&(T=Math.acos(T),(A=(C=M*Math.cos(T)+V)*C+(P=E*Math.sin(T))*P)<$&&(Q=T,$=A,J=C,tt=P),it<A&&(et=T,it=A,nt=C,rt=P)),S=X<=($+it)/2?(st=q-Math.atan2(tt*r,J),Q*r):(st=q-Math.atan2(rt*r,nt),et*r)}var st,at=Math.atan2(y,v)*g,ot=t.arotation;180<(st=(st-at)*ht.MathUtils.radDeg+p-ot)?st-=360:st<-180&&(st+=360),t.updateWorldTransformWith(h,l,ot+st*o,c,t.ascaleY,0,0),ot=e.arotation,180<(S=((S+at)*ht.MathUtils.radDeg-e.ashearX)*g+m-ot)?S-=360:S<-180&&(S+=360),e.updateWorldTransformWith(v,y,ot+S*o,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}else e.updateWorldTransform()},f=Dt,ht.IkConstraint=f,p=St=St||{},m=p.ConstraintData,kt(Nt,m),g=Nt,p.IkConstraintData=g,j=St=St||{},Yt.prototype.isActive=function(){return this.active},Yt.prototype.apply=function(){this.update()},Yt.prototype.update=function(){var t=this.target.getAttachment();if(t instanceof j.PathAttachment){var e=this.rotateMix,n=this.translateMix,i=0<e;if(0<n||i){var r=this.data,s=r.spacingMode==j.SpacingMode.Percent,a=r.rotateMode,o=a==j.RotateMode.Tangent,h=a==j.RotateMode.ChainScale,l=this.bones.length,u=o?l:l+1,c=this.bones,f=j.Utils.setArraySize(this.spaces,u),d=null,p=this.spacing;if(h||!s){h&&(d=j.Utils.setArraySize(this.lengths,l));for(var m=r.spacingMode==j.SpacingMode.Length,g=0,v=u-1;g<v;){var y,x,w=(R=c[g]).data.length;w<Yt.epsilon?(h&&(d[g]=0),f[++g]=0):s?(h&&(I=w*R.a,C=w*R.c,y=Math.sqrt(I*I+C*C),d[g]=y),f[++g]=p):(I=w*R.a,C=w*R.c,x=Math.sqrt(I*I+C*C),h&&(d[g]=x),f[++g]=(m?w+p:p)*x/w)}}else for(g=1;g<u;g++)f[g]=p;var M=this.computeWorldPositions(t,u,o,r.positionMode==j.PositionMode.Percent,s),E=M[0],T=M[1],A=r.offsetRotation,b=!1;0==A?b=a==j.RotateMode.Chain:(b=!1,A*=0<(S=this.target.bone).a*S.d-S.b*S.c?j.MathUtils.degRad:-j.MathUtils.degRad);for(var R,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,k,F,V,O,_,L,D,N,Y,X=(I=M[S])-E,U=(C=M[S+1])-T;!h||0!=(P=d[g])&&(k=(Math.sqrt(X*X+U*U)/P-1)*e+1,R.a*=k,R.c*=k),E=I,T=C,i&&(F=R.a,V=R.b,O=R.c,_=R.d,D=L=Y=0,Y=o?M[S-1]:0==f[g+1]?M[S+2]:Math.atan2(U,X),Y-=Math.atan2(O,F),b?(L=Math.cos(Y),D=Math.sin(Y),E+=((N=R.data.length)*(L*F-D*O)-X)*e,T+=(N*(D*F+L*O)-U)*e):Y+=A,Y>j.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,L=Math.cos(Y),D=Math.sin(Y),R.a=L*F-D*O,R.b=L*V-D*_,R.c=D*F+L*O,R.d=D*V+L*_),R.appliedValid=!1}}}},Yt.prototype.computeWorldPositions=function(t,e,n,i,r){var s=this.target,a=this.position,o=this.spaces,h=j.Utils.setArraySize(this.positions,3*e+2),l=null,u=t.closed,c=t.worldVerticesLength,f=c/6,d=Yt.NONE;if(!t.constantSpeed){var p=t.lengths,m=p[f-=u?1:2];if(i&&(a*=m),r)for(var g=1;g<e;g++)o[g]*=m;l=j.Utils.setArraySize(this.world,8);for(var g=0,v=0,y=0;g<e;g++,v+=3){var x=a+=B=o[g];if(u)(x%=m)<0&&(x+=m),y=0;else{if(x<0){d!=Yt.BEFORE&&(d=Yt.BEFORE,t.computeWorldVertices(s,2,4,l,0,2)),this.addBeforePosition(x,l,0,h,v);continue}if(m<x){d!=Yt.AFTER&&(d=Yt.AFTER,t.computeWorldVertices(s,c-6,4,l,0,2)),this.addAfterPosition(x-m,l,0,h,v);continue}}for(;;y++){var w=p[y];if(!(w<x)){0==y?x/=w:x=(x-(G=p[y-1]))/(w-G);break}}y!=d&&(d=y,u&&y==f?(t.computeWorldVertices(s,c-4,4,l,0,2),t.computeWorldVertices(s,0,4,l,4,2)):t.computeWorldVertices(s,6*y+2,8,l,0,2)),this.addCurvePosition(x,l[0],l[1],l[2],l[3],l[4],l[5],l[6],l[7],h,v,n||0<g&&0==B)}return h}u?(c+=2,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c-4,l,0,2),t.computeWorldVertices(s,0,2,l,c-4,2),l[c-2]=l[0],l[c-1]=l[1]):(f--,c-=4,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c,l,0,2));for(var M=j.Utils.setArraySize(this.curves,f),E=0,T=l[0],A=l[1],b=0,R=0,S=0,I=0,C=0,P=0,k=0,F=0,V=0,O=0,_=0,L=0,D=0,N=0,g=0,Y=2;g<f;g++,Y+=6)b=l[Y],R=l[Y+1],S=l[Y+2],I=l[Y+3],_=2*(k=.1875*(T-2*b+S))+(V=.09375*(3*(b-S)-T+(C=l[Y+4]))),L=2*(F=.1875*(A-2*R+I))+(O=.09375*(3*(R-I)-A+(P=l[Y+5]))),D=.75*(b-T)+k+.16666667*V,N=.75*(R-A)+F+.16666667*O,E+=Math.sqrt(D*D+N*N),D+=_,N+=L,_+=V,L+=O,E+=Math.sqrt(D*D+N*N),D+=_,N+=L,E+=Math.sqrt(D*D+N*N),D+=_+V,N+=L+O,E+=Math.sqrt(D*D+N*N),M[g]=E,T=C,A=P;if(a*=i?E:E/t.lengths[f-1],r)for(g=1;g<e;g++)o[g]*=E;for(var X=this.segments,U=0,g=0,v=0,y=0,z=0;g<e;g++,v+=3){var B,x=a+=B=o[g];if(u)(x%=E)<0&&(x+=E),y=0;else{if(x<0){this.addBeforePosition(x,l,0,h,v);continue}if(E<x){this.addAfterPosition(x-E,l,c-4,h,v);continue}}for(;;y++){var q=M[y];if(!(q<x)){0==y?x/=q:x=(x-(G=M[y-1]))/(q-G);break}}if(y!=d){var W=6*(d=y),T=l[W],A=l[W+1],b=l[W+2],R=l[W+3],S=l[W+4],I=l[W+5],_=2*(k=.03*(T-2*b+S))+(V=.006*(3*(b-S)-T+(C=l[W+6]))),L=2*(F=.03*(A-2*R+I))+(O=.006*(3*(R-I)-A+(P=l[W+7]))),D=.3*(b-T)+k+.16666667*V,N=.3*(R-A)+F+.16666667*O,U=Math.sqrt(D*D+N*N);for(X[0]=U,W=1;W<8;W++)D+=_,N+=L,_+=V,L+=O,U+=Math.sqrt(D*D+N*N),X[W]=U;D+=_,N+=L,U+=Math.sqrt(D*D+N*N),X[8]=U,D+=_+V,N+=L+O,U+=Math.sqrt(D*D+N*N),X[9]=U,z=0}for(x*=U;;z++){var G,H=X[z];if(!(H<x)){0==z?x/=H:x=z+(x-(G=X[z-1]))/(H-G);break}}this.addCurvePosition(.1*x,T,A,b,R,S,I,C,P,h,v,n||0<g&&0==B)}return h},Yt.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],a=e[n+1],o=e[n+2]-s,h=e[n+3]-a,l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},Yt.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],a=e[n+3],o=s-e[n],h=a-e[n+1],l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},Yt.prototype.addCurvePosition=function(t,e,n,i,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var f=t*t,d=f*t,p=1-t,m=p*p,g=m*p,v=p*t,y=3*v,x=p*y,w=y*t,M=e*g+i*x+s*w+o*d,E=n*g+r*x+a*w+h*d;l[u]=M,l[u+1]=E,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(E-(n*m+r*v*2+a*f),M-(e*m+i*v*2+s*f)))},Yt.NONE=-1,Yt.BEFORE=-2,Yt.AFTER=-3,Yt.epsilon=1e-5,v=Yt,j.PathConstraint=v,y=St=St||{},x=y.ConstraintData,kt(Xt,x),T=Xt,y.PathConstraintData=T,(w=y.PositionMode||(y.PositionMode={}))[w.Fixed=0]="Fixed",w[w.Percent=1]="Percent",(M=y.SpacingMode||(y.SpacingMode={}))[M.Length=0]="Length",M[M.Fixed=1]="Fixed",M[M.Percent=2]="Percent",(E=y.RotateMode||(y.RotateMode={}))[E.Tangent=0]="Tangent",E[E.Chain=1]="Chain",E[E.ChainScale=2]="ChainScale",A=St=St||{},Ut.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},b=Ut,zt.prototype.queueAsset=function(t,e,n){var i=this.clientAssets[t];return null==i&&(i=new b(t),this.clientAssets[t]=i),null!==e&&(i.textureLoader=e),i.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},zt.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())},zt.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())},zt.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)},zt.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},zt.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}}},zt.prototype.isLoadingComplete=function(t){var e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())},zt.prototype.dispose=function(){},zt.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},zt.prototype.getErrors=function(){return this.errors},R=zt,A.SharedAssetManager=R,S=St=St||{},Bt.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var i=this.skin.bones,e=0,n=this.skin.bones.length;e<n;e++)for(var r=this.bones[i[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,a=this.transformConstraints,o=this.pathConstraints,h=s.length,l=a.length,u=o.length,c=h+l+u;t:for(e=0;e<c;e++){for(var f=0;f<h;f++)if((d=s[f]).data.order==e){this.sortIkConstraint(d);continue t}for(f=0;f<l;f++)if((d=a[f]).data.order==e){this.sortTransformConstraint(d);continue t}for(var d,f=0;f<u;f++)if((d=o[f]).data.order==e){this.sortPathConstraint(d);continue t}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},Bt.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)},Bt.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&S.Utils.contains(this.skin.constraints,t.data,!0)),t.active){var e=t.target,n=e.data.index,i=e.bone;null!=this.skin&&this.sortPathConstraintAttachment(this.skin,n,i),null!=this.data.defaultSkin&&this.data.defaultSkin!=this.skin&&this.sortPathConstraintAttachment(this.data.defaultSkin,n,i);for(var r=0,s=this.data.skins.length;r<s;r++)this.sortPathConstraintAttachment(this.data.skins[r],n,i);var a=e.getAttachment();a instanceof S.PathAttachment&&this.sortPathConstraintAttachmentWith(a,i);for(var o=t.bones,h=o.length,r=0;r<h;r++)this.sortBone(o[r]);for(this._updateCache.push(t),r=0;r<h;r++)this.sortReset(o[r].children);for(r=0;r<h;r++)o[r].sorted=!0}},Bt.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}},Bt.prototype.sortPathConstraintAttachment=function(t,e,n){var i=t.attachments[e];if(i)for(var r in i)this.sortPathConstraintAttachmentWith(i[r],n)},Bt.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof S.PathAttachment){var n=t.bones;if(null==n)this.sortBone(e);else for(var i=this.bones,r=0;r<n.length;)for(var s=n[r++],a=r+s;r<a;r++){var o=n[r];this.sortBone(i[o])}}},Bt.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},Bt.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)}},Bt.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()},Bt.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},Bt.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;e<n;e++)(o=i[e]).mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch;for(var r=this.transformConstraints,e=0,n=r.length;e<n;e++){var s=(o=r[e]).data;o.rotateMix=s.rotateMix,o.translateMix=s.translateMix,o.scaleMix=s.scaleMix,o.shearMix=s.shearMix}for(var a=this.pathConstraints,e=0,n=a.length;e<n;e++){var o,s=(o=a[e]).data;o.position=s.position,o.spacing=s.spacing,o.rotateMix=s.rotateMix,o.translateMix=s.translateMix}},Bt.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()},Bt.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},Bt.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},Bt.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},Bt.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},Bt.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},Bt.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},Bt.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;n<i;n++){var r,s=e[n],a=s.data.attachmentName;null==a||null!=(r=t.getAttachment(n,a))&&s.setAttachment(r)}this.skin=t,this.updateCache()}},Bt.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},Bt.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},Bt.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var n=this.slots,i=0,r=n.length;i<r;i++){var s=n[i];if(s.data.name==t){var a=null;if(null!=e&&null==(a=this.getAttachment(i,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(a)}}throw new Error("Slot not found: "+t)},Bt.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},Bt.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},Bt.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},Bt.prototype.getBounds=function(t,e,n){if(void 0===n&&(n=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var i=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=i.length;h<l;h++){var u=i[h];if(u.bone.active){var c,f=0,d=null,p=u.getAttachment();if(p instanceof S.RegionAttachment?(f=8,d=S.Utils.setArraySize(n,f,0),p.computeWorldVertices(u.bone,d,0,2)):p instanceof S.MeshAttachment&&(f=(c=p).worldVerticesLength,d=S.Utils.setArraySize(n,f,0),c.computeWorldVertices(u,0,f,d,0,2)),null!=d)for(var m=0,g=d.length;m<g;m+=2)var v=d[m],y=d[m+1],r=Math.min(r,v),s=Math.min(s,y),a=Math.max(a,v),o=Math.max(o,y)}}t.set(r,s),e.set(a-r,o-s)},Bt.prototype.update=function(t){this.time+=t},I=Bt,S.Skeleton=I,function(q){var t=(W.prototype.readSkeletonData=function(t){var e=this.scale,n=new q.SkeletonData;n.name="";var i=new x(t);if(n.hash=i.readString(),n.version=i.readString(),"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=i.readFloat(),n.y=i.readFloat(),n.width=i.readFloat(),n.height=i.readFloat();var r=i.readBoolean();r&&(n.fps=i.readFloat(),n.imagesPath=i.readString(),n.audioPath=i.readString());for(var s=0,s=i.readInt(!0),a=0;a<s;a++)i.strings.push(i.readString());for(s=i.readInt(!0),a=0;a<s;a++){var o=i.readString(),h=0==a?null:n.bones[i.readInt(!0)];(c=new q.BoneData(a,o,h)).rotation=i.readFloat(),c.x=i.readFloat()*e,c.y=i.readFloat()*e,c.scaleX=i.readFloat(),c.scaleY=i.readFloat(),c.shearX=i.readFloat(),c.shearY=i.readFloat(),c.length=i.readFloat()*e,c.transformMode=W.TransformModeValues[i.readInt(!0)],c.skinRequired=i.readBoolean(),r&&q.Color.rgba8888ToColor(c.color,i.readInt32()),n.bones.push(c)}for(s=i.readInt(!0),a=0;a<s;a++){var l=i.readString(),u=n.bones[i.readInt(!0)],c=new q.SlotData(a,l,u);q.Color.rgba8888ToColor(c.color,i.readInt32());var f=i.readInt32();-1!=f&&q.Color.rgb888ToColor(c.darkColor=new q.Color,f),c.attachmentName=i.readStringRef(),c.blendMode=W.BlendModeValues[i.readInt(!0)],n.slots.push(c)}s=i.readInt(!0);for(var a=0,d=void 0;a<s;a++){(c=new q.IkConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0);for(var p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.mix=i.readFloat(),c.softness=i.readFloat()*e,c.bendDirection=i.readByte(),c.compress=i.readBoolean(),c.stretch=i.readBoolean(),c.uniform=i.readBoolean(),n.ikConstraints.push(c)}for(s=i.readInt(!0),d=void(a=0);a<s;a++){for((c=new q.TransformConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0),p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.local=i.readBoolean(),c.relative=i.readBoolean(),c.offsetRotation=i.readFloat(),c.offsetX=i.readFloat()*e,c.offsetY=i.readFloat()*e,c.offsetScaleX=i.readFloat(),c.offsetScaleY=i.readFloat(),c.offsetShearY=i.readFloat(),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),c.scaleMix=i.readFloat(),c.shearMix=i.readFloat(),n.transformConstraints.push(c)}for(s=i.readInt(!0),d=void(a=0);a<s;a++){for((c=new q.PathConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0),p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.slots[i.readInt(!0)],c.positionMode=W.PositionModeValues[i.readInt(!0)],c.spacingMode=W.SpacingModeValues[i.readInt(!0)],c.rotateMode=W.RotateModeValues[i.readInt(!0)],c.offsetRotation=i.readFloat(),c.position=i.readFloat(),c.positionMode==q.PositionMode.Fixed&&(c.position*=e),c.spacing=i.readFloat(),c.spacingMode!=q.SpacingMode.Length&&c.spacingMode!=q.SpacingMode.Fixed||(c.spacing*=e),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),n.pathConstraints.push(c)}var m=this.readSkin(i,n,!0,r);for(null!=m&&(n.defaultSkin=m,n.skins.push(m)),a=n.skins.length,q.Utils.setArraySize(n.skins,s=a+i.readInt(!0));a<s;a++)n.skins[a]=this.readSkin(i,n,!1,r);for(s=this.linkedMeshes.length,a=0;a<s;a++){var g=this.linkedMeshes[a],v=null==g.skin?n.defaultSkin:n.findSkin(g.skin);if(null==v)throw new Error("Skin not found: "+g.skin);var y=v.getAttachment(g.slotIndex,g.parent);if(null==y)throw new Error("Parent mesh not found: "+g.parent);g.mesh.deformAttachment=g.inheritDeform?y:g.mesh,g.mesh.setParentMesh(y),g.mesh.updateUVs()}for(this.linkedMeshes.length=0,s=i.readInt(!0),a=0;a<s;a++)(c=new q.EventData(i.readStringRef())).intValue=i.readInt(!1),c.floatValue=i.readFloat(),c.stringValue=i.readString(),c.audioPath=i.readString(),null!=c.audioPath&&(c.volume=i.readFloat(),c.balance=i.readFloat()),n.events.push(c);for(s=i.readInt(!0),a=0;a<s;a++)n.animations.push(this.readAnimation(i,i.readString(),n));return n},W.prototype.readSkin=function(t,e,n,i){var r=null,s=0;if(n){if(0==(s=t.readInt(!0)))return null;r=new q.Skin("default")}else{(r=new q.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var a=0,o=r.bones.length;a<o;a++)r.bones[a]=e.bones[t.readInt(!0)];for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);s=t.readInt(!0)}for(a=0;a<s;a++)for(var h=t.readInt(!0),l=0,u=t.readInt(!0);l<u;l++){var c=t.readStringRef(),f=this.readAttachment(t,e,r,h,c,i);null!=f&&r.setAttachment(h,c,f)}return r},W.prototype.readAttachment=function(t,e,n,i,r,s){var a=this.scale,o=t.readStringRef();null==o&&(o=r);var h=t.readByte();switch(W.AttachmentTypeValues[h]){case q.AttachmentType.Region:var l=t.readStringRef(),u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),d=t.readFloat(),p=t.readFloat(),m=t.readFloat(),g=t.readFloat(),v=t.readInt32();null==l&&(l=o);var y=this.attachmentLoader.newRegionAttachment(n,o,l);return null==y?null:(y.path=l,y.x=c*a,y.y=f*a,y.scaleX=d,y.scaleY=p,y.rotation=u,y.width=m*a,y.height=g*a,q.Color.rgba8888ToColor(y.color,v),y.updateOffset(),y);case q.AttachmentType.BoundingBox:var x=t.readInt(!0),w=this.readVertices(t,x),v=s?t.readInt32():0,M=this.attachmentLoader.newBoundingBoxAttachment(n,o);return null==M?null:(M.worldVerticesLength=x<<1,M.vertices=w.vertices,M.bones=w.bones,s&&q.Color.rgba8888ToColor(M.color,v),M);case q.AttachmentType.Mesh:var l=t.readStringRef(),v=t.readInt32(),x=t.readInt(!0),E=this.readFloatArray(t,x<<1,1),T=this.readShortArray(t),w=this.readVertices(t,x),A=t.readInt(!0),b=null,m=0,g=0;return s&&(b=this.readShortArray(t),m=t.readFloat(),g=t.readFloat()),null==l&&(l=o),null==(R=this.attachmentLoader.newMeshAttachment(n,o,l))?null:(R.path=l,q.Color.rgba8888ToColor(R.color,v),R.bones=w.bones,R.vertices=w.vertices,R.worldVerticesLength=x<<1,R.triangles=T,R.regionUVs=E,R.updateUVs(),R.hullLength=A<<1,s&&(R.edges=b,R.width=m*a,R.height=g*a),R);case q.AttachmentType.LinkedMesh:var R,l=t.readStringRef(),v=t.readInt32(),S=t.readStringRef(),I=t.readStringRef(),C=t.readBoolean(),m=0,g=0;return s&&(m=t.readFloat(),g=t.readFloat()),null==l&&(l=o),null==(R=this.attachmentLoader.newMeshAttachment(n,o,l))?null:(R.path=l,q.Color.rgba8888ToColor(R.color,v),s&&(R.width=m*a,R.height=g*a),this.linkedMeshes.push(new N(R,S,i,I,C)),R);case q.AttachmentType.Path:for(var P=t.readBoolean(),k=t.readBoolean(),x=t.readInt(!0),w=this.readVertices(t,x),F=q.Utils.newArray(x/3,0),V=0,O=F.length;V<O;V++)F[V]=t.readFloat()*a;return v=s?t.readInt32():0,null==(l=this.attachmentLoader.newPathAttachment(n,o))?null:(l.closed=P,l.constantSpeed=k,l.worldVerticesLength=x<<1,l.vertices=w.vertices,l.bones=w.bones,l.lengths=F,s&&q.Color.rgba8888ToColor(l.color,v),l);case q.AttachmentType.Point:var u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),v=s?t.readInt32():0,_=this.attachmentLoader.newPointAttachment(n,o);return null==_?null:(_.x=c*a,_.y=f*a,_.rotation=u,s&&q.Color.rgba8888ToColor(_.color,v),_);case q.AttachmentType.Clipping:var L=t.readInt(!0),x=t.readInt(!0),w=this.readVertices(t,x),v=s?t.readInt32():0,D=this.attachmentLoader.newClippingAttachment(n,o);return null==D?null:(D.endSlot=e.slots[L],D.worldVerticesLength=x<<1,D.vertices=w.vertices,D.bones=w.bones,s&&q.Color.rgba8888ToColor(D.color,v),D)}return null},W.prototype.readVertices=function(t,e){var n=e<<1,i=new u,r=this.scale;if(!t.readBoolean())return i.vertices=this.readFloatArray(t,n,r),i;for(var s=new Array,a=new Array,o=0;o<e;o++){var h=t.readInt(!0);a.push(h);for(var l=0;l<h;l++)a.push(t.readInt(!0)),s.push(t.readFloat()*r),s.push(t.readFloat()*r),s.push(t.readFloat())}return i.vertices=q.Utils.toFloatArray(s),i.bones=a,i},W.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},W.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},W.prototype.readAnimation=function(t,e,n){for(var i=new Array,r=this.scale,s=0,a=new q.Color,o=new q.Color,h=0,l=t.readInt(!0);h<l;h++)for(var u=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++){var d=t.readByte(),p=t.readInt(!0);switch(d){case W.SLOT_ATTACHMENT:(y=new q.AttachmentTimeline(p)).slotIndex=u;for(var m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readStringRef());i.push(y),s=Math.max(s,y.frames[p-1]);break;case W.SLOT_COLOR:for((y=new q.ColorTimeline(p)).slotIndex=u,m=0;m<p;m++){var g=t.readFloat();q.Color.rgba8888ToColor(a,t.readInt32()),y.setFrame(m,g,a.r,a.g,a.b,a.a),m<p-1&&this.readCurve(t,m,y)}i.push(y),s=Math.max(s,y.frames[(p-1)*q.ColorTimeline.ENTRIES]);break;case W.SLOT_TWO_COLOR:for((y=new q.TwoColorTimeline(p)).slotIndex=u,m=0;m<p;m++)g=t.readFloat(),q.Color.rgba8888ToColor(a,t.readInt32()),q.Color.rgb888ToColor(o,t.readInt32()),y.setFrame(m,g,a.r,a.g,a.b,a.a,o.r,o.g,o.b),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.TwoColorTimeline.ENTRIES])}}for(h=0,l=t.readInt(!0);h<l;h++)for(var v=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case W.BONE_ROTATE:for((y=new q.RotateTimeline(p)).boneIndex=v,m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readFloat()),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.RotateTimeline.ENTRIES]);break;case W.BONE_TRANSLATE:case W.BONE_SCALE:case W.BONE_SHEAR:var y=void 0,x=1;for(d==W.BONE_SCALE?y=new q.ScaleTimeline(p):d==W.BONE_SHEAR?y=new q.ShearTimeline(p):(y=new q.TranslateTimeline(p),x=r),y.boneIndex=v,m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readFloat()*x,t.readFloat()*x),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.TranslateTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){var w=t.readInt(!0),p=t.readInt(!0);for((y=new q.IkConstraintTimeline(p)).ikConstraintIndex=w,m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readFloat(),t.readFloat()*r,t.readByte(),t.readBoolean(),t.readBoolean()),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.IkConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){for(w=t.readInt(!0),p=t.readInt(!0),(y=new q.TransformConstraintTimeline(p)).transformConstraintIndex=w,m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat()),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.TransformConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var w=t.readInt(!0),M=n.pathConstraints[w],c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case W.PATH_POSITION:case W.PATH_SPACING:var y=void 0,x=1;for(d==W.PATH_SPACING?(y=new q.PathConstraintSpacingTimeline(p),M.spacingMode!=q.SpacingMode.Length&&M.spacingMode!=q.SpacingMode.Fixed||(x=r)):(y=new q.PathConstraintPositionTimeline(p),M.positionMode==q.PositionMode.Fixed&&(x=r)),y.pathConstraintIndex=w,m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readFloat()*x),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.PathConstraintPositionTimeline.ENTRIES]);break;case W.PATH_MIX:for((y=new q.PathConstraintMixTimeline(p)).pathConstraintIndex=w,m=0;m<p;m++)y.setFrame(m,t.readFloat(),t.readFloat(),t.readFloat()),m<p-1&&this.readCurve(t,m,y);i.push(y),s=Math.max(s,y.frames[(p-1)*q.PathConstraintMixTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var E=n.skins[t.readInt(!0)],c=0,f=t.readInt(!0);c<f;c++)for(var u=t.readInt(!0),T=0,A=t.readInt(!0);T<A;T++){var b=E.getAttachment(u,t.readStringRef()),R=null!=b.bones,S=b.vertices,I=R?S.length/3*2:S.length,p=t.readInt(!0);for((y=new q.DeformTimeline(p)).slotIndex=u,y.attachment=b,m=0;m<p;m++){var g=t.readFloat(),C=void 0,P=t.readInt(!0);if(0==P)C=R?q.Utils.newFloatArray(I):S;else{C=q.Utils.newFloatArray(I);var k=t.readInt(!0);if(P+=k,1==r)for(var F=k;F<P;F++)C[F]=t.readFloat();else for(F=k;F<P;F++)C[F]=t.readFloat()*r;if(!R)for(var F=0,V=C.length;F<V;F++)C[F]+=S[F]}y.setFrame(m,g,C),m<p-1&&this.readCurve(t,m,y)}i.push(y),s=Math.max(s,y.frames[p-1])}var O=t.readInt(!0);if(0<O){for(var y=new q.DrawOrderTimeline(O),_=n.slots.length,h=0;h<O;h++){for(var g=t.readFloat(),L=t.readInt(!0),D=q.Utils.newArray(_,0),c=_-1;0<=c;c--)D[c]=-1;for(var N=q.Utils.newArray(_-L,0),Y=0,X=0,c=0;c<L;c++){for(u=t.readInt(!0);Y!=u;)N[X++]=Y++;D[Y+t.readInt(!0)]=Y++}for(;Y<_;)N[X++]=Y++;for(c=_-1;0<=c;c--)-1==D[c]&&(D[c]=N[--X]);y.setFrame(h,g,D)}i.push(y),s=Math.max(s,y.frames[O-1])}var U=t.readInt(!0);if(0<U){for(y=new q.EventTimeline(U),h=0;h<U;h++){var g=t.readFloat(),z=n.events[t.readInt(!0)],B=new q.Event(g,z);B.intValue=t.readInt(!1),B.floatValue=t.readFloat(),B.stringValue=t.readBoolean()?t.readString():z.stringValue,null!=B.data.audioPath&&(B.volume=t.readFloat(),B.balance=t.readFloat()),y.setFrame(h,B)}i.push(y),s=Math.max(s,y.frames[U-1])}return new q.Animation(e,i,s)},W.prototype.readCurve=function(t,e,n){switch(t.readByte()){case W.CURVE_STEPPED:n.setStepped(e);break;case W.CURVE_BEZIER:this.setCurve(n,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},W.prototype.setCurve=function(t,e,n,i,r,s){t.setCurve(e,n,i,r,s)},W.AttachmentTypeValues=[0,1,2,3,4,5,6],W.TransformModeValues=[q.TransformMode.Normal,q.TransformMode.OnlyTranslation,q.TransformMode.NoRotationOrReflection,q.TransformMode.NoScale,q.TransformMode.NoScaleOrReflection],W.PositionModeValues=[q.PositionMode.Fixed,q.PositionMode.Percent],W.SpacingModeValues=[q.SpacingMode.Length,q.SpacingMode.Fixed,q.SpacingMode.Percent],W.RotateModeValues=[q.RotateMode.Tangent,q.RotateMode.Chain,q.RotateMode.ChainScale],W.BlendModeValues=[q.BlendMode.Normal,q.BlendMode.Additive,q.BlendMode.Multiply,q.BlendMode.Screen],W.BONE_ROTATE=0,W.BONE_TRANSLATE=1,W.BONE_SCALE=2,W.BONE_SHEAR=3,W.SLOT_ATTACHMENT=0,W.SLOT_COLOR=1,W.SLOT_TWO_COLOR=2,W.PATH_POSITION=0,W.PATH_SPACING=1,W.PATH_MIX=2,W.CURVE_LINEAR=0,W.CURVE_STEPPED=1,W.CURVE_BEZIER=2,W);function W(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}q.SkeletonBinary=t;var x=(e.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},e.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},e.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},e.prototype.readInt=function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&this.readByte())<<28)))),t?n:n>>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n<t;){var i=this.readByte();switch(i>>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var N=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r},u=function(t,e){void 0===t&&(t=null),void 0===e&&(e=null),this.bones=t,this.vertices=e}}(St=St||{}),C=St=St||{},qt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;n.length=0,r.freeAll(i);for(var o=i.length=0;o<a;o++){var h,l,u,c=s[o];c.bone.active&&(h=c.getAttachment())instanceof C.BoundingBoxAttachment&&(l=h,n.push(l),(u=r.obtain()).length!=l.worldVerticesLength&&(u=C.Utils.newFloatArray(l.worldVerticesLength)),i.push(u),l.computeWorldVertices(c,0,l.worldVerticesLength,u,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},qt.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,a=r.length;s<a;s++)for(var o=r[s],h=o,l=0,u=o.length;l<u;l+=2)var c=h[l],f=h[l+1],t=Math.min(t,c),e=Math.min(e,f),n=Math.max(n,c),i=Math.max(i,f);this.minX=t,this.minY=e,this.maxX=n,this.maxY=i},qt.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},qt.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||a<=t&&a<=n||o<=e&&o<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(s<l&&l<o)return!0;if(s<(l=h*(a-t)+e)&&l<o)return!0;var u=(s-e)/h+t;return r<u&&u<a||r<(u=(o-e)/h+t)&&u<a},qt.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},qt.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},qt.prototype.containsPointPolygon=function(t,e,n){for(var i=t,r=t.length,s=r-2,a=!1,o=0;o<r;o+=2){var h,l=i[o+1],u=i[s+1];!(l<n&&n<=u||u<n&&n<=l)||(h=i[o])+(n-l)/(u-l)*(i[s]-h)<e&&(a=!a),s=o}return a},qt.prototype.intersectsSegment=function(t,e,n,i){for(var r=this.polygons,s=0,a=r.length;s<a;s++)if(this.intersectsSegmentPolygon(r[s],t,e,n,i))return this.boundingBoxes[s];return null},qt.prototype.intersectsSegmentPolygon=function(t,e,n,i,r){for(var s=t,a=t.length,o=e-i,h=n-r,l=e*r-n*i,u=s[a-2],c=s[a-1],f=0;f<a;f+=2){var d=s[f],p=s[f+1],m=u*p-c*d,g=u-d,v=c-p,y=o*v-h*g,x=(l*g-o*m)/y;if((u<=x&&x<=d||d<=x&&x<=u)&&(e<=x&&x<=i||i<=x&&x<=e)){var w=(l*v-h*m)/y;if((c<=w&&w<=p||p<=w&&w<=c)&&(n<=w&&w<=r||r<=w&&w<=n))return!0}u=d,c=p}return!1},qt.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]},qt.prototype.getWidth=function(){return this.maxX-this.minX},qt.prototype.getHeight=function(){return this.maxY-this.minY},P=qt,C.SkeletonBounds=P,Z=St=St||{},Wt.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;Wt.makeClockwise(r);for(var s=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r)),a=0,o=s.length;a<o;a++){var h=s[a];Wt.makeClockwise(h),h.push(h[0]),h.push(h[1])}return s.length},Wt.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},Wt.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},Wt.prototype.isClipping=function(){return null!=this.clipAttachment},Wt.prototype.clipTriangles=function(t,e,n,i,r,s,a,o){var h=this.clipOutput,l=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,f=this.clippingPolygons.length,d=o?12:8,p=0;l.length=0;t:for(var m=u.length=0;m<i;m+=3)for(var g=n[m]<<1,v=t[g],y=t[1+g],x=r[g],w=r[1+g],M=t[g=n[m+1]<<1],E=t[1+g],T=r[g],A=r[1+g],b=t[g=n[m+2]<<1],R=t[1+g],S=r[g],I=r[1+g],C=0;C<f;C++){var P=l.length;if(!this.clip(v,y,M,E,b,R,c[C],h)){(Y=Z.Utils.setArraySize(l,P+3*d))[P]=v,Y[P+1]=y,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a,o?(Y[P+6]=x,Y[P+7]=w,Y[P+8]=a.r,Y[P+9]=a.g,Y[P+10]=a.b,Y[P+11]=a.a,Y[P+12]=M,Y[P+13]=E,Y[P+14]=s.r,Y[P+15]=s.g,Y[P+16]=s.b,Y[P+17]=s.a,Y[P+18]=T,Y[P+19]=A,Y[P+20]=a.r,Y[P+21]=a.g,Y[P+22]=a.b,Y[P+23]=a.a,Y[P+24]=b,Y[P+25]=R,Y[P+26]=s.r,Y[P+27]=s.g,Y[P+28]=s.b,Y[P+29]=s.a,Y[P+30]=S,Y[P+31]=I,Y[P+32]=a.r,Y[P+33]=a.g,Y[P+34]=a.b,Y[P+35]=a.a):(Y[P+6]=x,Y[P+7]=w,Y[P+8]=M,Y[P+9]=E,Y[P+10]=s.r,Y[P+11]=s.g,Y[P+12]=s.b,Y[P+13]=s.a,Y[P+14]=T,Y[P+15]=A,Y[P+16]=b,Y[P+17]=R,Y[P+18]=s.r,Y[P+19]=s.g,Y[P+20]=s.b,Y[P+21]=s.a,Y[P+22]=S,Y[P+23]=I),P=u.length,(j=Z.Utils.setArraySize(u,P+3))[P]=p,j[P+1]=p+1,j[P+2]=p+2,p+=3;continue t}var k=h.length;if(0!=k){for(var F=E-R,V=b-M,O=v-b,_=R-y,L=1/(F*O+V*(y-R)),D=k>>1,N=this.clipOutput,Y=Z.Utils.setArraySize(l,P+D*d),X=0;X<k;X+=2){var U=N[X],z=N[X+1];Y[P]=U,Y[P+1]=z,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a;var B=U-b,q=z-R,W=(F*B+V*q)*L,G=(_*B+O*q)*L,H=1-W-G;Y[P+6]=x*W+T*G+S*H,Y[P+7]=w*W+A*G+I*H,o&&(Y[P+8]=a.r,Y[P+9]=a.g,Y[P+10]=a.b,Y[P+11]=a.a),P+=d}P=u.length;var j=Z.Utils.setArraySize(u,P+3*(D-2));for(D--,X=1;X<D;X++)j[P]=p,j[P+1]=p+X,j[P+2]=p+X+1,P+=3;p+=1+D}}},Wt.prototype.clip=function(t,e,n,i,r,s,a,o){var h=o,l=!1,u=null;2<=a.length%4?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),o.length=0;for(var c=a,f=a.length-4,d=0;;d+=2){for(var p=c[d],m=c[d+1],g=c[d+2],v=c[d+3],y=p-g,x=m-v,w=u,M=u.length-2,E=o.length,T=0;T<M;T+=2){var A=w[T],b=w[T+1],R=w[T+2],S=w[T+3],I=0<y*(S-v)-x*(R-g);if(0<y*(b-v)-x*(A-g)){if(I){o.push(R),o.push(S);continue}var C,P,k,F=(C=S-b)*(g-p)-(P=R-A)*(v-m);1e-6<Math.abs(F)?(k=(P*(m-b)-C*(p-A))/F,o.push(p+(g-p)*k),o.push(m+(v-m)*k)):(o.push(p),o.push(m))}else I&&(F=(C=S-b)*(g-p)-(P=R-A)*(v-m),1e-6<Math.abs(F)?(k=(P*(m-b)-C*(p-A))/F,o.push(p+(g-p)*k),o.push(m+(v-m)*k)):(o.push(p),o.push(m)),o.push(R),o.push(S));l=!0}if(E==o.length)return!(h.length=0);if(o.push(o[0]),o.push(o[1]),d==f)break;var V=o;(o=u).length=0,u=V}if(h!=o)for(var d=h.length=0,O=o.length-2;d<O;d++)h[d]=o[d];else h.length=h.length-2;return l},Wt.makeClockwise=function(t){for(var e,n,i,r=t,s=t.length,a=r[s-2]*r[1]-r[0]*r[s-1],o=0,h=s-3;o<h;o+=2)e=r[o],n=r[o+1],i=r[o+2],a+=e*r[o+3]-i*n;if(!(a<0))for(var o=0,l=s-2,h=s>>1;o<h;o+=2){var u=r[o],c=r[o+1],f=l-o;r[o]=r[f],r[o+1]=r[1+f],r[f]=u,r[1+f]=c}},F=Wt,Z.SkeletonClipping=F,V=St=St||{},Gt.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},Gt.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},Gt.prototype.findSkin=function(t){if(null==t)throw new Error("skinName cannot be null.");for(var e=this.skins,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findEvent=function(t){if(null==t)throw new Error("eventDataName cannot be null.");for(var e=this.events,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findAnimation=function(t){if(null==t)throw new Error("animationName cannot be null.");for(var e=this.animations,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.name==t)return r}return null},Gt.prototype.findPathConstraintIndex=function(t){if(null==t)throw new Error("pathConstraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++)if(e[n].name==t)return n;return-1},O=Gt,V.SkeletonData=O,function(tt){var t=(O.prototype.readSkeletonData=function(t){var e=this.scale,n=new tt.SkeletonData,i="string"==typeof t?JSON.parse(t):t,r=i.skeleton;if(null!=r){if(n.hash=r.hash,n.version=r.spine,"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=r.x,n.y=r.y,n.width=r.width,n.height=r.height,n.fps=r.fps,n.imagesPath=r.images}if(i.bones)for(var s=0;s<i.bones.length;s++){var a=i.bones[s],o=null,h=this.getValue(a,"parent",null);if(null!=h&&null==(o=n.findBone(h)))throw new Error("Parent bone not found: "+h);(f=new tt.BoneData(n.bones.length,a.name,o)).length=this.getValue(a,"length",0)*e,f.x=this.getValue(a,"x",0)*e,f.y=this.getValue(a,"y",0)*e,f.rotation=this.getValue(a,"rotation",0),f.scaleX=this.getValue(a,"scaleX",1),f.scaleY=this.getValue(a,"scaleY",1),f.shearX=this.getValue(a,"shearX",0),f.shearY=this.getValue(a,"shearY",0),f.transformMode=O.transformModeFromString(this.getValue(a,"transform","normal")),f.skinRequired=this.getValue(a,"skin",!1),n.bones.push(f)}if(i.slots)for(s=0;s<i.slots.length;s++){var l=(A=i.slots[s]).name,u=A.bone,c=n.findBone(u);if(null==c)throw new Error("Slot bone not found: "+u);var f=new tt.SlotData(n.slots.length,l,c),d=this.getValue(A,"color",null);null!=d&&f.color.setFromString(d);var p=this.getValue(A,"dark",null);null!=p&&(f.darkColor=new tt.Color(1,1,1,1),f.darkColor.setFromString(p)),f.attachmentName=this.getValue(A,"attachment",null),f.blendMode=O.blendModeFromString(this.getValue(A,"blend","normal")),n.slots.push(f)}if(i.ik)for(s=0;s<i.ik.length;s++){var m=i.ik[s];(f=new tt.IkConstraintData(m.name)).order=this.getValue(m,"order",0),f.skinRequired=this.getValue(m,"skin",!1);for(var g=0;g<m.bones.length;g++){if(u=m.bones[g],null==(w=n.findBone(u)))throw new Error("IK bone not found: "+u);f.bones.push(w)}var v=m.target;if(f.target=n.findBone(v),null==f.target)throw new Error("IK target bone not found: "+v);f.mix=this.getValue(m,"mix",1),f.softness=this.getValue(m,"softness",0)*e,f.bendDirection=this.getValue(m,"bendPositive",!0)?1:-1,f.compress=this.getValue(m,"compress",!1),f.stretch=this.getValue(m,"stretch",!1),f.uniform=this.getValue(m,"uniform",!1),n.ikConstraints.push(f)}if(i.transform)for(s=0;s<i.transform.length;s++){for(m=i.transform[s],(f=new tt.TransformConstraintData(m.name)).order=this.getValue(m,"order",0),f.skinRequired=this.getValue(m,"skin",!1),g=0;g<m.bones.length;g++){if(u=m.bones[g],null==(w=n.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(w)}if(v=m.target,f.target=n.findBone(v),null==f.target)throw new Error("Transform constraint target bone not found: "+v);f.local=this.getValue(m,"local",!1),f.relative=this.getValue(m,"relative",!1),f.offsetRotation=this.getValue(m,"rotation",0),f.offsetX=this.getValue(m,"x",0)*e,f.offsetY=this.getValue(m,"y",0)*e,f.offsetScaleX=this.getValue(m,"scaleX",0),f.offsetScaleY=this.getValue(m,"scaleY",0),f.offsetShearY=this.getValue(m,"shearY",0),f.rotateMix=this.getValue(m,"rotateMix",1),f.translateMix=this.getValue(m,"translateMix",1),f.scaleMix=this.getValue(m,"scaleMix",1),f.shearMix=this.getValue(m,"shearMix",1),n.transformConstraints.push(f)}if(i.path)for(s=0;s<i.path.length;s++){for(m=i.path[s],(f=new tt.PathConstraintData(m.name)).order=this.getValue(m,"order",0),f.skinRequired=this.getValue(m,"skin",!1),g=0;g<m.bones.length;g++){if(u=m.bones[g],null==(w=n.findBone(u)))throw new Error("Transform constraint bone not found: "+u);f.bones.push(w)}if(v=m.target,f.target=n.findSlot(v),null==f.target)throw new Error("Path target slot not found: "+v);f.positionMode=O.positionModeFromString(this.getValue(m,"positionMode","percent")),f.spacingMode=O.spacingModeFromString(this.getValue(m,"spacingMode","length")),f.rotateMode=O.rotateModeFromString(this.getValue(m,"rotateMode","tangent")),f.offsetRotation=this.getValue(m,"rotation",0),f.position=this.getValue(m,"position",0),f.positionMode==tt.PositionMode.Fixed&&(f.position*=e),f.spacing=this.getValue(m,"spacing",0),f.spacingMode!=tt.SpacingMode.Length&&f.spacingMode!=tt.SpacingMode.Fixed||(f.spacing*=e),f.rotateMix=this.getValue(m,"rotateMix",1),f.translateMix=this.getValue(m,"translateMix",1),n.pathConstraints.push(f)}if(i.skins)for(s=0;s<i.skins.length;s++){var y=i.skins[s],x=new tt.Skin(y.name);if(y.bones)for(var w,M=0;M<y.bones.length;M++){if(null==(w=n.findBone(y.bones[M])))throw new Error("Skin bone not found: "+y.bones[s]);x.bones.push(w)}if(y.ik)for(M=0;M<y.ik.length;M++){if(null==(E=n.findIkConstraint(y.ik[M])))throw new Error("Skin IK constraint not found: "+y.ik[s]);x.constraints.push(E)}if(y.transform)for(M=0;M<y.transform.length;M++){if(null==(E=n.findTransformConstraint(y.transform[M])))throw new Error("Skin transform constraint not found: "+y.transform[s]);x.constraints.push(E)}if(y.path)for(var E,M=0;M<y.path.length;M++){if(null==(E=n.findPathConstraint(y.path[M])))throw new Error("Skin path constraint not found: "+y.path[s]);x.constraints.push(E)}for(var l in y.attachments){var T=n.findSlot(l);if(null==T)throw new Error("Slot not found: "+l);var A=y.attachments[l];for(var b in A){var R=this.readAttachment(A[b],x,T.index,b,n);null!=R&&x.setAttachment(T.index,b,R)}}n.skins.push(x),"default"==x.name&&(n.defaultSkin=x)}for(var s=0,S=this.linkedMeshes.length;s<S;s++){var I=this.linkedMeshes[s];if(null==(x=null==I.skin?n.defaultSkin:n.findSkin(I.skin)))throw new Error("Skin not found: "+I.skin);var C=x.getAttachment(I.slotIndex,I.parent);if(null==C)throw new Error("Parent mesh not found: "+I.parent);I.mesh.deformAttachment=I.inheritDeform?C:I.mesh,I.mesh.setParentMesh(C),I.mesh.updateUVs()}if(this.linkedMeshes.length=0,i.events)for(var P in i.events){var k=i.events[P];(f=new tt.EventData(P)).intValue=this.getValue(k,"int",0),f.floatValue=this.getValue(k,"float",0),f.stringValue=this.getValue(k,"string",""),f.audioPath=this.getValue(k,"audio",null),null!=f.audioPath&&(f.volume=this.getValue(k,"volume",1),f.balance=this.getValue(k,"balance",0)),n.events.push(f)}if(i.animations)for(var F in i.animations){var V=i.animations[F];this.readAnimation(V,F,n)}return n},O.prototype.readAttachment=function(t,e,n,i,r){var s=this.scale;switch(i=this.getValue(t,"name",i),this.getValue(t,"type","region")){case"region":var a=this.getValue(t,"path",i),o=this.attachmentLoader.newRegionAttachment(e,i,a);return null==o?null:(o.path=a,o.x=this.getValue(t,"x",0)*s,o.y=this.getValue(t,"y",0)*s,o.scaleX=this.getValue(t,"scaleX",1),o.scaleY=this.getValue(t,"scaleY",1),o.rotation=this.getValue(t,"rotation",0),o.width=t.width*s,o.height=t.height*s,null!=(x=this.getValue(t,"color",null))&&o.color.setFromString(x),o.updateOffset(),o);case"boundingbox":var h=this.attachmentLoader.newBoundingBoxAttachment(e,i);return null==h?null:(this.readVertices(t,h,t.vertexCount<<1),null!=(x=this.getValue(t,"color",null))&&h.color.setFromString(x),h);case"mesh":case"linkedmesh":var a=this.getValue(t,"path",i),l=this.attachmentLoader.newMeshAttachment(e,i,a);if(null==l)return null;l.path=a,null!=(x=this.getValue(t,"color",null))&&l.color.setFromString(x),l.width=this.getValue(t,"width",0)*s,l.height=this.getValue(t,"height",0)*s;var u=this.getValue(t,"parent",null);if(null!=u)return this.linkedMeshes.push(new w(l,this.getValue(t,"skin",null),n,u,this.getValue(t,"deform",!0))),l;var c=t.uvs;return this.readVertices(t,l,c.length),l.triangles=t.triangles,l.regionUVs=c,l.updateUVs(),l.edges=this.getValue(t,"edges",null),l.hullLength=2*this.getValue(t,"hull",0),l;case"path":if(null==(a=this.attachmentLoader.newPathAttachment(e,i)))return null;a.closed=this.getValue(t,"closed",!1),a.constantSpeed=this.getValue(t,"constantSpeed",!0);var f=t.vertexCount;this.readVertices(t,a,f<<1);for(var d=tt.Utils.newArray(f/3,0),p=0;p<t.lengths.length;p++)d[p]=t.lengths[p]*s;return a.lengths=d,null!=(x=this.getValue(t,"color",null))&&a.color.setFromString(x),a;case"point":var m=this.attachmentLoader.newPointAttachment(e,i);return null==m?null:(m.x=this.getValue(t,"x",0)*s,m.y=this.getValue(t,"y",0)*s,m.rotation=this.getValue(t,"rotation",0),null!=(x=this.getValue(t,"color",null))&&m.color.setFromString(x),m);case"clipping":var g=this.attachmentLoader.newClippingAttachment(e,i);if(null==g)return null;var v=this.getValue(t,"end",null);if(null!=v){var y=r.findSlot(v);if(null==y)throw new Error("Clipping end slot not found: "+v);g.endSlot=y}var x,f=t.vertexCount;return this.readVertices(t,g,f<<1),null!=(x=this.getValue(t,"color",null))&&g.color.setFromString(x),g}return null},O.prototype.readVertices=function(t,e,n){var i=this.scale;e.worldVerticesLength=n;var r=t.vertices;if(n!=r.length){for(var s=new Array,a=new Array,o=0,h=r.length;o<h;){var l=r[o++];a.push(l);for(var u=o+4*l;o<u;o+=4)a.push(r[o]),s.push(r[o+1]*i),s.push(r[o+2]*i),s.push(r[o+3])}e.bones=a,e.vertices=tt.Utils.toFloatArray(s)}else{var c=tt.Utils.toFloatArray(r);if(1!=i)for(var o=0,h=r.length;o<h;o++)c[o]*=i;e.vertices=c}},O.prototype.readAnimation=function(t,e,n){var i=this.scale,r=new Array,s=0;if(t.slots)for(var a in t.slots){var o=t.slots[a];if(-1==(Z=n.findSlotIndex(a)))throw new Error("Slot not found: "+a);for(var h in o){var l=o[h];if("attachment"==h){(x=new tt.AttachmentTimeline(l.length)).slotIndex=Z;for(var u=0,c=0;c<l.length;c++){var f=l[c];x.setFrame(u++,this.getValue(f,"time",0),f.name)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}else if("color"==h){for((x=new tt.ColorTimeline(l.length)).slotIndex=Z,c=u=0;c<l.length;c++){var f=l[c],d=new tt.Color;d.setFromString(f.color),x.setFrame(u,this.getValue(f,"time",0),d.r,d.g,d.b,d.a),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.ColorTimeline.ENTRIES])}else{if("twoColor"!=h)throw new Error("Invalid timeline type for a slot: "+h+" ("+a+")");for((x=new tt.TwoColorTimeline(l.length)).slotIndex=Z,c=u=0;c<l.length;c++){var f=l[c],p=new tt.Color,m=new tt.Color;p.setFromString(f.light),m.setFromString(f.dark),x.setFrame(u,this.getValue(f,"time",0),p.r,p.g,p.b,p.a,m.r,m.g,m.b),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TwoColorTimeline.ENTRIES])}}}if(t.bones)for(var g in t.bones){var v=t.bones[g],y=n.findBoneIndex(g);if(-1==y)throw new Error("Bone not found: "+g);for(var h in v)if(l=v[h],"rotate"===h){for((x=new tt.RotateTimeline(l.length)).boneIndex=y,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"angle",0)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.RotateTimeline.ENTRIES])}else{if("translate"!==h&&"scale"!==h&&"shear"!==h)throw new Error("Invalid timeline type for a bone: "+h+" ("+g+")");var x=null,w=1,M=0;for("scale"===h?(x=new tt.ScaleTimeline(l.length),M=1):"shear"===h?x=new tt.ShearTimeline(l.length):(x=new tt.TranslateTimeline(l.length),w=i),x.boneIndex=y,c=u=0;c<l.length;c++){var f=l[c],E=this.getValue(f,"x",M),T=this.getValue(f,"y",M);x.setFrame(u,this.getValue(f,"time",0),E*w,T*w),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TranslateTimeline.ENTRIES])}}if(t.ik)for(var A in t.ik){var b=t.ik[A],R=n.findIkConstraint(A);for((x=new tt.IkConstraintTimeline(b.length)).ikConstraintIndex=n.ikConstraints.indexOf(R),c=u=0;c<b.length;c++)f=b[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"mix",1),this.getValue(f,"softness",0)*i,this.getValue(f,"bendPositive",!0)?1:-1,this.getValue(f,"compress",!1),this.getValue(f,"stretch",!1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.IkConstraintTimeline.ENTRIES])}if(t.transform)for(var A in t.transform){for(b=t.transform[A],R=n.findTransformConstraint(A),(x=new tt.TransformConstraintTimeline(b.length)).transformConstraintIndex=n.transformConstraints.indexOf(R),c=u=0;c<b.length;c++)f=b[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1),this.getValue(f,"scaleMix",1),this.getValue(f,"shearMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.TransformConstraintTimeline.ENTRIES])}if(t.path)for(var A in t.path){var b=t.path[A],S=n.findPathConstraintIndex(A);if(-1==S)throw new Error("Path constraint not found: "+A);var I=n.pathConstraints[S];for(var h in b)if(l=b[h],"position"===h||"spacing"===h){var x=null,w=1;for("spacing"===h?(x=new tt.PathConstraintSpacingTimeline(l.length),I.spacingMode!=tt.SpacingMode.Length&&I.spacingMode!=tt.SpacingMode.Fixed||(w=i)):(x=new tt.PathConstraintPositionTimeline(l.length),I.positionMode==tt.PositionMode.Fixed&&(w=i)),x.pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,h,0)*w),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintPositionTimeline.ENTRIES])}else if("mix"===h){for((x=new tt.PathConstraintMixTimeline(l.length)).pathConstraintIndex=S,c=u=0;c<l.length;c++)f=l[c],x.setFrame(u,this.getValue(f,"time",0),this.getValue(f,"rotateMix",1),this.getValue(f,"translateMix",1)),this.readCurve(f,x,u),u++;r.push(x),s=Math.max(s,x.frames[(x.getFrameCount()-1)*tt.PathConstraintMixTimeline.ENTRIES])}}if(t.deform)for(var C in t.deform){var P=t.deform[C],k=n.findSkin(C);if(null==k)throw new Error("Skin not found: "+C);for(var a in P){if(o=P[a],-1==(Z=n.findSlotIndex(a)))throw new Error("Slot not found: "+o.name);for(var h in o){var l=o[h],F=k.getAttachment(Z,h);if(null==F)throw new Error("Deform attachment not found: "+l.name);var V=null!=F.bones,O=F.vertices,_=V?O.length/3*2:O.length;(x=new tt.DeformTimeline(l.length)).slotIndex=Z,x.attachment=F;for(var u=0,L=0;L<l.length;L++){var f=l[L],D=void 0,N=this.getValue(f,"vertices",null);if(null==N)D=V?tt.Utils.newFloatArray(_):O;else{D=tt.Utils.newFloatArray(_);var Y=this.getValue(f,"offset",0);if(tt.Utils.arrayCopy(N,0,D,Y,N.length),1!=i)for(var X=(c=Y)+N.length;c<X;c++)D[c]*=i;if(!V)for(c=0;c<_;c++)D[c]+=O[c]}x.setFrame(u,this.getValue(f,"time",0),D),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}}}var U=t.drawOrder;if(null==U&&(U=t.draworder),null!=U){for(var x=new tt.DrawOrderTimeline(U.length),z=n.slots.length,u=0,L=0;L<U.length;L++){var B=U[L],q=null,W=this.getValue(B,"offsets",null);if(null!=W){q=tt.Utils.newArray(z,-1);for(var G=tt.Utils.newArray(z-W.length,0),H=0,j=0,c=0;c<W.length;c++){var Z,K=W[c];if(-1==(Z=n.findSlotIndex(K.slot)))throw new Error("Slot not found: "+K.slot);for(;H!=Z;)G[j++]=H++;q[H+K.offset]=H++}for(;H<z;)G[j++]=H++;for(c=z-1;0<=c;c--)-1==q[c]&&(q[c]=G[--j])}x.setFrame(u++,this.getValue(B,"time",0),q)}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))},O.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))))},O.prototype.getValue=function(t,e,n){return void 0!==t[e]?t[e]:n},O.blendModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.BlendMode.Normal;if("additive"==t)return tt.BlendMode.Additive;if("multiply"==t)return tt.BlendMode.Multiply;if("screen"==t)return tt.BlendMode.Screen;throw new Error("Unknown blend mode: "+t)},O.positionModeFromString=function(t){if("fixed"==(t=t.toLowerCase()))return tt.PositionMode.Fixed;if("percent"==t)return tt.PositionMode.Percent;throw new Error("Unknown position mode: "+t)},O.spacingModeFromString=function(t){if("length"==(t=t.toLowerCase()))return tt.SpacingMode.Length;if("fixed"==t)return tt.SpacingMode.Fixed;if("percent"==t)return tt.SpacingMode.Percent;throw new Error("Unknown position mode: "+t)},O.rotateModeFromString=function(t){if("tangent"==(t=t.toLowerCase()))return tt.RotateMode.Tangent;if("chain"==t)return tt.RotateMode.Chain;if("chainscale"==t)return tt.RotateMode.ChainScale;throw new Error("Unknown rotate mode: "+t)},O.transformModeFromString=function(t){if("normal"==(t=t.toLowerCase()))return tt.TransformMode.Normal;if("onlytranslation"==t)return tt.TransformMode.OnlyTranslation;if("norotationorreflection"==t)return tt.TransformMode.NoRotationOrReflection;if("noscale"==t)return tt.TransformMode.NoScale;if("noscaleorreflection"==t)return tt.TransformMode.NoScaleOrReflection;throw new Error("Unknown transform mode: "+t)},O);function O(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}tt.SkeletonJson=t;var w=function(t,e,n,i,r){this.mesh=t,this.skin=e,this.slotIndex=n,this.parent=i,this.inheritDeform=r}}(St=St||{}),function(h){var s=function(t,e,n){this.slotIndex=t,this.name=e,this.attachment=n};h.SkinEntry=s;var t=(e.prototype.setAttachment=function(t,e,n){if(null==n)throw new Error("attachment cannot be null.");var i=this.attachments;t>=i.length&&(i.length=t+1),i[t]||(i[t]={}),i[t][e]=n},e.prototype.addSkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],i=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==n){i=!0;break}i||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],i=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){i=!0;break}i||this.constraints.push(s)}for(var a=t.getAttachments(),e=0;e<a.length;e++){var o=a[e];this.setAttachment(o.slotIndex,o.name,o.attachment)}},e.prototype.copySkin=function(t){for(var e=0;e<t.bones.length;e++){for(var n=t.bones[e],i=!1,r=0;r<this.bones.length;r++)if(this.bones[r]==n){i=!0;break}i||this.bones.push(n)}for(e=0;e<t.constraints.length;e++){for(var s=t.constraints[e],i=!1,r=0;r<this.constraints.length;r++)if(this.constraints[r]==s){i=!0;break}i||this.constraints.push(s)}for(var a=t.getAttachments(),e=0;e<a.length;e++){var o=a[e];null!=o.attachment&&(o.attachment instanceof h.MeshAttachment?o.attachment=o.attachment.newLinkedMesh():o.attachment=o.attachment.copy(),this.setAttachment(o.slotIndex,o.name,o.attachment))}},e.prototype.getAttachment=function(t,e){var n=this.attachments[t];return n?n[e]:null},e.prototype.removeAttachment=function(t,e){var n=this.attachments[t];n&&(n[e]=null)},e.prototype.getAttachments=function(){for(var t=new Array,e=0;e<this.attachments.length;e++){var n=this.attachments[e];if(n)for(var i in n){var r=n[i];r&&t.push(new s(e,i,r))}}return t},e.prototype.getAttachmentsForSlot=function(t,e){var n=this.attachments[t];if(n)for(var i in n){var r=n[i];r&&e.push(new s(t,i,r))}},e.prototype.clear=function(){this.attachments.length=0,this.bones.length=0,this.constraints.length=0},e.prototype.attachAll=function(t,e){for(var n=0,i=0;i<t.slots.length;i++){var r=t.slots[i],s=r.getAttachment();if(s&&n<e.attachments.length){var a=e.attachments[n];for(var o in a)if(s==a[o]){var h=this.getAttachment(n,o);null!=h&&r.setAttachment(h);break}}n++}},e);function e(t){if(this.attachments=new Array,this.bones=Array(),this.constraints=new Array,null==t)throw new Error("name cannot be null.");this.name=t}h.Skin=t}(St=St||{}),_=St=St||{},Ht.prototype.getSkeleton=function(){return this.bone.skeleton},Ht.prototype.getAttachment=function(){return this.attachment},Ht.prototype.setAttachment=function(t){this.attachment!=t&&(this.attachment=t,this.attachmentTime=this.bone.skeleton.time,this.deform.length=0)},Ht.prototype.setAttachmentTime=function(t){this.attachmentTime=this.bone.skeleton.time-t},Ht.prototype.getAttachmentTime=function(){return this.bone.skeleton.time-this.attachmentTime},Ht.prototype.setToSetupPose=function(){this.color.setFromColor(this.data.color),null!=this.darkColor&&this.darkColor.setFromColor(this.data.darkColor),null==this.data.attachmentName?this.attachment=null:(this.attachment=null,this.setAttachment(this.bone.skeleton.getAttachment(this.data.index,this.data.attachmentName)))},L=Ht,_.Slot=L,(D=St=St||{}).SlotData=jt,function(t){var e,n,i,r,s=(a.prototype.getImage=function(){return this._image},a.filterFromString=function(t){switch(t.toLowerCase()){case"nearest":return e.Nearest;case"linear":return e.Linear;case"mipmap":return e.MipMap;case"mipmapnearestnearest":return e.MipMapNearestNearest;case"mipmaplinearnearest":return e.MipMapLinearNearest;case"mipmapnearestlinear":return e.MipMapNearestLinear;case"mipmaplinearlinear":return e.MipMapLinearLinear;default:throw new Error("Unknown texture filter "+t)}},a.wrapFromString=function(t){switch(t.toLowerCase()){case"mirroredtepeat":return i.MirroredRepeat;case"clamptoedge":return i.ClampToEdge;case"repeat":return i.Repeat;default:throw new Error("Unknown texture wrap "+t)}},a);function a(t){this._image=t}t.Texture=s,(n=e=t.TextureFilter||(t.TextureFilter={}))[n.Nearest=9728]="Nearest",n[n.Linear=9729]="Linear",n[n.MipMap=9987]="MipMap",n[n.MipMapNearestNearest=9984]="MipMapNearestNearest",n[n.MipMapLinearNearest=9985]="MipMapLinearNearest",n[n.MipMapNearestLinear=9986]="MipMapNearestLinear",n[n.MipMapLinearLinear=9987]="MipMapLinearLinear",(r=i=t.TextureWrap||(t.TextureWrap={}))[r.MirroredRepeat=33648]="MirroredRepeat",r[r.ClampToEdge=33071]="ClampToEdge",r[r.Repeat=10497]="Repeat";function o(){this.u=0,this.v=0,this.u2=0,this.v2=0,this.width=0,this.height=0,this.rotate=!1,this.offsetX=0,this.offsetY=0,this.originalWidth=0,this.originalHeight=0}t.TextureRegion=o;var h,l=(kt(u,h=s),u.prototype.setFilters=function(t,e){},u.prototype.setWraps=function(t,e){},u.prototype.dispose=function(){},u);function u(){return null!==h&&h.apply(this,arguments)||this}t.FakeTexture=l}(St=St||{}),function(d){var t=(e.prototype.load=function(t,e){if(null==e)throw new Error("textureLoader cannot be null.");for(var n=new p(t),i=new Array(4),r=null;;){var s,a,o,h,l,u,c,f=n.readLine();if(null==f)break;0==(f=f.trim()).length?r=null:r?((s=new g).name=f,s.page=r,"true"==(a=n.readValue()).toLocaleLowerCase()?s.degrees=90:"false"==a.toLocaleLowerCase()?s.degrees=0:s.degrees=parseFloat(a),s.rotate=90==s.degrees,n.readTuple(i),o=parseInt(i[0]),h=parseInt(i[1]),n.readTuple(i),l=parseInt(i[0]),u=parseInt(i[1]),s.u=o/r.width,s.v=h/r.height,s.rotate?(s.u2=(o+u)/r.width,s.v2=(h+l)/r.height):(s.u2=(o+l)/r.width,s.v2=(h+u)/r.height),s.x=o,s.y=h,s.width=Math.abs(l),s.height=Math.abs(u),4==n.readTuple(i)&&4==n.readTuple(i)&&n.readTuple(i),s.originalWidth=parseInt(i[0]),s.originalHeight=parseInt(i[1]),n.readTuple(i),s.offsetX=parseInt(i[0]),s.offsetY=parseInt(i[1]),s.index=parseInt(n.readValue()),s.texture=r.texture,this.regions.push(s)):((r=new m).name=f,2==n.readTuple(i)&&(r.width=parseInt(i[0]),r.height=parseInt(i[1]),n.readTuple(i)),n.readTuple(i),r.minFilter=d.Texture.filterFromString(i[0]),r.magFilter=d.Texture.filterFromString(i[1]),c=n.readValue(),r.uWrap=d.TextureWrap.ClampToEdge,r.vWrap=d.TextureWrap.ClampToEdge,"x"==c?r.uWrap=d.TextureWrap.Repeat:"y"==c?r.vWrap=d.TextureWrap.Repeat:"xy"==c&&(r.uWrap=r.vWrap=d.TextureWrap.Repeat),r.texture=e(f),r.texture.setFilters(r.minFilter,r.magFilter),r.texture.setWraps(r.uWrap,r.vWrap),r.width=r.texture.getImage().width,r.height=r.texture.getImage().height,this.pages.push(r))}},e.prototype.findRegion=function(t){for(var e=0;e<this.regions.length;e++)if(this.regions[e].name==t)return this.regions[e];return null},e.prototype.dispose=function(){for(var t=0;t<this.pages.length;t++)this.pages[t].texture.dispose()},e);function e(t,e){this.pages=new Array,this.regions=new Array,this.load(t,e)}d.TextureAtlas=t;var p=(n.prototype.readLine=function(){return this.index>=this.lines.length?null:this.lines[this.index++]},n.prototype.readValue=function(){var t=this.readLine(),e=t.indexOf(":");if(-1==e)throw new Error("Invalid line: "+t);return t.substring(e+1).trim()},n.prototype.readTuple=function(t){var e=this.readLine(),n=e.indexOf(":");if(-1==n)throw new Error("Invalid line: "+e);for(var i=0,r=n+1;i<3;i++){var s=e.indexOf(",",r);if(-1==s)break;t[i]=e.substr(r,s-r).trim(),r=s+1}return t[i]=e.substring(r).trim(),i+1},n);function n(t){this.index=0,this.lines=t.split(/\r\n|\r|\n/)}var m=function(){};d.TextureAtlasPage=m;var i,g=(i=d.TextureRegion,kt(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}d.TextureAtlasRegion=g}(St=St||{}),N=St=St||{},Zt.prototype.isActive=function(){return this.active},Zt.prototype.apply=function(){this.update()},Zt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Zt.prototype.applyAbsoluteWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0<s*h-a*o?N.MathUtils.degRad:-N.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var m,g,v,y,x,w,M,E,T,A,b,R=f[d],S=!1;0!=t&&(m=R.a,M=R.b,g=R.c,E=R.d,(A=Math.atan2(o,s)-Math.atan2(g,m)+u)>N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A*=t,v=Math.cos(A),y=Math.sin(A),R.a=v*m-y*g,R.b=v*M-y*E,R.c=y*m+v*g,R.d=y*M+v*E,S=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),R.worldX+=(x.x-R.worldX)*e,R.worldY+=(x.y-R.worldY)*e,S=!0),0<n&&(b=Math.sqrt(R.a*R.a+R.c*R.c),w=Math.sqrt(s*s+o*o),1e-5<b&&(b=(b+(w-b+this.data.offsetScaleX)*n)/b),R.a*=b,R.c*=b,b=Math.sqrt(R.b*R.b+R.d*R.d),w=Math.sqrt(a*a+h*h),1e-5<b&&(b=(b+(w-b+this.data.offsetScaleY)*n)/b),R.b*=b,R.d*=b,S=!0),0<i&&(M=R.b,E=R.d,T=Math.atan2(E,M),(A=Math.atan2(h,a)-Math.atan2(o,s)-(T-Math.atan2(R.c,R.a)))>N.MathUtils.PI?A-=N.MathUtils.PI2:A<-N.MathUtils.PI&&(A+=N.MathUtils.PI2),A=T+(A+c)*i,b=Math.sqrt(M*M+E*E),R.b=Math.cos(A)*b,R.d=Math.sin(A)*b,S=!0),S&&(R.appliedValid=!1)}},Zt.prototype.applyRelativeWorld=function(){for(var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target,s=r.a,a=r.b,o=r.c,h=r.d,l=0<s*h-a*o?N.MathUtils.degRad:-N.MathUtils.degRad,u=this.data.offsetRotation*l,c=this.data.offsetShearY*l,f=this.bones,d=0,p=f.length;d<p;d++){var m,g,v,y,x,w,M,E,T,A=f[d],b=!1;0!=t&&(m=A.a,M=A.b,g=A.c,E=A.d,(w=Math.atan2(o,s)+u)>N.MathUtils.PI?w-=N.MathUtils.PI2:w<-N.MathUtils.PI&&(w+=N.MathUtils.PI2),w*=t,v=Math.cos(w),y=Math.sin(w),A.a=v*m-y*g,A.b=v*M-y*E,A.c=y*m+v*g,A.d=y*M+v*E,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),A.worldX+=x.x*e,A.worldY+=x.y*e,b=!0),0<n&&(T=(Math.sqrt(s*s+o*o)-1+this.data.offsetScaleX)*n+1,A.a*=T,A.c*=T,T=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleY)*n+1,A.b*=T,A.d*=T,b=!0),0<i&&((w=Math.atan2(h,a)-Math.atan2(o,s))>N.MathUtils.PI?w-=N.MathUtils.PI2:w<-N.MathUtils.PI&&(w+=N.MathUtils.PI2),M=A.b,E=A.d,w=Math.atan2(E,M)+(w-N.MathUtils.PI/2+c)*i,T=Math.sqrt(M*M+E*E),A.b=Math.cos(w)*T,A.d=Math.sin(w)*T,b=!0),b&&(A.appliedValid=!1)}},Zt.prototype.applyAbsoluteLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a<o;a++){var h=s[a];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(p=r.arotation-l+this.data.offsetRotation,l+=(p-=360*(16384-(16384.499999999996-p/360|0)))*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax-u+this.data.offsetX)*e,c+=(r.ay-c+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=n&&(1e-5<f&&(f=(f+(r.ascaleX-f+this.data.offsetScaleX)*n)/f),1e-5<d&&(d=(d+(r.ascaleY-d+this.data.offsetScaleY)*n)/d));var p,m=h.ashearY;0!=i&&(p=r.ashearY-m+this.data.offsetShearY,p-=360*(16384-(16384.499999999996-p/360|0)),h.shearY+=p*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,m)}},Zt.prototype.applyRelativeLocal=function(){var t=this.rotateMix,e=this.translateMix,n=this.scaleMix,i=this.shearMix,r=this.target;r.appliedValid||r.updateAppliedTransform();for(var s=this.bones,a=0,o=s.length;a<o;a++){var h=s[a];h.appliedValid||h.updateAppliedTransform();var l=h.arotation;0!=t&&(l+=(r.arotation+this.data.offsetRotation)*t);var u=h.ax,c=h.ay;0!=e&&(u+=(r.ax+this.data.offsetX)*e,c+=(r.ay+this.data.offsetY)*e);var f=h.ascaleX,d=h.ascaleY;0!=n&&(1e-5<f&&(f*=(r.ascaleX-1+this.data.offsetScaleX)*n+1),1e-5<d&&(d*=(r.ascaleY-1+this.data.offsetScaleY)*n+1));var p=h.ashearY;0!=i&&(p+=(r.ashearY+this.data.offsetShearY)*i),h.updateWorldTransformWith(u,c,l,f,d,h.ashearX,p)}},Y=Zt,N.TransformConstraint=Y,X=St=St||{},U=X.ConstraintData,kt(Kt,U),z=Kt,X.TransformConstraintData=z,B=St=St||{},Qt.prototype.triangulate=function(t){for(var e=t,n=t.length>>1,i=this.indicesArray,r=i.length=0;r<n;r++)i[r]=r;for(var s=this.isConcaveArray,r=s.length=0,a=n;r<a;++r)s[r]=Qt.isConcave(r,n,e,i);var o=this.triangles;for(o.length=0;3<n;){for(var h=n-1,r=0,l=1;;){t:if(!s[r]){for(var u=i[h]<<1,c=i[r]<<1,f=i[l]<<1,d=e[u],p=e[1+u],m=e[c],g=e[1+c],v=e[f],y=e[1+f],x=(l+1)%n;x!=h;x=(x+1)%n)if(s[x]){var w=i[x]<<1,M=e[w],E=e[1+w];if(Qt.positiveArea(v,y,d,p,M,E)&&Qt.positiveArea(d,p,m,g,M,E)&&Qt.positiveArea(m,g,v,y,M,E))break t}break}if(0==l){do{if(!s[r])break;r--}while(0<r);break}h=r,l=((r=l)+1)%n}o.push(i[(n+r-1)%n]),o.push(i[r]),o.push(i[(r+1)%n]),i.splice(r,1),s.splice(r,1);var T=(--n+r-1)%n,A=r==n?0:r;s[T]=Qt.isConcave(T,n,e,i),s[A]=Qt.isConcave(A,n,e,i)}return 3==n&&(o.push(i[2]),o.push(i[0]),o.push(i[1])),o},Qt.prototype.decompose=function(t,e){var n=t,i=this.convexPolygons;this.polygonPool.freeAll(i),i.length=0;var r=this.convexPolygonsIndices;this.polygonIndicesPool.freeAll(r),r.length=0;var s=this.polygonIndicesPool.obtain();s.length=0;for(var a=this.polygonPool.obtain(),o=-1,h=a.length=0,l=0,u=e.length;l<u;l+=3){var c=e[l]<<1,f=e[l+1]<<1,d=e[l+2]<<1,p=n[c],m=n[1+c],g=n[f],v=n[1+f],y=n[d],x=n[1+d],w=!1;o==c&&(M=a.length-4,S=Qt.winding(a[M],a[M+1],a[M+2],a[M+3],y,x),I=Qt.winding(y,x,a[0],a[1],a[2],a[3]),S==h&&I==h&&(a.push(y),a.push(x),s.push(d),w=!0)),w||(0<a.length?(i.push(a),r.push(s)):(this.polygonPool.free(a),this.polygonIndicesPool.free(s)),(a=this.polygonPool.obtain()).length=0,a.push(p),a.push(m),a.push(g),a.push(v),a.push(y),a.push(x),(s=this.polygonIndicesPool.obtain()).length=0,s.push(c),s.push(f),s.push(d),h=Qt.winding(p,m,g,v,y,x),o=c)}for(0<a.length&&(i.push(a),r.push(s)),l=0,u=i.length;l<u;l++)if(0!=(s=r[l]).length)for(var M,E,T,A,b,R,S,I,C=s[0],P=s[s.length-1],k=(a=i[l])[M=a.length-4],F=a[M+1],V=a[M+2],O=a[M+3],_=a[0],L=a[1],D=a[2],N=a[3],Y=Qt.winding(k,F,V,O,_,L),X=0;X<u;X++)X!=l&&3==(E=r[X]).length&&(T=E[0],A=E[1],b=E[2],y=(R=i[X])[R.length-2],x=R[R.length-1],T==C&&A==P&&(S=Qt.winding(k,F,V,O,y,x),I=Qt.winding(y,x,_,L,D,N),S==Y&&I==Y&&(R.length=0,E.length=0,a.push(y),a.push(x),s.push(b),k=V,F=O,V=y,O=x,X=0)));for(l=i.length-1;0<=l;l--)0==(a=i[l]).length&&(i.splice(l,1),this.polygonPool.free(a),s=r[l],r.splice(l,1),this.polygonIndicesPool.free(s));return i},Qt.isConcave=function(t,e,n,i){var r=i[(e+t-1)%e]<<1,s=i[t]<<1,a=i[(t+1)%e]<<1;return!this.positiveArea(n[r],n[1+r],n[s],n[1+s],n[a],n[1+a])},Qt.positiveArea=function(t,e,n,i,r,s){return 0<=t*(s-i)+n*(e-s)+r*(i-e)},Qt.winding=function(t,e,n,i,r,s){var a=n-t,o=i-e;return 0<=r*o-s*a+a*e-t*o?1:-1},q=Qt,B.Triangulator=q,function(t){var e=(n.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},n.prototype.contains=function(t){return null!=this.array[0|t]},n.prototype.remove=function(t){this.array[0|t]=void 0},n.prototype.clear=function(){this.array.length=0},n);function n(){this.array=new Array}t.IntSet=e;var i=(r.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},r.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},r.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},r.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},r.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},r.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(a.clamp=function(t,e,n){return t<e?e:n<t?n:t},a.cosDeg=function(t){return Math.cos(t*a.degRad)},a.sinDeg=function(t){return Math.sin(t*a.degRad)},a.signum=function(t){return 0<t?1:t<0?-1:0},a.toInt=function(t){return 0<t?Math.floor(t):Math.ceil(t)},a.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},a.randomTriangular=function(t,e){return a.randomTriangularWith(t,e,.5*(t+e))},a.randomTriangularWith=function(t,e,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},a.PI2=2*(a.PI=3.1415927),a.radDeg=a.radiansToDegrees=180/a.PI,a.degRad=a.degreesToRadians=a.PI/180,a);function a(){}t.MathUtils=s;var o=(h.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},h);function h(){}t.Interpolation=o;var l,u=(kt(c,l=o),c.prototype.applyInternal=function(t){return t<=.5?Math.pow(2*t,this.power)/2:Math.pow(2*(t-1),this.power)/(this.power%2==0?-2:2)+1},c);function c(t){var e=l.call(this)||this;return e.power=2,e.power=t,e}t.Pow=u;var f,d=(kt(p,f=u),p.prototype.applyInternal=function(t){return Math.pow(t-1,this.power)*(this.power%2==0?-1:1)+1},p);function p(t){return f.call(this,t)||this}t.PowOut=d;var m=(g.arrayCopy=function(t,e,n,i,r){for(var s=e,a=i;s<e+r;s++,a++)n[a]=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=m;var v=(y.logBones=function(t){for(var e=0;e<t.bones.length;e++){var n=t.bones[e];console.log(n.data.name+", "+n.a+", "+n.b+", "+n.c+", "+n.d+", "+n.worldX+", "+n.worldY)}},y);function y(){}t.DebugUtils=v;var x=(w.prototype.obtain=function(){return 0<this.items.length?this.items.pop():this.instantiator()},w.prototype.free=function(t){t.reset&&t.reset(),this.items.push(t)},w.prototype.freeAll=function(t){for(var e=0;e<t.length;e++)this.free(t[e])},w.prototype.clear=function(){this.items.length=0},w);function w(t){this.items=new Array,this.instantiator=t}t.Pool=x;var M=(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=M;var T=(A.prototype.update=function(){var t=Date.now()/1e3;this.delta=t-this.lastTime,this.frameTime+=this.delta,this.totalTime+=this.delta,this.delta>this.maxDelta&&(this.delta=this.maxDelta),this.lastTime=t,this.frameCount++,1<this.frameTime&&(this.framesPerSecond=this.frameCount/this.frameTime,this.frameTime=0,this.frameCount=0)},A);function A(){this.maxDelta=.064,this.framesPerSecond=0,this.delta=0,this.totalTime=0,this.lastTime=Date.now()/1e3,this.frameCount=0,this.frameTime=0}t.TimeKeeper=T;var b=(R.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},R.prototype.addValue=function(t){this.addedValues<this.values.length&&this.addedValues++,this.values[this.lastValue++]=t,this.lastValue>this.values.length-1&&(this.lastValue=0),this.dirty=!0},R.prototype.getMean=function(){if(this.hasEnoughData()){if(this.dirty){for(var t=0,e=0;e<this.values.length;e++)t+=this.values[e];this.mean=t/this.values.length,this.dirty=!1}return this.mean}return 0},R);function R(t){void 0===t&&(t=32),this.addedValues=0,this.lastValue=0,this.mean=0,this.dirty=!0,this.values=new Array(t)}t.WindowedMean=b}(St=St||{}),Math.fround||(Math.fround=(W=new Float32Array(1),function(t){return W[0]=t,W[0]})),function(e){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}e.Attachment=t;var n,i=(kt(r,n=t),r.prototype.computeWorldVertices=function(t,e,n,i,r,s){n=r+(n>>1)*s;var a=t.bone.skeleton,o=t.deform,h=this.vertices,l=this.bones;if(null!=l){for(var u=0,c=0,f=0;f<e;f+=2)u+=(g=l[u])+1,c+=g;var d=a.bones;if(0==o.length)for(E=r,T=3*c;E<n;E+=s){var p=0,m=0,g=l[u++];for(g+=u;u<g;u++,T+=3){var v=d[l[u]],y=h[T],x=h[T+1],w=h[T+2];p+=(y*v.a+x*v.b+v.worldX)*w,m+=(y*v.c+x*v.d+v.worldY)*w}i[E]=p,i[E+1]=m}else for(var M=o,E=r,T=3*c,A=c<<1;E<n;E+=s){for(m=p=0,g=l[u++],g+=u;u<g;u++,T+=3,A+=2)v=d[l[u]],y=h[T]+M[A],x=h[T+1]+M[A+1],w=h[T+2],p+=(y*v.a+x*v.b+v.worldX)*w,m+=(y*v.c+x*v.d+v.worldY)*w;i[E]=p,i[E+1]=m}}else{0<o.length&&(h=o);for(var b=(v=t.bone).worldX,R=v.worldY,S=v.a,T=v.b,I=v.c,C=v.d,P=e,E=r;E<n;P+=2,E+=s){var y=h[P],x=h[P+1];i[E]=y*S+x*T+b,i[E+1]=y*I+x*C+R}}},r.prototype.copyTo=function(t){null!=this.bones?(t.bones=new Array(this.bones.length),e.Utils.arrayCopy(this.bones,0,t.bones,0,this.bones.length)):t.bones=null,null!=this.vertices?(t.vertices=e.Utils.newFloatArray(this.vertices.length),e.Utils.arrayCopy(this.vertices,0,t.vertices,0,this.vertices.length)):t.vertices=null,t.worldVerticesLength=this.worldVerticesLength,t.deformAttachment=this.deformAttachment},r.nextID=0,r);function r(t){var e=n.call(this,t)||this;return e.id=(65535&r.nextID++)<<11,e.worldVerticesLength=0,e.deformAttachment=e}e.VertexAttachment=i}(St=St||{}),G=St=St||{},(H=G.AttachmentType||(G.AttachmentType={}))[H.Region=0]="Region",H[H.BoundingBox=1]="BoundingBox",H[H.Mesh=2]="Mesh",H[H.LinkedMesh=3]="LinkedMesh",H[H.Path=4]="Path",H[H.Point=5]="Point",H[H.Clipping=6]="Clipping",K=St=St||{},Q=K.VertexAttachment,kt(Jt,Q),Jt.prototype.copy=function(){var t=new Jt(name);return this.copyTo(t),t.color.setFromColor(this.color),t},J=Jt,K.BoundingBoxAttachment=J,$=St=St||{},tt=$.VertexAttachment,kt($t,tt),$t.prototype.copy=function(){var t=new $t(name);return this.copyTo(t),t.endSlot=this.endSlot,t.color.setFromColor(this.color),t},et=$t,$.ClippingAttachment=et,nt=St=St||{},it=nt.VertexAttachment,kt(te,it),te.prototype.updateUVs=function(){var t=this.regionUVs;null!=this.uvs&&this.uvs.length==t.length||(this.uvs=nt.Utils.newFloatArray(t.length));var e=this.uvs,n=this.uvs.length,i=this.region.u,r=this.region.v,s=0,a=0;if(this.region instanceof nt.TextureAtlasRegion){var o=this.region,h=o.texture.getImage().width,l=o.texture.getImage().height;switch(o.degrees){case 90:i-=(o.originalHeight-o.offsetY-o.height)/h,r-=(o.originalWidth-o.offsetX-o.width)/l,s=o.originalHeight/h,a=o.originalWidth/l;for(var u=0;u<n;u+=2)e[u]=i+t[u+1]*s,e[u+1]=r+(1-t[u])*a;return;case 180:for(i-=(o.originalWidth-o.offsetX-o.width)/h,r-=o.offsetY/l,s=o.originalWidth/h,a=o.originalHeight/l,u=0;u<n;u+=2)e[u]=i+(1-t[u])*s,e[u+1]=r+(1-t[u+1])*a;return;case 270:for(i-=o.offsetY/h,r-=o.offsetX/l,s=o.originalHeight/h,a=o.originalWidth/l,u=0;u<n;u+=2)e[u]=i+(1-t[u+1])*s,e[u+1]=r+t[u]*a;return}i-=o.offsetX/h,r-=(o.originalHeight-o.offsetY-o.height)/l,s=o.originalWidth/h,a=o.originalHeight/l}else null==this.region?(i=r=0,s=a=1):(s=this.region.u2-i,a=this.region.v2-r);for(u=0;u<n;u+=2)e[u]=i+t[u]*s,e[u+1]=r+t[u+1]*a},te.prototype.getParentMesh=function(){return this.parentMesh},te.prototype.setParentMesh=function(t){null!=(this.parentMesh=t)&&(this.bones=t.bones,this.vertices=t.vertices,this.worldVerticesLength=t.worldVerticesLength,this.regionUVs=t.regionUVs,this.triangles=t.triangles,this.hullLength=t.hullLength,this.worldVerticesLength=t.worldVerticesLength)},te.prototype.copy=function(){if(null!=this.parentMesh)return this.newLinkedMesh();var t=new te(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),this.copyTo(t),t.regionUVs=new Array(this.regionUVs.length),nt.Utils.arrayCopy(this.regionUVs,0,t.regionUVs,0,this.regionUVs.length),t.uvs=new Array(this.uvs.length),nt.Utils.arrayCopy(this.uvs,0,t.uvs,0,this.uvs.length),t.triangles=new Array(this.triangles.length),nt.Utils.arrayCopy(this.triangles,0,t.triangles,0,this.triangles.length),t.hullLength=this.hullLength,null!=this.edges&&(t.edges=new Array(this.edges.length),nt.Utils.arrayCopy(this.edges,0,t.edges,0,this.edges.length)),t.width=this.width,t.height=this.height,t},te.prototype.newLinkedMesh=function(){var t=new te(this.name);return t.region=this.region,t.path=this.path,t.color.setFromColor(this.color),t.deformAttachment=this.deformAttachment,t.setParentMesh(null!=this.parentMesh?this.parentMesh:this),t.updateUVs(),t},rt=te,nt.MeshAttachment=rt,st=St=St||{},at=st.VertexAttachment,kt(ee,at),ee.prototype.copy=function(){var t=new ee(name);return this.copyTo(t),t.lengths=new Array(this.lengths.length),st.Utils.arrayCopy(this.lengths,0,t.lengths,0,this.lengths.length),t.closed=closed,t.constantSpeed=this.constantSpeed,t.color.setFromColor(this.color),t},ot=ee,st.PathAttachment=ot,lt=St=St||{},ut=lt.VertexAttachment,kt(ne,ut),ne.prototype.computeWorldPosition=function(t,e){return e.x=this.x*t.a+this.y*t.b+t.worldX,e.y=this.x*t.c+this.y*t.d+t.worldY,e},ne.prototype.computeWorldRotation=function(t){var e=lt.MathUtils.cosDeg(this.rotation),n=lt.MathUtils.sinDeg(this.rotation),i=e*t.a+n*t.b,r=e*t.c+n*t.d;return Math.atan2(r,i)*lt.MathUtils.radDeg},ne.prototype.copy=function(){var t=new ne(name);return t.x=this.x,t.y=this.y,t.rotation=this.rotation,t.color.setFromColor(this.color),t},ct=ne,lt.PointAttachment=ct,ft=St=St||{},dt=ft.Attachment,kt(ie,dt),ie.prototype.updateOffset=function(){var t=this.width/this.region.originalWidth*this.scaleX,e=this.height/this.region.originalHeight*this.scaleY,n=-this.width/2*this.scaleX+this.region.offsetX*t,i=-this.height/2*this.scaleY+this.region.offsetY*e,r=n+this.region.width*t,s=i+this.region.height*e,a=this.rotation*Math.PI/180,o=Math.cos(a),h=Math.sin(a),l=n*o+this.x,u=n*h,c=i*o+this.y,f=i*h,d=r*o+this.x,p=r*h,m=s*o+this.y,g=s*h,v=this.offset;v[ie.OX1]=l-f,v[ie.OY1]=c+u,v[ie.OX2]=l-g,v[ie.OY2]=m+u,v[ie.OX3]=d-g,v[ie.OY3]=m+p,v[ie.OX4]=d-f,v[ie.OY4]=c+p},ie.prototype.setRegion=function(t){this.region=t;var e=this.uvs;t.rotate?(e[2]=t.u,e[3]=t.v2,e[4]=t.u,e[5]=t.v,e[6]=t.u2,e[7]=t.v,e[0]=t.u2,e[1]=t.v2):(e[0]=t.u,e[1]=t.v2,e[2]=t.u,e[3]=t.v,e[4]=t.u2,e[5]=t.v,e[6]=t.u2,e[7]=t.v2)},ie.prototype.computeWorldVertices=function(t,e,n,i){var r=this.offset,s=t.worldX,a=t.worldY,o=t.a,h=t.b,l=t.c,u=t.d,c=r[ie.OX1],f=r[ie.OY1];e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a,n+=i,c=r[ie.OX2],f=r[ie.OY2],e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a,n+=i,c=r[ie.OX3],f=r[ie.OY3],e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a,n+=i,c=r[ie.OX4],f=r[ie.OY4],e[n]=c*o+f*h+s,e[n+1]=c*l+f*u+a},ie.prototype.copy=function(){var t=new ie(this.name);return t.region=this.region,t.rendererObject=this.rendererObject,t.path=this.path,t.x=this.x,t.y=this.y,t.scaleX=this.scaleX,t.scaleY=this.scaleY,t.rotation=this.rotation,t.width=this.width,t.height=this.height,ft.Utils.arrayCopy(this.uvs,0,t.uvs,0,8),ft.Utils.arrayCopy(this.offset,0,t.offset,0,8),t.color.setFromColor(this.color),t},ie.OX1=0,ie.OY1=1,ie.OX2=2,ie.OY2=3,ie.OX3=4,ie.OY3=5,ie.OX4=6,ie.OY4=7,ie.X1=0,ie.Y1=1,ie.C1R=2,ie.C1G=3,ie.C1B=4,ie.C1A=5,ie.U1=6,ie.V1=7,ie.X2=8,ie.Y2=9,ie.C2R=10,ie.C2G=11,ie.C2B=12,ie.C2A=13,ie.U2=14,ie.V2=15,ie.X3=16,ie.Y3=17,ie.C3R=18,ie.C3G=19,ie.C3B=20,ie.C3A=21,ie.U3=22,ie.V3=23,ie.X4=24,ie.Y4=25,ie.C4R=26,ie.C4G=27,ie.C4B=28,ie.C4A=29,ie.U4=30,ie.V4=31,pt=ie,ft.RegionAttachment=pt,mt=St=St||{},re.prototype.begin=function(t){},re.prototype.transform=function(t,e,n,i){t.x+=mt.MathUtils.randomTriangular(-this.jitterX,this.jitterY),t.y+=mt.MathUtils.randomTriangular(-this.jitterX,this.jitterY)},re.prototype.end=function(){},gt=re,mt.JitterEffect=gt,vt=St=St||{},se.prototype.begin=function(t){this.worldX=t.x+this.centerX,this.worldY=t.y+this.centerY},se.prototype.transform=function(t,e,n,i){var r,s,a,o=this.angle*vt.MathUtils.degreesToRadians,h=t.x-this.worldX,l=t.y-this.worldY,u=Math.sqrt(h*h+l*l);u<this.radius&&(r=se.interpolation.apply(0,o,(this.radius-u)/this.radius),s=Math.cos(r),a=Math.sin(r),t.x=s*h-a*l+this.worldX,t.y=a*h+s*l+this.worldY)},se.prototype.end=function(){},se.interpolation=new vt.PowOut(2),yt=se,vt.SwirlEffect=yt,xt=St=St||{},wt=xt.canvas||(xt.canvas={}),Mt=xt.AssetManager,kt(ae,Mt),Et=ae,wt.AssetManager=Et,Tt=St=St||{},At=Tt.canvas||(Tt.canvas={}),bt=Tt.Texture,kt(oe,bt),oe.prototype.setFilters=function(t,e){},oe.prototype.setWraps=function(t,e){},oe.prototype.dispose=function(){},Rt=oe,At.CanvasTexture=Rt,It=St=St||{},Ct=It.canvas||(It.canvas={}),he.prototype.draw=function(t){this.triangleRendering?this.drawTriangles(t):this.drawImages(t)},he.prototype.drawImages=function(t){var e=this.ctx,n=t.drawOrder;this.debugRendering&&(e.strokeStyle="green"),e.save();for(var i=0,r=n.length;i<r;i++){var s,a,o,h,l,u,c,f,d,p,m,g,v,y,x,w=n[i];w.bone.active&&(h=o=a=null,(s=w.getAttachment())instanceof It.RegionAttachment&&(h=(o=(a=s).region).texture.getImage(),l=w.bone.skeleton.color,u=w.color,c=a.color,f=l.a*u.a*c.a,(d=this.tempColor).set(l.r*u.r*c.r,l.g*u.g*c.g,l.b*u.b*c.b,f),p=s,m=w.bone,y=o.width,x=o.height,e.save(),e.transform(m.a,m.c,m.b,m.d,m.worldX,m.worldY),e.translate(s.offset[0],s.offset[1]),e.rotate(s.rotation*Math.PI/180),g=p.width/y,e.scale(g*s.scaleX,g*s.scaleY),e.translate(y/2,x/2),s.region.rotate&&(v=y,y=x,x=v,e.rotate(-Math.PI/2)),e.scale(1,-1),e.translate(-y/2,-x/2),1==d.r&&1==d.g&&1==d.b&&1==d.a||(e.globalAlpha=d.a),e.drawImage(h,o.x,o.y,y,x,0,0,y,x),this.debugRendering&&e.strokeRect(0,0,y,x),e.restore()))}e.restore()},he.prototype.drawTriangles=function(t){for(var e=null,n=this.vertices,i=null,r=t.drawOrder,s=0,a=r.length;s<a;s++){var o=r[s],h=o.getAttachment(),l=null;if(h instanceof It.RegionAttachment)var u=h,n=this.computeRegionVertices(o,u,!1),i=he.QUAD_TRIANGLES,l=u.region.texture.getImage();else{if(!(h instanceof It.MeshAttachment))continue;var c=h;n=this.computeMeshVertices(o,c,!1),i=c.triangles,l=c.region.renderObject.texture.getImage()}if(null!=l){var f=o.data.blendMode;f!=e&&(e=f);var d=o.bone.skeleton.color,p=o.color,m=h.color,g=d.a*p.a*m.a,v=this.tempColor;v.set(d.r*p.r*m.r,d.g*p.g*m.g,d.b*p.b*m.b,g);var y=this.ctx;1==v.r&&1==v.g&&1==v.b&&1==v.a||(y.globalAlpha=v.a);for(var x=0;x<i.length;x+=3){var w=8*i[x],M=8*i[x+1],E=8*i[x+2],T=n[w],A=n[1+w],b=n[6+w],R=n[7+w],S=n[M],I=n[1+M],C=n[6+M],P=n[7+M],k=n[E],F=n[1+E],V=n[6+E],O=n[7+E];this.drawTriangle(l,T,A,b,R,S,I,C,P,k,F,V,O),this.debugRendering&&(y.strokeStyle="green",y.beginPath(),y.moveTo(T,A),y.lineTo(S,I),y.lineTo(k,F),y.lineTo(T,A),y.stroke())}}}this.ctx.globalAlpha=1},he.prototype.drawTriangle=function(t,e,n,i,r,s,a,o,h,l,u,c,f){var d=this.ctx;i*=t.width,r*=t.height,o*=t.width,h*=t.height,c*=t.width,f*=t.height,d.beginPath(),d.moveTo(e,n),d.lineTo(s,a),d.lineTo(l,u),d.closePath();var p=1/((o-=i)*(f-=r)-(c-=i)*(h-=r)),m=(f*(s-=e)-h*(l-=e))*p,g=(f*(a-=n)-h*(u-=n))*p,v=(o*l-c*s)*p,y=(o*u-c*a)*p,x=e-m*i-v*r,w=n-g*i-y*r;d.save(),d.transform(m,g,v,y,x,w),d.clip(),d.drawImage(t,0,0),d.restore()},he.prototype.computeRegionVertices=function(t,e,n){var i=t.bone.skeleton.color,r=t.color,s=e.color,a=i.a*r.a*s.a,o=n?a:1,h=this.tempColor;h.set(i.r*r.r*s.r*o,i.g*r.g*s.g*o,i.b*r.b*s.b*o,a),e.computeWorldVertices(t.bone,this.vertices,0,he.VERTEX_SIZE);var l=this.vertices,u=e.uvs;return l[It.RegionAttachment.C1R]=h.r,l[It.RegionAttachment.C1G]=h.g,l[It.RegionAttachment.C1B]=h.b,l[It.RegionAttachment.C1A]=h.a,l[It.RegionAttachment.U1]=u[0],l[It.RegionAttachment.V1]=u[1],l[It.RegionAttachment.C2R]=h.r,l[It.RegionAttachment.C2G]=h.g,l[It.RegionAttachment.C2B]=h.b,l[It.RegionAttachment.C2A]=h.a,l[It.RegionAttachment.U2]=u[2],l[It.RegionAttachment.V2]=u[3],l[It.RegionAttachment.C3R]=h.r,l[It.RegionAttachment.C3G]=h.g,l[It.RegionAttachment.C3B]=h.b,l[It.RegionAttachment.C3A]=h.a,l[It.RegionAttachment.U3]=u[4],l[It.RegionAttachment.V3]=u[5],l[It.RegionAttachment.C4R]=h.r,l[It.RegionAttachment.C4G]=h.g,l[It.RegionAttachment.C4B]=h.b,l[It.RegionAttachment.C4A]=h.a,l[It.RegionAttachment.U4]=u[6],l[It.RegionAttachment.V4]=u[7],l},he.prototype.computeMeshVertices=function(t,e,n){var i=t.bone.skeleton.color,r=t.color,s=e.color,a=i.a*r.a*s.a,o=n?a:1,h=this.tempColor;h.set(i.r*r.r*s.r*o,i.g*r.g*s.g*o,i.b*r.b*s.b*o,a);var l=e.worldVerticesLength/2;this.vertices.length<e.worldVerticesLength&&(this.vertices=It.Utils.newFloatArray(e.worldVerticesLength));var u=this.vertices;e.computeWorldVertices(t,0,e.worldVerticesLength,u,0,he.VERTEX_SIZE);for(var c=e.uvs,f=0,d=l,p=0,m=2;f<d;f++)u[m++]=h.r,u[m++]=h.g,u[m++]=h.b,u[m++]=h.a,u[m++]=c[p++],u[m++]=c[p++],m+=2;return u},he.QUAD_TRIANGLES=[0,1,2,2,3,0],he.VERTEX_SIZE=8,Pt=he,Ct.SkeletonRenderer=Pt,le.exports=St}).call(window)},function(t,e,n){var i=n(0),y=n(4),x=n(177),d=n(2),p=n(191),m=n(192),g=n(193),r=new i({Extends:m,initialize:function(t,e,n,i,r,s,a){var o,h,l,u=[],c=t.cacheManager.custom.spine;if(d(e)){var f=e;for(e=y(f,"key"),h=new p(t,{key:e,url:y(f,"jsonURL"),extension:y(f,"jsonExtension","json"),xhrSettings:y(f,"jsonXhrSettings")}),i=y(f,"atlasURL"),r=y(f,"preMultipliedAlpha"),Array.isArray(i)||(i=[i]),o=0;o<i.length;o++)(l=new g(t,{key:e+"_"+o,url:i[o],extension:y(f,"atlasExtension","atlas"),xhrSettings:y(f,"atlasXhrSettings")})).cache=c,u.push(l)}else for(h=new p(t,e,n,s),Array.isArray(i)||(i=[i]),o=0;o<i.length;o++)(l=new g(t,e+"_"+o,i[o],a)).cache=c,u.push(l);u.unshift(h),m.call(this,t,"spine",e,u),this.config.preMultipliedAlpha=r},onFileComplete:function(t){if(-1!==this.files.indexOf(t)&&(this.pending--,"text"===t.type)){for(var e=t.data.split("\n"),n=[],i=0;i<e.length;i++){var r=e[i];""===r.trim()&&i<e.length-1&&(r=e[i+1],n.push(r))}var s=this.config,a=this.loader,o=a.baseURL,h=a.path,l=a.prefix,u=y(s,"baseURL",this.baseURL),c=y(s,"path",t.src.match(/^.*\//))[0],f=y(s,"prefix",this.prefix),d=y(s,"textureXhrSettings");a.setBaseURL(u),a.setPath(c),a.setPrefix(f);for(var p=0;p<n.length;p++){var m=n[p],g=this.prefix+m,v=new x(a,g,m,d);this.addToMultiFile(v),a.addFile(v)}a.setBaseURL(o),a.setPath(h),a.setPrefix(l)}},addToCache:function(){if(this.isReadyToProcess()){var t;this.files[0].addToCache();for(var e="",n="",i=!!this.config.preMultipliedAlpha,r=1;r<this.files.length;r++){var s,a,o,h=this.files[r];"text"===h.type?(e=h.key.replace(/_[\d]$/,""),t=h.cache,n=n.concat(h.data)):(a=(s=h.key.trim()).indexOf("_"),o=s.substr(a+1),this.loader.textureManager.addImage(o,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),f=n(4),d=n(2),a=new i({Extends:c,initialize:function t(e,n,i,r,s){var a,o,h="png";d(n)&&(n=f(o=n,"key"),i=f(o,"url"),a=f(o,"normalMap"),r=f(o,"xhrSettings"),h=f(o,"extension",h),s=f(o,"frameConfig")),Array.isArray(i)&&(a=i[1],i=i[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:n,url:i,xhrSettings:r,config:s};c.call(this,e,u),a&&((l=new t(e,this.key,a,r,s)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new a(this,t[i]));else this.addFile(new a(this,t,e,n));return this}),t.exports=a},function(t,e,n){t.exports={ADD:n(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),f=n(2),s=new i({Extends:l,initialize:function(t,e,n,i,r){var s,a="json";f(e)&&(e=u(s=e,"key"),n=u(s,"url"),i=u(s,"xhrSettings"),a=u(s,"extension",a),r=u(s,"dataKey",r));var o={type:"json",cache:t.cacheManager.json,extension:a,responseType:"text",key:e,url:n,xhrSettings:i,config:r};l.call(this,t,o),f(n)&&(this.data=r?c(n,r):n,this.state=h.FILE_POPULATED)},onProcess:function(){var t,e;this.state!==h.FILE_POPULATED&&(this.state=h.FILE_PROCESSING,t=JSON.parse(this.xhrLoader.responseText),e=this.config,this.data="string"==typeof e?c(t,e,t):t),this.onProcessComplete()}});r.register("json",function(t,e,n,i){if(Array.isArray(t))for(var r=0;r<t.length;r++)this.addFile(new s(this,t[r]));else this.addFile(new s(this,t,e,i,n));return this}),t.exports=s},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){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),o=n(13),s=n(14),h=n(4),l=n(2),a=new i({Extends:o,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 a={type:"text",cache:t.cacheManager.text,extension:s,responseType:"text",key:e,url:n,xhrSettings:i};o.call(this,t,a)},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=this.xhrLoader.responseText,this.onProcessComplete()}});s.register("text",function(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new a(this,t[i]));else this.addFile(new a(this,t,e,n));return this}),t.exports=a},function(t,e,n){var h=n(16),l=n(9),i=n(0),r=n(195),s=n(196),a=n(197),o=n(198),u=n(199),c=n(201),f=n(7),d=n(27),p=n(202),m=n(10),g=n(225),v=n(232),y=new i({Extends:p,Mixins:[r,s,a,o,u,c,v],initialize:function(t,e,n,i,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=0,this.setPosition(n,i),r&&this.setSkeleton(r,s,a)},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,a=16777215<t?(t>>>24)/255:null,o=this.skeleton;return!e||(n=this.findSlot(e))&&(o=n),o.color.r=i,o.color.g=r,o.color.b=s,null!==a&&(o.color.a=a),this},setSkeletonFromJSON:function(t,e,n,i){return this.setSkeleton(t,e,n,i)},setSkeleton:function(t,e,n,i){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications());var r=this.plugin.createSkeleton(t,i);this.skeletonData=r.skeletonData,this.preMultipliedAlpha=r.preMultipliedAlpha;var s=r.skeleton;return s.setSkin(),s.setToSetupPose(),this.skeleton=s,r=this.plugin.createAnimationState(s),this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.state=r.state,this.stateData=r.stateData,this.state.addListener({event:this.onEvent.bind(this),complete:this.onComplete.bind(this),start:this.onStart.bind(this),end:this.onEnd.bind(this),dispose:this.onDispose.bind(this),interrupted:this.onInterrupted.bind(this)}),e&&this.setAnimation(0,e,n),this.root=this.getRootBone(),this.root&&(this.root.rotation=m(f(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=m(f(this.rotation))+90),this.updateSize(),this.skeleton.updateCache(),this},setSize:function(t,e,n,i){var r=this.skeleton;return void 0===t&&(t=r.data.width),void 0===e&&(e=r.data.height),void 0===n&&(n=0),void 0===i&&(i=0),this.width=t,this.height=e,this.displayOriginX=r.x-n,this.displayOriginY=r.y-i,this},setOffset:function(t,e){var n=this.skeleton;return void 0===t&&(t=0),void 0===e&&(e=0),this.displayOriginX=n.x-t,this.displayOriginY=n.y-e,this},updateSize:function(){var t=this.skeleton,e=this.plugin.renderer.height,n=this.scaleX,i=this.scaleY;t.x=this.x,t.y=e-this.y,t.scaleX=1,t.scaleY=1,t.updateWorldTransform();var r=this.getBounds();return this.width=r.size.x,this.height=r.size.y,this.displayOriginX=this.x-r.offset.x,this.displayOriginY=this.y-(e-(this.height+r.offset.y)),t.scaleX=n,t.scaleY=i,t.updateWorldTransform(),this},scaleX:{get:function(){return this._scaleX},set:function(t){this._scaleX=t,this.refresh()}},scaleY:{get:function(){return this._scaleY},set:function(t){this._scaleY=t,this.refresh()}},getBoneList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.bones.length;n++)t.push(e.bones[n].name);return t},getSkinList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.skins.length;n++)t.push(e.skins[n].name);return t},getSlotList:function(){for(var t=[],e=this.skeleton,n=0;n<e.slots.length;n++)t.push(e.slots[n].data.name);return t},getAnimationList:function(){var t=[],e=this.skeletonData;if(e)for(var n=0;n<e.animations.length;n++)t.push(e.animations[n].name);return t},getCurrentAnimation:function(t){void 0===t&&(t=0);var e=this.state.getCurrent(t);if(e)return e.animation},play:function(t,e,n){return this.setAnimation(0,t,e,n),this},setAnimation:function(t,e,n,i){if(void 0===n&&(n=!1),void 0===i&&(i=!1),i&&this.state){var r=this.state.getCurrent(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 a=this.plugin.renderer.height,o=f(h(t.worldX,a-t.worldY,e,n)+d(i));return t.rotation=l(m(o),r,s),this},findBone:function(t){return this.skeleton.findBone(t)},findBoneIndex:function(t){return this.skeleton.findBoneIndex(t)},findSlot:function(t){return this.skeleton.findSlot(t)},findSlotIndex:function(t){return this.skeleton.findSlotIndex(t)},findSkin:function(t){return this.skeletonData.findSkin(t)},findEvent:function(t){return this.skeletonData.findEvent(t)},findAnimation:function(t){return this.skeletonData.findAnimation(t)},findIkConstraint:function(t){return this.skeletonData.findIkConstraint(t)},findTransformConstraint:function(t){return this.skeletonData.findTransformConstraint(t)},findPathConstraint:function(t){return this.skeletonData.findPathConstraint(t)},findPathConstraintIndex:function(t){return this.skeletonData.findPathConstraintIndex(t)},getBounds:function(){return this.plugin.getBounds(this.skeleton)},preUpdate:function(t,e){var n=this.skeleton;this.state.update(e/1e3*this.timeScale),this.state.apply(n)},preDestroy:function(){this.state&&(this.state.clearListeners(),this.state.clearListenerNotifications()),this.plugin=null,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null}});t.exports=y},function(t,e){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),a=n(19),l=n(3),o={_scaleX:1,_scaleY:1,_rotation:0,x:0,y:0,z:0,w:0,scale:{get:function(){return(this._scaleX+this._scaleY)/2},set:function(t){this._scaleX=t,0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleX:{get:function(){return this._scaleX},set:function(t){0===(this._scaleX=t)?this.renderFlags&=-5:this.renderFlags|=4}},scaleY:{get:function(){return this._scaleY},set:function(t){0===(this._scaleY=t)?this.renderFlags&=-5:this.renderFlags|=4}},angle:{get:function(){return a(this._rotation*i.RAD_TO_DEG)},set:function(t){this.rotation=a(t)*i.DEG_TO_RAD}},rotation:{get:function(){return this._rotation},set:function(t){this._rotation=s(t)}},setPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=t),void 0===n&&(n=0),void 0===i&&(i=0),this.x=t,this.y=e,this.z=n,this.w=i,this},setRandomPosition:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=this.scene.sys.scale.width),void 0===i&&(i=this.scene.sys.scale.height),this.x=t+Math.random()*n,this.y=e+Math.random()*i,this},setRotation:function(t){return void 0===t&&(t=0),this.rotation=t,this},setAngle:function(t){return void 0===t&&(t=0),this.angle=t,this},setScale:function(t,e){return void 0===t&&(t=1),void 0===e&&(e=t),this.scaleX=t,this.scaleY=e,this},setX:function(t){return void 0===t&&(t=0),this.x=t,this},setY:function(t){return void 0===t&&(t=0),this.y=t,this},setZ:function(t){return void 0===t&&(t=0),this.z=t,this},setW:function(t){return void 0===t&&(t=0),this.w=t,this},getLocalTransformMatrix:function(t){return void 0===t&&(t=new r),t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY)},getWorldTransformMatrix:function(t,e){void 0===t&&(t=new r),void 0===e&&(e=new r);var n=this.parentContainer;if(!n)return this.getLocalTransformMatrix(t);for(t.applyITRS(this.x,this.y,this._rotation,this._scaleX,this._scaleY);n;)e.applyITRS(n.x,n.y,n._rotation,n._scaleX,n._scaleY),e.multiply(t,t),n=n.parentContainer;return t},getLocalPoint:function(t,e,n,i){n=n||new l;var r=(i=i||this.scene.sys.cameras.main).scrollX,s=i.scrollY,a=t+r*this.scrollFactorX-r,o=e+s*this.scrollFactorY-s;return this.parentContainer?this.getWorldTransformMatrix().applyInverse(a,o,n):h(a,o,this.x,this.y,this.rotation,this.scaleX,this.scaleY,n),this._originComponent&&(n.x+=this._displayOriginX,n.y+=this._displayOriginY),n},getParentRotation:function(){for(var t=0,e=this.parentContainer;e;)t+=e.rotation,e=e.parentContainer;return t}};t.exports=o},function(t,e,n){var i=n(0),s=n(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],a=i[2],o=i[3];return i[0]=r*n+a*e,i[1]=s*n+o*e,i[2]=r*-e+a*n,i[3]=s*-e+o*n,this},multiply:function(t,e){var n=this.matrix,i=t.matrix,r=n[0],s=n[1],a=n[2],o=n[3],h=n[4],l=n[5],u=i[0],c=i[1],f=i[2],d=i[3],p=i[4],m=i[5],g=void 0===e?this:e;return g.a=u*r+c*a,g.b=u*s+c*o,g.c=f*r+d*a,g.d=f*s+d*o,g.e=p*r+m*a+h,g.f=p*s+m*o+l,g},multiplyWithOffset:function(t,e,n){var i=this.matrix,r=t.matrix,s=i[0],a=i[1],o=i[2],h=i[3],l=e*s+n*o+i[4],u=e*a+n*h+i[5],c=r[0],f=r[1],d=r[2],p=r[3],m=r[4],g=r[5];return i[0]=c*s+f*o,i[1]=c*a+f*h,i[2]=d*s+p*o,i[3]=d*a+p*h,i[4]=m*s+g*o+l,i[5]=m*a+g*h+u,this},transform:function(t,e,n,i,r,s){var a=this.matrix,o=a[0],h=a[1],l=a[2],u=a[3],c=a[4],f=a[5];return a[0]=t*o+e*l,a[1]=t*h+e*u,a[2]=n*o+i*l,a[3]=n*h+i*u,a[4]=r*o+s*l+c,a[5]=r*h+s*u+f,this},transformPoint:function(t,e,n){void 0===n&&(n={x:0,y:0});var i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5];return n.x=t*r+e*a+h,n.y=t*s+e*o+l,n},invert:function(){var t=this.matrix,e=t[0],n=t[1],i=t[2],r=t[3],s=t[4],a=t[5],o=e*r-n*i;return t[0]=r/o,t[1]=-n/o,t[2]=-i/o,t[3]=e/o,t[4]=(i*a-r*s)/o,t[5]=-(e*a-n*s)/o,this},copyFrom:function(t){var e=this.matrix;return e[0]=t.a,e[1]=t.b,e[2]=t.c,e[3]=t.d,e[4]=t.e,e[5]=t.f,this},copyFromArray:function(t){var e=this.matrix;return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],this},copyToContext:function(t){var e=this.matrix;return t.transform(e[0],e[1],e[2],e[3],e[4],e[5]),t},setToContext:function(t){var e=this.matrix;return t.setTransform(e[0],e[1],e[2],e[3],e[4],e[5]),t},copyToArray:function(t){var e=this.matrix;return void 0===t?t=[e[0],e[1],e[2],e[3],e[4],e[5]]:(t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5]),t},setTransform:function(t,e,n,i,r,s){var a=this.matrix;return a[0]=t,a[1]=e,a[2]=n,a[3]=i,a[4]=r,a[5]=s,this},decomposeMatrix:function(){var t,e,n=this.decomposedMatrix,i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=r*o-s*a;return n.translateX=i[4],n.translateY=i[5],r||s?(t=Math.sqrt(r*r+s*s),n.rotation=0<s?Math.acos(r/t):-Math.acos(r/t),n.scaleX=t,n.scaleY=h/t):a||o?(e=Math.sqrt(a*a+o*o),n.rotation=.5*Math.PI-(0<o?Math.acos(-a/e):-Math.acos(a/e)),n.scaleX=h/e,n.scaleY=e):(n.rotation=0,n.scaleX=0,n.scaleY=0),n},applyITRS:function(t,e,n,i,r){var s=this.matrix,a=Math.sin(n),o=Math.cos(n);return s[4]=t,s[5]=e,s[0]=o*i,s[1]=a*i,s[2]=-a*r,s[3]=o*r,this},applyInverse:function(t,e,n){void 0===n&&(n=new c);var i=this.matrix,r=i[0],s=i[1],a=i[2],o=i[3],h=i[4],l=i[5],u=1/(r*o+a*-s);return n.x=o*u*t+-a*u*e+(l*a-h*o)*u,n.y=r*u*e+-s*u*t+(-l*r+h*s)*u,n},getX:function(t,e){return t*this.a+e*this.c+this.e},getY:function(t,e){return t*this.b+e*this.d+this.f},getXRound:function(t,e,n){var i=this.getX(t,e);return n&&(i=Math.round(i)),i},getYRound:function(t,e,n){var i=this.getY(t,e);return n&&(i=Math.round(i)),i},getCSSMatrix:function(){var t=this.matrix;return"matrix("+t[0]+","+t[1]+","+t[2]+","+t[3]+","+t[4]+","+t[5]+")"},destroy:function(){this.matrix=null,this.decomposedMatrix=null}});t.exports=r},function(t,e){var n={_visible:!0,visible:{get:function(){return this._visible},set:function(t){t?(this._visible=!0,this.renderFlags|=1):(this._visible=!1,this.renderFlags&=-2)}},setVisible:function(t){return this.visible=t,this}};t.exports=n},function(t,e,n){var i=n(0),r=n(203),s=n(204),a=n(210),o=n(211),h=new i({Extends:a,initialize:function(t,e){a.call(this),this.scene=t,this.type=e,this.state=0,this.parentContainer=null,this.name="",this.active=!0,this.tabIndex=-1,this.data=null,this.renderFlags=15,this.cameraFilter=0,this.input=null,this.body=null,this.ignoreDestroy=!1,t.sys.queueDepthSort()},setActive:function(t){return this.active=t,this},setName:function(t){return this.name=t,this},setState:function(t){return this.state=t,this},setDataEnabled:function(){return this.data||(this.data=new s(this)),this},setData:function(t,e){return this.data||(this.data=new s(this)),this.data.set(t,e),this},incData:function(t,e){return this.data||(this.data=new s(this)),this.data.inc(t,e),this},toggleData:function(t){return this.data||(this.data=new s(this)),this.data.toggle(t),this},getData:function(t){return this.data||(this.data=new s(this)),this.data.get(t)},setInteractive:function(t,e,n){return this.scene.sys.input.enable(this,t,e,n),this},disableInteractive:function(){return this.input&&(this.input.enabled=!1),this},removeInteractive:function(){return this.scene.sys.input.clear(this),this.input=void 0,this},addedToScene:function(){},removedFromScene:function(){},update:function(){},toJSON:function(){return r(this)},willRender:function(t){return!(h.RENDER_MASK!==this.renderFlags||0!==this.cameraFilter&&this.cameraFilter&t.id)},getIndexList:function(){for(var t=this,e=this.parentContainer,n=[];e&&(n.unshift(e.getIndex(t)),(t=e).parentContainer);)e=e.parentContainer;return n.unshift(this.scene.sys.displayList.getIndex(t)),n},destroy:function(t){var e;void 0===t&&(t=!1),this.scene&&!this.ignoreDestroy&&(this.preDestroy&&this.preDestroy.call(this),this.emit(o.DESTROY,this),e=this.scene.sys,t||e.displayList.remove(this),this.input&&(e.input.clear(this),this.input=void 0),this.data&&(this.data.destroy(),this.data=void 0),this.body&&(this.body.destroy(),this.body=void 0),t||e.queueDepthSort(),this.active=!1,this.visible=!1,this.scene=void 0,this.parentContainer=void 0,this.removeAllListeners())}});h.RENDER_MASK=15,t.exports=h},function(t,e){t.exports=function(t){var e={name:t.name,type:t.type,x:t.x,y:t.y,depth:t.depth,scale:{x:t.scaleX,y:t.scaleY},origin:{x:t.originX,y:t.originY},flipX:t.flipX,flipY:t.flipY,rotation:t.rotation,alpha:t.alpha,visible:t.visible,blendMode:t.blendMode,textureKey:"",frameKey:"",data:{}};return t.texture&&(e.textureKey=t.texture.key,e.frameKey=t.frame.name),e}},function(t,e,n){var i=n(0),o=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,a=this.parent,Object.defineProperty(this.values,n,{enumerable:!0,configurable:!0,get:function(){return r[n]},set:function(t){var e;i._frozen||(e=r[n],r[n]=t,s.emit(o.CHANGE_DATA,a,n,t,e),s.emit(o.CHANGE_DATA_KEY+n,a,t,e))}}),r[n]=t,s.emit(o.SET_DATA,a,n,t))),this;var i,r,s,a},each:function(t,e){for(var n=[this.parent,null,void 0],i=1;i<arguments.length;i++)n.push(arguments[i]);for(var r in this.list)n[1]=r,n[2]=this.list[r],t.apply(e,n);return this},merge:function(t,e){for(var n in void 0===e&&(e=!0),t)t.hasOwnProperty(n)&&(e||!e&&!this.has(n))&&this.setValue(n,t[n]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(o.CHANGE_DATA),this.events.off(o.SET_DATA),this.events.off(o.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=r},function(t,e,n){t.exports={CHANGE_DATA:n(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,d="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,i,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||t,r),a=d?d+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(d=!1)),a.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(d?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=d?d+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,s=new Array(r);i<r;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=d?d+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,r,s){var a=d?d+t:t;if(!this._events[a])return!1;var o,h=this._events[a],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,r),!0;case 6:return h.fn.call(h.context,e,n,i,r,s),!0}for(f=1,o=new Array(l-1);f<l;f++)o[f-1]=arguments[f];h.fn.apply(h.context,o)}else for(var u,c=h.length,f=0;f<c;f++)switch(h[f].once&&this.removeListener(t,h[f].fn,void 0,!0),l){case 1:h[f].fn.call(h[f].context);break;case 2:h[f].fn.call(h[f].context,e);break;case 3:h[f].fn.call(h[f].context,e,n);break;case 4:h[f].fn.call(h[f].context,e,n,i);break;default:if(!o)for(u=1,o=new Array(l-1);u<l;u++)o[u-1]=arguments[u];h[f].fn.apply(h[f].context,o)}return!0},a.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,i){var r=d?d+t:t;if(!this._events[r])return this;if(!e)return l(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,r);else{for(var a=0,o=[],h=s.length;a<h;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&o.push(s[a]);o.length?this._events[r]=1===o.length?o[0]:o:l(this,r)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=d?d+t:t,this._events[e]&&l(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=d,a.EventEmitter=a,t.exports=a},function(t,e,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);r=n(233),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e,n){var d=n(7),p=n(10),m=n(5);t.exports=function(t,e,n,i,r){var s,a,o,h=t.currentContext,l=e.plugin,u=e.skeleton,c=l.skeletonRenderer,f=!(15!==e.renderFlags||0!==e.cameraFilter&&e.cameraFilter&i.id);u&&f&&(s=t._tempMatrix1,a=t._tempMatrix2,o=t._tempMatrix3,a.applyITRS(e.x,e.y,e.rotation,Math.abs(e.scaleX),Math.abs(e.scaleY)),s.copyFrom(i.matrix),r?(s.multiplyWithOffset(r,-i.scrollX*e.scrollFactorX,-i.scrollY*e.scrollFactorY),a.e=e.x,a.f=e.y):(a.e-=i.scrollX*e.scrollFactorX,a.f-=i.scrollY*e.scrollFactorY),s.multiply(a,o),u.x=o.tx,u.y=o.ty,u.scaleX=o.scaleX,u.scaleY=-1*o.scaleY,e.scaleX<0?(u.scaleX*=-1,e.root.rotation=p(o.rotationNormalized)):e.root.rotation=m(p(d(o.rotationNormalized))+90,0,360),e.scaleY<0&&(u.scaleY*=-1,e.scaleX<0?e.root.rotation-=2*p(o.rotationNormalized):e.root.rotation+=2*p(o.rotationNormalized)),i.renderToTexture&&(u.y=o.ty,u.scaleY*=-1),u.updateWorldTransform(),c.ctx=h,c.debugRendering=l.drawDebug||e.drawDebug,h.save(),c.draw(u),h.restore())}}]);