phaser/plugins/spine/dist/SpineCanvasPlugin.min.js
2020-08-25 18:30:07 +01:00

1 line
No EOL
286 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=62)}([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,n){var i=n(0),r=n(31),s=new i({initialize:function(t,e){this.x=0,this.y=0,"object"==typeof t?(this.x=t.x||0,this.y=t.y||0):(void 0===e&&(e=t),this.x=t||0,this.y=e||0)},clone:function(){return new s(this.x,this.y)},copy:function(t){return this.x=t.x||0,this.y=t.y||0,this},setFromObject:function(t){return this.x=t.x||0,this.y=t.y||0,this},set:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setTo:function(t,e){return this.set(t,e)},setToPolar:function(t,e){return null==e&&(e=1),this.x=Math.cos(t)*e,this.y=Math.sin(t)*e,this},equals:function(t){return this.x===t.x&&this.y===t.y},fuzzyEquals:function(t,e){return r(this.x,t.x,e)&&r(this.y,t.y,e)},angle:function(){var t=Math.atan2(this.y,this.x);return t<0&&(t+=2*Math.PI),t},setAngle:function(t){return this.setToPolar(t,this.length())},add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.x-=t.x,this.y-=t.y,this},multiply:function(t){return this.x*=t.x,this.y*=t.y,this},scale:function(t){return isFinite(t)?(this.x*=t,this.y*=t):(this.x=0,this.y=0),this},divide:function(t){return this.x/=t.x,this.y/=t.y,this},negate:function(){return this.x=-this.x,this.y=-this.y,this},distance:function(t){var e=t.x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},distanceSq:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},length:function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},setLength:function(t){return this.normalize().scale(t)},lengthSq:function(){var t=this.x,e=this.y;return t*t+e*e},normalize:function(){var t=this.x,e=this.y,n=t*t+e*e;return 0<n&&(n=1/Math.sqrt(n),this.x=t*n,this.y=e*n),this},normalizeRightHand:function(){var t=this.x;return this.x=-1*this.y,this.y=t,this},normalizeLeftHand:function(){var t=this.x;return this.x=this.y,this.y=-1*t,this},dot:function(t){return this.x*t.x+this.y*t.y},cross:function(t){return this.x*t.y-this.y*t.x},lerp:function(t,e){void 0===e&&(e=0);var n=this.x,i=this.y;return this.x=n+e*(t.x-n),this.y=i+e*(t.y-i),this},transformMat3:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[3]*n+i[6],this.y=i[1]*e+i[4]*n+i[7],this},transformMat4:function(t){var e=this.x,n=this.y,i=t.val;return this.x=i[0]*e+i[4]*n+i[12],this.y=i[1]*e+i[5]*n+i[13],this},reset:function(){return this.x=0,this.y=0,this},limit:function(t){var e=this.length();return e&&t<e&&this.scale(t/e),this},reflect:function(t){return t=t.clone().normalize(),this.subtract(t.scale(2*this.dot(t)))},mirror:function(t){return this.reflect(t).negate()},rotate:function(t){var e=Math.cos(t),n=Math.sin(t);return this.set(e*this.x-n*this.y,n*this.x+e*this.y)}});s.ZERO=new s,s.RIGHT=new s(1,0),s.LEFT=new s(-1,0),s.UP=new s(0,-1),s.DOWN=new s(0,1),s.ONE=new s(1,1),t.exports=s},function(t,e){var n={PI2:2*Math.PI,TAU:.5*Math.PI,EPSILON:1e-6,DEG_TO_RAD:Math.PI/180,RAD_TO_DEG:180/Math.PI,RND:null,MIN_SAFE_INTEGER:Number.MIN_SAFE_INTEGER||-9007199254740991,MAX_SAFE_INTEGER:Number.MAX_SAFE_INTEGER||9007199254740991};t.exports=n},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e,n,i){var r=t.length;if(e<0||r<e||n<=e||r<n||r<e+n){if(i)throw new Error("Range Error: Values outside acceptable range");return!1}return!0}},function(t,e){t.exports=function(t,e,n){return Math.max(e,Math.min(n,t))}},function(t,e){t.exports=function(t,e,n){if(t&&"number"!=typeof t){if(t.hasOwnProperty(e))return t[e];if(-1===e.indexOf("."))return n;for(var i=e.split("."),r=t,s=n,a=0;a<i.length;a++){if(!r.hasOwnProperty(i[a])){s=n;break}s=r[i[a]],r=r[i[a]]}return s}return n}},function(t,e){t.exports=function(t){if("object"!=typeof t||t.nodeType||t===t.window)return!1;try{if(t.constructor&&!{}.hasOwnProperty.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(t){return!1}return!0}},function(t,e){t.exports=function(t,e,n){var i=typeof t;return t&&"number"!=i&&"string"!=i&&t.hasOwnProperty(e)&&void 0!==t[e]?t[e]:n}},function(t,e,n){var i=n(0),r=n(25),s=new i({initialize:function(t,e){void 0===t&&(t=0),void 0===e&&(e=t),this.type=r.POINT,this.x=t,this.y=e},setTo:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.x=t,this.y=e,this}});t.exports=s},function(t,e){t.exports=function(t,e,n){var i=n-e;return e+((t-e)%i+i)%i}},function(t,e){t.exports={LOADER_IDLE:0,LOADER_LOADING:1,LOADER_PROCESSING:2,LOADER_COMPLETE:3,LOADER_SHUTDOWN:4,LOADER_DESTROYED:5,FILE_PENDING:10,FILE_LOADING:11,FILE_LOADED:12,FILE_FAILED:13,FILE_PROCESSING:14,FILE_ERRORED:16,FILE_COMPLETE:17,FILE_DESTROYED:18,FILE_POPULATED:19}},function(t,e,n){var i=n(23),r=n(56);t.exports=function(t,e){if(void 0===e&&(e=90),!i(t))return null;if("string"!=typeof e&&(e=(e%360+360)%360),90===e||-270===e||"rotateLeft"===e)(t=r(t)).reverse();else if(-90===e||270===e||"rotateRight"===e)t.reverse(),t=r(t);else if(180===Math.abs(e)||"rotate180"===e){for(var n=0;n<t.length;n++)t[n].reverse();t.reverse()}return t}},function(t,e){t.exports=function(t,e){if(!(e>=t.length)){for(var n=t.length-1,i=t[e],r=e;r<n;r++)t[r]=t[r+1];return t.length=n,i}}},function(t,e){t.exports={SKIP_CHECK:-1,NORMAL:0,ADD:1,MULTIPLY:2,SCREEN:3,OVERLAY:4,DARKEN:5,LIGHTEN:6,COLOR_DODGE:7,COLOR_BURN:8,HARD_LIGHT:9,SOFT_LIGHT:10,DIFFERENCE:11,EXCLUSION:12,HUE:13,SATURATION:14,COLOR:15,LUMINOSITY:16,ERASE:17,SOURCE_IN:18,SOURCE_OUT:19,SOURCE_ATOP:20,DESTINATION_OVER:21,DESTINATION_IN:22,DESTINATION_OUT:23,DESTINATION_ATOP:24,LIGHTER:25,COPY:26,XOR:27}},function(t,e,n){var i=n(2);t.exports=function(t){return t>Math.PI&&(t-=i.PI2),Math.abs(((t+i.TAU)%i.PI2-i.PI2)%i.PI2)}},function(t,e){t.exports=function(t,e){return Math.random()*(e-t)+t}},function(t,e,n){var i=n(2);t.exports=function(t){return t*i.DEG_TO_RAD}},function(t,e,n){var i=n(2);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,n){var i=n(0),r=n(11),s=n(202),a=n(8),o=n(213),h=n(44),l=n(214),u=n(45),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){t.exports={ADDED_TO_SCENE:n(225),DESTROY:n(226),REMOVED_FROM_SCENE:n(227),VIDEO_COMPLETE:n(228),VIDEO_CREATED:n(229),VIDEO_ERROR:n(230),VIDEO_LOOP:n(231),VIDEO_PLAY:n(232),VIDEO_SEEKED:n(233),VIDEO_SEEKING:n(234),VIDEO_STOP:n(235),VIDEO_TIMEOUT:n(236),VIDEO_UNLOCKED:n(237)}},function(t,e){t.exports=function(t){if(!Array.isArray(t)||t.length<2||!Array.isArray(t[0]))return!1;for(var e=t[0].length,n=1;n<t.length;n++)if(t[n].length!==e)return!1;return!0}},function(t,e,n){var i=n(0),r=n(312),s=n(60),a=n(313),o=n(25),h=n(314),l=n(319),u=new i({initialize:function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.type=o.RECTANGLE,this.x=t,this.y=e,this.width=n,this.height=i},contains:function(t,e){return r(this,t,e)},getPoint:function(t,e){return s(this,t,e)},getPoints:function(t,e,n){return a(this,t,e,n)},getRandomPoint:function(t){return l(this,t)},setTo:function(t,e,n,i){return this.x=t,this.y=e,this.width=n,this.height=i,this},setEmpty:function(){return this.setTo(0,0,0,0)},setPosition:function(t,e){return void 0===e&&(e=t),this.x=t,this.y=e,this},setSize:function(t,e){return void 0===e&&(e=t),this.width=t,this.height=e,this},isEmpty:function(){return this.width<=0||this.height<=0},getLineA:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.y,this.right,this.y),t},getLineB:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.y,this.right,this.bottom),t},getLineC:function(t){return void 0===t&&(t=new h),t.setTo(this.right,this.bottom,this.x,this.bottom),t},getLineD:function(t){return void 0===t&&(t=new h),t.setTo(this.x,this.bottom,this.x,this.y),t},left:{get:function(){return this.x},set:function(t){t>=this.right?this.width=0:this.width=this.right-t,this.x=t}},right:{get:function(){return this.x+this.width},set:function(t){t<=this.x?this.width=0:this.width=t-this.x}},top:{get:function(){return this.y},set:function(t){t>=this.bottom?this.height=0:this.height=this.bottom-t,this.y=t}},bottom:{get:function(){return this.y+this.height},set:function(t){t<=this.y?this.height=0:this.height=t-this.y}},centerX:{get:function(){return this.x+this.width/2},set:function(t){this.x=t-this.width/2}},centerY:{get:function(){return this.y+this.height/2},set:function(t){this.y=t-this.height/2}}});t.exports=u},function(t,e){t.exports={CIRCLE:0,ELLIPSE:1,LINE:2,POINT:3,POLYGON:4,RECTANGLE:5,TRIANGLE:6}},function(t,e,n){var u=n(7),c=function(){var t,e,n,i,r,s,a=arguments[0]||{},o=1,h=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},o=2),h===o&&(a=this,--o);o<h;o++)if(null!=(t=arguments[o]))for(e in t)n=a[e],a!==(i=t[e])&&(l&&i&&(u(i)||(r=Array.isArray(i)))?(s=r?(r=!1,n&&Array.isArray(n)?n:[]):n&&u(n)?n:{},a[e]=c(l,s,i)):void 0!==i&&(a[e]=i));return a};t.exports=c},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(i-e,n-t)}},function(t,e){t.exports=function(t){return 0<=(t%=2*Math.PI)?t:t+2*Math.PI}},function(t,e,n){var i=n(10);t.exports=function(t){return i(t,-Math.PI,Math.PI)}},function(t,e,n){var i=n(10);t.exports=function(t){return i(t,-180,180)}},function(t,e){t.exports=function(t,e,n){return void 0===n&&(n=1e-4),Math.abs(t-e)<n}},function(t,e,n){var i=n(33);t.exports=function(t,e){return i(t)/i(e)/i(t-e)}},function(t,e){t.exports=function(t){if(0===t)return 1;for(var e=t;--t;)e*=t;return e}},function(t,e){t.exports=function(t,e,n,i,r){var s=.5*(i-e),a=.5*(r-n),o=t*t;return(2*n-2*i+s+a)*(t*o)+(-3*n+3*i-2*s-a)*o+s*t+n}},function(t,e){t.exports=function(t,e,n){return(e-t)*n+t}},function(t,e){t.exports=function(t,e,n){return t<=e?0:n<=t?1:(t=(t-e)/(n-e))*t*(3-2*t)}},function(t,e){t.exports=function(t,e,n){return(t=Math.max(0,Math.min(1,(t-e)/(n-e))))*t*t*(t*(6*t-15)+10)}},function(t,e){t.exports=function(t,e,n,i){var r=Math.cos(i),s=Math.sin(i),a=t.x-e,o=t.y-n;return t.x=a*r-o*s+e,t.y=a*s+o*r+n,t}},function(t,e){t.exports=function(t){return 0<t?Math.ceil(t):Math.floor(t)}},function(t,e,n){var m=n(1);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,T=r*l-s*h,E=r*u-a*h,A=s*u-a*l,R=c*g-f*m,S=c*v-d*m,b=c*y-p*m,I=f*v-d*g,C=f*y-p*g,P=d*y-p*v,_=x*P-w*C+M*I+T*b-E*S+A*R;return _?(_=1/_,n[0]=(h*P-l*C+u*I)*_,n[1]=(l*b-o*P-u*S)*_,n[2]=(o*C-h*b+u*R)*_,n[3]=(s*C-r*P-a*I)*_,n[4]=(i*P-s*b+a*S)*_,n[5]=(r*b-i*C-a*R)*_,n[6]=(g*A-v*E+y*T)*_,n[7]=(v*M-m*A-y*w)*_,n[8]=(m*E-g*M+y*x)*_,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,T=i*h-r*o,E=l*p-u*d,A=l*m-c*d,R=l*g-f*d,S=u*m-c*p,b=u*g-f*p,I=c*g-f*m,C=v*I-y*b+x*S+w*R-M*A+T*E;return C?(C=1/C,t[0]=(a*I-o*b+h*S)*C,t[1]=(i*b-n*I-r*S)*C,t[2]=(p*T-m*M+g*w)*C,t[3]=(c*M-u*T-f*w)*C,t[4]=(o*R-s*I-h*A)*C,t[5]=(e*I-i*R+r*A)*C,t[6]=(m*x-d*T-g*y)*C,t[7]=(l*T-c*x+f*y)*C,t[8]=(s*b-a*R+h*E)*C,t[9]=(n*R-e*b-r*E)*C,t[10]=(d*M-p*x+g*v)*C,t[11]=(u*x-l*M-f*v)*C,t[12]=(a*A-s*S-o*E)*C,t[13]=(e*S-n*A+i*E)*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],T=y[3];return e[0]=x*n+w*a+M*u+T*p,e[1]=x*i+w*o+M*c+T*m,e[2]=x*r+w*h+M*f+T*g,e[3]=x*s+w*l+M*d+T*v,x=y[4],w=y[5],M=y[6],T=y[7],e[4]=x*n+w*a+M*u+T*p,e[5]=x*i+w*o+M*c+T*m,e[6]=x*r+w*h+M*f+T*g,e[7]=x*s+w*l+M*d+T*v,x=y[8],w=y[9],M=y[10],T=y[11],e[8]=x*n+w*a+M*u+T*p,e[9]=x*i+w*o+M*c+T*m,e[10]=x*r+w*h+M*f+T*g,e[11]=x*s+w*l+M*d+T*v,x=y[12],w=y[13],M=y[14],T=y[15],e[12]=x*n+w*a+M*u+T*p,e[13]=x*i+w*o+M*c+T*m,e[14]=x*r+w*h+M*f+T*g,e[15]=x*s+w*l+M*d+T*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],T=i*i*l+h,E=r*i*l+s*o,A=s*i*l-r*o,R=i*r*l-s*o,S=r*r*l+h,b=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*T+p*E+y*A,n[1]=c*T+m*E+x*A,n[2]=f*T+g*E+w*A,n[3]=d*T+v*E+M*A,n[4]=u*R+p*S+y*b,n[5]=c*R+m*S+x*b,n[6]=f*R+g*S+w*b,n[7]=d*R+v*S+M*b,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,T=d*y-p*v;return(g=Math.sqrt(w*w+M*M+T*T))?(w*=g=1/g,M*=g,T*=g):T=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]=T,i[10]=m,i[11]=0,i[12]=-(v*r+y*s+x*a),i[13]=-(w*r+M*s+T*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(19),s=n(41),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(26),s=n(45);t.exports=function(t,e){var n=void 0===t?s():r({},t);if(e)for(var i in e)void 0!==e[i]&&(n[i]=e[i]);return n}},function(t,e){t.exports=function(t,e,n,i,r,s){return void 0===t&&(t=""),void 0===e&&(e=!0),void 0===n&&(n=""),void 0===i&&(i=""),void 0===r&&(r=0),void 0===s&&(s=!1),{responseType:t,async:e,user:n,password:i,timeout:r,headers:void 0,header:void 0,headerValue:void 0,requestedWith:!1,overrideMimeType:void 0,withCredentials:s}}},function(t,e){t.exports={width:0,height:0,displayWidth:{get:function(){return this.scaleX*this.width},set:function(t){this.scaleX=t/this.width}},displayHeight:{get:function(){return this.scaleY*this.height},set:function(t){this.scaleY=t/this.height}},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}}},function(t,e){var n={_depth:0,depth:{get:function(){return this._depth},set:function(t){this.scene.sys.queueDepthSort(),this._depth=t}},setDepth:function(t){return void 0===t&&(t=0),this.depth=t,this}};t.exports=n},function(t,e){t.exports={flipX:!1,flipY:!1,toggleFlipX:function(){return this.flipX=!this.flipX,this},toggleFlipY:function(){return this.flipY=!this.flipY,this},setFlipX:function(t){return this.flipX=t,this},setFlipY:function(t){return this.flipY=t,this},setFlip:function(t,e){return this.flipX=t,this.flipY=e,this},resetFlip:function(){return this.flipX=!1,this.flipY=!1,this}}},function(t,e){var n={scrollFactorX:1,scrollFactorY:1,setScrollFactor:function(t,e){return void 0===e&&(e=t),this.scrollFactorX=t,this.scrollFactorY=e,this}};t.exports=n},function(t,e,n){var i=n(2),r=n(51),h=n(40),s=n(29),a=n(30),l=n(1),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(2),c=n(1),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(54),s=n(219),a=n(55),o=n(22),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){"use strict";var i=Object.prototype.hasOwnProperty,d="~";function r(){}function o(t,e,n){this.fn=t,this.context=e,this.once=n||!1}function s(t,e,n,i,r){if("function"!=typeof n)throw new TypeError("The listener must be a function");var s=new o(n,i||t,r),a=d?d+e:e;return t._events[a]?t._events[a].fn?t._events[a]=[t._events[a],s]:t._events[a].push(s):(t._events[a]=s,t._eventsCount++),t}function l(t,e){0==--t._eventsCount?t._events=new r:delete t._events[e]}function a(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(d=!1)),a.prototype.eventNames=function(){var t,e,n=[];if(0===this._eventsCount)return n;for(e in t=this._events)i.call(t,e)&&n.push(d?e.slice(1):e);return Object.getOwnPropertySymbols?n.concat(Object.getOwnPropertySymbols(t)):n},a.prototype.listeners=function(t){var e=d?d+t:t,n=this._events[e];if(!n)return[];if(n.fn)return[n.fn];for(var i=0,r=n.length,s=new Array(r);i<r;i++)s[i]=n[i].fn;return s},a.prototype.listenerCount=function(t){var e=d?d+t:t,n=this._events[e];return n?n.fn?1:n.length:0},a.prototype.emit=function(t,e,n,i,r,s){var a=d?d+t:t;if(!this._events[a])return!1;var o,h=this._events[a],l=arguments.length;if(h.fn){switch(h.once&&this.removeListener(t,h.fn,void 0,!0),l){case 1:return h.fn.call(h.context),!0;case 2:return h.fn.call(h.context,e),!0;case 3:return h.fn.call(h.context,e,n),!0;case 4:return h.fn.call(h.context,e,n,i),!0;case 5:return h.fn.call(h.context,e,n,i,r),!0;case 6:return h.fn.call(h.context,e,n,i,r,s),!0}for(f=1,o=new Array(l-1);f<l;f++)o[f-1]=arguments[f];h.fn.apply(h.context,o)}else for(var u,c=h.length,f=0;f<c;f++)switch(h[f].once&&this.removeListener(t,h[f].fn,void 0,!0),l){case 1:h[f].fn.call(h[f].context);break;case 2:h[f].fn.call(h[f].context,e);break;case 3:h[f].fn.call(h[f].context,e,n);break;case 4:h[f].fn.call(h[f].context,e,n,i);break;default:if(!o)for(u=1,o=new Array(l-1);u<l;u++)o[u-1]=arguments[u];h[f].fn.apply(h[f].context,o)}return!0},a.prototype.on=function(t,e,n){return s(this,t,e,n,!1)},a.prototype.once=function(t,e,n){return s(this,t,e,n,!0)},a.prototype.removeListener=function(t,e,n,i){var r=d?d+t:t;if(!this._events[r])return this;if(!e)return l(this,r),this;var s=this._events[r];if(s.fn)s.fn!==e||i&&!s.once||n&&s.context!==n||l(this,r);else{for(var a=0,o=[],h=s.length;a<h;a++)(s[a].fn!==e||i&&!s[a].once||n&&s[a].context!==n)&&o.push(s[a]);o.length?this._events[r]=1===o.length?o[0]:o:l(this,r)}return this},a.prototype.removeAllListeners=function(t){var e;return t?(e=d?d+t:t,this._events[e]&&l(this,e)):(this._events=new r,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=d,a.EventEmitter=a,t.exports=a},function(t,e){t.exports=function(t){for(var e=t.length,n=t[0].length,i=new Array(n),r=0;r<n;r++){i[r]=new Array(e);for(var s=e-1;-1<s;s--)i[r][s]=t[s][r]}return i}},function(t,e){t.exports=function(t,e,n){if(!e.length)return NaN;if(1===e.length)return e[0];var i,r,s=1;if(n){if(t<e[0][n])return e[0];for(;e[s][n]<t;)s++}else for(;e[s]<t;)s++;return s>e.length&&(s=e.length),n?(i=e[s-1][n],(r=e[s][n])-t<=t-i?e[s]:e[s-1]):(i=e[s-1],(r=e[s])-t<=t-i?r:i)}},function(t,e){t.exports=function(t){for(var e=t.length-1;0<e;e--){var n=Math.floor(Math.random()*(e+1)),i=t[e];t[e]=t[n],t[n]=i}return t}},function(t,e,n){t.exports={ADD_ANIMATION:n(290),ANIMATION_COMPLETE:n(291),ANIMATION_REPEAT:n(292),ANIMATION_RESTART:n(293),ANIMATION_START:n(294),PAUSE_ALL:n(295),REMOVE_ANIMATION:n(296),RESUME_ALL:n(297),SPRITE_ANIMATION_COMPLETE:n(298),SPRITE_ANIMATION_KEY_COMPLETE:n(299),SPRITE_ANIMATION_KEY_REPEAT:n(300),SPRITE_ANIMATION_KEY_RESTART:n(301),SPRITE_ANIMATION_KEY_START:n(302),SPRITE_ANIMATION_KEY_UPDATE:n(303),SPRITE_ANIMATION_REPEAT:n(304),SPRITE_ANIMATION_RESTART:n(305),SPRITE_ANIMATION_START:n(306),SPRITE_ANIMATION_UPDATE:n(307)}},function(t,e,n){var r=n(61),s=n(9);t.exports=function(t,e,n){if(void 0===n&&(n=new s),e<=0||1<=e)return n.x=t.x,n.y=t.y,n;var i=r(t)*e;return.5<e?(i-=t.width+t.height)<=t.width?(n.x=t.right-i,n.y=t.bottom):(n.x=t.x,n.y=t.bottom-(i-t.width)):i<=t.width?(n.x=t.x+i,n.y=t.y):(n.x=t.right,n.y=t.y+(i-t.width)),n}},function(t,e){t.exports=function(t){return 2*(t.width+t.height)}},function(t,e,n){var u=n(63),i=n(0),p=n(6),r=n(174),s=n(175),m=n(199),h=n(200),c=n(218),a=n(247),o=n(3),l=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),this.renderer||(this.renderer={width:n.scale.width,height:n.scale.height,preRender:o,postRender:o,render:o,destroy:o});var l=this;e.registerFileType("spine",this.spineFileCallback,t),e.registerGameObject("spine",function(t,e,n,i,r){var s=new c(this.scene,l,t,e,n,i,r);return this.displayList.add(s),this.updateList.add(s),s},function(t,e){void 0===t&&(t={});var n=p(t,"key",null),i=p(t,"animationName",null),r=p(t,"loop",!1),s=new c(this.scene,l,0,0,n,i,r);void 0!==e&&(t.add=e),u(this.scene,s,t);var a=p(t,"skinName",!1);a&&s.setSkinByName(a);var o=p(t,"slotName",!1),h=p(t,"attachmentName",null);return o&&s.setAttachment(o,h),s.refresh()}),e.registerGameObject("spinecontainer",function(t,e,n){var i=new a(this.scene,l,t,e,n);return this.displayList.add(i),i},function(t,e){void 0===t&&(t={});var n=p(t,"x",0),i=p(t,"y",0),r=p(t,"children",null),s=new a(this.scene,l,n,i,r);return void 0!==e&&(t.add=e),u(this.scene,s,t),s})},boot:function(){this.isWebGL?(this.bootWebGL(),this.onResize(),this.game.scale.on(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}});l.SpineGameObject=c,t.exports=l},function(t,e,n){var l=n(14),u=n(64);t.exports=function(t,e,n){e.x=u(n,"x",0),e.y=u(n,"y",0),e.depth=u(n,"depth",0),e.flipX=u(n,"flipX",!1),e.flipY=u(n,"flipY",!1);var i=u(n,"scale",null);"number"==typeof i?e.setScale(i):null!==i&&(e.scaleX=u(i,"x",1),e.scaleY=u(i,"y",1));var r=u(n,"scrollFactor",null);"number"==typeof r?e.setScrollFactor(r):null!==r&&(e.scrollFactorX=u(r,"x",1),e.scrollFactorY=u(r,"y",1)),e.rotation=u(n,"rotation",0);var s=u(n,"angle",null);null!==s&&(e.angle=s),e.alpha=u(n,"alpha",1);var a,o,h=u(n,"origin",null);return"number"==typeof h?e.setOrigin(h):null!==h&&(a=u(h,"x",.5),o=u(h,"y",.5),e.setOrigin(a,o)),e.blendMode=u(n,"blendMode",l.NORMAL),e.visible=u(n,"visible",!0),u(n,"add",!0)&&t.sys.displayList.add(e),e.preUpdate&&t.sys.updateList.add(e),e}},function(t,e,n){var r=n(65),s=n(6);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(2),r=n(26)(!1,r={Angle:n(66),Distance:n(75),Easing:n(83),Fuzzy:n(128),Interpolation:n(133),Pow2:n(141),Snap:n(145),RandomDataGenerator:n(149),Average:n(150),Bernstein:n(32),Between:n(151),CatmullRom:n(34),CeilTo:n(152),Clamp:n(5),DegToRad:n(17),Difference:n(153),Factorial:n(33),FloatBetween:n(16),FloorTo:n(154),FromPercent:n(155),GetSpeed:n(156),IsEven:n(157),IsEvenStrict:n(158),Linear:n(35),MaxAdd:n(159),MinSub:n(160),Percent:n(161),RadToDeg:n(18),RandomXY:n(162),RandomXYZ:n(163),RandomXYZW:n(164),Rotate:n(165),RotateAround:n(38),RotateAroundDistance:n(166),RotateTo:n(167),RoundAwayFromZero:n(39),RoundTo:n(168),SinCosTableGenerator:n(169),SmootherStep:n(37),SmoothStep:n(36),ToXY:n(170),TransformXY:n(40),Within:n(171),Wrap:n(10),Vector2:n(1),Vector3:n(19),Vector4:n(172),Matrix3:n(41),Matrix4:n(42),Quaternion:n(43),RotateVec3:n(173)},i);t.exports=r},function(t,e,n){t.exports={Between:n(27),BetweenPoints:n(67),BetweenPointsY:n(68),BetweenY:n(69),CounterClockwise:n(15),Normalize:n(28),Random:n(70),RandomDegrees:n(71),Reverse:n(72),RotateTo:n(73),ShortestBetween:n(74),Wrap:n(29),WrapDegrees:n(30)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.y-t.y,e.x-t.x)}},function(t,e){t.exports=function(t,e){return Math.atan2(e.x-t.x,e.y-t.y)}},function(t,e){t.exports=function(t,e,n,i){return Math.atan2(n-t,i-e)}},function(t,e,n){var i=n(16);t.exports=function(){return i(-Math.PI,Math.PI)}},function(t,e,n){var i=n(16);t.exports=function(){return i(-180,180)}},function(t,e,n){var i=n(28);t.exports=function(t){return i(t+Math.PI)}},function(t,e,n){var i=n(2);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(76),BetweenPoints:n(77),BetweenPointsSquared:n(78),Chebyshev:n(79),Power:n(80),Snake:n(81),Squared:n(82)}},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(84),Bounce:n(88),Circular:n(92),Cubic:n(96),Elastic:n(100),Expo:n(104),Linear:n(108),Quadratic:n(110),Quartic:n(114),Quintic:n(118),Sine:n(122),Stepped:n(126)}},function(t,e,n){t.exports={In:n(85),Out:n(86),InOut:n(87)}},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(89),Out:n(90),InOut:n(91)}},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(93),Out:n(94),InOut:n(95)}},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(97),Out:n(98),InOut:n(99)}},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(101),Out:n(102),InOut:n(103)}},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(105),Out:n(106),InOut:n(107)}},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(109)},function(t,e){t.exports=function(t){return t}},function(t,e,n){t.exports={In:n(111),Out:n(112),InOut:n(113)}},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(115),Out:n(116),InOut:n(117)}},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(119),Out:n(120),InOut:n(121)}},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(123),Out:n(124),InOut:n(125)}},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(127)},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(129),Equal:n(31),Floor:n(130),GreaterThan:n(131),LessThan:n(132)}},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(134),CatmullRom:n(135),CubicBezier:n(136),Linear:n(137),QuadraticBezier:n(138),SmoothStep:n(139),SmootherStep:n(140)}},function(t,e,n){var s=n(32);t.exports=function(t,e){for(var n=0,i=t.length-1,r=0;r<=i;r++)n+=Math.pow(1-e,i-r)*Math.pow(e,r)*t[r]*s(i,r);return n}},function(t,e,n){var s=n(34);t.exports=function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i);return t[0]===t[n]?(e<0&&(r=Math.floor(i=n*(1+e))),s(i-r,t[(r-1+n)%n],t[r],t[(r+1)%n],t[(r+2)%n])):e<0?t[0]-(s(-i,t[0],t[0],t[1],t[1])-t[0]):1<e?t[n]-(s(i-n,t[n],t[n],t[n-1],t[n-1])-t[n]):s(i-r,t[r?r-1:0],t[r],t[n<r+1?n:r+1],t[n<r+2?n:r+2])}},function(t,e){t.exports=function(t,e,n,i,r){return(l=1-t)*l*l*e+3*(h=1-(o=t))*h*o*n+3*(1-(a=t))*a*a*i+(s=t)*s*s*r;var s,a,o,h,l}},function(t,e,n){var s=n(35);t.exports=function(t,e){var n=t.length-1,i=n*e,r=Math.floor(i);return e<0?s(t[0],t[1],i):1<e?s(t[n],t[n-1],n-i):s(t[r],t[n<r+1?n:r+1],i-r)}},function(t,e){t.exports=function(t,e,n,i){return(a=1-t)*a*e+2*(1-(s=t))*s*n+(r=t)*r*i;var r,s,a}},function(t,e,n){var i=n(36);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){var i=n(37);t.exports=function(t,e,n){return e+(n-e)*i(t,0,1)}},function(t,e,n){t.exports={GetNext:n(142),IsSize:n(143),IsValue:n(144)}},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(146),Floor:n(147),To:n(148)}},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(5);t.exports=function(t,e,n){return(n-e)*(t=i(t,0,1))}},function(t,e){t.exports=function(t,e){return t/e/1e3}},function(t,e){t.exports=function(t){return t==parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t){return t===parseFloat(t)?!(t%2):void 0}},function(t,e){t.exports=function(t,e,n){return Math.min(t+e,n)}},function(t,e){t.exports=function(t,e,n){return Math.max(t-e,n)}},function(t,e){t.exports=function(t,e,n,i){void 0===n&&(n=e+1);var r=(t-e)/(n-e);return 1<r?void 0!==i?(r=(i-t)/(i-n))<0&&(r=0):r=1:r<0&&(r=0),r}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI;return t.x=Math.cos(n)*e,t.y=Math.sin(n)*e,t}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);var n=2*Math.random()*Math.PI,i=2*Math.random()-1,r=Math.sqrt(1-i*i)*e;return t.x=Math.cos(n)*r,t.y=Math.sin(n)*r,t.z=i*e,t}},function(t,e){t.exports=function(t,e){return void 0===e&&(e=1),t.x=(2*Math.random()-1)*e,t.y=(2*Math.random()-1)*e,t.z=(2*Math.random()-1)*e,t.w=(2*Math.random()-1)*e,t}},function(t,e){t.exports=function(t,e){var n=t.x,i=t.y;return t.x=n*Math.cos(e)-i*Math.sin(e),t.y=n*Math.sin(e)+i*Math.cos(e),t}},function(t,e){t.exports=function(t,e,n,i,r){var s=i+Math.atan2(t.y-n,t.x-e);return t.x=e+r*Math.cos(s),t.y=n+r*Math.sin(s),t}},function(t,e){t.exports=function(t,e,n,i,r){return t.x=e+r*Math.cos(i),t.y=n+r*Math.sin(i),t}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=10);var i=Math.pow(n,-e);return Math.round(t*i)/i}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=1),void 0===n&&(n=1),void 0===i&&(i=1),i*=Math.PI/t;for(var r=[],s=[],a=0;a<t;a++)e+=(n-=e*i)*i,r[a]=n,s[a]=e;return{sin:s,cos:r,length:t}}},function(t,e,n){var a=n(1);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(19),r=n(42),s=n(43),a=new r,o=new s,h=new i;t.exports=function(t,e,n){return o.setAxisAngle(e,n),a.fromRotationTranslation(o,h.set(0,0,0)),t.transformMat4(a)}},function(t,e){t.exports="resize"},function(t,e,n){var i=n(176),r=n(0),s=n(177),a=new r({Extends:i,initialize:function(t,e){i.call(this,e),this.scene=t,this.systems=t.sys,t.sys.events.once(s.BOOT,this.boot,this)},boot:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=a},function(t,e,n){var i=new(n(0))({initialize:function(t){this.pluginManager=t,this.game=t.game},init:function(){},start:function(){},stop:function(){},destroy:function(){this.pluginManager=null,this.game=null,this.scene=null,this.systems=null}});t.exports=i},function(t,e,n){t.exports={ADDED_TO_SCENE:n(178),BOOT:n(179),CREATE:n(180),DESTROY:n(181),PAUSE:n(182),POST_UPDATE:n(183),PRE_UPDATE:n(184),READY:n(185),REMOVED_FROM_SCENE:n(186),RENDER:n(187),RESUME:n(188),SHUTDOWN:n(189),SLEEP:n(190),START:n(191),TRANSITION_COMPLETE:n(192),TRANSITION_INIT:n(193),TRANSITION_OUT:n(194),TRANSITION_START:n(195),TRANSITION_WAKE:n(196),UPDATE:n(197),WAKE:n(198)}},function(t,e){t.exports="addedtoscene"},function(t,e){t.exports="boot"},function(t,e){t.exports="create"},function(t,e){t.exports="destroy"},function(t,e){t.exports="pause"},function(t,e){t.exports="postupdate"},function(t,e){t.exports="preupdate"},function(t,e){t.exports="ready"},function(t,e){t.exports="removedfromscene"},function(t,e){t.exports="render"},function(t,e){t.exports="resume"},function(t,e){t.exports="shutdown"},function(t,e){t.exports="sleep"},function(t,e){t.exports="start"},function(t,e){t.exports="transitioncomplete"},function(t,e){t.exports="transitioninit"},function(t,e){t.exports="transitionout"},function(t,e){t.exports="transitionstart"},function(t,e){t.exports="transitionwake"},function(t,e){t.exports="update"},function(t,e){t.exports="wake"},function(le,t){(function(){var i,t,e,d,n,s,r,a,o,_,h,l,u,c,ht,f,p,m,g,j,v,y,x,w,M,T,E,A,R,S,b,I,C,P,K,k,F,O,L,N,D,V,Y,X,B,U,z,W,q,G,H,Z,Q,J,$,tt,et,nt,it,rt,st,at,ot,lt,ut,ct,ft,dt,pt,mt,gt,vt,yt,xt,wt,Mt,Tt,Et,At,Rt,St,bt,It,Ct,Pt,_t=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 kt(t){if(this.animationToMixTime={},this.defaultMix=0,null==t)throw new Error("skeletonData cannot be null.");this.skeletonData=t}function Ft(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 Lt(t,e,n){if(this.children=new Array,this.x=0,this.y=0,this.rotation=0,this.scaleX=0,this.scaleY=0,this.shearX=0,this.shearY=0,this.ax=0,this.ay=0,this.arotation=0,this.ascaleX=0,this.ascaleY=0,this.ashearX=0,this.ashearY=0,this.appliedValid=!1,this.a=0,this.b=0,this.c=0,this.d=0,this.worldY=0,this.worldX=0,this.sorted=!1,this.active=!1,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("skeleton cannot be null.");this.data=t,this.skeleton=e,this.parent=n,this.setToSetupPose()}function Nt(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 Vt(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 Bt(t){this.toLoad=new Array,this.assets={},this.clientId=t}function Ut(t){void 0===t&&(t=""),this.clientAssets={},this.queuedAssets={},this.rawAssets={},this.errors={},this.pathPrefix=t}function zt(t){if(this._updateCache=new Array,this.updateCacheReset=new Array,this.time=0,this.scaleX=1,this.scaleY=1,this.x=0,this.y=0,null==t)throw new Error("data cannot be null.");this.data=t,this.bones=new Array;for(var e=0;e<t.bones.length;e++){var n,i=t.bones[e],r=void 0;null==i.parent?r=new b.Bone(i,this,null):(n=this.bones[i.parent.index],r=new b.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 b.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 b.IkConstraint(o,this))}this.transformConstraints=new Array;for(e=0;e<t.transformConstraints.length;e++){var h=t.transformConstraints[e];this.transformConstraints.push(new b.TransformConstraint(h,this))}this.pathConstraints=new Array;for(e=0;e<t.pathConstraints.length;e++){var l=t.pathConstraints[e];this.pathConstraints.push(new b.PathConstraint(l,this))}this.color=new b.Color(1,1,1,1),this.updateCache()}function Wt(){this.minX=0,this.minY=0,this.maxX=0,this.maxY=0,this.boundingBoxes=new Array,this.polygons=new Array,this.polygonPool=new C.Pool(function(){return C.Utils.newFloatArray(16)})}function qt(){this.triangulator=new K.Triangulator,this.clippingPolygon=new Array,this.clipOutput=new Array,this.clippedVertices=new Array,this.clippedTriangles=new Array,this.scratch=new Array}function Gt(){this.bones=new Array,this.slots=new Array,this.skins=new Array,this.events=new Array,this.animations=new Array,this.ikConstraints=new Array,this.transformConstraints=new Array,this.pathConstraints=new Array,this.fps=0}function Ht(t,e){if(this.deform=new Array,null==t)throw new Error("data cannot be null.");if(null==e)throw new Error("bone cannot be null.");this.data=t,this.bone=e,this.color=new L.Color,this.darkColor=null==t.darkColor?null:new L.Color,this.setToSetupPose()}function jt(t,e,n){if(this.color=new D.Color(1,1,1,1),t<0)throw new Error("index must be >= 0.");if(null==e)throw new Error("name cannot be null.");if(null==n)throw new Error("boneData cannot be null.");this.index=t,this.name=e,this.boneData=n}function Kt(t,e){if(this.rotateMix=0,this.translateMix=0,this.scaleMix=0,this.shearMix=0,this.temp=new V.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 Zt(t){var e=B.call(this,t,0,!1)||this;return e.bones=new Array,e.rotateMix=0,e.translateMix=0,e.scaleMix=0,e.shearMix=0,e.offsetRotation=0,e.offsetX=0,e.offsetY=0,e.offsetScaleX=0,e.offsetScaleY=0,e.offsetShearY=0,e.relative=!1,e.local=!1,e}function Qt(){this.convexPolygons=new Array,this.convexPolygonsIndices=new Array,this.indicesArray=new Array,this.isConcaveArray=new Array,this.triangles=new Array,this.polygonPool=new z.Pool(function(){return new Array}),this.polygonIndicesPool=new z.Pool(function(){return new Array})}function Jt(t){var e=Q.call(this,t)||this;return e.color=new Z.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 Rt.call(this,t)||this}function he(t){this.triangleRendering=!1,this.debugRendering=!1,this.vertices=It.Utils.newFloatArray(8192),this.tempColor=new It.Color,this.ctx=t}!function(B){var U,t,g,e,n,i,z=(r.prototype.hasTimeline=function(t){return 1==this.timelineIds[t]},r.prototype.apply=function(t,e,n,i,r,s,a,o){if(null==t)throw new Error("skeleton cannot be null.");i&&0!=this.duration&&(n%=this.duration,0<e&&(e%=this.duration));for(var h=this.timelines,l=0,u=h.length;l<u;l++)h[l].apply(t,e,n,r,s,a,o)},r.binarySearch=function(t,e,n){void 0===n&&(n=1);var i=0,r=t.length/n-2;if(0==r)return n;for(var s=r>>>1;;){if(t[(s+1)*n]<=e?i=s+1:r=s,i==r)return(i+1)*n;s=i+r>>>1}},r.linearSearch=function(t,e,n){for(var i=0,r=t.length-n;i<=r;i+=n)if(t[i]>e)return i;return-1},r);function r(t,e,n){if(null==t)throw new Error("name cannot be null.");if(null==e)throw new Error("timelines cannot be null.");this.name=t,this.timelines=e,this.timelineIds=[];for(var i=0;i<e.length;i++)this.timelineIds[e[i].getPropertyId()]=!0;this.duration=n}B.Animation=z,(t=U=B.MixBlend||(B.MixBlend={}))[t.setup=0]="setup",t[t.first=1]="first",t[t.replace=2]="replace",t[t.add=3]="add",(e=g=B.MixDirection||(B.MixDirection={}))[e.mixIn=0]="mixIn",e[e.mixOut=1]="mixOut",(i=n=B.TimelineType||(B.TimelineType={}))[i.rotate=0]="rotate",i[i.translate=1]="translate",i[i.scale=2]="scale",i[i.shear=3]="shear",i[i.attachment=4]="attachment",i[i.color=5]="color",i[i.deform=6]="deform",i[i.event=7]="event",i[i.drawOrder=8]="drawOrder",i[i.ikConstraint=9]="ikConstraint",i[i.transformConstraint=10]="transformConstraint",i[i.pathConstraintPosition=11]="pathConstraintPosition",i[i.pathConstraintSpacing=12]="pathConstraintSpacing",i[i.pathConstraintMix=13]="pathConstraintMix",i[i.twoColor=14]="twoColor";var s=(y.prototype.getFrameCount=function(){return this.curves.length/y.BEZIER_SIZE+1},y.prototype.setLinear=function(t){this.curves[t*y.BEZIER_SIZE]=y.LINEAR},y.prototype.setStepped=function(t){this.curves[t*y.BEZIER_SIZE]=y.STEPPED},y.prototype.getCurveType=function(t){var e=t*y.BEZIER_SIZE;if(e==this.curves.length)return y.LINEAR;var n=this.curves[e];return n==y.LINEAR?y.LINEAR:n==y.STEPPED?y.STEPPED:y.BEZIER},y.prototype.setCurve=function(t,e,n,i,r){var s=.03*(2*-e+i),a=.03*(2*-n+r),o=.006*(3*(e-i)+1),h=.006*(3*(n-r)+1),l=2*s+o,u=2*a+h,c=.3*e+s+.16666667*o,f=.3*n+a+.16666667*h,d=t*y.BEZIER_SIZE,p=this.curves;p[d++]=y.BEZIER;for(var 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=B.MathUtils.clamp(e,0,1);var n=this.curves,i=t*y.BEZIER_SIZE,r=n[i];if(r==y.LINEAR)return e;if(r==y.STEPPED)return 0;for(var s=0,a=++i,o=i+y.BEZIER_SIZE-1;i<o;i+=2)if(e<=(s=n[i])){var h=void 0,l=void 0;return(l=i==a?h=0:(h=n[i-2],n[i-1]))+(n[i+1]-l)*(e-h)/(s-h)}var u=n[i-1];return u+(1-u)*(e-s)/(1-s)},y.LINEAR=0,y.STEPPED=1,y.BEZIER=2,y.BEZIER_SIZE=19,y);function y(t){if(t<=0)throw new Error("frameCount must be > 0: "+t);this.curves=B.Utils.newFloatArray((t-1)*y.BEZIER_SIZE)}B.CurveTimeline=s;var a,o=(_t(v,a=s),v.prototype.getPropertyId=function(){return(n.rotate<<24)+this.boneIndex},v.prototype.setFrame=function(t,e,n){t<<=1,this.frames[t]=e,this.frames[t+v.ROTATION]=n},v.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return void(h.rotation=h.data.rotation);case U.first:var l=h.data.rotation-h.rotation;h.rotation+=(l-360*(16384-(16384.499999999996-l/360|0)))*r}else if(n>=o[o.length-v.ENTRIES]){var u=o[o.length+v.PREV_ROTATION];switch(s){case U.setup:h.rotation=h.data.rotation+u*r;break;case U.first:case U.replace:u+=h.data.rotation-h.rotation,u-=360*(16384-(16384.499999999996-u/360|0));case U.add:h.rotation+=u*r}}else{var c=z.binarySearch(o,n,v.ENTRIES),f=o[c+v.PREV_ROTATION],d=o[c],p=this.getCurvePercent((c>>1)-1,1-(n-d)/(o[c+v.PREV_TIME]-d)),m=f+((m=o[c+v.ROTATION]-f)-360*(16384-(16384.499999999996-m/360|0)))*p;switch(s){case U.setup:h.rotation=h.data.rotation+(m-360*(16384-(16384.499999999996-m/360|0)))*r;break;case U.first:case U.replace:m+=h.data.rotation-h.rotation;case U.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=B.Utils.newFloatArray(t<<1),e}B.RotateTimeline=o;var h,l=(_t(p,h=s),p.prototype.getPropertyId=function(){return(n.translate<<24)+this.boneIndex},p.prototype.setFrame=function(t,e,n,i){t*=p.ENTRIES,this.frames[t]=e,this.frames[t+p.X]=n,this.frames[t+p.Y]=i},p.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.x=h.data.x,void(h.y=h.data.y);case U.first:h.x+=(h.data.x-h.x)*r,h.y+=(h.data.y-h.y)*r}else{var l,u,c,f=0,d=0;switch(n>=o[o.length-p.ENTRIES]?(f=o[o.length+p.PREV_X],d=o[o.length+p.PREV_Y]):(f=o[(l=z.binarySearch(o,n,p.ENTRIES))+p.PREV_X],d=o[l+p.PREV_Y],u=o[l],c=this.getCurvePercent(l/p.ENTRIES-1,1-(n-u)/(o[l+p.PREV_TIME]-u)),f+=(o[l+p.X]-f)*c,d+=(o[l+p.Y]-d)*c),s){case U.setup:h.x=h.data.x+f*r,h.y=h.data.y+d*r;break;case U.first:case U.replace:h.x+=(h.data.x+f-h.x)*r,h.y+=(h.data.y+d-h.y)*r;break;case U.add:h.x+=f*r,h.y+=d*r}}},p.ENTRIES=3,p.PREV_TIME=-3,p.PREV_X=-2,p.PREV_Y=-1,p.X=1,p.Y=2,p);function p(t){var e=h.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*p.ENTRIES),e}B.TranslateTimeline=l;var u,c=(_t(x,u=l),x.prototype.getPropertyId=function(){return(n.scale<<24)+this.boneIndex},x.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.bones[this.boneIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.scaleX=h.data.scaleX,void(h.scaleY=h.data.scaleY);case U.first:h.scaleX+=(h.data.scaleX-h.scaleX)*r,h.scaleY+=(h.data.scaleY-h.scaleY)*r}else{var l,u,c,f=0,d=0;if(d=n>=o[o.length-x.ENTRIES]?(f=o[o.length+x.PREV_X]*h.data.scaleX,o[o.length+x.PREV_Y]*h.data.scaleY):(f=o[(l=z.binarySearch(o,n,x.ENTRIES))+x.PREV_X],d=o[l+x.PREV_Y],u=o[l],c=this.getCurvePercent(l/x.ENTRIES-1,1-(n-u)/(o[l+x.PREV_TIME]-u)),f=(f+(o[l+x.X]-f)*c)*h.data.scaleX,(d+(o[l+x.Y]-d)*c)*h.data.scaleY),1==r)s==U.add?(h.scaleX+=f-h.data.scaleX,h.scaleY+=d-h.data.scaleY):(h.scaleX=f,h.scaleY=d);else{var p=0,m=0;if(a==g.mixOut)switch(s){case U.setup:p=h.data.scaleX,m=h.data.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*B.MathUtils.signum(m)-m)*r;break;case U.first:case U.replace:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-p)*r,h.scaleY=m+(Math.abs(d)*B.MathUtils.signum(m)-m)*r;break;case U.add:p=h.scaleX,m=h.scaleY,h.scaleX=p+(Math.abs(f)*B.MathUtils.signum(p)-h.data.scaleX)*r,h.scaleY=m+(Math.abs(d)*B.MathUtils.signum(m)-h.data.scaleY)*r}else switch(s){case U.setup:p=Math.abs(h.data.scaleX)*B.MathUtils.signum(f),m=Math.abs(h.data.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case U.first:case U.replace:p=Math.abs(h.scaleX)*B.MathUtils.signum(f),m=Math.abs(h.scaleY)*B.MathUtils.signum(d),h.scaleX=p+(f-p)*r,h.scaleY=m+(d-m)*r;break;case U.add:p=B.MathUtils.signum(f),m=B.MathUtils.signum(d),h.scaleX=Math.abs(h.scaleX)*p+(f-Math.abs(h.data.scaleX)*p)*r,h.scaleY=Math.abs(h.scaleY)*m+(d-Math.abs(h.data.scaleY)*m)*r}}}},x);function x(t){return u.call(this,t)||this}B.ScaleTimeline=c;var f,d=(_t(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 U.setup:return h.shearX=h.data.shearX,void(h.shearY=h.data.shearY);case U.first:h.shearX+=(h.data.shearX-h.shearX)*r,h.shearY+=(h.data.shearY-h.shearY)*r}else{var l,u,c,f=0,d=0;switch(n>=o[o.length-m.ENTRIES]?(f=o[o.length+m.PREV_X],d=o[o.length+m.PREV_Y]):(f=o[(l=z.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 U.setup:h.shearX=h.data.shearX+f*r,h.shearY=h.data.shearY+d*r;break;case U.first:case U.replace:h.shearX+=(h.data.shearX+f-h.shearX)*r,h.shearY+=(h.data.shearY+d-h.shearY)*r;break;case U.add:h.shearX+=f*r,h.shearY+=d*r}}},m);function m(t){return f.call(this,t)||this}B.ShearTimeline=d;var w,M=(_t(T,w=s),T.prototype.getPropertyId=function(){return(n.color<<24)+this.slotIndex},T.prototype.setFrame=function(t,e,n,i,r,s){t*=T.ENTRIES,this.frames[t]=e,this.frames[t+T.R]=n,this.frames[t+T.G]=i,this.frames[t+T.B]=r,this.frames[t+T.A]=s},T.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n<h[0])switch(s){case U.setup:return void o.color.setFromColor(o.data.color);case U.first:var l=o.color,u=o.data.color;l.add((u.r-l.r)*r,(u.g-l.g)*r,(u.b-l.b)*r,(u.a-l.a)*r)}else{var c,f,d,p,m=0,g=0,v=0,y=0;n>=h[h.length-T.ENTRIES]?(m=h[(c=h.length)+T.PREV_R],g=h[c+T.PREV_G],v=h[c+T.PREV_B],y=h[c+T.PREV_A]):(m=h[(f=z.binarySearch(h,n,T.ENTRIES))+T.PREV_R],g=h[f+T.PREV_G],v=h[f+T.PREV_B],y=h[f+T.PREV_A],d=h[f],p=this.getCurvePercent(f/T.ENTRIES-1,1-(n-d)/(h[f+T.PREV_TIME]-d)),m+=(h[f+T.R]-m)*p,g+=(h[f+T.G]-g)*p,v+=(h[f+T.B]-v)*p,y+=(h[f+T.A]-y)*p),1==r?o.color.set(m,g,v,y):(l=o.color,s==U.setup&&l.setFromColor(o.data.color),l.add((m-l.r)*r,(g-l.g)*r,(v-l.b)*r,(y-l.a)*r))}}},T.ENTRIES=5,T.PREV_TIME=-5,T.PREV_R=-4,T.PREV_G=-3,T.PREV_B=-2,T.PREV_A=-1,T.R=1,T.G=2,T.B=3,T.A=4,T);function T(t){var e=w.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*T.ENTRIES),e}B.ColorTimeline=M;var E,A=(_t(R,E=s),R.prototype.getPropertyId=function(){return(n.twoColor<<24)+this.slotIndex},R.prototype.setFrame=function(t,e,n,i,r,s,a,o,h){t*=R.ENTRIES,this.frames[t]=e,this.frames[t+R.R]=n,this.frames[t+R.G]=i,this.frames[t+R.B]=r,this.frames[t+R.A]=s,this.frames[t+R.R2]=a,this.frames[t+R.G2]=o,this.frames[t+R.B2]=h},R.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=this.frames;if(n<h[0])switch(s){case U.setup:return o.color.setFromColor(o.data.color),void o.darkColor.setFromColor(o.data.darkColor);case U.first:var l=o.color,u=o.darkColor,c=o.data.color,f=o.data.darkColor;l.add((c.r-l.r)*r,(c.g-l.g)*r,(c.b-l.b)*r,(c.a-l.a)*r),u.add((f.r-u.r)*r,(f.g-u.g)*r,(f.b-u.b)*r,0)}else{var d,p,m,g,v=0,y=0,x=0,w=0,M=0,T=0,E=0;n>=h[h.length-R.ENTRIES]?(v=h[(d=h.length)+R.PREV_R],y=h[d+R.PREV_G],x=h[d+R.PREV_B],w=h[d+R.PREV_A],M=h[d+R.PREV_R2],T=h[d+R.PREV_G2],E=h[d+R.PREV_B2]):(v=h[(p=z.binarySearch(h,n,R.ENTRIES))+R.PREV_R],y=h[p+R.PREV_G],x=h[p+R.PREV_B],w=h[p+R.PREV_A],M=h[p+R.PREV_R2],T=h[p+R.PREV_G2],E=h[p+R.PREV_B2],m=h[p],g=this.getCurvePercent(p/R.ENTRIES-1,1-(n-m)/(h[p+R.PREV_TIME]-m)),v+=(h[p+R.R]-v)*g,y+=(h[p+R.G]-y)*g,x+=(h[p+R.B]-x)*g,w+=(h[p+R.A]-w)*g,M+=(h[p+R.R2]-M)*g,T+=(h[p+R.G2]-T)*g,E+=(h[p+R.B2]-E)*g),1==r?(o.color.set(v,y,x,w),o.darkColor.set(M,T,E,1)):(l=o.color,u=o.darkColor,s==U.setup&&(l.setFromColor(o.data.color),u.setFromColor(o.data.darkColor)),l.add((v-l.r)*r,(y-l.g)*r,(x-l.b)*r,(w-l.a)*r),u.add((M-u.r)*r,(T-u.g)*r,(E-u.b)*r,0))}}},R.ENTRIES=8,R.PREV_TIME=-8,R.PREV_R=-7,R.PREV_G=-6,R.PREV_B=-5,R.PREV_A=-4,R.PREV_R2=-3,R.PREV_G2=-2,R.PREV_B2=-1,R.R=1,R.G=2,R.B=3,R.A=4,R.R2=5,R.G2=6,R.B2=7,R);function R(t){var e=E.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*R.ENTRIES),e}B.TwoColorTimeline=A;var S=(b.prototype.getPropertyId=function(){return(n.attachment<<24)+this.slotIndex},b.prototype.getFrameCount=function(){return this.frames.length},b.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.attachmentNames[t]=n},b.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!=U.setup&&s!=U.first||this.setAttachment(t,u,u.data.attachmentName):(h=0,h=n>=o[o.length-1]?o.length-1:z.binarySearch(o,n,1)-1,l=this.attachmentNames[h],t.slots[this.slotIndex].setAttachment(null==l?null:t.getAttachment(this.slotIndex,l))):s==U.setup&&this.setAttachment(t,u,u.data.attachmentName))},b.prototype.setAttachment=function(t,e,n){e.attachment=null==n?null:t.getAttachment(this.slotIndex,n)},b);function b(t){this.frames=B.Utils.newFloatArray(t),this.attachmentNames=new Array(t)}B.AttachmentTimeline=S;var I,C=null,P=(_t(_,I=s),_.prototype.getPropertyId=function(){return(n.deform<<27)+ +this.attachment.id+this.slotIndex},_.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.frameVertices[t]=n},_.prototype.apply=function(t,e,n,i,r,s,a){var o=t.slots[this.slotIndex];if(o.bone.active){var h=o.getAttachment();if(h instanceof B.VertexAttachment&&h.deformAttachment==this.attachment){var l=o.deform;0==l.length&&(s=U.setup);var u=this.frameVertices,c=u[0].length,f=this.frames;if(n<f[0]){var d=h;switch(s){case U.setup:return void(l.length=0);case U.first:if(1==r){l.length=0;break}var p=B.Utils.setArraySize(l,c);if(null==d.bones)for(var 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=B.Utils.setArraySize(l,c);if(n>=f[f.length-1]){var y=u[f.length-1];if(1==r)if(s==U.add)if(null==(d=h).bones)for(var 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 B.Utils.arrayCopy(y,0,v,0,c);else switch(s){case U.setup:if(null==h.bones)for(var m=h.vertices,M=0;M<c;M++){var T=m[M];v[M]=T+(y[M]-T)*r}else for(var E=0;E<c;E++)v[E]=y[E]*r;break;case U.first:case U.replace:for(var A=0;A<c;A++)v[A]+=(y[A]-v[A])*r;break;case U.add:if(null==(d=h).bones)for(var m=d.vertices,R=0;R<c;R++)v[R]+=(y[R]-m[R])*r;else for(var S=0;S<c;S++)v[S]+=y[S]*r}}else{var b=z.binarySearch(f,n),I=u[b-1],C=u[b],P=f[b],_=this.getCurvePercent(b-1,1-(n-P)/(f[b-1]-P));if(1==r)if(s==U.add)if(null==(d=h).bones)for(var m=d.vertices,k=0;k<c;k++){var F=I[k];v[k]+=F+(C[k]-F)*_-m[k]}else for(var O=0;O<c;O++)F=I[O],v[O]+=F+(C[O]-F)*_;else for(var L=0;L<c;L++)F=I[L],v[L]=F+(C[L]-F)*_;else switch(s){case U.setup:if(null==h.bones)for(var m=h.vertices,N=0;N<c;N++)F=I[N],T=m[N],v[N]=T+(F+(C[N]-F)*_-T)*r;else for(var D=0;D<c;D++)F=I[D],v[D]=(F+(C[D]-F)*_)*r;break;case U.first:case U.replace:for(var V=0;V<c;V++)F=I[V],v[V]+=(F+(C[V]-F)*_-v[V])*r;break;case U.add:if(null==(d=h).bones)for(var m=d.vertices,Y=0;Y<c;Y++)F=I[Y],v[Y]+=(F+(C[Y]-F)*_-m[Y])*r;else for(var X=0;X<c;X++)F=I[X],v[X]+=(F+(C[X]-F)*_)*r}}}}}},_);function _(t){var e=I.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t),e.frameVertices=new Array(t),null==C&&(C=B.Utils.newFloatArray(64)),e}B.DeformTimeline=P;var k=(F.prototype.getPropertyId=function(){return n.event<<24},F.prototype.getFrameCount=function(){return this.frames.length},F.prototype.setFrame=function(t,e){this.frames[t]=e.time,this.events[t]=e},F.prototype.apply=function(t,e,n,i,r,s,a){if(null!=i){var o=this.frames,h=this.frames.length;if(n<e)this.apply(t,e,Number.MAX_VALUE,i,r,s,a),e=-1;else if(e>=o[h-1])return;if(!(n<o[0])){var l=0;if(e<o[0])l=0;else for(var u=o[l=z.binarySearch(o,e)];0<l&&o[l-1]==u;)l--;for(;l<h&&n>=o[l];l++)i.push(this.events[l])}}},F);function F(t){this.frames=B.Utils.newFloatArray(t),this.events=new Array(t)}B.EventTimeline=k;var O=(L.prototype.getPropertyId=function(){return n.drawOrder<<24},L.prototype.getFrameCount=function(){return this.frames.length},L.prototype.setFrame=function(t,e,n){this.frames[t]=e,this.drawOrders[t]=n},L.prototype.apply=function(t,e,n,i,r,s,a){var o=t.drawOrder,h=t.slots;if(a!=g.mixOut){var l=this.frames;if(n<l[0])s!=U.setup&&s!=U.first||B.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length);else{var u=0,u=n>=l[l.length-1]?l.length-1:z.binarySearch(l,n)-1,c=this.drawOrders[u];if(null==c)B.Utils.arrayCopy(h,0,o,0,h.length);else for(var f=0,d=c.length;f<d;f++)o[f]=h[c[f]]}}else s==U.setup&&B.Utils.arrayCopy(t.slots,0,t.drawOrder,0,t.slots.length)},L);function L(t){this.frames=B.Utils.newFloatArray(t),this.drawOrders=new Array(t)}B.DrawOrderTimeline=O;var N,D=(_t(V,N=s),V.prototype.getPropertyId=function(){return(n.ikConstraint<<24)+this.ikConstraintIndex},V.prototype.setFrame=function(t,e,n,i,r,s,a){t*=V.ENTRIES,this.frames[t]=e,this.frames[t+V.MIX]=n,this.frames[t+V.SOFTNESS]=i,this.frames[t+V.BEND_DIRECTION]=r,this.frames[t+V.COMPRESS]=s?1:0,this.frames[t+V.STRETCH]=a?1:0},V.prototype.apply=function(t,e,n,i,r,s,a){var o,h,l,u,c,f=this.frames,d=t.ikConstraints[this.ikConstraintIndex];if(d.active)if(n<f[0])switch(s){case U.setup:return d.mix=d.data.mix,d.softness=d.data.softness,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,void(d.stretch=d.data.stretch);case U.first:d.mix+=(d.data.mix-d.mix)*r,d.softness+=(d.data.softness-d.softness)*r,d.bendDirection=d.data.bendDirection,d.compress=d.data.compress,d.stretch=d.data.stretch}else n>=f[f.length-V.ENTRIES]?s==U.setup?(d.mix=d.data.mix+(f[f.length+V.PREV_MIX]-d.data.mix)*r,d.softness=d.data.softness+(f[f.length+V.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+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(d.mix+=(f[f.length+V.PREV_MIX]-d.mix)*r,d.softness+=(f[f.length+V.PREV_SOFTNESS]-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[f.length+V.PREV_BEND_DIRECTION],d.compress=0!=f[f.length+V.PREV_COMPRESS],d.stretch=0!=f[f.length+V.PREV_STRETCH])):(h=f[(o=z.binarySearch(f,n,V.ENTRIES))+V.PREV_MIX],l=f[o+V.PREV_SOFTNESS],u=f[o],c=this.getCurvePercent(o/V.ENTRIES-1,1-(n-u)/(f[o+V.PREV_TIME]-u)),s==U.setup?(d.mix=d.data.mix+(h+(f[o+V.MIX]-h)*c-d.data.mix)*r,d.softness=d.data.softness+(l+(f[o+V.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+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])):(d.mix+=(h+(f[o+V.MIX]-h)*c-d.mix)*r,d.softness+=(l+(f[o+V.SOFTNESS]-l)*c-d.softness)*r,a==g.mixIn&&(d.bendDirection=f[o+V.PREV_BEND_DIRECTION],d.compress=0!=f[o+V.PREV_COMPRESS],d.stretch=0!=f[o+V.PREV_STRETCH])))},V.ENTRIES=6,V.PREV_TIME=-6,V.PREV_MIX=-5,V.PREV_SOFTNESS=-4,V.PREV_BEND_DIRECTION=-3,V.PREV_COMPRESS=-2,V.PREV_STRETCH=-1,V.MIX=1,V.SOFTNESS=2,V.BEND_DIRECTION=3,V.COMPRESS=4,V.STRETCH=5,V);function V(t){var e=N.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*V.ENTRIES),e}B.IkConstraintTimeline=D;var Y,X=(_t(W,Y=s),W.prototype.getPropertyId=function(){return(n.transformConstraint<<24)+this.transformConstraintIndex},W.prototype.setFrame=function(t,e,n,i,r,s){t*=W.ENTRIES,this.frames[t]=e,this.frames[t+W.ROTATE]=n,this.frames[t+W.TRANSLATE]=i,this.frames[t+W.SCALE]=r,this.frames[t+W.SHEAR]=s},W.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.transformConstraints[this.transformConstraintIndex];if(h.active)if(n<o[0]){var l=h.data;switch(s){case U.setup:return h.rotateMix=l.rotateMix,h.translateMix=l.translateMix,h.scaleMix=l.scaleMix,void(h.shearMix=l.shearMix);case U.first:h.rotateMix+=(l.rotateMix-h.rotateMix)*r,h.translateMix+=(l.translateMix-h.translateMix)*r,h.scaleMix+=(l.scaleMix-h.scaleMix)*r,h.shearMix+=(l.shearMix-h.shearMix)*r}}else{var u,c,f,d,p=0,m=0,g=0,v=0;n>=o[o.length-W.ENTRIES]?(p=o[(u=o.length)+W.PREV_ROTATE],m=o[u+W.PREV_TRANSLATE],g=o[u+W.PREV_SCALE],v=o[u+W.PREV_SHEAR]):(p=o[(c=z.binarySearch(o,n,W.ENTRIES))+W.PREV_ROTATE],m=o[c+W.PREV_TRANSLATE],g=o[c+W.PREV_SCALE],v=o[c+W.PREV_SHEAR],f=o[c],d=this.getCurvePercent(c/W.ENTRIES-1,1-(n-f)/(o[c+W.PREV_TIME]-f)),p+=(o[c+W.ROTATE]-p)*d,m+=(o[c+W.TRANSLATE]-m)*d,g+=(o[c+W.SCALE]-g)*d,v+=(o[c+W.SHEAR]-v)*d),s==U.setup?(l=h.data,h.rotateMix=l.rotateMix+(p-l.rotateMix)*r,h.translateMix=l.translateMix+(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)}},W.ENTRIES=5,W.PREV_TIME=-5,W.PREV_ROTATE=-4,W.PREV_TRANSLATE=-3,W.PREV_SCALE=-2,W.PREV_SHEAR=-1,W.ROTATE=1,W.TRANSLATE=2,W.SCALE=3,W.SHEAR=4,W);function W(t){var e=Y.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*W.ENTRIES),e}B.TransformConstraintTimeline=X;var q,G=(_t(H,q=s),H.prototype.getPropertyId=function(){return(n.pathConstraintPosition<<24)+this.pathConstraintIndex},H.prototype.setFrame=function(t,e,n){t*=H.ENTRIES,this.frames[t]=e,this.frames[t+H.VALUE]=n},H.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return void(h.position=h.data.position);case U.first:h.position+=(h.data.position-h.position)*r}else{var l,u,c,f=0;n>=o[o.length-H.ENTRIES]?f=o[o.length+H.PREV_VALUE]:(f=o[(l=z.binarySearch(o,n,H.ENTRIES))+H.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/H.ENTRIES-1,1-(n-u)/(o[l+H.PREV_TIME]-u)),f+=(o[l+H.VALUE]-f)*c),s==U.setup?h.position=h.data.position+(f-h.data.position)*r:h.position+=(f-h.position)*r}},H.ENTRIES=2,H.PREV_TIME=-2,H.PREV_VALUE=-1,H.VALUE=1,H);function H(t){var e=q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*H.ENTRIES),e}B.PathConstraintPositionTimeline=G;var j,K=(_t(Z,j=G),Z.prototype.getPropertyId=function(){return(n.pathConstraintSpacing<<24)+this.pathConstraintIndex},Z.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return void(h.spacing=h.data.spacing);case U.first:h.spacing+=(h.data.spacing-h.spacing)*r}else{var l,u,c,f=0;n>=o[o.length-Z.ENTRIES]?f=o[o.length+Z.PREV_VALUE]:(f=o[(l=z.binarySearch(o,n,Z.ENTRIES))+Z.PREV_VALUE],u=o[l],c=this.getCurvePercent(l/Z.ENTRIES-1,1-(n-u)/(o[l+Z.PREV_TIME]-u)),f+=(o[l+Z.VALUE]-f)*c),s==U.setup?h.spacing=h.data.spacing+(f-h.data.spacing)*r:h.spacing+=(f-h.spacing)*r}},Z);function Z(t){return j.call(this,t)||this}B.PathConstraintSpacingTimeline=K;var Q,J=(_t($,Q=s),$.prototype.getPropertyId=function(){return(n.pathConstraintMix<<24)+this.pathConstraintIndex},$.prototype.setFrame=function(t,e,n,i){t*=$.ENTRIES,this.frames[t]=e,this.frames[t+$.ROTATE]=n,this.frames[t+$.TRANSLATE]=i},$.prototype.apply=function(t,e,n,i,r,s,a){var o=this.frames,h=t.pathConstraints[this.pathConstraintIndex];if(h.active)if(n<o[0])switch(s){case U.setup:return h.rotateMix=h.data.rotateMix,void(h.translateMix=h.data.translateMix);case U.first:h.rotateMix+=(h.data.rotateMix-h.rotateMix)*r,h.translateMix+=(h.data.translateMix-h.translateMix)*r}else{var l,u,c,f=0,d=0;n>=o[o.length-$.ENTRIES]?(f=o[o.length+$.PREV_ROTATE],d=o[o.length+$.PREV_TRANSLATE]):(f=o[(l=z.binarySearch(o,n,$.ENTRIES))+$.PREV_ROTATE],d=o[l+$.PREV_TRANSLATE],u=o[l],c=this.getCurvePercent(l/$.ENTRIES-1,1-(n-u)/(o[l+$.PREV_TIME]-u)),f+=(o[l+$.ROTATE]-f)*c,d+=(o[l+$.TRANSLATE]-d)*c),s==U.setup?(h.rotateMix=h.data.rotateMix+(f-h.data.rotateMix)*r,h.translateMix=h.data.translateMix+(d-h.data.translateMix)*r):(h.rotateMix+=(f-h.rotateMix)*r,h.translateMix+=(d-h.translateMix)*r)}},$.ENTRIES=3,$.PREV_TIME=-3,$.PREV_ROTATE=-2,$.PREV_TRANSLATE=-1,$.ROTATE=1,$.TRANSLATE=2,$);function $(t){var e=Q.call(this,t)||this;return e.frames=B.Utils.newFloatArray(t*$.ENTRIES),e}B.PathConstraintMixTimeline=J}(bt=bt||{}),function(S){var t=(b.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()},b.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)},b.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?S.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==S.MixBlend.add)for(var d=0;d<c;d++){S.Utils.webkit602BugfixHelper(h,o);var p=f[d];p instanceof S.AttachmentTimeline?this.applyAttachmentTimeline(p,t,u,o,!0):p.apply(t,l,u,e,h,o,S.MixDirection.mixIn)}else{var m=a.timelineMode,g=0==a.timelinesRotation.length;g&&S.Utils.setArraySize(a.timelinesRotation,c<<1,null);for(var v=a.timelinesRotation,d=0;d<c;d++){var y=f[d],x=m[d]==b.SUBSEQUENT?o:S.MixBlend.setup;y instanceof S.RotateTimeline?this.applyRotateTimeline(y,t,u,h,x,v,d<<1,g):y instanceof S.AttachmentTimeline?this.applyAttachmentTimeline(y,t,u,o,!0):(S.Utils.webkit602BugfixHelper(h,o),y.apply(t,l,u,e,h,x,S.MixDirection.mixIn))}}this.queueEvents(a,u),e.length=0,a.nextAnimationLast=u,a.nextTrackLast=a.trackTime}}for(var w=this.unkeyedState+b.SETUP,M=t.slots,T=0,E=t.slots.length;T<E;T++){var A,R=M[T];R.attachmentState==w&&(A=R.data.attachmentName,R.attachment=null==A?null:t.getAttachment(R.data.index,A))}return this.unkeyedState+=2,this.queue.drain(),i},b.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==S.MixBlend.first&&(n=S.MixBlend.setup)):(1<(r=t.mixTime/t.mixDuration)&&(r=1),n!=S.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==S.MixBlend.add)for(var p=0;p<u;p++)c[p].apply(e,h,l,s,d,n,S.MixDirection.mixOut);else{var m=i.timelineMode,g=i.timelineHoldMix,v=0==i.timelinesRotation.length;v&&S.Utils.setArraySize(i.timelinesRotation,u<<1,null);for(var y=i.timelinesRotation,p=i.totalAlpha=0;p<u;p++){var x=c[p],w=S.MixDirection.mixOut,M=void 0,T=0;switch(m[p]){case b.SUBSEQUENT:if(!o&&x instanceof S.DrawOrderTimeline)continue;M=n,T=d;break;case b.FIRST:M=S.MixBlend.setup,T=d;break;case b.HOLD_SUBSEQUENT:M=n,T=f;break;case b.HOLD_FIRST:M=S.MixBlend.setup,T=f;break;default:M=S.MixBlend.setup;var E=g[p],T=f*Math.max(0,1-E.mixTime/E.mixDuration)}i.totalAlpha+=T,x instanceof S.RotateTimeline?this.applyRotateTimeline(x,e,l,T,M,y,p<<1,v):x instanceof S.AttachmentTimeline?this.applyAttachmentTimeline(x,e,l,M,a):(S.Utils.webkit602BugfixHelper(T,n),o&&x instanceof S.DrawOrderTimeline&&M==S.MixBlend.setup&&(w=S.MixDirection.mixIn),x.apply(e,h,l,s,T,M,w))}}return 0<t.mixDuration&&this.queueEvents(i,l),this.events.length=0,i.nextAnimationLast=l,i.nextTrackLast=i.trackTime,r},b.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!=S.MixBlend.setup&&i!=S.MixBlend.first||this.setAttachment(e,o,o.data.attachmentName,r):(a=n>=s[s.length-1]?s.length-1:S.Animation.binarySearch(s,n)-1,this.setAttachment(e,o,t.attachmentNames[a],r)),o.attachmentState<=this.unkeyedState&&(o.attachmentState=this.unkeyedState+b.SETUP))},b.prototype.setAttachment=function(t,e,n,i){e.attachment=null==n?null:t.getAttachment(e.data.index,n),i&&(e.attachmentState=this.unkeyedState+b.CURRENT)},b.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 S.MixBlend.setup:u.rotation=u.data.rotation;default:return;case S.MixBlend.first:c=u.rotation,f=u.data.rotation}else{var d,p,m,g,c=r==S.MixBlend.setup?u.data.rotation:u.rotation;n>=l[l.length-S.RotateTimeline.ENTRIES]?f=u.data.rotation+l[l.length+S.RotateTimeline.PREV_ROTATION]:(p=l[(d=S.Animation.binarySearch(l,n,S.RotateTimeline.ENTRIES))+S.RotateTimeline.PREV_ROTATION],m=l[d],g=h.getCurvePercent((d>>1)-1,1-(n-m)/(l[d+S.RotateTimeline.PREV_TIME]-m)),f=l[d+S.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,T=f-c;0==(T-=360*(16384-(16384.499999999996-T/360|0)))?M=s[a]:(y=v=0,y=o?(v=0,T):(v=s[a],s[a+1]),x=0<T,w=0<=v,S.MathUtils.signum(y)!=S.MathUtils.signum(T)&&Math.abs(y)<=90&&(180<Math.abs(v)&&(v+=360*S.MathUtils.signum(v)),w=x),M=T+v-v%360,w!=x&&(M+=360*S.MathUtils.signum(v)),s[a]=M),s[a+1]=T,c+=M*i,u.rotation=c-360*(16384-(16384.499999999996-c/360|0))}}else t.apply(e,0,n,null,1,r,S.MixDirection.mixIn)},b.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])},b.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()},b.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()}}},b.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)},b.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)},b.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},b.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)},b.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},b.prototype.setEmptyAnimation=function(t,e){var n=this.setAnimationWith(t,b.emptyAnimation,!1);return n.mixDuration=e,n.trackEnd=e,n},b.prototype.addEmptyAnimation=function(t,e,n){n<=0&&(n-=e);var i=this.addAnimationWith(t,b.emptyAnimation,!1,n);return i.mixDuration=e,i.trackEnd=e,i},b.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()},b.prototype.expandToIndex=function(t){return t<this.tracks.length?this.tracks[t]:(S.Utils.ensureArrayCapacity(this.tracks,t+1,null),this.tracks.length=t+1,null)},b.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=S.MixBlend.replace,r},b.prototype.disposeNext=function(t){for(var e=t.next;null!=e;)this.queue.dispose(e),e=e.next;t.next=null},b.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==S.MixBlend.add||this.computeHold(n),null!=(n=n.mixingTo););}}},b.prototype.computeHold=function(t){var e=t.mixingTo,n=t.animation.timelines,i=t.animation.timelines.length,r=S.Utils.setArraySize(t.timelineMode,i);t.timelineHoldMix.length=0;var s=S.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())?b.HOLD_FIRST:b.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 S.AttachmentTimeline||h instanceof S.DrawOrderTimeline||h instanceof S.EventTimeline||!e.animation.hasTimeline(l))r[o]=b.FIRST;else{for(var u=e.mixingTo;null!=u;u=u.mixingTo)if(!u.animation.hasTimeline(l)){if(0<t.mixDuration){r[o]=b.HOLD_MIX,s[o]=u;continue t}break}r[o]=b.HOLD_FIRST}else r[o]=b.SUBSEQUENT}},b.prototype.getCurrent=function(t){return t>=this.tracks.length?null:this.tracks[t]},b.prototype.addListener=function(t){if(null==t)throw new Error("listener cannot be null.");this.listeners.push(t)},b.prototype.removeListener=function(t){var e=this.listeners.indexOf(t);0<=e&&this.listeners.splice(e,1)},b.prototype.clearListeners=function(){this.listeners.length=0},b.prototype.clearListenerNotifications=function(){this.queue.clear()},b.emptyAnimation=new S.Animation("<empty>",[],0),b.SUBSEQUENT=0,b.FIRST=1,b.HOLD_SUBSEQUENT=2,b.HOLD_FIRST=3,b.HOLD_MIX=4,b.SETUP=1,b.CURRENT=2,b);function b(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 S.IntSet,this.animationsChanged=!1,this.trackEntryPool=new S.Pool(function(){return new e}),this.data=t}S.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=S.MixBlend.replace,this.timelineMode=new Array,this.timelineHoldMix=new Array,this.timelinesRotation=new Array}S.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}S.EventQueue=r,(i=o=S.EventType||(S.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(){}S.AnimationStateAdapter=a}(bt=bt||{}),t=bt=bt||{},kt.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)},kt.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},kt.prototype.getMix=function(t,e){var n=t.name+"."+e.name,i=this.animationToMixTime[n];return void 0===i?this.defaultMix:i},e=kt,t.AnimationStateData=e,d=bt=bt||{},Ft.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()},Ft.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()},Ft.prototype.setRawDataURI=function(t,e){this.rawDataUris[this.pathPrefix+t]=e},Ft.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++})},Ft.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++})},Ft.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},Ft.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++})},Ft.prototype.get=function(t){return t=this.pathPrefix+t,this.assets[t]},Ft.prototype.remove=function(t){t=this.pathPrefix+t;var e=this.assets[t];e.dispose&&e.dispose(),this.assets[t]=null},Ft.prototype.removeAll=function(){for(var t in this.assets){var e=this.assets[t];e.dispose&&e.dispose()}this.assets={}},Ft.prototype.isLoadingComplete=function(){return 0==this.toLoad},Ft.prototype.getToLoad=function(){return this.toLoad},Ft.prototype.getLoaded=function(){return this.loaded},Ft.prototype.dispose=function(){this.removeAll()},Ft.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Ft.prototype.getErrors=function(){return this.errors},n=Ft,d.AssetManager=n,s=bt=bt||{},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=bt=bt||{},(o=a.BlendMode||(a.BlendMode={}))[o.Normal=0]="Normal",o[o.Additive=1]="Additive",o[o.Multiply=2]="Multiply",o[o.Screen=3]="Screen",_=bt=bt||{},Lt.prototype.isActive=function(){return this.active},Lt.prototype.update=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},Lt.prototype.updateWorldTransform=function(){this.updateWorldTransformWith(this.x,this.y,this.rotation,this.scaleX,this.scaleY,this.shearX,this.shearY)},Lt.prototype.updateWorldTransformWith=function(t,e,n,i,r,s,a){this.ax=t,this.ay=e,this.arotation=n,this.ascaleX=i,this.ascaleY=r,this.ashearX=s,this.ashearY=a,this.appliedValid=!0;var o=this.parent;if(null==o){var h=this.skeleton,l=n+90+a,u=h.scaleX,c=h.scaleY;return this.a=_.MathUtils.cosDeg(n+s)*i*u,this.b=_.MathUtils.cosDeg(l)*r*u,this.c=_.MathUtils.sinDeg(n+s)*i*c,this.d=_.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 _.TransformMode.Normal:var l=n+90+a,g=_.MathUtils.cosDeg(n+s)*i,v=_.MathUtils.cosDeg(l)*r,y=_.MathUtils.sinDeg(n+s)*i,x=_.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 _.TransformMode.OnlyTranslation:l=n+90+a,this.a=_.MathUtils.cosDeg(n+s)*i,this.b=_.MathUtils.cosDeg(l)*r,this.c=_.MathUtils.sinDeg(n+s)*i,this.d=_.MathUtils.sinDeg(l)*r;break;case _.TransformMode.NoRotationOrReflection:var w=0,M=n+s-(w=1e-4<(E=f*f+p*p)?(E=Math.abs(f*m-d*p)/E,f/=this.skeleton.scaleX,d=(p/=this.skeleton.scaleY)*E,m=f*E,Math.atan2(p,f)*_.MathUtils.radDeg):(p=f=0,90-Math.atan2(m,d)*_.MathUtils.radDeg)),T=n+a-w+90,g=_.MathUtils.cosDeg(M)*i,v=_.MathUtils.cosDeg(T)*r,y=_.MathUtils.sinDeg(M)*i,x=_.MathUtils.sinDeg(T)*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 _.TransformMode.NoScale:case _.TransformMode.NoScaleOrReflection:var E,A=_.MathUtils.cosDeg(n),R=_.MathUtils.sinDeg(n),S=(f*A+d*R)/this.skeleton.scaleX,b=(p*A+m*R)/this.skeleton.scaleY;1e-5<(E=Math.sqrt(S*S+b*b))&&(E=1/E),S*=E,b*=E,E=Math.sqrt(S*S+b*b),this.data.transformMode==_.TransformMode.NoScale&&f*m-d*p<0!=(this.skeleton.scaleX<0!=this.skeleton.scaleY<0)&&(E=-E);var I=Math.PI/2+Math.atan2(b,S),C=Math.cos(I)*E,P=Math.sin(I)*E,g=_.MathUtils.cosDeg(s)*i,v=_.MathUtils.cosDeg(90+a)*r,y=_.MathUtils.sinDeg(s)*i,x=_.MathUtils.sinDeg(90+a)*r;this.a=S*g+C*y,this.b=S*v+C*x,this.c=b*g+P*y,this.d=b*v+P*x}this.a*=this.skeleton.scaleX,this.b*=this.skeleton.scaleX,this.c*=this.skeleton.scaleY,this.d*=this.skeleton.scaleY},Lt.prototype.setToSetupPose=function(){var t=this.data;this.x=t.x,this.y=t.y,this.rotation=t.rotation,this.scaleX=t.scaleX,this.scaleY=t.scaleY,this.shearX=t.shearX,this.shearY=t.shearY},Lt.prototype.getWorldRotationX=function(){return Math.atan2(this.c,this.a)*_.MathUtils.radDeg},Lt.prototype.getWorldRotationY=function(){return Math.atan2(this.d,this.b)*_.MathUtils.radDeg},Lt.prototype.getWorldScaleX=function(){return Math.sqrt(this.a*this.a+this.c*this.c)},Lt.prototype.getWorldScaleY=function(){return Math.sqrt(this.b*this.b+this.d*this.d)},Lt.prototype.updateAppliedTransform=function(){this.appliedValid=!0;var t=this.parent;if(null==t)return this.ax=this.worldX,this.ay=this.worldY,this.arotation=Math.atan2(this.c,this.a)*_.MathUtils.radDeg,this.ascaleX=Math.sqrt(this.a*this.a+this.c*this.c),this.ascaleY=Math.sqrt(this.b*this.b+this.d*this.d),this.ashearX=0,void(this.ashearY=Math.atan2(this.a*this.b+this.c*this.d,this.a*this.d-this.b*this.c)*_.MathUtils.radDeg);var e=t.a,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)*_.MathUtils.radDeg,this.arotation=Math.atan2(m,d)*_.MathUtils.radDeg):(this.ascaleX=0,this.ascaleY=Math.sqrt(p*p+g*g),this.ashearY=0,this.arotation=90-Math.atan2(g,p)*_.MathUtils.radDeg)},Lt.prototype.worldToLocal=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=1/(e*r-n*i),a=t.x-this.worldX,o=t.y-this.worldY;return t.x=a*r*s-o*n*s,t.y=o*e*s-a*i*s,t},Lt.prototype.localToWorld=function(t){var e=t.x,n=t.y;return t.x=e*this.a+n*this.b+this.worldX,t.y=e*this.c+n*this.d+this.worldY,t},Lt.prototype.worldToLocalRotation=function(t){var e=_.MathUtils.sinDeg(t),n=_.MathUtils.cosDeg(t);return Math.atan2(this.a*e-this.c*n,this.d*n-this.b*e)*_.MathUtils.radDeg+this.rotation-this.shearX},Lt.prototype.localToWorldRotation=function(t){t-=this.rotation-this.shearX;var e=_.MathUtils.sinDeg(t),n=_.MathUtils.cosDeg(t);return Math.atan2(n*this.c+e*this.d,n*this.a+e*this.b)*_.MathUtils.radDeg},Lt.prototype.rotateWorld=function(t){var e=this.a,n=this.b,i=this.c,r=this.d,s=_.MathUtils.cosDeg(t),a=_.MathUtils.sinDeg(t);this.a=s*e-a*i,this.b=s*n-a*r,this.c=a*e+s*i,this.d=a*n+s*r,this.appliedValid=!1},h=Lt,_.Bone=h,(l=bt=bt||{}).BoneData=Nt,(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",(bt||(bt={})).ConstraintData=function(t,e,n){this.name=t,this.order=e,this.skinRequired=n},(bt||(bt={})).Event=function(t,e){if(null==e)throw new Error("data cannot be null.");this.time=t,this.data=e},(bt||(bt={})).EventData=function(t){this.name=t},ht=bt=bt||{},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,T=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 E=t.data.length*M,A=Math.sqrt(d*d+p*p);(i&&A<E||r&&E<A&&1e-4<E)&&(M*=m=(A/E-1)*a+1,s&&(T*=m))}t.updateWorldTransformWith(t.ax,t.ay,t.arotation+f*a,M,T,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,T=t.b,E=t.c,A=t.d,R=Math.abs(u-f)<=1e-4,w=R?(x=M*v+T*(y=e.ay)+t.worldX,E*v+A*y+t.worldY):(y=0,x=M*v+t.worldX,E*v+t.worldY),S=t.parent,M=S.a,T=S.b;E=S.c;var b,I=1/(M*(A=S.d)-T*E),C=x-S.worldX,P=w-S.worldY,_=(C*A-P*T)*I-h,k=(P*M-C*E)*I-l,F=Math.sqrt(_*_+k*k),O=e.data.length*d;if(F<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,N,D,V=((C=n-S.worldX)*A-(P=i-S.worldY)*T)*I-h,Y=(P*M-C*E)*I-l,X=V*V+Y*Y;0!=a&&(a*=u*(d+1)/2,0<(N=(L=Math.sqrt(X))-F-O*u+a)&&(X=(V-=(D=(N-a*(1-(D=Math.min(1,N/(2*a))-1)*D))/L)*V)*V+(Y-=D*Y)*Y));t:if(R){var B=(X-F*F-(O*=u)*O)/(2*F*O);B<-1?B=-1:1<B&&(B=1,s&&(c*=(Math.sqrt(X)/(F+O)-1)*o+1)),b=Math.acos(B)*r,M=F+O*B,T=O*Math.sin(b),st=Math.atan2(Y*M-V*T,V*M+Y*T)}else{var U=(M=u*O)*M,z=(T=f*O)*T,W=Math.atan2(Y,V),q=-2*z*F,G=z-U;if(0<=(A=q*q-4*G*(E=z*F*F+U*X-U*z))){var H=Math.sqrt(A);q<0&&(H=-H);var j=(H=-(q+H)/2)/G,K=E/H,Z=Math.abs(j)<Math.abs(K)?j:K;if(Z*Z<=X){P=Math.sqrt(X-Z*Z)*r,st=W-Math.atan2(P,Z),b=Math.atan2(P/f,(Z-F)/u);break t}}var Q=ht.MathUtils.PI,J=F-M,$=J*J,tt=0,et=0,nt=F+M,it=nt*nt,rt=0;-1<=(E=-M*F/(U-z))&&E<=1&&(E=Math.acos(E),(A=(C=M*Math.cos(E)+F)*C+(P=T*Math.sin(E))*P)<$&&(Q=E,$=A,J=C,tt=P),it<A&&(et=E,it=A,nt=C,rt=P)),b=X<=($+it)/2?(st=W-Math.atan2(tt*r,J),Q*r):(st=W-Math.atan2(rt*r,nt),et*r)}var st,at=Math.atan2(y,v)*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<(b=((b+at)*ht.MathUtils.radDeg-e.ashearX)*g+m-ot)?b-=360:b<-180&&(b+=360),e.updateWorldTransformWith(v,y,ot+b*o,e.ascaleX,e.ascaleY,e.ashearX,e.ashearY)}else e.updateWorldTransform()},f=Dt,ht.IkConstraint=f,p=bt=bt||{},m=p.ConstraintData,_t(Vt,m),g=Vt,p.IkConstraintData=g,j=bt=bt||{},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=(S=c[g]).data.length;w<Yt.epsilon?(h&&(d[g]=0),f[++g]=0):s?(h&&(I=w*S.a,C=w*S.c,y=Math.sqrt(I*I+C*C),d[g]=y),f[++g]=p):(I=w*S.a,C=w*S.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),T=M[0],E=M[1],A=r.offsetRotation,R=!1;0==A?R=a==j.RotateMode.Chain:(R=!1,A*=0<(b=this.target.bone).a*b.d-b.b*b.c?j.MathUtils.degRad:-j.MathUtils.degRad);for(var S,g=0,b=3;g<l;g++,b+=3){(S=c[g]).worldX+=(T-S.worldX)*n,S.worldY+=(E-S.worldY)*n;var I,C,P,_,k,F,O,L,N,D,V,Y,X=(I=M[b])-T,B=(C=M[b+1])-E;!h||0!=(P=d[g])&&(_=(Math.sqrt(X*X+B*B)/P-1)*e+1,S.a*=_,S.c*=_),T=I,E=C,i&&(k=S.a,F=S.b,O=S.c,L=S.d,D=N=Y=0,Y=o?M[b-1]:0==f[g+1]?M[b+2]:Math.atan2(B,X),Y-=Math.atan2(O,k),R?(N=Math.cos(Y),D=Math.sin(Y),T+=((V=S.data.length)*(N*k-D*O)-X)*e,E+=(V*(D*k+N*O)-B)*e):Y+=A,Y>j.MathUtils.PI?Y-=j.MathUtils.PI2:Y<-j.MathUtils.PI&&(Y+=j.MathUtils.PI2),Y*=e,N=Math.cos(Y),D=Math.sin(Y),S.a=N*k-D*O,S.b=N*F-D*L,S.c=D*k+N*O,S.d=D*F+N*L),S.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+=z=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==z)}return h}u?(c+=2,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c-4,l,0,2),t.computeWorldVertices(s,0,2,l,c-4,2),l[c-2]=l[0],l[c-1]=l[1]):(f--,c-=4,l=j.Utils.setArraySize(this.world,c),t.computeWorldVertices(s,2,c,l,0,2));for(var M=j.Utils.setArraySize(this.curves,f),T=0,E=l[0],A=l[1],R=0,S=0,b=0,I=0,C=0,P=0,_=0,k=0,F=0,O=0,L=0,N=0,D=0,V=0,g=0,Y=2;g<f;g++,Y+=6)R=l[Y],S=l[Y+1],b=l[Y+2],I=l[Y+3],L=2*(_=.1875*(E-2*R+b))+(F=.09375*(3*(R-b)-E+(C=l[Y+4]))),N=2*(k=.1875*(A-2*S+I))+(O=.09375*(3*(S-I)-A+(P=l[Y+5]))),D=.75*(R-E)+_+.16666667*F,V=.75*(S-A)+k+.16666667*O,T+=Math.sqrt(D*D+V*V),D+=L,V+=N,L+=F,N+=O,T+=Math.sqrt(D*D+V*V),D+=L,V+=N,T+=Math.sqrt(D*D+V*V),D+=L+F,V+=N+O,T+=Math.sqrt(D*D+V*V),M[g]=T,E=C,A=P;if(a*=i?T:T/t.lengths[f-1],r)for(g=1;g<e;g++)o[g]*=T;for(var X=this.segments,B=0,g=0,v=0,y=0,U=0;g<e;g++,v+=3){var z,x=a+=z=o[g];if(u)(x%=T)<0&&(x+=T),y=0;else{if(x<0){this.addBeforePosition(x,l,0,h,v);continue}if(T<x){this.addAfterPosition(x-T,l,c-4,h,v);continue}}for(;;y++){var W=M[y];if(!(W<x)){0==y?x/=W:x=(x-(G=M[y-1]))/(W-G);break}}if(y!=d){var q=6*(d=y),E=l[q],A=l[q+1],R=l[q+2],S=l[q+3],b=l[q+4],I=l[q+5],L=2*(_=.03*(E-2*R+b))+(F=.006*(3*(R-b)-E+(C=l[q+6]))),N=2*(k=.03*(A-2*S+I))+(O=.006*(3*(S-I)-A+(P=l[q+7]))),D=.3*(R-E)+_+.16666667*F,V=.3*(S-A)+k+.16666667*O,B=Math.sqrt(D*D+V*V);for(X[0]=B,q=1;q<8;q++)D+=L,V+=N,L+=F,N+=O,B+=Math.sqrt(D*D+V*V),X[q]=B;D+=L,V+=N,B+=Math.sqrt(D*D+V*V),X[8]=B,D+=L+F,V+=N+O,B+=Math.sqrt(D*D+V*V),X[9]=B,U=0}for(x*=B;;U++){var G,H=X[U];if(!(H<x)){0==U?x/=H:x=U+(x-(G=X[U-1]))/(H-G);break}}this.addCurvePosition(.1*x,E,A,R,S,b,I,C,P,h,v,n||0<g&&0==z)}return h},Yt.prototype.addBeforePosition=function(t,e,n,i,r){var s=e[n],a=e[n+1],o=e[n+2]-s,h=e[n+3]-a,l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},Yt.prototype.addAfterPosition=function(t,e,n,i,r){var s=e[n+2],a=e[n+3],o=s-e[n],h=a-e[n+1],l=Math.atan2(h,o);i[r]=s+t*Math.cos(l),i[r+1]=a+t*Math.sin(l),i[r+2]=l},Yt.prototype.addCurvePosition=function(t,e,n,i,r,s,a,o,h,l,u,c){if(0==t||isNaN(t))return l[u]=e,l[u+1]=n,void(l[u+2]=Math.atan2(r-n,i-e));var f=t*t,d=f*t,p=1-t,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,T=n*g+r*x+a*w+h*d;l[u]=M,l[u+1]=T,c&&(l[u+2]=t<.001?Math.atan2(r-n,i-e):Math.atan2(T-(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=bt=bt||{},x=y.ConstraintData,_t(Xt,x),E=Xt,y.PathConstraintData=E,(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",(T=y.RotateMode||(y.RotateMode={}))[T.Tangent=0]="Tangent",T[T.Chain=1]="Chain",T[T.ChainScale=2]="ChainScale",A=bt=bt||{},Bt.prototype.loaded=function(){var t=0;for(var e in this.assets)t++;return t},R=Bt,Ut.prototype.queueAsset=function(t,e,n){var i=this.clientAssets[t];return null==i&&(i=new R(t),this.clientAssets[t]=i),null!==e&&(i.textureLoader=e),i.toLoad.push(n),this.queuedAssets[n]!==n&&(this.queuedAssets[n]=n,!0)},Ut.prototype.loadText=function(t,e){var n,i=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((n=new XMLHttpRequest).overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(200<=n.status&&n.status<300?i.rawAssets[e]=n.responseText:i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send())},Ut.prototype.loadJson=function(t,e){var n,i=this;e=this.pathPrefix+e,this.queueAsset(t,null,e)&&((n=new XMLHttpRequest).overrideMimeType("text/html"),n.onreadystatechange=function(){n.readyState==XMLHttpRequest.DONE&&(200<=n.status&&n.status<300?i.rawAssets[e]=JSON.parse(n.responseText):i.errors[e]="Couldn't load text "+e+": status "+n.status+", "+n.responseText)},n.open("GET",e,!0),n.send())},Ut.prototype.loadTexture=function(t,e,n){var i,r=this;n=this.pathPrefix+n,this.queueAsset(t,e,n)&&((i=new Image).crossOrigin="anonymous",i.onload=function(t){r.rawAssets[n]=i},i.onerror=function(t){r.errors[n]="Couldn't load image "+n},i.src=n)},Ut.prototype.get=function(t,e){e=this.pathPrefix+e;var n=this.clientAssets[t];return null==n||n.assets[e]},Ut.prototype.updateClientAssets=function(t){for(var e=0;e<t.toLoad.length;e++){var n=t.toLoad[e],i=t.assets[n];if(null==i){var r=this.rawAssets[n];if(null==r)continue;r instanceof HTMLImageElement?t.assets[n]=t.textureLoader(r):t.assets[n]=r}}},Ut.prototype.isLoadingComplete=function(t){var e=this.clientAssets[t];return null==e||(this.updateClientAssets(e),e.toLoad.length==e.loaded())},Ut.prototype.dispose=function(){},Ut.prototype.hasErrors=function(){return 0<Object.keys(this.errors).length},Ut.prototype.getErrors=function(){return this.errors},S=Ut,A.SharedAssetManager=S,b=bt=bt||{},zt.prototype.updateCache=function(){this._updateCache.length=0,this.updateCacheReset.length=0;for(var t=this.bones,e=0,n=t.length;e<n;e++)(r=t[e]).sorted=r.data.skinRequired,r.active=!r.sorted;if(null!=this.skin)for(var i=this.skin.bones,e=0,n=this.skin.bones.length;e<n;e++)for(var r=this.bones[i[e].index];r.sorted=!1,r.active=!0,null!=(r=r.parent););var s=this.ikConstraints,a=this.transformConstraints,o=this.pathConstraints,h=s.length,l=a.length,u=o.length,c=h+l+u;t:for(e=0;e<c;e++){for(var f=0;f<h;f++)if((d=s[f]).data.order==e){this.sortIkConstraint(d);continue t}for(f=0;f<l;f++)if((d=a[f]).data.order==e){this.sortTransformConstraint(d);continue t}for(var d,f=0;f<u;f++)if((d=o[f]).data.order==e){this.sortPathConstraint(d);continue t}}for(e=0,n=t.length;e<n;e++)this.sortBone(t[e])},zt.prototype.sortIkConstraint=function(t){var e,n,i,r;t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&b.Utils.contains(this.skin.constraints,t.data,!0)),t.active&&(e=t.target,this.sortBone(e),i=(n=t.bones)[0],this.sortBone(i),1<n.length&&(r=n[n.length-1],-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)),this._updateCache.push(t),this.sortReset(i.children),n[n.length-1].sorted=!0)},zt.prototype.sortPathConstraint=function(t){if(t.active=t.target.bone.isActive()&&(!t.data.skinRequired||null!=this.skin&&b.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 b.PathAttachment&&this.sortPathConstraintAttachmentWith(a,i);for(var o=t.bones,h=o.length,r=0;r<h;r++)this.sortBone(o[r]);for(this._updateCache.push(t),r=0;r<h;r++)this.sortReset(o[r].children);for(r=0;r<h;r++)o[r].sorted=!0}},zt.prototype.sortTransformConstraint=function(t){if(t.active=t.target.isActive()&&(!t.data.skinRequired||null!=this.skin&&b.Utils.contains(this.skin.constraints,t.data,!0)),t.active){this.sortBone(t.target);var e=t.bones,n=e.length;if(t.data.local)for(var i=0;i<n;i++){var r=e[i];this.sortBone(r.parent),-1<this._updateCache.indexOf(r)||this.updateCacheReset.push(r)}else for(i=0;i<n;i++)this.sortBone(e[i]);this._updateCache.push(t);for(var s=0;s<n;s++)this.sortReset(e[s].children);for(s=0;s<n;s++)e[s].sorted=!0}},zt.prototype.sortPathConstraintAttachment=function(t,e,n){var i=t.attachments[e];if(i)for(var r in i)this.sortPathConstraintAttachmentWith(i[r],n)},zt.prototype.sortPathConstraintAttachmentWith=function(t,e){if(t instanceof b.PathAttachment){var n=t.bones;if(null==n)this.sortBone(e);else for(var i=this.bones,r=0;r<n.length;)for(var s=n[r++],a=r+s;r<a;r++){var o=n[r];this.sortBone(i[o])}}},zt.prototype.sortBone=function(t){var e;t.sorted||(null!=(e=t.parent)&&this.sortBone(e),t.sorted=!0,this._updateCache.push(t))},zt.prototype.sortReset=function(t){for(var e=0,n=t.length;e<n;e++){var i=t[e];i.active&&(i.sorted&&this.sortReset(i.children),i.sorted=!1)}},zt.prototype.updateWorldTransform=function(){for(var t=this.updateCacheReset,e=0,n=t.length;e<n;e++){var i=t[e];i.ax=i.x,i.ay=i.y,i.arotation=i.rotation,i.ascaleX=i.scaleX,i.ascaleY=i.scaleY,i.ashearX=i.shearX,i.ashearY=i.shearY,i.appliedValid=!0}for(var r=this._updateCache,e=0,n=r.length;e<n;e++)r[e].update()},zt.prototype.setToSetupPose=function(){this.setBonesToSetupPose(),this.setSlotsToSetupPose()},zt.prototype.setBonesToSetupPose=function(){for(var t=this.bones,e=0,n=t.length;e<n;e++)t[e].setToSetupPose();for(var i=this.ikConstraints,e=0,n=i.length;e<n;e++)(o=i[e]).mix=o.data.mix,o.softness=o.data.softness,o.bendDirection=o.data.bendDirection,o.compress=o.data.compress,o.stretch=o.data.stretch;for(var r=this.transformConstraints,e=0,n=r.length;e<n;e++){var s=(o=r[e]).data;o.rotateMix=s.rotateMix,o.translateMix=s.translateMix,o.scaleMix=s.scaleMix,o.shearMix=s.shearMix}for(var a=this.pathConstraints,e=0,n=a.length;e<n;e++){var o,s=(o=a[e]).data;o.position=s.position,o.spacing=s.spacing,o.rotateMix=s.rotateMix,o.translateMix=s.translateMix}},zt.prototype.setSlotsToSetupPose=function(){var t=this.slots;b.Utils.arrayCopy(t,0,this.drawOrder,0,t.length);for(var e=0,n=t.length;e<n;e++)t[e].setToSetupPose()},zt.prototype.getRootBone=function(){return 0==this.bones.length?null:this.bones[0]},zt.prototype.findBone=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findBoneIndex=function(t){if(null==t)throw new Error("boneName cannot be null.");for(var e=this.bones,n=0,i=e.length;n<i;n++)if(e[n].data.name==t)return n;return-1},zt.prototype.findSlot=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findSlotIndex=function(t){if(null==t)throw new Error("slotName cannot be null.");for(var e=this.slots,n=0,i=e.length;n<i;n++)if(e[n].data.name==t)return n;return-1},zt.prototype.setSkinByName=function(t){var e=this.data.findSkin(t);if(null==e)throw new Error("Skin not found: "+t);this.setSkin(e)},zt.prototype.setSkin=function(t){if(t!=this.skin){if(null!=t)if(null!=this.skin)t.attachAll(this,this.skin);else for(var e=this.slots,n=0,i=e.length;n<i;n++){var r,s=e[n],a=s.data.attachmentName;null==a||null!=(r=t.getAttachment(n,a))&&s.setAttachment(r)}this.skin=t,this.updateCache()}},zt.prototype.getAttachmentByName=function(t,e){return this.getAttachment(this.data.findSlotIndex(t),e)},zt.prototype.getAttachment=function(t,e){if(null==e)throw new Error("attachmentName cannot be null.");if(null!=this.skin){var n=this.skin.getAttachment(t,e);if(null!=n)return n}return null!=this.data.defaultSkin?this.data.defaultSkin.getAttachment(t,e):null},zt.prototype.setAttachment=function(t,e){if(null==t)throw new Error("slotName cannot be null.");for(var n=this.slots,i=0,r=n.length;i<r;i++){var s=n[i];if(s.data.name==t){var a=null;if(null!=e&&null==(a=this.getAttachment(i,e)))throw new Error("Attachment not found: "+e+", for slot: "+t);return void s.setAttachment(a)}}throw new Error("Slot not found: "+t)},zt.prototype.findIkConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.ikConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findTransformConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.transformConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.findPathConstraint=function(t){if(null==t)throw new Error("constraintName cannot be null.");for(var e=this.pathConstraints,n=0,i=e.length;n<i;n++){var r=e[n];if(r.data.name==t)return r}return null},zt.prototype.getBounds=function(t,e,n){if(void 0===n&&(n=new Array(2)),null==t)throw new Error("offset cannot be null.");if(null==e)throw new Error("size cannot be null.");for(var i=this.drawOrder,r=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY,a=Number.NEGATIVE_INFINITY,o=Number.NEGATIVE_INFINITY,h=0,l=i.length;h<l;h++){var u=i[h];if(u.bone.active){var c,f=0,d=null,p=u.getAttachment();if(p instanceof b.RegionAttachment?(f=8,d=b.Utils.setArraySize(n,f,0),p.computeWorldVertices(u.bone,d,0,2)):p instanceof b.MeshAttachment&&(f=(c=p).worldVerticesLength,d=b.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)},zt.prototype.update=function(t){this.time+=t},I=zt,b.Skeleton=I,function(W){var t=(q.prototype.readSkeletonData=function(t){var e=this.scale,n=new W.SkeletonData;n.name="";var i=new x(t);if(n.hash=i.readString(),n.version=i.readString(),"3.8.75"==n.version)throw new Error("Unsupported skeleton data, please export with a newer version of Spine.");n.x=i.readFloat(),n.y=i.readFloat(),n.width=i.readFloat(),n.height=i.readFloat();var r=i.readBoolean();r&&(n.fps=i.readFloat(),n.imagesPath=i.readString(),n.audioPath=i.readString());for(var s=0,s=i.readInt(!0),a=0;a<s;a++)i.strings.push(i.readString());for(s=i.readInt(!0),a=0;a<s;a++){var o=i.readString(),h=0==a?null:n.bones[i.readInt(!0)];(c=new W.BoneData(a,o,h)).rotation=i.readFloat(),c.x=i.readFloat()*e,c.y=i.readFloat()*e,c.scaleX=i.readFloat(),c.scaleY=i.readFloat(),c.shearX=i.readFloat(),c.shearY=i.readFloat(),c.length=i.readFloat()*e,c.transformMode=q.TransformModeValues[i.readInt(!0)],c.skinRequired=i.readBoolean(),r&&W.Color.rgba8888ToColor(c.color,i.readInt32()),n.bones.push(c)}for(s=i.readInt(!0),a=0;a<s;a++){var l=i.readString(),u=n.bones[i.readInt(!0)],c=new W.SlotData(a,l,u);W.Color.rgba8888ToColor(c.color,i.readInt32());var f=i.readInt32();-1!=f&&W.Color.rgb888ToColor(c.darkColor=new W.Color,f),c.attachmentName=i.readStringRef(),c.blendMode=q.BlendModeValues[i.readInt(!0)],n.slots.push(c)}s=i.readInt(!0);for(var a=0,d=void 0;a<s;a++){(c=new W.IkConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0);for(var p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.mix=i.readFloat(),c.softness=i.readFloat()*e,c.bendDirection=i.readByte(),c.compress=i.readBoolean(),c.stretch=i.readBoolean(),c.uniform=i.readBoolean(),n.ikConstraints.push(c)}for(s=i.readInt(!0),d=void(a=0);a<s;a++){for((c=new W.TransformConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0),p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.bones[i.readInt(!0)],c.local=i.readBoolean(),c.relative=i.readBoolean(),c.offsetRotation=i.readFloat(),c.offsetX=i.readFloat()*e,c.offsetY=i.readFloat()*e,c.offsetScaleX=i.readFloat(),c.offsetScaleY=i.readFloat(),c.offsetShearY=i.readFloat(),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),c.scaleMix=i.readFloat(),c.shearMix=i.readFloat(),n.transformConstraints.push(c)}for(s=i.readInt(!0),d=void(a=0);a<s;a++){for((c=new W.PathConstraintData(i.readString())).order=i.readInt(!0),c.skinRequired=i.readBoolean(),d=i.readInt(!0),p=0;p<d;p++)c.bones.push(n.bones[i.readInt(!0)]);c.target=n.slots[i.readInt(!0)],c.positionMode=q.PositionModeValues[i.readInt(!0)],c.spacingMode=q.SpacingModeValues[i.readInt(!0)],c.rotateMode=q.RotateModeValues[i.readInt(!0)],c.offsetRotation=i.readFloat(),c.position=i.readFloat(),c.positionMode==W.PositionMode.Fixed&&(c.position*=e),c.spacing=i.readFloat(),c.spacingMode!=W.SpacingMode.Length&&c.spacingMode!=W.SpacingMode.Fixed||(c.spacing*=e),c.rotateMix=i.readFloat(),c.translateMix=i.readFloat(),n.pathConstraints.push(c)}var m=this.readSkin(i,n,!0,r);for(null!=m&&(n.defaultSkin=m,n.skins.push(m)),a=n.skins.length,W.Utils.setArraySize(n.skins,s=a+i.readInt(!0));a<s;a++)n.skins[a]=this.readSkin(i,n,!1,r);for(s=this.linkedMeshes.length,a=0;a<s;a++){var 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 W.EventData(i.readStringRef())).intValue=i.readInt(!1),c.floatValue=i.readFloat(),c.stringValue=i.readString(),c.audioPath=i.readString(),null!=c.audioPath&&(c.volume=i.readFloat(),c.balance=i.readFloat()),n.events.push(c);for(s=i.readInt(!0),a=0;a<s;a++)n.animations.push(this.readAnimation(i,i.readString(),n));return n},q.prototype.readSkin=function(t,e,n,i){var r=null,s=0;if(n){if(0==(s=t.readInt(!0)))return null;r=new W.Skin("default")}else{(r=new W.Skin(t.readStringRef())).bones.length=t.readInt(!0);for(var a=0,o=r.bones.length;a<o;a++)r.bones[a]=e.bones[t.readInt(!0)];for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.ikConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.transformConstraints[t.readInt(!0)]);for(a=0,o=t.readInt(!0);a<o;a++)r.constraints.push(e.pathConstraints[t.readInt(!0)]);s=t.readInt(!0)}for(a=0;a<s;a++)for(var h=t.readInt(!0),l=0,u=t.readInt(!0);l<u;l++){var c=t.readStringRef(),f=this.readAttachment(t,e,r,h,c,i);null!=f&&r.setAttachment(h,c,f)}return r},q.prototype.readAttachment=function(t,e,n,i,r,s){var a=this.scale,o=t.readStringRef();null==o&&(o=r);var h=t.readByte();switch(q.AttachmentTypeValues[h]){case W.AttachmentType.Region:var l=t.readStringRef(),u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),d=t.readFloat(),p=t.readFloat(),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,W.Color.rgba8888ToColor(y.color,v),y.updateOffset(),y);case W.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&&W.Color.rgba8888ToColor(M.color,v),M);case W.AttachmentType.Mesh:var l=t.readStringRef(),v=t.readInt32(),x=t.readInt(!0),T=this.readFloatArray(t,x<<1,1),E=this.readShortArray(t),w=this.readVertices(t,x),A=t.readInt(!0),R=null,m=0,g=0;return s&&(R=this.readShortArray(t),m=t.readFloat(),g=t.readFloat()),null==l&&(l=o),null==(S=this.attachmentLoader.newMeshAttachment(n,o,l))?null:(S.path=l,W.Color.rgba8888ToColor(S.color,v),S.bones=w.bones,S.vertices=w.vertices,S.worldVerticesLength=x<<1,S.triangles=E,S.regionUVs=T,S.updateUVs(),S.hullLength=A<<1,s&&(S.edges=R,S.width=m*a,S.height=g*a),S);case W.AttachmentType.LinkedMesh:var S,l=t.readStringRef(),v=t.readInt32(),b=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==(S=this.attachmentLoader.newMeshAttachment(n,o,l))?null:(S.path=l,W.Color.rgba8888ToColor(S.color,v),s&&(S.width=m*a,S.height=g*a),this.linkedMeshes.push(new V(S,b,i,I,C)),S);case W.AttachmentType.Path:for(var P=t.readBoolean(),_=t.readBoolean(),x=t.readInt(!0),w=this.readVertices(t,x),k=W.Utils.newArray(x/3,0),F=0,O=k.length;F<O;F++)k[F]=t.readFloat()*a;return v=s?t.readInt32():0,null==(l=this.attachmentLoader.newPathAttachment(n,o))?null:(l.closed=P,l.constantSpeed=_,l.worldVerticesLength=x<<1,l.vertices=w.vertices,l.bones=w.bones,l.lengths=k,s&&W.Color.rgba8888ToColor(l.color,v),l);case W.AttachmentType.Point:var u=t.readFloat(),c=t.readFloat(),f=t.readFloat(),v=s?t.readInt32():0,L=this.attachmentLoader.newPointAttachment(n,o);return null==L?null:(L.x=c*a,L.y=f*a,L.rotation=u,s&&W.Color.rgba8888ToColor(L.color,v),L);case W.AttachmentType.Clipping:var N=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[N],D.worldVerticesLength=x<<1,D.vertices=w.vertices,D.bones=w.bones,s&&W.Color.rgba8888ToColor(D.color,v),D)}return null},q.prototype.readVertices=function(t,e){var n=e<<1,i=new u,r=this.scale;if(!t.readBoolean())return i.vertices=this.readFloatArray(t,n,r),i;for(var s=new Array,a=new Array,o=0;o<e;o++){var h=t.readInt(!0);a.push(h);for(var l=0;l<h;l++)a.push(t.readInt(!0)),s.push(t.readFloat()*r),s.push(t.readFloat()*r),s.push(t.readFloat())}return i.vertices=W.Utils.toFloatArray(s),i.bones=a,i},q.prototype.readFloatArray=function(t,e,n){var i=new Array(e);if(1==n)for(var r=0;r<e;r++)i[r]=t.readFloat();else for(r=0;r<e;r++)i[r]=t.readFloat()*n;return i},q.prototype.readShortArray=function(t){for(var e=t.readInt(!0),n=new Array(e),i=0;i<e;i++)n[i]=t.readShort();return n},q.prototype.readAnimation=function(t,e,n){for(var i=new Array,r=this.scale,s=0,a=new W.Color,o=new W.Color,h=0,l=t.readInt(!0);h<l;h++)for(var u=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++){var d=t.readByte(),p=t.readInt(!0);switch(d){case q.SLOT_ATTACHMENT:(y=new W.AttachmentTimeline(p)).slotIndex=u;for(var 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 q.SLOT_COLOR:for((y=new W.ColorTimeline(p)).slotIndex=u,m=0;m<p;m++){var g=t.readFloat();W.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)*W.ColorTimeline.ENTRIES]);break;case q.SLOT_TWO_COLOR:for((y=new W.TwoColorTimeline(p)).slotIndex=u,m=0;m<p;m++)g=t.readFloat(),W.Color.rgba8888ToColor(a,t.readInt32()),W.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)*W.TwoColorTimeline.ENTRIES])}}for(h=0,l=t.readInt(!0);h<l;h++)for(var v=t.readInt(!0),c=0,f=t.readInt(!0);c<f;c++)switch(d=t.readByte(),p=t.readInt(!0),d){case q.BONE_ROTATE:for((y=new W.RotateTimeline(p)).boneIndex=v,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)*W.RotateTimeline.ENTRIES]);break;case q.BONE_TRANSLATE:case q.BONE_SCALE:case q.BONE_SHEAR:var y=void 0,x=1;for(d==q.BONE_SCALE?y=new W.ScaleTimeline(p):d==q.BONE_SHEAR?y=new W.ShearTimeline(p):(y=new W.TranslateTimeline(p),x=r),y.boneIndex=v,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)*W.TranslateTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){var w=t.readInt(!0),p=t.readInt(!0);for((y=new W.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)*W.IkConstraintTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++){for(w=t.readInt(!0),p=t.readInt(!0),(y=new W.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)*W.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 q.PATH_POSITION:case q.PATH_SPACING:var y=void 0,x=1;for(d==q.PATH_SPACING?(y=new W.PathConstraintSpacingTimeline(p),M.spacingMode!=W.SpacingMode.Length&&M.spacingMode!=W.SpacingMode.Fixed||(x=r)):(y=new W.PathConstraintPositionTimeline(p),M.positionMode==W.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)*W.PathConstraintPositionTimeline.ENTRIES]);break;case q.PATH_MIX:for((y=new W.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)*W.PathConstraintMixTimeline.ENTRIES])}for(h=0,l=t.readInt(!0);h<l;h++)for(var T=n.skins[t.readInt(!0)],c=0,f=t.readInt(!0);c<f;c++)for(var u=t.readInt(!0),E=0,A=t.readInt(!0);E<A;E++){var R=T.getAttachment(u,t.readStringRef()),S=null!=R.bones,b=R.vertices,I=S?b.length/3*2:b.length,p=t.readInt(!0);for((y=new W.DeformTimeline(p)).slotIndex=u,y.attachment=R,m=0;m<p;m++){var g=t.readFloat(),C=void 0,P=t.readInt(!0);if(0==P)C=S?W.Utils.newFloatArray(I):b;else{C=W.Utils.newFloatArray(I);var _=t.readInt(!0);if(P+=_,1==r)for(var k=_;k<P;k++)C[k]=t.readFloat();else for(k=_;k<P;k++)C[k]=t.readFloat()*r;if(!S)for(var k=0,F=C.length;k<F;k++)C[k]+=b[k]}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 W.DrawOrderTimeline(O),L=n.slots.length,h=0;h<O;h++){for(var g=t.readFloat(),N=t.readInt(!0),D=W.Utils.newArray(L,0),c=L-1;0<=c;c--)D[c]=-1;for(var V=W.Utils.newArray(L-N,0),Y=0,X=0,c=0;c<N;c++){for(u=t.readInt(!0);Y!=u;)V[X++]=Y++;D[Y+t.readInt(!0)]=Y++}for(;Y<L;)V[X++]=Y++;for(c=L-1;0<=c;c--)-1==D[c]&&(D[c]=V[--X]);y.setFrame(h,g,D)}i.push(y),s=Math.max(s,y.frames[O-1])}var B=t.readInt(!0);if(0<B){for(y=new W.EventTimeline(B),h=0;h<B;h++){var g=t.readFloat(),U=n.events[t.readInt(!0)],z=new W.Event(g,U);z.intValue=t.readInt(!1),z.floatValue=t.readFloat(),z.stringValue=t.readBoolean()?t.readString():U.stringValue,null!=z.data.audioPath&&(z.volume=t.readFloat(),z.balance=t.readFloat()),y.setFrame(h,z)}i.push(y),s=Math.max(s,y.frames[B-1])}return new W.Animation(e,i,s)},q.prototype.readCurve=function(t,e,n){switch(t.readByte()){case q.CURVE_STEPPED:n.setStepped(e);break;case q.CURVE_BEZIER:this.setCurve(n,e,t.readFloat(),t.readFloat(),t.readFloat(),t.readFloat())}},q.prototype.setCurve=function(t,e,n,i,r,s){t.setCurve(e,n,i,r,s)},q.AttachmentTypeValues=[0,1,2,3,4,5,6],q.TransformModeValues=[W.TransformMode.Normal,W.TransformMode.OnlyTranslation,W.TransformMode.NoRotationOrReflection,W.TransformMode.NoScale,W.TransformMode.NoScaleOrReflection],q.PositionModeValues=[W.PositionMode.Fixed,W.PositionMode.Percent],q.SpacingModeValues=[W.SpacingMode.Length,W.SpacingMode.Fixed,W.SpacingMode.Percent],q.RotateModeValues=[W.RotateMode.Tangent,W.RotateMode.Chain,W.RotateMode.ChainScale],q.BlendModeValues=[W.BlendMode.Normal,W.BlendMode.Additive,W.BlendMode.Multiply,W.BlendMode.Screen],q.BONE_ROTATE=0,q.BONE_TRANSLATE=1,q.BONE_SCALE=2,q.BONE_SHEAR=3,q.SLOT_ATTACHMENT=0,q.SLOT_COLOR=1,q.SLOT_TWO_COLOR=2,q.PATH_POSITION=0,q.PATH_SPACING=1,q.PATH_MIX=2,q.CURVE_LINEAR=0,q.CURVE_STEPPED=1,q.CURVE_BEZIER=2,q);function q(t){this.scale=1,this.linkedMeshes=new Array,this.attachmentLoader=t}W.SkeletonBinary=t;var x=(e.prototype.readByte=function(){return this.buffer.getInt8(this.index++)},e.prototype.readShort=function(){var t=this.buffer.getInt16(this.index);return this.index+=2,t},e.prototype.readInt32=function(){var t=this.buffer.getInt32(this.index);return this.index+=4,t},e.prototype.readInt=function(t){var e=this.readByte(),n=127&e;return 0!=(128&e)&&(n|=(127&(e=this.readByte()))<<7,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<14,0!=(128&e)&&(n|=(127&(e=this.readByte()))<<21,0!=(128&e)&&(n|=(127&this.readByte())<<28)))),t?n:n>>>1^-(1&n)},e.prototype.readStringRef=function(){var t=this.readInt(!0);return 0==t?null:this.strings[t-1]},e.prototype.readString=function(){var t=this.readInt(!0);switch(t){case 0:return null;case 1:return""}t--;for(var e="",n=0;n<t;){var i=this.readByte();switch(i>>4){case 12:case 13:e+=String.fromCharCode((31&i)<<6|63&this.readByte()),n+=2;break;case 14:e+=String.fromCharCode((15&i)<<12|(63&this.readByte())<<6|63&this.readByte()),n+=3;break;default:e+=String.fromCharCode(i),n++}}return e},e.prototype.readFloat=function(){var t=this.buffer.getFloat32(this.index);return this.index+=4,t},e.prototype.readBoolean=function(){return 0!=this.readByte()},e);function e(t,e,n,i){void 0===e&&(e=new Array),void 0===n&&(n=0),void 0===i&&(i=new DataView(t.buffer)),this.strings=e,this.index=n,this.buffer=i}var V=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}}(bt=bt||{}),C=bt=bt||{},Wt.prototype.update=function(t,e){if(null==t)throw new Error("skeleton cannot be null.");var n=this.boundingBoxes,i=this.polygons,r=this.polygonPool,s=t.slots,a=s.length;n.length=0,r.freeAll(i);for(var o=i.length=0;o<a;o++){var h,l,u,c=s[o];c.bone.active&&(h=c.getAttachment())instanceof C.BoundingBoxAttachment&&(l=h,n.push(l),(u=r.obtain()).length!=l.worldVerticesLength&&(u=C.Utils.newFloatArray(l.worldVerticesLength)),i.push(u),l.computeWorldVertices(c,0,l.worldVerticesLength,u,0,2))}e?this.aabbCompute():(this.minX=Number.POSITIVE_INFINITY,this.minY=Number.POSITIVE_INFINITY,this.maxX=Number.NEGATIVE_INFINITY,this.maxY=Number.NEGATIVE_INFINITY)},Wt.prototype.aabbCompute=function(){for(var t=Number.POSITIVE_INFINITY,e=Number.POSITIVE_INFINITY,n=Number.NEGATIVE_INFINITY,i=Number.NEGATIVE_INFINITY,r=this.polygons,s=0,a=r.length;s<a;s++)for(var o=r[s],h=o,l=0,u=o.length;l<u;l+=2)var c=h[l],f=h[l+1],t=Math.min(t,c),e=Math.min(e,f),n=Math.max(n,c),i=Math.max(i,f);this.minX=t,this.minY=e,this.maxX=n,this.maxY=i},Wt.prototype.aabbContainsPoint=function(t,e){return t>=this.minX&&t<=this.maxX&&e>=this.minY&&e<=this.maxY},Wt.prototype.aabbIntersectsSegment=function(t,e,n,i){var r=this.minX,s=this.minY,a=this.maxX,o=this.maxY;if(t<=r&&n<=r||e<=s&&i<=s||a<=t&&a<=n||o<=e&&o<=i)return!1;var h=(i-e)/(n-t),l=h*(r-t)+e;if(s<l&&l<o)return!0;if(s<(l=h*(a-t)+e)&&l<o)return!0;var u=(s-e)/h+t;return r<u&&u<a||r<(u=(o-e)/h+t)&&u<a},Wt.prototype.aabbIntersectsSkeleton=function(t){return this.minX<t.maxX&&this.maxX>t.minX&&this.minY<t.maxY&&this.maxY>t.minY},Wt.prototype.containsPoint=function(t,e){for(var n=this.polygons,i=0,r=n.length;i<r;i++)if(this.containsPointPolygon(n[i],t,e))return this.boundingBoxes[i];return null},Wt.prototype.containsPointPolygon=function(t,e,n){for(var i=t,r=t.length,s=r-2,a=!1,o=0;o<r;o+=2){var h,l=i[o+1],u=i[s+1];!(l<n&&n<=u||u<n&&n<=l)||(h=i[o])+(n-l)/(u-l)*(i[s]-h)<e&&(a=!a),s=o}return a},Wt.prototype.intersectsSegment=function(t,e,n,i){for(var r=this.polygons,s=0,a=r.length;s<a;s++)if(this.intersectsSegmentPolygon(r[s],t,e,n,i))return this.boundingBoxes[s];return null},Wt.prototype.intersectsSegmentPolygon=function(t,e,n,i,r){for(var s=t,a=t.length,o=e-i,h=n-r,l=e*r-n*i,u=s[a-2],c=s[a-1],f=0;f<a;f+=2){var d=s[f],p=s[f+1],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},Wt.prototype.getPolygon=function(t){if(null==t)throw new Error("boundingBox cannot be null.");var e=this.boundingBoxes.indexOf(t);return-1==e?null:this.polygons[e]},Wt.prototype.getWidth=function(){return this.maxX-this.minX},Wt.prototype.getHeight=function(){return this.maxY-this.minY},P=Wt,C.SkeletonBounds=P,K=bt=bt||{},qt.prototype.clipStart=function(t,e){if(null!=this.clipAttachment)return 0;var n=(this.clipAttachment=e).worldVerticesLength,i=K.Utils.setArraySize(this.clippingPolygon,n);e.computeWorldVertices(t,0,n,i,0,2);var r=this.clippingPolygon;qt.makeClockwise(r);for(var s=this.clippingPolygons=this.triangulator.decompose(r,this.triangulator.triangulate(r)),a=0,o=s.length;a<o;a++){var h=s[a];qt.makeClockwise(h),h.push(h[0]),h.push(h[1])}return s.length},qt.prototype.clipEndWithSlot=function(t){null!=this.clipAttachment&&this.clipAttachment.endSlot==t.data&&this.clipEnd()},qt.prototype.clipEnd=function(){null!=this.clipAttachment&&(this.clipAttachment=null,this.clippingPolygons=null,this.clippedVertices.length=0,this.clippedTriangles.length=0,this.clippingPolygon.length=0)},qt.prototype.isClipping=function(){return null!=this.clipAttachment},qt.prototype.clipTriangles=function(t,e,n,i,r,s,a,o){var h=this.clipOutput,l=this.clippedVertices,u=this.clippedTriangles,c=this.clippingPolygons,f=this.clippingPolygons.length,d=o?12:8,p=0;l.length=0;t:for(var 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],T=t[1+g],E=r[g],A=r[1+g],R=t[g=n[m+2]<<1],S=t[1+g],b=r[g],I=r[1+g],C=0;C<f;C++){var P=l.length;if(!this.clip(v,y,M,T,R,S,c[C],h)){(Y=K.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]=T,Y[P+14]=s.r,Y[P+15]=s.g,Y[P+16]=s.b,Y[P+17]=s.a,Y[P+18]=E,Y[P+19]=A,Y[P+20]=a.r,Y[P+21]=a.g,Y[P+22]=a.b,Y[P+23]=a.a,Y[P+24]=R,Y[P+25]=S,Y[P+26]=s.r,Y[P+27]=s.g,Y[P+28]=s.b,Y[P+29]=s.a,Y[P+30]=b,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]=T,Y[P+10]=s.r,Y[P+11]=s.g,Y[P+12]=s.b,Y[P+13]=s.a,Y[P+14]=E,Y[P+15]=A,Y[P+16]=R,Y[P+17]=S,Y[P+18]=s.r,Y[P+19]=s.g,Y[P+20]=s.b,Y[P+21]=s.a,Y[P+22]=b,Y[P+23]=I),P=u.length,(j=K.Utils.setArraySize(u,P+3))[P]=p,j[P+1]=p+1,j[P+2]=p+2,p+=3;continue t}var _=h.length;if(0!=_){for(var k=T-S,F=R-M,O=v-R,L=S-y,N=1/(k*O+F*(y-S)),D=_>>1,V=this.clipOutput,Y=K.Utils.setArraySize(l,P+D*d),X=0;X<_;X+=2){var B=V[X],U=V[X+1];Y[P]=B,Y[P+1]=U,Y[P+2]=s.r,Y[P+3]=s.g,Y[P+4]=s.b,Y[P+5]=s.a;var z=B-R,W=U-S,q=(k*z+F*W)*N,G=(L*z+O*W)*N,H=1-q-G;Y[P+6]=x*q+E*G+b*H,Y[P+7]=w*q+A*G+I*H,o&&(Y[P+8]=a.r,Y[P+9]=a.g,Y[P+10]=a.b,Y[P+11]=a.a),P+=d}P=u.length;var j=K.Utils.setArraySize(u,P+3*(D-2));for(D--,X=1;X<D;X++)j[P]=p,j[P+1]=p+X,j[P+2]=p+X+1,P+=3;p+=1+D}}},qt.prototype.clip=function(t,e,n,i,r,s,a,o){var h=o,l=!1,u=null;2<=a.length%4?(u=o,o=this.scratch):u=this.scratch,u.length=0,u.push(t),u.push(e),u.push(n),u.push(i),u.push(r),u.push(s),u.push(t),u.push(e),o.length=0;for(var c=a,f=a.length-4,d=0;;d+=2){for(var p=c[d],m=c[d+1],g=c[d+2],v=c[d+3],y=p-g,x=m-v,w=u,M=u.length-2,T=o.length,E=0;E<M;E+=2){var A=w[E],R=w[E+1],S=w[E+2],b=w[E+3],I=0<y*(b-v)-x*(S-g);if(0<y*(R-v)-x*(A-g)){if(I){o.push(S),o.push(b);continue}var C,P,_,k=(C=b-R)*(g-p)-(P=S-A)*(v-m);1e-6<Math.abs(k)?(_=(P*(m-R)-C*(p-A))/k,o.push(p+(g-p)*_),o.push(m+(v-m)*_)):(o.push(p),o.push(m))}else I&&(k=(C=b-R)*(g-p)-(P=S-A)*(v-m),1e-6<Math.abs(k)?(_=(P*(m-R)-C*(p-A))/k,o.push(p+(g-p)*_),o.push(m+(v-m)*_)):(o.push(p),o.push(m)),o.push(S),o.push(b));l=!0}if(T==o.length)return!(h.length=0);if(o.push(o[0]),o.push(o[1]),d==f)break;var F=o;(o=u).length=0,u=F}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},qt.makeClockwise=function(t){for(var e,n,i,r=t,s=t.length,a=r[s-2]*r[1]-r[0]*r[s-1],o=0,h=s-3;o<h;o+=2)e=r[o],n=r[o+1],i=r[o+2],a+=e*r[o+3]-i*n;if(!(a<0))for(var o=0,l=s-2,h=s>>1;o<h;o+=2){var u=r[o],c=r[o+1],f=l-o;r[o]=r[f],r[o+1]=r[1+f],r[f]=u,r[1+f]=c}},k=qt,K.SkeletonClipping=k,F=bt=bt||{},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,F.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==(T=n.findIkConstraint(y.ik[M])))throw new Error("Skin IK constraint not found: "+y.ik[s]);x.constraints.push(T)}if(y.transform)for(M=0;M<y.transform.length;M++){if(null==(T=n.findTransformConstraint(y.transform[M])))throw new Error("Skin transform constraint not found: "+y.transform[s]);x.constraints.push(T)}if(y.path)for(var T,M=0;M<y.path.length;M++){if(null==(T=n.findPathConstraint(y.path[M])))throw new Error("Skin path constraint not found: "+y.path[s]);x.constraints.push(T)}for(var l in y.attachments){var E=n.findSlot(l);if(null==E)throw new Error("Slot not found: "+l);var A=y.attachments[l];for(var R in A){var S=this.readAttachment(A[R],x,E.index,R,n);null!=S&&x.setAttachment(E.index,R,S)}}n.skins.push(x),"default"==x.name&&(n.defaultSkin=x)}for(var s=0,b=this.linkedMeshes.length;s<b;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 _=i.events[P];(f=new tt.EventData(P)).intValue=this.getValue(_,"int",0),f.floatValue=this.getValue(_,"float",0),f.stringValue=this.getValue(_,"string",""),f.audioPath=this.getValue(_,"audio",null),null!=f.audioPath&&(f.volume=this.getValue(_,"volume",1),f.balance=this.getValue(_,"balance",0)),n.events.push(f)}if(i.animations)for(var k in i.animations){var F=i.animations[k];this.readAnimation(F,k,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==(K=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=K;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=K,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=K,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],T=this.getValue(f,"x",M),E=this.getValue(f,"y",M);x.setFrame(u,this.getValue(f,"time",0),T*w,E*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 R=t.ik[A],S=n.findIkConstraint(A);for((x=new tt.IkConstraintTimeline(R.length)).ikConstraintIndex=n.ikConstraints.indexOf(S),c=u=0;c<R.length;c++)f=R[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(R=t.transform[A],S=n.findTransformConstraint(A),(x=new tt.TransformConstraintTimeline(R.length)).transformConstraintIndex=n.transformConstraints.indexOf(S),c=u=0;c<R.length;c++)f=R[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 R=t.path[A],b=n.findPathConstraintIndex(A);if(-1==b)throw new Error("Path constraint not found: "+A);var I=n.pathConstraints[b];for(var h in R)if(l=R[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=b,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=b,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],_=n.findSkin(C);if(null==_)throw new Error("Skin not found: "+C);for(var a in P){if(o=P[a],-1==(K=n.findSlotIndex(a)))throw new Error("Slot not found: "+o.name);for(var h in o){var l=o[h],k=_.getAttachment(K,h);if(null==k)throw new Error("Deform attachment not found: "+l.name);var F=null!=k.bones,O=k.vertices,L=F?O.length/3*2:O.length;(x=new tt.DeformTimeline(l.length)).slotIndex=K,x.attachment=k;for(var u=0,N=0;N<l.length;N++){var f=l[N],D=void 0,V=this.getValue(f,"vertices",null);if(null==V)D=F?tt.Utils.newFloatArray(L):O;else{D=tt.Utils.newFloatArray(L);var Y=this.getValue(f,"offset",0);if(tt.Utils.arrayCopy(V,0,D,Y,V.length),1!=i)for(var X=(c=Y)+V.length;c<X;c++)D[c]*=i;if(!F)for(c=0;c<L;c++)D[c]+=O[c]}x.setFrame(u,this.getValue(f,"time",0),D),this.readCurve(f,x,u),u++}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}}}var B=t.drawOrder;if(null==B&&(B=t.draworder),null!=B){for(var x=new tt.DrawOrderTimeline(B.length),U=n.slots.length,u=0,N=0;N<B.length;N++){var z=B[N],W=null,q=this.getValue(z,"offsets",null);if(null!=q){W=tt.Utils.newArray(U,-1);for(var G=tt.Utils.newArray(U-q.length,0),H=0,j=0,c=0;c<q.length;c++){var K,Z=q[c];if(-1==(K=n.findSlotIndex(Z.slot)))throw new Error("Slot not found: "+Z.slot);for(;H!=K;)G[j++]=H++;W[H+Z.offset]=H++}for(;H<U;)G[j++]=H++;for(c=U-1;0<=c;c--)-1==W[c]&&(W[c]=G[--j])}x.setFrame(u++,this.getValue(z,"time",0),W)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(t.events){for(x=new tt.EventTimeline(t.events.length),c=u=0;c<t.events.length;c++){var Q=t.events[c],J=n.findEvent(Q.name);if(null==J)throw new Error("Event not found: "+Q.name);var $=new tt.Event(tt.Utils.toSinglePrecision(this.getValue(Q,"time",0)),J);$.intValue=this.getValue(Q,"int",J.intValue),$.floatValue=this.getValue(Q,"float",J.floatValue),$.stringValue=this.getValue(Q,"string",J.stringValue),null!=$.data.audioPath&&($.volume=this.getValue(Q,"volume",1),$.balance=this.getValue(Q,"balance",0)),x.setFrame(u++,$)}r.push(x),s=Math.max(s,x.frames[x.getFrameCount()-1])}if(isNaN(s))throw new Error("Error while parsing animation, duration is NaN");n.animations.push(new tt.Animation(e,r,s))},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}}(bt=bt||{}),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}(bt=bt||{}),L=bt=bt||{},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)))},N=Ht,L.Slot=N,(D=bt=bt||{}).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=(_t(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}(bt=bt||{}),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,_t(r,i),r);function r(){return null!==i&&i.apply(this,arguments)||this}d.TextureAtlasRegion=g}(bt=bt||{}),V=bt=bt||{},Kt.prototype.isActive=function(){return this.active},Kt.prototype.apply=function(){this.update()},Kt.prototype.update=function(){this.data.local?this.data.relative?this.applyRelativeLocal():this.applyAbsoluteLocal():this.data.relative?this.applyRelativeWorld():this.applyAbsoluteWorld()},Kt.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?V.MathUtils.degRad:-V.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,T,E,A,R,S=f[d],b=!1;0!=t&&(m=S.a,M=S.b,g=S.c,T=S.d,(A=Math.atan2(o,s)-Math.atan2(g,m)+u)>V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A*=t,v=Math.cos(A),y=Math.sin(A),S.a=v*m-y*g,S.b=v*M-y*T,S.c=y*m+v*g,S.d=y*M+v*T,b=!0),0!=e&&(x=this.temp,r.localToWorld(x.set(this.data.offsetX,this.data.offsetY)),S.worldX+=(x.x-S.worldX)*e,S.worldY+=(x.y-S.worldY)*e,b=!0),0<n&&(R=Math.sqrt(S.a*S.a+S.c*S.c),w=Math.sqrt(s*s+o*o),1e-5<R&&(R=(R+(w-R+this.data.offsetScaleX)*n)/R),S.a*=R,S.c*=R,R=Math.sqrt(S.b*S.b+S.d*S.d),w=Math.sqrt(a*a+h*h),1e-5<R&&(R=(R+(w-R+this.data.offsetScaleY)*n)/R),S.b*=R,S.d*=R,b=!0),0<i&&(M=S.b,T=S.d,E=Math.atan2(T,M),(A=Math.atan2(h,a)-Math.atan2(o,s)-(E-Math.atan2(S.c,S.a)))>V.MathUtils.PI?A-=V.MathUtils.PI2:A<-V.MathUtils.PI&&(A+=V.MathUtils.PI2),A=E+(A+c)*i,R=Math.sqrt(M*M+T*T),S.b=Math.cos(A)*R,S.d=Math.sin(A)*R,b=!0),b&&(S.appliedValid=!1)}},Kt.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?V.MathUtils.degRad:-V.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,T,E,A=f[d],R=!1;0!=t&&(m=A.a,M=A.b,g=A.c,T=A.d,(w=Math.atan2(o,s)+u)>V.MathUtils.PI?w-=V.MathUtils.PI2:w<-V.MathUtils.PI&&(w+=V.MathUtils.PI2),w*=t,v=Math.cos(w),y=Math.sin(w),A.a=v*m-y*g,A.b=v*M-y*T,A.c=y*m+v*g,A.d=y*M+v*T,R=!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,R=!0),0<n&&(E=(Math.sqrt(s*s+o*o)-1+this.data.offsetScaleX)*n+1,A.a*=E,A.c*=E,E=(Math.sqrt(a*a+h*h)-1+this.data.offsetScaleY)*n+1,A.b*=E,A.d*=E,R=!0),0<i&&((w=Math.atan2(h,a)-Math.atan2(o,s))>V.MathUtils.PI?w-=V.MathUtils.PI2:w<-V.MathUtils.PI&&(w+=V.MathUtils.PI2),M=A.b,T=A.d,w=Math.atan2(T,M)+(w-V.MathUtils.PI/2+c)*i,E=Math.sqrt(M*M+T*T),A.b=Math.cos(w)*E,A.d=Math.sin(w)*E,R=!0),R&&(A.appliedValid=!1)}},Kt.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)}},Kt.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=Kt,V.TransformConstraint=Y,X=bt=bt||{},B=X.ConstraintData,_t(Zt,B),U=Zt,X.TransformConstraintData=U,z=bt=bt||{},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],T=e[1+w];if(Qt.positiveArea(v,y,d,p,M,T)&&Qt.positiveArea(d,p,m,g,M,T)&&Qt.positiveArea(m,g,v,y,M,T))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 E=(--n+r-1)%n,A=r==n?0:r;s[E]=Qt.isConcave(E,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,b=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]),b==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,T,E,A,R,S,b,I,C=s[0],P=s[s.length-1],_=(a=i[l])[M=a.length-4],k=a[M+1],F=a[M+2],O=a[M+3],L=a[0],N=a[1],D=a[2],V=a[3],Y=Qt.winding(_,k,F,O,L,N),X=0;X<u;X++)X!=l&&3==(T=r[X]).length&&(E=T[0],A=T[1],R=T[2],y=(S=i[X])[S.length-2],x=S[S.length-1],E==C&&A==P&&(b=Qt.winding(_,k,F,O,y,x),I=Qt.winding(y,x,L,N,D,V),b==Y&&I==Y&&(S.length=0,T.length=0,a.push(y),a.push(x),s.push(R),_=F,k=O,F=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},W=Qt,z.Triangulator=W,function(t){var e=(n.prototype.add=function(t){var e=this.contains(t);return this.array[0|t]=0|t,!e},n.prototype.contains=function(t){return null!=this.array[0|t]},n.prototype.remove=function(t){this.array[0|t]=void 0},n.prototype.clear=function(){this.array.length=0},n);function n(){this.array=new Array}t.IntSet=e;var i=(r.prototype.set=function(t,e,n,i){return this.r=t,this.g=e,this.b=n,this.a=i,this.clamp(),this},r.prototype.setFromColor=function(t){return this.r=t.r,this.g=t.g,this.b=t.b,this.a=t.a,this},r.prototype.setFromString=function(t){return t="#"==t.charAt(0)?t.substr(1):t,this.r=parseInt(t.substr(0,2),16)/255,this.g=parseInt(t.substr(2,2),16)/255,this.b=parseInt(t.substr(4,2),16)/255,this.a=(8!=t.length?255:parseInt(t.substr(6,2),16))/255,this},r.prototype.add=function(t,e,n,i){return this.r+=t,this.g+=e,this.b+=n,this.a+=i,this.clamp(),this},r.prototype.clamp=function(){return this.r<0?this.r=0:1<this.r&&(this.r=1),this.g<0?this.g=0:1<this.g&&(this.g=1),this.b<0?this.b=0:1<this.b&&(this.b=1),this.a<0?this.a=0:1<this.a&&(this.a=1),this},r.rgba8888ToColor=function(t,e){t.r=((4278190080&e)>>>24)/255,t.g=((16711680&e)>>>16)/255,t.b=((65280&e)>>>8)/255,t.a=(255&e)/255},r.rgb888ToColor=function(t,e){t.r=((16711680&e)>>>16)/255,t.g=((65280&e)>>>8)/255,t.b=(255&e)/255},r.WHITE=new r(1,1,1,1),r.RED=new r(1,0,0,1),r.GREEN=new r(0,1,0,1),r.BLUE=new r(0,0,1,1),r.MAGENTA=new r(1,0,1,1),r);function r(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.r=t,this.g=e,this.b=n,this.a=i}t.Color=i;var s=(a.clamp=function(t,e,n){return t<e?e:n<t?n:t},a.cosDeg=function(t){return Math.cos(t*a.degRad)},a.sinDeg=function(t){return Math.sin(t*a.degRad)},a.signum=function(t){return 0<t?1:t<0?-1:0},a.toInt=function(t){return 0<t?Math.floor(t):Math.ceil(t)},a.cbrt=function(t){var e=Math.pow(Math.abs(t),1/3);return t<0?-e:e},a.randomTriangular=function(t,e){return a.randomTriangularWith(t,e,.5*(t+e))},a.randomTriangularWith=function(t,e,n){var i=Math.random(),r=e-t;return i<=(n-t)/r?t+Math.sqrt(i*r*(n-t)):e-Math.sqrt((1-i)*r*(e-n))},a.PI2=2*(a.PI=3.1415927),a.radDeg=a.radiansToDegrees=180/a.PI,a.degRad=a.degreesToRadians=a.PI/180,a);function a(){}t.MathUtils=s;var o=(h.prototype.apply=function(t,e,n){return t+(e-t)*this.applyInternal(n)},h);function h(){}t.Interpolation=o;var l,u=(_t(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=(_t(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=(T.prototype.set=function(t,e){return this.x=t,this.y=e,this},T.prototype.length=function(){var t=this.x,e=this.y;return Math.sqrt(t*t+e*e)},T.prototype.normalize=function(){var t=this.length();return 0!=t&&(this.x/=t,this.y/=t),this},T);function T(t,e){void 0===t&&(t=0),void 0===e&&(e=0),this.x=t,this.y=e}t.Vector2=M;var E=(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=E;var R=(S.prototype.hasEnoughData=function(){return this.addedValues>=this.values.length},S.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},S.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},S);function S(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=R}(bt=bt||{}),Math.fround||(Math.fround=(q=new Float32Array(1),function(t){return q[0]=t,q[0]})),function(e){function t(t){if(null==t)throw new Error("name cannot be null.");this.name=t}e.Attachment=t;var n,i=(_t(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(T=r,E=3*c;T<n;T+=s){var p=0,m=0,g=l[u++];for(g+=u;u<g;u++,E+=3){var v=d[l[u]],y=h[E],x=h[E+1],w=h[E+2];p+=(y*v.a+x*v.b+v.worldX)*w,m+=(y*v.c+x*v.d+v.worldY)*w}i[T]=p,i[T+1]=m}else for(var M=o,T=r,E=3*c,A=c<<1;T<n;T+=s){for(m=p=0,g=l[u++],g+=u;u<g;u++,E+=3,A+=2)v=d[l[u]],y=h[E]+M[A],x=h[E+1]+M[A+1],w=h[E+2],p+=(y*v.a+x*v.b+v.worldX)*w,m+=(y*v.c+x*v.d+v.worldY)*w;i[T]=p,i[T+1]=m}}else{0<o.length&&(h=o);for(var R=(v=t.bone).worldX,S=v.worldY,b=v.a,E=v.b,I=v.c,C=v.d,P=e,T=r;T<n;P+=2,T+=s){var y=h[P],x=h[P+1];i[T]=y*b+x*E+R,i[T+1]=y*I+x*C+S}}},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}(bt=bt||{}),G=bt=bt||{},(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",Z=bt=bt||{},Q=Z.VertexAttachment,_t(Jt,Q),Jt.prototype.copy=function(){var t=new Jt(name);return this.copyTo(t),t.color.setFromColor(this.color),t},J=Jt,Z.BoundingBoxAttachment=J,$=bt=bt||{},tt=$.VertexAttachment,_t($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=bt=bt||{},it=nt.VertexAttachment,_t(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=bt=bt||{},at=st.VertexAttachment,_t(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=bt=bt||{},ut=lt.VertexAttachment,_t(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=bt=bt||{},dt=ft.Attachment,_t(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=bt=bt||{},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=bt=bt||{},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=bt=bt||{},wt=xt.canvas||(xt.canvas={}),Mt=xt.AssetManager,_t(ae,Mt),Tt=ae,wt.AssetManager=Tt,Et=bt=bt||{},At=Et.canvas||(Et.canvas={}),Rt=Et.Texture,_t(oe,Rt),oe.prototype.setFilters=function(t,e){},oe.prototype.setWraps=function(t,e){},oe.prototype.dispose=function(){},St=oe,At.CanvasTexture=St,It=bt=bt||{},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],T=8*i[x+2],E=n[w],A=n[1+w],R=n[6+w],S=n[7+w],b=n[M],I=n[1+M],C=n[6+M],P=n[7+M],_=n[T],k=n[1+T],F=n[6+T],O=n[7+T];this.drawTriangle(l,E,A,R,S,b,I,C,P,_,k,F,O),this.debugRendering&&(y.strokeStyle="green",y.beginPath(),y.moveTo(E,A),y.lineTo(b,I),y.lineTo(_,k),y.lineTo(E,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=bt}).call(window)},function(t,e,n){var i=n(0),y=n(8),x=n(201),d=n(7),p=n(215),m=n(216),g=n(217),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(11),c=n(20),s=n(21),f=n(8),d=n(7),a=new i({Extends:c,initialize:function t(e,n,i,r,s){var a,o,h="png";d(n)&&(n=f(o=n,"key"),i=f(o,"url"),a=f(o,"normalMap"),r=f(o,"xhrSettings"),h=f(o,"extension",h),s=f(o,"frameConfig")),Array.isArray(i)&&(a=i[1],i=i[0]);var l,u={type:"image",cache:e.textureManager,extension:h,responseType:"blob",key:n,url:i,xhrSettings:r,config:s};c.call(this,e,u),a&&((l=new t(e,this.key,a,r,s)).type="normalMap",this.setLink(l),e.addFile(l))},onProcess:function(){this.state=r.FILE_PROCESSING,this.data=new Image,this.data.crossOrigin=this.crossOrigin;var t=this;this.data.onload=function(){c.revokeObjectURL(t.data),t.onProcessComplete()},this.data.onerror=function(){c.revokeObjectURL(t.data),t.onProcessError()},c.createObjectURL(this.data,this.xhrLoader.response,"image/png")},addToCache:function(){var t,e=this.linkFile;e&&e.state===r.FILE_COMPLETE?(t="image"===this.type?this.cache.addImage(this.key,this.data,e.data):this.cache.addImage(e.key,e.data,this.data),this.pendingDestroy(t),e.pendingDestroy(t)):e||(t=this.cache.addImage(this.key,this.data),this.pendingDestroy(t))}});s.register("image",function(t,e,n){if(Array.isArray(t))for(var i=0;i<t.length;i++)this.addFile(new a(this,t[i]));else this.addFile(new a(this,t,e,n));return this}),t.exports=a},function(t,e,n){t.exports={ADD:n(203),COMPLETE:n(204),FILE_COMPLETE:n(205),FILE_KEY_COMPLETE:n(206),FILE_LOAD_ERROR:n(207),FILE_LOAD:n(208),FILE_PROGRESS:n(209),POST_PROCESS:n(210),PROGRESS:n(211),START:n(212)}},function(t,e){t.exports="addfile"},function(t,e){t.exports="complete"},function(t,e){t.exports="filecomplete"},function(t,e){t.exports="filecomplete-"},function(t,e){t.exports="loaderror"},function(t,e){t.exports="load"},function(t,e){t.exports="fileprogress"},function(t,e){t.exports="postprocess"},function(t,e){t.exports="progress"},function(t,e){t.exports="start"},function(t,e){t.exports=function(t,e){return!!t.url&&(t.url.match(/^(?:blob:|data:|http:\/\/|https:\/\/|\/\/)/)?t.url:e+t.url)}},function(t,e,n){var s=n(44);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(11),l=n(20),r=n(21),u=n(8),c=n(6),f=n(7),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(11),o=n(20),s=n(21),h=n(8),l=n(7),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(27),l=n(5),i=n(0),r=n(46),s=n(47),a=n(48),o=n(49),u=n(50),c=n(52),f=n(15),d=n(17),p=n(53),m=n(18),g=n(238),v=n(245),y=new i({Extends:p,Mixins:[r,s,a,o,u,c,v],initialize:function(t,e,n,i,r,s,a){p.call(this,t,"Spine"),this.plugin=e,this.skeleton=null,this.skeletonData=null,this.state=null,this.stateData=null,this.root=null,this.bounds=null,this.drawDebug=!1,this.timeScale=1,this.displayOriginX=0,this.displayOriginY=0,this.preMultipliedAlpha=!1,this.blendMode=-1,this.setPosition(n,i),r&&this.setSkeleton(r,s,a)},willRender:function(){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,n){var i=n(0),o=n(220),r=new i({initialize:function(t,e){this.parent=t,(this.events=e)||(this.events=t.events?t.events:t),this.list={},this.values={},this._frozen=!1,!t.hasOwnProperty("sys")&&this.events&&this.events.once("destroy",this.destroy,this)},get:function(t){var e=this.list;if(Array.isArray(t)){for(var n=[],i=0;i<t.length;i++)n.push(e[t[i]]);return n}return e[t]},getAll:function(){var t={};for(var e in this.list)this.list.hasOwnProperty(e)&&(t[e]=this.list[e]);return t},query:function(t){var e={};for(var n in this.list)this.list.hasOwnProperty(n)&&n.match(t)&&(e[n]=this.list[n]);return e},set:function(t,e){if(this._frozen)return this;if("string"==typeof t)return this.setValue(t,e);for(var n in t)this.setValue(n,t[n]);return this},inc:function(t,e){if(this._frozen)return this;void 0===e&&(e=1);var n=this.get(t);return void 0===n&&(n=0),this.set(t,n+e),this},toggle:function(t){return this._frozen||this.set(t,!this.get(t)),this},setValue:function(n,t){return this._frozen||(this.has(n)?this.values[n]=t:(r=(i=this).list,s=this.events,a=this.parent,Object.defineProperty(this.values,n,{enumerable:!0,configurable:!0,get:function(){return r[n]},set:function(t){var e;i._frozen||(e=r[n],r[n]=t,s.emit(o.CHANGE_DATA,a,n,t,e),s.emit(o.CHANGE_DATA_KEY+n,a,t,e))}}),r[n]=t,s.emit(o.SET_DATA,a,n,t))),this;var i,r,s,a},each:function(t,e){for(var n=[this.parent,null,void 0],i=1;i<arguments.length;i++)n.push(arguments[i]);for(var r in this.list)n[1]=r,n[2]=this.list[r],t.apply(e,n);return this},merge:function(t,e){for(var n in void 0===e&&(e=!0),t)t.hasOwnProperty(n)&&(e||!e&&!this.has(n))&&this.setValue(n,t[n]);return this},remove:function(t){if(this._frozen)return this;if(!Array.isArray(t))return this.removeValue(t);for(var e=0;e<t.length;e++)this.removeValue(t[e]);return this},removeValue:function(t){var e;return this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),this},pop:function(t){var e=void 0;return!this._frozen&&this.has(t)&&(e=this.list[t],delete this.list[t],delete this.values[t],this.events.emit(o.REMOVE_DATA,this.parent,t,e)),e},has:function(t){return this.list.hasOwnProperty(t)},setFreeze:function(t){return this._frozen=t,this},reset:function(){for(var t in this.list)delete this.list[t],delete this.values[t];return this._frozen=!1,this},destroy:function(){this.reset(),this.events.off(o.CHANGE_DATA),this.events.off(o.SET_DATA),this.events.off(o.REMOVE_DATA),this.parent=null},freeze:{get:function(){return this._frozen},set:function(t){this._frozen=!!t}},count:{get:function(){var t=0;for(var e in this.list)void 0!==this.list[e]&&t++;return t}}});t.exports=r},function(t,e,n){t.exports={CHANGE_DATA:n(221),CHANGE_DATA_KEY:n(222),REMOVE_DATA:n(223),SET_DATA:n(224)}},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){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(239),DISPOSE:n(240),END:n(241),EVENT:n(242),INTERRUPTED:n(243),START:n(244)}},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(3),r=n(3);r=n(246),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e,n){var d=n(15),p=n(18),m=n(10);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())}},function(t,e,n){var i=n(0),s=n(248),r=n(353),a=new i({Extends:s,Mixins:[r],initialize:function(t,e,n,i,r){s.call(this,t,n,i,r),this.type="Spine",this.plugin=e}});t.exports=a},function(t,e,n){var s=n(249),r=n(14),i=n(0),a=n(285),o=n(22),h=n(53),l=n(22),u=n(24),c=n(350),f=n(352),d=n(1),p=new i({Extends:h,Mixins:[a.AlphaSingle,a.BlendMode,a.ComputedSize,a.Depth,a.Mask,a.Transform,a.Visible,c],initialize:function(t,e,n,i){h.call(this,t,"Container"),this.list=[],this.exclusive=!0,this.maxSize=-1,this.position=0,this.localTransform=new a.TransformMatrix,this.tempTransformMatrix=new a.TransformMatrix,this._displayList=t.sys.displayList,this._sortKey="",this._sysEvents=t.sys.events,this.scrollFactorX=1,this.scrollFactorY=1,this.setPosition(e,n),this.clearAlpha(),this.setBlendMode(r.SKIP_CHECK),i&&this.add(i)},originX:{get:function(){return.5}},originY:{get:function(){return.5}},displayOriginX:{get:function(){return.5*this.width}},displayOriginY:{get:function(){return.5*this.height}},setExclusive:function(t){return void 0===t&&(t=!0),this.exclusive=t,this},getBounds:function(t){var e;if(void 0===t&&(t=new u),t.setTo(this.x,this.y,0,0),this.parentContainer&&(e=this.parentContainer.getBoundsTransformMatrix().transformPoint(this.x,this.y),t.setTo(e.x,e.y,0,0)),0<this.list.length){var n=this.list,i=new u,r=!1;t.setEmpty();for(var s=0;s<n.length;s++){var a=n[s];a.getBounds&&(a.getBounds(i),r?f(i,t,t):(t.setTo(i.x,i.y,i.width,i.height),r=!0))}}return t},addHandler:function(t){t.once(o.DESTROY,this.remove,this),this.exclusive&&(this._displayList.remove(t),t.parentContainer&&t.parentContainer.remove(t),t.parentContainer=this),this.scene.sys.displayList.exists(t)||t.emit(l.ADDED_TO_SCENE,t,this.scene)},removeHandler:function(t){t.off(o.DESTROY,this.remove),this.exclusive&&(t.parentContainer=null),this.scene.sys.displayList.exists(t)||t.emit(l.REMOVED_FROM_SCENE,t,this.scene)},pointToContainer:function(t,e){void 0===e&&(e=new d),this.parentContainer?this.parentContainer.pointToContainer(t,e):e=new d(t.x,t.y);var n=this.tempTransformMatrix;return n.applyITRS(this.x,this.y,this.rotation,this.scaleX,this.scaleY),n.invert(),n.transformPoint(t.x,t.y,e),e},getBoundsTransformMatrix:function(){return this.getWorldTransformMatrix(this.tempTransformMatrix,this.localTransform)},add:function(t){return s.Add(this.list,t,this.maxSize,this.addHandler,this),this},addAt:function(t,e){return s.AddAt(this.list,t,e,this.maxSize,this.addHandler,this),this},getAt:function(t){return this.list[t]},getIndex:function(t){return this.list.indexOf(t)},sort:function(n,t){return n&&(void 0===t&&(t=function(t,e){return t[n]-e[n]}),s.StableSort.inplace(this.list,t)),this},getByName:function(t){return s.GetFirst(this.list,"name",t)},getRandom:function(t,e){return s.GetRandom(this.list,t,e)},getFirst:function(t,e,n,i){return s.GetFirst(this.list,t,e,n,i)},getAll:function(t,e,n,i){return s.GetAll(this.list,t,e,n,i)},count:function(t,e,n,i){return s.CountAllMatching(this.list,t,e,n,i)},swap:function(t,e){return s.Swap(this.list,t,e),this},moveTo:function(t,e){return s.MoveTo(this.list,t,e),this},remove:function(t,e){var n=s.Remove(this.list,t,this.removeHandler,this);if(e&&n){Array.isArray(n)||(n=[n]);for(var i=0;i<n.length;i++)n[i].destroy()}return this},removeAt:function(t,e){var n=s.RemoveAt(this.list,t,this.removeHandler,this);return e&&n&&n.destroy(),this},removeBetween:function(t,e,n){var i=s.RemoveBetween(this.list,t,e,this.removeHandler,this);if(n)for(var r=0;r<i.length;r++)i[r].destroy();return this},removeAll:function(t){var e=s.RemoveBetween(this.list,0,this.list.length,this.removeHandler,this);if(t)for(var n=0;n<e.length;n++)e[n].destroy();return this},bringToTop:function(t){return s.BringToTop(this.list,t),this},sendToBack:function(t){return s.SendToBack(this.list,t),this},moveUp:function(t){return s.MoveUp(this.list,t),this},moveDown:function(t){return s.MoveDown(this.list,t),this},reverse:function(){return this.list.reverse(),this},shuffle:function(){return s.Shuffle(this.list),this},replace:function(t,e,n){return s.Replace(this.list,t,e)&&(this.addHandler(e),this.removeHandler(t),n&&t.destroy()),this},exists:function(t){return-1<this.list.indexOf(t)},setAll:function(t,e,n,i){return s.SetAll(this.list,t,e,n,i),this},each:function(t,e){for(var n=[null],i=this.list.slice(),r=i.length,s=2;s<arguments.length;s++)n.push(arguments[s]);for(s=0;s<r;s++)n[0]=i[s],t.apply(e,n);return this},iterate:function(t,e){for(var n=[null],i=2;i<arguments.length;i++)n.push(arguments[i]);for(i=0;i<this.list.length;i++)n[0]=this.list[i],t.apply(e,n);return this},setScrollFactor:function(t,e,n){return void 0===e&&(e=t),void 0===n&&(n=!1),this.scrollFactorX=t,this.scrollFactorY=e,n&&(s.SetAll(this.list,"scrollFactorX",t),s.SetAll(this.list,"scrollFactorY",e)),this},length:{get:function(){return this.list.length}},first:{get:function(){return(this.position=0)<this.list.length?this.list[0]:null}},last:{get:function(){return 0<this.list.length?(this.position=this.list.length-1,this.list[this.position]):null}},next:{get:function(){return this.position<this.list.length?(this.position++,this.list[this.position]):null}},previous:{get:function(){return 0<this.position?(this.position--,this.list[this.position]):null}},preDestroy:function(){this.removeAll(!!this.exclusive),this.localTransform.destroy(),this.tempTransformMatrix.destroy(),this.list=[],this._displayList=null}});t.exports=p},function(t,e,n){t.exports={Matrix:n(250),Add:n(258),AddAt:n(259),BringToTop:n(260),CountAllMatching:n(261),Each:n(262),EachInRange:n(263),FindClosestInSorted:n(57),GetAll:n(264),GetFirst:n(265),GetRandom:n(266),MoveDown:n(267),MoveTo:n(268),MoveUp:n(269),NumberArray:n(270),NumberArrayStep:n(271),QuickSelect:n(272),Range:n(273),Remove:n(274),RemoveAt:n(275),RemoveBetween:n(276),RemoveRandomElement:n(277),Replace:n(278),RotateLeft:n(279),RotateRight:n(280),SafeRange:n(4),SendToBack:n(281),SetAll:n(282),Shuffle:n(58),SpliceOne:n(13),StableSort:n(283),Swap:n(284)}},function(t,e,n){t.exports={CheckMatrix:n(23),MatrixToString:n(251),ReverseColumns:n(253),ReverseRows:n(254),Rotate180:n(255),RotateLeft:n(256),RotateMatrix:n(12),RotateRight:n(257),TransposeMatrix:n(56)}},function(t,e,n){var a=n(252),o=n(23);t.exports=function(t){var e="";if(!o(t))return e;for(var n=0;n<t.length;n++){for(var i=0;i<t[n].length;i++){var r=t[n][i].toString();e+="undefined"!==r?a(r,2):"?",i<t[n].length-1&&(e+=" |")}if(n<t.length-1){e+="\n";for(var s=0;s<t[n].length;s++)e+="---",s<t[n].length-1&&(e+="+");e+="\n"}}return e}},function(t,e){t.exports=function(t,e,n,i){void 0===e&&(e=0),void 0===n&&(n=" "),void 0===i&&(i=3);var r;if(e+1>=(t=t.toString()).length)switch(i){case 1:t=new Array(e+1-t.length).join(n)+t;break;case 3:var s=Math.ceil((r=e-t.length)/2);t=new Array(1+(r-s)).join(n)+t+new Array(s+1).join(n);break;default:t+=new Array(e+1-t.length).join(n)}return t}},function(t,e){t.exports=function(t){return t.reverse()}},function(t,e){t.exports=function(t){for(var e=0;e<t.length;e++)t[e].reverse();return t}},function(t,e,n){var i=n(12);t.exports=function(t){return i(t,180)}},function(t,e,n){var i=n(12);t.exports=function(t){return i(t,90)}},function(t,e,n){var i=n(12);t.exports=function(t){return i(t,-90)}},function(t,e){t.exports=function(t,e,n,i,r){if(void 0===r&&(r=t),0<n){var s=n-t.length;if(s<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.push(e),i&&i.call(r,e),e):null;for(var a=e.length-1;0<=a;)-1!==t.indexOf(e[a])&&e.splice(a,1),a--;if(0===(a=e.length))return null;0<n&&s<a&&(e.splice(s),a=s);for(var o=0;o<a;o++){var h=e[o];t.push(h),i&&i.call(r,h)}return e}},function(t,e){t.exports=function(t,e,n,i,r,s){if(void 0===n&&(n=0),void 0===s&&(s=t),0<i){var a=i-t.length;if(a<=0)return null}if(!Array.isArray(e))return-1===t.indexOf(e)?(t.splice(n,0,e),r&&r.call(s,e),e):null;for(var o=e.length-1;0<=o;)-1!==t.indexOf(e[o])&&e.pop(),o--;if(0===(o=e.length))return null;0<i&&a<o&&(e.splice(a),o=a);for(var h=o-1;0<=h;h--){var l=e[h];t.splice(n,0,l),r&&r.call(s,l)}return e}},function(t,e){t.exports=function(t,e){var n=t.indexOf(e);return-1!==n&&n<t.length&&(t.splice(n,1),t.push(e)),e}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);var s=0;if(o(t,i,r))for(var a=i;a<r;a++){t[a][e]===n&&s++}return s}},function(t,e){t.exports=function(t,e,n){for(var i=[null],r=3;r<arguments.length;r++)i.push(arguments[r]);for(r=0;r<t.length;r++)i[0]=t[r],e.apply(n,i);return t}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){if(void 0===i&&(i=0),void 0===r&&(r=t.length),o(t,i,r)){for(var s=[null],a=5;a<arguments.length;a++)s.push(arguments[a]);for(a=i;a<r;a++)s[0]=t[a],e.apply(n,s)}return t}},function(t,e,n){var h=n(4);t.exports=function(t,e,n,i,r){void 0===i&&(i=0),void 0===r&&(r=t.length);var s=[];if(h(t,i,r))for(var a=i;a<r;a++){var o=t[a];(!e||e&&void 0===n&&o.hasOwnProperty(e)||e&&void 0!==n&&o[e]===n)&&s.push(o)}return s}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){if(void 0===i&&(i=0),void 0===r&&(r=t.length),o(t,i,r))for(var s=i;s<r;s++){var a=t[s];if(!e||e&&void 0===n&&a.hasOwnProperty(e)||e&&void 0!==n&&a[e]===n)return a}return null}},function(t,e){t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);var i=e+Math.floor(Math.random()*n);return void 0===t[i]?null:t[i]}},function(t,e){t.exports=function(t,e){var n,i,r=t.indexOf(e);return 0<r&&(n=t[r-1],i=t.indexOf(n),t[r]=n,t[i]=e),t}},function(t,e){t.exports=function(t,e,n){var i=t.indexOf(e);if(-1===i||n<0||n>=t.length)throw new Error("Supplied index out of bounds");return i!==n&&(t.splice(i,1),t.splice(n,0,e)),e}},function(t,e){t.exports=function(t,e){var n,i,r=t.indexOf(e);return-1!==r&&r<t.length-1&&(n=t[r+1],i=t.indexOf(n),t[r]=n,t[i]=e),t}},function(t,e){t.exports=function(t,e,n,i){for(var r,s=[],a=t;a<=e;a++){n||i?(r=n?n+a.toString():a.toString(),i&&(r=r.concat(i)),s.push(r)):s.push(a)}return s}},function(t,e,n){var a=n(39);t.exports=function(t,e,n){void 0===t&&(t=0),void 0===e&&(e=null),void 0===n&&(n=1),null===e&&(e=t,t=0);for(var i=[],r=Math.max(a((e-t)/(n||1)),0),s=0;s<r;s++)i.push(t),t+=n;return i}},function(t,e){function m(t,e,n){var i=t[e];t[e]=t[n],t[n]=i}function g(t,e){return t<e?-1:e<t?1:0}var v=function(t,e,n,i,r){for(void 0===n&&(n=0),void 0===i&&(i=t.length-1),void 0===r&&(r=g);n<i;){var s,a,o,h,l,u,c;600<i-n&&(s=i-n+1,a=e-n+1,o=Math.log(s),h=.5*Math.exp(2*o/3),l=.5*Math.sqrt(o*h*(s-h)/s)*(a-s/2<0?-1:1),u=Math.max(n,Math.floor(e-a*h/s+l)),c=Math.min(i,Math.floor(e+(s-a)*h/s+l)),v(t,e,u,c,r));var f=t[e],d=n,p=i;for(m(t,n,e),0<r(t[i],f)&&m(t,n,i);d<p;){for(m(t,d,p),d++,p--;r(t[d],f)<0;)d++;for(;0<r(t[p],f);)p--}0===r(t[n],f)?m(t,n,p):m(t,++p,i),p<=e&&(n=p+1),e<=p&&(i=p-1)}};t.exports=v},function(t,e,n){var d=n(6),p=n(58);t.exports=function(t,e,n){var i,r=d(n,"max",0),s=d(n,"qty",1),a=d(n,"random",!1),o=d(n,"randomB",!1),h=d(n,"repeat",0),l=d(n,"yoyo",!1),u=[];o&&p(e),-1===h&&(h=0===r?0:(i=t.length*e.length*s,l&&(i*=2),Math.ceil(r/i)));for(var c=0;c<=h;c++){var f=function(t,e,n){for(var i=[],r=0;r<t.length;r++)for(var s=0;s<e.length;s++)for(var a=0;a<n;a++)i.push({a:t[r],b:e[s]});return i}(t,e,s);a&&p(f),u=u.concat(f),l&&(f.reverse(),u=u.concat(f))}return r&&u.splice(r),u}},function(t,e,n){var o=n(13);t.exports=function(t,e,n,i){if(void 0===i&&(i=t),!Array.isArray(e))return-1!==(s=t.indexOf(e))?(o(t,s),n&&n.call(i,e),e):null;for(var r=e.length-1;0<=r;){var s,a=e[r];-1!==(s=t.indexOf(a))?(o(t,s),n&&n.call(i,a)):e.pop(),r--}return e}},function(t,e,n){var s=n(13);t.exports=function(t,e,n,i){if(void 0===i&&(i=t),e<0||e>t.length-1)throw new Error("Index out of bounds");var r=s(t,e);return n&&n.call(i,r),r}},function(t,e,n){var l=n(4);t.exports=function(t,e,n,i,r){if(void 0===e&&(e=0),void 0===n&&(n=t.length),void 0===r&&(r=t),l(t,e,n)){var s=n-e,a=t.splice(e,s);if(i)for(var o=0;o<a.length;o++){var h=a[o];i.call(r,h)}return a}return[]}},function(t,e,n){var r=n(13);t.exports=function(t,e,n){void 0===e&&(e=0),void 0===n&&(n=t.length);var i=e+Math.floor(Math.random()*n);return r(t,i)}},function(t,e){t.exports=function(t,e,n){var i=t.indexOf(e),r=t.indexOf(n);return-1!==i&&-1===r&&(t[i]=n,!0)}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var n=null,i=0;i<e;i++)n=t.shift(),t.push(n);return n}},function(t,e){t.exports=function(t,e){void 0===e&&(e=1);for(var n=null,i=0;i<e;i++)n=t.pop(),t.unshift(n);return n}},function(t,e){t.exports=function(t,e){var n=t.indexOf(e);return-1!==n&&0<n&&(t.splice(n,1),t.unshift(e)),e}},function(t,e,n){var o=n(4);t.exports=function(t,e,n,i,r){if(void 0===i&&(i=0),void 0===r&&(r=t.length),o(t,i,r))for(var s=i;s<r;s++){var a=t[s];a.hasOwnProperty(e)&&(a[e]=n)}return t}},function(e,t,n){!function(){function t(t,e){return i(t.slice(),e)}function i(t,e){"function"!=typeof e&&(e=function(t,e){return String(t).localeCompare(e)});var n=t.length;if(n<=1)return t;for(var i=new Array(n),r=1;r<n;r*=2){a(t,e,r,i);var s=t;t=i,i=s}return t}t.inplace=function(t,e){var n=i(t,e);return n!==t&&a(n,null,t.length,t),t};var a=function(t,e,n,i){for(var r,s,a,o,h=t.length,l=0,u=2*n,c=0;c<h;c+=u)for(s=(r=c+n)+n,h<r&&(r=h),h<s&&(s=h),a=c,o=r;;)if(a<r&&o<s)e(t[a],t[o])<=0?i[l++]=t[a++]:i[l++]=t[o++];else if(a<r)i[l++]=t[a++];else{if(!(o<s))break;i[l++]=t[o++]}};e.exports=t}()},function(t,e){t.exports=function(t,e,n){if(e!==n){var i=t.indexOf(e),r=t.indexOf(n);if(i<0||r<0)throw new Error("Supplied items must be elements of the same array");return t[i]=n,t[r]=e,t}}},function(t,e,n){t.exports={Alpha:n(286),AlphaSingle:n(287),Animation:n(288),BlendMode:n(309),ComputedSize:n(46),Crop:n(310),Depth:n(47),Flip:n(48),GetBounds:n(311),Mask:n(320),Origin:n(340),PathFollower:n(341),Pipeline:n(344),ScrollFactor:n(49),Size:n(345),Texture:n(346),TextureCrop:n(347),Tint:n(348),ToJSON:n(54),Transform:n(50),TransformMatrix:n(51),Visible:n(52)}},function(t,e,n){var r=n(5),i={_alpha:1,_alphaTL:1,_alphaTR:1,_alphaBL:1,_alphaBR:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t,e,n,i){return void 0===t&&(t=1),void 0===e?this.alpha=t:(this._alphaTL=r(t,0,1),this._alphaTR=r(e,0,1),this._alphaBL=r(n,0,1),this._alphaBR=r(i,0,1)),this},alpha:{get:function(){return this._alpha},set:function(t){var e=r(t,0,1);this._alpha=e,this._alphaTL=e,this._alphaTR=e,this._alphaBL=e,0===(this._alphaBR=e)?this.renderFlags&=-3:this.renderFlags|=2}},alphaTopLeft:{get:function(){return this._alphaTL},set:function(t){var e=r(t,0,1);0!==(this._alphaTL=e)&&(this.renderFlags|=2)}},alphaTopRight:{get:function(){return this._alphaTR},set:function(t){var e=r(t,0,1);0!==(this._alphaTR=e)&&(this.renderFlags|=2)}},alphaBottomLeft:{get:function(){return this._alphaBL},set:function(t){var e=r(t,0,1);0!==(this._alphaBL=e)&&(this.renderFlags|=2)}},alphaBottomRight:{get:function(){return this._alphaBR},set:function(t){var e=r(t,0,1);0!==(this._alphaBR=e)&&(this.renderFlags|=2)}}};t.exports=i},function(t,e,n){var i=n(5),r={_alpha:1,clearAlpha:function(){return this.setAlpha(1)},setAlpha:function(t){return void 0===t&&(t=1),this.alpha=t,this},alpha:{get:function(){return this._alpha},set:function(t){var e=i(t,0,1);0===(this._alpha=e)?this.renderFlags&=-3:this.renderFlags|=2}}};t.exports=r},function(t,e,n){var i=n(289),r=n(0),s=n(59),a=new r({initialize:function(t){this.parent=t,this.animationManager=t.scene.sys.anims,this.animationManager.once(s.REMOVE_ANIMATION,this.remove,this),this.isPlaying=!1,this.currentAnim=null,this.currentFrame=null,this.nextAnim=null,this.nextAnimsQueue=[],this._timeScale=1,this.frameRate=0,this.duration=0,this.msPerFrame=0,this.skipMissedFrames=!0,this._delay=0,this._repeat=0,this._repeatDelay=0,this._yoyo=!1,this.forward=!0,this._reverse=!1,this.accumulator=0,this.nextTick=0,this.repeatCounter=0,this.pendingRepeat=!1,this._paused=!1,this._wasPlaying=!1,this._pendingStop=0,this._pendingStopValue},chain:function(t){return t instanceof i&&(t=t.key),null===this.nextAnim?this.nextAnim=t:this.nextAnimsQueue.push(t),this.parent},setDelay:function(t){return void 0===t&&(t=0),this._delay=t,this.parent},getDelay:function(){return this._delay},delayedPlay:function(t,e,n){return this.play(e,!0,n),this.nextTick+=t,this.parent},getCurrentKey:function(){if(this.currentAnim)return this.currentAnim.key},load:function(t,e){return void 0===e&&(e=0),this.isPlaying&&this.stop(),this.animationManager.load(this,t,e),this.parent},pause:function(t){return this._paused||(this._paused=!0,this._wasPlaying=this.isPlaying,this.isPlaying=!1),void 0!==t&&this.updateFrame(t),this.parent},resume:function(t){return this._paused&&(this._paused=!1,this.isPlaying=this._wasPlaying),void 0!==t&&this.updateFrame(t),this.parent},isPaused:{get:function(){return this._paused}},play:function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=0),t instanceof i&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!0,this._reverse=!1,this._paused=!1,this._wasPlaying=!0,this._startAnimation(t,n))},playReverse:function(t,e,n){return void 0===e&&(e=!1),void 0===n&&(n=0),t instanceof i&&(t=t.key),e&&this.isPlaying&&this.currentAnim.key===t?this.parent:(this.forward=!1,this._reverse=!0,this._startAnimation(t,n))},_startAnimation:function(t,e){this.load(t,e);var n=this.currentAnim,i=this.parent;if(!n)return i;this.repeatCounter=-1===this._repeat?Number.MAX_VALUE:this._repeat,n.getFirstTick(this),this.isPlaying=!0,this.pendingRepeat=!1,n.showOnStart&&(i.visible=!0);var r=this.currentFrame;return n.emit(s.ANIMATION_START,n,r,i),i.emit(s.SPRITE_ANIMATION_KEY_START+t,n,r,i),i.emit(s.SPRITE_ANIMATION_START,n,r,i),i},reverse:function(){return this.isPlaying&&(this._reverse=!this._reverse,this.forward=!this.forward),this.parent},getProgress:function(){var t=this.currentFrame.progress;return this.forward||(t=1-t),t},setProgress:function(t){return this.forward||(t=1-t),this.setCurrentFrame(this.currentAnim.getFrameByProgress(t)),this.parent},remove:function(t,e){void 0===e&&(e=this.currentAnim),this.isPlaying&&e.key===this.currentAnim.key&&(this.stop(),this.setCurrentFrame(this.currentAnim.frames[0]))},getRepeat:function(){return this._repeat},setRepeat:function(t){return this._repeat=t,this.repeatCounter=-1===t?Number.MAX_VALUE:t,this.parent},getRepeatDelay:function(){return this._repeatDelay},setRepeatDelay:function(t){return this._repeatDelay=t,this.parent},restart:function(t){void 0===t&&(t=!1);var e=this.currentAnim;e.getFirstTick(this,t),this.forward=!0,this.isPlaying=!0,this.pendingRepeat=!1,this._paused=!1,this.updateFrame(e.frames[0]);var n=this.parent,i=this.currentFrame;return e.emit(s.ANIMATION_RESTART,e,i,n),n.emit(s.SPRITE_ANIMATION_KEY_RESTART+e.key,e,i,n),n.emit(s.SPRITE_ANIMATION_RESTART,e,i,n),this.parent},stop:function(){this._pendingStop=0,this.isPlaying=!1;var t,e=this.parent,n=this.currentAnim,i=this.currentFrame;return n&&(n.emit(s.ANIMATION_COMPLETE,n,i,e),e.emit(s.SPRITE_ANIMATION_KEY_COMPLETE+n.key,n,i,e),e.emit(s.SPRITE_ANIMATION_COMPLETE,n,i,e)),this.nextAnim&&(t=this.nextAnim,this.nextAnim=0<this.nextAnimsQueue.length?this.nextAnimsQueue.shift():null,this.play(t)),e},stopAfterDelay:function(t){return this._pendingStop=1,this._pendingStopValue=t,this.parent},stopOnRepeat:function(){return this._pendingStop=2,this.parent},stopOnFrame:function(t){return this._pendingStop=3,this._pendingStopValue=t,this.parent},setTimeScale:function(t){return void 0===t&&(t=1),this._timeScale=t,this.parent},getTimeScale:function(){return this._timeScale},getTotalFrames:function(){return this.currentAnim.frames.length},update:function(t,e){if(this.currentAnim&&this.isPlaying&&!this.currentAnim.paused){if(this.accumulator+=e*this._timeScale,1===this._pendingStop&&(this._pendingStopValue-=e,this._pendingStopValue<=0))return this.currentAnim.completeAnimation(this);this.accumulator>=this.nextTick&&this.currentAnim.setFrame(this)}},setCurrentFrame:function(t){var e=this.parent;return this.currentFrame=t,e.texture=t.frame.texture,e.frame=t.frame,e.isCropped&&e.frame.updateCropUVs(e._crop,e.flipX,e.flipY),e.setSizeToFrame(),e._originComponent&&(t.frame.customPivot?e.setOrigin(t.frame.pivotX,t.frame.pivotY):e.updateDisplayOrigin()),e},updateFrame:function(t){var e,n=this.setCurrentFrame(t);this.isPlaying&&(t.setAlpha&&(n.alpha=t.alpha),e=this.currentAnim,n.emit(s.SPRITE_ANIMATION_KEY_UPDATE+e.key,e,t,n),n.emit(s.SPRITE_ANIMATION_UPDATE,e,t,n),3===this._pendingStop&&this._pendingStopValue===t&&this.currentAnim.completeAnimation(this))},nextFrame:function(){return this.currentAnim&&this.currentAnim.nextFrame(this),this.parent},previousFrame:function(){return this.currentAnim&&this.currentAnim.previousFrame(this),this.parent},setYoyo:function(t){return void 0===t&&(t=!1),this._yoyo=t,this.parent},getYoyo:function(){return this._yoyo},destroy:function(){this.animationManager.off(s.REMOVE_ANIMATION,this.remove,this),this.animationManager=null,this.parent=null,this.nextAnimsQueue.length=0,this.currentAnim=null,this.currentFrame=null}});t.exports=a},function(t,e,n){var i=n(5),r=n(0),s=n(55),a=n(59),o=n(57),m=n(308),g=n(6),h=new r({Extends:s,initialize:function(t,e,n){s.call(this),this.manager=t,this.key=e,this.type="frame",this.frames=this.getFrames(t.textureManager,g(n,"frames",[]),g(n,"defaultTextureKey",null)),this.frameRate=g(n,"frameRate",null),this.duration=g(n,"duration",null),null===this.duration&&null===this.frameRate?(this.frameRate=24,this.duration=this.frameRate/this.frames.length*1e3):this.duration&&null===this.frameRate?this.frameRate=this.frames.length/(this.duration/1e3):this.duration=this.frames.length/this.frameRate*1e3,this.msPerFrame=1e3/this.frameRate,this.skipMissedFrames=g(n,"skipMissedFrames",!0),this.delay=g(n,"delay",0),this.repeat=g(n,"repeat",0),this.repeatDelay=g(n,"repeatDelay",0),this.yoyo=g(n,"yoyo",!1),this.showOnStart=g(n,"showOnStart",!1),this.hideOnComplete=g(n,"hideOnComplete",!1),this.paused=!1,this.manager.on(a.PAUSE_ALL,this.pause,this),this.manager.on(a.RESUME_ALL,this.resume,this)},addFrame:function(t){return this.addFrameAt(this.frames.length,t)},addFrameAt:function(t,e){var n,i,r=this.getFrames(this.manager.textureManager,e);return 0<r.length&&(0===t?this.frames=r.concat(this.frames):t===this.frames.length?this.frames=this.frames.concat(r):(n=this.frames.slice(0,t),i=this.frames.slice(t),this.frames=n.concat(r,i)),this.updateFrameSequence()),this},checkFrame:function(t){return 0<=t&&t<this.frames.length},completeAnimation:function(t){this.hideOnComplete&&(t.parent.visible=!1),t.stop()},getFirstTick:function(t,e){void 0===e&&(e=!0),t.accumulator=0,t.nextTick=t.msPerFrame+t.currentFrame.duration,e&&(t.nextTick+=t._delay)},getFrameAt:function(t){return this.frames[t]},getFrames:function(t,n,e){var i,r,s,a=[],o=1;if("string"==typeof n&&(r=n,s=t.get(r).getFrameNames(),n=[],s.forEach(function(t,e){n.push({key:r,frame:e})})),!Array.isArray(n)||0===n.length)return a;for(p=0;p<n.length;p++){var h,l,u,c=n[p],f=g(c,"key",e);f&&(h=g(c,"frame",0),l=t.getFrame(f,h),(u=new m(f,h,o,l)).duration=g(c,"duration",0),u.isFirst=!i,i&&((i.nextFrame=u).prevFrame=i),a.push(u),i=u,o++)}if(0<a.length){u.isLast=!0,u.nextFrame=a[0],a[0].prevFrame=u;for(var d=1/(a.length-1),p=0;p<a.length;p++)a[p].progress=p*d}return a},getNextTick:function(t){t.accumulator-=t.nextTick,t.nextTick=t.msPerFrame+t.currentFrame.duration},load:function(t,e){e>=this.frames.length&&(e=0),t.currentAnim!==this&&(t.currentAnim=this,t.frameRate=this.frameRate,t.duration=this.duration,t.msPerFrame=this.msPerFrame,t.skipMissedFrames=this.skipMissedFrames,t._delay=this.delay,t._repeat=this.repeat,t._repeatDelay=this.repeatDelay,t._yoyo=this.yoyo);var n=this.frames[e];0!==e||t.forward||(n=this.getLastFrame()),t.updateFrame(n)},getFrameByProgress:function(t){return t=i(t,0,1),o(t,this.frames,"progress")},nextFrame:function(t){var e=t.currentFrame;e.isLast?t._yoyo?this.handleYoyoFrame(t,!1):0<t.repeatCounter?t._reverse&&t.forward?t.forward=!1:this.repeatAnimation(t):this.completeAnimation(t):this.updateAndGetNextTick(t,e.nextFrame)},handleYoyoFrame:function(t,e){if(e=e||!1,t._reverse===!e&&0<t.repeatCounter)return t._repeatDelay&&!t.pendingRepeat||(t.forward=e),void this.repeatAnimation(t);var n;t._reverse===e||0!==t.repeatCounter?(n=(t.forward=e)?t.currentFrame.nextFrame:t.currentFrame.prevFrame,this.updateAndGetNextTick(t,n)):this.completeAnimation(t)},getLastFrame:function(){return this.frames[this.frames.length-1]},previousFrame:function(t){var e=t.currentFrame;e.isFirst?t._yoyo?this.handleYoyoFrame(t,!0):0<t.repeatCounter?(t._reverse&&!t.forward?t.currentFrame=this.getLastFrame():t.forward=!0,this.repeatAnimation(t)):this.completeAnimation(t):this.updateAndGetNextTick(t,e.prevFrame)},updateAndGetNextTick:function(t,e){t.updateFrame(e),this.getNextTick(t)},removeFrame:function(t){var e=this.frames.indexOf(t);return-1!==e&&this.removeFrameAt(e),this},removeFrameAt:function(t){return this.frames.splice(t,1),this.updateFrameSequence(),this},repeatAnimation:function(t){if(2===t._pendingStop)return this.completeAnimation(t);var e,n;0<t._repeatDelay&&!1===t.pendingRepeat?(t.pendingRepeat=!0,t.accumulator-=t.nextTick,t.nextTick+=t._repeatDelay):(t.repeatCounter--,t.updateFrame(t.currentFrame[t.forward?"nextFrame":"prevFrame"]),t.isPlaying&&(this.getNextTick(t),t.pendingRepeat=!1,e=t.currentFrame,n=t.parent,this.emit(a.ANIMATION_REPEAT,this,e),n.emit(a.SPRITE_ANIMATION_KEY_REPEAT+this.key,this,e,t.repeatCounter,n),n.emit(a.SPRITE_ANIMATION_REPEAT,this,e,t.repeatCounter,n)))},setFrame:function(t){t.forward?this.nextFrame(t):this.previousFrame(t)},toJSON:function(){var e={key:this.key,type:this.type,frames:[],frameRate:this.frameRate,duration:this.duration,skipMissedFrames:this.skipMissedFrames,delay:this.delay,repeat:this.repeat,repeatDelay:this.repeatDelay,yoyo:this.yoyo,showOnStart:this.showOnStart,hideOnComplete:this.hideOnComplete};return this.frames.forEach(function(t){e.frames.push(t.toJSON())}),e},updateFrameSequence:function(){for(var t,e=this.frames.length,n=1/(e-1),i=0;i<e;i++)(t=this.frames[i]).index=i+1,t.isFirst=!1,t.isLast=!1,t.progress=i*n,0===i?(t.isFirst=!0,1===e?(t.isLast=!0,(t.nextFrame=t).prevFrame=t):(t.isLast=!1,t.prevFrame=this.frames[e-1],t.nextFrame=this.frames[i+1])):i===e-1&&1<e?(t.isLast=!0,t.prevFrame=this.frames[e-2],t.nextFrame=this.frames[0]):1<e&&(t.prevFrame=this.frames[i-1],t.nextFrame=this.frames[i+1]);return this},pause:function(){return this.paused=!0,this},resume:function(){return this.paused=!1,this},destroy:function(){this.removeAllListeners(),this.manager.off(a.PAUSE_ALL,this.pause,this),this.manager.off(a.RESUME_ALL,this.resume,this),this.manager.remove(this.key);for(var t=0;t<this.frames.length;t++)this.frames[t].destroy();this.frames=[],this.manager=null}});t.exports=h},function(t,e){t.exports="add"},function(t,e){t.exports="complete"},function(t,e){t.exports="repeat"},function(t,e){t.exports="restart"},function(t,e){t.exports="start"},function(t,e){t.exports="pauseall"},function(t,e){t.exports="remove"},function(t,e){t.exports="resumeall"},function(t,e){t.exports="animationcomplete"},function(t,e){t.exports="animationcomplete-"},function(t,e){t.exports="animationrepeat-"},function(t,e){t.exports="animationrestart-"},function(t,e){t.exports="animationstart-"},function(t,e){t.exports="animationupdate-"},function(t,e){t.exports="animationrepeat"},function(t,e){t.exports="animationrestart"},function(t,e){t.exports="animationstart"},function(t,e){t.exports="animationupdate"},function(t,e,n){var i=new(n(0))({initialize:function(t,e,n,i){this.textureKey=t,this.textureFrame=e,this.index=n,this.frame=i,this.isFirst=!1,this.isLast=!1,this.prevFrame=null,this.nextFrame=null,this.duration=0,this.progress=0},toJSON:function(){return{key:this.textureKey,frame:this.textureFrame,duration:this.duration}},destroy:function(){this.frame=void 0}});t.exports=i},function(t,e,n){var i=n(14),r={_blendMode:i.NORMAL,blendMode:{get:function(){return this._blendMode},set:function(t){"string"==typeof t&&(t=i[t]),-1<=(t|=0)&&(this._blendMode=t)}},setBlendMode:function(t){return this.blendMode=t,this}};t.exports=r},function(t,e){var n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,n,i){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,n,i,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},function(t,e,n){var u=n(24),i=n(38),r=n(1),s={prepareBoundsOutput:function(t,e){return void 0===e&&(e=!1),0!==this.rotation&&i(t,this.x,this.y,this.rotation),e&&this.parentContainer&&this.parentContainer.getBoundsTransformMatrix().transformPoint(t.x,t.y,t),t},getCenter:function(t){return void 0===t&&(t=new r),t.x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,t},getTopLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getTopRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY,this.prepareBoundsOutput(t,e)},getLeftCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getRightCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight/2,this.prepareBoundsOutput(t,e)},getBottomLeft:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomCenter:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth/2,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBottomRight:function(t,e){return(t=t||new r).x=this.x-this.displayWidth*this.originX+this.displayWidth,t.y=this.y-this.displayHeight*this.originY+this.displayHeight,this.prepareBoundsOutput(t,e)},getBounds:function(t){var e,n,i,r,s,a,o,h,l;return void 0===t&&(t=new u),h=(o=(this.parentContainer?(l=this.parentContainer.getBoundsTransformMatrix(),this.getTopLeft(t),l.transformPoint(t.x,t.y,t),e=t.x,n=t.y,this.getTopRight(t),l.transformPoint(t.x,t.y,t),i=t.x,r=t.y,this.getBottomLeft(t),l.transformPoint(t.x,t.y,t),s=t.x,a=t.y,this.getBottomRight(t),l.transformPoint(t.x,t.y,t)):(this.getTopLeft(t),e=t.x,n=t.y,this.getTopRight(t),i=t.x,r=t.y,this.getBottomLeft(t),s=t.x,a=t.y,this.getBottomRight(t)),t.x),t.y),t.x=Math.min(e,i,s,o),t.y=Math.min(n,r,a,h),t.width=Math.max(e,i,s,o)-t.x,t.height=Math.max(n,r,a,h)-t.y,t}};t.exports=s},function(t,e){t.exports=function(t,e,n){return!(t.width<=0||t.height<=0)&&(t.x<=e&&t.x+t.width>=e&&t.y<=n&&t.y+t.height>=n)}},function(t,e,n){var a=n(60),o=n(61);t.exports=function(t,e,n,i){void 0===i&&(i=[]),!e&&0<n&&(e=o(t)/n);for(var r=0;r<e;r++){var s=r/e;i.push(a(t,s))}return i}},function(t,e,n){var i=n(0),r=n(315),s=n(316),a=n(25),o=n(318),h=n(1),l=new i({initialize:function(t,e,n,i){void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.type=a.LINE,this.x1=t,this.y1=e,this.x2=n,this.y2=i},getPoint:function(t,e){return r(this,t,e)},getPoints:function(t,e,n){return s(this,t,e,n)},getRandomPoint:function(t){return o(this,t)},setTo:function(t,e,n,i){return void 0===t&&(t=0),void 0===e&&(e=0),void 0===n&&(n=0),void 0===i&&(i=0),this.x1=t,this.y1=e,this.x2=n,this.y2=i,this},getPointA:function(t){return void 0===t&&(t=new h),t.set(this.x1,this.y1),t},getPointB:function(t){return void 0===t&&(t=new h),t.set(this.x2,this.y2),t},left:{get:function(){return Math.min(this.x1,this.x2)},set:function(t){this.x1<=this.x2?this.x1=t:this.x2=t}},right:{get:function(){return Math.max(this.x1,this.x2)},set:function(t){this.x1>this.x2?this.x1=t:this.x2=t}},top:{get:function(){return Math.min(this.y1,this.y2)},set:function(t){this.y1<=this.y2?this.y1=t:this.y2=t}},bottom:{get:function(){return Math.max(this.y1,this.y2)},set:function(t){this.y1>this.y2?this.y1=t:this.y2=t}}});t.exports=l},function(t,e,n){var i=n(9);t.exports=function(t,e,n){return void 0===n&&(n=new i),n.x=t.x1+(t.x2-t.x1)*e,n.y=t.y1+(t.y2-t.y1)*e,n}},function(t,e,n){var f=n(317),d=n(9);t.exports=function(t,e,n,i){void 0===i&&(i=[]),!e&&0<n&&(e=f(t)/n);for(var r=t.x1,s=t.y1,a=t.x2,o=t.y2,h=0;h<e;h++){var l=h/e,u=r+(a-r)*l,c=s+(o-s)*l;i.push(new d(u,c))}return i}},function(t,e){t.exports=function(t){return Math.sqrt((t.x2-t.x1)*(t.x2-t.x1)+(t.y2-t.y1)*(t.y2-t.y1))}},function(t,e,n){var i=n(9);t.exports=function(t,e){void 0===e&&(e=new i);var n=Math.random();return e.x=t.x1+n*(t.x2-t.x1),e.y=t.y1+n*(t.y2-t.y1),e}},function(t,e,n){var i=n(9);t.exports=function(t,e){return void 0===e&&(e=new i),e.x=t.x+Math.random()*t.width,e.y=t.y+Math.random()*t.height,e}},function(t,e,n){var i=n(321),r=n(339),s={mask:null,setMask:function(t){return this.mask=t,this},clearMask:function(t){return void 0===t&&(t=!1),t&&this.mask&&this.mask.destroy(),this.mask=null,this},createBitmapMask:function(t){return void 0===t&&(this.texture||this.shader)&&(t=this),new i(this.scene,t)},createGeometryMask:function(t){return void 0===t&&"Graphics"===this.type&&(t=this),new r(this.scene,t)}};t.exports=s},function(t,e,n){var i=n(0),l=n(322),r=new i({initialize:function(t,e){var n,i,r,s,a,o,h=t.sys.game.renderer;this.renderer=h,this.bitmapMask=e,this.maskTexture=null,this.mainTexture=null,this.dirty=!0,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.invertAlpha=!1,this.isStencil=!1,h&&h.gl&&(n=h.width,i=h.height,r=0==(n&n-1)&&0==(i&i-1),s=h.gl,a=r?s.REPEAT:s.CLAMP_TO_EDGE,o=s.LINEAR,this.mainTexture=h.createTexture2D(0,o,o,a,a,s.RGBA,null,n,i),this.maskTexture=h.createTexture2D(0,o,o,a,a,s.RGBA,null,n,i),this.mainFramebuffer=h.createFramebuffer(n,i,this.mainTexture,!0),this.maskFramebuffer=h.createFramebuffer(n,i,this.maskTexture,!0),t.sys.game.events.on(l.CONTEXT_RESTORED,function(t){var e=t.width,n=t.height,i=0==(e&e-1)&&0==(n&n-1),r=t.gl,s=i?r.REPEAT:r.CLAMP_TO_EDGE,a=r.LINEAR;this.mainTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,n),this.maskTexture=t.createTexture2D(0,a,a,s,s,r.RGBA,null,e,n),this.mainFramebuffer=t.createFramebuffer(e,n,this.mainTexture,!0),this.maskFramebuffer=t.createFramebuffer(e,n,this.maskTexture,!0)},this))},setBitmap:function(t){this.bitmapMask=t},preRenderWebGL:function(t,e,n){t.pipelines.BitmapMaskPipeline.beginMask(this,e,n)},postRenderWebGL:function(t,e){t.pipelines.BitmapMaskPipeline.endMask(this,e)},preRenderCanvas:function(){},postRenderCanvas:function(){},destroy:function(){this.bitmapMask=null;var t=this.renderer;t&&t.gl&&(t.deleteTexture(this.mainTexture),t.deleteTexture(this.maskTexture),t.deleteFramebuffer(this.mainFramebuffer),t.deleteFramebuffer(this.maskFramebuffer)),this.mainTexture=null,this.maskTexture=null,this.mainFramebuffer=null,this.maskFramebuffer=null,this.prevFramebuffer=null,this.renderer=null}});t.exports=r},function(t,e,n){t.exports={BLUR:n(323),BOOT:n(324),CONTEXT_LOST:n(325),CONTEXT_RESTORED:n(326),DESTROY:n(327),FOCUS:n(328),HIDDEN:n(329),PAUSE:n(330),POST_RENDER:n(331),POST_STEP:n(332),PRE_RENDER:n(333),PRE_STEP:n(334),READY:n(335),RESUME:n(336),STEP:n(337),VISIBLE:n(338)}},function(t,e){t.exports="blur"},function(t,e){t.exports="boot"},function(t,e){t.exports="contextlost"},function(t,e){t.exports="contextrestored"},function(t,e){t.exports="destroy"},function(t,e){t.exports="focus"},function(t,e){t.exports="hidden"},function(t,e){t.exports="pause"},function(t,e){t.exports="postrender"},function(t,e){t.exports="poststep"},function(t,e){t.exports="prerender"},function(t,e){t.exports="prestep"},function(t,e){t.exports="ready"},function(t,e){t.exports="resume"},function(t,e){t.exports="step"},function(t,e){t.exports="visible"},function(t,e,n){var i=new(n(0))({initialize:function(t,e){this.geometryMask=e,this.invertAlpha=!1,this.isStencil=!0,this.level=0},setShape:function(t){return this.geometryMask=t,this},setInvertAlpha:function(t){return void 0===t&&(t=!0),this.invertAlpha=t,this},preRenderWebGL:function(t,e,n){var i=t.gl;t.flush(),0===t.maskStack.length&&(i.enable(i.STENCIL_TEST),i.clear(i.STENCIL_BUFFER_BIT),t.maskCount=0),t.currentCameraMask.mask!==this&&(t.currentMask.mask=this),t.maskStack.push({mask:this,camera:n}),this.applyStencil(t,n,!0),t.maskCount++},applyStencil:function(t,e,n){var i=t.gl,r=this.geometryMask,s=t.maskCount;i.colorMask(!1,!1,!1,!1),n?(i.stencilFunc(i.EQUAL,s,255),i.stencilOp(i.KEEP,i.KEEP,i.INCR)):(i.stencilFunc(i.EQUAL,s+1,255),i.stencilOp(i.KEEP,i.KEEP,i.DECR)),r.renderWebGL(t,r,0,e),t.flush(),i.colorMask(!0,!0,!0,!0),i.stencilOp(i.KEEP,i.KEEP,i.KEEP),n?this.invertAlpha?i.stencilFunc(i.NOTEQUAL,s+1,255):i.stencilFunc(i.EQUAL,s+1,255):this.invertAlpha?i.stencilFunc(i.NOTEQUAL,s,255):i.stencilFunc(i.EQUAL,s,255)},postRenderWebGL:function(t){var e,n=t.gl;t.maskStack.pop(),t.maskCount--,0===t.maskStack.length?(t.flush(),t.currentMask.mask=null,n.disable(n.STENCIL_TEST)):(t.flush(),(e=t.maskStack[t.maskStack.length-1]).mask.applyStencil(t,e.camera,!1),t.currentCameraMask.mask!==e.mask?(t.currentMask.mask=e.mask,t.currentMask.camera=e.camera):t.currentMask.mask=null)},preRenderCanvas:function(t,e,n){var i=this.geometryMask;t.currentContext.save(),i.renderCanvas(t,i,0,n,null,null,!0),t.currentContext.clip()},postRenderCanvas:function(t){t.currentContext.restore()},destroy:function(){this.geometryMask=null}});t.exports=i},function(t,e){var n={_originComponent:!0,originX:.5,originY:.5,_displayOriginX:0,_displayOriginY:0,displayOriginX:{get:function(){return this._displayOriginX},set:function(t){this._displayOriginX=t,this.originX=t/this.width}},displayOriginY:{get:function(){return this._displayOriginY},set:function(t){this._displayOriginY=t,this.originY=t/this.height}},setOrigin:function(t,e){return void 0===t&&(t=.5),void 0===e&&(e=t),this.originX=t,this.originY=e,this.updateDisplayOrigin()},setOriginFromFrame:function(){return this.frame&&this.frame.customPivot?(this.originX=this.frame.pivotX,this.originY=this.frame.pivotY,this.updateDisplayOrigin()):this.setOrigin()},setDisplayOrigin:function(t,e){return void 0===t&&(t=0),void 0===e&&(e=t),this.displayOriginX=t,this.displayOriginY=e,this},updateDisplayOrigin:function(){return this._displayOriginX=this.originX*this.width,this._displayOriginY=this.originY*this.height,this}};t.exports=n},function(t,e,n){var h=n(17),a=n(342),o=n(6),l=n(343),u=n(1),i={path:null,rotateToPath:!1,pathRotationOffset:0,pathOffset:null,pathVector:null,pathDelta:null,pathTween:null,pathConfig:null,_prevDirection:l.PLAYING_FORWARD,setPath:function(t,e){void 0===e&&(e=this.pathConfig);var n=this.pathTween;return n&&n.isPlaying()&&n.stop(),this.path=t,e&&this.startFollow(e),this},setRotateToPath:function(t,e){return void 0===e&&(e=0),this.rotateToPath=t,this.pathRotationOffset=e,this},isFollowing:function(){var t=this.pathTween;return t&&t.isPlaying()},startFollow:function(t,e){void 0===t&&(t={}),void 0===e&&(e=0);var n=this.pathTween;n&&n.isPlaying()&&n.stop(),"number"==typeof t&&(t={duration:t}),t.from=o(t,"from",0),t.to=o(t,"to",1);var i=a(t,"positionOnPath",!1);this.rotateToPath=a(t,"rotateToPath",!1),this.pathRotationOffset=o(t,"rotationOffset",0);var r,s=o(t,"startAt",e);return s&&(t.onStart=function(t){var e=t.data[0];e.progress=s,e.elapsed=e.duration*s;var n=e.ease(e.progress);e.current=e.start+(e.end-e.start)*n,e.target[e.key]=e.current}),this.pathOffset||(this.pathOffset=new u(this.x,this.y)),this.pathVector||(this.pathVector=new u),this.pathDelta||(this.pathDelta=new u),this.pathDelta.reset(),this.pathTween=this.scene.sys.tweens.addCounter(t),this.path.getStartPoint(this.pathOffset),i&&(this.x=this.pathOffset.x,this.y=this.pathOffset.y),this.pathOffset.x=this.x-this.pathOffset.x,this.pathOffset.y=this.y-this.pathOffset.y,this._prevDirection=l.PLAYING_FORWARD,this.rotateToPath&&(r=this.path.getPoint(.1),this.rotation=Math.atan2(r.y-this.y,r.x-this.x)+h(this.pathRotationOffset)),this.pathConfig=t,this},pauseFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.pause(),this},resumeFollow:function(){var t=this.pathTween;return t&&t.isPaused()&&t.resume(),this},stopFollow:function(){var t=this.pathTween;return t&&t.isPlaying()&&t.stop(),this},pathUpdate:function(){var t=this.pathTween;if(t){var e=t.data[0],n=this.pathDelta,i=this.pathVector;if(n.copy(i).negate(),e.state===l.COMPLETE)return this.path.getPoint(1,i),n.add(i),i.add(this.pathOffset),void this.setPosition(i.x,i.y);if(e.state!==l.PLAYING_FORWARD&&e.state!==l.PLAYING_BACKWARD)return;this.path.getPoint(t.getValue(),i),n.add(i),i.add(this.pathOffset);var r=this.x,s=this.y;this.setPosition(i.x,i.y);var a=this.x-r,o=this.y-s;if(0==a&&0==o)return;if(e.state!==this._prevDirection)return void(this._prevDirection=e.state);this.rotateToPath&&(this.rotation=Math.atan2(o,a)+h(this.pathRotationOffset))}}};t.exports=i},function(t,e){t.exports=function(t,e,n){return t&&t.hasOwnProperty(e)?t[e]:n}},function(t,e){t.exports={CREATED:0,INIT:1,DELAY:2,OFFSET_DELAY:3,PENDING_RENDER:4,PLAYING_FORWARD:5,PLAYING_BACKWARD:6,HOLD_DELAY:7,REPEAT_DELAY:8,COMPLETE:9,PENDING_ADD:20,PAUSED:21,LOOP_DELAY:22,ACTIVE:23,COMPLETE_DELAY:24,PENDING_REMOVE:25,REMOVED:26}},function(t,e){var n={defaultPipeline:null,pipeline:null,initPipeline:function(t){void 0===t&&(t="MultiPipeline");var e=this.scene.sys.game.renderer;return!!(e&&e.gl&&e.hasPipeline(t))&&(this.defaultPipeline=e.getPipeline(t),this.pipeline=this.defaultPipeline,!0)},setPipeline:function(t){var e=this.scene.sys.game.renderer;return e&&e.gl&&e.hasPipeline(t)&&(this.pipeline=e.getPipeline(t)),this},resetPipeline:function(){return this.pipeline=this.defaultPipeline,null!==this.pipeline},getPipelineName:function(){return this.pipeline.name}};t.exports=n},function(t,e){var n={_sizeComponent:!0,width:0,height:0,displayWidth:{get:function(){return Math.abs(this.scaleX*this.frame.realWidth)},set:function(t){this.scaleX=t/this.frame.realWidth}},displayHeight:{get:function(){return Math.abs(this.scaleY*this.frame.realHeight)},set:function(t){this.scaleY=t/this.frame.realHeight}},setSizeToFrame:function(t){return void 0===t&&(t=this.frame),this.width=t.realWidth,this.height=t.realHeight,this},setSize:function(t,e){return this.width=t,this.height=e,this},setDisplaySize:function(t,e){return this.displayWidth=t,this.displayHeight=e,this}};t.exports=n},function(t,e){var n={texture:null,frame:null,isCropped:!1,setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this}};t.exports=n},function(t,e){var n={texture:null,frame:null,isCropped:!1,setCrop:function(t,e,n,i){return void 0===t?this.isCropped=!1:this.frame&&("number"==typeof t?this.frame.setCropUVs(this._crop,t,e,n,i,this.flipX,this.flipY):this.frame.setCropUVs(this._crop,t.x,t.y,t.width,t.height,this.flipX,this.flipY),this.isCropped=!0),this},setTexture:function(t,e){return this.texture=this.scene.sys.textures.get(t),this.setFrame(e)},setFrame:function(t,e,n){return void 0===e&&(e=!0),void 0===n&&(n=!0),this.frame=this.texture.get(t),this.frame.cutWidth&&this.frame.cutHeight?this.renderFlags|=8:this.renderFlags&=-9,this._sizeComponent&&e&&this.setSizeToFrame(),this._originComponent&&n&&(this.frame.customPivot?this.setOrigin(this.frame.pivotX,this.frame.pivotY):this.updateDisplayOrigin()),this.isCropped&&this.frame.updateCropUVs(this._crop,this.flipX,this.flipY),this},resetCropObject:function(){return{u0:0,v0:0,u1:0,v1:0,width:0,height:0,x:0,y:0,flipX:!1,flipY:!1,cx:0,cy:0,cw:0,ch:0}}};t.exports=n},function(t,e,n){var r=n(349),i={_tintTL:16777215,_tintTR:16777215,_tintBL:16777215,_tintBR:16777215,_isTinted:!1,tintFill:!1,clearTint:function(){return this.setTint(16777215),this._isTinted=!1,this},setTint:function(t,e,n,i){return void 0===t&&(t=16777215),void 0===e&&(i=n=e=t),this._tintTL=r(t),this._tintTR=r(e),this._tintBL=r(n),this._tintBR=r(i),this._isTinted=!0,this.tintFill=!1,this},setTintFill:function(t,e,n,i){return this.setTint(t,e,n,i),this.tintFill=!0,this},tintTopLeft:{get:function(){return this._tintTL},set:function(t){this._tintTL=r(t),this._isTinted=!0}},tintTopRight:{get:function(){return this._tintTR},set:function(t){this._tintTR=r(t),this._isTinted=!0}},tintBottomLeft:{get:function(){return this._tintBL},set:function(t){this._tintBL=r(t),this._isTinted=!0}},tintBottomRight:{get:function(){return this._tintBR},set:function(t){this._tintBR=r(t),this._isTinted=!0}},tint:{set:function(t){this.setTint(t,t,t,t)}},isTinted:{get:function(){return this._isTinted}}};t.exports=i},function(t,e){t.exports=function(t){return(t>>16)+(65280&t)+((255&t)<<16)}},function(t,e,n){var i=n(3),r=n(3);r=n(351),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e){t.exports=function(t,e,n,i,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c<s.length;c++){var f,d,p,m=s[c];m.willRender(i)&&(f=m.alpha,d=m.scrollFactorX,p=m.scrollFactorY,o||m.blendMode===t.currentBlendMode||t.setBlendMode(m.blendMode),m.setScrollFactor(d*l,p*u),m.setAlpha(f*h),m.renderCanvas(t,m,n,i,a),m.setAlpha(f),m.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}},function(t,e,n){var o=n(24);t.exports=function(t,e,n){void 0===n&&(n=new o);var i=Math.min(t.x,e.x),r=Math.min(t.y,e.y),s=Math.max(t.right,e.right)-i,a=Math.max(t.bottom,e.bottom)-r;return n.setTo(i,r,s,a)}},function(t,e,n){var i=n(3),r=n(3);r=n(354),t.exports={renderWebGL:i,renderCanvas:r}},function(t,e){t.exports=function(t,e,n,i,r){var s=e.list;if(0!==s.length){var a=e.localTransform;r?(a.loadIdentity(),a.multiply(r),a.translate(e.x,e.y),a.rotate(e.rotation),a.scale(e.scaleX,e.scaleY)):a.applyITRS(e.x,e.y,e.rotation,e.scaleX,e.scaleY);var o=-1!==e.blendMode;o||t.setBlendMode(0);var h=e._alpha,l=e.scrollFactorX,u=e.scrollFactorY;e.mask&&e.mask.preRenderCanvas(t,null,i);for(var c=0;c<s.length;c++){var f,d,p,m=s[c];m.willRender(i)&&(f=m.alpha,d=m.scrollFactorX,p=m.scrollFactorY,o||m.blendMode===t.currentBlendMode||t.setBlendMode(m.blendMode),m.setScrollFactor(d*l,p*u),m.setAlpha(f*h),m.renderCanvas(t,m,n,i,a),m.setAlpha(f),m.setScrollFactor(d,p))}e.mask&&e.mask.postRenderCanvas(t)}}}]);