text: "use strict";var __extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var i in e)if(e.hasOwnProperty(i))t[i]=e[i]};return function(e,i){t(e,i);function a(){this.constructor=e}e.prototype=i===null?Object.create(i):(a.prototype=i.prototype,new a)}}();var dragonBones;(function(t){var e=function(){function e(e){this._clock=new t.WorldClock;this._events=[];this._objects=[];this._eventManager=null;this._eventManager=e}e.prototype.advanceTime=function(e){if(this._objects.length>0){for(var i=0,a=this._objects;i<a.length;i++){var r=a[i];r.returnToPool()}this._objects.length=0}this._clock.advanceTime(e);if(this._events.length>0){for(var n=0;n<this._events.length;++n){var s=this._events[n];var o=s.armature;o.eventDispatcher._dispatchEvent(s.type,s);if(s.type===t.EventObject.SOUND_EVENT){this._eventManager._dispatchEvent(s.type,s)}this.bufferObject(s)}this._events.length=0}};e.prototype.bufferEvent=function(t){if(this._events.indexOf(t)<0){this._events.push(t)}};e.prototype.bufferObject=function(t){if(this._objects.indexOf(t)<0){this._objects.push(t)}};Object.defineProperty(e.prototype,"clock",{get:function(){return this._clock},enumerable:true,configurable:true});Object.defineProperty(e.prototype,"eventManager",{get:function(){return this._eventManager},enumerable:true,configurable:true});e.yDown=true;e.debug=false;e.debugDraw=false;e.webAssembly=false;e.VERSION="5.1.0";return e}();t.DragonBones=e;if(!console.warn){console.warn=function(){}}if(!console.assert){console.assert=function(){}}})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(){this.hashCode=t._hashCode++;this._isInPool=false}t._returnObject=function(e){var i=String(e.constructor);var a=i in t._maxCountMap?t._defaultMaxCount:t._maxCountMap[i];var r=t._poolsMap[i]=t._poolsMap[i]||[];if(r.length<a){if(!e._isInPool){e._isInPool=true;r.push(e)}else{console.assert(false,"The object is already in the pool.")}}else{}};t.toString=function(){throw new Error};t.setMaxCount=function(e,i){if(i<0||i!==i){i=0}if(e!==null){var a=String(e);var r=a in t._poolsMap?t._poolsMap[a]:null;if(r!==null&&r.length>i){r.length=i}t._maxCountMap[a]=i}else{t._defaultMaxCount=i;for(var a in t._poolsMap){if(a in t._maxCountMap){continue}var r=t._poolsMap[a];if(r.length>i){r.length=i}t._maxCountMap[a]=i}}};t.clearPool=function(e){if(e===void 0){e=null}if(e!==null){var i=String(e);var a=i in t._poolsMap?t._poolsMap[i]:null;if(a!==null&&a.length>0){a.length=0}}else{for(var r in t._poolsMap){var a=t._poolsMap[r];a.length=0}}};t.borrowObject=function(e){var i=String(e);var a=i in t._poolsMap?t._poolsMap[i]:null;if(a!==null&&a.length>0){var r=a.pop();r._isInPool=false;return r}var n=new e;n._onClear();return n};t.prototype.returnToPool=function(){this._onClear();t._returnObject(this)};t._hashCode=0;t._defaultMaxCount=1e3;t._maxCountMap={};t._poolsMap={};return t}();t.BaseObject=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a,r,n){if(t===void 0){t=1}if(e===void 0){e=0}if(i===void 0){i=0}if(a===void 0){a=1}if(r===void 0){r=0}if(n===void 0){n=0}this.a=t;this.b=e;this.c=i;this.d=a;this.tx=r;this.ty=n}t.prototype.toString=function(){return"[object dragonBones.Matrix] a:"+this.a+" b:"+this.b+" c:"+this.c+" d:"+this.d+" tx:"+this.tx+" ty:"+this.ty};t.prototype.copyFrom=function(t){this.a=t.a;this.b=t.b;this.c=t.c;this.d=t.d;this.tx=t.tx;this.ty=t.ty;return this};t.prototype.copyFromArray=function(t,e){if(e===void 0){e=0}this.a=t[e];this.b=t[e+1];this.c=t[e+2];this.d=t[e+3];this.tx=t[e+4];this.ty=t[e+5];return this};t.prototype.identity=function(){this.a=this.d=1;this.b=this.c=0;this.tx=this.ty=0;return this};t.prototype.concat=function(t){var e=this.a*t.a;var i=0;var a=0;var r=this.d*t.d;var n=this.tx*t.a+t.tx;var s=this.ty*t.d+t.ty;if(this.b!==0||this.c!==0){e+=this.b*t.c;i+=this.b*t.d;a+=this.c*t.a;r+=this.c*t.b}if(t.b!==0||t.c!==0){i+=this.a*t.b;a+=this.d*t.c;n+=this.ty*t.c;s+=this.tx*t.b}this.a=e;this.b=i;this.c=a;this.d=r;this.tx=n;this.ty=s;return this};t.prototype.invert=function(){var t=this.a;var e=this.b;var i=this.c;var a=this.d;var r=this.tx;var n=this.ty;if(e===0&&i===0){this.b=this.c=0;if(t===0||a===0){this.a=this.b=this.tx=this.ty=0}else{t=this.a=1/t;a=this.d=1/a;this.tx=-t*r;this.ty=-a*n}return this}var s=t*a-e*i;if(s===0){this.a=this.d=1;this.b=this.c=0;this.tx=this.ty=0;return this}s=1/s;var o=this.a=a*s;e=this.b=-e*s;i=this.c=-i*s;a=this.d=t*s;this.tx=-(o*r+i*n);this.ty=-(e*r+a*n);return this};t.prototype.transformPoint=function(t,e,i,a){if(a===void 0){a=false}i.x=this.a*t+this.c*e;i.y=this.b*t+this.d*e;if(!a){i.x+=this.tx;i.y+=this.ty}};return t}();t.Matrix=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a,r,n){if(t===void 0){t=0}if(e===void 0){e=0}if(i===void 0){i=0}if(a===void 0){a=0}if(r===void 0){r=1}if(n===void 0){n=1}this.x=t;this.y=e;this.skew=i;this.rotation=a;this.scaleX=r;this.scaleY=n}t.normalizeRadian=function(t){t=(t+Math.PI)%(Math.PI*2);t+=t>0?-Math.PI:Math.PI;return t};t.prototype.toString=function(){return"[object dragonBones.Transform] x:"+this.x+" y:"+this.y+" skewX:"+this.skew*180/Math.PI+" skewY:"+this.rotation*180/Math.PI+" scaleX:"+this.scaleX+" scaleY:"+this.scaleY};t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y;this.skew=t.skew;this.rotation=t.rotation;this.scaleX=t.scaleX;this.scaleY=t.scaleY;return this};t.prototype.identity=function(){this.x=this.y=0;this.skew=this.rotation=0;this.scaleX=this.scaleY=1;return this};t.prototype.add=function(t){this.x+=t.x;this.y+=t.y;this.skew+=t.skew;this.rotation+=t.rotation;this.scaleX*=t.scaleX;this.scaleY*=t.scaleY;return this};t.prototype.minus=function(t){this.x-=t.x;this.y-=t.y;this.skew-=t.skew;this.rotation-=t.rotation;this.scaleX/=t.scaleX;this.scaleY/=t.scaleY;return this};t.prototype.fromMatrix=function(e){var i=this.scaleX,a=this.scaleY;var r=t.PI_Q;this.x=e.tx;this.y=e.ty;this.rotation=Math.atan(e.b/e.a);var n=Math.atan(-e.c/e.d);this.scaleX=this.rotation>-r&&this.rotation<r?e.a/Math.cos(this.rotation):e.b/Math.sin(this.rotation);this.scaleY=n>-r&&n<r?e.d/Math.cos(n):-e.c/Math.sin(n);if(i>=0&&this.scaleX<0){this.scaleX=-this.scaleX;this.rotation=this.rotation-Math.PI}if(a>=0&&this.scaleY<0){this.scaleY=-this.scaleY;n=n-Math.PI}this.skew=n-this.rotation;return this};t.prototype.toMatrix=function(t){if(this.skew!==0||this.rotation!==0){t.a=Math.cos(this.rotation);t.b=Math.sin(this.rotation);if(this.skew===0){t.c=-t.b;t.d=t.a}else{t.c=-Math.sin(this.skew+this.rotation);t.d=Math.cos(this.skew+this.rotation)}if(this.scaleX!==1){t.a*=this.scaleX;t.b*=this.scaleX}if(this.scaleY!==1){t.c*=this.scaleY;t.d*=this.scaleY}}else{t.a=this.scaleX;t.b=0;t.c=0;t.d=this.scaleY}t.tx=this.x;t.ty=this.y;return this};t.PI_D=Math.PI*2;t.PI_H=Math.PI/2;t.PI_Q=Math.PI/4;t.RAD_DEG=180/Math.PI;t.DEG_RAD=Math.PI/180;return t}();t.Transform=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a,r,n,s,o){if(t===void 0){t=1}if(e===void 0){e=1}if(i===void 0){i=1}if(a===void 0){a=1}if(r===void 0){r=0}if(n===void 0){n=0}if(s===void 0){s=0}if(o===void 0){o=0}this.alphaMultiplier=t;this.redMultiplier=e;this.greenMultiplier=i;this.blueMultiplier=a;this.alphaOffset=r;this.redOffset=n;this.greenOffset=s;this.blueOffset=o}t.prototype.copyFrom=function(t){this.alphaMultiplier=t.alphaMultiplier;this.redMultiplier=t.redMultiplier;this.greenMultiplier=t.greenMultiplier;this.blueMultiplier=t.blueMultiplier;this.alphaOffset=t.alphaOffset;this.redOffset=t.redOffset;this.greenOffset=t.greenOffset;this.blueOffset=t.blueOffset};t.prototype.identity=function(){this.alphaMultiplier=this.redMultiplier=this.greenMultiplier=this.blueMultiplier=1;this.alphaOffset=this.redOffset=this.greenOffset=this.blueOffset=0};return t}();t.ColorTransform=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e){if(t===void 0){t=0}if(e===void 0){e=0}this.x=t;this.y=e}t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y};t.prototype.clear=function(){this.x=this.y=0};return t}();t.Point=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,a){if(t===void 0){t=0}if(e===void 0){e=0}if(i===void 0){i=0}if(a===void 0){a=0}this.x=t;this.y=e;this.width=i;this.height=a}t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y;this.width=t.width;this.height=t.height};t.prototype.clear=function(){this.x=this.y=0;this.width=this.height=0};return t}();t.Rectangle=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.ints=[];e.floats=[];e.strings=[];return e}e.toString=function(){return"[class dragonBones.UserData]"};e.prototype._onClear=function(){this.ints.length=0;this.floats.length=0;this.strings.length=0};e.prototype.getInt=function(t){if(t===void 0){t=0}return t>=0&&t<this.ints.length?this.ints[t]:0};e.prototype.getFloat=function(t){if(t===void 0){t=0}return t>=0&&t<this.floats.length?this.floats[t]:0};e.prototype.getString=function(t){if(t===void 0){t=0}return t>=0&&t<this.strings.length?this.strings[t]:""};return e}(t.BaseObject);t.UserData=e;var i=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.data=null;return e}e.toString=function(){return"[class dragonBones.ActionData]"};e.prototype._onClear=function(){if(this.data!==null){this.data.returnToPool()}this.type=0;this.name="";this.bone=null;this.slot=null;this.data=null};return e}(t.BaseObject);t.ActionData=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.frameIndices=[];e.cachedFrames=[];e.armatureNames=[];e.armatures={};e.userData=null;return e}e.toString=function(){return"[class dragonBones.DragonBonesData]"};e.prototype._onClear=function(){for(var t in this.armatures){this.armatures[t].returnToPool();delete this.armatures[t]}if(this.userData!==null){this.userData.returnToPool()}this.autoSearch=false;this.frameRate=0;this.version="";this.name="";this.frameIndices.length=0;this.cachedFrames.length=0;this.armatureNames.length=0;this.intArray=null;this.floatArray=null;this.frameIntArray=null;this.frameFloatArray=null;this.frameArray=null;this.timelineArray=null;this.userData=null};e.prototype.addArmature=function(t){if(t.name in this.armatures){console.warn("Replace armature: "+t.name);this.armatures[t.name].returnToPool()}t.parent=this;this.armatures[t.name]=t;this.armatureNames.push(t.name)};e.prototype.getArmature=function(t){return t in this.armatures?this.armatures[t]:null};e.prototype.dispose=function(){console.warn("已废弃，请参考 @see");this.returnToPool()};return e}(t.BaseObject);t.DragonBonesData=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.CanvasData]"};e.prototype._onClear=function(){this.hasBackground=false;this.color=0;this.x=0;this.y=0;this.width=0;this.height=0};return e}(t.BaseObject);t.CanvasData=e;var i=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.aabb=new t.Rectangle;i.animationNames=[];i.sortedBones=[];i.sortedSlots=[];i.defaultActions=[];i.actions=[];i.bones={};i.slots={};i.skins={};i.animations={};i.canvas=null;i.userData=null;return i}i.toString=function(){return"[class dragonBones.ArmatureData]"};i.prototype._onClear=function(){for(var t=0,e=this.defaultActions;t<e.length;t++){var i=e[t];i.returnToPool()}for(var a=0,r=this.actions;a<r.length;a++){var i=r[a];i.returnToPool()}for(var n in this.bones){this.bones[n].returnToPool();delete this.bones[n]}for(var n in this.slots){this.slots[n].returnToPool();delete this.slots[n]}for(var n in this.skins){this.skins[n].returnToPool();delete this.skins[n]}for(var n in this.animations){this.animations[n].returnToPool();delete this.animations[n]}if(this.canvas!==null){this.canvas.returnToPool()}if(this.userData!==null){this.userData.returnToPool()}this.type=0;this.frameRate=0;this.cacheFrameRate=0;this.scale=1;this.name="";this.aabb.clear();this.animationNames.length=0;this.sortedBones.length=0;this.sortedSlots.length=0;this.defaultActions.length=0;this.actions.length=0;this.defaultSkin=null;this.defaultAnimation=null;this.canvas=null;this.userData=null;this.parent=null};i.prototype.sortBones=function(){var t=this.sortedBones.length;if(t<=0){return}var e=this.sortedBones.concat();var i=0;var a=0;this.sortedBones.length=0;while(a<t){var r=e[i++];if(i>=t){i=0}if(this.sortedBones.indexOf(r)>=0){continue}if(r.constraints.length>0){var n=false;for(var s=0,o=r.constraints;s<o.length;s++){var l=o[s];if(this.sortedBones.indexOf(l.target)<0){n=true}}if(n){continue}}if(r.parent!==null&&this.sortedBones.indexOf(r.parent)<0){continue}this.sortedBones.push(r);a++}};i.prototype.cacheFrames=function(t){if(this.cacheFrameRate>0){return}this.cacheFrameRate=t;for(var e in this.animations){this.animations[e].cacheFrames(this.cacheFrameRate)}};i.prototype.setCacheFrame=function(t,e){var i=this.parent.cachedFrames;var a=i.length;i.length+=10;i[a]=t.a;i[a+1]=t.b;i[a+2]=t.c;i[a+3]=t.d;i[a+4]=t.tx;i[a+5]=t.ty;i[a+6]=e.rotation;i[a+7]=e.skew;i[a+8]=e.scaleX;i[a+9]=e.scaleY;return a};i.prototype.getCacheFrame=function(t,e,i){var a=this.parent.cachedFrames;t.a=a[i];t.b=a[i+1];t.c=a[i+2];t.d=a[i+3];t.tx=a[i+4];t.ty=a[i+5];e.rotation=a[i+6];e.skew=a[i+7];e.scaleX=a[i+8];e.scaleY=a[i+9];e.x=t.tx;e.y=t.ty};i.prototype.addBone=function(t){if(t.name in this.bones){console.warn("Replace bone: "+t.name);this.bones[t.name].returnToPool()}this.bones[t.name]=t;this.sortedBones.push(t)};i.prototype.addSlot=function(t){if(t.name in this.slots){console.warn("Replace slot: "+t.name);this.slots[t.name].returnToPool()}this.slots[t.name]=t;this.sortedSlots.push(t)};i.prototype.addSkin=function(t){if(t.name in this.skins){console.warn("Replace skin: "+t.name);this.skins[t.name].returnToPool()}this.skins[t.name]=t;if(this.defaultSkin===null){this.defaultSkin=t}};i.prototype.addAnimation=function(t){if(t.name in this.animations){console.warn("Replace animation: "+t.name);this.animations[t.name].returnToPool()}t.parent=this;this.animations[t.name]=t;this.animationNames.push(t.name);if(this.defaultAnimation===null){this.defaultAnimation=t}};i.prototype.getBone=function(t){return t in this.bones?this.bones[t]:null};i.prototype.getSlot=function(t){return t in this.slots?this.slots[t]:null};i.prototype.getSkin=function(t){return t in this.skins?this.skins[t]:null};i.prototype.getAnimation=function(t){return t in this.animations?this.animations[t]:null};return i}(t.BaseObject);t.ArmatureData=i;var a=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.transform=new t.Transform;i.constraints=[];i.userData=null;return i}i.toString=function(){return"[class dragonBones.BoneData]"};i.prototype._onClear=function(){for(var t=0,e=this.constraints;t<e.length;t++){var i=e[t];i.returnToPool()}if(this.userData!==null){this.userData.returnToPool()}this.inheritTranslation=false;this.inheritRotation=false;this.inheritScale=false;this.inheritReflection=false;this.length=0;this.name="";this.transform.identity();this.constraints.length=0;this.userData=null;this.parent=null};return i}(t.BaseObject);t.BoneData=a;var r=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t.color=null;t.userData=null;return t}i.createColor=function(){return new t.ColorTransform};i.toString=function(){return"[class dragonBones.SlotData]"};i.prototype._onClear=function(){if(this.userData!==null){this.userData.returnToPool()}this.blendMode=0;this.displayIndex=0;this.zOrder=0;this.name="";this.color=null;this.userData=null;this.parent=null};i.DEFAULT_COLOR=new t.ColorTransform;return i}(t.BaseObject);t.SlotData=r;var n=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.displays={};return e}e.toString=function(){return"[class dragonBones.SkinData]"};e.prototype._onClear=function(){for(var t in this.displays){var e=this.displays[t];for(var i=0,a=e;i<a.length;i++){var r=a[i];if(r!==null){r.returnToPool()}}delete this.displays[t]}this.name=""};e.prototype.addDisplay=function(t,e){if(!(t in this.displays)){this.displays[t]=[]}var i=this.displays[t];i.push(e)};e.prototype.getDisplay=function(t,e){var i=this.getDisplays(t);if(i!==null){for(var a=0,r=i;a<r.length;a++){var n=r[a];if(n!==null&&n.name===e){return n}}}return null};e.prototype.getDisplays=function(t){if(!(t in this.displays)){return null}return this.displays[t]};return e}(t.BaseObject);t.SkinData=n})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){this.order=0;this.target=null;this.bone=null;this.root=null};return e}(t.BaseObject);t.ConstraintData=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.IKConstraintData]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.bendPositive=false;this.scaleEnabled=false;this.weight=1};return e}(e);t.IKConstraintData=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.transform=new t.Transform;return i}i.prototype._onClear=function(){this.name="";this.path="";this.transform.identity();this.parent=null};return i}(t.BaseObject);t.DisplayData=e;var i=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.pivot=new t.Point;return i}i.toString=function(){return"[class dragonBones.ImageDisplayData]"};i.prototype._onClear=function(){e.prototype._onClear.call(this);this.type=0;this.pivot.clear();this.texture=null};return i}(e);t.ImageDisplayData=i;var a=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.actions=[];return e}e.toString=function(){return"[class dragonBones.ArmatureDisplayData]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);for(var e=0,i=this.actions;e<i.length;e++){var a=i[e];a.returnToPool()}this.type=1;this.inheritAnimation=false;this.actions.length=0;this.armature=null};return e}(e);t.ArmatureDisplayData=a;var r=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.weight=null;return e}e.toString=function(){return"[class dragonBones.MeshDisplayData]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);if(this.weight!==null){this.weight.returnToPool()}this.type=2;this.inheritAnimation=false;this.offset=0;this.weight=null};return e}(i);t.MeshDisplayData=r;var n=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.boundingBox=null;return e}e.toString=function(){return"[class dragonBones.BoundingBoxDisplayData]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);if(this.boundingBox!==null){this.boundingBox.returnToPool()}this.type=3;this.boundingBox=null};return e}(e);t.BoundingBoxDisplayData=n;var s=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.bones=[];return e}e.toString=function(){return"[class dragonBones.WeightData]"};e.prototype._onClear=function(){this.count=0;this.offset=0;this.bones.length=0};return e}(t.BaseObject);t.WeightData=s})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){this.color=0;this.width=0;this.height=0};return e}(t.BaseObject);t.BoundingBoxData=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.RectangleBoundingBoxData]"};e._computeOutCode=function(t,e,i,a,r,n){var s=0;if(t<i){s|=1}else if(t>r){s|=2}if(e<a){s|=4}else if(e>n){s|=8}return s};e.rectangleIntersectsSegment=function(t,i,a,r,n,s,o,l,h,u,f){if(h===void 0){h=null}if(u===void 0){u=null}if(f===void 0){f=null}var _=t>n&&t<o&&i>s&&i<l;var m=a>n&&a<o&&r>s&&r<l;if(_&&m){return-1}var p=0;var c=e._computeOutCode(t,i,n,s,o,l);var d=e._computeOutCode(a,r,n,s,o,l);while(true){if((c|d)===0){p=2;break}else if((c&d)!==0){break}var y=0;var g=0;var v=0;var b=c!==0?c:d;if((b&4)!==0){y=t+(a-t)*(s-i)/(r-i);g=s;if(f!==null){v=-Math.PI*.5}}else if((b&8)!==0){y=t+(a-t)*(l-i)/(r-i);g=l;if(f!==null){v=Math.PI*.5}}else if((b&2)!==0){g=i+(r-i)*(o-t)/(a-t);y=o;if(f!==null){v=0}}else if((b&1)!==0){g=i+(r-i)*(n-t)/(a-t);y=n;if(f!==null){v=Math.PI}}if(b===c){t=y;i=g;c=e._computeOutCode(t,i,n,s,o,l);if(f!==null){f.x=v}}else{a=y;r=g;d=e._computeOutCode(a,r,n,s,o,l);if(f!==null){f.y=v}}}if(p){if(_){p=2;if(h!==null){h.x=a;h.y=r}if(u!==null){u.x=a;u.y=a}if(f!==null){f.x=f.y+Math.PI}}else if(m){p=1;if(h!==null){h.x=t;h.y=i}if(u!==null){u.x=t;u.y=i}if(f!==null){f.y=f.x+Math.PI}}else{p=3;if(h!==null){h.x=t;h.y=i}if(u!==null){u.x=a;u.y=r}}}return p};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.type=0};e.prototype.containsPoint=function(t,e){var i=this.width*.5;if(t>=-i&&t<=i){var a=this.height*.5;if(e>=-a&&e<=a){return true}}return false};e.prototype.intersectsSegment=function(t,i,a,r,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}var l=this.width*.5;var h=this.height*.5;var u=e.rectangleIntersectsSegment(t,i,a,r,-l,-h,l,h,n,s,o);return u};return e}(e);t.RectangleBoundingBoxData=i;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.EllipseData]"};e.ellipseIntersectsSegment=function(t,e,i,a,r,n,s,o,l,h,u){if(l===void 0){l=null}if(h===void 0){h=null}if(u===void 0){u=null}var f=s/o;var _=f*f;e*=f;a*=f;var m=i-t;var p=a-e;var c=Math.sqrt(m*m+p*p);var d=m/c;var y=p/c;var g=(r-t)*d+(n-e)*y;var v=g*g;var b=t*t+e*e;var D=s*s;var T=D-b+v;var A=0;if(T>=0){var O=Math.sqrt(T);var S=g-O;var x=g+O;var B=S<0?-1:S<=c?0:1;var E=x<0?-1:x<=c?0:1;var M=B*E;if(M<0){return-1}else if(M===0){if(B===-1){A=2;i=t+x*d;a=(e+x*y)/f;if(l!==null){l.x=i;l.y=a}if(h!==null){h.x=i;h.y=a}if(u!==null){u.x=Math.atan2(a/D*_,i/D);u.y=u.x+Math.PI}}else if(E===1){A=1;t=t+S*d;e=(e+S*y)/f;if(l!==null){l.x=t;l.y=e}if(h!==null){h.x=t;h.y=e}if(u!==null){u.x=Math.atan2(e/D*_,t/D);u.y=u.x+Math.PI}}else{A=3;if(l!==null){l.x=t+S*d;l.y=(e+S*y)/f;if(u!==null){u.x=Math.atan2(l.y/D*_,l.x/D)}}if(h!==null){h.x=t+x*d;h.y=(e+x*y)/f;if(u!==null){u.y=Math.atan2(h.y/D*_,h.x/D)}}}}}return A};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.type=1};e.prototype.containsPoint=function(t,e){var i=this.width*.5;if(t>=-i&&t<=i){var a=this.height*.5;if(e>=-a&&e<=a){e*=i/a;return Math.sqrt(t*t+e*e)<=i}}return false};e.prototype.intersectsSegment=function(t,i,a,r,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}var l=e.ellipseIntersectsSegment(t,i,a,r,0,0,this.width*.5,this.height*.5,n,s,o);return l};return e}(e);t.EllipseBoundingBoxData=a;var r=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.weight=null;return e}e.toString=function(){return"[class dragonBones.PolygonBoundingBoxData]"};e.polygonIntersectsSegment=function(t,e,i,a,r,n,s,o,l,h){if(o===void 0){o=null}if(l===void 0){l=null}if(h===void 0){h=null}if(t===i){t=i+1e-6}if(e===a){e=a+1e-6}var u=t-i;var f=e-a;var _=t*a-e*i;var m=0;var p=r[n+s-2];var c=r[n+s-1];var d=0;var y=0;var g=0;var v=0;var b=0;var D=0;for(var T=0;T<s;T+=2){var A=r[n+T];var O=r[n+T+1];if(p===A){p=A+1e-4}if(c===O){c=O+1e-4}var S=p-A;var x=c-O;var B=p*O-c*A;var E=u*x-f*S;var M=(_*S-u*B)/E;if((M>=p&&M<=A||M>=A&&M<=p)&&(u===0||M>=t&&M<=i||M>=i&&M<=t)){var w=(_*x-f*B)/E;if((w>=c&&w<=O||w>=O&&w<=c)&&(f===0||w>=e&&w<=a||w>=a&&w<=e)){if(l!==null){var P=M-t;if(P<0){P=-P}if(m===0){d=P;y=P;g=M;v=w;b=M;D=w;if(h!==null){h.x=Math.atan2(O-c,A-p)-Math.PI*.5;h.y=h.x}}else{if(P<d){d=P;g=M;v=w;if(h!==null){h.x=Math.atan2(O-c,A-p)-Math.PI*.5}}if(P>y){y=P;b=M;D=w;if(h!==null){h.y=Math.atan2(O-c,A-p)-Math.PI*.5}}}m++}else{g=M;v=w;b=M;D=w;m++;if(h!==null){h.x=Math.atan2(O-c,A-p)-Math.PI*.5;h.y=h.x}break}}}p=A;c=O}if(m===1){if(o!==null){o.x=g;o.y=v}if(l!==null){l.x=g;l.y=v}if(h!==null){h.y=h.x+Math.PI}}else if(m>1){m++;if(o!==null){o.x=g;o.y=v}if(l!==null){l.x=b;l.y=D}}return m};e.prototype._onClear=function(){t.prototype._onClear.call(this);if(this.weight!==null){this.weight.returnToPool()}this.type=2;this.count=0;this.offset=0;this.x=0;this.y=0;this.vertices=null;this.weight=null};e.prototype.containsPoint=function(t,e){var i=false;if(t>=this.x&&t<=this.width&&e>=this.y&&e<=this.height){for(var a=0,r=this.count,n=r-2;a<r;a+=2){var s=this.vertices[this.offset+n+1];var o=this.vertices[this.offset+a+1];if(o<e&&s>=e||s<e&&o>=e){var l=this.vertices[this.offset+n];var h=this.vertices[this.offset+a];if((e-o)*(l-h)/(s-o)+h<t){i=!i}}n=a}}return i};e.prototype.intersectsSegment=function(t,a,r,n,s,o,l){if(s===void 0){s=null}if(o===void 0){o=null}if(l===void 0){l=null}var h=0;if(i.rectangleIntersectsSegment(t,a,r,n,this.x,this.y,this.width,this.height,null,null,null)!==0){h=e.polygonIntersectsSegment(t,a,r,n,this.vertices,this.offset,this.count,s,o,l)}return h};return e}(e);t.PolygonBoundingBoxData=r})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.cachedFrames=[];e.boneTimelines={};e.slotTimelines={};e.boneCachedFrameIndices={};e.slotCachedFrameIndices={};e.actionTimeline=null;e.zOrderTimeline=null;return e}e.toString=function(){return"[class dragonBones.AnimationData]"};e.prototype._onClear=function(){for(var t in this.boneTimelines){for(var e in this.boneTimelines[t]){this.boneTimelines[t][e].returnToPool()}delete this.boneTimelines[t]}for(var t in this.slotTimelines){for(var e in this.slotTimelines[t]){this.slotTimelines[t][e].returnToPool()}delete this.slotTimelines[t]}for(var t in this.boneCachedFrameIndices){delete this.boneCachedFrameIndices[t]}for(var t in this.slotCachedFrameIndices){delete this.slotCachedFrameIndices[t]}if(this.actionTimeline!==null){this.actionTimeline.returnToPool()}if(this.zOrderTimeline!==null){this.zOrderTimeline.returnToPool()}this.frameIntOffset=0;this.frameFloatOffset=0;this.frameOffset=0;this.frameCount=0;this.playTimes=0;this.duration=0;this.scale=1;this.fadeInTime=0;this.cacheFrameRate=0;this.name="";this.cachedFrames.length=0;this.actionTimeline=null;this.zOrderTimeline=null;this.parent=null};e.prototype.cacheFrames=function(t){if(this.cacheFrameRate>0){return}this.cacheFrameRate=Math.max(Math.ceil(t*this.scale),1);var e=Math.ceil(this.cacheFrameRate*this.duration)+1;this.cachedFrames.length=e;for(var i=0,a=this.cacheFrames.length;i<a;++i){this.cachedFrames[i]=false}for(var r=0,n=this.parent.sortedBones;r<n.length;r++){var s=n[r];var o=new Array(e);for(var i=0,a=o.length;i<a;++i){o[i]=-1}this.boneCachedFrameIndices[s.name]=o}for(var l=0,h=this.parent.sortedSlots;l<h.length;l++){var u=h[l];var o=new Array(e);for(var i=0,a=o.length;i<a;++i){o[i]=-1}this.slotCachedFrameIndices[u.name]=o}};e.prototype.addBoneTimeline=function(t,e){var i=t.name in this.boneTimelines?this.boneTimelines[t.name]:this.boneTimelines[t.name]=[];if(i.indexOf(e)<0){i.push(e)}};e.prototype.addSlotTimeline=function(t,e){var i=t.name in this.slotTimelines?this.slotTimelines[t.name]:this.slotTimelines[t.name]=[];if(i.indexOf(e)<0){i.push(e)}};e.prototype.getBoneTimelines=function(t){return t in this.boneTimelines?this.boneTimelines[t]:null};e.prototype.getSlotTimeline=function(t){return t in this.slotTimelines?this.slotTimelines[t]:null};e.prototype.getBoneCachedFrameIndices=function(t){return t in this.boneCachedFrameIndices?this.boneCachedFrameIndices[t]:null};e.prototype.getSlotCachedFrameIndices=function(t){return t in this.slotCachedFrameIndices?this.slotCachedFrameIndices[t]:null};return e}(t.BaseObject);t.AnimationData=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.TimelineData]"};e.prototype._onClear=function(){this.type=10;this.offset=0;this.frameIndicesOffset=-1};return e}(t.BaseObject);t.TimelineData=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.boneMask=[];return e}e.toString=function(){return"[class dragonBones.AnimationConfig]"};e.prototype._onClear=function(){this.pauseFadeOut=true;this.fadeOutMode=4;this.fadeOutTweenType=1;this.fadeOutTime=-1;this.actionEnabled=true;this.additiveBlending=false;this.displayControl=true;this.pauseFadeIn=true;this.resetToPose=true;this.fadeInTweenType=1;this.playTimes=-1;this.layer=0;this.position=0;this.duration=-1;this.timeScale=-100;this.fadeInTime=-1;this.autoFadeOutTime=-1;this.weight=1;this.name="";this.animation="";this.group="";this.boneMask.length=0};e.prototype.clear=function(){this._onClear()};e.prototype.copyFrom=function(t){this.pauseFadeOut=t.pauseFadeOut;this.fadeOutMode=t.fadeOutMode;this.autoFadeOutTime=t.autoFadeOutTime;this.fadeOutTweenType=t.fadeOutTweenType;this.actionEnabled=t.actionEnabled;this.additiveBlending=t.additiveBlending;this.displayControl=t.displayControl;this.pauseFadeIn=t.pauseFadeIn;this.resetToPose=t.resetToPose;this.playTimes=t.playTimes;this.layer=t.layer;this.position=t.position;this.duration=t.duration;this.timeScale=t.timeScale;this.fadeInTime=t.fadeInTime;this.fadeOutTime=t.fadeOutTime;this.fadeInTweenType=t.fadeInTweenType;this.weight=t.weight;this.name=t.name;this.animation=t.animation;this.group=t.group;this.boneMask.length=t.boneMask.length;for(var e=0,i=this.boneMask.length;e<i;++e){this.boneMask[e]=t.boneMask[e]}};e.prototype.containsBoneMask=function(t){return this.boneMask.length===0||this.boneMask.indexOf(t)>=0};e.prototype.addBoneMask=function(t,e,i){if(i===void 0){i=true}var a=t.getBone(e);if(a===null){return}if(this.boneMask.indexOf(e)<0){this.boneMask.push(e)}if(i){for(var r=0,n=t.getBones();r<n.length;r++){var s=n[r];if(this.boneMask.indexOf(s.name)<0&&a.contains(s)){this.boneMask.push(s.name)}}}};e.prototype.removeBoneMask=function(t,e,i){if(i===void 0){i=true}var a=this.boneMask.indexOf(e);if(a>=0){this.boneMask.splice(a,1)}if(i){var r=t.getBone(e);if(r!==null){if(this.boneMask.length>0){for(var n=0,s=t.getBones();n<s.length;n++){var o=s[n];var l=this.boneMask.indexOf(o.name);if(l>=0&&r.contains(o)){this.boneMask.splice(l,1)}}}else{for(var h=0,u=t.getBones();h<u.length;h++){var o=u[h];if(o===r){continue}if(!r.contains(o)){this.boneMask.push(o.name)}}}}}};return e}(t.BaseObject);t.AnimationConfig=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.textures={};return e}e.prototype._onClear=function(){for(var t in this.textures){this.textures[t].returnToPool();delete this.textures[t]}this.autoSearch=false;this.width=0;this.height=0;this.scale=1;this.name="";this.imagePath=""};e.prototype.copyFrom=function(t){this.autoSearch=t.autoSearch;this.scale=t.scale;this.width=t.width;this.height=t.height;this.name=t.name;this.imagePath=t.imagePath;for(var e in this.textures){this.textures[e].returnToPool();delete this.textures[e]}for(var e in t.textures){var i=this.createTexture();i.copyFrom(t.textures[e]);this.textures[e]=i}};e.prototype.addTexture=function(t){if(t.name in this.textures){console.warn("Replace texture: "+t.name);this.textures[t.name].returnToPool()}t.parent=this;this.textures[t.name]=t};e.prototype.getTexture=function(t){return t in this.textures?this.textures[t]:null};return e}(t.BaseObject);t.TextureAtlasData=e;var i=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.region=new t.Rectangle;i.frame=null;return i}i.createRectangle=function(){return new t.Rectangle};i.prototype._onClear=function(){this.rotated=false;this.name="";this.region.clear();this.parent=null;this.frame=null};i.prototype.copyFrom=function(t){this.rotated=t.rotated;this.name=t.name;this.region.copyFrom(t.region);this.parent=t.parent;if(this.frame===null&&t.frame!==null){this.frame=i.createRectangle()}else if(this.frame!==null&&t.frame===null){this.frame=null}if(this.frame!==null&&t.frame!==null){this.frame.copyFrom(t.frame)}};return i}(t.BaseObject);t.TextureData=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t._bones=[];t._slots=[];t._actions=[];t._animation=null;t._proxy=null;t._replaceTextureAtlasData=null;t._clock=null;return t}i.toString=function(){return"[class dragonBones.Armature]"};i._onSortSlots=function(t,e){return t._zOrder>e._zOrder?1:-1};i.prototype._onClear=function(){if(this._clock!==null){this._clock.remove(this)}for(var t=0,e=this._bones;t<e.length;t++){var i=e[t];i.returnToPool()}for(var a=0,r=this._slots;a<r.length;a++){var n=r[a];n.returnToPool()}for(var s=0,o=this._actions;s<o.length;s++){var l=o[s];l.returnToPool()}if(this._animation!==null){this._animation.returnToPool()}if(this._proxy!==null){this._proxy.clear()}if(this._replaceTextureAtlasData!==null){this._replaceTextureAtlasData.returnToPool()}this.inheritAnimation=true;this.debugDraw=false;this.armatureData=null;this.userData=null;this._debugDraw=false;this._lockUpdate=false;this._bonesDirty=false;this._slotsDirty=false;this._zOrderDirty=false;this._flipX=false;this._flipY=false;this._cacheFrameIndex=-1;this._bones.length=0;this._slots.length=0;this._actions.length=0;this._animation=null;this._proxy=null;this._display=null;this._replaceTextureAtlasData=null;this._replacedTexture=null;this._dragonBones=null;this._clock=null;this._parent=null};i.prototype._sortBones=function(){var t=this._bones.length;if(t<=0){return}var e=this._bones.concat();var i=0;var a=0;this._bones.length=0;while(a<t){var r=e[i++];if(i>=t){i=0}if(this._bones.indexOf(r)>=0){continue}if(r.constraints.length>0){var n=false;for(var s=0,o=r.constraints;s<o.length;s++){var l=o[s];if(this._bones.indexOf(l.target)<0){n=true;break}}if(n){continue}}if(r.parent!==null&&this._bones.indexOf(r.parent)<0){continue}this._bones.push(r);a++}};i.prototype._sortSlots=function(){this._slots.sort(i._onSortSlots)};i.prototype._sortZOrder=function(t,e){var i=this.armatureData.sortedSlots;var a=t===null;if(this._zOrderDirty||!a){for(var r=0,n=i.length;r<n;++r){var s=a?r:t[e+r];if(s<0||s>=n){continue}var o=i[s];var l=this.getSlot(o.name);if(l!==null){l._setZorder(r)}}this._slotsDirty=true;this._zOrderDirty=!a}};i.prototype._addBoneToBoneList=function(t){if(this._bones.indexOf(t)<0){this._bonesDirty=true;this._bones.push(t);this._animation._timelineDirty=true}};i.prototype._removeBoneFromBoneList=function(t){var e=this._bones.indexOf(t);if(e>=0){this._bones.splice(e,1);this._animation._timelineDirty=true}};i.prototype._addSlotToSlotList=function(t){if(this._slots.indexOf(t)<0){this._slotsDirty=true;this._slots.push(t);this._animation._timelineDirty=true}};i.prototype._removeSlotFromSlotList=function(t){var e=this._slots.indexOf(t);if(e>=0){this._slots.splice(e,1);this._animation._timelineDirty=true}};i.prototype._bufferAction=function(t,e){if(this._actions.indexOf(t)<0){if(e){this._actions.push(t)}else{this._actions.unshift(t)}}};i.prototype.dispose=function(){if(this.armatureData!==null){this._lockUpdate=true;this._dragonBones.bufferObject(this)}};i.prototype.init=function(e,i,a,r){if(this.armatureData!==null){return}this.armatureData=e;this._animation=t.BaseObject.borrowObject(t.Animation);this._proxy=i;this._display=a;this._dragonBones=r;this._proxy.init(this);this._animation.init(this);this._animation.animations=this.armatureData.animations};i.prototype.advanceTime=function(e){if(this._lockUpdate){return}if(this.armatureData===null){console.assert(false,"The armature has been disposed.");return}else if(this.armatureData.parent===null){console.assert(false,"The armature data has been disposed.");return}var i=this._cacheFrameIndex;this._animation.advanceTime(e);if(this._bonesDirty){this._bonesDirty=false;this._sortBones()}if(this._slotsDirty){this._slotsDirty=false;this._sortSlots()}if(this._cacheFrameIndex<0||this._cacheFrameIndex!==i){var a=0,r=0;for(a=0,r=this._bones.length;a<r;++a){this._bones[a].update(this._cacheFrameIndex)}for(a=0,r=this._slots.length;a<r;++a){this._slots[a].update(this._cacheFrameIndex)}}if(this._actions.length>0){this._lockUpdate=true;for(var n=0,s=this._actions;n<s.length;n++){var o=s[n];if(o.type===0){this._animation.fadeIn(o.name)}}this._actions.length=0;this._lockUpdate=false}var l=this.debugDraw||t.DragonBones.debugDraw;if(l||this._debugDraw){this._debugDraw=l;this._proxy.debugUpdate(this._debugDraw)}};i.prototype.invalidUpdate=function(t,e){if(t===void 0){t=null}if(e===void 0){e=false}if(t!==null&&t.length>0){var i=this.getBone(t);if(i!==null){i.invalidUpdate();if(e){for(var a=0,r=this._slots;a<r.length;a++){var n=r[a];if(n.parent===i){n.invalidUpdate()}}}}}else{for(var s=0,o=this._bones;s<o.length;s++){var i=o[s];i.invalidUpdate()}if(e){for(var l=0,h=this._slots;l<h.length;l++){var n=h[l];n.invalidUpdate()}}}};i.prototype.containsPoint=function(t,e){for(var i=0,a=this._slots;i<a.length;i++){var r=a[i];if(r.containsPoint(t,e)){return r}}return null};i.prototype.intersectsSegment=function(t,e,i,a,r,n,s){if(r===void 0){r=null}if(n===void 0){n=null}if(s===void 0){s=null}var o=t===i;var l=0;var h=0;var u=0;var f=0;var _=0;var m=0;var p=0;var c=0;var d=null;var y=null;for(var g=0,v=this._slots;g<v.length;g++){var b=v[g];var D=b.intersectsSegment(t,e,i,a,r,n,s);if(D>0){if(r!==null||n!==null){if(r!==null){var T=o?r.y-e:r.x-t;if(T<0){T=-T}if(d===null||T<l){l=T;u=r.x;f=r.y;d=b;if(s){p=s.x}}}if(n!==null){var T=n.x-t;if(T<0){T=-T}if(y===null||T>h){h=T;_=n.x;m=n.y;y=b;if(s!==null){c=s.y}}}}else{d=b;break}}}if(d!==null&&r!==null){r.x=u;r.y=f;if(s!==null){s.x=p}}if(y!==null&&n!==null){n.x=_;n.y=m;if(s!==null){s.y=c}}return d};i.prototype.getBone=function(t){for(var e=0,i=this._bones;e<i.length;e++){var a=i[e];if(a.name===t){return a}}return null};i.prototype.getBoneByDisplay=function(t){var e=this.getSlotByDisplay(t);return e!==null?e.parent:null};i.prototype.getSlot=function(t){for(var e=0,i=this._slots;e<i.length;e++){var a=i[e];if(a.name===t){return a}}return null};i.prototype.getSlotByDisplay=function(t){if(t!==null){for(var e=0,i=this._slots;e<i.length;e++){var a=i[e];if(a.display===t){return a}}}return null};i.prototype.addBone=function(t,e){if(e===void 0){e=null}console.assert(t!==null);t._setArmature(this);t._setParent(e!==null?this.getBone(e):null)};i.prototype.removeBone=function(t){console.assert(t!==null&&t.armature===this);t._setParent(null);t._setArmature(null)};i.prototype.addSlot=function(t,e){var i=this.getBone(e);console.assert(t!==null&&i!==null);t._setArmature(this);t._setParent(i)};i.prototype.removeSlot=function(t){console.assert(t!==null&&t.armature===this);t._setParent(null);t._setArmature(null)};i.prototype.getBones=function(){return this._bones};i.prototype.getSlots=function(){return this._slots};Object.defineProperty(i.prototype,"flipX",{get:function(){return this._flipX},set:function(t){if(this._flipX===t){return}this._flipX=t;this.invalidUpdate()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"flipY",{get:function(){return this._flipY},set:function(t){if(this._flipY===t){return}this._flipY=t;this.invalidUpdate()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"cacheFrameRate",{get:function(){return this.armatureData.cacheFrameRate},set:function(t){if(this.armatureData.cacheFrameRate!==t){this.armatureData.cacheFrames(t);for(var e=0,i=this._slots;e<i.length;e++){var a=i[e];var r=a.childArmature;if(r!==null){r.cacheFrameRate=t}}}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"name",{get:function(){return this.armatureData.name},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animation",{get:function(){return this._animation},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"proxy",{get:function(){return this._proxy},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"eventDispatcher",{get:function(){return this._proxy},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"display",{get:function(){return this._display},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"replacedTexture",{get:function(){return this._replacedTexture},set:function(t){if(this._replacedTexture===t){return}if(this._replaceTextureAtlasData!==null){this._replaceTextureAtlasData.returnToPool();this._replaceTextureAtlasData=null}this._replacedTexture=t;for(var e=0,i=this._slots;e<i.length;e++){var a=i[e];a.invalidUpdate();a.update(-1)}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"clock",{get:function(){return this._clock},set:function(t){if(this._clock===t){return}if(this._clock!==null){this._clock.remove(this)}this._clock=t;if(this._clock){this._clock.add(this)}for(var e=0,i=this._slots;e<i.length;e++){var a=i[e];var r=a.childArmature;if(r!==null){r.clock=this._clock}}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},enumerable:true,configurable:true});i.prototype.replaceTexture=function(t){this.replacedTexture=t};i.prototype.hasEventListener=function(t){return this._proxy.hasEvent(t)};i.prototype.addEventListener=function(t,e,i){this._proxy.addEvent(t,e,i)};i.prototype.removeEventListener=function(t,e,i){this._proxy.removeEvent(t,e,i)};i.prototype.enableAnimationCache=function(t){this.cacheFrameRate=t};i.prototype.getDisplay=function(){return this._display};return i}(t.BaseObject);t.Armature=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.globalTransformMatrix=new t.Matrix;i.global=new t.Transform;i.offset=new t.Transform;return i}i.prototype._onClear=function(){this.name="";this.globalTransformMatrix.identity();this.global.identity();this.offset.identity();this.origin=null;this.userData=null;this._globalDirty=false;this._armature=null;this._parent=null};i.prototype._setArmature=function(t){this._armature=t};i.prototype._setParent=function(t){this._parent=t};i.prototype.updateGlobalTransform=function(){if(this._globalDirty){this._globalDirty=false;this.global.fromMatrix(this.globalTransformMatrix)}};Object.defineProperty(i.prototype,"armature",{get:function(){return this._armature},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"parent",{get:function(){return this._parent},enumerable:true,configurable:true});i._helpMatrix=new t.Matrix;i._helpTransform=new t.Transform;i._helpPoint=new t.Point;return i}(t.BaseObject);t.TransformObject=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.animationPose=new t.Transform;i.constraints=[];i._bones=[];i._slots=[];return i}i.toString=function(){return"[class dragonBones.Bone]"};i.prototype._onClear=function(){e.prototype._onClear.call(this);for(var t=0,i=this.constraints;t<i.length;t++){var a=i[t];a.returnToPool()}this.offsetMode=1;this.animationPose.identity();this.constraints.length=0;this.boneData=null;this._transformDirty=false;this._childrenTransformDirty=false;this._blendDirty=false;this._localDirty=true;this._visible=true;this._cachedFrameIndex=-1;this._blendLayer=0;this._blendLeftWeight=1;this._blendLayerWeight=0;this._bones.length=0;this._slots.length=0;this._cachedFrameIndices=null};i.prototype._updateGlobalTransformMatrix=function(e){var i=this._armature.flipX;var a=this._armature.flipY===t.DragonBones.yDown;var r=this.global;var n=this.globalTransformMatrix;var s=this._parent!==null;var o=0;if(this.offsetMode===1){r.x=this.origin.x+this.offset.x+this.animationPose.x;r.y=this.origin.y+this.offset.y+this.animationPose.y;r.skew=this.origin.skew+this.offset.skew+this.animationPose.skew;r.rotation=this.origin.rotation+this.offset.rotation+this.animationPose.rotation;r.scaleX=this.origin.scaleX*this.offset.scaleX*this.animationPose.scaleX;r.scaleY=this.origin.scaleY*this.offset.scaleY*this.animationPose.scaleY}else if(this.offsetMode===0){r.copyFrom(this.origin).add(this.animationPose)}else{s=false;r.copyFrom(this.offset)}if(s){var l=this._parent.globalTransformMatrix;if(this.boneData.inheritScale){if(!this.boneData.inheritRotation){this._parent.updateGlobalTransform();o=this._parent.global.rotation;r.rotation-=o}r.toMatrix(n);n.concat(l);if(this.boneData.inheritTranslation){r.x=n.tx;r.y=n.ty}else{n.tx=r.x;n.ty=r.y}if(e){r.fromMatrix(n)}else{this._globalDirty=true}}else{if(this.boneData.inheritTranslation){var h=r.x;var u=r.y;r.x=l.a*h+l.c*u+l.tx;r.y=l.d*u+l.b*h+l.ty}else{if(i){r.x=-r.x}if(a){r.y=-r.y}}if(this.boneData.inheritRotation){this._parent.updateGlobalTransform();o=this._parent.global.rotation;if(this._parent.global.scaleX<0){o+=Math.PI}if(l.a*l.d-l.b*l.c<0){o-=r.rotation*2;if(i!==a||this.boneData.inheritReflection){r.skew+=Math.PI}}r.rotation+=o}else if(i||a){if(i&&a){o=Math.PI}else{o=-r.rotation*2;if(i){o+=Math.PI}r.skew+=Math.PI}r.rotation+=o}r.toMatrix(n)}}else{if(i||a){if(i){r.x=-r.x}if(a){r.y=-r.y}if(i&&a){o=Math.PI}else{o=-r.rotation*2;if(i){o+=Math.PI}r.skew+=Math.PI}r.rotation+=o}r.toMatrix(n)}};i.prototype._setArmature=function(t){if(this._armature===t){return}var e=null;var i=null;if(this._armature!==null){e=this.getSlots();i=this.getBones();this._armature._removeBoneFromBoneList(this)}this._armature=t;if(this._armature!==null){this._armature._addBoneToBoneList(this)}if(e!==null){for(var a=0,r=e;a<r.length;a++){var n=r[a];if(n.parent===this){n._setArmature(this._armature)}}}if(i!==null){for(var s=0,o=i;s<o.length;s++){var l=o[s];if(l.parent===this){l._setArmature(this._armature)}}}};i.prototype.init=function(t){if(this.boneData!==null){return}this.boneData=t;this.name=this.boneData.name;this.origin=this.boneData.transform};i.prototype.update=function(t){this._blendDirty=false;if(t>=0&&this._cachedFrameIndices!==null){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e){this._transformDirty=false}else if(e>=0){this._transformDirty=true;this._cachedFrameIndex=e}else{if(this.constraints.length>0){for(var i=0,a=this.constraints;i<a.length;i++){var r=a[i];r.update()}}if(this._transformDirty||this._parent!==null&&this._parent._childrenTransformDirty){this._transformDirty=true;this._cachedFrameIndex=-1}else if(this._cachedFrameIndex>=0){this._transformDirty=false;this._cachedFrameIndices[t]=this._cachedFrameIndex}else{this._transformDirty=true;this._cachedFrameIndex=-1}}}else{if(this.constraints.length>0){for(var n=0,s=this.constraints;n<s.length;n++){var r=s[n];r.update()}}if(this._transformDirty||this._parent!==null&&this._parent._childrenTransformDirty){t=-1;this._transformDirty=true;this._cachedFrameIndex=-1}}if(this._transformDirty){this._transformDirty=false;this._childrenTransformDirty=true;if(this._cachedFrameIndex<0){var o=t>=0;if(this._localDirty){this._updateGlobalTransformMatrix(o)}if(o&&this._cachedFrameIndices!==null){this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature.armatureData.setCacheFrame(this.globalTransformMatrix,this.global)}}else{this._armature.armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex)}}else if(this._childrenTransformDirty){this._childrenTransformDirty=false}this._localDirty=true};i.prototype.updateByConstraint=function(){if(this._localDirty){this._localDirty=false;if(this._transformDirty||this._parent!==null&&this._parent._childrenTransformDirty){this._updateGlobalTransformMatrix(true)}this._transformDirty=true}};i.prototype.addConstraint=function(t){if(this.constraints.indexOf(t)<0){this.constraints.push(t)}};i.prototype.invalidUpdate=function(){this._transformDirty=true};i.prototype.contains=function(t){if(t===this){return false}var e=t;while(e!==this&&e!==null){e=e.parent}return e===this};i.prototype.getBones=function(){this._bones.length=0;for(var t=0,e=this._armature.getBones();t<e.length;t++){var i=e[t];if(i.parent===this){this._bones.push(i)}}return this._bones};i.prototype.getSlots=function(){this._slots.length=0;for(var t=0,e=this._armature.getSlots();t<e.length;t++){var i=e[t];if(i.parent===this){this._slots.push(i)}}return this._slots};Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){if(this._visible===t){return}this._visible=t;for(var e=0,i=this._armature.getSlots();e<i.length;e++){var a=i[e];if(a._parent===this){a._updateVisible()}}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"length",{get:function(){return this.boneData.length},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"slot",{get:function(){for(var t=0,e=this._armature.getSlots();t<e.length;t++){var i=e[t];if(i.parent===this){return i}}return null},enumerable:true,configurable:true});return i}(t.TransformObject);t.Bone=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i._localMatrix=new t.Matrix;i._colorTransform=new t.ColorTransform;i._ffdVertices=[];i._displayDatas=[];i._displayList=[];i._meshBones=[];i._rawDisplay=null;i._meshDisplay=null;return i}i.prototype._onClear=function(){e.prototype._onClear.call(this);var i=[];for(var a=0,r=this._displayList;a<r.length;a++){var n=r[a];if(n!==null&&n!==this._rawDisplay&&n!==this._meshDisplay&&i.indexOf(n)<0){i.push(n)}}for(var s=0,o=i;s<o.length;s++){var n=o[s];if(n instanceof t.Armature){n.dispose()}else{this._disposeDisplay(n)}}if(this._meshDisplay!==null&&this._meshDisplay!==this._rawDisplay){this._disposeDisplay(this._meshDisplay)}if(this._rawDisplay!==null){this._disposeDisplay(this._rawDisplay)}this.displayController=null;this.slotData=null;this._displayDirty=false;this._zOrderDirty=false;this._blendModeDirty=false;this._colorDirty=false;this._meshDirty=false;this._transformDirty=false;this._visible=true;this._blendMode=0;this._displayIndex=-1;this._animationDisplayIndex=-1;this._zOrder=0;this._cachedFrameIndex=-1;this._pivotX=0;this._pivotY=0;this._localMatrix.identity();this._colorTransform.identity();this._ffdVertices.length=0;this._displayList.length=0;this._displayDatas.length=0;this._meshBones.length=0;this._rawDisplayDatas=null;this._displayData=null;this._textureData=null;this._meshData=null;this._boundingBoxData=null;this._rawDisplay=null;this._meshDisplay=null;this._display=null;this._childArmature=null;this._cachedFrameIndices=null};i.prototype._updateDisplayData=function(){var t=this._displayData;var e=this._textureData;var a=this._meshData;var r=this._displayIndex>=0&&this._displayIndex<this._rawDisplayDatas.length?this._rawDisplayDatas[this._displayIndex]:null;if(this._displayIndex>=0&&this._displayIndex<this._displayDatas.length){this._displayData=this._displayDatas[this._displayIndex]}else{this._displayData=null}if(this._displayData!==null){if(this._displayData.type===0||this._displayData.type===2){this._textureData=this._displayData.texture;if(this._displayData.type===2){this._meshData=this._displayData}else if(r!==null&&r.type===2){this._meshData=r}else{this._meshData=null}}else{this._textureData=null;this._meshData=null}}else{this._textureData=null;this._meshData=null}if(this._displayData!==null&&this._displayData.type===3){this._boundingBoxData=this._displayData.boundingBox}else if(r!==null&&r.type===3){this._boundingBoxData=r.boundingBox}else{this._boundingBoxData=null}if(this._displayData!==t||this._textureData!==e||this._meshData!==a){if(this._meshData!==null){this._pivotX=0;this._pivotY=0}else if(this._textureData!==null){var n=this._displayData;var s=this._armature.armatureData.scale;var o=this._textureData.frame;this._pivotX=n.pivot.x;this._pivotY=n.pivot.y;var l=o!==null?o:this._textureData.region;var h=l.width*s;var u=l.height*s;if(this._textureData.rotated&&o===null){h=l.height;u=l.width}this._pivotX*=h;this._pivotY*=u;if(o!==null){this._pivotX+=o.x*s;this._pivotY+=o.y*s}}else{this._pivotX=0;this._pivotY=0}if(this._meshData!==a){if(this._meshData!==null){if(this._meshData.weight!==null){this._ffdVertices.length=this._meshData.weight.count*2;this._meshBones.length=this._meshData.weight.bones.length;for(var f=0,_=this._meshBones.length;f<_;++f){this._meshBones[f]=this._armature.getBone(this._meshData.weight.bones[f].name)}}else{var m=this._meshData.parent.parent.intArray[this._meshData.offset+0];this._ffdVertices.length=m*2;this._meshBones.length=0}for(var f=0,_=this._ffdVertices.length;f<_;++f){this._ffdVertices[f]=0}this._meshDirty=true}else{this._ffdVertices.length=0;this._meshBones.length=0}}else if(this._meshData!==null&&this._textureData!==e){this._meshDirty=true}if(this._displayData!==null&&r!==null&&this._displayData!==r&&this._meshData===null){r.transform.toMatrix(i._helpMatrix);i._helpMatrix.invert();i._helpMatrix.transformPoint(0,0,i._helpPoint);this._pivotX-=i._helpPoint.x;this._pivotY-=i._helpPoint.y;this._displayData.transform.toMatrix(i._helpMatrix);i._helpMatrix.invert();i._helpMatrix.transformPoint(0,0,i._helpPoint);this._pivotX+=i._helpPoint.x;this._pivotY+=i._helpPoint.y}if(r!==null){this.origin=r.transform}else if(this._displayData!==null){this.origin=this._displayData.transform}this._displayDirty=true;this._transformDirty=true}};i.prototype._updateDisplay=function(){var e=this._display!==null?this._display:this._rawDisplay;var i=this._childArmature;if(this._displayIndex>=0&&this._displayIndex<this._displayList.length){this._display=this._displayList[this._displayIndex];if(this._display!==null&&this._display instanceof t.Armature){this._childArmature=this._display;this._display=this._childArmature.display}else{this._childArmature=null}}else{this._display=null;this._childArmature=null}var a=this._display!==null?this._display:this._rawDisplay;if(a!==e){this._onUpdateDisplay();this._replaceDisplay(e);this._visibleDirty=true;this._blendModeDirty=true;this._colorDirty=true}if(a===this._rawDisplay||a===this._meshDisplay){this._updateFrame()}if(this._childArmature!==i){if(i!==null){i._parent=null;i.clock=null;if(i.inheritAnimation){i.animation.reset()}}if(this._childArmature!==null){this._childArmature._parent=this;this._childArmature.clock=this._armature.clock;if(this._childArmature.inheritAnimation){if(this._childArmature.cacheFrameRate===0){var r=this._armature.cacheFrameRate;if(r!==0){this._childArmature.cacheFrameRate=r}}var n=null;if(this._displayData!==null&&this._displayData.type===1){n=this._displayData.actions}else{var s=this._displayIndex>=0&&this._displayIndex<this._rawDisplayDatas.length?this._rawDisplayDatas[this._displayIndex]:null;if(s!==null&&s.type===1){n=s.actions}}if(n!==null&&n.length>0){for(var o=0,l=n;o<l.length;o++){var h=l[o];this._childArmature._bufferAction(h,false)}}else{this._childArmature.animation.play()}}}}};i.prototype._updateGlobalTransformMatrix=function(t){this.globalTransformMatrix.copyFrom(this._localMatrix);this.globalTransformMatrix.concat(this._parent.globalTransformMatrix);if(t){this.global.fromMatrix(this.globalTransformMatrix)}else{this._globalDirty=true}};i.prototype._isMeshBonesUpdate=function(){for(var t=0,e=this._meshBones;t<e.length;t++){var i=e[t];if(i!==null&&i._childrenTransformDirty){return true}}return false};i.prototype._setArmature=function(t){if(this._armature===t){return}if(this._armature!==null){this._armature._removeSlotFromSlotList(this)}this._armature=t;this._onUpdateDisplay();if(this._armature!==null){this._armature._addSlotToSlotList(this);this._addDisplay()}else{this._removeDisplay()}};i.prototype._setDisplayIndex=function(t,e){if(e===void 0){e=false}if(e){if(this._animationDisplayIndex===t){return false}this._animationDisplayIndex=t}if(this._displayIndex===t){return false}this._displayIndex=t;this._displayDirty=true;this._updateDisplayData();return this._displayDirty};i.prototype._setZorder=function(t){if(this._zOrder===t){}this._zOrder=t;this._zOrderDirty=true;return this._zOrderDirty};i.prototype._setColor=function(t){this._colorTransform.copyFrom(t);this._colorDirty=true;return this._colorDirty};i.prototype._setDisplayList=function(e){if(e!==null&&e.length>0){if(this._displayList.length!==e.length){this._displayList.length=e.length}for(var i=0,a=e.length;i<a;++i){var r=e[i];if(r!==null&&r!==this._rawDisplay&&r!==this._meshDisplay&&!(r instanceof t.Armature)&&this._displayList.indexOf(r)<0){this._initDisplay(r)}this._displayList[i]=r}}else if(this._displayList.length>0){this._displayList.length=0}if(this._displayIndex>=0&&this._displayIndex<this._displayList.length){this._displayDirty=this._display!==this._displayList[this._displayIndex]}else{this._displayDirty=this._display!==null}this._updateDisplayData();return this._displayDirty};i.prototype.init=function(t,e,i,a){if(this.slotData!==null){return}this.slotData=t;this.name=this.slotData.name;this._visibleDirty=true;this._blendModeDirty=true;this._colorDirty=true;this._blendMode=this.slotData.blendMode;this._zOrder=this.slotData.zOrder;this._colorTransform.copyFrom(this.slotData.color);this._rawDisplayDatas=e;this._rawDisplay=i;this._meshDisplay=a;this._displayDatas.length=this._rawDisplayDatas.length;for(var r=0,n=this._displayDatas.length;r<n;++r){this._displayDatas[r]=this._rawDisplayDatas[r]}};i.prototype.update=function(t){if(this._displayDirty){this._displayDirty=false;this._updateDisplay();if(this._transformDirty){if(this.origin!==null){this.global.copyFrom(this.origin).add(this.offset).toMatrix(this._localMatrix)}else{this.global.copyFrom(this.offset).toMatrix(this._localMatrix)}}}if(this._zOrderDirty){this._zOrderDirty=false;this._updateZOrder()}if(t>=0&&this._cachedFrameIndices!==null){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e){this._transformDirty=false}else if(e>=0){this._transformDirty=true;this._cachedFrameIndex=e}else if(this._transformDirty||this._parent._childrenTransformDirty){this._transformDirty=true;this._cachedFrameIndex=-1}else if(this._cachedFrameIndex>=0){this._transformDirty=false;this._cachedFrameIndices[t]=this._cachedFrameIndex}else{this._transformDirty=true;this._cachedFrameIndex=-1}}else if(this._transformDirty||this._parent._childrenTransformDirty){t=-1;this._transformDirty=true;this._cachedFrameIndex=-1}if(this._display===null){return}if(this._blendModeDirty){this._blendModeDirty=false;this._updateBlendMode()}if(this._colorDirty){this._colorDirty=false;this._updateColor()}if(this._meshData!==null&&this._display===this._meshDisplay){var i=this._meshData.weight!==null;if(this._meshDirty||i&&this._isMeshBonesUpdate()){this._meshDirty=false;this._updateMesh()}if(i){if(this._transformDirty){this._transformDirty=false;this._updateTransform(true)}return}}if(this._transformDirty){this._transformDirty=false;if(this._cachedFrameIndex<0){var a=t>=0;this._updateGlobalTransformMatrix(a);if(a&&this._cachedFrameIndices!==null){this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature.armatureData.setCacheFrame(this.globalTransformMatrix,this.global)}}else{this._armature.armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex)}this._updateTransform(false)}};i.prototype.updateTransformAndMatrix=function(){if(this._transformDirty){this._transformDirty=false;this._updateGlobalTransformMatrix(false)}};i.prototype.containsPoint=function(t,e){if(this._boundingBoxData===null){return false}this.updateTransformAndMatrix();i._helpMatrix.copyFrom(this.globalTransformMatrix);i._helpMatrix.invert();i._helpMatrix.transformPoint(t,e,i._helpPoint);return this._boundingBoxData.containsPoint(i._helpPoint.x,i._helpPoint.y)};i.prototype.intersectsSegment=function(t,e,a,r,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}if(this._boundingBoxData===null){return 0}this.updateTransformAndMatrix();i._helpMatrix.copyFrom(this.globalTransformMatrix);i._helpMatrix.invert();i._helpMatrix.transformPoint(t,e,i._helpPoint);t=i._helpPoint.x;e=i._helpPoint.y;i._helpMatrix.transformPoint(a,r,i._helpPoint);a=i._helpPoint.x;r=i._helpPoint.y;var l=this._boundingBoxData.intersectsSegment(t,e,a,r,n,s,o);if(l>0){if(l===1||l===2){if(n!==null){this.globalTransformMatrix.transformPoint(n.x,n.y,n);if(s!==null){s.x=n.x;s.y=n.y}}else if(s!==null){this.globalTransformMatrix.transformPoint(s.x,s.y,s)}}else{if(n!==null){this.globalTransformMatrix.transformPoint(n.x,n.y,n)}if(s!==null){this.globalTransformMatrix.transformPoint(s.x,s.y,s)}}if(o!==null){this.globalTransformMatrix.transformPoint(Math.cos(o.x),Math.sin(o.x),i._helpPoint,true);o.x=Math.atan2(i._helpPoint.y,i._helpPoint.x);this.globalTransformMatrix.transformPoint(Math.cos(o.y),Math.sin(o.y),i._helpPoint,true);o.y=Math.atan2(i._helpPoint.y,i._helpPoint.x)}}return l};i.prototype.invalidUpdate=function(){this._displayDirty=true;this._transformDirty=true};Object.defineProperty(i.prototype,"displayIndex",{get:function(){return this._displayIndex},set:function(t){if(this._setDisplayIndex(t)){this.update(-1)}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"displayList",{get:function(){return this._displayList.concat()},set:function(e){var i=this._displayList.concat();var a=new Array;if(this._setDisplayList(e)){this.update(-1)}for(var r=0,n=i;r<n.length;r++){var s=n[r];if(s!==null&&s!==this._rawDisplay&&s!==this._meshDisplay&&this._displayList.indexOf(s)<0&&a.indexOf(s)<0){a.push(s)}}for(var o=0,l=a;o<l.length;o++){var s=l[o];if(s instanceof t.Armature){s.dispose()}else{this._disposeDisplay(s)}}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"boundingBoxData",{get:function(){return this._boundingBoxData},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"rawDisplay",{get:function(){return this._rawDisplay},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"meshDisplay",{get:function(){return this._meshDisplay},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"display",{get:function(){return this._display},set:function(t){if(this._display===t){return}var e=this._displayList.length;if(this._displayIndex<0&&e===0){this._displayIndex=0}if(this._displayIndex<0){return}else{var i=this.displayList;if(e<=this._displayIndex){i.length=this._displayIndex+1}i[this._displayIndex]=t;this.displayList=i}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"childArmature",{get:function(){return this._childArmature},set:function(t){if(this._childArmature===t){return}this.display=t},enumerable:true,configurable:true});i.prototype.getDisplay=function(){return this._display};i.prototype.setDisplay=function(t){this.display=t};return i}(t.TransformObject);t.Slot=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.prototype._onClear=function(){this.target=null;this.bone=null;this.root=null};i._helpMatrix=new t.Matrix;i._helpTransform=new t.Transform;i._helpPoint=new t.Point;return i}(t.BaseObject);t.Constraint=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.IKConstraint]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.bendPositive=false;this.scaleEnabled=false;this.weight=1};e.prototype._computeA=function(){var t=this.target.global;var e=this.bone.global;var i=this.bone.globalTransformMatrix;var a=Math.atan2(t.y-e.y,t.x-e.x);if(e.scaleX<0){a+=Math.PI}e.rotation+=(a-e.rotation)*this.weight;e.toMatrix(i)};e.prototype._computeB=function(){var t=this.bone.boneData.length;var e=this.root;var i=this.target.global;var a=e.global;var r=this.bone.global;var n=this.bone.globalTransformMatrix;var s=n.a*t;var o=n.b*t;var l=s*s+o*o;var h=Math.sqrt(l);var u=r.x-a.x;var f=r.y-a.y;var _=u*u+f*f;var m=Math.sqrt(_);var p=Math.atan2(f,u);u=i.x-a.x;f=i.y-a.y;var c=u*u+f*f;var d=Math.sqrt(c);var y=0;if(h+m<=d||d+h<=m||d+m<=h){y=Math.atan2(i.y-a.y,i.x-a.x);if(h+m<=d){}else if(m<h){y+=Math.PI}}else{var g=(_-l+c)/(2*c);var v=Math.sqrt(_-g*g*c)/d;var b=a.x+u*g;var D=a.y+f*g;var T=-f*v;var A=u*v;var O=false;if(e._parent!==null){var S=e._parent.globalTransformMatrix;O=S.a*S.d-S.b*S.c<0}if(O!==this.bendPositive){r.x=b-T;r.y=D-A}else{r.x=b+T;r.y=D+A}y=Math.atan2(r.y-a.y,r.x-a.x)}var x=(y-p)*this.weight;a.rotation+=x;a.toMatrix(e.globalTransformMatrix);var B=p+x;r.x=a.x+Math.cos(B)*m;r.y=a.y+Math.sin(B)*m;var E=Math.atan2(i.y-r.y,i.x-r.x);if(r.scaleX<0){E+=Math.PI}x=(E-r.rotation)*this.weight;r.rotation+=x;r.toMatrix(n)};e.prototype.update=function(){if(this.root===null){this.bone.updateByConstraint();this._computeA()}else{this.root.updateByConstraint();this.bone.updateByConstraint();this._computeB()}};return e}(e);t.IKConstraint=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t){if(t===void 0){t=-1}this.time=0;this.timeScale=1;this._animatebles=[];this._clock=null;if(t<0){this.time=(new Date).getTime()*.001}else{this.time=t}}t.prototype.advanceTime=function(t){if(t!==t){t=0}if(t<0){t=(new Date).getTime()*.001-this.time}if(this.timeScale!==1){t*=this.timeScale}if(t<0){this.time-=t}else{this.time+=t}if(t===0){return}var e=0,i=0,a=this._animatebles.length;for(;e<a;++e){var r=this._animatebles[e];if(r!==null){if(i>0){this._animatebles[e-i]=r;this._animatebles[e]=null}r.advanceTime(t)}else{i++}}if(i>0){a=this._animatebles.length;for(;e<a;++e){var n=this._animatebles[e];if(n!==null){this._animatebles[e-i]=n}else{i++}}this._animatebles.length-=i}};t.prototype.contains=function(t){return this._animatebles.indexOf(t)>=0};t.prototype.add=function(t){if(this._animatebles.indexOf(t)<0){this._animatebles.push(t);t.clock=this}};t.prototype.remove=function(t){var e=this._animatebles.indexOf(t);if(e>=0){this._animatebles[e]=null;t.clock=null}};t.prototype.clear=function(){for(var t=0,e=this._animatebles;t<e.length;t++){var i=e[t];if(i!==null){i.clock=null}}};Object.defineProperty(t.prototype,"clock",{get:function(){return this._clock},set:function(t){if(this._clock===t){return}if(this._clock!==null){this._clock.remove(this)}this._clock=t;if(this._clock!==null){this._clock.add(this)}},enumerable:true,configurable:true});t.clock=new t;return t}();t.WorldClock=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t._animationNames=[];t._animationStates=[];t._animations={};t._animationConfig=null;return t}i.toString=function(){return"[class dragonBones.Animation]"};i.prototype._onClear=function(){for(var t=0,e=this._animationStates;t<e.length;t++){var i=e[t];i.returnToPool()}for(var a in this._animations){delete this._animations[a]}if(this._animationConfig!==null){this._animationConfig.returnToPool()}this.timeScale=1;this._animationDirty=false;this._timelineDirty=false;this._animationNames.length=0;this._animationStates.length=0;this._armature=null;this._animationConfig=null;this._lastAnimationState=null};i.prototype._fadeOut=function(t){switch(t.fadeOutMode){case 1:for(var e=0,i=this._animationStates;e<i.length;e++){var a=i[e];if(a.layer===t.layer){a.fadeOut(t.fadeOutTime,t.pauseFadeOut)}}break;case 2:for(var r=0,n=this._animationStates;r<n.length;r++){var a=n[r];if(a.group===t.group){a.fadeOut(t.fadeOutTime,t.pauseFadeOut)}}break;case 3:for(var s=0,o=this._animationStates;s<o.length;s++){var a=o[s];if(a.layer===t.layer&&a.group===t.group){a.fadeOut(t.fadeOutTime,t.pauseFadeOut)}}break;case 4:for(var l=0,h=this._animationStates;l<h.length;l++){var a=h[l];a.fadeOut(t.fadeOutTime,t.pauseFadeOut)}break;case 0:case 5:default:break}};i.prototype.init=function(e){if(this._armature!==null){return}this._armature=e;this._animationConfig=t.BaseObject.borrowObject(t.AnimationConfig)};i.prototype.advanceTime=function(t){if(t<0){t=-t}if(this._armature.inheritAnimation&&this._armature._parent!==null){t*=this._armature._parent._armature.animation.timeScale}if(this.timeScale!==1){t*=this.timeScale}var e=this._animationStates.length;if(e===1){var i=this._animationStates[0];if(i._fadeState>0&&i._subFadeState>0){this._armature._dragonBones.bufferObject(i);this._animationStates.length=0;this._lastAnimationState=null}else{var a=i.animationData;var r=a.cacheFrameRate;if(this._animationDirty&&r>0){this._animationDirty=false;for(var n=0,s=this._armature.getBones();n<s.length;n++){var o=s[n];o._cachedFrameIndices=a.getBoneCachedFrameIndices(o.name)}for(var l=0,h=this._armature.getSlots();l<h.length;l++){var u=h[l];u._cachedFrameIndices=a.getSlotCachedFrameIndices(u.name)}}if(this._timelineDirty){i.updateTimelines()}i.advanceTime(t,r)}}else if(e>1){for(var f=0,_=0;f<e;++f){var i=this._animationStates[f];if(i._fadeState>0&&i._subFadeState>0){_++;this._armature._dragonBones.bufferObject(i);this._animationDirty=true;if(this._lastAnimationState===i){this._lastAnimationState=null}}else{if(_>0){this._animationStates[f-_]=i}if(this._timelineDirty){i.updateTimelines()}i.advanceTime(t,0)}if(f===e-1&&_>0){this._animationStates.length-=_;if(this._lastAnimationState===null&&this._animationStates.length>0){this._lastAnimationState=this._animationStates[this._animationStates.length-1]}}}this._armature._cacheFrameIndex=-1}else{this._armature._cacheFrameIndex=-1}this._timelineDirty=false};i.prototype.reset=function(){for(var t=0,e=this._animationStates;t<e.length;t++){var i=e[t];i.returnToPool()}this._animationDirty=false;this._timelineDirty=false;this._animationConfig.clear();this._animationStates.length=0;this._lastAnimationState=null};i.prototype.stop=function(t){if(t===void 0){t=null}if(t!==null){var e=this.getState(t);if(e!==null){e.stop()}}else{for(var i=0,a=this._animationStates;i<a.length;i++){var e=a[i];e.stop()}}};i.prototype.playConfig=function(e){var i=e.animation;if(!(i in this._animations)){console.warn("Non-existent animation.\n","DragonBones name: "+this._armature.armatureData.parent.name,"Armature name: "+this._armature.name,"Animation name: "+i);return null}var a=this._animations[i];if(e.fadeOutMode===5){for(var r=0,n=this._animationStates;r<n.length;r++){var s=n[r];if(s.animationData===a){return s}}}if(this._animationStates.length===0){e.fadeInTime=0}else if(e.fadeInTime<0){e.fadeInTime=a.fadeInTime}if(e.fadeOutTime<0){e.fadeOutTime=e.fadeInTime}if(e.timeScale<=-100){e.timeScale=1/a.scale}if(a.frameCount>1){if(e.position<0){e.position%=a.duration;e.position=a.duration-e.position}else if(e.position===a.duration){e.position-=1e-6}else if(e.position>a.duration){e.position%=a.duration}if(e.duration>0&&e.position+e.duration>a.duration){e.duration=a.duration-e.position}if(e.playTimes<0){e.playTimes=a.playTimes}}else{e.playTimes=1;e.position=0;if(e.duration>0){e.duration=0}}if(e.duration===0){e.duration=-1}this._fadeOut(e);var o=t.BaseObject.borrowObject(t.AnimationState);o.init(this._armature,a,e);this._animationDirty=true;this._armature._cacheFrameIndex=-1;if(this._animationStates.length>0){var l=false;for(var h=0,u=this._animationStates.length;h<u;++h){if(o.layer>=this._animationStates[h].layer){}else{l=true;this._animationStates.splice(h+1,0,o);break}}if(!l){this._animationStates.push(o)}}else{this._animationStates.push(o)}for(var f=0,_=this._armature.getSlots();f<_.length;f++){var m=_[f];var p=m.childArmature;if(p!==null&&p.inheritAnimation&&p.animation.hasAnimation(i)&&p.animation.getState(i)===null){p.animation.fadeIn(i)}}if(e.fadeInTime<=0){this._armature.advanceTime(0)}this._lastAnimationState=o;return o};i.prototype.play=function(t,e){if(t===void 0){t=null}if(e===void 0){e=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=e;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t!==null?t:"";if(t!==null&&t.length>0){this.playConfig(this._animationConfig)}else if(this._lastAnimationState===null){var i=this._armature.armatureData.defaultAnimation;if(i!==null){this._animationConfig.animation=i.name;this.playConfig(this._animationConfig)}}else if(!this._lastAnimationState.isPlaying&&!this._lastAnimationState.isCompleted){this._lastAnimationState.play()}else{this._animationConfig.animation=this._lastAnimationState.name;this.playConfig(this._animationConfig)}return this._lastAnimationState};i.prototype.fadeIn=function(t,e,i,a,r,n){if(e===void 0){e=-1}if(i===void 0){i=-1}if(a===void 0){a=0}if(r===void 0){r=null}if(n===void 0){n=3}this._animationConfig.clear();this._animationConfig.fadeOutMode=n;this._animationConfig.playTimes=i;this._animationConfig.layer=a;this._animationConfig.fadeInTime=e;this._animationConfig.animation=t;this._animationConfig.group=r!==null?r:"";return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByTime=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.position=e;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByFrame=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;var a=t in this._animations?this._animations[t]:null;if(a!==null){this._animationConfig.position=a.duration*e/a.frameCount}return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByProgress=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;var a=t in this._animations?this._animations[t]:null;if(a!==null){this._animationConfig.position=a.duration*(e>0?e:0)}return this.playConfig(this._animationConfig)};i.prototype.gotoAndStopByTime=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByTime(t,e,1);if(i!==null){i.stop()}return i};i.prototype.gotoAndStopByFrame=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByFrame(t,e,1);if(i!==null){i.stop()}return i};i.prototype.gotoAndStopByProgress=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByProgress(t,e,1);if(i!==null){i.stop()}return i};i.prototype.getState=function(t){var e=this._animationStates.length;while(e--){var i=this._animationStates[e];if(i.name===t){return i}}return null};i.prototype.hasAnimation=function(t){return t in this._animations};i.prototype.getStates=function(){return this._animationStates};Object.defineProperty(i.prototype,"isPlaying",{get:function(){for(var t=0,e=this._animationStates;t<e.length;t++){var i=e[t];if(i.isPlaying){return true}}return false},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"isCompleted",{get:function(){for(var t=0,e=this._animationStates;t<e.length;t++){var i=e[t];if(!i.isCompleted){return false}}return this._animationStates.length>0},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"lastAnimationName",{get:function(){return this._lastAnimationState!==null?this._lastAnimationState.name:""},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationNames",{get:function(){return this._animationNames},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations},set:function(t){if(this._animations===t){return}this._animationNames.length=0;for(var e in this._animations){delete this._animations[e]}for(var e in t){this._animations[e]=t[e];this._animationNames.push(e)}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationConfig",{get:function(){this._animationConfig.clear();return this._animationConfig},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"lastAnimationState",{get:function(){return this._lastAnimationState},enumerable:true,configurable:true});i.prototype.gotoAndPlay=function(t,e,i,a,r,n,s,o,l){if(e===void 0){e=-1}if(i===void 0){i=-1}if(a===void 0){a=-1}if(r===void 0){r=0}if(n===void 0){n=null}if(s===void 0){s=3}if(o===void 0){o=true}if(l===void 0){l=true}o;l;this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.fadeOutMode=s;this._animationConfig.playTimes=a;this._animationConfig.layer=r;this._animationConfig.fadeInTime=e;this._animationConfig.animation=t;this._animationConfig.group=n!==null?n:"";var h=this._animations[t];if(h&&i>0){this._animationConfig.timeScale=h.duration/i}return this.playConfig(this._animationConfig)};i.prototype.gotoAndStop=function(t,e){if(e===void 0){e=0}return this.gotoAndStopByTime(t,e)};Object.defineProperty(i.prototype,"animationList",{get:function(){return this._animationNames},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationDataList",{get:function(){var t=[];for(var e=0,i=this._animationNames.length;e<i;++e){t.push(this._animations[this._animationNames[e]])}return t},enumerable:true,configurable:true});return i}(t.BaseObject);t.Animation=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.current=new t.Transform;i.delta=new t.Transform;i.result=new t.Transform;return i}i.toString=function(){return"[class dragonBones.BonePose]"};i.prototype._onClear=function(){this.current.identity();this.delta.identity();this.result.identity()};return i}(t.BaseObject);t.BonePose=e;var i=function(i){__extends(a,i);function a(){var t=i!==null&&i.apply(this,arguments)||this;t._boneMask=[];t._boneTimelines=[];t._slotTimelines=[];t._bonePoses={};t._actionTimeline=null;t._zOrderTimeline=null;return t}a.toString=function(){return"[class dragonBones.AnimationState]"};a.prototype._onClear=function(){for(var t=0,e=this._boneTimelines;t<e.length;t++){var i=e[t];i.returnToPool()}for(var a=0,r=this._slotTimelines;a<r.length;a++){var i=r[a];i.returnToPool()}for(var n in this._bonePoses){this._bonePoses[n].returnToPool();delete this._bonePoses[n]}if(this._actionTimeline!==null){this._actionTimeline.returnToPool()}if(this._zOrderTimeline!==null){this._zOrderTimeline.returnToPool()}this.resetToPose=false;this.additiveBlending=false;this.displayControl=false;this.actionEnabled=false;this.layer=0;this.playTimes=1;this.timeScale=1;this.weight=1;this.autoFadeOutTime=0;this.fadeTotalTime=0;this.name="";this.group="";this.animationData=null;this._timelineDirty=true;this._playheadState=0;this._fadeState=-1;this._subFadeState=-1;this._position=0;this._duration=0;this._fadeTime=0;this._time=0;this._fadeProgress=0;this._weightResult=0;this._boneMask.length=0;this._boneTimelines.length=0;this._slotTimelines.length=0;this._armature=null;this._actionTimeline=null;this._zOrderTimeline=null};a.prototype._isDisabled=function(t){if(this.displayControl){var e=t.displayController;if(e===null||e===this.name||e===this.group){return false}}return true};a.prototype._advanceFadeTime=function(e){var i=this._fadeState>0;if(this._subFadeState<0){this._subFadeState=0;var a=i?t.EventObject.FADE_OUT:t.EventObject.FADE_IN;if(this._armature.eventDispatcher.hasEvent(a)){var r=t.BaseObject.borrowObject(t.EventObject);r.type=a;r.armature=this._armature;r.animationState=this;this._armature._dragonBones.bufferEvent(r)}}if(e<0){e=-e}this._fadeTime+=e;if(this._fadeTime>=this.fadeTotalTime){this._subFadeState=1;this._fadeProgress=i?0:1}else if(this._fadeTime>0){this._fadeProgress=i?1-this._fadeTime/this.fadeTotalTime:this._fadeTime/this.fadeTotalTime}else{this._fadeProgress=i?1:0}if(this._subFadeState>0){if(!i){this._playheadState|=1;this._fadeState=0}var a=i?t.EventObject.FADE_OUT_COMPLETE:t.EventObject.FADE_IN_COMPLETE;if(this._armature.eventDispatcher.hasEvent(a)){var r=t.BaseObject.borrowObject(t.EventObject);r.type=a;r.armature=this._armature;r.animationState=this;this._armature._dragonBones.bufferEvent(r)}}};a.prototype._blendBoneTimline=function(t){var e=t.bone;var i=t.bonePose.result;var a=e.animationPose;var r=this._weightResult>0?this._weightResult:-this._weightResult;if(!e._blendDirty){e._blendDirty=true;e._blendLayer=this.layer;e._blendLayerWeight=r;e._blendLeftWeight=1;a.x=i.x*r;a.y=i.y*r;a.rotation=i.rotation*r;a.skew=i.skew*r;a.scaleX=(i.scaleX-1)*r+1;a.scaleY=(i.scaleY-1)*r+1}else{r*=e._blendLeftWeight;e._blendLayerWeight+=r;a.x+=i.x*r;a.y+=i.y*r;a.rotation+=i.rotation*r;a.skew+=i.skew*r;a.scaleX+=(i.scaleX-1)*r;a.scaleY+=(i.scaleY-1)*r}if(this._fadeState!==0||this._subFadeState!==0){e._transformDirty=true}};a.prototype.init=function(e,i,a){if(this._armature!==null){return}this._armature=e;this.animationData=i;this.resetToPose=a.resetToPose;this.additiveBlending=a.additiveBlending;this.displayControl=a.displayControl;this.actionEnabled=a.actionEnabled;this.layer=a.layer;this.playTimes=a.playTimes;this.timeScale=a.timeScale;this.fadeTotalTime=a.fadeInTime;this.autoFadeOutTime=a.autoFadeOutTime;this.weight=a.weight;this.name=a.name.length>0?a.name:a.animation;this.group=a.group;if(a.pauseFadeIn){this._playheadState=2}else{this._playheadState=3}if(a.duration<0){this._position=0;this._duration=this.animationData.duration;if(a.position!==0){if(this.timeScale>=0){this._time=a.position}else{this._time=a.position-this._duration}}else{this._time=0}}else{this._position=a.position;this._duration=a.duration;this._time=0}if(this.timeScale<0&&this._time===0){this._time=-1e-6}if(this.fadeTotalTime<=0){this._fadeProgress=.999999}if(a.boneMask.length>0){this._boneMask.length=a.boneMask.length;for(var r=0,n=this._boneMask.length;r<n;++r){this._boneMask[r]=a.boneMask[r]}}this._actionTimeline=t.BaseObject.borrowObject(t.ActionTimelineState);this._actionTimeline.init(this._armature,this,this.animationData.actionTimeline);this._actionTimeline.currentTime=this._time;if(this._actionTimeline.currentTime<0){this._actionTimeline.currentTime=this._duration-this._actionTimeline.currentTime}if(this.animationData.zOrderTimeline!==null){this._zOrderTimeline=t.BaseObject.borrowObject(t.ZOrderTimelineState);this._zOrderTimeline.init(this._armature,this,this.animationData.zOrderTimeline)}};a.prototype.updateTimelines=function(){var i={};for(var a=0,r=this._boneTimelines;a<r.length;a++){var n=r[a];var s=n.bone.name;if(!(s in i)){i[s]=[]}i[s].push(n)}for(var o=0,l=this._armature.getBones();o<l.length;o++){var h=l[o];var s=h.name;if(!this.containsBoneMask(s)){continue}var u=this.animationData.getBoneTimelines(s);if(s in i){delete i[s]}else{var f=s in this._bonePoses?this._bonePoses[s]:this._bonePoses[s]=t.BaseObject.borrowObject(e);if(u!==null){for(var _=0,m=u;_<m.length;_++){var p=m[_];switch(p.type){case 10:var n=t.BaseObject.borrowObject(t.BoneAllTimelineState);n.bone=h;n.bonePose=f;n.init(this._armature,this,p);this._boneTimelines.push(n);break;case 11:case 12:case 13:break;case 14:case 15:case 16:case 17:case 18:case 19:break}}}else if(this.resetToPose){var n=t.BaseObject.borrowObject(t.BoneAllTimelineState);n.bone=h;n.bonePose=f;n.init(this._armature,this,null);this._boneTimelines.push(n)}}}for(var c in i){for(var d=0,y=i[c];d<y.length;d++){var n=y[d];this._boneTimelines.splice(this._boneTimelines.indexOf(n),1);n.returnToPool()}}var g={};var v=[];for(var b=0,D=this._slotTimelines;b<D.length;b++){var n=D[b];var s=n.slot.name;if(!(s in g)){g[s]=[]}g[s].push(n)}for(var T=0,A=this._armature.getSlots();T<A.length;T++){var O=A[T];var S=O.parent.name;if(!this.containsBoneMask(S)){continue}var s=O.name;var u=this.animationData.getSlotTimeline(s);if(s in g){delete g[s]}else{var x=false;var B=false;v.length=0;if(u!==null){for(var E=0,M=u;E<M.length;E++){var p=M[E];switch(p.type){case 20:{var n=t.BaseObject.borrowObject(t.SlotDislayIndexTimelineState);n.slot=O;n.init(this._armature,this,p);this._slotTimelines.push(n);x=true;break}case 21:{var n=t.BaseObject.borrowObject(t.SlotColorTimelineState);n.slot=O;n.init(this._armature,this,p);this._slotTimelines.push(n);B=true;break}case 22:{var n=t.BaseObject.borrowObject(t.SlotFFDTimelineState);n.slot=O;n.init(this._armature,this,p);this._slotTimelines.push(n);v.push(n.meshOffset);break}}}}if(this.resetToPose){if(!x){var n=t.BaseObject.borrowObject(t.SlotDislayIndexTimelineState);n.slot=O;n.init(this._armature,this,null);this._slotTimelines.push(n)}if(!B){var n=t.BaseObject.borrowObject(t.SlotColorTimelineState);n.slot=O;n.init(this._armature,this,null);this._slotTimelines.push(n)}for(var w=0,P=O._rawDisplayDatas;w<P.length;w++){var I=P[w];if(I!==null&&I.type===2&&v.indexOf(I.offset)<0){var n=t.BaseObject.borrowObject(t.SlotFFDTimelineState);n.slot=O;n.init(this._armature,this,null);this._slotTimelines.push(n)}}}}}for(var c in g){for(var F=0,C=g[c];F<C.length;F++){var n=C[F];this._slotTimelines.splice(this._slotTimelines.indexOf(n),1);n.returnToPool()}}};a.prototype.advanceTime=function(t,e){if(this._fadeState!==0||this._subFadeState!==0){this._advanceFadeTime(t)}if(this._playheadState===3){if(this.timeScale!==1){t*=this.timeScale}this._time+=t}if(this._timelineDirty){this._timelineDirty=false;this.updateTimelines()}if(this.weight===0){return}var i=this._fadeState===0&&e>0;var a=true;var r=true;var n=this._time;this._weightResult=this.weight*this._fadeProgress;this._actionTimeline.update(n);if(i){var s=e*2;this._actionTimeline.currentTime=Math.floor(this._actionTimeline.currentTime*s)/s}if(this._zOrderTimeline!==null){this._zOrderTimeline.update(n)}if(i){var o=Math.floor(this._actionTimeline.currentTime*e);if(this._armature._cacheFrameIndex===o){a=false;r=false}else{this._armature._cacheFrameIndex=o;if(this.animationData.cachedFrames[o]){r=false}else{this.animationData.cachedFrames[o]=true}}}if(a){if(r){var l=null;var h=null;for(var u=0,f=this._boneTimelines.length;u<f;++u){var _=this._boneTimelines[u];if(l!==_.bone){if(l!==null){this._blendBoneTimline(h);if(l._blendDirty){if(l._blendLeftWeight>0){if(l._blendLayer!==this.layer){if(l._blendLayerWeight>=l._blendLeftWeight){l._blendLeftWeight=0;l=null}else{l._blendLayer=this.layer;l._blendLeftWeight-=l._blendLayerWeight;l._blendLayerWeight=0}}}else{l=null}}}l=_.bone}if(l!==null){_.update(n);if(u===f-1){this._blendBoneTimline(_)}else{h=_}}}}for(var u=0,f=this._slotTimelines.length;u<f;++u){var _=this._slotTimelines[u];if(this._isDisabled(_.slot)){continue}_.update(n)}}if(this._fadeState===0){if(this._subFadeState>0){this._subFadeState=0}if(this._actionTimeline.playState>0){if(this.autoFadeOutTime>=0){this.fadeOut(this.autoFadeOutTime)}}}};a.prototype.play=function(){this._playheadState=3};a.prototype.stop=function(){this._playheadState&=1};a.prototype.fadeOut=function(t,e){if(e===void 0){e=true}if(t<0){t=0}if(e){this._playheadState&=2}if(this._fadeState>0){if(t>this.fadeTotalTime-this._fadeTime){return}}else{this._fadeState=1;this._subFadeState=-1;if(t<=0||this._fadeProgress<=0){this._fadeProgress=1e-6}for(var i=0,a=this._boneTimelines;i<a.length;i++){var r=a[i];r.fadeOut()}for(var n=0,s=this._slotTimelines;n<s.length;n++){var r=s[n];r.fadeOut()}}this.displayControl=false;this.fadeTotalTime=this._fadeProgress>1e-6?t/this._fadeProgress:0;this._fadeTime=this.fadeTotalTime*(1-this._fadeProgress)};a.prototype.containsBoneMask=function(t){return this._boneMask.length===0||this._boneMask.indexOf(t)>=0};a.prototype.addBoneMask=function(t,e){if(e===void 0){e=true}var i=this._armature.getBone(t);if(i===null){return}if(this._boneMask.indexOf(t)<0){this._boneMask.push(t)}if(e){for(var a=0,r=this._armature.getBones();a<r.length;a++){var n=r[a];if(this._boneMask.indexOf(n.name)<0&&i.contains(n)){this._boneMask.push(n.name)}}}this._timelineDirty=true};a.prototype.removeBoneMask=function(t,e){if(e===void 0){e=true}var i=this._boneMask.indexOf(t);if(i>=0){this._boneMask.splice(i,1)}if(e){var a=this._armature.getBone(t);if(a!==null){var r=this._armature.getBones();if(this._boneMask.length>0){for(var n=0,s=r;n<s.length;n++){var o=s[n];var l=this._boneMask.indexOf(o.name);if(l>=0&&a.contains(o)){this._boneMask.splice(l,1)}}}else{for(var h=0,u=r;h<u.length;h++){var o=u[h];if(o===a){continue}if(!a.contains(o)){this._boneMask.push(o.name)}}}}}this._timelineDirty=true};a.prototype.removeAllBoneMask=function(){this._boneMask.length=0;this._timelineDirty=true};Object.defineProperty(a.prototype,"isFadeIn",{get:function(){return this._fadeState<0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isFadeOut",{get:function(){return this._fadeState>0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isFadeComplete",{get:function(){return this._fadeState===0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isPlaying",{get:function(){return(this._playheadState&2)!==0&&this._actionTimeline.playState<=0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"isCompleted",{get:function(){return this._actionTimeline.playState>0},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"currentPlayTimes",{get:function(){return this._actionTimeline.currentPlayTimes},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"totalTime",{get:function(){return this._duration},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"currentTime",{get:function(){return this._actionTimeline.currentTime},set:function(t){var e=this._actionTimeline.currentPlayTimes-(this._actionTimeline.playState>0?1:0);if(t<0||this._duration<t){t=t%this._duration+e*this._duration;if(t<0){t+=this._duration}}if(this.playTimes>0&&e===this.playTimes-1&&t===this._duration){t=this._duration-1e-6}if(this._time===t){return}this._time=t;this._actionTimeline.setCurrentTime(this._time);if(this._zOrderTimeline!==null){this._zOrderTimeline.playState=-1}for(var i=0,a=this._boneTimelines;i<a.length;i++){var r=a[i];r.playState=-1}for(var n=0,s=this._slotTimelines;n<s.length;n++){var r=s[n];r.playState=-1}},enumerable:true,configurable:true});Object.defineProperty(a.prototype,"clip",{get:function(){return this.animationData},enumerable:true,configurable:true});return a}(t.BaseObject);t.AnimationState=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){this.playState=-1;this.currentPlayTimes=-1;this.currentTime=-1;this._tweenState=0;this._frameRate=0;this._frameValueOffset=0;this._frameCount=0;this._frameOffset=0;this._frameIndex=-1;this._frameRateR=0;this._position=0;this._duration=0;this._timeScale=1;this._timeOffset=0;this._dragonBonesData=null;this._animationData=null;this._timelineData=null;this._armature=null;this._animationState=null;this._actionTimeline=null;this._frameArray=null;this._frameIntArray=null;this._frameFloatArray=null;this._timelineArray=null;this._frameIndices=null};e.prototype._setCurrentTime=function(t){var e=this.playState;var i=this.currentPlayTimes;var a=this.currentTime;if(this._actionTimeline!==null&&this._frameCount<=1){this.playState=this._actionTimeline.playState>=0?1:-1;this.currentPlayTimes=1;this.currentTime=this._actionTimeline.currentTime}else if(this._actionTimeline===null||this._timeScale!==1||this._timeOffset!==0){var r=this._animationState.playTimes;var n=r*this._duration;t*=this._timeScale;if(this._timeOffset!==0){t+=this._timeOffset*this._animationData.duration}if(r>0&&(t>=n||t<=-n)){if(this.playState<=0&&this._animationState._playheadState===3){this.playState=1}this.currentPlayTimes=r;if(t<0){this.currentTime=0}else{this.currentTime=this._duration}}else{if(this.playState!==0&&this._animationState._playheadState===3){this.playState=0}if(t<0){t=-t;this.currentPlayTimes=Math.floor(t/this._duration);this.currentTime=this._duration-t%this._duration}else{this.currentPlayTimes=Math.floor(t/this._duration);this.currentTime=t%this._duration}}this.currentTime+=this._position}else{this.playState=this._actionTimeline.playState;this.currentPlayTimes=this._actionTimeline.currentPlayTimes;this.currentTime=this._actionTimeline.currentTime}if(this.currentPlayTimes===i&&this.currentTime===a){return false}if(e<0&&this.playState!==e||this.playState<=0&&this.currentPlayTimes!==i){this._frameIndex=-1}return true};e.prototype.init=function(t,e,i){this._armature=t;this._animationState=e;this._timelineData=i;this._actionTimeline=this._animationState._actionTimeline;if(this===this._actionTimeline){this._actionTimeline=null}this._frameRate=this._armature.armatureData.frameRate;this._frameRateR=1/this._frameRate;this._position=this._animationState._position;this._duration=this._animationState._duration;this._dragonBonesData=this._armature.armatureData.parent;this._animationData=this._animationState.animationData;if(this._timelineData!==null){this._frameIntArray=this._dragonBonesData.frameIntArray;this._frameFloatArray=this._dragonBonesData.frameFloatArray;this._frameArray=this._dragonBonesData.frameArray;this._timelineArray=this._dragonBonesData.timelineArray;this._frameIndices=this._dragonBonesData.frameIndices;this._frameCount=this._timelineArray[this._timelineData.offset+2];this._frameValueOffset=this._timelineArray[this._timelineData.offset+4];this._timeScale=100/this._timelineArray[this._timelineData.offset+0];this._timeOffset=this._timelineArray[this._timelineData.offset+1]*.01}};e.prototype.fadeOut=function(){};e.prototype.update=function(t){if(this.playState<=0&&this._setCurrentTime(t)){if(this._frameCount>1){var e=Math.floor(this.currentTime*this._frameRate);var i=this._frameIndices[this._timelineData.frameIndicesOffset+e];if(this._frameIndex!==i){this._frameIndex=i;this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+this._frameIndex];this._onArriveAtFrame()}}else if(this._frameIndex<0){this._frameIndex=0;if(this._timelineData!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5]}this._onArriveAtFrame()}if(this._tweenState!==0){this._onUpdateFrame()}}};return e}(t.BaseObject);t.TimelineState=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e._getEasingValue=function(t,e,i){var a=e;switch(t){case 3:a=Math.pow(e,2);break;case 4:a=1-Math.pow(1-e,2);break;case 5:a=.5*(1-Math.cos(e*Math.PI));break}return(a-e)*i+e};e._getEasingCurveValue=function(t,e,i,a){if(t<=0){return 0}else if(t>=1){return 1}var r=i+1;var n=Math.floor(t*r);var s=n===0?0:e[a+n-1];var o=n===r-1?1e4:e[a+n];return(s+(o-s)*(t*r-n))*1e-4};e.prototype._onClear=function(){t.prototype._onClear.call(this);this._tweenType=0;this._curveCount=0;this._framePosition=0;this._frameDurationR=0;this._tweenProgress=0;this._tweenEasing=0};e.prototype._onArriveAtFrame=function(){if(this._frameCount>1&&(this._frameIndex!==this._frameCount-1||this._animationState.playTimes===0||this._animationState.currentPlayTimes<this._animationState.playTimes-1)){this._tweenType=this._frameArray[this._frameOffset+1];this._tweenState=this._tweenType===0?1:2;if(this._tweenType===2){this._curveCount=this._frameArray[this._frameOffset+2]}else if(this._tweenType!==0&&this._tweenType!==1){this._tweenEasing=this._frameArray[this._frameOffset+2]*.01}this._framePosition=this._frameArray[this._frameOffset]*this._frameRateR;if(this._frameIndex===this._frameCount-1){this._frameDurationR=1/(this._animationData.duration-this._framePosition)}else{var t=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+this._frameIndex+1];this._frameDurationR=1/(this._frameArray[t]*this._frameRateR-this._framePosition)}}else{this._tweenState=1}};e.prototype._onUpdateFrame=function(){if(this._tweenState===2){this._tweenProgress=(this.currentTime-this._framePosition)*this._frameDurationR;if(this._tweenType===2){this._tweenProgress=e._getEasingCurveValue(this._tweenProgress,this._frameArray,this._curveCount,this._frameOffset+3)}else if(this._tweenType!==1){this._tweenProgress=e._getEasingValue(this._tweenType,this._tweenProgress,this._tweenEasing)}}else{this._tweenProgress=0}};return e}(e);t.TweenTimelineState=i;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.bone=null;this.bonePose=null};return e}(i);t.BoneTimelineState=a;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.slot=null};return e}(i);t.SlotTimelineState=r})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.ActionTimelineState]"};i.prototype._onCrossFrame=function(e){var i=this._armature.eventDispatcher;if(this._animationState.actionEnabled){var a=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+e];var r=this._frameArray[a+1];var n=this._armature.armatureData.actions;for(var s=0;s<r;++s){var o=this._frameArray[a+2+s];var l=n[o];if(l.type===0){if(l.slot!==null){var h=this._armature.getSlot(l.slot.name);if(h!==null){var u=h.childArmature;if(u!==null){u._bufferAction(l,true)}}}else if(l.bone!==null){for(var f=0,_=this._armature.getSlots();f<_.length;f++){var h=_[f];var u=h.childArmature;if(u!==null&&h.parent.boneData===l.bone){u._bufferAction(l,true)}}}else{this._armature._bufferAction(l,true)}}else{var m=l.type===10?t.EventObject.FRAME_EVENT:t.EventObject.SOUND_EVENT;if(l.type===11||i.hasEvent(m)){var p=t.BaseObject.borrowObject(t.EventObject);p.time=this._frameArray[a]/this._frameRate;p.type=m;p.name=l.name;p.data=l.data;p.armature=this._armature;p.animationState=this._animationState;if(l.bone!==null){p.bone=this._armature.getBone(l.bone.name)}if(l.slot!==null){p.slot=this._armature.getSlot(l.slot.name)}this._armature._dragonBones.bufferEvent(p)}}}}};i.prototype._onArriveAtFrame=function(){};i.prototype._onUpdateFrame=function(){};i.prototype.update=function(e){var i=this.playState;var a=this.currentPlayTimes;var r=this.currentTime;if(this.playState<=0&&this._setCurrentTime(e)){var n=this._armature.eventDispatcher;if(i<0){if(this.playState!==i){if(this._animationState.displayControl&&this._animationState.resetToPose){this._armature._sortZOrder(null,0)}a=this.currentPlayTimes;if(n.hasEvent(t.EventObject.START)){var s=t.BaseObject.borrowObject(t.EventObject);s.type=t.EventObject.START;s.armature=this._armature;s.animationState=this._animationState;this._armature._dragonBones.bufferEvent(s)}}else{return}}var o=this._animationState.timeScale<0;var l=null;var h=null;if(this.currentPlayTimes!==a){if(n.hasEvent(t.EventObject.LOOP_COMPLETE)){l=t.BaseObject.borrowObject(t.EventObject);l.type=t.EventObject.LOOP_COMPLETE;l.armature=this._armature;l.animationState=this._animationState}if(this.playState>0){if(n.hasEvent(t.EventObject.COMPLETE)){h=t.BaseObject.borrowObject(t.EventObject);h.type=t.EventObject.COMPLETE;h.armature=this._armature;h.animationState=this._animationState}}}if(this._frameCount>1){var u=this._timelineData;var f=Math.floor(this.currentTime*this._frameRate);var _=this._frameIndices[u.frameIndicesOffset+f];if(this._frameIndex!==_){var m=this._frameIndex;this._frameIndex=_;if(this._timelineArray!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[u.offset+5+this._frameIndex];if(o){if(m<0){var p=Math.floor(r*this._frameRate);m=this._frameIndices[u.frameIndicesOffset+p];if(this.currentPlayTimes===a){if(m===_){m=-1}}}while(m>=0){var c=this._animationData.frameOffset+this._timelineArray[u.offset+5+m];var d=this._frameArray[c]/this._frameRate;if(this._position<=d&&d<=this._position+this._duration){this._onCrossFrame(m)}if(l!==null&&m===0){this._armature._dragonBones.bufferEvent(l);l=null}if(m>0){m--}else{m=this._frameCount-1}if(m===_){break}}}else{if(m<0){var p=Math.floor(r*this._frameRate);m=this._frameIndices[u.frameIndicesOffset+p];var c=this._animationData.frameOffset+this._timelineArray[u.offset+5+m];var d=this._frameArray[c]/this._frameRate;if(this.currentPlayTimes===a){if(r<=d){if(m>0){m--}else{m=this._frameCount-1}}else if(m===_){m=-1}}}while(m>=0){if(m<this._frameCount-1){m++}else{m=0}var c=this._animationData.frameOffset+this._timelineArray[u.offset+5+m];var d=this._frameArray[c]/this._frameRate;if(this._position<=d&&d<=this._position+this._duration){this._onCrossFrame(m)}if(l!==null&&m===0){this._armature._dragonBones.bufferEvent(l);l=null}if(m===_){break}}}}}}else if(this._frameIndex<0){this._frameIndex=0;if(this._timelineData!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5];var d=this._frameArray[this._frameOffset]/this._frameRate;if(this.currentPlayTimes===a){if(r<=d){this._onCrossFrame(this._frameIndex)}}else if(this._position<=d){if(!o&&l!==null){this._armature._dragonBones.bufferEvent(l);l=null}this._onCrossFrame(this._frameIndex)}}}if(l!==null){this._armature._dragonBones.bufferEvent(l)}if(h!==null){this._armature._dragonBones.bufferEvent(h)}}};i.prototype.setCurrentTime=function(t){this._setCurrentTime(t);this._frameIndex=-1};return i}(t.TimelineState);t.ActionTimelineState=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.ZOrderTimelineState]"};e.prototype._onArriveAtFrame=function(){if(this.playState>=0){var t=this._frameArray[this._frameOffset+1];if(t>0){this._armature._sortZOrder(this._frameArray,this._frameOffset+2)}else{this._armature._sortZOrder(null,0)}}};e.prototype._onUpdateFrame=function(){};return e}(t.TimelineState);t.ZOrderTimelineState=i;var a=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.BoneAllTimelineState]"};i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var t=this._dragonBonesData.frameFloatArray;var i=this.bonePose.current;var a=this.bonePose.delta;var r=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*6;i.x=t[r++];i.y=t[r++];i.rotation=t[r++];i.skew=t[r++];i.scaleX=t[r++];i.scaleY=t[r++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){r=this._animationData.frameFloatOffset+this._frameValueOffset}a.x=t[r++]-i.x;a.y=t[r++]-i.y;a.rotation=t[r++]-i.rotation;a.skew=t[r++]-i.skew;a.scaleX=t[r++]-i.scaleX;a.scaleY=t[r++]-i.scaleY}}else{var i=this.bonePose.current;i.x=0;i.y=0;i.rotation=0;i.skew=0;i.scaleX=1;i.scaleY=1}};i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current;var i=this.bonePose.delta;var a=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}var r=this._armature.armatureData.scale;a.x=(t.x+i.x*this._tweenProgress)*r;a.y=(t.y+i.y*this._tweenProgress)*r;a.rotation=t.rotation+i.rotation*this._tweenProgress;a.skew=t.skew+i.skew*this._tweenProgress;a.scaleX=t.scaleX+i.scaleX*this._tweenProgress;a.scaleY=t.scaleY+i.scaleY*this._tweenProgress};i.prototype.fadeOut=function(){var e=this.bonePose.result;e.rotation=t.Transform.normalizeRadian(e.rotation);e.skew=t.Transform.normalizeRadian(e.skew)};return i}(t.BoneTimelineState);t.BoneAllTimelineState=a;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.SlotDislayIndexTimelineState]"};e.prototype._onArriveAtFrame=function(){if(this.playState>=0){var t=this._timelineData!==null?this._frameArray[this._frameOffset+1]:this.slot.slotData.displayIndex;if(this.slot.displayIndex!==t){this.slot._setDisplayIndex(t,true)}}};return e}(t.SlotTimelineState);t.SlotDislayIndexTimelineState=r;var n=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e._current=[0,0,0,0,0,0,0,0];e._delta=[0,0,0,0,0,0,0,0];e._result=[0,0,0,0,0,0,0,0];return e}e.toString=function(){return"[class dragonBones.SlotColorTimelineState]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this._dirty=false};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._dragonBonesData.intArray;var i=this._dragonBonesData.frameIntArray;var a=this._animationData.frameIntOffset+this._frameValueOffset+this._frameIndex*1;var r=i[a];this._current[0]=e[r++];this._current[1]=e[r++];this._current[2]=e[r++];this._current[3]=e[r++];this._current[4]=e[r++];this._current[5]=e[r++];this._current[6]=e[r++];this._current[7]=e[r++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){r=i[this._animationData.frameIntOffset+this._frameValueOffset]}else{r=i[a+1*1]}this._delta[0]=e[r++]-this._current[0];this._delta[1]=e[r++]-this._current[1];this._delta[2]=e[r++]-this._current[2];this._delta[3]=e[r++]-this._current[3];this._delta[4]=e[r++]-this._current[4];this._delta[5]=e[r++]-this._current[5];this._delta[6]=e[r++]-this._current[6];this._delta[7]=e[r++]-this._current[7]}}else{var n=this.slot.slotData.color;this._current[0]=n.alphaMultiplier*100;this._current[1]=n.redMultiplier*100;this._current[2]=n.greenMultiplier*100;this._current[3]=n.blueMultiplier*100;this._current[4]=n.alphaOffset;this._current[5]=n.redOffset;this._current[6]=n.greenOffset;this._current[7]=n.blueOffset}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);this._dirty=true;if(this._tweenState!==2){this._tweenState=0}this._result[0]=(this._current[0]+this._delta[0]*this._tweenProgress)*.01;this._result[1]=(this._current[1]+this._delta[1]*this._tweenProgress)*.01;this._result[2]=(this._current[2]+this._delta[2]*this._tweenProgress)*.01;this._result[3]=(this._current[3]+this._delta[3]*this._tweenProgress)*.01;this._result[4]=this._current[4]+this._delta[4]*this._tweenProgress;this._result[5]=this._current[5]+this._delta[5]*this._tweenProgress;this._result[6]=this._current[6]+this._delta[6]*this._tweenProgress;this._result[7]=this._current[7]+this._delta[7]*this._tweenProgress};e.prototype.fadeOut=function(){this._tweenState=0;this._dirty=false};e.prototype.update=function(e){t.prototype.update.call(this,e);if(this._tweenState!==0||this._dirty){var i=this.slot._colorTransform;if(this._animationState._fadeState!==0||this._animationState._subFadeState!==0){if(i.alphaMultiplier!==this._result[0]||i.redMultiplier!==this._result[1]||i.greenMultiplier!==this._result[2]||i.blueMultiplier!==this._result[3]||i.alphaOffset!==this._result[4]||i.redOffset!==this._result[5]||i.greenOffset!==this._result[6]||i.blueOffset!==this._result[7]){var a=Math.pow(this._animationState._fadeProgress,4);i.alphaMultiplier+=(this._result[0]-i.alphaMultiplier)*a;i.redMultiplier+=(this._result[1]-i.redMultiplier)*a;i.greenMultiplier+=(this._result[2]-i.greenMultiplier)*a;i.blueMultiplier+=(this._result[3]-i.blueMultiplier)*a;i.alphaOffset+=(this._result[4]-i.alphaOffset)*a;i.redOffset+=(this._result[5]-i.redOffset)*a;i.greenOffset+=(this._result[6]-i.greenOffset)*a;i.blueOffset+=(this._result[7]-i.blueOffset)*a;this.slot._colorDirty=true}}else if(this._dirty){this._dirty=false;if(i.alphaMultiplier!==this._result[0]||i.redMultiplier!==this._result[1]||i.greenMultiplier!==this._result[2]||i.blueMultiplier!==this._result[3]||i.alphaOffset!==this._result[4]||i.redOffset!==this._result[5]||i.greenOffset!==this._result[6]||i.blueOffset!==this._result[7]){i.alphaMultiplier=this._result[0];i.redMultiplier=this._result[1];i.greenMultiplier=this._result[2];i.blueMultiplier=this._result[3];i.alphaOffset=this._result[4];i.redOffset=this._result[5];i.greenOffset=this._result[6];i.blueOffset=this._result[7];this.slot._colorDirty=true}}}};return e}(t.SlotTimelineState);t.SlotColorTimelineState=n;var s=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e._current=[];e._delta=[];e._result=[];return e}e.toString=function(){return"[class dragonBones.SlotFFDTimelineState]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.meshOffset=0;this._dirty=false;this._frameFloatOffset=0;this._valueCount=0;this._ffdCount=0;this._valueOffset=0;this._current.length=0;this._delta.length=0;this._result.length=0};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._tweenState===2;var i=this._dragonBonesData.frameFloatArray;var a=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*this._valueCount;if(e){var r=a+this._valueCount;if(this._frameIndex===this._frameCount-1){r=this._animationData.frameFloatOffset+this._frameValueOffset}for(var n=0;n<this._valueCount;++n){this._delta[n]=i[r+n]-(this._current[n]=i[a+n])}}else{for(var n=0;n<this._valueCount;++n){this._current[n]=i[a+n]}}}else{for(var n=0;n<this._valueCount;++n){this._current[n]=0}}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);this._dirty=true;if(this._tweenState!==2){this._tweenState=0}for(var e=0;e<this._valueCount;++e){this._result[e]=this._current[e]+this._delta[e]*this._tweenProgress}};e.prototype.init=function(e,i,a){t.prototype.init.call(this,e,i,a);if(this._timelineData!==null){var r=this._dragonBonesData.frameIntArray;var n=this._animationData.frameIntOffset+this._timelineArray[this._timelineData.offset+3];this.meshOffset=r[n+0];this._ffdCount=r[n+1];this._valueCount=r[n+2];this._valueOffset=r[n+3];this._frameFloatOffset=r[n+4]+this._animationData.frameFloatOffset}else{this._valueCount=0}this._current.length=this._valueCount;this._delta.length=this._valueCount;this._result.length=this._valueCount;for(var s=0;s<this._valueCount;++s){this._delta[s]=0}};e.prototype.fadeOut=function(){this._tweenState=0;this._dirty=false};e.prototype.update=function(e){if(this.slot._meshData===null||this._timelineData!==null&&this.slot._meshData.offset!==this.meshOffset){return}t.prototype.update.call(this,e);if(this._tweenState!==0||this._dirty){var i=this.slot._ffdVertices;if(this._timelineData!==null){var a=this._dragonBonesData.frameFloatArray;if(this._animationState._fadeState!==0||this._animationState._subFadeState!==0){var r=Math.pow(this._animationState._fadeProgress,2);for(var n=0;n<this._ffdCount;++n){if(n<this._valueOffset){i[n]+=(a[this._frameFloatOffset+n]-i[n])*r}else if(n<this._valueOffset+this._valueCount){i[n]+=(this._result[n-this._valueOffset]-i[n])*r}else{i[n]+=(a[this._frameFloatOffset+n-this._valueCount]-i[n])*r}}this.slot._meshDirty=true}else if(this._dirty){this._dirty=false;for(var n=0;n<this._ffdCount;++n){if(n<this._valueOffset){i[n]=a[this._frameFloatOffset+n]}else if(n<this._valueOffset+this._valueCount){i[n]=this._result[n-this._valueOffset]}else{i[n]=a[this._frameFloatOffset+n-this._valueCount]}}this.slot._meshDirty=true}}else{this._ffdCount=i.length;if(this._animationState._fadeState!==0||this._animationState._subFadeState!==0){var r=Math.pow(this._animationState._fadeProgress,2);for(var n=0;n<this._ffdCount;++n){i[n]+=(0-i[n])*r}this.slot._meshDirty=true}else if(this._dirty){this._dirty=false;for(var n=0;n<this._ffdCount;++n){i[n]=0}this.slot._meshDirty=true}}}};return e}(t.SlotTimelineState);t.SlotFFDTimelineState=s})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.EventObject]"};e.prototype._onClear=function(){this.time=0;this.type="";this.name="";this.armature=null;this.bone=null;this.slot=null;this.animationState=null;this.data=null};e.START="start";e.LOOP_COMPLETE="loopComplete";e.COMPLETE="complete";e.FADE_IN="fadeIn";e.FADE_IN_COMPLETE="fadeInComplete";e.FADE_OUT="fadeOut";e.FADE_OUT_COMPLETE="fadeOutComplete";e.FRAME_EVENT="frameEvent";e.SOUND_EVENT="soundEvent";return e}(t.BaseObject);t.EventObject=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function e(){}e._getArmatureType=function(t){switch(t.toLowerCase()){case"stage":return 2;case"armature":return 0;case"movieclip":return 1;default:return 0}};e._getDisplayType=function(t){switch(t.toLowerCase()){case"image":return 0;case"mesh":return 2;case"armature":return 1;case"boundingbox":return 3;default:return 0}};e._getBoundingBoxType=function(t){switch(t.toLowerCase()){case"rectangle":return 0;case"ellipse":return 1;case"polygon":return 2;default:return 0}};e._getActionType=function(t){switch(t.toLowerCase()){case"play":return 0;case"frame":return 10;case"sound":return 11;default:return 0}};e._getBlendMode=function(t){switch(t.toLowerCase()){case"normal":return 0;case"add":return 1;case"alpha":return 2;case"darken":return 3;case"difference":return 4;case"erase":return 5;case"hardlight":return 6;case"invert":return 7;case"layer":return 8;case"lighten":return 9;case"multiply":return 10;case"overlay":return 11;case"screen":return 12;case"subtract":return 13;default:return 0}};e.parseDragonBonesData=function(e){if(e instanceof ArrayBuffer){return t.BinaryDataParser.getInstance().parseDragonBonesData(e)}else{return t.ObjectDataParser.getInstance().parseDragonBonesData(e)}};e.parseTextureAtlasData=function(i,a){if(a===void 0){a=1}console.warn("已废弃，请参考 @see");var r={};var n=i[e.SUB_TEXTURE];for(var s=0,o=n.length;s<o;s++){var l=n[s];var h=l[e.NAME];var u=new t.Rectangle;var f=null;u.x=l[e.X]/a;u.y=l[e.Y]/a;u.width=l[e.WIDTH]/a;u.height=l[e.HEIGHT]/a;if(e.FRAME_WIDTH in l){f=new t.Rectangle;f.x=l[e.FRAME_X]/a;f.y=l[e.FRAME_Y]/a;f.width=l[e.FRAME_WIDTH]/a;f.height=l[e.FRAME_HEIGHT]/a}r[h]={region:u,frame:f,rotated:false}}return r};e.DATA_VERSION_2_3="2.3";e.DATA_VERSION_3_0="3.0";e.DATA_VERSION_4_0="4.0";e.DATA_VERSION_4_5="4.5";e.DATA_VERSION_5_0="5.0";e.DATA_VERSION=e.DATA_VERSION_5_0;e.DATA_VERSIONS=[e.DATA_VERSION_4_0,e.DATA_VERSION_4_5,e.DATA_VERSION_5_0];e.TEXTURE_ATLAS="textureAtlas";e.SUB_TEXTURE="SubTexture";e.FORMAT="format";e.IMAGE_PATH="imagePath";e.WIDTH="width";e.HEIGHT="height";e.ROTATED="rotated";e.FRAME_X="frameX";e.FRAME_Y="frameY";e.FRAME_WIDTH="frameWidth";e.FRAME_HEIGHT="frameHeight";e.DRADON_BONES="dragonBones";e.USER_DATA="userData";e.ARMATURE="armature";e.BONE="bone";e.IK="ik";e.SLOT="slot";e.SKIN="skin";e.DISPLAY="display";e.ANIMATION="animation";e.Z_ORDER="zOrder";e.FFD="ffd";e.FRAME="frame";e.TRANSLATE_FRAME="translateFrame";e.ROTATE_FRAME="rotateFrame";e.SCALE_FRAME="scaleFrame";e.VISIBLE_FRAME="visibleFrame";e.DISPLAY_FRAME="displayFrame";e.COLOR_FRAME="colorFrame";e.DEFAULT_ACTIONS="defaultActions";e.ACTIONS="actions";e.EVENTS="events";e.INTS="ints";e.FLOATS="floats";e.STRINGS="strings";e.CANVAS="canvas";e.TRANSFORM="transform";e.PIVOT="pivot";e.AABB="aabb";e.COLOR="color";e.VERSION="version";e.COMPATIBLE_VERSION="compatibleVersion";e.FRAME_RATE="frameRate";e.TYPE="type";e.SUB_TYPE="subType";e.NAME="name";e.PARENT="parent";e.TARGET="target";e.SHARE="share";e.PATH="path";e.LENGTH="length";e.DISPLAY_INDEX="displayIndex";e.BLEND_MODE="blendMode";e.INHERIT_TRANSLATION="inheritTranslation";e.INHERIT_ROTATION="inheritRotation";e.INHERIT_SCALE="inheritScale";e.INHERIT_REFLECTION="inheritReflection";e.INHERIT_ANIMATION="inheritAnimation";e.INHERIT_FFD="inheritFFD";e.BEND_POSITIVE="bendPositive";e.CHAIN="chain";e.WEIGHT="weight";e.FADE_IN_TIME="fadeInTime";e.PLAY_TIMES="playTimes";e.SCALE="scale";e.OFFSET="offset";e.POSITION="position";e.DURATION="duration";e.TWEEN_TYPE="tweenType";e.TWEEN_EASING="tweenEasing";e.TWEEN_ROTATE="tweenRotate";e.TWEEN_SCALE="tweenScale";e.CURVE="curve";e.SOUND="sound";e.EVENT="event";e.ACTION="action";e.X="x";e.Y="y";e.SKEW_X="skX";e.SKEW_Y="skY";e.SCALE_X="scX";e.SCALE_Y="scY";e.VALUE="value";e.ROTATE="rotate";e.SKEW="skew";e.ALPHA_OFFSET="aO";e.RED_OFFSET="rO";e.GREEN_OFFSET="gO";e.BLUE_OFFSET="bO";e.ALPHA_MULTIPLIER="aM";e.RED_MULTIPLIER="rM";e.GREEN_MULTIPLIER="gM";e.BLUE_MULTIPLIER="bM";e.UVS="uvs";e.VERTICES="vertices";e.TRIANGLES="triangles";e.WEIGHTS="weights";e.SLOT_POSE="slotPose";e.BONE_POSE="bonePose";e.GOTO_AND_PLAY="gotoAndPlay";e.DEFAULT_NAME="default";return e}();t.DataParser=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(a,e);function a(){var i=e!==null&&e.apply(this,arguments)||this;i._intArrayJson=[];i._floatArrayJson=[];i._frameIntArrayJson=[];i._frameFloatArrayJson=[];i._frameArrayJson=[];i._timelineArrayJson=[];i._rawTextureAtlasIndex=0;i._rawBones=[];i._data=null;i._armature=null;i._bone=null;i._slot=null;i._skin=null;i._mesh=null;i._animation=null;i._timeline=null;i._rawTextureAtlases=null;i._defalultColorOffset=-1;i._prevTweenRotate=0;i._prevRotation=0;i._helpMatrixA=new t.Matrix;i._helpMatrixB=new t.Matrix;i._helpTransform=new t.Transform;i._helpColorTransform=new t.ColorTransform;i._helpPoint=new t.Point;i._helpArray=[];i._actionFrames=[];i._weightSlotPose={};i._weightBonePoses={};i._weightBoneIndices={};i._cacheBones={};i._meshs={};i._slotChildActions={};return i}a._getBoolean=function(t,e,i){if(e in t){var a=t[e];var r=typeof a;if(r==="boolean"){return a}else if(r==="string"){switch(a){case"0":case"NaN":case"":case"false":case"null":case"undefined":return false;default:return true}}else{return!!a}}return i};a._getNumber=function(t,e,i){if(e in t){var a=t[e];if(a===null||a==="NaN"){return i}return+a||0}return i};a._getString=function(e,i,a){if(i in e){var r=e[i];var n=typeof r;if(n==="string"){if(t.DragonBones.webAssembly){for(var s=0,o=r.length;s<o;++s){if(r.charCodeAt(s)>255){return encodeURI(r)}}}return r}return String(r)}return a};a.prototype._getCurvePoint=function(t,e,i,a,r,n,s,o,l,h){var u=1-l;var f=u*u;var _=l*l;var m=u*f;var p=3*l*f;var c=3*u*_;var d=l*_;h.x=m*t+p*i+c*r+d*s;h.y=m*e+p*a+c*n+d*o};a.prototype._samplingEasingCurve=function(t,e){var i=t.length;var a=-2;for(var r=0,n=e.length;r<n;++r){var s=(r+1)/(n+1);while((a+6<i?t[a+6]:1)<s){a+=6}var o=a>=0&&a+6<i;var l=o?t[a]:0;var h=o?t[a+1]:0;var u=t[a+2];var f=t[a+3];var _=t[a+4];var m=t[a+5];var p=o?t[a+6]:1;var c=o?t[a+7]:1;var d=0;var y=1;while(y-d>1e-4){var g=(y+d)*.5;this._getCurvePoint(l,h,u,f,_,m,p,c,g,this._helpPoint);if(s-this._helpPoint.x>0){d=g}else{y=g}}e[r]=this._helpPoint.y}};a.prototype._sortActionFrame=function(t,e){return t.frameStart>e.frameStart?1:-1};a.prototype._parseActionDataInFrame=function(t,e,i,r){if(a.EVENT in t){this._mergeActionFrame(t[a.EVENT],e,10,i,r)}if(a.SOUND in t){this._mergeActionFrame(t[a.SOUND],e,11,i,r)}if(a.ACTION in t){this._mergeActionFrame(t[a.ACTION],e,0,i,r)}if(a.EVENTS in t){this._mergeActionFrame(t[a.EVENTS],e,10,i,r)}if(a.ACTIONS in t){this._mergeActionFrame(t[a.ACTIONS],e,0,i,r)}};a.prototype._mergeActionFrame=function(e,a,r,n,s){var o=t.DragonBones.webAssembly?this._armature.actions.size():this._armature.actions.length;var l=this._parseActionData(e,this._armature.actions,r,n,s);var h=null;if(this._actionFrames.length===0){h=new i;h.frameStart=0;this._actionFrames.push(h);h=null}for(var u=0,f=this._actionFrames;u<f.length;u++){var _=f[u];if(_.frameStart===a){h=_;break}}if(h===null){h=new i;h.frameStart=a;this._actionFrames.push(h)}for(var m=0;m<l;++m){h.actions.push(o+m)}};a.prototype._parseCacheActionFrame=function(e){var i=t.DragonBones.webAssembly?this._frameArrayJson:this._data.frameArray;var a=i.length;var r=e.actions.length;i.length+=1+1+r;i[a+0]=e.frameStart;i[a+0+1]=r;for(var n=0;n<r;++n){i[a+0+2+n]=e.actions[n]}return a};a.prototype._parseArmature=function(e,i){var r=t.DragonBones.webAssembly?new Module["ArmatureData"]:t.BaseObject.borrowObject(t.ArmatureData);r.name=a._getString(e,a.NAME,"");r.frameRate=a._getNumber(e,a.FRAME_RATE,this._data.frameRate);r.scale=i;if(a.TYPE in e&&typeof e[a.TYPE]==="string"){r.type=a._getArmatureType(e[a.TYPE])}else{r.type=a._getNumber(e,a.TYPE,0)}if(r.frameRate===0){r.frameRate=24}this._armature=r;if(a.AABB in e){var n=e[a.AABB];r.aabb.x=a._getNumber(n,a.X,0);r.aabb.y=a._getNumber(n,a.Y,0);r.aabb.width=a._getNumber(n,a.WIDTH,0);r.aabb.height=a._getNumber(n,a.HEIGHT,0)}if(a.CANVAS in e){var s=e[a.CANVAS];var o=t.BaseObject.borrowObject(t.CanvasData);if(a.COLOR in s){a._getNumber(s,a.COLOR,0);o.hasBackground=true}else{o.hasBackground=false}o.color=a._getNumber(s,a.COLOR,0);o.x=a._getNumber(s,a.X,0);o.y=a._getNumber(s,a.Y,0);o.width=a._getNumber(s,a.WIDTH,0);o.height=a._getNumber(s,a.HEIGHT,0);r.canvas=o}if(a.BONE in e){var l=e[a.BONE];for(var h=0,u=l;h<u.length;h++){var f=u[h];var _=a._getString(f,a.PARENT,"");var m=this._parseBone(f);if(_.length>0){var p=r.getBone(_);if(p!==null){m.parent=p}else{(this._cacheBones[_]=this._cacheBones[_]||[]).push(m)}}if(m.name in this._cacheBones){for(var c=0,d=this._cacheBones[m.name];c<d.length;c++){var y=d[c];y.parent=m}delete this._cacheBones[m.name]}r.addBone(m);this._rawBones.push(m)}}if(a.IK in e){var g=e[a.IK];for(var v=0,b=g;v<b.length;v++){var D=b[v];this._parseIKConstraint(D)}}r.sortBones();if(a.SLOT in e){var T=e[a.SLOT];for(var A=0,O=T;A<O.length;A++){var S=O[A];r.addSlot(this._parseSlot(S))}}if(a.SKIN in e){var x=e[a.SKIN];for(var B=0,E=x;B<E.length;B++){var M=E[B];r.addSkin(this._parseSkin(M))}}if(a.ANIMATION in e){var w=e[a.ANIMATION];for(var P=0,I=w;P<I.length;P++){var F=I[P];var C=this._parseAnimation(F);r.addAnimation(C)}}if(a.DEFAULT_ACTIONS in e){this._parseActionData(e[a.DEFAULT_ACTIONS],r.defaultActions,0,null,null)}if(a.ACTIONS in e){this._parseActionData(e[a.ACTIONS],r.actions,0,null,null)}for(var N=0;N<(t.DragonBones.webAssembly?r.defaultActions.size():r.defaultActions.length);++N){var R=t.DragonBones.webAssembly?r.defaultActions.get(N):r.defaultActions[N];if(R.type===0){var C=r.getAnimation(R.name);if(C!==null){r.defaultAnimation=C}break}}this._rawBones.length=0;this._armature=null;for(var j in this._meshs){delete this._meshs[j]}for(var j in this._cacheBones){delete this._cacheBones[j]}for(var j in this._slotChildActions){delete this._slotChildActions[j]}for(var j in this._weightSlotPose){delete this._weightSlotPose[j]}for(var j in this._weightBonePoses){delete this._weightBonePoses[j]}for(var j in this._weightBoneIndices){delete this._weightBoneIndices[j]}return r};a.prototype._parseBone=function(e){var i=t.DragonBones.webAssembly?new Module["BoneData"]:t.BaseObject.borrowObject(t.BoneData);i.inheritTranslation=a._getBoolean(e,a.INHERIT_TRANSLATION,true);i.inheritRotation=a._getBoolean(e,a.INHERIT_ROTATION,true);i.inheritScale=a._getBoolean(e,a.INHERIT_SCALE,true);i.inheritReflection=a._getBoolean(e,a.INHERIT_REFLECTION,true);i.length=a._getNumber(e,a.LENGTH,0)*this._armature.scale;i.name=a._getString(e,a.NAME,"");if(a.TRANSFORM in e){this._parseTransform(e[a.TRANSFORM],i.transform,this._armature.scale)}return i};a.prototype._parseIKConstraint=function(e){var i=this._armature.getBone(a._getString(e,a.BONE in e?a.BONE:a.NAME,""));if(i===null){return}var r=this._armature.getBone(a._getString(e,a.TARGET,""));if(r===null){return}var n=t.DragonBones.webAssembly?new Module["IKConstraintData"]:t.BaseObject.borrowObject(t.IKConstraintData);n.bendPositive=a._getBoolean(e,a.BEND_POSITIVE,true);n.scaleEnabled=a._getBoolean(e,a.SCALE,false);n.weight=a._getNumber(e,a.WEIGHT,1);n.bone=i;n.target=r;var s=a._getNumber(e,a.CHAIN,0);if(s>0){n.root=i.parent}if(t.DragonBones.webAssembly){i.constraints.push_back(n)}else{i.constraints.push(n)}};a.prototype._parseSlot=function(e){var i=t.DragonBones.webAssembly?new Module["SlotData"]:t.BaseObject.borrowObject(t.SlotData);i.displayIndex=a._getNumber(e,a.DISPLAY_INDEX,0);i.zOrder=t.DragonBones.webAssembly?this._armature.sortedSlots.size():this._armature.sortedSlots.length;i.name=a._getString(e,a.NAME,"");i.parent=this._armature.getBone(a._getString(e,a.PARENT,""));if(a.BLEND_MODE in e&&typeof e[a.BLEND_MODE]==="string"){i.blendMode=a._getBlendMode(e[a.BLEND_MODE])}else{i.blendMode=a._getNumber(e,a.BLEND_MODE,0)}if(a.COLOR in e){i.color=t.DragonBones.webAssembly?Module["SlotData"].createColor():t.SlotData.createColor();this._parseColorTransform(e[a.COLOR],i.color)}else{i.color=t.DragonBones.webAssembly?Module["SlotData"].DEFAULT_COLOR:t.SlotData.DEFAULT_COLOR}if(a.ACTIONS in e){var r=this._slotChildActions[i.name]=[];this._parseActionData(e[a.ACTIONS],r,0,null,null)}return i};a.prototype._parseSkin=function(e){var i=t.DragonBones.webAssembly?new Module["SkinData"]:t.BaseObject.borrowObject(t.SkinData);i.name=a._getString(e,a.NAME,a.DEFAULT_NAME);if(i.name.length===0){i.name=a.DEFAULT_NAME}if(a.SLOT in e){this._skin=i;var r=e[a.SLOT];for(var n=0,s=r;n<s.length;n++){var o=s[n];var l=a._getString(o,a.NAME,"");var h=this._armature.getSlot(l);if(h!==null){this._slot=h;if(a.DISPLAY in o){var u=o[a.DISPLAY];for(var f=0,_=u;f<_.length;f++){var m=_[f];i.addDisplay(l,this._parseDisplay(m))}}this._slot=null}}this._skin=null}return i};a.prototype._parseDisplay=function(e){var i=null;var r=a._getString(e,a.NAME,"");var n=a._getString(e,a.PATH,"");var s=0;if(a.TYPE in e&&typeof e[a.TYPE]==="string"){s=a._getDisplayType(e[a.TYPE])}else{s=a._getNumber(e,a.TYPE,s)}switch(s){case 0:var o=i=t.DragonBones.webAssembly?new Module["ImageDisplayData"]:t.BaseObject.borrowObject(t.ImageDisplayData);o.name=r;o.path=n.length>0?n:r;this._parsePivot(e,o);break;case 1:var l=i=t.DragonBones.webAssembly?new Module["ArmatureDisplayData"]:t.BaseObject.borrowObject(t.ArmatureDisplayData);l.name=r;l.path=n.length>0?n:r;l.inheritAnimation=true;if(a.ACTIONS in e){this._parseActionData(e[a.ACTIONS],l.actions,0,null,null)}else if(this._slot.name in this._slotChildActions){var h=this._skin.getDisplays(this._slot.name);if(h===null?this._slot.displayIndex===0:this._slot.displayIndex===h.length){for(var u=0,f=this._slotChildActions[this._slot.name];u<f.length;u++){var _=f[u];if(t.DragonBones.webAssembly){l.actions.push_back(_)}else{l.actions.push(_)}}delete this._slotChildActions[this._slot.name]}}break;case 2:var m=i=t.DragonBones.webAssembly?new Module["MeshDisplayData"]:t.BaseObject.borrowObject(t.MeshDisplayData);m.name=r;m.path=n.length>0?n:r;m.inheritAnimation=a._getBoolean(e,a.INHERIT_FFD,true);this._parsePivot(e,m);var p=a._getString(e,a.SHARE,"");if(p.length>0){var c=this._meshs[p];m.offset=c.offset;m.weight=c.weight}else{this._parseMesh(e,m);this._meshs[m.name]=m}break;case 3:var d=this._parseBoundingBox(e);if(d!==null){var y=i=t.DragonBones.webAssembly?new Module["BoundingBoxDisplayData"]:t.BaseObject.borrowObject(t.BoundingBoxDisplayData);y.name=r;y.path=n.length>0?n:r;y.boundingBox=d}break}if(i!==null){i.parent=this._armature;if(a.TRANSFORM in e){this._parseTransform(e[a.TRANSFORM],i.transform,this._armature.scale)}}return i};a.prototype._parsePivot=function(t,e){if(a.PIVOT in t){var i=t[a.PIVOT];e.pivot.x=a._getNumber(i,a.X,0);e.pivot.y=a._getNumber(i,a.Y,0)}else{e.pivot.x=.5;e.pivot.y=.5}};a.prototype._parseMesh=function(e,i){var r=e[a.VERTICES];var n=e[a.UVS];var s=e[a.TRIANGLES];var o=t.DragonBones.webAssembly?this._intArrayJson:this._data.intArray;var l=t.DragonBones.webAssembly?this._floatArrayJson:this._data.floatArray;var h=Math.floor(r.length/2);var u=Math.floor(s.length/3);var f=l.length;var _=f+h*2;i.offset=o.length;o.length+=1+1+1+1+u*3;o[i.offset+0]=h;o[i.offset+1]=u;o[i.offset+2]=f;for(var m=0,p=u*3;m<p;++m){o[i.offset+4+m]=s[m]}l.length+=h*2+h*2;for(var m=0,p=h*2;m<p;++m){l[f+m]=r[m];l[_+m]=n[m]}if(a.WEIGHTS in e){var c=e[a.WEIGHTS];var d=e[a.SLOT_POSE];var y=e[a.BONE_POSE];var g=new Array;var v=Math.floor(y.length/7);var b=l.length;var D=t.DragonBones.webAssembly?new Module["WeightData"]:t.BaseObject.borrowObject(t.WeightData);D.count=(c.length-h)/2;D.offset=o.length;D.bones.length=v;g.length=v;o.length+=1+1+v+h+D.count;o[D.offset+1]=b;for(var m=0;m<v;++m){var T=y[m*7];var A=this._rawBones[T];D.bones[m]=A;g[m]=T;if(t.DragonBones.webAssembly){for(var O=0;O<this._armature.sortedBones.size();O++){if(this._armature.sortedBones.get(O)===A){o[D.offset+2+m]=O}}}else{o[D.offset+2+m]=this._armature.sortedBones.indexOf(A)}}l.length+=D.count*3;this._helpMatrixA.copyFromArray(d,0);for(var m=0,S=0,x=D.offset+2+v,B=b;m<h;++m){var E=m*2;var M=o[x++]=c[S++];var w=l[f+E];var P=l[f+E+1];this._helpMatrixA.transformPoint(w,P,this._helpPoint);w=this._helpPoint.x;P=this._helpPoint.y;for(var O=0;O<M;++O){var T=c[S++];var A=this._rawBones[T];this._helpMatrixB.copyFromArray(y,g.indexOf(T)*7+1);this._helpMatrixB.invert();this._helpMatrixB.transformPoint(w,P,this._helpPoint);o[x++]=D.bones.indexOf(A);l[B++]=c[S++];l[B++]=this._helpPoint.x;l[B++]=this._helpPoint.y}}i.weight=D;this._weightSlotPose[i.name]=d;this._weightBonePoses[i.name]=y;this._weightBoneIndices[i.name]=g}};a.prototype._parseBoundingBox=function(e){var i=null;var r=0;if(a.SUB_TYPE in e&&typeof e[a.SUB_TYPE]==="string"){r=a._getBoundingBoxType(e[a.SUB_TYPE])}else{r=a._getNumber(e,a.SUB_TYPE,r)}switch(r){case 0:i=t.DragonBones.webAssembly?new Module["RectangleBoundingBoxData"]:t.BaseObject.borrowObject(t.RectangleBoundingBoxData);break;case 1:i=t.DragonBones.webAssembly?new Module["EllipseBoundingBoxData"]:t.BaseObject.borrowObject(t.EllipseBoundingBoxData);break;case 2:i=this._parsePolygonBoundingBox(e);break}if(i!==null){i.color=a._getNumber(e,a.COLOR,0);if(i.type===0||i.type===1){i.width=a._getNumber(e,a.WIDTH,0);i.height=a._getNumber(e,a.HEIGHT,0)}}return i};a.prototype._parsePolygonBoundingBox=function(e){var i=e[a.VERTICES];var r=t.DragonBones.webAssembly?this._floatArrayJson:this._data.floatArray;var n=t.DragonBones.webAssembly?new Module["PolygonBoundingBoxData"]:t.BaseObject.borrowObject(t.PolygonBoundingBoxData);n.offset=r.length;n.count=i.length;n.vertices=r;r.length+=n.count;for(var s=0,o=n.count;s<o;s+=2){var l=s+1;var h=i[s];var u=i[l];r[n.offset+s]=h;r[n.offset+l]=u;if(s===0){n.x=h;n.y=u;n.width=h;n.height=u}else{if(h<n.x){n.x=h}else if(h>n.width){n.width=h}if(u<n.y){n.y=u}else if(u>n.height){n.height=u}}}return n};a.prototype._parseAnimation=function(e){var i=t.DragonBones.webAssembly?new Module["AnimationData"]:t.BaseObject.borrowObject(t.AnimationData);i.frameCount=Math.max(a._getNumber(e,a.DURATION,1),1);i.playTimes=a._getNumber(e,a.PLAY_TIMES,1);i.duration=i.frameCount/this._armature.frameRate;i.fadeInTime=a._getNumber(e,a.FADE_IN_TIME,0);i.scale=a._getNumber(e,a.SCALE,1);i.name=a._getString(e,a.NAME,a.DEFAULT_NAME);if(i.name.length<1){i.name=a.DEFAULT_NAME}if(t.DragonBones.webAssembly){i.frameIntOffset=this._frameIntArrayJson.length;i.frameFloatOffset=this._frameFloatArrayJson.length;i.frameOffset=this._frameArrayJson.length}else{i.frameIntOffset=this._data.frameIntArray.length;i.frameFloatOffset=this._data.frameFloatArray.length;i.frameOffset=this._data.frameArray.length}this._animation=i;if(a.FRAME in e){var r=e[a.FRAME];var n=r.length;if(n>0){for(var s=0,o=0;s<n;++s){var l=r[s];this._parseActionDataInFrame(l,o,null,null);o+=a._getNumber(l,a.DURATION,1)}}}if(a.Z_ORDER in e){this._animation.zOrderTimeline=this._parseTimeline(e[a.Z_ORDER],1,false,false,0,this._parseZOrderFrame)}if(a.BONE in e){var h=e[a.BONE];for(var u=0,f=h;u<f.length;u++){var _=f[u];this._parseBoneTimeline(_)}}if(a.SLOT in e){var h=e[a.SLOT];for(var m=0,p=h;m<p.length;m++){var _=p[m];this._parseSlotTimeline(_)}}if(a.FFD in e){var h=e[a.FFD];for(var c=0,d=h;c<d.length;c++){var _=d[c];var y=a._getString(_,a.SLOT,"");var g=a._getString(_,a.NAME,"");var v=this._armature.getSlot(y);if(v===null){continue}this._slot=v;this._mesh=this._meshs[g];var b=this._parseTimeline(_,22,false,true,0,this._parseSlotFFDFrame);if(b!==null){this._animation.addSlotTimeline(v,b)}this._slot=null;this._mesh=null}}if(this._actionFrames.length>0){this._actionFrames.sort(this._sortActionFrame);var D=this._animation.actionTimeline=t.DragonBones.webAssembly?new Module["TimelineData"]:t.BaseObject.borrowObject(t.TimelineData);var T=t.DragonBones.webAssembly?this._timelineArrayJson:this._data.timelineArray;var n=this._actionFrames.length;D.type=0;D.offset=T.length;T.length+=1+1+1+1+1+n;T[D.offset+0]=100;T[D.offset+1]=0;T[D.offset+2]=n;T[D.offset+3]=0;T[D.offset+4]=0;this._timeline=D;if(n===1){D.frameIndicesOffset=-1;T[D.offset+5+0]=this._parseCacheActionFrame(this._actionFrames[0])-this._animation.frameOffset}else{var A=this._animation.frameCount+1;var O=this._data.frameIndices;if(t.DragonBones.webAssembly){D.frameIndicesOffset=O.size();for(var S=0;S<A;++S){O.push_back(0)}}else{D.frameIndicesOffset=O.length;O.length+=A}for(var s=0,x=0,o=0,B=0;s<A;++s){if(o+B<=s&&x<n){var E=this._actionFrames[x];o=E.frameStart;if(x===n-1){B=this._animation.frameCount-o}else{B=this._actionFrames[x+1].frameStart-o}T[D.offset+5+x]=this._parseCacheActionFrame(E)-this._animation.frameOffset;x++}if(t.DragonBones.webAssembly){O.set(D.frameIndicesOffset+s,x-1)}else{O[D.frameIndicesOffset+s]=x-1}}}this._timeline=null;this._actionFrames.length=0}this._animation=null;return i};a.prototype._parseTimeline=function(e,i,r,n,s,o){if(!(a.FRAME in e)){return null}var l=e[a.FRAME];var h=l.length;if(h===0){return null}var u=t.DragonBones.webAssembly?this._timelineArrayJson:this._data.timelineArray;var f=t.DragonBones.webAssembly?this._frameIntArrayJson.length:this._data.frameIntArray.length;var _=t.DragonBones.webAssembly?this._frameFloatArrayJson.length:this._data.frameFloatArray.length;var m=t.DragonBones.webAssembly?new Module["TimelineData"]:t.BaseObject.borrowObject(t.TimelineData);m.type=i;m.offset=u.length;u.length+=1+1+1+1+1+h;u[m.offset+0]=Math.round(a._getNumber(e,a.SCALE,1)*100);u[m.offset+1]=Math.round(a._getNumber(e,a.OFFSET,0)*100);u[m.offset+2]=h;u[m.offset+3]=s;if(r){u[m.offset+4]=f-this._animation.frameIntOffset}else if(n){u[m.offset+4]=_-this._animation.frameFloatOffset}else{u[m.offset+4]=0}this._timeline=m;if(h===1){m.frameIndicesOffset=-1;u[m.offset+5+0]=o.call(this,l[0],0,0)-this._animation.frameOffset}else{var p=this._data.frameIndices;var c=this._animation.frameCount+1;if(t.DragonBones.webAssembly){m.frameIndicesOffset=p.size();for(var d=0;d<c;++d){p.push_back(0)}}else{m.frameIndicesOffset=p.length;p.length+=c}for(var y=0,g=0,v=0,b=0;y<c;++y){if(v+b<=y&&g<h){var D=l[g];v=y;b=a._getNumber(D,a.DURATION,1);if(g===h-1){b=this._animation.frameCount-v}u[m.offset+5+g]=o.call(this,D,v,b)-this._animation.frameOffset;g++}if(t.DragonBones.webAssembly){p.set(m.frameIndicesOffset+y,g-1)}else{p[m.frameIndicesOffset+y]=g-1}}}this._timeline=null;return m};a.prototype._parseBoneTimeline=function(t){var e=this._armature.getBone(a._getString(t,a.NAME,""));if(e===null){return}this._bone=e;this._slot=this._armature.getSlot(this._bone.name);var i=this._parseTimeline(t,10,false,true,6,this._parseBoneFrame);if(i!==null){this._animation.addBoneTimeline(e,i)}this._bone=null;this._slot=null};a.prototype._parseSlotTimeline=function(t){var e=this._armature.getSlot(a._getString(t,a.NAME,""));if(e===null){return}this._slot=e;var i=this._parseTimeline(t,20,false,false,0,this._parseSlotDisplayIndexFrame);if(i!==null){this._animation.addSlotTimeline(e,i)}var r=this._parseTimeline(t,21,true,false,1,this._parseSlotColorFrame);if(r!==null){this._animation.addSlotTimeline(e,r)}this._slot=null};a.prototype._parseFrame=function(t,e,i,a){t;i;var r=a.length;a.length+=1;a[r+0]=e;return r};a.prototype._parseTweenFrame=function(t,e,i,r){var n=this._parseFrame(t,e,i,r);if(i>0){if(a.CURVE in t){var s=i+1;this._helpArray.length=s;this._samplingEasingCurve(t[a.CURVE],this._helpArray);r.length+=1+1+this._helpArray.length;r[n+1]=2;r[n+2]=s;for(var o=0;o<s;++o){r[n+3+o]=Math.round(this._helpArray[o]*1e4)}}else{var l=-2;var h=l;if(a.TWEEN_EASING in t){h=a._getNumber(t,a.TWEEN_EASING,l)}if(h===l){r.length+=1;r[n+1]=0}else if(h===0){r.length+=1;r[n+1]=1}else if(h<0){r.length+=1+1;r[n+1]=3;r[n+2]=Math.round(-h*100)}else if(h<=1){r.length+=1+1;r[n+1]=4;r[n+2]=Math.round(h*100)}else{r.length+=1+1;r[n+1]=5;r[n+2]=Math.round(h*100-100)}}}else{r.length+=1;r[n+1]=0}return n};a.prototype._parseZOrderFrame=function(e,i,r){var n=t.DragonBones.webAssembly?this._frameArrayJson:this._data.frameArray;var s=this._parseFrame(e,i,r,n);if(a.Z_ORDER in e){var o=e[a.Z_ORDER];if(o.length>0){var l=this._armature.sortedSlots.length;var h=new Array(l-o.length/2);var u=new Array(l);for(var f=0;f<l;++f){u[f]=-1}var _=0;var m=0;for(var p=0,c=o.length;p<c;p+=2){var d=o[p];var y=o[p+1];while(_!==d){h[m++]=_++}u[_+y]=_++}while(_<l){h[m++]=_++}n.length+=1+l;n[s+1]=l;var g=l;while(g--){if(u[g]===-1){n[s+2+g]=h[--m]}else{n[s+2+g]=u[g]}}return s}}n.length+=1;n[s+1]=0;return s};a.prototype._parseBoneFrame=function(e,i,r){var n=t.DragonBones.webAssembly?this._frameFloatArrayJson:this._data.frameFloatArray;var s=t.DragonBones.webAssembly?this._frameArrayJson:this._data.frameArray;var o=this._parseTweenFrame(e,i,r,s);this._helpTransform.identity();if(a.TRANSFORM in e){this._parseTransform(e[a.TRANSFORM],this._helpTransform,1)}var l=this._helpTransform.rotation;if(i!==0){if(this._prevTweenRotate===0){l=this._prevRotation+t.Transform.normalizeRadian(l-this._prevRotation)}else{if(this._prevTweenRotate>0?l>=this._prevRotation:l<=this._prevRotation){this._prevTweenRotate=this._prevTweenRotate>0?this._prevTweenRotate-1:this._prevTweenRotate+1}l=this._prevRotation+l-this._prevRotation+t.Transform.PI_D*this._prevTweenRotate}}this._prevTweenRotate=a._getNumber(e,a.TWEEN_ROTATE,0);this._prevRotation=l;var h=n.length;n.length+=6;n[h++]=this._helpTransform.x;n[h++]=this._helpTransform.y;n[h++]=l;n[h++]=this._helpTransform.skew;n[h++]=this._helpTransform.scaleX;n[h++]=this._helpTransform.scaleY;this._parseActionDataInFrame(e,i,this._bone,this._slot);return o};a.prototype._parseSlotDisplayIndexFrame=function(e,i,r){var n=t.DragonBones.webAssembly?this._frameArrayJson:this._data.frameArray;var s=this._parseFrame(e,i,r,n);n.length+=1;n[s+1]=a._getNumber(e,a.DISPLAY_INDEX,0);this._parseActionDataInFrame(e,i,this._slot.parent,this._slot);return s};a.prototype._parseSlotColorFrame=function(e,i,r){var n=t.DragonBones.webAssembly?this._intArrayJson:this._data.intArray;var s=t.DragonBones.webAssembly?this._frameIntArrayJson:this._data.frameIntArray;var o=t.DragonBones.webAssembly?this._frameArrayJson:this._data.frameArray;var l=this._parseTweenFrame(e,i,r,o);var h=-1;if(a.COLOR in e){var u=e[a.COLOR];for(var f in u){f;this._parseColorTransform(u,this._helpColorTransform);h=n.length;n.length+=8;n[h++]=Math.round(this._helpColorTransform.alphaMultiplier*100);n[h++]=Math.round(this._helpColorTransform.redMultiplier*100);n[h++]=Math.round(this._helpColorTransform.greenMultiplier*100);n[h++]=Math.round(this._helpColorTransform.blueMultiplier*100);n[h++]=Math.round(this._helpColorTransform.alphaOffset);n[h++]=Math.round(this._helpColorTransform.redOffset);n[h++]=Math.round(this._helpColorTransform.greenOffset);n[h++]=Math.round(this._helpColorTransform.blueOffset);h-=8;break}}if(h<0){if(this._defalultColorOffset<0){this._defalultColorOffset=h=n.length;n.length+=8;n[h++]=100;n[h++]=100;n[h++]=100;n[h++]=100;n[h++]=0;n[h++]=0;n[h++]=0;n[h++]=0}h=this._defalultColorOffset}var _=s.length;s.length+=1;s[_]=h;return l};a.prototype._parseSlotFFDFrame=function(e,i,r){var n=t.DragonBones.webAssembly?this._intArrayJson:this._data.intArray;var s=t.DragonBones.webAssembly?this._frameFloatArrayJson:this._data.frameFloatArray;var o=t.DragonBones.webAssembly?this._frameArrayJson:this._data.frameArray;var l=s.length;var h=this._parseTweenFrame(e,i,r,o);var u=a.VERTICES in e?e[a.VERTICES]:null;var f=a._getNumber(e,a.OFFSET,0);var _=n[this._mesh.offset+0];var m=0;var p=0;var c=0;var d=0;if(this._mesh.weight!==null){var y=this._weightSlotPose[this._mesh.name];this._helpMatrixA.copyFromArray(y,0);s.length+=this._mesh.weight.count*2;c=this._mesh.weight.offset+2+this._mesh.weight.bones.length}else{s.length+=_*2}for(var g=0;g<_*2;g+=2){if(u===null){m=0;p=0}else{if(g<f||g-f>=u.length){m=0}else{m=u[g-f]}if(g+1<f||g+1-f>=u.length){p=0}else{p=u[g+1-f]}}if(this._mesh.weight!==null){var v=this._weightBonePoses[this._mesh.name];var b=this._weightBoneIndices[this._mesh.name];var D=n[c++];this._helpMatrixA.transformPoint(m,p,this._helpPoint,true);m=this._helpPoint.x;p=this._helpPoint.y;for(var T=0;T<D;++T){var A=n[c++];var O=this._mesh.weight.bones[A];var S=this._rawBones.indexOf(O);this._helpMatrixB.copyFromArray(v,b.indexOf(S)*7+1);this._helpMatrixB.invert();this._helpMatrixB.transformPoint(m,p,this._helpPoint,true);s[l+d++]=this._helpPoint.x;s[l+d++]=this._helpPoint.y}}else{s[l+g]=m;s[l+g+1]=p}}if(i===0){var x=t.DragonBones.webAssembly?this._frameIntArrayJson:this._data.frameIntArray;var B=t.DragonBones.webAssembly?this._timelineArrayJson:this._data.timelineArray;var E=x.length;x.length+=1+1+1+1+1;x[E+0]=this._mesh.offset;x[E+1]=s.length-l;x[E+2]=s.length-l;x[E+3]=0;x[E+4]=l;B[this._timeline.offset+3]=E-this._animation.frameIntOffset}return h};a.prototype._parseActionData=function(e,i,r,n,s){var o=0;if(typeof e==="string"){var l=t.DragonBones.webAssembly?new Module["ActionData"]:t.BaseObject.borrowObject(t.ActionData);l.type=r;l.name=e;l.bone=n;l.slot=s;t.DragonBones.webAssembly?i.push_back(l):i.push(l);o++}else if(e instanceof Array){for(var h=0,u=e;h<u.length;h++){var f=u[h];var l=t.DragonBones.webAssembly?new Module["ActionData"]:t.BaseObject.borrowObject(t.ActionData);if(a.GOTO_AND_PLAY in f){l.type=0;l.name=a._getString(f,a.GOTO_AND_PLAY,"")}else{if(a.TYPE in f&&typeof f[a.TYPE]==="string"){l.type=a._getActionType(f[a.TYPE])}else{l.type=a._getNumber(f,a.TYPE,r)}l.name=a._getString(f,a.NAME,"")}if(a.BONE in f){var _=a._getString(f,a.BONE,"");l.bone=this._armature.getBone(_)}else{l.bone=n}if(a.SLOT in f){var m=a._getString(f,a.SLOT,"");l.slot=this._armature.getSlot(m)}else{l.slot=s}if(a.INTS in f){if(l.data===null){l.data=t.DragonBones.webAssembly?new Module["UserData"]:t.BaseObject.borrowObject(t.UserData)}var p=f[a.INTS];for(var c=0,d=p;c<d.length;c++){var y=d[c];t.DragonBones.webAssembly?l.data.ints.push_back(y):l.data.ints.push(y)}}if(a.FLOATS in f){if(l.data===null){l.data=t.DragonBones.webAssembly?new Module["UserData"]:t.BaseObject.borrowObject(t.UserData)}var g=f[a.FLOATS];for(var v=0,b=g;v<b.length;v++){var y=b[v];t.DragonBones.webAssembly?l.data.floats.push_back(y):l.data.floats.push(y)}}if(a.STRINGS in f){if(l.data===null){l.data=t.DragonBones.webAssembly?new Module["UserData"]:t.BaseObject.borrowObject(t.UserData)}var D=f[a.STRINGS];for(var T=0,A=D;T<A.length;T++){var y=A[T];t.DragonBones.webAssembly?l.data.strings.push_back(y):l.data.strings.push(y)}}t.DragonBones.webAssembly?i.push_back(l):i.push(l);o++}}return o};a.prototype._parseTransform=function(e,i,r){i.x=a._getNumber(e,a.X,0)*r;i.y=a._getNumber(e,a.Y,0)*r;if(a.ROTATE in e||a.SKEW in e){i.rotation=t.Transform.normalizeRadian(a._getNumber(e,a.ROTATE,0)*t.Transform.DEG_RAD);i.skew=t.Transform.normalizeRadian(a._getNumber(e,a.SKEW,0)*t.Transform.DEG_RAD)}else if(a.SKEW_X in e||a.SKEW_Y in e){i.rotation=t.Transform.normalizeRadian(a._getNumber(e,a.SKEW_Y,0)*t.Transform.DEG_RAD);i.skew=t.Transform.normalizeRadian(a._getNumber(e,a.SKEW_X,0)*t.Transform.DEG_RAD)-i.rotation}i.scaleX=a._getNumber(e,a.SCALE_X,1);i.scaleY=a._getNumber(e,a.SCALE_Y,1)};a.prototype._parseColorTransform=function(t,e){e.alphaMultiplier=a._getNumber(t,a.ALPHA_MULTIPLIER,100)*.01;e.redMultiplier=a._getNumber(t,a.RED_MULTIPLIER,100)*.01;e.greenMultiplier=a._getNumber(t,a.GREEN_MULTIPLIER,100)*.01;e.blueMultiplier=a._getNumber(t,a.BLUE_MULTIPLIER,100)*.01;e.alphaOffset=a._getNumber(t,a.ALPHA_OFFSET,0);e.redOffset=a._getNumber(t,a.RED_OFFSET,0);e.greenOffset=a._getNumber(t,a.GREEN_OFFSET,0);e.blueOffset=a._getNumber(t,a.BLUE_OFFSET,0)};a.prototype._parseArray=function(e){e;if(t.DragonBones.webAssembly){return}this._data.intArray=[];this._data.floatArray=[];this._data.frameIntArray=[];this._data.frameFloatArray=[];this._data.frameArray=[];this._data.timelineArray=[]};a.prototype._parseWASMArray=function(){var t=Module._malloc(this._intArrayJson.length*2);this._intArrayBuffer=new Int16Array(Module.HEAP16.buffer,t,this._intArrayJson.length);for(var e=0;e<this._intArrayJson.length;++e){this._intArrayBuffer[e]=this._intArrayJson[e]}var i=Module._malloc(this._floatArrayJson.length*4);this._floatArrayBuffer=new Float32Array(Module.HEAPF32.buffer,i,this._floatArrayJson.length);for(var a=0;a<this._floatArrayJson.length;++a){this._floatArrayBuffer[a]=this._floatArrayJson[a]}var r=Module._malloc(this._frameIntArrayJson.length*2);this._frameIntArrayBuffer=new Int16Array(Module.HEAP16.buffer,r,this._frameIntArrayJson.length);for(var n=0;n<this._frameIntArrayJson.length;++n){this._frameIntArrayBuffer[n]=this._frameIntArrayJson[n]}var s=Module._malloc(this._frameFloatArrayJson.length*4);this._frameFloatArrayBuffer=new Float32Array(Module.HEAPF32.buffer,s,this._frameFloatArrayJson.length);for(var o=0;o<this._frameFloatArrayJson.length;++o){this._frameFloatArrayBuffer[o]=this._frameFloatArrayJson[o]}var l=Module._malloc(this._frameArrayJson.length*2);this._frameArrayBuffer=new Int16Array(Module.HEAP16.buffer,l,this._frameArrayJson.length);for(var h=0;h<this._frameArrayJson.length;++h){this._frameArrayBuffer[h]=this._frameArrayJson[h]}var u=Module._malloc(this._timelineArrayJson.length*2);this._timelineArrayBuffer=new Uint16Array(Module.HEAPU16.buffer,u,this._timelineArrayJson.length);for(var f=0;f<this._timelineArrayJson.length;++f){this._timelineArrayBuffer[f]=this._timelineArrayJson[f]}Module["DragonBonesData"].setDragonBoneData(this._data);Module.ccall("set_dbData_buffer_ptr","number",["number","number","number","number","number","number"],[t,i,r,s,l,u])};a.prototype.parseDragonBonesData=function(e,i){if(i===void 0){i=1}console.assert(e!==null&&e!==undefined);var r=a._getString(e,a.VERSION,"");var n=a._getString(e,a.COMPATIBLE_VERSION,"");if(a.DATA_VERSIONS.indexOf(r)>=0||a.DATA_VERSIONS.indexOf(n)>=0){var s=t.DragonBones.webAssembly?new Module["DragonBonesData"]:t.BaseObject.borrowObject(t.DragonBonesData);s.version=r;s.name=a._getString(e,a.NAME,"");s.frameRate=a._getNumber(e,a.FRAME_RATE,24);if(s.frameRate===0){s.frameRate=24}if(a.ARMATURE in e){this._defalultColorOffset=-1;this._data=s;this._parseArray(e);var o=e[a.ARMATURE];for(var l=0,h=o;l<h.length;l++){var u=h[l];s.addArmature(this._parseArmature(u,i))}if(this._intArrayJson.length>0){this._parseWASMArray()}this._data=null}this._rawTextureAtlasIndex=0;if(a.TEXTURE_ATLAS in e){this._rawTextureAtlases=e[a.TEXTURE_ATLAS]}else{this._rawTextureAtlases=null}return s}else{console.assert(false,"Nonsupport data version.")}return null};a.prototype.parseTextureAtlasData=function(e,i,r){if(r===void 0){r=0}console.assert(e!==undefined);if(e===null){if(this._rawTextureAtlases===null){return false}var n=this._rawTextureAtlases[this._rawTextureAtlasIndex++];this.parseTextureAtlasData(n,i,r);if(this._rawTextureAtlasIndex>=this._rawTextureAtlases.length){this._rawTextureAtlasIndex=0;this._rawTextureAtlases=null}return true}i.width=a._getNumber(e,a.WIDTH,0);i.height=a._getNumber(e,a.HEIGHT,0);i.name=a._getString(e,a.NAME,"");i.imagePath=a._getString(e,a.IMAGE_PATH,"");if(r>0){i.scale=r}else{r=i.scale=a._getNumber(e,a.SCALE,i.scale)}r=1/r;if(a.SUB_TEXTURE in e){var s=e[a.SUB_TEXTURE];for(var o=0,l=s.length;o<l;++o){var h=s[o];var u=i.createTexture();u.rotated=a._getBoolean(h,a.ROTATED,false);u.name=a._getString(h,a.NAME,"");u.region.x=a._getNumber(h,a.X,0)*r;u.region.y=a._getNumber(h,a.Y,0)*r;u.region.width=a._getNumber(h,a.WIDTH,0)*r;u.region.height=a._getNumber(h,a.HEIGHT,0)*r;var f=a._getNumber(h,a.FRAME_WIDTH,-1);var _=a._getNumber(h,a.FRAME_HEIGHT,-1);if(f>0&&_>0){u.frame=t.DragonBones.webAssembly?Module["TextureData"].createRectangle():t.TextureData.createRectangle();u.frame.x=a._getNumber(h,a.FRAME_X,0)*r;u.frame.y=a._getNumber(h,a.FRAME_Y,0)*r;u.frame.width=f*r;u.frame.height=_*r}i.addTexture(u)}}return true};a.getInstance=function(){if(a._objectDataParserInstance===null){a._objectDataParserInstance=new a}return a._objectDataParserInstance};a._objectDataParserInstance=null;return a}(t.DataParser);t.ObjectDataParser=e;var i=function(){function t(){this.frameStart=0;this.actions=[]}return t}()})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.prototype._inRange=function(t,e,i){return e<=t&&t<=i};i.prototype._decodeUTF8=function(t){var e=-1;var i=-1;var a=65533;var r=0;var n="";var s;var o=0;var l=0;var h=0;var u=0;while(t.length>r){var f=t[r++];if(f===e){if(l!==0){s=a}else{s=i}}else{if(l===0){if(this._inRange(f,0,127)){s=f}else{if(this._inRange(f,194,223)){l=1;u=128;o=f-192}else if(this._inRange(f,224,239)){l=2;u=2048;o=f-224}else if(this._inRange(f,240,244)){l=3;u=65536;o=f-240}else{}o=o*Math.pow(64,l);s=null}}else if(!this._inRange(f,128,191)){o=0;l=0;h=0;u=0;r--;s=f}else{h+=1;o=o+(f-128)*Math.pow(64,l-h);if(h!==l){s=null}else{var _=o;var m=u;o=0;l=0;h=0;u=0;if(this._inRange(_,m,1114111)&&!this._inRange(_,55296,57343)){s=_}else{s=f}}}}if(s!==null&&s!==i){if(s<=65535){if(s>0)n+=String.fromCharCode(s)}else{s-=65536;n+=String.fromCharCode(55296+(s>>10&1023));n+=String.fromCharCode(56320+(s&1023))}}}return n};i.prototype._getUTF16Key=function(t){for(var e=0,i=t.length;e<i;++e){if(t.charCodeAt(e)>255){return encodeURI(t)}}return t};i.prototype._parseBinaryTimeline=function(e,i,a){if(a===void 0){a=null}var r=a!==null?a:t.DragonBones.webAssembly?new Module["TimelineData"]:t.BaseObject.borrowObject(t.TimelineData);r.type=e;r.offset=i;this._timeline=r;var n=this._timelineArray[r.offset+2];if(n===1){r.frameIndicesOffset=-1}else{var s=this._animation.frameCount+1;var o=this._data.frameIndices;if(t.DragonBones.webAssembly){r.frameIndicesOffset=o.size();for(var l=0;l<s;++l){o.push_back(0)}}else{r.frameIndicesOffset=o.length;o.length+=s}for(var h=0,u=0,f=0,_=0;h<s;++h){if(f+_<=h&&u<n){f=this._frameArray[this._animation.frameOffset+this._timelineArray[r.offset+5+u]];if(u===n-1){_=this._animation.frameCount-f}else{_=this._frameArray[this._animation.frameOffset+this._timelineArray[r.offset+5+u+1]]-f}u++}if(t.DragonBones.webAssembly){o.set(r.frameIndicesOffset+h,u-1)}else{o[r.frameIndicesOffset+h]=u-1}}}this._timeline=null;return r};i.prototype._parseMesh=function(e,i){i.offset=e[t.ObjectDataParser.OFFSET];var a=this._intArray[i.offset+3];if(a>=0){var r=t.DragonBones.webAssembly?new Module["WeightData"]:t.BaseObject.borrowObject(t.WeightData);var n=this._intArray[i.offset+0];var s=this._intArray[a+0];r.offset=a;if(t.DragonBones.webAssembly){r.bones.resize(s,null);for(var o=0;o<s;++o){var l=this._intArray[a+2+o];r.bones.set(o,this._rawBones[l])}}else{r.bones.length=s;for(var o=0;o<s;++o){var l=this._intArray[a+2+o];r.bones[o]=this._rawBones[l]}}var h=a+2+s;for(var o=0,u=n;o<u;++o){var f=this._intArray[h++];r.count+=f;h+=f}i.weight=r}};i.prototype._parsePolygonBoundingBox=function(e){var i=t.DragonBones.webAssembly?new Module["PolygonBoundingBoxData"]:t.BaseObject.borrowObject(t.PolygonBoundingBoxData);i.offset=e[t.ObjectDataParser.OFFSET];i.vertices=this._floatArray;return i};i.prototype._parseAnimation=function(e){var i=t.DragonBones.webAssembly?new Module["AnimationData"]:t.BaseObject.borrowObject(t.AnimationData);i.frameCount=Math.max(t.ObjectDataParser._getNumber(e,t.ObjectDataParser.DURATION,1),1);i.playTimes=t.ObjectDataParser._getNumber(e,t.ObjectDataParser.PLAY_TIMES,1);i.duration=i.frameCount/this._armature.frameRate;i.fadeInTime=t.ObjectDataParser._getNumber(e,t.ObjectDataParser.FADE_IN_TIME,0);i.scale=t.ObjectDataParser._getNumber(e,t.ObjectDataParser.SCALE,1);i.name=t.ObjectDataParser._getString(e,t.ObjectDataParser.NAME,t.ObjectDataParser.DEFAULT_NAME);if(i.name.length===0){i.name=t.ObjectDataParser.DEFAULT_NAME}var a=e[t.ObjectDataParser.OFFSET];i.frameIntOffset=a[0];i.frameFloatOffset=a[1];i.frameOffset=a[2];this._animation=i;if(t.ObjectDataParser.ACTION in e){i.actionTimeline=this._parseBinaryTimeline(0,e[t.ObjectDataParser.ACTION])}if(t.ObjectDataParser.Z_ORDER in e){i.zOrderTimeline=this._parseBinaryTimeline(1,e[t.ObjectDataParser.Z_ORDER])}if(t.ObjectDataParser.BONE in e){var r=e[t.ObjectDataParser.BONE];for(var n in r){var s=r[n];if(t.DragonBones.webAssembly){n=this._getUTF16Key(n)}var o=this._armature.getBone(n);if(o===null){continue}for(var l=0,h=s.length;l<h;l+=2){var u=s[l];var f=s[l+1];var _=this._parseBinaryTimeline(u,f);this._animation.addBoneTimeline(o,_)}}}if(t.ObjectDataParser.SLOT in e){var r=e[t.ObjectDataParser.SLOT];for(var n in r){var s=r[n];if(t.DragonBones.webAssembly){n=this._getUTF16Key(n)}var m=this._armature.getSlot(n);if(m===null){continue}for(var l=0,h=s.length;l<h;l+=2){var u=s[l];var f=s[l+1];var _=this._parseBinaryTimeline(u,f);this._animation.addSlotTimeline(m,_)}}}this._animation=null;return i};i.prototype._parseArray=function(e){var i=e[t.ObjectDataParser.OFFSET];if(t.DragonBones.webAssembly){var a=new Int16Array(this._binary,this._binaryOffset+i[0],i[1]/Int16Array.BYTES_PER_ELEMENT);var r=new Float32Array(this._binary,this._binaryOffset+i[2],i[3]/Float32Array.BYTES_PER_ELEMENT);var n=new Int16Array(this._binary,this._binaryOffset+i[4],i[5]/Int16Array.BYTES_PER_ELEMENT);var s=new Float32Array(this._binary,this._binaryOffset+i[6],i[7]/Float32Array.BYTES_PER_ELEMENT);var o=new Int16Array(this._binary,this._binaryOffset+i[8],i[9]/Int16Array.BYTES_PER_ELEMENT);var l=new Uint16Array(this._binary,this._binaryOffset+i[10],i[11]/Uint16Array.BYTES_PER_ELEMENT);var h=Module._malloc(a.length*a.BYTES_PER_ELEMENT);var u=Module._malloc(r.length*r.BYTES_PER_ELEMENT);var f=Module._malloc(n.length*n.BYTES_PER_ELEMENT);var _=Module._malloc(s.length*s.BYTES_PER_ELEMENT);var m=Module._malloc(o.length*o.BYTES_PER_ELEMENT);var p=Module._malloc(l.length*l.BYTES_PER_ELEMENT);this._intArray=new Int16Array(Module.HEAP16.buffer,h,a.length);this._floatArray=new Float32Array(Module.HEAPF32.buffer,u,r.length);this._frameIntArray=new Int16Array(Module.HEAP16.buffer,f,n.length);this._frameFloatArray=new Float32Array(Module.HEAPF32.buffer,_,s.length);this._frameArray=new Int16Array(Module.HEAP16.buffer,m,o.length);this._timelineArray=new Uint16Array(Module.HEAPU16.buffer,p,l.length);for(var c=0;c<a.length;++c){this._intArray[c]=a[c]}for(var d=0;d<r.length;++d){this._floatArray[d]=r[d]}for(var y=0;y<n.length;++y){this._frameIntArray[y]=n[y]}for(var g=0;g<s.length;++g){this._frameFloatArray[g]=s[g]}for(var v=0;v<o.length;++v){this._frameArray[v]=o[v]}for(var b=0;b<l.length;++b){this._timelineArray[b]=l[b]}Module["DragonBonesData"].setDragonBoneData(this._data);Module.ccall("set_dbData_buffer_ptr","number",["number","number","number","number","number","number"],[h,u,f,_,m,p])}else{this._data.intArray=this._intArray=new Int16Array(this._binary,this._binaryOffset+i[0],i[1]/Int16Array.BYTES_PER_ELEMENT);this._data.floatArray=this._floatArray=new Float32Array(this._binary,this._binaryOffset+i[2],i[3]/Float32Array.BYTES_PER_ELEMENT);this._data.frameIntArray=this._frameIntArray=new Int16Array(this._binary,this._binaryOffset+i[4],i[5]/Int16Array.BYTES_PER_ELEMENT);this._data.frameFloatArray=this._frameFloatArray=new Float32Array(this._binary,this._binaryOffset+i[6],i[7]/Float32Array.BYTES_PER_ELEMENT);this._data.frameArray=this._frameArray=new Int16Array(this._binary,this._binaryOffset+i[8],i[9]/Int16Array.BYTES_PER_ELEMENT);this._data.timelineArray=this._timelineArray=new Uint16Array(this._binary,this._binaryOffset+i[10],i[11]/Uint16Array.BYTES_PER_ELEMENT)}};i.prototype.parseDragonBonesData=function(t,i){if(i===void 0){i=1}console.assert(t!==null&&t!==undefined&&t instanceof ArrayBuffer);var a=new Uint8Array(t,0,8);if(a[0]!=="D".charCodeAt(0)||a[1]!=="B".charCodeAt(0)||a[2]!=="D".charCodeAt(0)||a[3]!=="T".charCodeAt(0)){console.assert(false,"Nonsupport data.");return null}var r=new Uint32Array(t,8,1)[0];var n=new Uint8Array(t,8+4,r);var s=this._decodeUTF8(n);var o=JSON.parse(s);this._binary=t;this._binaryOffset=8+4+r;return e.prototype.parseDragonBonesData.call(this,o,i)};i.getInstance=function(){if(i._binaryDataParserInstance===null){i._binaryDataParserInstance=new i}return i._binaryDataParserInstance};i._binaryDataParserInstance=null;return i}(t.ObjectDataParser);t.BinaryDataParser=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(){this.dataName="";this.textureAtlasName="";this.skin=null}return t}();t.BuildArmaturePackage=e;var i=function(){function i(e){if(e===void 0){e=null}this.autoSearch=false;this._dragonBonesDataMap={};this._textureAtlasDataMap={};this._dragonBones=null;this._dataParser=null;if(i._objectParser===null){i._objectParser=new t.ObjectDataParser}if(i._binaryParser===null){i._binaryParser=new t.BinaryDataParser}this._dataParser=e!==null?e:i._objectParser}i.prototype._isSupportMesh=function(){return true};i.prototype._getTextureData=function(t,e){if(t in this._textureAtlasDataMap){for(var i=0,a=this._textureAtlasDataMap[t];i<a.length;i++){var r=a[i];var n=r.getTexture(e);if(n!==null){return n}}}if(this.autoSearch){for(var s in this._textureAtlasDataMap){for(var o=0,l=this._textureAtlasDataMap[s];o<l.length;o++){var r=l[o];if(r.autoSearch){var n=r.getTexture(e);if(n!==null){return n}}}}}return null};i.prototype._fillBuildArmaturePackage=function(t,e,i,a,r){var n=null;var s=null;if(e.length>0){if(e in this._dragonBonesDataMap){n=this._dragonBonesDataMap[e];s=n.getArmature(i)}}if(s===null&&(e.length===0||this.autoSearch)){for(var o in this._dragonBonesDataMap){n=this._dragonBonesDataMap[o];if(e.length===0||n.autoSearch){s=n.getArmature(i);if(s!==null){e=o;break}}}}if(s!==null){t.dataName=e;t.textureAtlasName=r;t.data=n;t.armature=s;t.skin=null;if(a.length>0){t.skin=s.getSkin(a);if(t.skin===null&&this.autoSearch){for(var o in this._dragonBonesDataMap){var l=this._dragonBonesDataMap[o];var h=l.getArmature(a);if(h!==null){t.skin=h.defaultSkin;break}}}}if(t.skin===null){t.skin=s.defaultSkin}return true}return false};i.prototype._buildBones=function(e,i){var a=e.armature.sortedBones;for(var r=0;r<(t.DragonBones.webAssembly?a.size():a.length);++r){var n=t.DragonBones.webAssembly?a.get(r):a[r];var s=t.DragonBones.webAssembly?new Module["Bone"]:t.BaseObject.borrowObject(t.Bone);s.init(n);if(n.parent!==null){i.addBone(s,n.parent.name)}else{i.addBone(s)}var o=n.constraints;for(var l=0;l<(t.DragonBones.webAssembly?o.size():o.length);++l){var h=t.DragonBones.webAssembly?o.get(l):o[l];var u=i.getBone(h.target.name);if(u===null){continue}var f=h;var _=t.DragonBones.webAssembly?new Module["IKConstraint"]:t.BaseObject.borrowObject(t.IKConstraint);var m=f.root!==null?i.getBone(f.root.name):null;_.target=u;_.bone=s;_.root=m;_.bendPositive=f.bendPositive;_.scaleEnabled=f.scaleEnabled;_.weight=f.weight;if(m!==null){m.addConstraint(_)}else{s.addConstraint(_)}}}};i.prototype._buildSlots=function(t,e){var i=t.skin;var a=t.armature.defaultSkin;if(i===null||a===null){return}var r={};for(var n in a.displays){var s=a.displays[n];r[n]=s}if(i!==a){for(var n in i.displays){var s=i.displays[n];r[n]=s}}for(var o=0,l=t.armature.sortedSlots;o<l.length;o++){var h=l[o];if(!(h.name in r)){continue}var s=r[h.name];var u=this._buildSlot(t,h,s,e);var f=new Array;for(var _=0,m=s;_<m.length;_++){var p=m[_];if(p!==null){f.push(this._getSlotDisplay(t,p,null,u))}else{f.push(null)}}e.addSlot(u,h.parent.name);u._setDisplayList(f);u._setDisplayIndex(h.displayIndex,true)}};i.prototype._getSlotDisplay=function(t,e,i,a){var r=t!==null?t.dataName:e.parent.parent.name;var n=null;switch(e.type){case 0:var s=e;if(s.texture===null){s.texture=this._getTextureData(r,e.path)}else if(t!==null&&t.textureAtlasName.length>0){s.texture=this._getTextureData(t.textureAtlasName,e.path)}if(i!==null&&i.type===2&&this._isSupportMesh()){n=a.meshDisplay}else{n=a.rawDisplay}break;case 2:var o=e;if(o.texture===null){o.texture=this._getTextureData(r,o.path)}else if(t!==null&&t.textureAtlasName.length>0){o.texture=this._getTextureData(t.textureAtlasName,o.path)}if(this._isSupportMesh()){n=a.meshDisplay}else{n=a.rawDisplay}break;case 1:var l=e;var h=this.buildArmature(l.path,r,null,t!==null?t.textureAtlasName:null);if(h!==null){h.inheritAnimation=l.inheritAnimation;if(!h.inheritAnimation){var u=l.actions.length>0?l.actions:h.armatureData.defaultActions;if(u.length>0){for(var f=0,_=u;f<_.length;f++){var m=_[f];h._bufferAction(m,true)}}else{h.animation.play()}}l.armature=h.armatureData}n=h;break}return n};i.prototype._replaceSlotDisplay=function(t,e,i,a){if(a<0){a=i.displayIndex}if(a<0){a=0}var r=i.displayList;if(r.length<=a){r.length=a+1;for(var n=0,s=r.length;n<s;++n){if(!r[n]){r[n]=null}}}if(i._displayDatas.length<=a){i._displayDatas.length=a+1;for(var n=0,s=i._displayDatas.length;n<s;++n){if(!i._displayDatas[n]){i._displayDatas[n]=null}}}i._displayDatas[a]=e;if(e!==null){r[a]=this._getSlotDisplay(t,e,a<i._rawDisplayDatas.length?i._rawDisplayDatas[a]:null,i)}else{r[a]=null}i.displayList=r};i.prototype.parseDragonBonesData=function(t,e,a){if(e===void 0){e=null}if(a===void 0){a=1}var r=null;if(t instanceof ArrayBuffer){r=i._binaryParser.parseDragonBonesData(t,a)}else{r=this._dataParser.parseDragonBonesData(t,a)}while(true){var n=this._buildTextureAtlasData(null,null);if(this._dataParser.parseTextureAtlasData(null,n,a)){this.addTextureAtlasData(n,e)}else{n.returnToPool();break}}if(r!==null){this.addDragonBonesData(r,e)}return r};i.prototype.parseTextureAtlasData=function(t,e,i,a){if(i===void 0){i=null}if(a===void 0){a=0}var r=this._buildTextureAtlasData(null,null);this._dataParser.parseTextureAtlasData(t,r,a);this._buildTextureAtlasData(r,e||null);this.addTextureAtlasData(r,i);return r};i.prototype.updateTextureAtlasData=function(t,e){var i=this.getTextureAtlasData(t);if(i!==null){for(var a=0,r=i.length;a<r;++a){if(a<e.length){this._buildTextureAtlasData(i[a],e[a])}}}};i.prototype.getDragonBonesData=function(t){return t in this._dragonBonesDataMap?this._dragonBonesDataMap[t]:null};i.prototype.addDragonBonesData=function(t,e){if(e===void 0){e=null}e=e!==null?e:t.name;if(e in this._dragonBonesDataMap){if(this._dragonBonesDataMap[e]===t){return}console.warn("Replace data: "+e);this._dragonBonesDataMap[e].returnToPool()}this._dragonBonesDataMap[e]=t};i.prototype.removeDragonBonesData=function(t,e){if(e===void 0){e=true}if(t in this._dragonBonesDataMap){if(e){this._dragonBones.bufferObject(this._dragonBonesDataMap[t])}delete this._dragonBonesDataMap[t]}};i.prototype.getTextureAtlasData=function(t){return t in this._textureAtlasDataMap?this._textureAtlasDataMap[t]:null};i.prototype.addTextureAtlasData=function(t,e){if(e===void 0){e=null}e=e!==null?e:t.name;var i=e in this._textureAtlasDataMap?this._textureAtlasDataMap[e]:this._textureAtlasDataMap[e]=[];if(i.indexOf(t)<0){i.push(t)}};i.prototype.removeTextureAtlasData=function(t,e){if(e===void 0){e=true}if(t in this._textureAtlasDataMap){var i=this._textureAtlasDataMap[t];if(e){for(var a=0,r=i;a<r.length;a++){var n=r[a];this._dragonBones.bufferObject(n)}}delete this._textureAtlasDataMap[t]}};i.prototype.getArmatureData=function(t,i){if(i===void 0){i=""}var a=new e;if(!this._fillBuildArmaturePackage(a,i,t,"","")){return null}return a.armature};i.prototype.clear=function(t){if(t===void 0){t=true}for(var e in this._dragonBonesDataMap){if(t){this._dragonBones.bufferObject(this._dragonBonesDataMap[e])}delete this._dragonBonesDataMap[e]}for(var e in this._textureAtlasDataMap){if(t){var i=this._textureAtlasDataMap[e];for(var a=0,r=i;a<r.length;a++){var n=r[a];this._dragonBones.bufferObject(n)}}delete this._textureAtlasDataMap[e]}};i.prototype.buildArmature=function(t,i,a,r){if(i===void 0){i=null}if(a===void 0){a=null}if(r===void 0){r=null}var n=new e;if(!this._fillBuildArmaturePackage(n,i||"",t,a||"",r||"")){console.warn("No armature data. "+t+", "+(i!==null?i:""));return null}var s=this._buildArmature(n);this._buildBones(n,s);this._buildSlots(n,s);s.invalidUpdate("",true);s.advanceTime(0);return s};i.prototype.replaceSlotDisplay=function(t,e,i,a,r,n){if(n===void 0){n=-1}var s={};if(!this._fillBuildArmaturePackage(s,t||"",e,"","")||s.skin===null){return}var o=s.skin.getDisplays(i);if(o===null){return}for(var l=0,h=o;l<h.length;l++){var u=h[l];if(u!==null&&u.name===a){this._replaceSlotDisplay(s,u,r,n);break}}};i.prototype.replaceSlotDisplayList=function(t,e,i,a){var r={};if(!this._fillBuildArmaturePackage(r,t||"",e,"","")||r.skin===null){return}var n=r.skin.getDisplays(i);if(n===null){return}var s=0;for(var o=0,l=n;o<l.length;o++){var h=l[o];this._replaceSlotDisplay(r,h,a,s++)}};i.prototype.changeSkin=function(t,e,i){if(i===void 0){i=null}for(var a=0,r=t.getSlots();a<r.length;a++){var n=r[a];if(!(n.name in e.displays)||i!==null&&i.indexOf(n.name)>=0){continue}var s=e.displays[n.name];var o=n.displayList;o.length=s.length;for(var l=0,h=s.length;l<h;++l){var u=s[l];if(u!==null){o[l]=this._getSlotDisplay(null,u,null,n)}else{o[l]=null}}n._rawDisplayDatas=s;n._displayDatas.length=s.length;for(var l=0,h=n._displayDatas.length;l<h;++l){n._displayDatas[l]=s[l]}n.displayList=o}};i.prototype.copyAnimationsToArmature=function(i,a,r,n,s){if(r===void 0){r=null}if(n===void 0){n=null}if(s===void 0){s=true}var o=new e;if(this._fillBuildArmaturePackage(o,n||"",a,r||"","")){var l=o.armature;if(s){i.animation.animations=l.animations}else{var h={};for(var u in i.animation.animations){h[u]=i.animation.animations[u]}for(var u in l.animations){h[u]=l.animations[u]}i.animation.animations=h}if(o.skin){var f=i.getSlots();for(var _=0,m=f.length;_<m;++_){var p=f[_];var c=p.displayList;for(var d=0,y=c.length;d<y;++d){var g=c[d];if(g instanceof t.Armature){var v=o.skin.getDisplays(p.name);if(v!==null&&d<v.length){var b=v[d];if(b!==null&&b.type===1){this.copyAnimationsToArmature(g,b.path,r,n,s)}}}}}return true}}return false};i.prototype.getAllDragonBonesData=function(){return this._dragonBonesDataMap};i.prototype.getAllTextureAtlasData=function(){return this._textureAtlasDataMap};i._objectParser=null;i._binaryParser=null;return i}();t.BaseFactory=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(i.prototype,"eventObject",{get:function(){return this.data},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"armature",{get:function(){return this.eventObject.armature},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"bone",{get:function(){return this.eventObject.bone},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"slot",{get:function(){return this.eventObject.slot},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationState",{get:function(){return this.eventObject.animationState},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationName",{get:function(){var t=this.eventObject.animationState;return t!==null?t.name:""},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"frameLabel",{get:function(){return this.eventObject.name},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"sound",{get:function(){return this.eventObject.name},enumerable:true,configurable:true});i.START=t.EventObject.START;i.LOOP_COMPLETE=t.EventObject.LOOP_COMPLETE;i.COMPLETE=t.EventObject.COMPLETE;i.FADE_IN=t.EventObject.FADE_IN;i.FADE_IN_COMPLETE=t.EventObject.FADE_IN_COMPLETE;i.FADE_OUT=t.EventObject.FADE_OUT;i.FADE_OUT_COMPLETE=t.EventObject.FADE_OUT_COMPLETE;i.FRAME_EVENT=t.EventObject.FRAME_EVENT;i.SOUND_EVENT=t.EventObject.SOUND_EVENT;i.ANIMATION_FRAME_EVENT=t.EventObject.FRAME_EVENT;i.BONE_FRAME_EVENT=t.EventObject.FRAME_EVENT;i.MOVEMENT_FRAME_EVENT=t.EventObject.FRAME_EVENT;i.SOUND=t.EventObject.SOUND_EVENT;return i}(egret.Event);t.EgretEvent=e;var i=function(t){__extends(i,t);function i(){var e=t!==null&&t.apply(this,arguments)||this;e._disposeProxy=false;e._armature=null;e._debugDrawer=null;return e}i.prototype.init=function(t){this._armature=t};i.prototype.clear=function(){this._disposeProxy=false;this._armature=null;this._debugDrawer=null};i.prototype.dispose=function(t){if(t===void 0){t=true}this._disposeProxy=t;if(this._armature!==null){this._armature.dispose();this._armature=null}};i.prototype.debugUpdate=function(t){t};i.prototype._dispatchEvent=function(i,a){var r=egret.Event.create(e,i);r.data=a;t.prototype.dispatchEvent.call(this,r);egret.Event.release(r)};i.prototype.hasEvent=function(t){return this.hasEventListener(t)};i.prototype.addEvent=function(t,e,i){this.addEventListener(t,e,i)};i.prototype.removeEvent=function(t,e,i){this.removeEventListener(t,e,i)};Object.defineProperty(i.prototype,"armature",{get:function(){return this._armature},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animation",{get:function(){return this._armature.animation},enumerable:true,configurable:true});return i}(egret.DisplayObjectContainer);t.EgretArmatureDisplay=i;function a(t,e){var i=new Module["EgretDisplayWASM"];var a;if(t===null){a=-1;i.setDisplayInfo(a,e)}else if(e===1){a=t.getEgretArmatureId();i.setDisplayInfo(a,e);i.setArmature(t)}else{a=t.$waNode.id;i.setDisplayInfo(a,e)}i._display=t;return i}t.createEgretDisplay=a;function r(){t.EgretArmatureProxy=Module["EgretArmatureDisplayWASM"].extend("EgretArmatureProxy",{__construct:function(t){this.__parent.__construct.call(this);this._display=t},__destruct:function(){this.__parent.__destruct.call(this);this._display=null},clear:function(){if(this._display){this._display.clear()}this._display=null},debugUpdate:function(t){this._display.debugUpdate(t)},_dispatchEvent:function(t,e){this._display._dispatchEvent(t,e)},hasEvent:function(t){return this._display.hasEventListener(t)},dispose:function(t){t},addEvent:function(t,e,i){this._display.addEvent(t,e,i)},removeEvent:function(t,e,i){this._display.removeEvent(t,e,i)}});t.EgretSlot=Module["EgretSlotWASM"].extend("EgretSlotWrapper",{__construct:function(){this.__parent.__construct.call(this);this._rawDisplay=null;this._meshDisplay=null;this._rawDisplayWASM=null;this._meshDisplayWASM=null},__destruct:function(){this.__parent.__destruct.call(this);this._rawDisplay=null;this._meshDisplay=null},init:function(t,e,i,r){this._rawDisplay=i;this._meshDisplay=r;this._rawDisplayWASM=a(this._rawDisplay,0);this._meshDisplayWASM=a(this._meshDisplay,2);this.__parent.init.call(this,t,e,this._rawDisplayWASM,this._meshDisplayWASM)},getRawDisplay:function(){return this._rawDisplay},getMeshDisplay:function(){return this._meshDisplay},getRawWASMDisplay:function(){return this._rawDisplayWASM},getMeshWASMDisplay:function(){return this._meshDisplayWASM},getDisplay:function(){var t=this.__parent.getEgretDisplay.call(this);if(t!==null){return t._display}return null},setDisplay:function(t){if(t===this._rawDisplay||t===this._meshDisplay){return}if(t===null||t instanceof egret.Bitmap){this.__parent.setEgretDisplay.call(this,a(t,0))}else if(t instanceof egret.Mesh){this.__parent.setEgretDisplay.call(this,a(t,2))}else if(t instanceof Module["EgretArmature"]){this.__parent.setChildArmature.call(this,t)}}});Object.defineProperty(t.EgretSlot.prototype,"displayList",{get:t.EgretSlot.prototype.getEgretDisplayList,set:t.EgretSlot.prototype.setEgretDisplayList,enumerable:true,configurable:true});Object.defineProperty(t.EgretSlot.prototype,"rawDisplay",{get:t.EgretSlot.prototype.getRawDisplay,enumerable:true,configurable:true});Object.defineProperty(t.EgretSlot.prototype,"meshDisplay",{get:t.EgretSlot.prototype.getMeshDisplay,enumerable:true,configurable:true});Object.defineProperty(t.EgretSlot.prototype,"display",{get:t.EgretSlot.prototype.getDisplay,set:t.EgretSlot.prototype.setDisplay,enumerable:true,configurable:true});t.EgretTextureAtlasData=Module["EgretTextureAtlasDataWASM"].extend("EgretTextureAtlasData",{__construct:function(t){this.__parent.__construct.call(this);this._textureNames=[];this._texture=null;if(t){for(var e=0,i=t;e<i.length;e++){var a=i[e];this._textureNames.push(a.name)}}},__destruct:function(){this.__parent.__destruct.call(this);this._textureNames.length=0;this._texture=null}});Object.defineProperty(t.EgretTextureAtlasData.prototype,"renderTexture",{get:function(){return this._texture},set:function(t){if(this._texture===t){return}if(t["textureId"]===null||t["textureId"]===undefined){egret.WebAssemblyNode.setValuesToBitmapData(t)}this._texture=t;var e=this.textures;if(this._texture!==null){var i=this._texture.bitmapData;var a=this.width>0?this.width:i.width;var r=this.height>0?this.height:i.height;for(var n=0,s=this._textureNames;n<s.length;n++){var o=s[n];for(var l=0,h=o.length;l<h;++l){if(o.charCodeAt(l)>255){o=encodeURI(o);break}}var u=e.get(o);var f=Math.min(u.region.width,a-u.region.x);var _=Math.min(u.region.height,r-u.region.y);if(!u.renderTexture){var m=new egret.Texture;m._bitmapData=i;if(u.rotated){m.$initData(u.region.x,u.region.y,_,f,0,0,_,f,a,r)}else{m.$initData(u.region.x,u.region.y,f,_,0,0,f,_,a,r)}egret.WebAssemblyNode.setValuesToBitmapData(m);u.setTextureId(m["textureId"]);u.renderTexture=m}}}else{for(var p=0,c=this._textureNames;p<c.length;p++){var o=c[p];var u=e.get(o);u.renderTexture=null}}},enumerable:true,configurable:true});t.EgretTextureData=Module["EgretTextureDataWASM"].extend("EgretTextureData",{__construct:function(){this.__parent.__construct.call(this);this._renderTexture=null},__destruct:function(){this.__parent.__destruct.call(this);this._renderTexture=null}});Object.defineProperty(t.EgretTextureData.prototype,"renderTexture",{get:function(){return this._renderTexture},set:function(t){if(this._renderTexture===t){return}this._renderTexture=t},enumerable:true,configurable:true});t.WorldClock=Module["WorldClock"];t.WorldClock.prototype._c_contains=t.WorldClock.prototype.contains;t.WorldClock.prototype._c_add=t.WorldClock.prototype.add;t.WorldClock.prototype._c_remove=t.WorldClock.prototype.remove;t.WorldClock.prototype.contains=function(e){if(e instanceof t.Armature){return this._c_contains(e.getAnimatable())}return this._c_contains(e)};t.WorldClock.prototype.add=function(e){if(e instanceof t.Armature){return this._c_add(e.getAnimatable())}return this._c_add(e)};t.WorldClock.prototype.remove=function(e){if(e instanceof t.Armature){return this._c_remove(e.getAnimatable())}return this._c_remove(e)};t.Armature=Module["EgretArmature"];t.Armature.prototype._c_addBone=t.Armature.prototype.addBone;t.Armature.prototype._c_invalidUpdate=t.Armature.prototype.invalidUpdate;t.Armature.prototype.addBone=function(t,e){if(e===null||e===undefined){e=""}return this._c_addBone(t,e)};t.Armature.prototype.invalidUpdate=function(t,e){if(t===void 0){t=null}if(e===void 0){e=false}if(t===null){t=""}return this._c_invalidUpdate(t,e)};t.Armature.prototype.getDisplay=function(){return this.proxy._display};Object.defineProperty(t.Armature.prototype,"display",{get:function(){return this.proxy._display},enumerable:true,configurable:true});t.Animation=Module["Animation"];t.Animation.prototype._c_play=t.Animation.prototype.play;t.Animation.prototype._c_fadeIn=t.Animation.prototype.fadeIn;t.Animation.prototype.play=function(t,e){if(t===void 0){t=null}if(e===void 0){e=-1}if(t===null){t=""}return this._c_play(t,e)};t.Animation.prototype.fadeIn=function(t,e,i,a,r,n){if(e===void 0){e=-1}if(i===void 0){i=-1}if(a===void 0){a=0}if(r===void 0){r=null}if(n===void 0){n=3}if(t===null){t=""}if(r===null){r=""}return this._c_fadeIn(t,e,i,a,r,n)}}t.egretWASMInit=r;var n={ActionData:{getter:[],setter:["type","bone","slot","data"]},DragonBonesData:{getter:["frameIndices"],setter:[],array:["armatureNames"]},ArmatureData:{getter:["defaultActions","actions"],setter:["aabb","defaultAnimation","defaultSkin","parent"],array:["animationNames"]},BoneData:{getter:["transform","constraints"],setter:["parent"]},SlotData:{getter:[],setter:["blendMode","color","parent"],static:["DEFAULT_COLOR"]},ConstraintData:{getter:[],setter:["target","root","bone"]},DisplayData:{getter:["transform"],setter:["type","parent"]},ImageDisplayData:{getter:["pivot"],setter:["texture"]},ArmatureDisplayData:{getter:["actions"],setter:[]},MeshDisplayData:{getter:[],setter:["weight"]},WeightData:{getter:["bones"],setter:[]},AnimationData:{getter:[],setter:["actionTimeline","zOrderTimeline","parent"]},TimelineData:{getter:[],setter:["type"]},AnimationConfig:{getter:[],setter:["fadeOutMode","fadeOutTweenType","fadeInTweenType"]},TextureData:{getter:["region"],setter:["frame"]},TransformObject:{getter:["globalTransformMatrix","global","offset","origin"],setter:[]},Armature:{getter:["armatureData","animation","proxy","eventDispatcher"],setter:["clock"]},Slot:{getter:["boundingBoxData"],setter:["displayIndex","childArmature"]},Constraint:{getter:[],setter:["target","bone","root"]},Animation:{getter:["animationConfig"],setter:[],array:["animationNames"]},WorldClock:{getter:[],setter:["clock"],static:["clock"]},EventObject:{getter:["armature","bone","slot","animationState","data"],setter:[]},EgretArmatureDisplayWASM:{getter:["armature","animation"],setter:[]},DragonBones:{getter:["clock"],setter:[]}};function s(t,e){return{get:e["_c_get_"+t],enumerable:true,configurable:true}}function o(t,e){return{get:e["_c_get_"+t],set:e["_c_set_"+t],enumerable:true,configurable:true}}function l(t,e){e;return{get:function(){var e=this["_js_"+t];if(!e){e=[];var i=this["_c_get_"+t]();for(var a=0,r=i.size();a<r;++a){e[a]=i.get(a)}}return e},enumerable:true,configurable:true}}function h(){for(var t in n){var e=Module[t];var i=Module[t].prototype;var a=n[t].getter;var r=n[t].setter;var h=n[t].static;var u=n[t].array;if(a){for(var f=0,_=a;f<_.length;f++){var m=_[f];Object.defineProperty(i,m,s(m,i))}}if(r){for(var p=0,c=r;p<c.length;p++){var m=c[p];Object.defineProperty(i,m,o(m,i))}}if(h){for(var d=0,y=h;d<y.length;d++){var m=y[d];Object.defineProperty(e,m,o(m,e))}}if(u){for(var g=0,v=u;g<v.length;g++){var m=v[g];Object.defineProperty(i,m,l(m,e))}}}}t.registerGetterSetter=h})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var a=e.call(this)||this;a._rawTextures=null;if(i._dragonBones===null){t.DragonBones.webAssembly=true;var r=new t.EgretArmatureDisplay;i._eventManager=r;i._dragonBones=new Module["DragonBones"];i._dragonBones.clock.time=egret.getTimer()*.001;egret.startTick(i._clockHandler,i)}return a}i._clockHandler=function(e){var a=i._dragonBones;var r=a.getObjects();for(var n=0,s=r.size();n<s;++n){r.get(n).returnToPool()}r.resize(0,null);e*=.001;var o=e-i._time;a.clock.advanceTime(o);i._time=e;var l=a.getEvents();for(var n=0,s=l.size();n<s;++n){var h=l.get(n);var u=h.armature;var f=h.type;if(u===null||u.display===null||u.display===undefined){console.log("armature display error!")}u.display._dispatchEvent(f,h);if(f===t.EventObject.SOUND_EVENT){i._eventManager._dispatchEvent(h.type,h)}h.returnToPool()}l.resize(0,null);return false};Object.defineProperty(i,"clock",{get:function(){return i._dragonBones.clock},enumerable:true,configurable:true});Object.defineProperty(i,"factory",{get:function(){if(i._factory===null){t.registerGetterSetter();t.egretWASMInit();i._factory=new i}return i._factory},enumerable:true,configurable:true});i.prototype._isSupportMesh=function(){if(egret.Capabilities.renderMode==="webgl"||egret.Capabilities.runtimeType===egret.RuntimeType.NATIVE){return true}console.warn("Canvas can not support mesh, please change renderMode to webgl.");return false};i.prototype._buildTextureAtlasData=function(e,i){if(e!==null){if(i["textureId"]===null){egret.WebAssemblyNode.setValuesToBitmapData(i)}e.renderTexture=i}else{e=new t.EgretTextureAtlasData(this._rawTextures)}return e};i.prototype._buildArmature=function(e){var a=new Module["EgretArmature"];var r=new t.EgretArmatureDisplay;var n=new t.EgretArmatureProxy(r);var s=r.$waNode.id;a.init(e.armature,n,s,i._dragonBones);r.init(a);return a};i.prototype._buildSlots=function(e,i){var a=e.skin;var r=e.armature.defaultSkin;if(a===null||r===null){return}var n=a.getSkinSlotNames();var s=r.getSkinSlotNames();var o={};for(var l=0,h=s.size();l<h;++l){var u=s.get(l);var f=r.getDisplays(u);if(f!==null){o[u]=f}}if(a!==r){for(var l=0,h=n.size();l<h;++l){var u=n.get(l);var f=a.getDisplays(u);if(f!==null){o[u]=f}}}var _=e.armature.sortedSlots;for(var l=0,h=_.size();l<h;++l){var m=_.get(l);if(!(m.name in o)){continue}var f=o[m.name];var p=this._buildSlot(e,m,f,i);var c=new Module["EgretSlotDisplayVector"];for(var d=0,y=f.size();d<y;++d){var g=f.get(d);if(g!==null){var v=this._getSlotDisplay(e,g,null,p);if(v===null){var b=t.createEgretDisplay(v,0);c.push_back(b)}else if(v.getDisplayType()===1){var b=t.createEgretDisplay(v,1);c.push_back(b)}else{c.push_back(v)}}else{var b=t.createEgretDisplay(null,0);c.push_back(b)}}i.addSlot(p,m.parent.name);p._setEgretDisplayList(c);p._setDisplayIndex(m.displayIndex,true)}};i.prototype._buildSlot=function(e,i,a,r){e;r;var n=new t.EgretSlot;n.init(i,a,new egret.Bitmap,new egret.Mesh);return n};i.prototype.parseTextureAtlasData=function(t,i,a,r){if(a===void 0){a=null}if(r===void 0){r=0}this._rawTextures=t?t.SubTexture:null;return e.prototype.parseTextureAtlasData.call(this,t,i,a,r)};i.prototype.buildArmatureDisplay=function(t,e,a,r){if(e===void 0){e=null}if(a===void 0){a=null}if(r===void 0){r=null}var n=this.buildArmature(t,e,a,r);if(n!==null){i.clock.add(n);return n.display}return null};i.prototype.getTextureDisplay=function(t,e){if(e===void 0){e=null}var i=this._getTextureData(e!==null?e:"",t);if(i!==null&&i.texture===null){return new egret.Bitmap(i.texture)}return null};i.prototype._getSlotDisplay=function(t,e,i,a){var r=t!==null?t.dataName:e.parent.parent.name;var n=null;switch(e.type){case 0:var s=e;if(s.texture===null){s.texture=this._getTextureData(r,e.path)}else if(t!==null&&t.textureAtlasName.length>0){s.texture=this._getTextureData(t.textureAtlasName,e.path)}if(i!==null&&i.type===2&&this._isSupportMesh()){n=a.getMeshWASMDisplay()}else{n=a.getRawWASMDisplay()}break;case 2:var o=e;if(o.texture===null){o.texture=this._getTextureData(r,o.path)}else if(t!==null&&t.textureAtlasName.length>0){o.texture=this._getTextureData(t.textureAtlasName,o.path)}if(this._isSupportMesh()){n=a.getMeshWASMDisplay()}else{n=a.getRawWASMDisplay()}break;case 1:var l=e;var h=this.buildArmature(l.path,r,null,t!==null?t.textureAtlasName:null);if(h!==null){h.inheritAnimation=l.inheritAnimation;if(!h.inheritAnimation){var u=l.actions.length>0?l.actions:h.armatureData.defaultActions;if(u.length>0){for(var f=0,_=u;f<_.length;f++){var m=_[f];h.animation.fadeIn(m.name)}}else{h.animation.play()}}l.armature=h.armatureData}n=h;break}return n};i.prototype.changeSkin=function(e,i,a){if(a===void 0){a=null}var r=e.getSlots();for(var n=0,s=r.size();n<s;++n){var o=r.get(n);if(a!==null&&a.indexOf(o.name)>=0){continue}var l=i.displays.get(o.name);if(l===null||l===undefined){continue}var h=o.getEgretDisplayList();if(h===null||h===undefined){console.log("Slot does not has displayList"+o.name);continue}var u=l.size();h.resize(u,null);for(var f=0,_=l.size();f<_;++f){var m=l.get(f);var p=this._getSlotDisplay(null,m,null,o);if(p.getDisplayType()==1){var c=t.createEgretDisplay(p,1);h.set(f,c)}else{h.set(f,p)}}o.switchDisplayData(l);o.setEgretDisplayList(h)}};i.prototype.replaceSlotDisplay=function(t,e,i,a,r,n){if(n===void 0){n=-1}var s={};if(!this._fillBuildArmaturePackage(s,t||"",e,"","")||s.skin===null){return}var o=s.skin.getDisplays(i);if(o===null){return}for(var l=0,h=o.size();l<h;++l){var u=o.get(l);if(u!==null&&u.name===a){this._replaceSlotDisplay(s,u,r,n);break}}};i.prototype._replaceSlotDisplay=function(t,e,i,a){if(a<0){a=i.displayIndex}if(a<0){a=0}var r=i.getEgretDisplayList();if(r.size()<=a){r.resize(a+1,null)}i.replaceDisplayData(e,a);if(e!==null){r[a]=this._getSlotDisplay(t,e,null,i)}else{r[a]=null}i.setEgretDisplayList(r)};Object.defineProperty(i.prototype,"soundEventManager",{get:function(){return i._eventManager},enumerable:true,configurable:true});i._time=0;i._dragonBones=null;i._factory=null;return i}(t.BaseFactory);t.EgretFactory=e})(dragonBones||(dragonBones={}));