Slot Detail
\r\n\r\n\r\n";document.write(e)}},t}();t.WebCapability=r,__reflect(r.prototype,"egret.web.WebCapability"),r.detect()}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=function(){function e(){}return e.call=function(e,t){},e.addCallback=function(e,t){},e}();t.WebExternalInterface=r,__reflect(r.prototype,"egret.web.WebExternalInterface",["egret.ExternalInterface"]);var i=navigator.userAgent.toLowerCase();i.indexOf("egretnative")<0&&(e.ExternalInterface=r)}(t=e.web||(e.web={}))}(egret||(egret={})),function(e){var t;!function(t){function r(t){var r=JSON.parse(t),n=r.functionName,a=i[n];if(a){var o=r.value;a.call(null,o)}else e.$warn(1050,n)}var i={},n=function(){function e(){}return e.call=function(e,t){var r={};r.functionName=e,r.value=t,egret_native.sendInfoToPlugin(JSON.stringify(r))},e.addCallback=function(e,t){i[e]=t},e}();t.NativeExternalInterface=n,__reflect(n.prototype,"egret.web.NativeExternalInterface",["egret.ExternalInterface"]);var a=navigator.userAgent.toLowerCase();a.indexOf("egretnative")>=0&&(e.ExternalInterface=n,egret_native.receivedPluginInfo=r)}(t=e.web||(e.web={}))}(egret||(egret={})),function(e){var t;!function(t){var r={},i=function(){function t(){}return t.call=function(e,t){__global.ExternalInterface.call(e,t)},t.addCallback=function(e,t){r[e]=t},t.invokeCallback=function(t,i){var n=r[t];n?n.call(null,i):e.$warn(1050,t)},t}();t.WebViewExternalInterface=i,__reflect(i.prototype,"egret.web.WebViewExternalInterface",["egret.ExternalInterface"]);var n=navigator.userAgent.toLowerCase();n.indexOf("egretwebview")>=0&&(e.ExternalInterface=i)}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){function r(e){if(window.location){var t=location.search;if(""==t)return"";t=t.slice(1);for(var r=t.split("&"),i=r.length,n=0;i>n;n++){var a=r[n],o=a.split("=");if(o[0]==e)return o[1]}}return""}t.getOption=r,e.getOption=r}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=function(r){function i(e,t){var i=r.call(this)||this;return i.init(e,t),i.initOrientation(),i}return __extends(i,r),i.prototype.init=function(r,i){var n=this.readOption(r,i),a=new e.Stage;a.$screen=this,a.$scaleMode=n.scaleMode,a.$orientation=n.orientation,a.$maxTouches=n.maxTouches,a.frameRate=n.frameRate,a.textureScaleFactor=n.textureScaleFactor;var o=new e.sys.RenderBuffer(void 0,void 0,!0),s=o.surface;this.attachCanvas(r,s);var l=new t.WebTouchHandler(a,s),c=new e.sys.Player(o,a,n.entryClassName);e.lifecycle.stage=a,e.lifecycle.addLifecycleListener(t.WebLifeCycleHandler);var h=new t.HTMLInput;c.showPaintRect(n.showPaintRect),(n.showFPS||n.showLog)&&c.displayFPS(n.showFPS,n.showLog,n.logFilter,n.fpsStyles),this.playerOption=n,this.container=r,this.canvas=s,this.stage=a,this.player=c,this.webTouchHandler=l,this.webInput=h,e.web.$cacheTextAdapter(h,a,r,s),this.updateScreenSize(),this.updateMaxTouches(),c.start()},i.prototype.initOrientation=function(){var t=this;window.addEventListener("orientationchange",function(){window.setTimeout(function(){e.StageOrientationEvent.dispatchStageOrientationEvent(t.stage,e.StageOrientationEvent.ORIENTATION_CHANGE)},350)})},i.prototype.readOption=function(t,r){var i={};i.entryClassName=t.getAttribute("data-entry-class"),i.scaleMode=t.getAttribute("data-scale-mode")||e.StageScaleMode.NO_SCALE,i.frameRate=+t.getAttribute("data-frame-rate")||30,i.contentWidth=+t.getAttribute("data-content-width")||480,i.contentHeight=+t.getAttribute("data-content-height")||800,i.orientation=t.getAttribute("data-orientation")||e.OrientationMode.AUTO,i.maxTouches=+t.getAttribute("data-multi-fingered")||2,i.textureScaleFactor=+t.getAttribute("texture-scale-factor")||1,"webgl"==r.renderMode?i.showPaintRect=!1:i.showPaintRect="true"==t.getAttribute("data-show-paint-rect"),i.showFPS="true"==t.getAttribute("data-show-fps");for(var n=t.getAttribute("data-show-fps-style")||"",a=n.split(","),o={},s=0;sa||l==e.OrientationMode.PORTRAIT&&a>o);var c=s?o:a,h=s?a:o;e.Capabilities.$boundingClientWidth=c,e.Capabilities.$boundingClientHeight=h;var u=e.sys.screenAdapter.calculateStageSize(this.stage.$scaleMode,c,h,r.contentWidth,r.contentHeight),d=u.stageWidth,p=u.stageHeight,f=u.displayWidth,g=u.displayHeight;t.style[e.web.getPrefixStyleName("transformOrigin")]="0% 0% 0px",t.width!=d&&(t.width=d),t.height!=p&&(t.height=p);var v=0;s?l==e.OrientationMode.LANDSCAPE?(v=90,t.style.top=n+(o-f)/2+"px",t.style.left=(a+g)/2+"px"):(v=-90,t.style.top=n+(o+f)/2+"px",t.style.left=(a-g)/2+"px"):(t.style.top=n+(o-g)/2+"px",t.style.left=(a-f)/2+"px");var y=f/d,m=g/p,x=y*e.sys.DisplayList.$canvasScaleFactor,b=m*e.sys.DisplayList.$canvasScaleFactor;"canvas"==e.Capabilities.$renderMode&&(x=Math.ceil(x),b=Math.ceil(b));var w=new e.Matrix;w.scale(y/x,m/b),w.rotate(v*Math.PI/180);var E="matrix("+w.a+","+w.b+","+w.c+","+w.d+","+w.tx+","+w.ty+")";t.style[e.web.getPrefixStyleName("transform")]=E,e.sys.DisplayList.$setCanvasScale(x,b),this.webTouchHandler.updateScaleMode(y,m,v),this.webInput.$updateSize(),this.player.updateStageSize(d,p)}},i.prototype.setContentSize=function(e,t){var r=this.playerOption;r.contentWidth=e,r.contentHeight=t,this.updateScreenSize()},i.prototype.updateMaxTouches=function(){this.webTouchHandler.$updateMaxTouches()},i}(e.HashObject);t.WebPlayer=r,__reflect(r.prototype,"egret.web.WebPlayer",["egret.sys.Screen"])}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){function r(t,r){s||(s=document.createElement("canvas"),l=s.getContext("2d"));var i=t.$getTextureWidth(),n=t.$getTextureHeight();null==r&&(r=e.$TempRectangle,r.x=0,r.y=0,r.width=i,r.height=n),r.x=Math.min(r.x,i-1),r.y=Math.min(r.y,n-1),r.width=Math.min(r.width,i-r.x),r.height=Math.min(r.height,n-r.y);var a=r.width,o=r.height,c=s;if(c.style.width=a+"px",c.style.height=o+"px",s.width=a,s.height=o,"webgl"==e.Capabilities.$renderMode){var h=void 0;t.$renderBuffer?h=t:(h=new e.RenderTexture,h.drawToTexture(new e.Bitmap(t)));for(var u=h.$renderBuffer.getPixels(r.x,r.y,a,o),d=new ImageData(a,o),p=0;pn;n++){var a=t.childNodes[n];if(1==a.nodeType)return i(a,null)}return null}function i(e,t){if("parsererror"==e.localName)throw new Error(e.textContent);for(var r=new a(e.localName,t,e.prefix,e.namespaceURI,e.nodeName),n=e.attributes,s=r.attributes,l=n.length,c=0;l>c;c++){var h=n[c],u=h.name;0!=u.indexOf("xmlns:")&&(s[u]=h.value,r["$"+u]=h.value)}var d=e.childNodes;l=d.length;for(var p=r.children,c=0;l>c;c++){var f=d[c],g=f.nodeType,v=null;if(1==g)v=i(f,r);else if(3==g){var y=f.textContent.trim();y&&(v=new o(y,r))}v&&p.push(v)}return r}var n=function(){function e(e,t){this.nodeType=e,this.parent=t}return e}();t.XMLNode=n,__reflect(n.prototype,"egret.web.XMLNode");var a=function(e){function t(t,r,i,n,a){var o=e.call(this,1,r)||this;return o.attributes={},o.children=[],o.localName=t,o.prefix=i,o.namespace=n,o.name=a,o}return __extends(t,e),t}(n);t.XML=a,__reflect(a.prototype,"egret.web.XML");var o=function(e){function t(t,r){var i=e.call(this,3,r)||this;return i.text=t,i}return __extends(t,e),t}(n);t.XMLText=o,__reflect(o.prototype,"egret.web.XMLText");var s=new DOMParser;e.XML={parse:r}}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.onChange=function(t){var i=new e.OrientationEvent(e.Event.CHANGE);i.beta=t.beta,i.gamma=t.gamma,i.alpha=t.alpha,r.dispatchEvent(i)},r}return __extends(r,t),r.prototype.start=function(){window.addEventListener("deviceorientation",this.onChange)},r.prototype.stop=function(){window.removeEventListener("deviceorientation",this.onChange)},r}(e.EventDispatcher);t.WebDeviceOrientation=r,__reflect(r.prototype,"egret.web.WebDeviceOrientation",["egret.DeviceOrientation"])}(t=e.web||(e.web={}))}(egret||(egret={})),egret.DeviceOrientation=egret.web.WebDeviceOrientation;var egret;!function(e){var t;!function(t){var r=function(t){function r(r){var i=t.call(this)||this;return i.onUpdate=function(t){var r=new e.GeolocationEvent(e.Event.CHANGE),n=t.coords;r.altitude=n.altitude,r.heading=n.heading,r.accuracy=n.accuracy,r.latitude=n.latitude,r.longitude=n.longitude,r.speed=n.speed,r.altitudeAccuracy=n.altitudeAccuracy,i.dispatchEvent(r)},i.onError=function(t){var r=e.GeolocationEvent.UNAVAILABLE;t.code==t.PERMISSION_DENIED&&(r=e.GeolocationEvent.PERMISSION_DENIED);var n=new e.GeolocationEvent(e.IOErrorEvent.IO_ERROR);n.errorType=r,n.errorMessage=t.message,i.dispatchEvent(n)},i.geolocation=navigator.geolocation,i}return __extends(r,t),r.prototype.start=function(){var t=this.geolocation;t?this.watchId=t.watchPosition(this.onUpdate,this.onError):this.onError({code:2,message:e.sys.tr(3004),PERMISSION_DENIED:1,POSITION_UNAVAILABLE:2})},r.prototype.stop=function(){var e=this.geolocation;e.clearWatch(this.watchId)},r}(e.EventDispatcher);t.WebGeolocation=r,__reflect(r.prototype,"egret.web.WebGeolocation",["egret.Geolocation"]),e.Geolocation=e.web.WebGeolocation}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=function(t){function r(){var r=null!==t&&t.apply(this,arguments)||this;return r.onChange=function(t){var i=new e.MotionEvent(e.Event.CHANGE),n={x:t.acceleration.x,y:t.acceleration.y,z:t.acceleration.z},a={x:t.accelerationIncludingGravity.x,y:t.accelerationIncludingGravity.y,z:t.accelerationIncludingGravity.z},o={alpha:t.rotationRate.alpha,beta:t.rotationRate.beta,gamma:t.rotationRate.gamma};i.acceleration=n,i.accelerationIncludingGravity=a,i.rotationRate=o,r.dispatchEvent(i)},r}return __extends(r,t),r.prototype.start=function(){window.addEventListener("devicemotion",this.onChange)},r.prototype.stop=function(){window.removeEventListener("devicemotion",this.onChange)},r}(e.EventDispatcher);t.WebMotion=r,__reflect(r.prototype,"egret.web.WebMotion",["egret.Motion"]),e.Motion=e.web.WebMotion}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(e){}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(e){var t=function(){function e(){this.drawData=[],this.drawDataLen=0}return e.prototype.pushDrawRect=function(){if(0==this.drawDataLen||1!=this.drawData[this.drawDataLen-1].type){var e=this.drawData[this.drawDataLen]||{};e.type=1,e.count=0,this.drawData[this.drawDataLen]=e,this.drawDataLen++}this.drawData[this.drawDataLen-1].count+=2},e.prototype.pushDrawTexture=function(e,t,r,i,n){if(void 0===t&&(t=2),r){var a=this.drawData[this.drawDataLen]||{};a.type=0,a.texture=e,a.filter=r,a.count=t,a.textureWidth=i,a.textureHeight=n,this.drawData[this.drawDataLen]=a,this.drawDataLen++}else{if(0==this.drawDataLen||0!=this.drawData[this.drawDataLen-1].type||e!=this.drawData[this.drawDataLen-1].texture||this.drawData[this.drawDataLen-1].filter){var a=this.drawData[this.drawDataLen]||{};a.type=0,a.texture=e,a.count=0,this.drawData[this.drawDataLen]=a,this.drawDataLen++}this.drawData[this.drawDataLen-1].count+=t}},e.prototype.pushChangeSmoothing=function(e,t){e.smoothing=t;var r=this.drawData[this.drawDataLen]||{};r.type=10,r.texture=e,r.smoothing=t,this.drawData[this.drawDataLen]=r,this.drawDataLen++},e.prototype.pushPushMask=function(e){void 0===e&&(e=1);var t=this.drawData[this.drawDataLen]||{};t.type=2,t.count=2*e,this.drawData[this.drawDataLen]=t,this.drawDataLen++},e.prototype.pushPopMask=function(e){void 0===e&&(e=1);var t=this.drawData[this.drawDataLen]||{};t.type=3,t.count=2*e,this.drawData[this.drawDataLen]=t,this.drawDataLen++},e.prototype.pushSetBlend=function(e){for(var t=this.drawDataLen,r=!1,i=t-1;i>=0;i--){var n=this.drawData[i];if(n){if((0==n.type||1==n.type)&&(r=!0),!r&&4==n.type){this.drawData.splice(i,1),this.drawDataLen--;continue}if(4==n.type){if(n.value==e)return;break}}}var a=this.drawData[this.drawDataLen]||{};a.type=4,a.value=e,this.drawData[this.drawDataLen]=a,this.drawDataLen++},e.prototype.pushResize=function(e,t,r){var i=this.drawData[this.drawDataLen]||{}; i.type=5,i.buffer=e,i.width=t,i.height=r,this.drawData[this.drawDataLen]=i,this.drawDataLen++},e.prototype.pushClearColor=function(){var e=this.drawData[this.drawDataLen]||{};e.type=6,this.drawData[this.drawDataLen]=e,this.drawDataLen++},e.prototype.pushActivateBuffer=function(e){for(var t=this.drawDataLen,r=!1,i=t-1;i>=0;i--){var n=this.drawData[i];!n||(4!=n.type&&7!=n.type&&(r=!0),r||7!=n.type)||(this.drawData.splice(i,1),this.drawDataLen--)}var a=this.drawData[this.drawDataLen]||{};a.type=7,a.buffer=e,a.width=e.rootRenderTarget.width,a.height=e.rootRenderTarget.height,this.drawData[this.drawDataLen]=a,this.drawDataLen++},e.prototype.pushEnableScissor=function(e,t,r,i){var n=this.drawData[this.drawDataLen]||{};n.type=8,n.x=e,n.y=t,n.width=r,n.height=i,this.drawData[this.drawDataLen]=n,this.drawDataLen++},e.prototype.pushDisableScissor=function(){var e=this.drawData[this.drawDataLen]||{};e.type=9,this.drawData[this.drawDataLen]=e,this.drawDataLen++},e.prototype.clear=function(){for(var e=0;er;r+=6,i+=4)this.indices[r+0]=i+0,this.indices[r+1]=i+1,this.indices[r+2]=i+2,this.indices[r+3]=i+0,this.indices[r+4]=i+2,this.indices[r+5]=i+3}return e.prototype.reachMaxSize=function(e,t){return void 0===e&&(e=4),void 0===t&&(t=6),this.vertexIndex>this.vertexMaxSize-e||this.indexIndex>this.indicesMaxSize-t},e.prototype.getVertices=function(){var e=this.vertices.subarray(0,this.vertexIndex*this.vertSize);return e},e.prototype.getIndices=function(){return this.indices},e.prototype.getMeshIndices=function(){return this.indicesForMesh},e.prototype.changeToMeshIndices=function(){if(!this.hasMesh){for(var e=0,t=this.indexIndex;t>e;++e)this.indicesForMesh[e]=this.indices[e];this.hasMesh=!0}},e.prototype.isMesh=function(){return this.hasMesh},e.prototype.cacheArrays=function(e,t,r,i,n,a,o,s,l,c,h,u,d,p,f,g){var v=e,y=v.a,m=v.b,x=v.c,b=v.d,w=v.tx,E=v.ty;p||((0!=o||0!=s)&&v.append(1,0,0,1,o,s),(n/l!=1||a/c!=1)&&v.append(l/n,0,0,c/a,0,0));var T=v.a,_=v.b,S=v.c,C=v.d,L=v.tx,R=v.ty;if(v.a=y,v.b=m,v.c=x,v.d=b,v.tx=w,v.ty=E,p){var A=this.vertices,D=this.vertexIndex*this.vertSize,O=0,I=0,M=0,B=0,$=0,P=0,F=0;for(O=0,M=d.length;M>O;O+=2)I=D+5*O/2,P=p[O],F=p[O+1],B=d[O],$=d[O+1],A[I+0]=T*P+S*F+L,A[I+1]=_*P+C*F+R,g?(A[I+2]=(r+(1-$)*a)/h,A[I+3]=(i+B*n)/u):(A[I+2]=(r+B*n)/h,A[I+3]=(i+$*a)/u),A[I+4]=t;if(this.hasMesh)for(var G=0,W=f.length;W>G;++G)this.indicesForMesh[this.indexIndex+G]=f[G]+this.vertexIndex;this.vertexIndex+=d.length/2,this.indexIndex+=f.length}else{var N=h,H=u,U=n,k=a;r/=N,i/=H;var A=this.vertices,D=this.vertexIndex*this.vertSize;if(g){var V=n;n=a/N,a=V/H,A[D++]=L,A[D++]=R,A[D++]=n+r,A[D++]=i,A[D++]=t,A[D++]=T*U+L,A[D++]=_*U+R,A[D++]=n+r,A[D++]=a+i,A[D++]=t,A[D++]=T*U+S*k+L,A[D++]=C*k+_*U+R,A[D++]=r,A[D++]=a+i,A[D++]=t,A[D++]=S*k+L,A[D++]=C*k+R,A[D++]=r,A[D++]=i,A[D++]=t}else n/=N,a/=H,A[D++]=L,A[D++]=R,A[D++]=r,A[D++]=i,A[D++]=t,A[D++]=T*U+L,A[D++]=_*U+R,A[D++]=n+r,A[D++]=i,A[D++]=t,A[D++]=T*U+S*k+L,A[D++]=C*k+_*U+R,A[D++]=n+r,A[D++]=a+i,A[D++]=t,A[D++]=S*k+L,A[D++]=C*k+R,A[D++]=r,A[D++]=a+i,A[D++]=t;if(this.hasMesh){var z=this.indicesForMesh;z[this.indexIndex+0]=0+this.vertexIndex,z[this.indexIndex+1]=1+this.vertexIndex,z[this.indexIndex+2]=2+this.vertexIndex,z[this.indexIndex+3]=0+this.vertexIndex,z[this.indexIndex+4]=2+this.vertexIndex,z[this.indexIndex+5]=3+this.vertexIndex}this.vertexIndex+=4,this.indexIndex+=6}},e.prototype.clear=function(){this.hasMesh=!1,this.vertexIndex=0,this.indexIndex=0},e}();e.WebGLVertexArrayObject=t,__reflect(t.prototype,"egret.web.WebGLVertexArrayObject")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=function(t){function r(e,r,i){var n=t.call(this)||this;return n.clearColor=[0,0,0,0],n.useFrameBuffer=!0,n.gl=e,n.width=r||1,n.height=i||1,n}return __extends(r,t),r.prototype.resize=function(e,t){var r=this.gl;this.width=e,this.height=t,this.frameBuffer&&(r.bindTexture(r.TEXTURE_2D,this.texture),r.texImage2D(r.TEXTURE_2D,0,r.RGBA,e,t,0,r.RGBA,r.UNSIGNED_BYTE,null)),this.stencilBuffer&&(r.deleteRenderbuffer(this.stencilBuffer),this.stencilBuffer=null)},r.prototype.activate=function(){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.getFrameBuffer())},r.prototype.getFrameBuffer=function(){return this.useFrameBuffer?this.frameBuffer:null},r.prototype.initFrameBuffer=function(){if(!this.frameBuffer){var e=this.gl;this.texture=this.createTexture(),this.frameBuffer=e.createFramebuffer(),e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),e.framebufferTexture2D(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,this.texture,0)}},r.prototype.createTexture=function(){var e=this.gl,t=e.createTexture();return t.glContext=e,e.bindTexture(e.TEXTURE_2D,t),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,this.width,this.height,0,e.RGBA,e.UNSIGNED_BYTE,null),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),t},r.prototype.clear=function(e){var t=this.gl;e&&this.activate(),t.colorMask(!0,!0,!0,!0),t.clearColor(this.clearColor[0],this.clearColor[1],this.clearColor[2],this.clearColor[3]),t.clear(t.COLOR_BUFFER_BIT)},r.prototype.enabledStencil=function(){if(this.frameBuffer&&!this.stencilBuffer){var e=this.gl;e.bindFramebuffer(e.FRAMEBUFFER,this.frameBuffer),this.stencilBuffer=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,this.stencilBuffer),e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,this.width,this.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,this.stencilBuffer)}},r.prototype.dispose=function(){e.WebGLUtils.deleteWebGLTexture(this.texture)},r}(e.HashObject);t.WebGLRenderTarget=r,__reflect(r.prototype,"egret.web.WebGLRenderTarget")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){function r(e,t){var r=document.createElement("canvas");return isNaN(e)||isNaN(t)||(r.width=e,r.height=t),r}var i=function(){function i(e,i){this.glID=null,this.projectionX=0/0,this.projectionY=0/0,this.contextLost=!1,this.$scissorState=!1,this.vertSize=5,this.surface=r(e,i),this.initWebGL(),this.$bufferStack=[];var n=this.context;this.vertexBuffer=n.createBuffer(),this.indexBuffer=n.createBuffer(),n.bindBuffer(n.ARRAY_BUFFER,this.vertexBuffer),n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,this.indexBuffer),this.drawCmdManager=new t.WebGLDrawCmdManager,this.vao=new t.WebGLVertexArrayObject,this.setGlobalCompositeOperation("source-over")}return i.getInstance=function(e,t){return this.instance?this.instance:(this.instance=new i(e,t),this.instance)},i.prototype.pushBuffer=function(e){this.$bufferStack.push(e),e!=this.currentBuffer&&(this.currentBuffer,this.drawCmdManager.pushActivateBuffer(e)),this.currentBuffer=e},i.prototype.popBuffer=function(){if(!(this.$bufferStack.length<=1)){var e=this.$bufferStack.pop(),t=this.$bufferStack[this.$bufferStack.length-1];e!=t&&this.drawCmdManager.pushActivateBuffer(t),this.currentBuffer=t}},i.prototype.activateBuffer=function(e){e.rootRenderTarget.activate(),this.bindIndices||this.uploadIndicesArray(this.vao.getIndices()),e.restoreStencil(),e.restoreScissor(),this.onResize(e.width,e.height)},i.prototype.uploadVerticesArray=function(e){var t=this.context;t.bufferData(t.ARRAY_BUFFER,e,t.STREAM_DRAW)},i.prototype.uploadIndicesArray=function(e){var t=this.context;t.bufferData(t.ELEMENT_ARRAY_BUFFER,e,t.STATIC_DRAW),this.bindIndices=!0},i.prototype.destroy=function(){this.surface.width=this.surface.height=0},i.prototype.onResize=function(e,t){e=e||this.surface.width,t=t||this.surface.height,this.projectionX=e/2,this.projectionY=-t/2,this.context&&this.context.viewport(0,0,e,t)},i.prototype.resize=function(e,t,r){var i=this.surface;r?(i.widthi;i++){var n=e[i];this.vao.cacheArrays(t.globalMatrix,t.globalAlpha,0,0,n.width,n.height,n.minX,n.minY,n.width,n.height,n.width,n.height)}}else this.drawCmdManager.pushPushMask(),this.vao.cacheArrays(t.globalMatrix,t.globalAlpha,0,0,e.width,e.height,e.x,e.y,e.width,e.height,e.width,e.height)}},i.prototype.popMask=function(){var e=this.currentBuffer;if(!this.contextLost&&e){var t=e.$stencilList.pop();this.vao.reachMaxSize()&&this.$drawWebGL();var r=t.length;if(r){this.drawCmdManager.pushPopMask(r);for(var i=0;r>i;i++){var n=t[i];this.vao.cacheArrays(e.globalMatrix,e.globalAlpha,0,0,n.width,n.height,n.minX,n.minY,n.width,n.height,n.width,n.height)}}else this.drawCmdManager.pushPopMask(),this.vao.cacheArrays(e.globalMatrix,e.globalAlpha,0,0,t.width,t.height,t.x,t.y,t.width,t.height,t.width,t.height)}},i.prototype.clear=function(){this.drawCmdManager.pushClearColor()},i.prototype.enableScissor=function(e,t,r,i){var n=this.currentBuffer;this.drawCmdManager.pushEnableScissor(e,t,r,i),n.$hasScissor=!0},i.prototype.disableScissor=function(){var e=this.currentBuffer;this.drawCmdManager.pushDisableScissor(),e.$hasScissor=!1},i.prototype.$drawWebGL=function(){if(0!=this.drawCmdManager.drawDataLen&&!this.contextLost){this.uploadVerticesArray(this.vao.getVertices()),this.vao.isMesh()&&this.uploadIndicesArray(this.vao.getMeshIndices());for(var e=this.drawCmdManager.drawDataLen,t=0,r=0;e>r;r++){var i=this.drawCmdManager.drawData[r];t=this.drawData(i,t),7==i.type&&(this.activatedBuffer=i.buffer),(0==i.type||1==i.type||2==i.type||3==i.type)&&this.activatedBuffer&&this.activatedBuffer.$computeDrawCall&&this.activatedBuffer.$drawCalls++}this.vao.isMesh()&&this.uploadIndicesArray(this.vao.getIndices()),this.drawCmdManager.clear(),this.vao.clear()}},i.prototype.drawData=function(e,r){if(e){var i,n=this.context,a=e.filter;switch(e.type){case 0:a?"custom"===a.type?i=t.EgretWebGLProgram.getProgram(n,a.$vertexSrc,a.$fragmentSrc,a.$shaderKey):"colorTransform"===a.type?i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.colorTransform_frag,"colorTransform"):"blurX"===a.type?i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.blur_frag,"blur"):"blurY"===a.type?i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.blur_frag,"blur"):"glow"===a.type&&(i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.glow_frag,"glow")):i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.texture_frag,"texture"),this.activeProgram(n,i),this.syncUniforms(i,a,e.textureWidth,e.textureHeight),r+=this.drawTextureElements(e,r);break;case 1:i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.primitive_frag,"primitive"),this.activeProgram(n,i),this.syncUniforms(i,a,e.textureWidth,e.textureHeight),r+=this.drawRectElements(e,r);break;case 2:i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.primitive_frag,"primitive"),this.activeProgram(n,i),this.syncUniforms(i,a,e.textureWidth,e.textureHeight),r+=this.drawPushMaskElements(e,r);break;case 3:i=t.EgretWebGLProgram.getProgram(n,t.EgretShaderLib.default_vert,t.EgretShaderLib.primitive_frag,"primitive"),this.activeProgram(n,i),this.syncUniforms(i,a,e.textureWidth,e.textureHeight),r+=this.drawPopMaskElements(e,r);break;case 4:this.setBlendMode(e.value);break;case 5:e.buffer.rootRenderTarget.resize(e.width,e.height),this.onResize(e.width,e.height);break;case 6:if(this.activatedBuffer){var o=this.activatedBuffer.rootRenderTarget;(0!=o.width||0!=o.height)&&o.clear(!0)}break;case 7:this.activateBuffer(e.buffer);break;case 8:var s=this.activatedBuffer;s&&(s.rootRenderTarget&&s.rootRenderTarget.enabledStencil(),s.enableScissor(e.x,e.y,e.width,e.height));break;case 9:s=this.activatedBuffer,s&&s.disableScissor();break;case 10:n.bindTexture(n.TEXTURE_2D,e.texture),e.smoothing?(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR)):(n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.NEAREST),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.NEAREST))}return r}},i.prototype.activeProgram=function(e,t){if(t!=this.currentProgram){e.useProgram(t.id);var r=t.attributes;for(var i in r)"aVertexPosition"===i?(e.vertexAttribPointer(r.aVertexPosition.location,2,e.FLOAT,!1,20,0),e.enableVertexAttribArray(r.aVertexPosition.location)):"aTextureCoord"===i?(e.vertexAttribPointer(r.aTextureCoord.location,2,e.FLOAT,!1,20,8),e.enableVertexAttribArray(r.aTextureCoord.location)):"aColor"===i&&(e.vertexAttribPointer(r.aColor.location,1,e.FLOAT,!1,20,16),e.enableVertexAttribArray(r.aColor.location));this.currentProgram=t}},i.prototype.syncUniforms=function(e,t,r,i){var n=e.uniforms;t&&"custom"===t.type;for(var a in n)if("projectionVector"===a)n[a].setValue({x:this.projectionX,y:this.projectionY});else if("uTextureSize"===a)n[a].setValue({x:r,y:i});else if("uSampler"===a);else{var o=t.$uniforms[a];void 0!==o&&n[a].setValue(o)}},i.prototype.drawTextureElements=function(e,t){var r=this.context;r.bindTexture(r.TEXTURE_2D,e.texture);var i=3*e.count;return r.drawElements(r.TRIANGLES,i,r.UNSIGNED_SHORT,2*t),i},i.prototype.drawRectElements=function(e,t){var r=this.context,i=3*e.count;return r.drawElements(r.TRIANGLES,i,r.UNSIGNED_SHORT,2*t),i},i.prototype.drawPushMaskElements=function(e,t){var r=this.context,i=3*e.count,n=this.activatedBuffer;if(n){n.rootRenderTarget&&n.rootRenderTarget.enabledStencil(),0==n.stencilHandleCount&&(n.enableStencil(),r.clear(r.STENCIL_BUFFER_BIT));var a=n.stencilHandleCount;n.stencilHandleCount++,r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,a,255),r.stencilOp(r.KEEP,r.KEEP,r.INCR),r.drawElements(r.TRIANGLES,i,r.UNSIGNED_SHORT,2*t),r.stencilFunc(r.EQUAL,a+1,255),r.colorMask(!0,!0,!0,!0),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)}return i},i.prototype.drawPopMaskElements=function(e,t){var r=this.context,i=3*e.count,n=this.activatedBuffer;if(n)if(n.stencilHandleCount--,0==n.stencilHandleCount)n.disableStencil();else{var a=n.stencilHandleCount;r.colorMask(!1,!1,!1,!1),r.stencilFunc(r.EQUAL,a+1,255),r.stencilOp(r.KEEP,r.KEEP,r.DECR),r.drawElements(r.TRIANGLES,i,r.UNSIGNED_SHORT,2*t),r.stencilFunc(r.EQUAL,a,255),r.colorMask(!0,!0,!0,!0),r.stencilOp(r.KEEP,r.KEEP,r.KEEP)}return i},i.prototype.setBlendMode=function(e){var t=this.context,r=i.blendModesForGL[e];r&&t.blendFunc(r[0],r[1])},i.prototype.drawTargetWidthFilters=function(e,r){var i,n=r,a=e.length;if(a>1)for(var o=0;a-1>o;o++){var s=e[o],l=r.rootRenderTarget.width,c=r.rootRenderTarget.height;i=t.WebGLRenderBuffer.create(l,c),i.setTransform(1,0,0,1,0,0),i.globalAlpha=1,this.drawToRenderTarget(s,r,i),r!=n&&t.WebGLRenderBuffer.release(r),r=i}var h=e[a-1];this.drawToRenderTarget(h,r,this.currentBuffer),r!=n&&t.WebGLRenderBuffer.release(r)},i.prototype.drawToRenderTarget=function(e,r,i){if(!this.contextLost){this.vao.reachMaxSize()&&this.$drawWebGL(),this.pushBuffer(i);var n,a=r,o=r.rootRenderTarget.width,s=r.rootRenderTarget.height;if("blur"==e.type){var l=e.blurXFilter,c=e.blurYFilter;0!=l.blurX&&0!=c.blurY?(n=t.WebGLRenderBuffer.create(o,s),n.setTransform(1,0,0,1,0,0),n.globalAlpha=1,this.drawToRenderTarget(e.blurXFilter,r,n),r!=a&&t.WebGLRenderBuffer.release(r),r=n,e=c):e=0===l.blurX?c:l}i.saveTransform(),i.transform(1,0,0,-1,0,s),this.vao.cacheArrays(i.globalMatrix,i.globalAlpha,0,0,o,s,0,0,o,s,o,s),i.restoreTransform(),this.drawCmdManager.pushDrawTexture(r.rootRenderTarget.texture,2,e,o,s),r!=a&&t.WebGLRenderBuffer.release(r),this.popBuffer()}},i.initBlendMode=function(){i.blendModesForGL={},i.blendModesForGL["source-over"]=[1,771],i.blendModesForGL.lighter=[1,1],i.blendModesForGL["lighter-in"]=[770,771],i.blendModesForGL["destination-out"]=[0,771],i.blendModesForGL["destination-in"]=[0,770]},i.glContextId=0,i.blendModesForGL=null,i}();t.WebGLRenderContext=i,__reflect(i.prototype,"egret.web.WebGLRenderContext"),i.initBlendMode()}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=function(r){function n(i,n,a){var o=r.call(this)||this;if(o.globalAlpha=1,o.stencilState=!1,o.$stencilList=[],o.stencilHandleCount=0,o.$scissorState=!1,o.scissorRect=new e.Rectangle,o.$hasScissor=!1,o.dirtyRegionPolicy=!0,o._dirtyRegionPolicy=!0,o.$drawCalls=0,o.$computeDrawCall=!1,o.globalMatrix=new e.Matrix,o.savedGlobalMatrix=new e.Matrix,o.context=t.WebGLRenderContext.getInstance(i,n),o.rootRenderTarget=new t.WebGLRenderTarget(o.context.context,3,3),i&&n&&o.resize(i,n),o.root=a,o.root)o.context.pushBuffer(o),o.surface=o.context.surface;else{var s=o.context.activatedBuffer;s&&s.rootRenderTarget.activate(),o.rootRenderTarget.initFrameBuffer(),o.surface=o.rootRenderTarget}return o}return __extends(n,r),n.prototype.enableStencil=function(){this.stencilState||(this.context.enableStencilTest(),this.stencilState=!0)},n.prototype.disableStencil=function(){this.stencilState&&(this.context.disableStencilTest(),this.stencilState=!1)},n.prototype.restoreStencil=function(){this.stencilState?this.context.enableStencilTest():this.context.disableStencilTest()},n.prototype.enableScissor=function(e,t,r,i){this.$scissorState||(this.$scissorState=!0,this.scissorRect.setTo(e,t,r,i),this.context.enableScissorTest(this.scissorRect))},n.prototype.disableScissor=function(){this.$scissorState&&(this.$scissorState=!1,this.scissorRect.setEmpty(),this.context.disableScissorTest())},n.prototype.restoreScissor=function(){this.$scissorState?this.context.enableScissorTest(this.scissorRect):this.context.disableScissorTest()},Object.defineProperty(n.prototype,"width",{get:function(){return this.rootRenderTarget.width},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"height",{get:function(){return this.rootRenderTarget.height},enumerable:!0,configurable:!0}),n.prototype.resize=function(e,t,r){this.context.pushBuffer(this),e=e||1,t=t||1,(e!=this.rootRenderTarget.width||t!=this.rootRenderTarget.height)&&(this.context.drawCmdManager.pushResize(this,e,t),this.rootRenderTarget.width=e,this.rootRenderTarget.height=t),this.root&&this.context.resize(e,t,r),this.context.clear(),this.context.popBuffer()},n.prototype.resizeTo=function(e,t,r,i){this.context.pushBuffer(this);var a=this.rootRenderTarget.width,o=this.rootRenderTarget.height,s=n.create(a,o);this.context.pushBuffer(s),this.context.drawImage(this.rootRenderTarget,0,0,a,o,0,0,a,o,a,o,!1),this.context.popBuffer(),this.resize(e,t),this.setTransform(1,0,0,1,0,0),this.context.drawImage(s.rootRenderTarget,0,0,a,o,r,i,a,o,a,o,!1),n.release(s),this.context.popBuffer()},n.prototype.setDirtyRegionPolicy=function(e){this.dirtyRegionPolicy="on"==e},n.prototype.beginClip=function(e,t,r){this.context.pushBuffer(this),this.root&&(this._dirtyRegionPolicy?(this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate()):(this.rootRenderTarget.useFrameBuffer=!1,this.rootRenderTarget.activate(),n.autoClear&&this.context.clear())),t=+t||0,r=+r||0,this.setTransform(1,0,0,1,t,r);e.length;this.maskPushed=!1,this.rootRenderTarget.useFrameBuffer&&this.context.clear(),this.context.popBuffer()},n.prototype.endClip=function(){(this.maskPushed||this.scissorEnabled)&&(this.context.pushBuffer(this),this.maskPushed&&(this.setTransform(1,0,0,1,this.offsetX,this.offsetY),this.context.popMask()),this.scissorEnabled&&this.context.disableScissor(),this.context.popBuffer())},n.prototype.getPixels=function(e,t,r,i){void 0===r&&(r=1),void 0===i&&(i=1);var n=new Uint8Array(4*r*i),a=this.rootRenderTarget.useFrameBuffer;this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate(),this.context.getPixels(e,t,r,i,n),this.rootRenderTarget.useFrameBuffer=a,this.rootRenderTarget.activate();for(var o=new Uint8Array(4*r*i),s=0;i>s;s++)for(var l=0;r>l;l++)o[4*(r*(i-s-1)+l)]=n[4*(r*s+l)],o[4*(r*(i-s-1)+l)+1]=n[4*(r*s+l)+1],o[4*(r*(i-s-1)+l)+2]=n[4*(r*s+l)+2],o[4*(r*(i-s-1)+l)+3]=n[4*(r*s+l)+3];return o},n.prototype.toDataURL=function(e,t){return this.context.surface.toDataURL(e,t)},n.prototype.destroy=function(){this.context.destroy()},n.prototype.onRenderFinish=function(){this.$drawCalls=0,this.root&&(!this._dirtyRegionPolicy&&this.dirtyRegionPolicy&&this.drawSurfaceToFrameBuffer(0,0,this.rootRenderTarget.width,this.rootRenderTarget.height,0,0,this.rootRenderTarget.width,this.rootRenderTarget.height,!0),this._dirtyRegionPolicy&&this.drawFrameBufferToSurface(0,0,this.rootRenderTarget.width,this.rootRenderTarget.height,0,0,this.rootRenderTarget.width,this.rootRenderTarget.height),this._dirtyRegionPolicy=this.dirtyRegionPolicy)},n.prototype.drawFrameBufferToSurface=function(e,t,r,i,n,a,o,s,l){void 0===l&&(l=!1),this.rootRenderTarget.useFrameBuffer=!1,this.rootRenderTarget.activate(),this.context.disableStencilTest(),this.context.disableScissorTest(),this.setTransform(1,0,0,1,0,0),this.globalAlpha=1,this.context.setGlobalCompositeOperation("source-over"),l&&this.context.clear(),this.context.drawImage(this.rootRenderTarget,e,t,r,i,n,a,o,s,r,i,!1),this.context.$drawWebGL(),this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate(),this.restoreStencil(),this.restoreScissor()},n.prototype.drawSurfaceToFrameBuffer=function(e,t,r,i,n,a,o,s,l){void 0===l&&(l=!1),this.rootRenderTarget.useFrameBuffer=!0,this.rootRenderTarget.activate(),this.context.disableStencilTest(),this.context.disableScissorTest(),this.setTransform(1,0,0,1,0,0),this.globalAlpha=1,this.context.setGlobalCompositeOperation("source-over"),l&&this.context.clear(),this.context.drawImage(this.context.surface,e,t,r,i,n,a,o,s,r,i,!1),this.context.$drawWebGL(),this.rootRenderTarget.useFrameBuffer=!1,this.rootRenderTarget.activate(),this.restoreStencil(),this.restoreScissor()},n.prototype.clear=function(){this.context.clear()},n.prototype.setTransform=function(e,t,r,i,n,a){var o=this.globalMatrix;o.a=e,o.b=t,o.c=r,o.d=i,o.tx=n,o.ty=a},n.prototype.transform=function(e,t,r,i,n,a){var o=this.globalMatrix,s=o.a,l=o.b,c=o.c,h=o.d;(1!=e||0!=t||0!=r||1!=i)&&(o.a=e*s+t*c,o.b=e*l+t*h,o.c=r*s+i*c,o.d=r*l+i*h),o.tx=n*s+a*c+o.tx,o.ty=n*l+a*h+o.ty},n.prototype.translate=function(e,t){var r=this.globalMatrix;r.tx+=e,r.ty+=t},n.prototype.saveTransform=function(){var e=this.globalMatrix,t=this.savedGlobalMatrix;t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.tx=e.tx,t.ty=e.ty},n.prototype.restoreTransform=function(){var e=this.globalMatrix,t=this.savedGlobalMatrix;e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.tx=t.tx,e.ty=t.ty},n.create=function(e,t){var r=i.pop();if(r){r.resize(e,t);var a=r.globalMatrix;a.a=1,a.b=0,a.c=0,a.d=1,a.tx=0,a.ty=0}else r=new n(e,t),r.$computeDrawCall=!1;return r},n.release=function(e){i.push(e)},n.autoClear=!0,n}(e.HashObject);t.WebGLRenderBuffer=r,__reflect(r.prototype,"egret.web.WebGLRenderBuffer",["egret.sys.RenderBuffer"]);var i=[]}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(t){var r=["source-over","lighter","destination-out"],i="source-over",n=[],a=function(){function a(){this.nestLevel=0}return a.prototype.render=function(e,t,r,i,a){this.nestLevel++;var o=t,s=o.context,l=a?e:null;s.pushBuffer(o),this.drawDisplayObject(e,o,i,r,null,null,l),s.$drawWebGL();var c=o.$drawCalls;if(o.onRenderFinish(),s.popBuffer(),this.nestLevel--,0===this.nestLevel){n.length>6&&(n.length=6);for(var h=n.length,u=0;h>u;u++)n[u].resize(0,0)}return c},a.prototype.drawDisplayObject=function(t,r,i,n,a,o,s){var l,c=0;if(a&&!s?((a.isDirty||a.$canvasScaleX!=e.sys.DisplayList.$canvasScaleX||a.$canvasScaleY!=e.sys.DisplayList.$canvasScaleY)&&(c+=a.drawToSurface()),l=a.$renderNode):l=t.$getRenderNode(),l){if(i){var h=l.renderRegion;if(o&&!o.intersects(h))l.needRedraw=!1;else if(!l.needRedraw)for(var u=i.length,d=0;u>d;d++)if(h.intersects(i[d])){l.needRedraw=!0;break}}else l.needRedraw=!0;if(l.needRedraw){c++;var p=void 0,f=void 0;s?(p=t.$getConcatenatedAlphaAt(s,t.$getConcatenatedAlpha()),f=e.Matrix.create().copyFrom(t.$getConcatenatedMatrix()),t.$getConcatenatedMatrixAt(s,f)):(p=l.renderAlpha,f=e.Matrix.create().copyFrom(l.renderMatrix));var g=f.a*n.a,v=0,y=0,m=f.d*n.d,x=f.tx*n.a+n.tx*n.a,b=f.ty*n.d+n.ty*n.d;(0!==f.b||0!==f.c||0!==n.b||0!==n.c)&&(g+=f.b*n.c,m+=f.c*n.b,v+=f.a*n.b+f.b*n.d,y+=f.c*n.a+f.d*n.c,x+=f.ty*n.c,b+=f.tx*n.b),f.a=g,f.b=v,f.c=y,f.d=m,f.tx=x,f.ty=b,r.setTransform(f.a,f.b,f.c,f.d,f.tx,f.ty),e.Matrix.release(f),r.globalAlpha=p,this.renderNode(l,r),l.needRedraw=!1}}if(a&&!s)return c;var w=t.$children;if(w)for(var E=w.length,T=0;E>T;T++){var _=w[T];if(!(!_.$visible||_.$alpha<=0||_.$maskedObject)){var S=_.$getFilters();S&&S.length>0?c+=this.drawWithFilter(_,r,i,n,o,s):0!==_.$blendMode||_.$mask&&(_.$mask.$parentDisplayList||s)?c+=this.drawWithClip(_,r,i,n,o,s):_.$scrollRect||_.$maskRect?c+=this.drawWithScrollRect(_,r,i,n,o,s):_.isFPS?(r.context.$drawWebGL(),r.$computeDrawCall=!1,this.drawDisplayObject(_,r,i,n,_.$displayList,o,s),r.context.$drawWebGL(),r.$computeDrawCall=!0):c+=this.drawDisplayObject(_,r,i,n,_.$displayList,o,s)}}return c},a.prototype.drawWithFilter=function(t,a,o,s,l,c){var h=0;if(!t.$children||0!=t.$children.length||t.$renderNode&&0!=t.$renderNode.$getRenderCount()){var u,d=t.$getFilters(),p=0!==t.$blendMode;p&&(u=r[t.$blendMode],u||(u=i));var f=t.$getOriginalBounds();if(f.width<=0||f.height<=0)return h;if(!t.mask&&1==d.length&&("colorTransform"==d[0].type||"custom"===d[0].type&&0===d[0].padding)){var g=this.getRenderCount(t);if(!t.$children||1==g)return p&&a.context.setGlobalCompositeOperation(u),a.context.$filter=d[0],h+=t.$scrollRect||t.$maskRect?this.drawWithScrollRect(t,a,o,s,l,c):this.drawDisplayObject(t,a,o,s,t.$displayList,l,c),a.context.$filter=null,p&&a.context.setGlobalCompositeOperation(i),h}var v=e.Matrix.create();v.copyFrom(t.$getConcatenatedMatrix()),c&&t.$getConcatenatedMatrixAt(c,v);var y;y=e.sys.Region.create(),y.updateRegion(f,v);var m=this.createRenderBuffer(y.width*s.a,y.height*s.d);m.context.pushBuffer(m),m.setTransform(s.a,0,0,s.d,-y.minX,-y.minY);var x=e.Matrix.create().setTo(s.a,0,0,s.d,-y.minX,-y.minY);return h+=t.$mask&&(t.$mask.$parentDisplayList||c)?this.drawWithClip(t,m,o,x,y,c):t.$scrollRect||t.$maskRect?this.drawWithScrollRect(t,m,o,x,y,c):this.drawDisplayObject(t,m,o,x,t.$displayList,y,c),e.Matrix.release(x),m.context.popBuffer(),h>0&&(p&&a.context.setGlobalCompositeOperation(u),h++,a.globalAlpha=1,a.setTransform(1,0,0,1,(y.minX+s.tx)*s.a,(y.minY+s.ty)*s.d),a.context.drawTargetWidthFilters(d,m),p&&a.context.setGlobalCompositeOperation(i)),n.push(m),e.sys.Region.release(y),e.Matrix.release(v),h }},a.prototype.getRenderCount=function(e){var t=0;if(e.$children)for(var r=0,i=e.$children;rS;S++)if(E.intersects(o[S])){T=!0;break}}else T=!0;if(!T)return e.sys.Region.release(E),e.Matrix.release(m),u;if(f||t.$children&&0!=t.$children.length){var C=this.createRenderBuffer(E.width*s.a,E.height*s.d);C.context.pushBuffer(C),C.setTransform(s.a,0,0,s.d,-E.minX,-E.minY);var L=e.Matrix.create().setTo(s.a,0,0,s.d,-E.minX,-E.minY);if(u+=this.drawDisplayObject(t,C,o,L,t.$displayList,E,c),f){var R=this.createRenderBuffer(E.width*s.a,E.height*s.d);R.context.pushBuffer(R),R.setTransform(s.a,0,0,s.d,-E.minX,-E.minY);var A=e.Matrix.create().setTo(s.a,0,0,s.d,-E.minX,-E.minY);u+=this.drawDisplayObject(f,R,o,A,f.$displayList,E,c),e.Matrix.release(A),R.context.popBuffer(),C.context.setGlobalCompositeOperation("destination-in"),C.setTransform(1,0,0,-1,0,R.height),C.globalAlpha=1;var D=R.rootRenderTarget.width,O=R.rootRenderTarget.height;C.context.drawTexture(R.rootRenderTarget.texture,0,0,D,O,0,0,D,O,D,O),C.context.setGlobalCompositeOperation("source-over"),n.push(R)}if(e.Matrix.release(L),C.context.setGlobalCompositeOperation(i),C.context.popBuffer(),u>0){if(u++,d&&a.context.setGlobalCompositeOperation(h),p){var w=m;s.$preMultiplyInto(w,w),C.setTransform(w.a,w.b,w.c,w.d,w.tx,w.ty),C.context.pushMask(p)}a.globalAlpha=1,a.setTransform(1,0,0,-1,(E.minX+s.tx)*s.a,(E.minY+s.ty)*s.d+C.height);var I=C.rootRenderTarget.width,M=C.rootRenderTarget.height;a.context.drawTexture(C.rootRenderTarget.texture,0,0,I,M,0,0,I,M,I,M),p&&C.context.popMask(),d&&a.context.setGlobalCompositeOperation(i)}return n.push(C),e.sys.Region.release(E),e.Matrix.release(m),u}if(p){var w=m;a.setTransform(w.a,w.b,w.c,w.d,w.tx,w.ty),a.context.pushMask(p)}return d&&a.context.setGlobalCompositeOperation(h),u+=this.drawDisplayObject(t,a,o,s,t.$displayList,l,c),d&&a.context.setGlobalCompositeOperation(i),p&&a.context.popMask(),e.sys.Region.release(E),e.Matrix.release(m),u},a.prototype.drawWithScrollRect=function(t,r,i,n,a,o){var s=0,l=t.$scrollRect?t.$scrollRect:t.$maskRect;if(l.isEmpty())return s;var c=e.Matrix.create();if(c.copyFrom(t.$getConcatenatedMatrix()),o)t.$getConcatenatedMatrixAt(o,c);else if(t.$parentDisplayList){var h=t.$parentDisplayList.root;h!==t.$stage&&t.$getConcatenatedMatrixAt(h,c)}var u=e.sys.Region.create();if(u.updateRegion(l,c),u.isEmpty()||a&&!a.intersects(u))return e.sys.Region.release(u),e.Matrix.release(c),s;var d=!1;if(i){for(var p=i.length,f=0;p>f;f++)if(u.intersects(i[f])){d=!0;break}}else d=!0;if(!d)return e.sys.Region.release(u),e.Matrix.release(c),s;n.$preMultiplyInto(c,c),r.setTransform(c.a,c.b,c.c,c.d,c.tx,c.ty);var g=r.context,v=!1;if(r.$hasScissor||0!=c.b||0!=c.c)g.pushMask(l);else{var y=c.a,m=c.d,x=c.tx,b=c.ty,w=l.x,E=l.y,T=w+l.width,_=E+l.height,S=void 0,C=void 0,L=void 0,R=void 0;if(1==y&&1==m)S=w+x,C=E+b,L=T+x,R=_+b;else{var A=y*w+x,D=m*E+b,O=y*T+x,I=m*E+b,M=y*T+x,B=m*_+b,$=y*w+x,P=m*_+b,F=0;A>O&&(F=A,A=O,O=F),M>$&&(F=M,M=$,$=F),S=M>A?A:M,L=O>$?O:$,D>I&&(F=D,D=I,I=F),B>P&&(F=B,B=P,P=F),C=B>D?D:B,R=I>P?I:P}g.enableScissor(S,-R+r.height,L-S,R-C),v=!0}return s+=this.drawDisplayObject(t,r,i,n,t.$displayList,u,o),r.setTransform(c.a,c.b,c.c,c.d,c.tx+n.tx,c.ty+n.ty),v?g.disableScissor():g.popMask(),e.sys.Region.release(u),e.Matrix.release(c),s},a.prototype.drawNodeToBuffer=function(e,t,r,i){var n=t;n.context.pushBuffer(n),n.setTransform(r.a,r.b,r.c,r.d,r.tx,r.ty),this.renderNode(e,t,i),n.context.$drawWebGL(),n.onRenderFinish(),n.context.popBuffer()},a.prototype.renderNode=function(e,t,r){switch(e.type){case 1:this.renderBitmap(e,t);break;case 2:this.renderText(e,t);break;case 3:this.renderGraphics(e,t,r);break;case 4:this.renderGroup(e,t);break;case 6:t.globalAlpha=e.drawData[0];break;case 7:this.renderMesh(e,t)}},a.prototype.renderBitmap=function(e,t){var n=e.image;if(n){var a=e.drawData,o=a.length,s=0,l=e.matrix,c=e.blendMode,h=e.alpha;l&&(t.saveTransform(),t.transform(l.a,l.b,l.c,l.d,l.tx,l.ty)),c&&t.context.setGlobalCompositeOperation(r[c]);var u;if(h==h&&(u=t.globalAlpha,t.globalAlpha*=h),e.filter){for(t.context.$filter=e.filter;o>s;)t.context.drawImage(n,a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],e.imageWidth,e.imageHeight,e.rotated,e.smoothing);t.context.$filter=null}else for(;o>s;)t.context.drawImage(n,a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],e.imageWidth,e.imageHeight,e.rotated,e.smoothing);c&&t.context.setGlobalCompositeOperation(i),h==h&&(t.globalAlpha=u),l&&t.restoreTransform()}},a.prototype.renderMesh=function(e,t){var n=e.image,a=e.drawData,o=a.length,s=0,l=e.matrix,c=e.blendMode,h=e.alpha;l&&(t.saveTransform(),t.transform(l.a,l.b,l.c,l.d,l.tx,l.ty)),c&&t.context.setGlobalCompositeOperation(r[c]);var u;if(h==h&&(u=t.globalAlpha,t.globalAlpha*=h),e.filter){for(t.context.$filter=e.filter;o>s;)t.context.drawMesh(n,a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],e.imageWidth,e.imageHeight,e.uvs,e.vertices,e.indices,e.bounds,e.rotated,e.smoothing);t.context.$filter=null}else for(;o>s;)t.context.drawMesh(n,a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],a[s++],e.imageWidth,e.imageHeight,e.uvs,e.vertices,e.indices,e.bounds,e.rotated,e.smoothing);c&&t.context.setGlobalCompositeOperation(i),h==h&&(t.globalAlpha=u),l&&t.restoreTransform()},a.prototype.renderText=function(r,i){var n=r.width-r.x,a=r.height-r.y,o=e.sys.DisplayList.$canvasScaleX,s=e.sys.DisplayList.$canvasScaleY,l=i.context.$maxTextureSize;n*o>l&&(o*=l/(n*o)),a*s>l&&(s*=l/(a*s)),n*=o,a*=s;var c=r.x*o,h=r.y*s;if(0!=r.drawData.length&&((r.$canvasScaleX!=o||r.$canvasScaleY!=s)&&(r.$canvasScaleX=o,r.$canvasScaleY=s,r.dirtyRender=!0),this.canvasRenderBuffer&&this.canvasRenderBuffer.context?r.dirtyRender&&this.canvasRenderBuffer.resize(n,a):(this.canvasRenderer=new e.CanvasRenderer,this.canvasRenderBuffer=new t.CanvasRenderBuffer(n,a)),this.canvasRenderBuffer.context)){if(c||h?(r.dirtyRender&&this.canvasRenderBuffer.context.setTransform(o,0,0,s,-c,-h),i.transform(1,0,0,1,c/o,h/s)):(1!=o||1!=s)&&this.canvasRenderBuffer.context.setTransform(o,0,0,s,0,0),r.dirtyRender){var u=this.canvasRenderBuffer.surface;this.canvasRenderer.renderText(r,this.canvasRenderBuffer.context);var d=r.$texture;d?i.context.updateTexture(d,u):(d=i.context.createTexture(u),r.$texture=d),r.$textureWidth=u.width,r.$textureHeight=u.height}var p=r.$textureWidth,f=r.$textureHeight;i.context.drawTexture(r.$texture,0,0,p,f,0,0,p/o,f/s,p,f),(c||h)&&(r.dirtyRender&&this.canvasRenderBuffer.context.setTransform(o,0,0,s,0,0),i.transform(1,0,0,1,-c/o,-h/s)),r.dirtyRender=!1}},a.prototype.renderGraphics=function(r,i,n){var a=r.width,o=r.height;if(!(0>=a||0>=o)&&a&&o&&0!=r.drawData.length){var s=e.sys.DisplayList.$canvasScaleX,l=e.sys.DisplayList.$canvasScaleY;(1>a*s||1>o*l)&&(s=l=1),(r.$canvasScaleX!=s||r.$canvasScaleY!=l)&&(r.$canvasScaleX=s,r.$canvasScaleY=l,r.dirtyRender=!0),a*=s,o*=l;var c=Math.ceil(a),h=Math.ceil(o);if(s*=c/a,l*=h/o,a=c,o=h,this.canvasRenderBuffer&&this.canvasRenderBuffer.context?(r.dirtyRender||n)&&this.canvasRenderBuffer.resize(a,o):(this.canvasRenderer=new e.CanvasRenderer,this.canvasRenderBuffer=new t.CanvasRenderBuffer(a,o)),this.canvasRenderBuffer.context){(1!=s||1!=l)&&this.canvasRenderBuffer.context.setTransform(s,0,0,l,0,0),(r.x||r.y)&&((r.dirtyRender||n)&&this.canvasRenderBuffer.context.translate(-r.x,-r.y),i.transform(1,0,0,1,r.x,r.y));var u=this.canvasRenderBuffer.surface;if(n){this.canvasRenderer.renderGraphics(r,this.canvasRenderBuffer.context,!0),e.WebGLUtils.deleteWebGLTexture(u);var d=i.context.getWebGLTexture(u);i.context.drawTexture(d,0,0,a,o,0,0,a,o,u.width,u.height)}else{if(r.dirtyRender){this.canvasRenderer.renderGraphics(r,this.canvasRenderBuffer.context);var d=r.$texture;d?i.context.updateTexture(d,u):(d=i.context.createTexture(u),r.$texture=d),r.$textureWidth=u.width,r.$textureHeight=u.height}var p=r.$textureWidth,f=r.$textureHeight;i.context.drawTexture(r.$texture,0,0,p,f,0,0,p/s,f/l,p,f)}(r.x||r.y)&&((r.dirtyRender||n)&&this.canvasRenderBuffer.context.translate(r.x,r.y),i.transform(1,0,0,1,-r.x,-r.y)),n||(r.dirtyRender=!1)}}},a.prototype.renderGroup=function(e,t){var r=e.matrix;r&&(t.saveTransform(),t.transform(r.a,r.b,r.c,r.d,r.tx,r.ty));for(var i=e.drawData,n=i.length,a=0;n>a;a++){var o=i[a];this.renderNode(o,t)}r&&t.restoreTransform()},a.prototype.createRenderBuffer=function(e,r){var i=n.pop();return i?i.resize(e,r):(i=new t.WebGLRenderBuffer(e,r),i.$computeDrawCall=!1),i},a}();t.WebGLRenderer=a,__reflect(a.prototype,"egret.web.WebGLRenderer",["egret.sys.SystemRenderer"])}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(e){var t;!function(e){e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.FLOAT=5126]="FLOAT",e[e.BYTE=65535]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT"}(t=e.WEBGL_ATTRIBUTE_TYPE||(e.WEBGL_ATTRIBUTE_TYPE={}));var r=function(){function e(e,t,r){this.gl=e,this.name=r.name,this.type=r.type,this.size=r.size,this.location=e.getAttribLocation(t,this.name),this.count=0,this.initCount(e),this.format=e.FLOAT,this.initFormat(e)}return e.prototype.initCount=function(e){var r=this.type;switch(r){case t.FLOAT:case t.BYTE:case t.UNSIGNED_BYTE:case t.UNSIGNED_SHORT:this.count=1;break;case t.FLOAT_VEC2:this.count=2;break;case t.FLOAT_VEC3:this.count=3;break;case t.FLOAT_VEC4:this.count=4}},e.prototype.initFormat=function(e){var r=this.type;switch(r){case t.FLOAT:case t.FLOAT_VEC2:case t.FLOAT_VEC3:case t.FLOAT_VEC4:this.format=e.FLOAT;break;case t.UNSIGNED_BYTE:this.format=e.UNSIGNED_BYTE;break;case t.UNSIGNED_SHORT:this.format=e.UNSIGNED_SHORT;break;case t.BYTE:this.format=e.BYTE}},e}();e.EgretWebGLAttribute=r,__reflect(r.prototype,"egret.web.EgretWebGLAttribute")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(e){function t(e,t,r){var i=e.createShader(t);e.shaderSource(i,r),e.compileShader(i);var n=e.getShaderParameter(i,e.COMPILE_STATUS);return n||(console.log("shader not compiled!"),console.log(e.getShaderInfoLog(i))),i}function r(e,t,r){var i=e.createProgram();return e.attachShader(i,t),e.attachShader(i,r),e.linkProgram(i),i}function i(t,r){for(var i={},n=t.getProgramParameter(r,t.ACTIVE_ATTRIBUTES),a=0;n>a;a++){var o=t.getActiveAttrib(r,a),s=o.name,l=new e.EgretWebGLAttribute(t,r,o);i[s]=l}return i}function n(t,r){for(var i={},n=t.getProgramParameter(r,t.ACTIVE_UNIFORMS),a=0;n>a;a++){var o=t.getActiveUniform(r,a),s=o.name,l=new e.EgretWebGLUniform(t,r,o);i[s]=l}return i}var a=function(){function e(e,a,o){this.vshaderSource=a,this.fshaderSource=o,this.vertexShader=t(e,e.VERTEX_SHADER,this.vshaderSource),this.fragmentShader=t(e,e.FRAGMENT_SHADER,this.fshaderSource),this.id=r(e,this.vertexShader,this.fragmentShader),this.uniforms=n(e,this.id),this.attributes=i(e,this.id)}return e.getProgram=function(t,r,i,n){return this.programCache[n]||(this.programCache[n]=new e(t,r,i)),this.programCache[n]},e.deleteProgram=function(e,t,r,i){},e.programCache={},e}();e.EgretWebGLProgram=a,__reflect(a.prototype,"egret.web.EgretWebGLProgram")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(e){var t;!function(e){e[e.FLOAT_VEC2=35664]="FLOAT_VEC2",e[e.FLOAT_VEC3=35665]="FLOAT_VEC3",e[e.FLOAT_VEC4=35666]="FLOAT_VEC4",e[e.INT_VEC2=35667]="INT_VEC2",e[e.INT_VEC3=35668]="INT_VEC3",e[e.INT_VEC4=35669]="INT_VEC4",e[e.BOOL=35670]="BOOL",e[e.BOOL_VEC2=35671]="BOOL_VEC2",e[e.BOOL_VEC3=35672]="BOOL_VEC3",e[e.BOOL_VEC4=35673]="BOOL_VEC4",e[e.FLOAT_MAT2=35674]="FLOAT_MAT2",e[e.FLOAT_MAT3=35675]="FLOAT_MAT3",e[e.FLOAT_MAT4=35676]="FLOAT_MAT4",e[e.SAMPLER_2D=35678]="SAMPLER_2D",e[e.SAMPLER_CUBE=35680]="SAMPLER_CUBE",e[e.BYTE=65535]="BYTE",e[e.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",e[e.SHORT=5122]="SHORT",e[e.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",e[e.INT=5124]="INT",e[e.UNSIGNED_INT=5125]="UNSIGNED_INT",e[e.FLOAT=5126]="FLOAT"}(t=e.WEBGL_UNIFORM_TYPE||(e.WEBGL_UNIFORM_TYPE={}));var r=function(){function e(e,t,r){this.gl=e,this.name=r.name,this.type=r.type,this.size=r.size,this.location=e.getUniformLocation(t,this.name),this.setDefaultValue(),this.generateSetValue(),this.generateUpload()}return e.prototype.setDefaultValue=function(){var e=this.type;switch(e){case t.FLOAT:case t.SAMPLER_2D:case t.SAMPLER_CUBE:case t.BOOL:case t.INT:this.value=0;break;case t.FLOAT_VEC2:case t.BOOL_VEC2:case t.INT_VEC2:this.value=[0,0];break;case t.FLOAT_VEC3:case t.BOOL_VEC3:case t.INT_VEC3:this.value=[0,0,0];break;case t.FLOAT_VEC4:case t.BOOL_VEC4:case t.INT_VEC4:this.value=[0,0,0,0];break;case t.FLOAT_MAT2:this.value=new Float32Array([1,0,0,1]);break;case t.FLOAT_MAT3:this.value=new Float32Array([1,0,0,0,1,0,0,0,1]);break;case t.FLOAT_MAT4:this.value=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}},e.prototype.generateSetValue=function(){var e=this.type;switch(e){case t.FLOAT:case t.SAMPLER_2D:case t.SAMPLER_CUBE:case t.BOOL:case t.INT:this.setValue=function(e){var t=this.value!==e;this.value=e,t&&this.upload()};break;case t.FLOAT_VEC2:case t.BOOL_VEC2:case t.INT_VEC2:this.setValue=function(e){var t=this.value[0]!==e.x||this.value[1]!==e.y;this.value[0]=e.x,this.value[1]=e.y,t&&this.upload()};break;case t.FLOAT_VEC3:case t.BOOL_VEC3:case t.INT_VEC3:this.setValue=function(e){this.value[0]=e.x,this.value[1]=e.y,this.value[2]=e.z,this.upload()};break;case t.FLOAT_VEC4:case t.BOOL_VEC4:case t.INT_VEC4:this.setValue=function(e){this.value[0]=e.x,this.value[1]=e.y,this.value[2]=e.z,this.value[3]=e.w,this.upload()};break;case t.FLOAT_MAT2:case t.FLOAT_MAT3:case t.FLOAT_MAT4:this.setValue=function(e){this.value.set(e),this.upload()}}},e.prototype.generateUpload=function(){var e=this.gl,r=this.type,i=this.location;switch(r){case t.FLOAT:this.upload=function(){var t=this.value;e.uniform1f(i,t)};break;case t.FLOAT_VEC2:this.upload=function(){var t=this.value;e.uniform2f(i,t[0],t[1])};break;case t.FLOAT_VEC3:this.upload=function(){var t=this.value;e.uniform3f(i,t[0],t[1],t[2])};break;case t.FLOAT_VEC4:this.upload=function(){var t=this.value;e.uniform4f(i,t[0],t[1],t[2],t[3])};break;case t.SAMPLER_2D:case t.SAMPLER_CUBE:case t.BOOL:case t.INT:this.upload=function(){var t=this.value;e.uniform1i(i,t)};break;case t.BOOL_VEC2:case t.INT_VEC2:this.upload=function(){var t=this.value;e.uniform2i(i,t[0],t[1])};break;case t.BOOL_VEC3:case t.INT_VEC3:this.upload=function(){var t=this.value;e.uniform3i(i,t[0],t[1],t[2])};break;case t.BOOL_VEC4:case t.INT_VEC4:this.upload=function(){var t=this.value;e.uniform4i(i,t[0],t[1],t[2],t[3])};break;case t.FLOAT_MAT2:this.upload=function(){var t=this.value;e.uniformMatrix2fv(i,!1,t)};break;case t.FLOAT_MAT3:this.upload=function(){var t=this.value;e.uniformMatrix3fv(i,!1,t)};break;case t.FLOAT_MAT4:this.upload=function(){var t=this.value;e.uniformMatrix4fv(i,!1,t)}}},e}();e.EgretWebGLUniform=r,__reflect(r.prototype,"egret.web.EgretWebGLUniform")}(t=e.web||(e.web={}))}(egret||(egret={}));var egret;!function(e){var t;!function(e){var t=function(){function e(){}return e.blur_frag="precision mediump float;\nuniform vec2 blur;\nuniform sampler2D uSampler;\nvarying vec2 vTextureCoord;\nuniform vec2 uTextureSize;\nvoid main()\n{\n const int sampleRadius = 5;\n const int samples = sampleRadius * 2 + 1;\n vec2 blurUv = blur / uTextureSize;\n vec4 color = vec4(0, 0, 0, 0);\n vec2 uv = vec2(0.0, 0.0);\n blurUv /= float(sampleRadius);\n for (int i = -sampleRadius; i <= sampleRadius; i++) {\n uv.x = vTextureCoord.x + float(i) * blurUv.x;\n uv.y = vTextureCoord.y + float(i) * blurUv.y;\n color += texture2D(uSampler, uv);\n }\n color /= float(samples);\n gl_FragColor = color;\n}",e.colorTransform_frag="precision mediump float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform mat4 matrix;\nuniform vec4 colorAdd;\nuniform sampler2D uSampler;\nvoid main(void) {\n vec4 texColor = texture2D(uSampler, vTextureCoord);\n if(texColor.a > 0.) {\n texColor = vec4(texColor.rgb / texColor.a, texColor.a);\n }\n vec4 locColor = clamp(texColor * matrix + colorAdd, 0., 1.);\n gl_FragColor = vColor * vec4(locColor.rgb * locColor.a, locColor.a);\n}",e.default_vert="attribute vec2 aVertexPosition;\nattribute vec2 aTextureCoord;\nattribute vec2 aColor;\nuniform vec2 projectionVector;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nconst vec2 center = vec2(-1.0, 1.0);\nvoid main(void) {\n gl_Position = vec4( (aVertexPosition / projectionVector) + center , 0.0, 1.0);\n vTextureCoord = aTextureCoord;\n vColor = vec4(aColor.x, aColor.x, aColor.x, aColor.x);\n}",e.glow_frag="precision mediump float;\nvarying vec2 vTextureCoord;\nuniform sampler2D uSampler;\nuniform float dist;\nuniform float angle;\nuniform vec4 color;\nuniform float alpha;\nuniform float blurX;\nuniform float blurY;\nuniform float strength;\nuniform float inner;\nuniform float knockout;\nuniform float hideObject;\nuniform vec2 uTextureSize;\nfloat random(vec3 scale, float seed)\n{\n return fract(sin(dot(gl_FragCoord.xyz + seed, scale)) * 43758.5453 + seed);\n}\nvoid main(void) {\n vec2 px = vec2(1.0 / uTextureSize.x, 1.0 / uTextureSize.y);\n const float linearSamplingTimes = 7.0;\n const float circleSamplingTimes = 12.0;\n vec4 ownColor = texture2D(uSampler, vTextureCoord);\n vec4 curColor;\n float totalAlpha = 0.0;\n float maxTotalAlpha = 0.0;\n float curDistanceX = 0.0;\n float curDistanceY = 0.0;\n float offsetX = dist * cos(angle) * px.x;\n float offsetY = dist * sin(angle) * px.y;\n const float PI = 3.14159265358979323846264;\n float cosAngle;\n float sinAngle;\n float offset = PI * 2.0 / circleSamplingTimes * random(vec3(12.9898, 78.233, 151.7182), 0.0);\n float stepX = blurX * px.x / linearSamplingTimes;\n float stepY = blurY * px.y / linearSamplingTimes;\n for (float a = 0.0; a <= PI * 2.0; a += PI * 2.0 / circleSamplingTimes) {\n cosAngle = cos(a + offset);\n sinAngle = sin(a + offset);\n for (float i = 1.0; i <= linearSamplingTimes; i++) {\n curDistanceX = i * stepX * cosAngle;\n curDistanceY = i * stepY * sinAngle;\n \n curColor = texture2D(uSampler, vec2(vTextureCoord.x + curDistanceX - offsetX, vTextureCoord.y + curDistanceY + offsetY));\n totalAlpha += (linearSamplingTimes - i) * curColor.a;\n maxTotalAlpha += (linearSamplingTimes - i);\n }\n }\n ownColor.a = max(ownColor.a, 0.0001);\n ownColor.rgb = ownColor.rgb / ownColor.a;\n float outerGlowAlpha = (totalAlpha / maxTotalAlpha) * strength * alpha * (1. - inner) * max(min(hideObject, knockout), 1. - ownColor.a);\n float innerGlowAlpha = ((maxTotalAlpha - totalAlpha) / maxTotalAlpha) * strength * alpha * inner * ownColor.a;\n ownColor.a = max(ownColor.a * knockout * (1. - hideObject), 0.0001);\n vec3 mix1 = mix(ownColor.rgb, color.rgb, innerGlowAlpha / (innerGlowAlpha + ownColor.a));\n vec3 mix2 = mix(mix1, color.rgb, outerGlowAlpha / (innerGlowAlpha + ownColor.a + outerGlowAlpha));\n float resultAlpha = min(ownColor.a + outerGlowAlpha + innerGlowAlpha, 1.);\n gl_FragColor = vec4(mix2 * resultAlpha, resultAlpha);\n}",e.primitive_frag="precision lowp float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nvoid main(void) {\n gl_FragColor = vColor;\n}",e.texture_frag="precision lowp float;\nvarying vec2 vTextureCoord;\nvarying vec4 vColor;\nuniform sampler2D uSampler;\nvoid main(void) {\n gl_FragColor = texture2D(uSampler, vTextureCoord) * vColor;\n}",e}();e.EgretShaderLib=t,__reflect(t.prototype,"egret.web.EgretShaderLib")}(t=e.web||(e.web={}))}(egret||(egret={})); //libs/modules/socket/socket.min.js var __reflect=this&&this.__reflect||function(t,e,o){t.__class__=e,o?o.push(e):o=[e],t.__types__=t.__types__?o.concat(t.__types__):o},__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),egret;!function(t){}(egret||(egret={}));var egret;!function(t){var e=function(e){function o(n,i){void 0===n&&(n=""),void 0===i&&(i=0);var s=e.call(this)||this;return s._writeMessage="",s._readMessage="",s._connected=!1,s._connecting=!1,s._isReadySend=!1,s._bytesWrite=!1,s._type=o.TYPE_STRING,s._connected=!1,s._writeMessage="",s._readMessage="",s.socket=new t.ISocket,s.socket.addCallBacks(s.onConnect,s.onClose,s.onSocketData,s.onError,s),s}return __extends(o,e),o.prototype.connect=function(t,e){this._connecting||this._connected||(this._connecting=!0,this.socket.connect(t,e))},o.prototype.connectByUrl=function(t){this._connecting||this._connected||(this._connecting=!0,this.socket.connectByUrl(t))},o.prototype.close=function(){this._connected&&this.socket.close()},o.prototype.onConnect=function(){this._connected=!0,this._connecting=!1,this.dispatchEventWith(t.Event.CONNECT)},o.prototype.onClose=function(){this._connected=!1,this.dispatchEventWith(t.Event.CLOSE)},o.prototype.onError=function(){this._connecting&&(this._connecting=!1),this.dispatchEventWith(t.IOErrorEvent.IO_ERROR)},o.prototype.onSocketData=function(e){"string"==typeof e?this._readMessage+=e:this._readByte._writeUint8Array(new Uint8Array(e)),t.ProgressEvent.dispatchProgressEvent(this,t.ProgressEvent.SOCKET_DATA)},o.prototype.flush=function(){return this._connected?(this._writeMessage&&(this.socket.send(this._writeMessage),this._writeMessage=""),this._bytesWrite&&(this.socket.send(this._writeByte.buffer),this._bytesWrite=!1,this._writeByte.clear()),void(this._isReadySend=!1)):void t.$warn(3101)},o.prototype.writeUTF=function(e){return this._connected?(this._type==o.TYPE_BINARY?(this._bytesWrite=!0,this._writeByte.writeUTF(e)):this._writeMessage+=e,void this.flush()):void t.$warn(3101)},o.prototype.readUTF=function(){var t;return this._type==o.TYPE_BINARY?(this._readByte.position=0,t=this._readByte.readUTF(),this._readByte.clear()):(t=this._readMessage,this._readMessage=""),t},o.prototype.writeBytes=function(e,o,n){return void 0===o&&(o=0),void 0===n&&(n=0),this._connected?this._writeByte?(this._bytesWrite=!0,this._writeByte.writeBytes(e,o,n),void this.flush()):void t.$warn(3102):void t.$warn(3101)},o.prototype.readBytes=function(e,o,n){return void 0===o&&(o=0),void 0===n&&(n=0),this._readByte?(this._readByte.position=0,this._readByte.readBytes(e,o,n),void this._readByte.clear()):void t.$warn(3102)},Object.defineProperty(o.prototype,"connected",{get:function(){return this._connected},enumerable:!0,configurable:!0}),Object.defineProperty(o.prototype,"type",{get:function(){return this._type},set:function(e){this._type=e,e!=o.TYPE_BINARY||this._writeByte||(this._readByte=new t.ByteArray,this._writeByte=new t.ByteArray)},enumerable:!0,configurable:!0}),o.TYPE_STRING="webSocketTypeString",o.TYPE_BINARY="webSocketTypeBinary",o}(t.EventDispatcher);t.WebSocket=e,__reflect(e.prototype,"egret.WebSocket")}(egret||(egret={}));var egret;!function(t){var e;!function(e){var o=function(){function t(){this.host="",this.port=0}return t.prototype.addCallBacks=function(t,e,o,n,i){this.onConnect=t,this.onClose=e,this.onSocketData=o,this.onError=n,this.thisObject=i},t.prototype.connect=function(t,e){this.host=t,this.port=e;var o="ws://"+this.host+":"+this.port;this.socket=new __global.egret_native.WebSocket(o),this._bindEvent()},t.prototype.connectByUrl=function(t){this.socket=new __global.egret_native.WebSocket(t),this._bindEvent()},t.prototype._bindEvent=function(){var t=this,e=this.socket;e.onOpen=function(){t.onConnect&&t.onConnect.call(t.thisObject)},e.onClose=function(){t.onClose&&t.onClose.call(t.thisObject)},e.onError=function(e){t.onError&&t.onError.call(t.thisObject)},e.onMessage=function(e){t.onSocketData&&t.onSocketData.call(t.thisObject,e)}},t.prototype.send=function(t){this.socket.send(t)},t.prototype.close=function(){this.socket.close()},t.prototype.disconnect=function(){this.socket.disconnect&&this.socket.disconnect()},t}();e.NativeSocket=o,__reflect(o.prototype,"egret.native.NativeSocket",["egret.ISocket"]),t.Capabilities.runtimeType==t.RuntimeType.NATIVE&&(t.ISocket=o)}(e=t["native"]||(t["native"]={}))}(egret||(egret={}));var egret;!function(t){var e;!function(e){var o=function(){function e(){this.host="",this.port=0,window.WebSocket||t.$error(3100)}return e.prototype.addCallBacks=function(t,e,o,n,i){this.onConnect=t,this.onClose=e,this.onSocketData=o,this.onError=n,this.thisObject=i},e.prototype.connect=function(t,e){this.host=t,this.port=e;var o="ws://"+this.host+":"+this.port;this.socket=new window.WebSocket(o),this.socket.binaryType="arraybuffer",this._bindEvent()},e.prototype.connectByUrl=function(t){this.socket=new window.WebSocket(t),this.socket.binaryType="arraybuffer",this._bindEvent()},e.prototype._bindEvent=function(){var t=this,e=this.socket;e.onopen=function(){t.onConnect&&t.onConnect.call(t.thisObject)},e.onclose=function(e){t.onClose&&t.onClose.call(t.thisObject)},e.onerror=function(e){t.onError&&t.onError.call(t.thisObject)},e.onmessage=function(e){t.onSocketData&&t.onSocketData.call(t.thisObject,e.data)}},e.prototype.send=function(t){this.socket.send(t)},e.prototype.close=function(){this.socket.close()},e.prototype.disconnect=function(){this.socket.disconnect&&this.socket.disconnect()},e}();e.HTML5WebSocket=o,__reflect(o.prototype,"egret.web.HTML5WebSocket",["egret.ISocket"]),t.Capabilities.runtimeType==t.RuntimeType.WEB&&(t.ISocket=o)}(e=t.web||(t.web={}))}(egret||(egret={})); //libs/modules/tween/tween.min.js var __reflect=this&&this.__reflect||function(t,e,n){t.__class__=e,n?n.push(e):n=[e],t.__types__=t.__types__?n.concat(t.__types__):n},__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};return function(e,n){function i(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),egret;!function(t){var e=function(){function e(){t.$error(1014)}return e.get=function(t){return-1>t&&(t=-1),t>1&&(t=1),function(e){return 0==t?e:0>t?e*(e*-t+1+t):e*((2-e)*t+(1-t))}},e.getPowIn=function(t){return function(e){return Math.pow(e,t)}},e.getPowOut=function(t){return function(e){return 1-Math.pow(1-e,t)}},e.getPowInOut=function(t){return function(e){return(e*=2)<1?.5*Math.pow(e,t):1-.5*Math.abs(Math.pow(2-e,t))}},e.sineIn=function(t){return 1-Math.cos(t*Math.PI/2)},e.sineOut=function(t){return Math.sin(t*Math.PI/2)},e.sineInOut=function(t){return-.5*(Math.cos(Math.PI*t)-1)},e.getBackIn=function(t){return function(e){return e*e*((t+1)*e-t)}},e.getBackOut=function(t){return function(e){return--e*e*((t+1)*e+t)+1}},e.getBackInOut=function(t){return t*=1.525,function(e){return(e*=2)<1?.5*(e*e*((t+1)*e-t)):.5*((e-=2)*e*((t+1)*e+t)+2)}},e.circIn=function(t){return-(Math.sqrt(1-t*t)-1)},e.circOut=function(t){return Math.sqrt(1- --t*t)},e.circInOut=function(t){return(t*=2)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},e.bounceIn=function(t){return 1-e.bounceOut(1-t)},e.bounceOut=function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},e.bounceInOut=function(t){return.5>t?.5*e.bounceIn(2*t):.5*e.bounceOut(2*t-1)+.5},e.getElasticIn=function(t,e){var n=2*Math.PI;return function(i){if(0==i||1==i)return i;var r=e/n*Math.asin(1/t);return-(t*Math.pow(2,10*(i-=1))*Math.sin((i-r)*n/e))}},e.getElasticOut=function(t,e){var n=2*Math.PI;return function(i){if(0==i||1==i)return i;var r=e/n*Math.asin(1/t);return t*Math.pow(2,-10*i)*Math.sin((i-r)*n/e)+1}},e.getElasticInOut=function(t,e){var n=2*Math.PI;return function(i){var r=e/n*Math.asin(1/t);return(i*=2)<1?-.5*(t*Math.pow(2,10*(i-=1))*Math.sin((i-r)*n/e)):t*Math.pow(2,-10*(i-=1))*Math.sin((i-r)*n/e)*.5+1}},e.quadIn=e.getPowIn(2),e.quadOut=e.getPowOut(2),e.quadInOut=e.getPowInOut(2),e.cubicIn=e.getPowIn(3),e.cubicOut=e.getPowOut(3),e.cubicInOut=e.getPowInOut(3),e.quartIn=e.getPowIn(4),e.quartOut=e.getPowOut(4),e.quartInOut=e.getPowInOut(4),e.quintIn=e.getPowIn(5),e.quintOut=e.getPowOut(5),e.quintInOut=e.getPowInOut(5),e.backIn=e.getBackIn(1.7),e.backOut=e.getBackOut(1.7),e.backInOut=e.getBackInOut(1.7),e.elasticIn=e.getElasticIn(1,.3),e.elasticOut=e.getElasticOut(1,.3),e.elasticInOut=e.getElasticInOut(1,.3*1.5),e}();t.Ease=e,__reflect(e.prototype,"egret.Ease")}(egret||(egret={}));var egret;!function(t){var e=function(e){function n(t,n,i){var r=e.call(this)||this;return r._target=null,r._useTicks=!1,r.ignoreGlobalPause=!1,r.loop=!1,r.pluginData=null,r._steps=null,r.paused=!1,r.duration=0,r._prevPos=-1,r.position=null,r._prevPosition=0,r._stepPosition=0,r.passive=!1,r.initialize(t,n,i),r}return __extends(n,e),n.get=function(t,e,i,r){return void 0===i&&(i=null),void 0===r&&(r=!1),r&&n.removeTweens(t),new n(t,e,i)},n.removeTweens=function(t){if(t.tween_count){for(var e=n._tweens,i=e.length-1;i>=0;i--)e[i]._target==t&&(e[i].paused=!0,e.splice(i,1));t.tween_count=0}},n.pauseTweens=function(e){if(e.tween_count)for(var n=t.Tween._tweens,i=n.length-1;i>=0;i--)n[i]._target==e&&(n[i].paused=!0)},n.resumeTweens=function(e){if(e.tween_count)for(var n=t.Tween._tweens,i=n.length-1;i>=0;i--)n[i]._target==e&&(n[i].paused=!1)},n.tick=function(t,e){void 0===e&&(e=!1);var i=t-n._lastTime;n._lastTime=t;for(var r=n._tweens.concat(),s=r.length-1;s>=0;s--){var o=r[s];e&&!o.ignoreGlobalPause||o.paused||o.$tick(o._useTicks?1:i)}return!1},n._register=function(e,i){var r=e._target,s=n._tweens;if(i)r&&(r.tween_count=r.tween_count>0?r.tween_count+1:1),s.push(e),n._inited||(n._lastTime=t.getTimer(),t.ticker.$startTick(n.tick,null),n._inited=!0);else{r&&r.tween_count--;for(var o=s.length;o--;)if(s[o]==e)return void s.splice(o,1)}},n.removeAllTweens=function(){for(var t=n._tweens,e=0,i=t.length;i>e;e++){var r=t[e];r.paused=!0,r._target.tween_count=0}t.length=0},n.prototype.initialize=function(t,e,i){this._target=t,e&&(this._useTicks=e.useTicks,this.ignoreGlobalPause=e.ignoreGlobalPause,this.loop=e.loop,e.onChange&&this.addEventListener("change",e.onChange,e.onChangeObj),e.override&&n.removeTweens(t)),this.pluginData=i||{},this._curQueueProps={},this._initQueueProps={},this._steps=[],e&&e.paused?this.paused=!0:n._register(this,!0),e&&null!=e.position&&this.setPosition(e.position,n.NONE)},n.prototype.setPosition=function(t,e){void 0===e&&(e=1),0>t&&(t=0);var n=t,i=!1;if(n>=this.duration)if(this.loop){var r=n%this.duration;n=n>0&&0===r?this.duration:r}else n=this.duration,i=!0;if(n==this._prevPos)return i;i&&this.setPaused(!0);var s=this._prevPos;if(this.position=this._prevPos=n,this._prevPosition=t,this._target&&this._steps.length>0){for(var o=this._steps.length,u=-1,a=0;o>a&&!("step"==this._steps[a].type&&(u=a,this._steps[a].t<=n&&this._steps[a].t+this._steps[a].d>=n));a++);for(var a=0;o>a;a++)if("action"==this._steps[a].type)0!=e&&(this._useTicks?this._runAction(this._steps[a],n,n):1==e&&s>n?(s!=this.duration&&this._runAction(this._steps[a],s,this.duration),this._runAction(this._steps[a],0,n,!0)):this._runAction(this._steps[a],s,n));else if("step"==this._steps[a].type&&u==a){var p=this._steps[u];this._updateTargetProps(p,Math.min((this._stepPosition=n-p.t)/p.d,1))}}return this.dispatchEventWith("change"),i},n.prototype._runAction=function(t,e,n,i){void 0===i&&(i=!1);var r=e,s=n;e>n&&(r=n,s=e);var o=t.t;(o==s||o>r&&s>o||i&&o==e)&&t.f.apply(t.o,t.p)},n.prototype._updateTargetProps=function(t,e){var i,r,s,o,u,a;if(t||1!=e){if(this.passive=!!t.v,this.passive)return;t.e&&(e=t.e(e,0,1,1)),i=t.p0,r=t.p1}else this.passive=!1,i=r=this._curQueueProps;for(var p in this._initQueueProps){null==(o=i[p])&&(i[p]=o=this._initQueueProps[p]),null==(u=r[p])&&(r[p]=u=o),s=o==u||0==e||1==e||"number"!=typeof o?1==e?u:o:o+(u-o)*e;var h=!1;if(a=n._plugins[p])for(var c=0,_=a.length;_>c;c++){var f=a[c].tween(this,p,s,i,r,e,!!t&&i==r,!t);f==n.IGNORE?h=!0:s=f}h||(this._target[p]=s)}},n.prototype.setPaused=function(t){return this.paused==t?this:(this.paused=t,n._register(this,!t),this)},n.prototype._cloneProps=function(t){var e={};for(var n in t)e[n]=t[n];return e},n.prototype._addStep=function(t){return t.d>0&&(t.type="step",this._steps.push(t),t.t=this.duration,this.duration+=t.d),this},n.prototype._appendQueueProps=function(t){var e,i,r,s,o;for(var u in t)if(void 0===this._initQueueProps[u]){if(i=this._target[u],e=n._plugins[u])for(r=0,s=e.length;s>r;r++)i=e[r].init(this,u,i);this._initQueueProps[u]=this._curQueueProps[u]=void 0===i?null:i}else i=this._curQueueProps[u];for(var u in t){if(i=this._curQueueProps[u],e=n._plugins[u])for(o=o||{},r=0,s=e.length;s>r;r++)e[r].step&&e[r].step(this,u,i,t[u],o);this._curQueueProps[u]=t[u]}return o&&this._appendQueueProps(o),this._curQueueProps},n.prototype._addAction=function(t){return t.t=this.duration,t.type="action",this._steps.push(t),this},n.prototype._set=function(t,e){for(var n in t)e[n]=t[n]},n.prototype.wait=function(t,e){if(null==t||0>=t)return this;var n=this._cloneProps(this._curQueueProps);return this._addStep({d:t,p0:n,p1:n,v:e})},n.prototype.to=function(t,e,n){return void 0===n&&(n=void 0),(isNaN(e)||0>e)&&(e=0),this._addStep({d:e||0,p0:this._cloneProps(this._curQueueProps),e:n,p1:this._cloneProps(this._appendQueueProps(t))}),this.set(t)},n.prototype.call=function(t,e,n){return void 0===e&&(e=void 0),void 0===n&&(n=void 0),this._addAction({f:t,p:n?n:[],o:e?e:this._target})},n.prototype.set=function(t,e){return void 0===e&&(e=null),this._appendQueueProps(t),this._addAction({f:this._set,o:this,p:[t,e?e:this._target]})},n.prototype.play=function(t){return t||(t=this),this.call(t.setPaused,t,[!1])},n.prototype.pause=function(t){return t||(t=this),this.call(t.setPaused,t,[!0])},n.prototype.$tick=function(t){this.paused||this.setPosition(this._prevPosition+t)},n.NONE=0,n.LOOP=1,n.REVERSE=2,n._tweens=[],n.IGNORE={},n._plugins={},n._inited=!1,n._lastTime=0,n}(t.EventDispatcher);t.Tween=e,__reflect(e.prototype,"egret.Tween")}(egret||(egret={}));var egret;!function(t){var e;!function(e){function n(e){if("function"==typeof e)return e;var n=t.Ease[e];return"function"==typeof n?n:null}function i(t,e,n,i){var r=t.prototype;r.__meta__=r.__meta__||{},r.__meta__[e]=n,i&&(r.__defaultProperty__=e)}var r=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.name="",e}return __extends(e,t),e}(t.EventDispatcher);e.BasePath=r,__reflect(r.prototype,"egret.tween.BasePath");var s=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.props=void 0,e.duration=500,e.ease=void 0,e}return __extends(e,t),e}(r);e.To=s,__reflect(s.prototype,"egret.tween.To");var o=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.duration=500,e.passive=void 0,e}return __extends(e,t),e}(r);e.Wait=o,__reflect(o.prototype,"egret.tween.Wait");var u=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.props=void 0,e}return __extends(e,t),e}(r);e.Set=u,__reflect(u.prototype,"egret.tween.Set");var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.delta=0,e}return __extends(e,t),e}(r);e.Tick=a,__reflect(a.prototype,"egret.tween.Tick");var p=function(e){function i(){var t=e.call(this)||this;return t.isStop=!1,t}return __extends(i,e),Object.defineProperty(i.prototype,"props",{get:function(){return this._props},set:function(t){this._props=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"target",{get:function(){return this._target},set:function(t){this._target=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"paths",{get:function(){return this._paths},set:function(t){this._paths=t||[]},enumerable:!0,configurable:!0}),i.prototype.play=function(t){this.tween?(this.tween.setPaused(!1),this.isStop&&void 0==t&&(t=0,this.isStop=!1),void 0!==t&&null!==t&&this.tween.setPosition(t)):this.createTween(t)},i.prototype.pause=function(){this.tween&&this.tween.setPaused(!0)},i.prototype.stop=function(){this.pause(),this.isStop=!0},i.prototype.createTween=function(e){this.tween=t.Tween.get(this._target,this._props),this._paths&&this.applyPaths(),void 0!==e&&null!==e&&this.tween.setPosition(e)},i.prototype.applyPaths=function(){for(var t=0;t=0&&e===this._paths.length-1&&this.dispatchEventWith("complete")},i}(t.EventDispatcher);e.TweenItem=p,__reflect(p.prototype,"egret.tween.TweenItem"),i(p,"paths","Array",!0);var h=function(t){function e(){var e=t.call(this)||this;return e.completeCount=0,e}return __extends(e,t),Object.defineProperty(e.prototype,"items",{get:function(){return this._items},set:function(t){this.completeCount=0,this.registerEvent(!1),this._items=t,this.registerEvent(!0)},enumerable:!0,configurable:!0}),e.prototype.registerEvent=function(t){var e=this;this._items&&this._items.forEach(function(n){t?n.addEventListener("complete",e.itemComplete,e):n.removeEventListener("complete",e.itemComplete,e)})},e.prototype.play=function(t){if(this._items)for(var e=0;ethis.maxDepth&&(this.maxDepth=e));var i=this.depthBins[e];i||(i=this.depthBins[e]=new n),i.insert(t)},t.prototype.pop=function(){var t,e=this.minDepth;if(e<=this.maxDepth){for(var i=this.depthBins[this.maxDepth];!i||0===i.length;){if(this.maxDepth--,this.maxDepthe)return null;i=this.depthBins[this.minDepth]}for(t=i.pop();!(i&&0!=i.length||(this.minDepth++,this.minDepth>e));)i=this.depthBins[this.minDepth]}return t},t.prototype.removeLargestChild=function(t){for(var e=t.$hashCode,i=t.$nestLevel,n=this.maxDepth,r=i;n>=r;){var o=this.depthBins[n];if(o&&o.length>0){if(n===i){if(o.map[e])return o.remove(t),t}else{if(!egret.is(t,"egret.DisplayObjectContainer"))break;for(var s=o.items,a=o.length,h=0;a>h;h++){var l=s[h];if(t.contains(l))return o.remove(l),l}}n--}else if(n==this.maxDepth&&this.maxDepth--,n--,r>n)break}return null},t.prototype.removeSmallestChild=function(t){for(var e=t.$nestLevel,i=e,n=this.maxDepth,r=t.$hashCode;n>=i;){var o=this.depthBins[i];if(o&&o.length>0){if(i===e){if(o.map[r])return o.remove(t),t}else{if(!egret.is(t,"egret.DisplayObjectContainer"))break;for(var s=o.items,a=o.length,h=0;a>h;h++){var l=s[h];if(t.contains(l))return o.remove(l),l}}i++}else if(i==this.minDepth&&this.minDepth++,i++,i>n)break}return null},t.prototype.isEmpty=function(){return this.minDepth>this.maxDepth},t}();__reflect(i.prototype,"DepthQueue");var n=function(){function t(){this.map={},this.items=[],this.length=0}return t.prototype.insert=function(t){var e=t.$hashCode;this.map[e]||(this.map[e]=!0,this.length++,this.items.push(t))},t.prototype.pop=function(){var t=this.items.pop();return t&&(this.length--,0===this.length?this.map={}:this.map[t.$hashCode]=!1),t},t.prototype.remove=function(t){var e=this.items.indexOf(t);e>=0&&(this.items.splice(e,1),this.length--,0===this.length?this.map={}:this.map[t.$hashCode]=!1)},t}();__reflect(n.prototype,"DepthBin")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){function e(t,e,i,n){var r=t.prototype;r.__meta__=r.__meta__||{},r.__meta__[e]=i,n&&(r.__defaultProperty__=e)}t.registerProperty=e}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(t,i){void 0===i&&(i=[]);var n=e.call(this)||this;return n.name=t,n.overrides=i,n}return __extends(i,e),i.prototype.initialize=function(e,i){for(var n=this.overrides,r=n.length,o=0;r>o;o++){var s=n[o];if(s instanceof t.AddItems){var a=e[s.target];a&&a instanceof t.Image&&!a.$parent&&(i.addChild(a),i.removeChild(a))}}},i}(egret.HashObject);t.State=e,__reflect(e.prototype,"eui.State")}(eui||(eui={})),function(t){var e;!function(t){var e=function(){function t(){}return Object.defineProperty(t.prototype,"states",{get:function(){return this.$stateValues.states},set:function(t){t||(t=[]);var e=this.$stateValues;e.states=t;for(var i={},n=t.length,r=0;n>r;r++){var o=t[r];i[o.name]=o}e.statesMap=i,e.parent&&this.commitCurrentState()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"currentState",{get:function(){return this.$stateValues.currentState},set:function(t){var e=this.$stateValues;e.explicitState=t,e.currentState=t,this.commitCurrentState()},enumerable:!0,configurable:!0}),t.prototype.commitCurrentState=function(){var t=this.$stateValues;if(t.parent){var e=t.statesMap[t.currentState];if(!e){if(!(t.states.length>0))return;t.currentState=t.states[0].name}if(t.oldState!=t.currentState){var i=t.parent,n=t.statesMap[t.oldState];if(n)for(var r=n.overrides,o=r.length,s=0;o>s;s++)r[s].remove(this,i);if(t.oldState=t.currentState,n=t.statesMap[t.currentState])for(var r=n.overrides,a=r.length,s=0;a>s;s++)r[s].apply(this,i)}}},t.prototype.hasState=function(t){return!!this.$stateValues.statesMap[t]},t.prototype.initializeStates=function(t){this.$stateValues.intialized=!0;for(var e=this.states,i=e.length,n=0;i>n;n++)e[n].initialize(this,t)},t}();t.StateClient=e,__reflect(e.prototype,"eui.sys.StateClient");var i=function(){function t(){this.intialized=!1,this.statesMap={},this.states=[],this.oldState=null,this.explicitState=null,this.currentState=null,this.parent=null,this.stateIsDirty=!1}return t}();t.StateValues=i,__reflect(i.prototype,"eui.sys.StateValues")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){function e(e,i){var n=egret.getImplementation("eui.IAssetAdapter");n||(n=new t.DefaultAssetAdapter),n.getAsset(e,function(t){i(t)},this)}function i(e,i){var n=egret.getImplementation("eui.IThemeAdapter");n||(n=new t.DefaultThemeAdapter),n.getTheme(e,function(t){i(t)},function(t){console.log(t)},this)}t.getAssets=e,t.getTheme=i}(eui||(eui={})),function(t){var e;!function(e){function i(t){return 1===t.a&&0===t.b&&0===t.c&&1===t.d}function n(t,e){if("function"!=typeof t[e])return!1;var i=t[e].toString(),n=i.indexOf("{"),r=i.lastIndexOf("}");return i=i.substring(n+1,r),""==i.trim()}function r(t,e){for(var i in e)"prototype"!=i&&e.hasOwnProperty(i)&&(t[i]=e[i]);for(var r=t.prototype,o=e.prototype,s=Object.keys(o),a=s.length,h=0;a>h;h++){var l=s[h];if("__meta__"!=l&&(!r.hasOwnProperty(l)||n(r,l))){var u=Object.getOwnPropertyDescriptor(o,l);Object.defineProperty(r,l,u)}}}function o(e,i,n){r(e,h);var o=e.prototype;o.$super=i.prototype,t.registerProperty(e,"left","Percentage"),t.registerProperty(e,"right","Percentage"),t.registerProperty(e,"top","Percentage"),t.registerProperty(e,"bottom","Percentage"),t.registerProperty(e,"horizontalCenter","Percentage"),t.registerProperty(e,"verticalCenter","Percentage"),n&&(o.$childAdded=function(t,e){this.invalidateSize(),this.invalidateDisplayList()},o.$childRemoved=function(t,e){this.invalidateSize(),this.invalidateDisplayList()})}var s="eui.UIComponent",a=new e.Validator,h=function(n){function r(){var t=n.call(this)||this;return t.initializeUIValues(),t}return __extends(r,n),r.prototype.initializeUIValues=function(){this.$UIComponent={0:0/0,1:0/0,2:0/0,3:0/0,4:0/0,5:0/0,6:0/0,7:0/0,8:0/0,9:0/0,10:0,11:0,12:0,13:1e5,14:0,15:1e5,16:0,17:0,18:0/0,19:0/0,20:0,21:0,22:0,23:0,24:!0,25:!0,26:!0,27:!1,28:!1,29:!1},this.$includeInLayout=!0,this.$touchEnabled=!0},r.prototype.createChildren=function(){},r.prototype.childrenCreated=function(){},r.prototype.commitProperties=function(){var e=this.$UIComponent;(e[22]!=e[10]||e[23]!=e[11])&&(this.dispatchEventWith(egret.Event.RESIZE),e[22]=e[10],e[23]=e[11]),(e[20]!=this.$getX()||e[21]!=this.$getY())&&(t.UIEvent.dispatchUIEvent(this,t.UIEvent.MOVE),e[20]=this.$getX(),e[21]=this.$getY())},r.prototype.measure=function(){},r.prototype.updateDisplayList=function(t,e){},Object.defineProperty(r.prototype,"includeInLayout",{get:function(){return this.$includeInLayout},set:function(t){t=!!t,this.$includeInLayout!==t&&(this.$includeInLayout=!0,this.invalidateParentLayout(),this.$includeInLayout=t)},enumerable:!0,configurable:!0}),r.prototype.$onAddToStage=function(e,i){this.$super.$onAddToStage.call(this,e,i),this.checkInvalidateFlag();var n=this.$UIComponent;n[29]||(n[29]=!0,this.createChildren(),this.childrenCreated(),t.UIEvent.dispatchUIEvent(this,t.UIEvent.CREATION_COMPLETE))},r.prototype.checkInvalidateFlag=function(t){var e=this.$UIComponent;e[24]&&a.invalidateProperties(this),e[25]&&a.invalidateSize(this),e[26]&&a.invalidateDisplayList(this)},Object.defineProperty(r.prototype,"left",{get:function(){return this.$UIComponent[0]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[0]!==t&&(e[0]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"right",{get:function(){return this.$UIComponent[1]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[1]!==t&&(e[1]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"top",{get:function(){return this.$UIComponent[2]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[2]!==t&&(e[2]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"bottom",{get:function(){return this.$UIComponent[3]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[3]!=t&&(e[3]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"horizontalCenter",{get:function(){return this.$UIComponent[4]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[4]!==t&&(e[4]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"verticalCenter",{get:function(){return this.$UIComponent[5]},set:function(t){t=t&&"number"!=typeof t?t.toString().trim():+t;var e=this.$UIComponent;e[5]!==t&&(e[5]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"percentWidth",{get:function(){return this.$UIComponent[6]},set:function(t){t=+t;var e=this.$UIComponent;e[6]!==t&&(e[6]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"percentHeight",{get:function(){return this.$UIComponent[7]},set:function(t){t=+t;var e=this.$UIComponent;e[7]!==t&&(e[7]=t,this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"explicitWidth",{get:function(){return this.$UIComponent[8]},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"explicitHeight",{get:function(){return this.$UIComponent[9]},enumerable:!0,configurable:!0}),r.prototype.$getWidth=function(){return this.validateSizeNow(),this.$UIComponent[10]},r.prototype.$setWidth=function(t){t=+t;var e=this.$UIComponent;return 0>t||e[10]===t&&e[8]===t?!1:(e[8]=t,isNaN(t)&&this.invalidateSize(),this.invalidateProperties(),this.invalidateDisplayList(),this.invalidateParentLayout(),!0)},r.prototype.validateSizeNow=function(){this.validateSize(!0),this.updateFinalSize()},r.prototype.$getHeight=function(){return this.validateSizeNow(),this.$UIComponent[11]},r.prototype.$setHeight=function(t){t=+t;var e=this.$UIComponent;return 0>t||e[11]===t&&e[9]===t?!1:(e[9]=t,isNaN(t)&&this.invalidateSize(),this.invalidateProperties(),this.invalidateDisplayList(),this.invalidateParentLayout(),!0)},Object.defineProperty(r.prototype,"minWidth",{get:function(){return this.$UIComponent[12]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[12]===t||(e[12]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxWidth",{get:function(){return this.$UIComponent[13]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[13]===t||(e[13]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"minHeight",{get:function(){return this.$UIComponent[14]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[14]===t||(e[14]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"maxHeight",{get:function(){return this.$UIComponent[15]},set:function(t){t=+t||0;var e=this.$UIComponent;0>t||e[15]===t||(e[15]=t,this.invalidateSize(),this.invalidateParentLayout())},enumerable:!0,configurable:!0}),r.prototype.setMeasuredSize=function(t,e){var i=this.$UIComponent;i[16]=Math.ceil(+t||0),i[17]=Math.ceil(+e||0)},r.prototype.setActualSize=function(t,e){var i=!1,n=this.$UIComponent;n[10]!==t&&(n[10]=t,i=!0),n[11]!==e&&(n[11]=e,i=!0),i&&(this.invalidateDisplayList(),this.dispatchEventWith(egret.Event.RESIZE))},r.prototype.$invalidateMatrix=function(){this.$super.$invalidateMatrix.call(this),this.invalidateParentLayout()},r.prototype.$setMatrix=function(t,e){return void 0===e&&(e=!0),this.$super.$setMatrix.call(this,t,e),this.invalidateParentLayout(),!0},r.prototype.$setAnchorOffsetX=function(t){return this.$super.$setAnchorOffsetX.call(this,t),this.invalidateParentLayout(),!0},r.prototype.$setAnchorOffsetY=function(t){return this.$super.$setAnchorOffsetY.call(this,t),this.invalidateParentLayout(),!0},r.prototype.$setX=function(t){var e=this.$super.$setX.call(this,t);return e&&(this.invalidateParentLayout(),this.invalidateProperties()),e},r.prototype.$setY=function(t){var e=this.$super.$setY.call(this,t);return e&&(this.invalidateParentLayout(),this.invalidateProperties()),e},r.prototype.invalidateProperties=function(){var t=this.$UIComponent;t[24]||(t[24]=!0,this.$stage&&a.invalidateProperties(this))},r.prototype.validateProperties=function(){var t=this.$UIComponent;t[24]&&(this.commitProperties(),t[24]=!1)},r.prototype.invalidateSize=function(){var t=this.$UIComponent;t[25]||(t[25]=!0,this.$stage&&a.invalidateSize(this))},r.prototype.validateSize=function(t){if(t){var e=this.$children;if(e)for(var i=e.length,n=0;i>n;n++){var r=e[n];egret.is(r,s)&&r.validateSize(!0)}}var o=this.$UIComponent;if(o[25]){var a=this.measureSizes();a&&(this.invalidateDisplayList(),this.invalidateParentLayout()),o[25]=!1}},r.prototype.measureSizes=function(){var t=!1,e=this.$UIComponent;if(!e[25])return t;(isNaN(e[8])||isNaN(e[9]))&&(this.measure(),e[16]e[13]&&(e[16]=e[13]),e[17]e[15]&&(e[17]=e[15]));var i=this.getPreferredUWidth(),n=this.getPreferredUHeight();return(i!==e[18]||n!==e[19])&&(e[18]=i,e[19]=n,t=!0),t},r.prototype.invalidateDisplayList=function(){var t=this.$UIComponent;t[26]||(t[26]=!0,this.$stage&&a.invalidateDisplayList(this))},r.prototype.validateDisplayList=function(){var t=this.$UIComponent;t[26]&&(this.updateFinalSize(),this.updateDisplayList(t[10],t[11]),t[26]=!1)},r.prototype.updateFinalSize=function(){var t=0,e=0,i=this.$UIComponent;t=i[27]?i[10]:isNaN(i[8])?i[16]:i[8],e=i[28]?i[11]:isNaN(i[9])?i[17]:i[9],this.setActualSize(t,e)},r.prototype.validateNow=function(){this.$stage&&a.validateClient(this)},r.prototype.invalidateParentLayout=function(){var t=this.$parent;t&&this.$includeInLayout&&egret.is(t,s)&&(t.invalidateSize(),t.invalidateDisplayList())},r.prototype.setLayoutBoundsSize=function(t,n){if(n=+n,t=+t,!(0>n||0>t)){var r,o,s=this.$UIComponent,a=s[13],h=s[15],l=Math.min(s[12],a),u=Math.min(s[14],h);isNaN(t)?(s[27]=!1,r=this.getPreferredUWidth()):(s[27]=!0,r=Math.max(l,Math.min(a,t))),isNaN(n)?(s[28]=!1,o=this.getPreferredUHeight()):(s[28]=!0,o=Math.max(u,Math.min(h,n)));var p=this.getAnchorMatrix();if(i(p))return void this.setActualSize(r,o);var c=e.MatrixUtil.fitBounds(t,n,p,s[8],s[9],this.getPreferredUWidth(),this.getPreferredUHeight(),l,u,a,h);c||(c=egret.Point.create(l,u)),this.setActualSize(c.x,c.y),egret.Point.release(c)}},r.prototype.setLayoutBoundsPosition=function(e,n){var r=this.$getMatrix();if(!i(r)||0!=this.anchorOffsetX||0!=this.anchorOffsetY){var o=egret.$TempRectangle;this.getLayoutBounds(o),e+=this.$getX()-o.x,n+=this.$getY()-o.y}var s=this.$super.$setX.call(this,e);(this.$super.$setY.call(this,n)||s)&&t.UIEvent.dispatchUIEvent(this,t.UIEvent.MOVE)},r.prototype.getLayoutBounds=function(t){var e,i=this.$UIComponent;e=i[27]?i[10]:isNaN(i[8])?i[16]:i[8];var n;n=i[28]?i[11]:isNaN(i[9])?i[17]:i[9],this.applyMatrix(t,e,n)},r.prototype.getPreferredUWidth=function(){var t=this.$UIComponent;return isNaN(t[8])?t[16]:t[8]},r.prototype.getPreferredUHeight=function(){var t=this.$UIComponent;return isNaN(t[9])?t[17]:t[9]},r.prototype.getPreferredBounds=function(t){var e=this.getPreferredUWidth(),i=this.getPreferredUHeight();this.applyMatrix(t,e,i)},r.prototype.applyMatrix=function(t,e,n){t.setTo(0,0,e,n);var r=this.getAnchorMatrix();i(r)?(t.x+=r.tx,t.y+=r.ty):r.$transformBounds(t)},r.prototype.getAnchorMatrix=function(){var t=this.$getMatrix(),e=this.anchorOffsetX,i=this.anchorOffsetY;if(0!=e||0!=i){var n=egret.$TempMatrix;return t.$preMultiplyInto(n.setTo(1,0,0,1,-e,-i),n),n}return t},r}(egret.DisplayObject);e.UIComponentImpl=h,__reflect(h.prototype,"eui.sys.UIComponentImpl",["eui.UIComponent","egret.DisplayObject"]),e.mixin=r,e.implementUIComponent=o}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var i=e.call(this)||this;return i.$layout=null,i.$stateValues=new t.sys.StateValues,i.initializeUIValues(),i.$Group={0:0,1:0,2:0,3:0,4:!1,5:!1},i.$stateValues.parent=i,i}return __extends(i,e),Object.defineProperty(i.prototype,"elementsContent",{set:function(t){if(t)for(var e=t.length,i=0;e>i;i++)this.addChild(t[i])},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"layout",{get:function(){return this.$layout},set:function(t){this.$setLayout(t)},enumerable:!0,configurable:!0}),i.prototype.$setLayout=function(t){return this.$layout==t?!1:(this.$layout&&(this.$layout.target=null),this.$layout=t,t&&(t.target=this),this.invalidateSize(),this.invalidateDisplayList(),!0)},Object.defineProperty(i.prototype,"contentWidth",{get:function(){return this.$Group[0]},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"contentHeight",{get:function(){return this.$Group[1]},enumerable:!0,configurable:!0}),i.prototype.setContentSize=function(e,i){e=Math.ceil(+e||0),i=Math.ceil(+i||0);var n=this.$Group,r=n[0]!==e,o=n[1]!==i;(r||o)&&(n[0]=e,n[1]=i,r&&t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"contentWidth"),o&&t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"contentHeight"))},Object.defineProperty(i.prototype,"scrollEnabled",{get:function(){return this.$Group[4]},set:function(t){t=!!t;var e=this.$Group;t!==e[4]&&(e[4]=t,this.updateScrollRect())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollH",{get:function(){return this.$Group[2]},set:function(e){e=+e||0;var i=this.$Group;e!==i[2]&&(i[2]=e,this.updateScrollRect()&&this.$layout&&this.$layout.scrollPositionChanged(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"scrollH"))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"scrollV",{get:function(){return this.$Group[3]},set:function(e){e=+e||0;var i=this.$Group;e!=i[3]&&(i[3]=e,this.updateScrollRect()&&this.$layout&&this.$layout.scrollPositionChanged(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"scrollV"))},enumerable:!0,configurable:!0}),i.prototype.updateScrollRect=function(){var t=this.$Group,e=t[4];if(e){var i=this.$UIComponent;this.scrollRect=egret.$TempRectangle.setTo(t[2],t[3],i[10],i[11])}else this.$scrollRect&&(this.scrollRect=null);return e},Object.defineProperty(i.prototype,"numElements",{get:function(){return this.$children.length},enumerable:!0,configurable:!0}),i.prototype.getElementAt=function(t){return this.$children[t]},i.prototype.getVirtualElementAt=function(t){return this.getElementAt(t)},i.prototype.setVirtualElementIndicesInView=function(t,e){},Object.defineProperty(i.prototype,"touchThrough",{get:function(){return this.$Group[5]},set:function(t){this.$Group[5]=!!t},enumerable:!0,configurable:!0}),i.prototype.$hitTest=function(t,i){var n=e.prototype.$hitTest.call(this,t,i);if(n||this.$Group[5])return n;if(!this.$visible||!this.touchEnabled)return null;var r=this.globalToLocal(t,i,egret.$TempPoint),o=this.$UIComponent,s=egret.$TempRectangle.setTo(0,0,o[10],o[11]),a=this.$scrollRect;return a&&(s.x=a.x,s.y=a.y),s.contains(r.x,r.y)?this:null},i.prototype.invalidateState=function(){var t=this.$stateValues;t.stateIsDirty||(t.stateIsDirty=!0,this.invalidateProperties())},i.prototype.getCurrentState=function(){return""},i.prototype.createChildren=function(){this.$layout||this.$setLayout(new t.BasicLayout),this.initializeStates(this.$stage)},i.prototype.childrenCreated=function(){},i.prototype.commitProperties=function(){t.sys.UIComponentImpl.prototype.commitProperties.call(this);var e=this.$stateValues;e.stateIsDirty&&(e.stateIsDirty=!1,e.explicitState||(e.currentState=this.getCurrentState(),this.commitCurrentState()))},i.prototype.measure=function(){return this.$layout?void this.$layout.measure():void this.setMeasuredSize(0,0)},i.prototype.updateDisplayList=function(t,e){this.$layout&&this.$layout.updateDisplayList(t,e),this.updateScrollRect()},i.prototype.invalidateParentLayout=function(){},i.prototype.setMeasuredSize=function(t,e){},i.prototype.invalidateProperties=function(){},i.prototype.validateProperties=function(){},i.prototype.invalidateSize=function(){},i.prototype.validateSize=function(t){},i.prototype.invalidateDisplayList=function(){},i.prototype.validateDisplayList=function(){},i.prototype.validateNow=function(){},i.prototype.setLayoutBoundsSize=function(t,e){},i.prototype.setLayoutBoundsPosition=function(t,e){},i.prototype.getLayoutBounds=function(t){},i.prototype.getPreferredBounds=function(t){},i}(egret.DisplayObjectContainer);t.Group=e,__reflect(e.prototype,"eui.Group",["eui.IViewport","eui.UIComponent","egret.DisplayObject"]),t.sys.implementUIComponent(e,egret.DisplayObjectContainer,!0),t.sys.mixin(e,t.sys.StateClient),t.registerProperty(e,"elementsContent","Array",!0),t.registerProperty(e,"states","State[]")}(eui||(eui={}));var eui;!function(t){function e(t,e){if(t.hasOwnProperty(i))t[i].push(e);else{var n=[e];t[i]&&(n=t[i].concat(n)),t[i]=n}}var i="__bindables__";t.registerBindable=e}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.initializeUIValues(),t.$Component={0:null,1:null,2:"",3:!0,4:!1,5:!1,6:!0,7:!0,8:null},t.$touchEnabled=!0,t}return __extends(i,e),Object.defineProperty(i.prototype,"hostComponentKey",{get:function(){return this.$Component[0]},set:function(t){this.$Component[0]=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"skinName",{get:function(){return this.$Component[1]},set:function(t){var e=this.$Component;if(e[5]=!0,e[1]!=t){if(t)e[1]=t;else{var i=egret.getImplementation("eui.Theme");if(i){var n=i.getSkinName(this);n&&(e[1]=n)}}this.$parseSkinName()}},enumerable:!0,configurable:!0}),i.prototype.$parseSkinName=function(){var t,e=this.skinName;if(e)if(e.prototype)t=new e;else if("string"==typeof e){var i=void 0,n=e.trim();if("<"==n.charAt(0))i=EXML.parse(n);else if(i=egret.getDefinitionByName(e),!i&&-1!=n.toLowerCase().indexOf(".exml"))return void EXML.load(e,this.onExmlLoaded,this,!0);i&&(t=new i)}else t=e;this.setSkin(t)},i.prototype.onExmlLoaded=function(t,e){if(this.skinName==e){var i=new t;this.setSkin(i)}},Object.defineProperty(i.prototype,"skin",{get:function(){return this.$Component[8]},enumerable:!0,configurable:!0}),i.prototype.setSkin=function(e){!e||e instanceof t.Skin||(e=null);var i=this.$Component,n=i[8];if(n){for(var r=n.skinParts,o=r.length,s=0;o>s;s++){var a=r[s];this[a]&&this.setSkinPart(a,null)}var h=n.$elementsContent;if(h){o=h.length;for(var s=0;o>s;s++){var l=h[s];l.$parent==this&&this.removeChild(l)}}n.hostComponent=null}if(i[8]=e,e){for(var r=e.skinParts,u=r.length,s=0;u>s;s++){var a=r[s],p=e[a];p&&this.setSkinPart(a,p)}var h=e.$elementsContent;if(h)for(var s=h.length-1;s>=0;s--)this.addChildAt(h[s],0);e.hostComponent=this}this.invalidateSize(),this.invalidateDisplayList(),this.dispatchEventWith(egret.Event.COMPLETE)},i.prototype.setSkinPart=function(t,e){var i=this[t];i&&this.partRemoved(t,i),this[t]=e,e&&this.partAdded(t,e)},i.prototype.partAdded=function(t,e){},i.prototype.partRemoved=function(t,e){},i.prototype.$setTouchChildren=function(t){t=!!t;var i=this.$Component;return i[6]=t,i[3]?(i[6]=t,e.prototype.$setTouchChildren.call(this,t)):!0},i.prototype.$setTouchEnabled=function(t){t=!!t;var i=this.$Component;return i[7]=t,i[3]?e.prototype.$setTouchEnabled.call(this,t):!0},Object.defineProperty(i.prototype,"enabled",{get:function(){return this.$Component[3]},set:function(t){t=!!t,this.$setEnabled(t)},enumerable:!0,configurable:!0}),i.prototype.$setEnabled=function(t){var e=this.$Component;return t===e[3]?!1:(e[3]=t,t?(this.$touchEnabled=e[7],this.$touchChildren=e[6]):(this.$touchEnabled=!1,this.$touchChildren=!1),this.invalidateState(),!0)},Object.defineProperty(i.prototype,"currentState",{get:function(){var t=this.$Component;return t[2]?t[2]:this.getCurrentState()},set:function(t){var e=this.$Component;t!=e[2]&&(e[2]=t,this.invalidateState())},enumerable:!0,configurable:!0}),i.prototype.invalidateState=function(){var t=this.$Component;t[4]||(t[4]=!0,this.invalidateProperties())},i.prototype.getCurrentState=function(){return""},i.prototype.createChildren=function(){var t=this.$Component;if(!t[1]){var e=egret.getImplementation("eui.Theme");if(e){var i=e.getSkinName(this);i&&(t[1]=i,this.$parseSkinName())}}},i.prototype.childrenCreated=function(){},i.prototype.commitProperties=function(){t.sys.UIComponentImpl.prototype.commitProperties.call(this);var e=this.$Component;e[4]&&(e[4]=!1,e[8]&&(e[8].currentState=this.currentState))},i.prototype.measure=function(){t.sys.measure(this);var e=this.$Component[8];if(e){var i=this.$UIComponent;isNaN(e.width)?(i[16]e.maxWidth&&(i[16]=e.maxWidth)):i[16]=e.width,isNaN(e.height)?(i[17]e.maxHeight&&(i[17]=e.maxHeight)):i[17]=e.height}},i.prototype.updateDisplayList=function(e,i){t.sys.updateDisplayList(this,e,i)},i.prototype.invalidateParentLayout=function(){},i.prototype.setMeasuredSize=function(t,e){},i.prototype.invalidateProperties=function(){},i.prototype.validateProperties=function(){},i.prototype.invalidateSize=function(){},i.prototype.validateSize=function(t){},i.prototype.invalidateDisplayList=function(){},i.prototype.validateDisplayList=function(){},i.prototype.validateNow=function(){},i.prototype.setLayoutBoundsSize=function(t,e){},i.prototype.setLayoutBoundsPosition=function(t,e){},i.prototype.getLayoutBounds=function(t){},i.prototype.getPreferredBounds=function(t){},i}(egret.DisplayObjectContainer);t.Component=e,__reflect(e.prototype,"eui.Component",["eui.UIComponent","egret.DisplayObject"]),t.registerProperty(e,"skinName","Class"),t.sys.implementUIComponent(e,egret.DisplayObjectContainer,!0)}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.$dataProviderChanged=!1,t.$dataProvider=null,t.$indexToRenderer=[],t.$DataGroup={0:!0,1:!1,2:{},3:{},4:!1,5:!1,6:null,7:null,8:!1,9:null,10:!1,11:!1,12:null,13:null,14:!1},t}return __extends(i,e),Object.defineProperty(i.prototype,"useVirtualLayout",{get:function(){return this.$layout?this.$layout.$useVirtualLayout:this.$DataGroup[0]},set:function(t){t=!!t;var e=this.$DataGroup;t!==e[0]&&(e[0]=t,this.$layout&&(this.$layout.useVirtualLayout=t))},enumerable:!0,configurable:!0}),i.prototype.$setLayout=function(t){if(t==this.$layout)return!1;this.$layout&&(this.$layout.setTypicalSize(0,0),this.$layout.removeEventListener("useVirtualLayoutChanged",this.onUseVirtualLayoutChanged,this)),this.$layout&&t&&this.$layout.$useVirtualLayout!=t.$useVirtualLayout&&this.onUseVirtualLayoutChanged();var i=e.prototype.$setLayout.call(this,t);if(t){var n=this.$DataGroup[9];n&&t.setTypicalSize(n.width,n.height),t.useVirtualLayout=this.$DataGroup[0],t.addEventListener("useVirtualLayoutChanged",this.onUseVirtualLayoutChanged,this)}return i},i.prototype.onUseVirtualLayoutChanged=function(t){var e=this.$DataGroup;e[1]=!0,e[10]=!0,this.removeDataProviderListener(),this.invalidateProperties()},i.prototype.setVirtualElementIndicesInView=function(t,e){if(this.$layout&&this.$layout.$useVirtualLayout)for(var i=this.$indexToRenderer,n=Object.keys(i),r=n.length,o=0;r>o;o++){var s=+n[o]; (t>s||s>e)&&this.freeRendererByIndex(s)}},i.prototype.getElementAt=function(t){return this.$indexToRenderer[t]},i.prototype.getVirtualElementAt=function(t){if(t=0|+t,0>t||t>=this.$dataProvider.length)return null;var e=this.$indexToRenderer[t];if(!e){var i=this.$dataProvider.getItemAt(t);e=this.createVirtualRenderer(i),this.$indexToRenderer[t]=e,this.updateRenderer(e,t,i);var n=this.$DataGroup;n[4]&&(e.validateNow(),n[4]=!1,this.rendererAdded(e,t,i))}return e},i.prototype.freeRendererByIndex=function(t){var e=this.$indexToRenderer[t];e&&(delete this.$indexToRenderer[t],this.doFreeRenderer(e))},i.prototype.doFreeRenderer=function(t){var e=this.$DataGroup,i=e[2][t.$hashCode],n=i.$hashCode;e[3][n]||(e[3][n]=[]),e[3][n].push(t),t.visible=!1},i.prototype.invalidateSize=function(){this.$DataGroup[4]||e.prototype.invalidateSize.call(this)},i.prototype.createVirtualRenderer=function(t){var e,i=this.itemToRendererClass(t),n=i.$hashCode,r=this.$DataGroup,o=r[3];return o[n]&&o[n].length>0?(e=o[n].pop(),e.visible=!0,this.invalidateDisplayList(),e):(r[4]=!0,this.createOneRenderer(i))},i.prototype.createOneRenderer=function(t){var e=new t,i=this.$DataGroup;return i[2][e.$hashCode]=t,egret.is(e,"eui.IItemRenderer")?(i[13]&&this.setItemRenderSkinName(e,i[13]),this.addChild(e),e):null},i.prototype.setItemRenderSkinName=function(e,i){if(e&&e instanceof t.Component){var n=e;n.$Component[5]||(n.skinName=i,n.$Component[5]=!1)}},Object.defineProperty(i.prototype,"dataProvider",{get:function(){return this.$dataProvider},set:function(t){this.$setDataProvider(t)},enumerable:!0,configurable:!0}),i.prototype.$setDataProvider=function(t){return this.$dataProvider==t||t&&!t.getItemAt?!1:(this.removeDataProviderListener(),this.$dataProvider=t,this.$dataProviderChanged=!0,this.$DataGroup[10]=!0,this.invalidateProperties(),this.invalidateSize(),this.invalidateDisplayList(),!0)},i.prototype.removeDataProviderListener=function(){this.$dataProvider&&this.$dataProvider.removeEventListener(t.CollectionEvent.COLLECTION_CHANGE,this.onCollectionChange,this)},i.prototype.onCollectionChange=function(e){switch(e.kind){case t.CollectionEventKind.ADD:this.itemAddedHandler(e.items,e.location);break;case t.CollectionEventKind.REMOVE:this.itemRemovedHandler(e.items,e.location);break;case t.CollectionEventKind.UPDATE:case t.CollectionEventKind.REPLACE:this.itemUpdatedHandler(e.items[0],e.location);break;case t.CollectionEventKind.RESET:case t.CollectionEventKind.REFRESH:if(this.$layout&&this.$layout.$useVirtualLayout)for(var i=this.$indexToRenderer,n=Object.keys(i),r=n.length,o=r-1;o>=0;o--){var s=+n[o];this.freeRendererByIndex(s)}this.$dataProviderChanged=!0,this.invalidateProperties()}this.invalidateSize(),this.invalidateDisplayList()},i.prototype.itemAddedHandler=function(t,e){for(var i=t.length,n=0;i>n;n++)this.itemAdded(t[n],e+n);this.resetRenderersIndices()},i.prototype.itemRemovedHandler=function(t,e){for(var i=t.length,n=i-1;n>=0;n--)this.itemRemoved(t[n],e+n);this.resetRenderersIndices()},i.prototype.itemAdded=function(t,e){if(this.$layout&&this.$layout.elementAdded(e),this.$layout&&this.$layout.$useVirtualLayout)return void this.$indexToRenderer.splice(e,0,null);var i=this.createVirtualRenderer(t);if(this.$indexToRenderer.splice(e,0,i),i){this.updateRenderer(i,e,t);var n=this.$DataGroup;n[4]&&(n[4]=!1,this.rendererAdded(i,e,t))}},i.prototype.itemRemoved=function(t,e){this.$layout&&this.$layout.elementRemoved(e);var i=this.$indexToRenderer[e];this.$indexToRenderer.length>e&&this.$indexToRenderer.splice(e,1),i&&(this.$layout&&this.$layout.$useVirtualLayout?this.doFreeRenderer(i):(this.rendererRemoved(i,e,t),this.removeChild(i)))},i.prototype.resetRenderersIndices=function(){var t=this.$indexToRenderer;if(0!=t.length)if(this.$layout&&this.$layout.$useVirtualLayout)for(var e=Object.keys(t),i=e.length,n=0;i>n;n++){var r=+e[n];this.resetRendererItemIndex(r)}else for(var o=t.length,r=0;o>r;r++)this.resetRendererItemIndex(r)},i.prototype.itemUpdatedHandler=function(t,e){if(!this.$DataGroup[11]){var i=this.$indexToRenderer[e];i&&this.updateRenderer(i,e,t)}},i.prototype.resetRendererItemIndex=function(t){var e=this.$indexToRenderer[t];e&&(e.itemIndex=t)},Object.defineProperty(i.prototype,"itemRenderer",{get:function(){return this.$DataGroup[6]},set:function(t){var e=this.$DataGroup;e[6]!=t&&(e[6]=t,e[5]=!0,e[8]=!0,e[10]=!0,this.removeDataProviderListener(),this.invalidateProperties())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemRendererSkinName",{get:function(){return this.$DataGroup[13]},set:function(t){var e=this.$DataGroup;e[13]!=t&&(e[13]=t,this.$UIComponent[29]&&(e[14]=!0,this.invalidateProperties()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"itemRendererFunction",{get:function(){return this.$DataGroup[7]},set:function(t){var e=this.$DataGroup;e[7]!=t&&(e[7]=t,e[5]=!0,e[8]=!0,this.removeDataProviderListener(),this.invalidateProperties())},enumerable:!0,configurable:!0}),i.prototype.itemToRendererClass=function(e){var i,n=this.$DataGroup;return n[7]&&(i=n[7](e)),i||(i=n[6]),i||(i=t.ItemRenderer),i.$hashCode||(i.$hashCode=egret.$hashCount++),i},i.prototype.createChildren=function(){if(!this.$layout){var i=new t.VerticalLayout;i.gap=0,i.horizontalAlign=t.JustifyAlign.CONTENT_JUSTIFY,this.$setLayout(i)}e.prototype.createChildren.call(this)},i.prototype.commitProperties=function(){var i=this.$DataGroup;if((i[5]||this.$dataProviderChanged||i[1])&&(this.removeAllRenderers(),this.$layout&&this.$layout.clearVirtualLayoutCache(),this.setTypicalLayoutRect(null),i[1]=!1,i[5]=!1,this.$dataProvider&&this.$dataProvider.addEventListener(t.CollectionEvent.COLLECTION_CHANGE,this.onCollectionChange,this),this.$layout&&this.$layout.$useVirtualLayout?(this.invalidateSize(),this.invalidateDisplayList()):this.createRenderers(),this.$dataProviderChanged&&(this.$dataProviderChanged=!1,this.scrollV=this.scrollH=0)),e.prototype.commitProperties.call(this),i[8]&&(i[8]=!1,this.$dataProvider&&this.$dataProvider.length>0&&(i[12]=this.$dataProvider.getItemAt(0),this.measureRendererSize())),i[14]){i[14]=!1;for(var n=i[13],r=this.$indexToRenderer,o=Object.keys(r),s=o.length,a=0;s>a;a++){var h=o[a];this.setItemRenderSkinName(r[h],n)}var l=i[3];o=Object.keys(l),s=o.length;for(var a=0;s>a;a++)for(var u=o[a],p=l[u],c=p.length,d=0;c>d;d++)this.setItemRenderSkinName(p[d],n)}},i.prototype.measure=function(){this.$layout&&this.$layout.$useVirtualLayout&&this.ensureTypicalLayoutElement(),e.prototype.measure.call(this)},i.prototype.updateDisplayList=function(t,i){var n=this.$layout&&this.$layout.$useVirtualLayout;n&&this.ensureTypicalLayoutElement(),e.prototype.updateDisplayList.call(this,t,i);var r=this.$DataGroup;if(n){var o=r[9];if(o){var s=this.$indexToRenderer[0];if(s){var a=egret.$TempRectangle;s.getPreferredBounds(a),(a.width!=o.width||a.height!=o.height)&&(r[9]=null)}}}},i.prototype.ensureTypicalLayoutElement=function(){this.$DataGroup[9]||this.$dataProvider&&this.$dataProvider.length>0&&(this.$DataGroup[12]=this.$dataProvider.getItemAt(0),this.measureRendererSize())},i.prototype.measureRendererSize=function(){var t=this.$DataGroup;if(!t[12])return void this.setTypicalLayoutRect(null);var e=this.createVirtualRenderer(t[12]);if(!e)return void this.setTypicalLayoutRect(null);this.updateRenderer(e,0,t[12]),e.validateNow();var i=egret.$TempRectangle;e.getPreferredBounds(i);var n=new egret.Rectangle(0,0,i.width,i.height);this.$layout&&this.$layout.$useVirtualLayout?(t[4]&&this.rendererAdded(e,0,t[12]),this.doFreeRenderer(e)):this.removeChild(e),this.setTypicalLayoutRect(n),t[4]=!1},i.prototype.setTypicalLayoutRect=function(t){this.$DataGroup[9]=t,this.$layout&&(t?this.$layout.setTypicalSize(t.width,t.height):this.$layout.setTypicalSize(0,0))},i.prototype.removeAllRenderers=function(){for(var t=this.$indexToRenderer,e=Object.keys(t),i=e.length,n=0;i>n;n++){var r=e[n],o=t[r];o&&(this.rendererRemoved(o,o.itemIndex,o.data),this.removeChild(o))}this.$indexToRenderer=[];var s=this.$DataGroup;if(s[10]){for(var a=s[3],h=Object.keys(a),l=h.length,n=0;l>n;n++)for(var u=h[n],p=a[u],c=p.length,d=0;c>d;d++){var o=p[d];this.rendererRemoved(o,o.itemIndex,o.data),this.removeChild(o)}s[3]={},s[2]={},s[10]=!1}},i.prototype.createRenderers=function(){if(this.$dataProvider)for(var t=0,e=this.$dataProvider.length,i=0;e>i;i++){var n=this.$dataProvider.getItemAt(i),r=this.itemToRendererClass(n),o=this.createOneRenderer(r);o&&(this.$indexToRenderer[t]=o,this.updateRenderer(o,t,n),this.rendererAdded(o,t,n),t++)}},i.prototype.updateRenderer=function(t,e,i){var n=this.$DataGroup;return n[11]=!0,t.itemIndex=e,t.parent==this&&this.setChildIndex(t,e),t.data=i,n[11]=!1,t},Object.defineProperty(i.prototype,"numElements",{get:function(){return this.$dataProvider?this.$dataProvider.length:0},enumerable:!0,configurable:!0}),i.prototype.rendererAdded=function(t,e,i){},i.prototype.rendererRemoved=function(t,e,i){},i}(t.Group);t.DataGroup=e,__reflect(e.prototype,"eui.DataGroup"),t.registerProperty(e,"itemRenderer","Class"),t.registerProperty(e,"itemRendererSkinName","Class"),t.registerProperty(e,"dataProvider","eui.ICollection",!0)}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.labelDisplay=null,e._label="",e.iconDisplay=null,e._icon=null,e.touchCaptured=!1,e.touchChildren=!1,e.addEventListener(egret.TouchEvent.TOUCH_BEGIN,e.onTouchBegin,e),e}return __extends(e,t),Object.defineProperty(e.prototype,"label",{get:function(){return this._label},set:function(t){this._label=t,this.labelDisplay&&(this.labelDisplay.text=t)},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"icon",{get:function(){return this._icon},set:function(t){this._icon=t,this.iconDisplay&&(this.iconDisplay.source=t)},enumerable:!0,configurable:!0}),e.prototype.onTouchCancle=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.touchCaptured=!1,this.invalidateState()},e.prototype.onTouchBegin=function(t){this.$stage.addEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),this.$stage.addEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.touchCaptured=!0,this.invalidateState(),t.updateAfterEvent()},e.prototype.onStageTouchEnd=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.contains(t.target)&&this.buttonReleased(),this.touchCaptured=!1,this.invalidateState()},e.prototype.getCurrentState=function(){return this.enabled?this.touchCaptured?"down":"up":"disabled"},e.prototype.partAdded=function(t,e){e===this.labelDisplay?this.labelDisplay.text=this._label:e==this.iconDisplay&&(this.iconDisplay.source=this._icon)},e.prototype.buttonReleased=function(){},e}(t.Component);t.Button=e,__reflect(e.prototype,"eui.Button")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.$Range={0:100,1:!1,2:0,3:!1,4:0,5:0,6:!1,7:1,8:!1,9:!1},t}return __extends(i,e),Object.defineProperty(i.prototype,"maximum",{get:function(){return this.$Range[0]},set:function(t){t=+t||0;var e=this.$Range;t!==e[0]&&(e[0]=t,e[1]=!0,this.invalidateProperties(),this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"minimum",{get:function(){return this.$Range[2]},set:function(t){t=+t||0;var e=this.$Range;t!==e[2]&&(e[2]=t,e[3]=!0,this.invalidateProperties(),this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"value",{get:function(){var t=this.$Range;return t[6]?t[5]:t[4]},set:function(t){t=+t||0,this.$setValue(t)},enumerable:!0,configurable:!0}),i.prototype.$setValue=function(t){if(t===this.value)return!1;var e=this.$Range;return e[5]=t,e[6]=!0,this.invalidateProperties(),!0},Object.defineProperty(i.prototype,"snapInterval",{get:function(){return this.$Range[7]},set:function(t){var e=this.$Range;e[9]=!0,t=+t||0,t!==e[7]&&(isNaN(t)?(e[7]=1,e[9]=!1):e[7]=t,e[8]=!0,this.invalidateProperties())},enumerable:!0,configurable:!0}),i.prototype.commitProperties=function(){e.prototype.commitProperties.call(this);var t=this.$Range;if(t[2]>t[0]&&(t[1]?t[0]=t[2]:t[2]=t[0]),t[6]||t[1]||t[3]||t[8]){var i=t[6]?t[5]:t[4];t[6]=!1,t[1]=!1,t[3]=!1,t[8]=!1,this.setValue(this.nearestValidValue(i,t[7]))}},i.prototype.nearestValidSize=function(t){var e=this.snapInterval;if(0==e)return t;var i=Math.round(t/e)*e;return Math.abs(i)=(a-s)/2?a:s;return h/r+i[2]},i.prototype.setValue=function(e){var i=this.$Range;i[4]!==e&&(i[0]>i[2]?i[4]=Math.min(i[0],Math.max(i[2],e)):i[4]=e,i[6]=!1,this.invalidateDisplayList(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"value"))},i.prototype.updateDisplayList=function(t,i){e.prototype.updateDisplayList.call(this,t,i),this.updateSkinDisplayList()},i.prototype.updateSkinDisplayList=function(){},i}(t.Component);t.Range=e,__reflect(e.prototype,"eui.Range"),t.registerBindable(e.prototype,"value")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.$target=null,e.$useVirtualLayout=!1,e.$typicalWidth=71,e.$typicalHeight=22,e}return __extends(e,t),Object.defineProperty(e.prototype,"target",{get:function(){return this.$target},set:function(t){this.$target!==t&&(this.$target=t,this.clearVirtualLayoutCache())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"useVirtualLayout",{get:function(){return this.$useVirtualLayout},set:function(t){t=!!t,this.$useVirtualLayout!=t&&(this.$useVirtualLayout=t,this.dispatchEventWith("useVirtualLayoutChanged"),this.$useVirtualLayout&&!t&&this.clearVirtualLayoutCache(),this.target&&this.target.invalidateDisplayList())},enumerable:!0,configurable:!0}),e.prototype.setTypicalSize=function(t,e){t=+t||71,e=+e||22,(t!==this.$typicalWidth||e!==this.$typicalHeight)&&(this.$typicalWidth=t,this.$typicalHeight=e,this.$target&&this.$target.invalidateSize())},e.prototype.scrollPositionChanged=function(){},e.prototype.clearVirtualLayoutCache=function(){},e.prototype.elementAdded=function(t){},e.prototype.elementRemoved=function(t){},e.prototype.getElementIndicesInView=function(){return null},e.prototype.measure=function(){},e.prototype.updateDisplayList=function(t,e){},e}(egret.EventDispatcher);t.LayoutBase=e,__reflect(e.prototype,"eui.LayoutBase")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.$ListBase={0:!1,1:!1,2:-2,3:-1,4:!1,5:void 0,6:!1,7:null,8:!1},t}return __extends(i,e),Object.defineProperty(i.prototype,"requireSelection",{get:function(){return this.$ListBase[0]},set:function(t){t=!!t;var e=this.$ListBase;t!==e[0]&&(e[0]=t,t&&(e[1]=!0,this.invalidateProperties()))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedIndex",{get:function(){return this.$getSelectedIndex()},set:function(t){t=0|+t,this.setSelectedIndex(t,!1)},enumerable:!0,configurable:!0}),i.prototype.$getSelectedIndex=function(){var t=this.$ListBase;return t[2]!=i.NO_PROPOSED_SELECTION?t[2]:t[3]},i.prototype.setSelectedIndex=function(t,e){if(t!=this.selectedIndex){var i=this.$ListBase;e&&(i[4]=i[4]||e),i[2]=t,this.invalidateProperties()}},Object.defineProperty(i.prototype,"selectedItem",{get:function(){var t=this.$ListBase;if(void 0!==t[5])return t[5];var e=this.$getSelectedIndex();if(e!=i.NO_SELECTION&&null!=this.$dataProvider)return this.$dataProvider.length>e?this.$dataProvider.getItemAt(e):void 0},set:function(t){this.setSelectedItem(t,!1)},enumerable:!0,configurable:!0}),i.prototype.setSelectedItem=function(t,e){if(void 0===e&&(e=!1),this.selectedItem!==t){var i=this.$ListBase;e&&(i[4]=i[4]||e),i[5]=t,this.invalidateProperties()}},i.prototype.commitProperties=function(){var n=this.$dataProviderChanged;e.prototype.commitProperties.call(this);var r=this.$ListBase,o=this.$getSelectedIndex(),s=this.$dataProvider;n&&(o>=0&&s&&o0&&(r[2]=0)),void 0!==r[5]&&(s?r[2]=s.getItemIndex(r[5]):r[2]=i.NO_SELECTION,r[5]=void 0);var a=!1;r[2]!=i.NO_PROPOSED_SELECTION&&(a=this.commitSelection()),r[6]&&(r[6]=!1,a||t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedIndex"))},i.prototype.updateRenderer=function(t,i,n){return this.itemSelected(i,this.$isItemIndexSelected(i)),e.prototype.updateRenderer.call(this,t,i,n)},i.prototype.itemSelected=function(t,e){var i=this.$indexToRenderer[t];i&&(i.selected=e)},i.prototype.$isItemIndexSelected=function(t){return t==this.selectedIndex},i.prototype.commitSelection=function(e){void 0===e&&(e=!0);var n=this.$dataProvider,r=this.$ListBase,o=n?n.length-1:-1,s=r[3],a=r[2];if(ao&&(a=o),r[0]&&a==i.NO_SELECTION&&n&&n.length>0)return r[2]=i.NO_PROPOSED_SELECTION,r[4]=!1,!1;if(r[4]){var h=this.dispatchEventWith(egret.Event.CHANGING,!1,!0,!0);if(!h)return this.itemSelected(r[2],!1),r[2]=i.NO_PROPOSED_SELECTION,r[4]=!1,!1}return r[3]=a,r[2]=i.NO_PROPOSED_SELECTION,s!=i.NO_SELECTION&&this.itemSelected(s,!1),r[3]!=i.NO_SELECTION&&this.itemSelected(r[3],!0),e&&(r[4]&&(this.dispatchEventWith(egret.Event.CHANGE),r[4]=!1),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedIndex"),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedItem")),!0},i.prototype.adjustSelection=function(t,e){void 0===e&&(e=!1);var n=this.$ListBase;n[2]!=i.NO_PROPOSED_SELECTION?n[2]=t:n[3]=t,n[6]=!0,this.invalidateProperties()},i.prototype.itemAdded=function(t,n){e.prototype.itemAdded.call(this,t,n);var r=this.$getSelectedIndex();r==i.NO_SELECTION?this.$ListBase[0]&&this.adjustSelection(n,!0):r>=n&&this.adjustSelection(r+1,!0)},i.prototype.itemRemoved=function(t,n){if(e.prototype.itemRemoved.call(this,t,n),this.selectedIndex!=i.NO_SELECTION){var r=this.$getSelectedIndex();n==r?this.requireSelection&&this.$dataProvider&&this.$dataProvider.length>0?0==n?(this.$ListBase[2]=0,this.invalidateProperties()):this.setSelectedIndex(0,!1):this.adjustSelection(-1,!1):r>n&&this.adjustSelection(r-1,!1)}},i.prototype.onCollectionChange=function(n){e.prototype.onCollectionChange.call(this,n),n.kind==t.CollectionEventKind.RESET?0==this.$dataProvider.length&&this.setSelectedIndex(i.NO_SELECTION,!1):n.kind==t.CollectionEventKind.REFRESH&&this.dataProviderRefreshed()},i.prototype.dataProviderRefreshed=function(){this.setSelectedIndex(i.NO_SELECTION,!1)},i.prototype.rendererAdded=function(t,e,i){t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onRendererTouchBegin,this),t.addEventListener(egret.TouchEvent.TOUCH_END,this.onRendererTouchEnd,this),t.addEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onRendererTouchCancle,this)},i.prototype.rendererRemoved=function(t,e,i){t.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onRendererTouchBegin,this),t.removeEventListener(egret.TouchEvent.TOUCH_END,this.onRendererTouchEnd,this),t.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onRendererTouchCancle,this)},i.prototype.onRendererTouchBegin=function(t){var e=this.$ListBase;t.$isDefaultPrevented||(e[8]=!1,e[7]=t.$currentTarget,this.$stage.addEventListener(egret.TouchEvent.TOUCH_END,this.stage_touchEndHandler,this))},i.prototype.onRendererTouchCancle=function(t){var e=this.$ListBase;e[7]=null,e[8]=!0,this.$stage&&this.$stage.removeEventListener(egret.TouchEvent.TOUCH_END,this.stage_touchEndHandler,this)},i.prototype.onRendererTouchEnd=function(e){var i=this.$ListBase,n=e.$currentTarget,r=i[7];n==r&&(i[8]||(this.setSelectedIndex(n.itemIndex,!0),t.ItemTapEvent.dispatchItemTapEvent(this,t.ItemTapEvent.ITEM_TAP,n)),i[8]=!1)},i.prototype.stage_touchEndHandler=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_END,this.stage_touchEndHandler,this),this.$ListBase[7]=null},i.NO_SELECTION=-1,i.NO_PROPOSED_SELECTION=-2,i}(t.DataGroup);t.ListBase=e,__reflect(e.prototype,"eui.ListBase"),t.registerBindable(e.prototype,"selectedIndex"),t.registerBindable(e.prototype,"selectedItem")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.thumb=null,t.$viewport=null,t.autoVisibility=!0,t}return __extends(i,e),Object.defineProperty(i.prototype,"viewport",{get:function(){return this.$viewport},set:function(e){if(e!=this.$viewport){var i=this.$viewport;i&&(i.removeEventListener(t.PropertyEvent.PROPERTY_CHANGE,this.onPropertyChanged,this),i.removeEventListener(egret.Event.RESIZE,this.onViewportResize,this)),this.$viewport=e,e&&(e.addEventListener(t.PropertyEvent.PROPERTY_CHANGE,this.onPropertyChanged,this),e.addEventListener(egret.Event.RESIZE,this.onViewportResize,this)),this.invalidateDisplayList()}},enumerable:!0,configurable:!0}),i.prototype.onViewportResize=function(t){this.invalidateDisplayList()},i.prototype.onPropertyChanged=function(t){},i}(t.Component);t.ScrollBarBase=e,__reflect(e.prototype,"eui.ScrollBarBase")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.trackHighlight=null,t.thumb=null,t.track=null,t.$SliderBase={0:0,1:0,2:0,3:0,4:null,5:null,6:300,7:0,8:0,9:!0},t.maximum=10,t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,t.onTouchBegin,t),t}return __extends(i,e),Object.defineProperty(i.prototype,"slideDuration",{get:function(){return this.$SliderBase[6]},set:function(t){this.$SliderBase[6]=+t||0},enumerable:!0,configurable:!0}),i.prototype.pointToValue=function(t,e){return this.minimum},Object.defineProperty(i.prototype,"liveDragging",{get:function(){return this.$SliderBase[9]},set:function(t){this.$SliderBase[9]=!!t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"pendingValue",{get:function(){return this.$SliderBase[7]},set:function(t){t=+t||0;var e=this.$SliderBase;t!==e[7]&&(e[7]=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),i.prototype.setValue=function(t){this.$SliderBase[7]=t,e.prototype.setValue.call(this,t)},i.prototype.partAdded=function(t,i){e.prototype.partAdded.call(this,t,i),i==this.thumb?(this.thumb.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onThumbTouchBegin,this),this.thumb.addEventListener(egret.Event.RESIZE,this.onTrackOrThumbResize,this)):i==this.track?(this.track.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTrackTouchBegin,this),this.track.addEventListener(egret.Event.RESIZE,this.onTrackOrThumbResize,this)):i===this.trackHighlight&&(this.trackHighlight.touchEnabled=!1,egret.is(this.trackHighlight,"egret.DisplayObjectContainer")&&(this.trackHighlight.touchChildren=!1))},i.prototype.partRemoved=function(t,i){e.prototype.partRemoved.call(this,t,i),i==this.thumb?(this.thumb.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onThumbTouchBegin,this),this.thumb.removeEventListener(egret.Event.RESIZE,this.onTrackOrThumbResize,this)):i==this.track&&(this.track.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTrackTouchBegin,this),this.track.removeEventListener(egret.Event.RESIZE,this.onTrackOrThumbResize,this))},i.prototype.onTrackOrThumbResize=function(t){this.updateSkinDisplayList()},i.prototype.onThumbTouchBegin=function(e){var i=this.$SliderBase;i[5]&&i[5].isPlaying&&this.stopAnimation();var n=this.$stage;n.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onStageTouchMove,this),n.addEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this);var r=this.thumb.globalToLocal(e.stageX,e.stageY,egret.$TempPoint);i[0]=r.x,i[1]=r.y,t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_START)},i.prototype.onStageTouchMove=function(t){var e=this.$SliderBase;e[2]=t.$stageX,e[3]=t.$stageY;var i=this.track;if(i){var n=i.globalToLocal(e[2],e[3],egret.$TempPoint),r=this.pointToValue(n.x-e[0],n.y-e[1]);r=this.nearestValidValue(r,this.snapInterval),this.updateWhenTouchMove(r),t.updateAfterEvent()}},i.prototype.updateWhenTouchMove=function(t){t!=this.$SliderBase[7]&&(this.liveDragging?(this.setValue(t),this.dispatchEventWith(egret.Event.CHANGE)):this.pendingValue=t)},i.prototype.onStageTouchEnd=function(e){var i=e.$currentTarget;i.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onStageTouchMove,this),i.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_END);var n=this.$SliderBase;this.liveDragging||this.value==n[7]||(this.setValue(n[7]),this.dispatchEventWith(egret.Event.CHANGE))},i.prototype.onTouchBegin=function(t){this.$stage.addEventListener(egret.TouchEvent.TOUCH_END,this.stageTouchEndHandler,this),this.$SliderBase[4]=t.$target},i.prototype.stageTouchEndHandler=function(t){var e=t.$target,i=this.$SliderBase;t.$currentTarget.removeEventListener(egret.TouchEvent.TOUCH_END,this.stageTouchEndHandler,this),i[4]!=e&&this.contains(e)&&egret.TouchEvent.dispatchTouchEvent(this,egret.TouchEvent.TOUCH_TAP,!0,!0,t.$stageX,t.$stageY,t.touchPointID),i[4]=null},i.prototype.$animationUpdateHandler=function(t){this.pendingValue=t.currentValue},i.prototype.animationEndHandler=function(e){this.setValue(this.$SliderBase[8]),this.dispatchEventWith(egret.Event.CHANGE),t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_END)},i.prototype.stopAnimation=function(){this.$SliderBase[5].stop(),this.setValue(this.nearestValidValue(this.pendingValue,this.snapInterval)),this.dispatchEventWith(egret.Event.CHANGE),t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_END)},i.prototype.onTrackTouchBegin=function(e){var i=this.thumb?this.thumb.width:0,n=this.thumb?this.thumb.height:0,r=e.$stageX-i/2,o=e.$stageY-n/2,s=this.track.globalToLocal(r,o,egret.$TempPoint),a=this.$Range,h=this.pointToValue(s.x,s.y);h=this.nearestValidValue(h,a[7]);var l=this.$SliderBase;if(h!=l[7])if(0!=l[6]){l[5]||(l[5]=new t.sys.Animation(this.$animationUpdateHandler,this),l[5].endFunction=this.animationEndHandler);var u=l[5];u.isPlaying&&this.stopAnimation(),l[8]=h,u.duration=l[6]*(Math.abs(l[7]-l[8])/(a[0]-a[2])),u.from=l[7],u.to=l[8],t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_START),u.play()}else this.setValue(h),this.dispatchEventWith(egret.Event.CHANGE)},i}(t.Range);t.SliderBase=e,__reflect(e.prototype,"eui.SliderBase")}(eui||(eui={}));var eui;!function(t){var e;!function(t){function e(t){if(!t)return"";for(var e=" at <"+t.name,i=t.attributes,n=Object.keys(i),r=n.length,o=0;r>o;o++){var s=n[o],a=i[s];("id"!=s||"__"!=a.substring(0,2))&&(e+=" "+s+'="'+a+'"')}return e+=0==t.children.length?"/>":">"}function i(t){var i=e(t.parent),n=e(t).substring(5);return i+"\n "+n}var n=[],r=1,o="hostComponent",s="eui.Skin",a="Declarations",h="egret.Rectangle",l="Class",u="Array",p="Percentage",c="State[]",d="skinName",f=[u,"boolean","string","number"],y=["id","locked","includeIn","excludeFrom"],g=[["<","<"],[">",">"],["&","&"],['"',"""],["'","'"]],v=["null","NaN","undefined","true","false"],m=function(){function e(){this.delayAssignmentDic={}}return e.prototype.$parseCode=function(t,e){var i=e?e:"$exmlClass"+r++,n=eval,o=n(t),s=!0;if(s&&o){egret.registerClass(o,i);for(var a=i.split("."),h=a.length,l=__global,u=0;h-1>u;u++){var p=a[u];l=l[p]||(l[p]={})}l[a[h-1]]||(l[a[h-1]]=o)}return o},e.prototype.parse=function(t){var e=null;e=egret.XML.parse(t);var i=!1,n="";e.attributes["class"]?(n=e.attributes["class"],delete e.attributes["class"],i=!!n):n="$exmlClass"+r++;var o=this.parseClass(e,n),s=o.toCode(),a=null,h=eval;if(a=h(s),i&&a){egret.registerClass(a,n);for(var l=n.split("."),u=l.length,p=__global,c=0;u-1>c;c++){var d=l[c];p=p[d]||(p[d]={})}p[l[u-1]]||(p[l[u-1]]=a)}return a},e.prototype.parseClass=function(e,i){t.exmlConfig||(t.exmlConfig=new t.EXMLConfig),this.currentXML=e,this.currentClassName=i,this.delayAssignmentDic={},this.idDic={},this.stateCode=[],this.stateNames=[],this.skinParts=[],this.bindings=[],this.declarations=null,this.currentClass=new t.EXClass,this.stateIds=[];var n=i.lastIndexOf(".");-1!=n?this.currentClass.className=i.substring(n+1):this.currentClass.className=i,this.startCompile();var r=this.currentClass;return this.currentClass=null,r},e.prototype.startCompile=function(){var e=this.getClassNameOfNode(this.currentXML);this.isSkinClass=e==s,this.currentClass.superClass=e,this.getStateNames();var i=this.currentXML.children;if(i)for(var n=i.length,r=0;n>r;r++){var o=i[r];if(1===o.nodeType&&o.namespace==t.NS_W&&o.localName==a){this.declarations=o;break}}this.currentXML.namespace&&(this.addIds(this.currentXML.children),this.createConstructFunc())},e.prototype.addIds=function(e){if(e)for(var i=e.length,n=0;i>n;n++){var r=e[n];if(1==r.nodeType&&r.namespace&&!this.isInnerClass(r))if(this.addIds(r.children),r.namespace!=t.NS_W&&r.localName){if(this.isProperty(r)){var o=r.localName,s=o.indexOf("."),a=r.children;if(-1==s||!a||0==a.length)continue;var h=a[0];this.stateIds.push(h.attributes.id)}else if(1===r.nodeType){var l=r.attributes.id;if(l){var u=new RegExp("^[a-zA-Z_$]{1}[a-z0-9A-Z_$]*");null==l.match(u)&&egret.$warn(2022,l),null!=l.match(new RegExp(/ /g))&&egret.$warn(2022,l),-1==this.skinParts.indexOf(l)&&this.skinParts.push(l),this.createVarForNode(r),this.isStateNode(r)&&this.stateIds.push(l)}else this.createIdForNode(r),this.isStateNode(r)&&this.stateIds.push(r.attributes.id)}}else;}},e.prototype.isInnerClass=function(e){if(e.hasOwnProperty("isInnerClass"))return e.isInnerClass;var i="Skin"==e.localName&&e.namespace==t.NS_S;if(!i)if(this.isProperty(e))i=!1;else{var n=void 0,r=e.parent;if(this.isProperty(r)){n=r.localName;var o=n.indexOf(".");if(-1!=o){n.substring(o+1);n=n.substring(0,o)}r=r.parent}else n=t.exmlConfig.getDefaultPropById(r.localName,r.namespace);var s=t.exmlConfig.getClassNameById(r.localName,r.namespace);i=t.exmlConfig.getPropertyType(n,s)==l}return e.isInnerClass=i,i},e.prototype.containsState=function(t){var e=t.attributes;if(e.includeIn||e.excludeFrom)return!0;for(var i=Object.keys(e),n=i.length,r=0;n>r;r++){var o=i[r];if(-1!=o.indexOf("."))return!0}return!1},e.prototype.createIdForNode=function(t){var e=this.getNodeId(t);this.idDic[e]?this.idDic[e]++:this.idDic[e]=1,e+=this.idDic[e],t.attributes.id=e},e.prototype.getNodeId=function(t){return t.attributes.id?t.attributes.id:"_"+t.localName},e.prototype.createVarForNode=function(e){var i=this.getClassNameOfNode(e);""!=i&&(this.currentClass.getVariableByName(e.attributes.id)||this.currentClass.addVariable(new t.EXVariable(e.attributes.id)))},e.prototype.createFuncForNode=function(e){var i=e.localName,n=this.isBasicTypeData(i);if(n)return this.createBasicTypeForNode(e);var r=this.getClassNameOfNode(e),o=new t.EXFunction,s="_i",a=e.attributes.id;o.name=a+s,this.currentClass.addFunction(o);var h=new t.EXCodeBlock;o.codeBlock=h;var l="t";"Object"==i?h.addVar(l,"{}"):h.addVar(l,"new "+r+"()");var u=!!this.currentClass.getVariableByName(a);u&&h.addAssignment("this."+a,l),this.addAttributesToCodeBlock(h,l,e),this.initlizeChildNode(e,h,l);var p=this.delayAssignmentDic[a];if(p)for(var c=p.length,d=0;c>d;d++){var f=p[d];h.concat(f)}return h.addReturn(l),"this."+o.name+"()"},e.prototype.isBasicTypeData=function(t){return-1!=f.indexOf(t)},e.prototype.createBasicTypeForNode=function(t){var e=t.localName,i="",n=this.currentClass.getVariableByName(t.attributes.id),r=t.children,o="";if(r&&r.length>0){var s=r[0];3==s.nodeType&&(o=s.text.trim())}switch(e){case u:var a=[];if(r)for(var h=r.length,l=0;h>l;l++){var p=r[l];1==p.nodeType&&a.push(this.createFuncForNode(p))}i="["+a.join(",")+"]";break;case"boolean":i="false"!=o&&o?"true":"false";break;case"number":i=o,-1!=i.indexOf("%")&&(i=i.substring(0,i.length-1)); break;case"string":i=this.formatString(o)}return n&&(n.defaultValue=i),i},e.prototype.addAttributesToCodeBlock=function(e,i,n){var r,o,s=n.attributes,a=Object.keys(s);a.sort();for(var h=a.length,l=0;h>l;l++)if(r=a[l],this.isNormalKey(r)&&(o=s[r],r=this.formatKey(r,o),o=this.formatValue(r,o,n))){if(this.currentClass.getVariableByName(o)){var u="this.",p=s.id,c=u+p+" = t;";this.currentClass.getVariableByName(p)||this.createVarForNode(n),e.containsCodeLine(c)||e.addCodeLineAt(c,1);var d=new t.EXCodeBlock;"this"==i?d.addAssignment(i,u+o,r):(d.startIf(u+p),d.addAssignment(u+p,u+o,r),d.endBlock()),this.delayAssignmentDic[o]||(this.delayAssignmentDic[o]=[]),this.delayAssignmentDic[o].push(d),o=u+o}e.addAssignment(i,o,r)}},e.prototype.initlizeChildNode=function(e,n,r){var o=e.children;if(o&&0!=o.length){for(var s,a=t.exmlConfig.getClassNameById(e.localName,e.namespace),h=[],l=o.length,u=[],p=0;l>p;p++){var c=o[p];if(1==c.nodeType&&c.namespace!=t.NS_W)if(this.isInnerClass(c)){if("Skin"==c.localName){var f=this.parseInnerClass(c),y=t.exmlConfig.getPropertyType(d,a);y?n.addAssignment(r,f,d):egret.$error(2005,this.currentClassName,d,i(c))}}else{var g=c.localName;if(this.isProperty(c)){if(!this.isNormalKey(g))continue;var y=t.exmlConfig.getPropertyType(c.localName,a);if(!y)continue;if(!c.children||0==c.children.length)continue;this.addChildrenToProp(c.children,y,g,n,r,s,u,e)}else h.push(c)}}if(0!=h.length){var v=t.exmlConfig.getDefaultPropById(e.localName,e.namespace),m=t.exmlConfig.getPropertyType(v,a);v&&m&&this.addChildrenToProp(h,m,v,n,r,s,u,e)}}},e.prototype.parseInnerClass=function(t){var i=n.pop();i||(i=new e);var o=this.currentClass.className+"$"+t.localName+r++,s=i.parseClass(t,o);return this.currentClass.addInnerClass(s),n.push(i),o},e.prototype.addChildrenToProp=function(t,e,i,n,r,o,s,a){var h="",p=t.length;if(p>1){if(e!=u)return;for(var c=[],d=0;p>d;d++){var f=t[d];if(1==f.nodeType){h=this.createFuncForNode(f);this.getClassNameOfNode(f);this.isStateNode(f)||c.push(h)}}h="["+c.join(",")+"]"}else{var y=t[0];if(e==u)if(y.localName==u){var c=[];if(y.children)for(var g=y.children.length,v=0;g>v;v++){var f=y.children[v];if(1==f.nodeType){h=this.createFuncForNode(f);this.getClassNameOfNode(f);this.isStateNode(f)||c.push(h)}}h="["+c.join(",")+"]"}else{h=this.createFuncForNode(y);this.getClassNameOfNode(y);h=this.isStateNode(y)?"[]":"["+h+"]"}else if(1==y.nodeType)if(e==l){if(p>1)return;h=this.parseInnerClass(t[0])}else{this.getClassNameOfNode(y);h=this.createFuncForNode(y)}else h=this.formatValue(i,y.text,a)}""!=h&&(-1==h.indexOf("()")&&(i=this.formatKey(i,h)),-1==s.indexOf(i)&&s.push(i),n.addAssignment(r,h,i))},e.prototype.isProperty=function(e){if(e.hasOwnProperty("isProperty"))return e.isProperty;var i,n=e.localName;if(n&&1===e.nodeType&&e.parent&&!this.isBasicTypeData(n)){var r=e.parent,o=n.indexOf(".");-1!=o&&(n=n.substr(0,o));var s=t.exmlConfig.getClassNameById(r.localName,r.namespace);i=!!t.exmlConfig.getPropertyType(n,s)}else i=!1;return e.isProperty=i,i},e.prototype.isNormalKey=function(t){return t&&-1==t.indexOf(".")&&-1==t.indexOf(":")&&-1==y.indexOf(t)?!0:!1},e.prototype.formatKey=function(t,e){return-1!=e.indexOf("%")&&("height"==t?t="percentHeight":"width"==t&&(t="percentWidth")),t},e.prototype.formatValue=function(e,i,n){i||(i="");var r=i;i=i.trim();var o=this.getClassNameOfNode(n),s=t.exmlConfig.getPropertyType(e,o),a=this.formatBinding(e,i,n);if(a){this.checkIdForState(n);var u="this";n!==this.currentXML&&(u+="."+n.attributes.id),this.bindings.push(new t.EXBinding(u,e,a.templates,a.chainIndex)),i=""}else if(s==h){i="new "+h+"("+i+")"}else if(s==p)-1!=i.indexOf("%")&&(i=this.formatString(i));else{switch(s){case l:e==d&&(i=this.formatString(r));break;case"number":0==i.indexOf("#")?i="0x"+i.substring(1):-1!=i.indexOf("%")&&(i=parseFloat(i.substr(0,i.length-1)).toString());break;case"boolean":i="false"!=i&&i?"true":"false";break;case"string":case"any":i=this.formatString(r)}}return i},e.prototype.formatString=function(t){return t=this.unescapeHTMLEntity(t),t=t.split("\n").join("\\n"),t=t.split("\r").join("\\n"),t=t.split('"').join('\\"'),t='"'+t+'"'},e.prototype.formatBinding=function(t,e,i){if(!e)return null;if(e=e.trim(),"{"!=e.charAt(0)||"}"!=e.charAt(e.length-1))return null;e=e.substring(1,e.length-1).trim();for(var n=-1==e.indexOf("+")?[e]:this.parseTemplates(e),r=[],s=n.length,a=0;s>a;a++){var h=n[a].trim();if(h){var l=h.charAt(0);if(!("'"==l||'"'==l||l>="0"&&"9">=l||"-"==l||-1==h.indexOf(".")&&-1!=v.indexOf(h))){0==h.indexOf("this.")&&(h=h.substring(5));var u=h.split(".")[0];u!=o&&-1==this.skinParts.indexOf(u)&&(h=o+"."+h),n[a]='"'+h+'"',r.push(a)}}else n.splice(a,1),a--,s--}return{templates:n,chainIndex:r}},e.prototype.parseTemplates=function(t){if(-1==t.indexOf("'"))return t.split("+");var e=!1,i="";for(t=t.split("\\'").join(" 0 ");t.length>0;){var n=t.indexOf("'");if(-1==n){i+=t;break}i+=t.substring(0,n+1),t=t.substring(n+1),n=t.indexOf("'"),-1==n&&(n=t.length-1,e=!0);var r=t.substring(0,n+1);i+=r.split("+").join(" 1 "),t=t.substring(n+1)}t=i.split(" 0 ").join("\\'"),e&&(t+="'");for(var o=t.split("+"),s=o.length,a=0;s>a;a++)o[a]=o[a].split(" 1 ").join("+");return o},e.prototype.unescapeHTMLEntity=function(t){if(!t)return"";for(var e=g.length,i=0;e>i;i++){var n=g[i],r=n[0],o=n[1];t=t.split(o).join(r)}return t},e.prototype.createConstructFunc=function(){var e=new t.EXCodeBlock;e.addEmptyLine();var i="this";if(this.addAttributesToCodeBlock(e,i,this.currentXML),this.declarations){var n=this.declarations.children;if(n&&n.length>0)for(var r=n.length,o=0;r>o;o++){var s=n[o];if(1==s.nodeType){var a=this.createFuncForNode(s);a&&e.addCodeLine(a+";")}}}this.initlizeChildNode(this.currentXML,e,i);var h,l,u=this.stateIds;if(u.length>0){l=u.length;for(var o=0;l>o;o++)h=u[o],e.addCodeLine("this."+h+"_i();");e.addEmptyLine()}var p=this.skinParts,c="[]";if(l=p.length,l>0){for(var o=0;l>o;o++)p[o]='"'+p[o]+'"';c="["+p.join(",")+"]"}var d=new t.EXFunction;d.name="skinParts",d.isGet=!0;var f=new t.EXCodeBlock;f.addReturn(c),d.codeBlock=f,this.currentClass.addFunction(d),this.currentXML.attributes.id="",this.createStates(this.currentXML);for(var y,g=this.currentXML,v=(this.getClassNameOfNode(g),g.attributes),m=Object.keys(v),$=m.length,E=0;$>E;E++){var C=m[E],_=v[C],b=C.indexOf(".");if(-1!=b){var S=C.substring(0,b);S=this.formatKey(S,_);var T=this.formatValue(S,_,g);if(!T)continue;var x=C.substr(b+1);y=this.getStateByName(x,g);var I=y.length;if(I>0)for(var o=0;I>o;o++){var P=y[o];P.addOverride(new t.EXSetProperty("",S,T))}}}var L=this.stateCode;if(l=L.length,l>0){var N=" ";e.addCodeLine("this.states = [");for(var O=!0,o=0;l>o;o++){var P=L[o];O?O=!1:e.addCodeLine(N+",");for(var B=P.toCode().split("\n"),A=0;A0){e.addEmptyLine();for(var o=0;l>o;o++){var M=R[o];e.addCodeLine(M.toCode())}}this.currentClass.constructCode=e},e.prototype.isStateNode=function(t){var e=t.attributes;return e.hasOwnProperty("includeIn")||e.hasOwnProperty("excludeFrom")},e.prototype.getStateNames=function(){var e=this.currentXML,i=t.exmlConfig.getClassNameById(e.localName,e.namespace),n=t.exmlConfig.getPropertyType("states",i);if(n==c){var r=e.attributes.states;r&&delete e.attributes.states;var o,s,a=this.stateNames,h=e.children;if(h)for(var l=h.length,u=0;l>u;u++)if(s=h[u],1==s.nodeType&&"states"==s.localName){s.namespace=t.NS_W,o=s.children;break}if(o||r)if(r)for(var p=r.split(","),d=p.length,u=0;d>u;u++){var f=p[u].trim();f&&(-1==a.indexOf(f)&&a.push(f),this.stateCode.push(new t.EXState(f)))}else for(var y=o.length,u=0;y>u;u++){var g=o[u];if(1==g.nodeType){var v=[],m=g.attributes;if(m.stateGroups)for(var $=m.stateGroups.split(","),E=$.length,C=0;E>C;C++){var _=$[C].trim();_&&(-1==a.indexOf(_)&&a.push(_),v.push(_))}var f=m.name;-1==a.indexOf(f)&&a.push(f),this.stateCode.push(new t.EXState(f,v))}}}},e.prototype.createStates=function(e){var i=e.children;if(i)for(var n=i.length,r=0;n>r;r++){var o=i[r];if(1==o.nodeType&&!this.isInnerClass(o)&&(this.createStates(o),o.namespace!=t.NS_W&&o.localName))if(this.isProperty(o)){var s=o.localName,a=s.indexOf("."),h=o.children;if(-1==a||!h||0==h.length)continue;var l=s.substring(a+1);s=s.substring(0,a);var p=this.getClassNameOfNode(e),c=(t.exmlConfig.getPropertyType(s,p),h[0]),d=void 0;1==c.nodeType?(this.createFuncForNode(c),this.checkIdForState(c),d="this."+c.attributes.id):d=this.formatValue(s,c.text,e);var f=this.getStateByName(l,o),y=f.length;if(y>0)for(var g=0;y>g;g++){var v=f[g];v.addOverride(new t.EXSetProperty(e.attributes.id,s,d))}}else if(this.containsState(o)){var m=o.attributes,$=m.id;this.getClassNameOfNode(o);this.checkIdForState(o);var l=void 0,f=void 0,v=void 0;if(this.isStateNode(o)){var E="",C=o.parent;C.localName==u&&(C=C.parent),C&&C.parent&&this.isProperty(C)&&(C=C.parent),C&&C!=this.currentXML&&(E=C.attributes.id,this.checkIdForState(C));var _=this.findNearNodeId(o),b=[];if(m.includeIn)b=m.includeIn.split(",");else{for(var S=m.excludeFrom.split(","),T=S.length,g=0;T>g;g++){var x=S[g];this.getStateByName(x,o)}T=this.stateCode.length;for(var g=0;T>g;g++)v=this.stateCode[g],-1==S.indexOf(v.name)&&b.push(v.name)}for(var I=b.length,P=0;I>P;P++)if(l=b[P],f=this.getStateByName(l,o),f.length>0)for(var y=f.length,g=0;y>g;g++)v=f[g],v.addOverride(new t.EXAddItems($,E,_.position,_.relativeTo))}for(var L=Object.keys(m),N=L.length,O=0;N>O;O++){var B=L[O],d=m[B],a=B.indexOf(".");if(-1!=a){var A=B.substring(0,a);A=this.formatKey(A,d);var D=this.formatBinding(A,d,o);if(!D&&(d=this.formatValue(A,d,o),!d))continue;l=B.substr(a+1),f=this.getStateByName(l,o);var y=f.length;if(y>0)for(var g=0;y>g;g++)v=f[g],D?v.addOverride(new t.EXSetStateProperty($,A,D.templates,D.chainIndex)):v.addOverride(new t.EXSetProperty($,A,d))}}}}},e.prototype.checkIdForState=function(t){if(t&&!this.currentClass.getVariableByName(t.attributes.id)){this.createVarForNode(t);var e=t.attributes.id,i=e+"_i",n=this.currentClass.getFuncByName(i);if(n){var r="this."+e+" = t;",o=n.codeBlock;o&&(o.containsCodeLine(r)||o.addCodeLineAt(r,1))}}},e.prototype.getStateByName=function(t,e){for(var i=[],n=this.stateCode,r=n.length,o=0;r>o;o++){var s=n[o];if(s.name==t)-1==i.indexOf(s)&&i.push(s);else if(s.stateGroups.length>0){for(var a=!1,h=s.stateGroups.length,l=0;h>l;l++){var u=s.stateGroups[l];if(u==t){a=!0;break}}a&&-1==i.indexOf(s)&&i.push(s)}}return i},e.prototype.findNearNodeId=function(t){for(var e,i,n,r=t.parent,o="",s=-1,a=!1,h=r.children,l=h.length,u=0;l>u;u++){var p=h[u];this.isProperty(p)||(p==t?(a=!0,s=u):!a||n||this.isStateNode(p)||(n=p),a||this.isStateNode(p)||(i=p))}return 0==s?(e=0,{position:e,relativeTo:o}):s==l-1?(e=1,{position:e,relativeTo:o}):n&&(e=2,o=n.attributes.id)?(this.checkIdForState(n),{position:e,relativeTo:o}):{position:1,relativeTo:o}},e.prototype.getClassNameOfNode=function(e){var i=t.exmlConfig.getClassNameById(e.localName,e.namespace);return i},e}();t.EXMLParser=m,__reflect(m.prototype,"eui.sys.EXMLParser")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=null!==e&&e.apply(this,arguments)||this;return t.$selected=!1,t.$autoSelected=!0,t}return __extends(i,e),Object.defineProperty(i.prototype,"selected",{get:function(){return this.$selected},set:function(t){this.$setSelected(t)},enumerable:!0,configurable:!0}),i.prototype.$setSelected=function(e){return e=!!e,e===this.$selected?!1:(this.$selected=e,this.invalidateState(),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selected"),!0)},i.prototype.getCurrentState=function(){var t=e.prototype.getCurrentState.call(this);if(this.$selected){var i=t+"AndSelected",n=this.skin;return n&&n.hasState(i)?i:"disabled"==t?"disabled":"down"}return t},i.prototype.buttonReleased=function(){this.$autoSelected&&(this.selected=!this.$selected,this.dispatchEventWith(egret.Event.CHANGE))},i}(t.Button);t.ToggleButton=e,__reflect(e.prototype,"eui.ToggleButton"),t.registerBindable(e.prototype,"selected")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.$horizontalAlign="left",e.$verticalAlign="top",e.$gap=6,e.$paddingLeft=0,e.$paddingRight=0,e.$paddingTop=0,e.$paddingBottom=0,e.elementSizeTable=[],e.startIndex=-1,e.endIndex=-1,e.indexInViewCalculated=!1,e.maxElementSize=0,e}return __extends(e,t),Object.defineProperty(e.prototype,"horizontalAlign",{get:function(){return this.$horizontalAlign},set:function(t){this.$horizontalAlign!=t&&(this.$horizontalAlign=t,this.$target&&this.$target.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"verticalAlign",{get:function(){return this.$verticalAlign},set:function(t){this.$verticalAlign!=t&&(this.$verticalAlign=t,this.$target&&this.$target.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"gap",{get:function(){return this.$gap},set:function(t){t=+t||0,this.$gap!==t&&(this.$gap=t,this.invalidateTargetLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingLeft",{get:function(){return this.$paddingLeft},set:function(t){t=+t||0,this.$paddingLeft!==t&&(this.$paddingLeft=t,this.invalidateTargetLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingRight",{get:function(){return this.$paddingRight},set:function(t){t=+t||0,this.$paddingRight!==t&&(this.$paddingRight=t,this.invalidateTargetLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingTop",{get:function(){return this.$paddingTop},set:function(t){t=+t||0,this.$paddingTop!==t&&(this.$paddingTop=t,this.invalidateTargetLayout())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"paddingBottom",{get:function(){return this.$paddingBottom},set:function(t){t=+t||0,this.$paddingBottom!==t&&(this.$paddingBottom=t,this.invalidateTargetLayout())},enumerable:!0,configurable:!0}),e.prototype.invalidateTargetLayout=function(){var t=this.$target;t&&(t.invalidateSize(),t.invalidateDisplayList())},e.prototype.measure=function(){this.$target&&(this.$useVirtualLayout?this.measureVirtual():this.measureReal())},e.prototype.measureReal=function(){},e.prototype.measureVirtual=function(){},e.prototype.updateDisplayList=function(t,e){var i=this.$target;if(i)return 0==i.numElements?void i.setContentSize(Math.ceil(this.$paddingLeft+this.$paddingRight),Math.ceil(this.$paddingTop+this.$paddingBottom)):void(this.$useVirtualLayout?this.updateDisplayListVirtual(t,e):this.updateDisplayListReal(t,e))},e.prototype.getStartPosition=function(t){return 0},e.prototype.getElementSize=function(t){return 0},e.prototype.getElementTotalSize=function(){return 0},e.prototype.elementRemoved=function(e){this.$useVirtualLayout&&(t.prototype.elementRemoved.call(this,e),this.elementSizeTable.splice(e,1))},e.prototype.clearVirtualLayoutCache=function(){this.$useVirtualLayout&&(this.elementSizeTable=[],this.maxElementSize=0)},e.prototype.findIndexAt=function(t,e,i){var n=.5*(e+i)|0,r=this.getStartPosition(n),o=this.getElementSize(n);return t>=r&&tt?this.findIndexAt(t,e,Math.max(e,n-1)):this.findIndexAt(t,Math.min(n+1,i),i)},e.prototype.scrollPositionChanged=function(){if(t.prototype.scrollPositionChanged.call(this),this.$useVirtualLayout){var e=this.getIndexInView();e&&(this.indexInViewCalculated=!0,this.target.invalidateDisplayList())}},e.prototype.getIndexInView=function(){return!1},e.prototype.updateDisplayListVirtual=function(t,e){},e.prototype.updateDisplayListReal=function(t,e){},e.prototype.flexChildrenProportionally=function(t,e,i,n){var r,o=n.length;do{r=!0;var s=e-t*i/100;s>0?e-=s:s=0;for(var a=e/i,h=0;o>h;h++){var l=n[h],u=l.percent*a;if(u=p?s-=p:(e-=p-s,s=0),r=!1;break}if(u>l.max){var c=l.max;l.size=c,n[h]=n[--o],n[o]=l,i-=l.percent,s>=c?s-=c:(e-=c-s,s=0),r=!1;break}l.size=u}}while(!r)},e}(t.LayoutBase);t.LinearLayoutBase=e,__reflect(e.prototype,"eui.LinearLayoutBase")}(eui||(eui={})),function(t){var e;!function(t){var e=function(){function t(){this.layoutElement=null,this.size=0,this.percent=0/0,this.min=0/0,this.max=0/0}return t}();t.ChildInfo=e,__reflect(e.prototype,"eui.sys.ChildInfo")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e.prototype.pointToValue=function(t,e){if(!this.thumb||!this.track)return 0;var i=this.$Range,n=i[0]-i[2],r=this.getThumbRange();return i[2]+(0!=r?t/r*n:0)},e.prototype.getThumbRange=function(){var t=egret.$TempRectangle;this.track.getLayoutBounds(t);var e=t.width;return this.thumb.getLayoutBounds(t),e-t.width},e.prototype.updateSkinDisplayList=function(){if(this.thumb&&this.track){var t=this.$Range,e=this.getThumbRange(),i=t[0]-t[2],n=i>0?(this.pendingValue-t[2])/i*e:0,r=this.track.localToGlobal(n,0,egret.$TempPoint),o=r.x,s=r.y,a=this.thumb.$parent.globalToLocal(o,s,egret.$TempPoint).x,h=egret.$TempRectangle;if(this.thumb.getLayoutBounds(h),this.thumb.setLayoutBoundsPosition(Math.round(a),h.y),this.trackHighlight&&this.trackHighlight.$parent){var l=this.trackHighlight.$parent.globalToLocal(o,s,egret.$TempPoint).x-n;this.trackHighlight.x=Math.round(l),this.trackHighlight.width=Math.round(n)}}},e}(t.SliderBase);t.HSlider=e,__reflect(e.prototype,"eui.HSlider")}(eui||(eui={}));var eui;!function(t){var e=[],i={},n={},r=function(){function t(){}return t.prototype.getAsset=function(t,r,o){var s=i[t];if(s)return void s.push([r,o]);var a=e.pop();a||(a=new egret.ImageLoader),i[t]=[[r,o]],n[a.$hashCode]=t,a.addEventListener(egret.Event.COMPLETE,this.onLoadFinish,this),a.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this),a.load(t)},t.prototype.onLoadFinish=function(t){var r=t.currentTarget;r.removeEventListener(egret.Event.COMPLETE,this.onLoadFinish,this),r.removeEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this);var o;t.$type==egret.Event.COMPLETE&&(o=new egret.Texture,o._setBitmapData(r.data),r.data=null),e.push(r);var s=n[r.$hashCode];delete n[r.$hashCode];var a=i[s];delete i[s];for(var h=a.length,l=0;h>l;l++){var u=a[l];u[0].call(u[1],o,s)}},t}();t.DefaultAssetAdapter=r,__reflect(r.prototype,"eui.DefaultAssetAdapter",["eui.IAssetAdapter"])}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(t){var i=e.call(this)||this;return i.sourceChanged=!1,i._source=null,i.initializeUIValues(),t&&(i.source=t),i}return __extends(i,e),Object.defineProperty(i.prototype,"scale9Grid",{get:function(){return this.$scale9Grid},set:function(t){this.$scale9Grid=t,this.$invalidateContentBounds(),this.invalidateDisplayList()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"fillMode",{get:function(){return this.$fillMode},set:function(t){t!=this.$fillMode&&(this.$fillMode=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),i.prototype.$setFillMode=function(t){var i=e.prototype.$setFillMode.call(this,t);return this.invalidateDisplayList(),i},Object.defineProperty(i.prototype,"source",{get:function(){return this._source},set:function(t){t!=this._source&&(this._source=t,this.$stage?this.parseSource():(this.sourceChanged=!0,this.invalidateProperties()))},enumerable:!0,configurable:!0}),i.prototype.$setBitmapData=function(t){if(t==this.$Bitmap[0])return!1;var i=e.prototype.$setBitmapData.call(this,t);return this.sourceChanged=!1,this.invalidateSize(),this.invalidateDisplayList(),i},i.prototype.parseSource=function(){var e=this;this.sourceChanged=!1;var i=this._source;i&&"string"==typeof i?t.getAssets(this._source,function(t){i===e._source&&egret.is(t,"egret.Texture")&&(e.$setBitmapData(t),t&&e.dispatchEventWith(egret.Event.COMPLETE))}):this.$setBitmapData(i)},i.prototype.$measureContentBounds=function(t){var e=(this.$Bitmap,this.$Bitmap[0]);if(e){var i=this.$UIComponent,n=i[10],r=i[11];if(isNaN(n)||isNaN(r))return void t.setEmpty();"clip"==this.$fillMode&&(n>e.$getTextureWidth()&&(n=e.$getTextureWidth()),r>e.$getTextureHeight()&&(r=e.$getTextureHeight())),t.setTo(0,0,n,r)}else t.setEmpty()},i.prototype.$render=function(){var t=this.$Bitmap[0];if(t){var e=this.$UIComponent,i=e[10],n=e[11];if(0!==i&&0!==n){var r=this.$Bitmap;egret.sys.BitmapNode.$updateTextureData(this.$renderNode,r[1],r[2],r[3],r[4],r[5],r[6],r[7],r[8],r[9],i,n,r[13],r[14],this.scale9Grid||r[0].scale9Grid,this.$fillMode,r[10])}}},i.prototype.createChildren=function(){this.sourceChanged&&this.parseSource()},i.prototype.childrenCreated=function(){},i.prototype.commitProperties=function(){t.sys.UIComponentImpl.prototype.commitProperties.call(this),this.sourceChanged&&this.parseSource()},i.prototype.measure=function(){var t=this.$Bitmap[0];t?this.setMeasuredSize(t.$getTextureWidth(),t.$getTextureHeight()):this.setMeasuredSize(0,0)},i.prototype.updateDisplayList=function(t,e){this.$invalidateContentBounds()},i.prototype.invalidateParentLayout=function(){},i.prototype.setMeasuredSize=function(t,e){},i.prototype.invalidateProperties=function(){},i.prototype.validateProperties=function(){},i.prototype.invalidateSize=function(){},i.prototype.validateSize=function(t){},i.prototype.invalidateDisplayList=function(){},i.prototype.validateDisplayList=function(){},i.prototype.validateNow=function(){},i.prototype.setLayoutBoundsSize=function(t,e){},i.prototype.setLayoutBoundsPosition=function(t,e){},i.prototype.getLayoutBounds=function(t){},i.prototype.getPreferredBounds=function(t){},i}(egret.Bitmap);t.Image=e,__reflect(e.prototype,"eui.Image",["eui.UIComponent","egret.DisplayObject"]),t.sys.implementUIComponent(e,egret.Bitmap),t.registerProperty(e,"scale9Grid","egret.Rectangle")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t._data=null,t._selected=!1,t.itemIndex=-1,t.touchCaptured=!1,t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,t.onTouchBegin,t),t}return __extends(i,e),Object.defineProperty(i.prototype,"data",{get:function(){return this._data},set:function(e){this._data=e,t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"data"),this.dataChanged()},enumerable:!0,configurable:!0}),i.prototype.dataChanged=function(){},Object.defineProperty(i.prototype,"selected",{get:function(){return this._selected},set:function(t){this._selected!=t&&(this._selected=t,this.invalidateState())},enumerable:!0,configurable:!0}),i.prototype.onTouchCancle=function(t){this.touchCaptured=!1;var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.invalidateState()},i.prototype.onTouchBegin=function(t){this.$stage.addEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),this.$stage.addEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.touchCaptured=!0,this.invalidateState(),t.updateAfterEvent()},i.prototype.onStageTouchEnd=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancle,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onStageTouchEnd,this),this.touchCaptured=!1,this.invalidateState()},i.prototype.getCurrentState=function(){var t="up";if(this.enabled||(t="disabled"),this.touchCaptured&&(t="down"),this._selected){var e=t+"AndSelected",i=this.skin;return i&&i.hasState(e)?e:"disabled"==t?"disabled":"down"}return t},i}(t.Component);t.ItemRenderer=e,__reflect(e.prototype,"eui.ItemRenderer",["eui.IItemRenderer"]),t.registerBindable(e.prototype,"data")}(eui||(eui={}));var eui;!function(t){var e=t.sys.UIComponentImpl,i=function(i){function n(t){var e=i.call(this)||this;return e.$styleSetMap={fontFamily:!0,size:!0,bold:!0,italic:!0,textAlign:!0,verticalAlign:!0,lineSpacing:!0,textColor:!0,wordWrap:!0,displayAsPassword:!0,strokeColor:!0,stroke:!0,maxChars:!0,multiline:!0,border:!0,borderColor:!0,background:!0,backgroundColor:!0},e.$revertStyle={},e.$style=null,e.$changeFromStyle=!1,e._widthConstraint=0/0,e.initializeUIValues(),e.text=t,e}return __extends(n,i),Object.defineProperty(n.prototype,"style",{get:function(){return this.$style},set:function(t){this.$setStyle(t)},enumerable:!0,configurable:!0}),n.prototype.$setStyle=function(t){if(this.$style!=t){this.$style=t;var e=egret.getImplementation("eui.Theme");if(e){this.$changeFromStyle=!0;for(var i in this.$revertStyle)this[i]=this.$revertStyle[i];if(this.$revertStyle={},null==t)return void(this.$changeFromStyle=!1);for(var n=t.split(","),r=0;r=0&&e0?this._proposedSelectedIndices[0]:-1:this.$getSelectedIndex()},set:function(t){this.setSelectedIndex(t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedItems",{get:function(){var t=[],e=this.selectedIndices;if(e)for(var i=e.length,n=0;i>n;n++)t[n]=this.$dataProvider.getItemAt(e[n]);return t},set:function(t){var e=[];if(t)for(var i=t.length,n=0;i>n;n++){var r=this.$dataProvider.getItemIndex(t[n]);if(-1!=r&&e.splice(0,0,r),-1==r){e=[];break}}this.setSelectedIndices(e,!1)},enumerable:!0,configurable:!0}),i.prototype.setSelectedIndices=function(t,e){var i=this.$ListBase;e&&(i[4]=i[4]||e),t?this._proposedSelectedIndices=t:this._proposedSelectedIndices=[],this.invalidateProperties()},i.prototype.commitProperties=function(){e.prototype.commitProperties.call(this),this._proposedSelectedIndices&&this.commitSelection()},i.prototype.commitSelection=function(i){void 0===i&&(i=!0);var n=this.$ListBase,r=n[3];if(this._proposedSelectedIndices){if(this._proposedSelectedIndices=this._proposedSelectedIndices.filter(this.isValidIndex),!this.allowMultipleSelection&&this._proposedSelectedIndices.length>0){var o=[];o.push(this._proposedSelectedIndices[0]),this._proposedSelectedIndices=o}this._proposedSelectedIndices.length>0?n[2]=this._proposedSelectedIndices[0]:n[2]=-1}var s=e.prototype.commitSelection.call(this,!1); if(!s)return this._proposedSelectedIndices=null,!1;var a=this.$getSelectedIndex();return a>t.ListBase.NO_SELECTION&&(this._proposedSelectedIndices?-1==this._proposedSelectedIndices.indexOf(a)&&this._proposedSelectedIndices.push(a):this._proposedSelectedIndices=[a]),this._proposedSelectedIndices&&(-1!=this._proposedSelectedIndices.indexOf(r)&&this.itemSelected(r,!0),this.commitMultipleSelection()),i&&s&&(n[4]&&(this.dispatchEventWith(egret.Event.CHANGE),n[4]=!1),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedIndex"),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedItem")),s},i.prototype.commitMultipleSelection=function(){var t,e,i=[],n=[],r=this._selectedIndices,o=this._proposedSelectedIndices;if(r.length>0&&o.length>0){for(e=o.length,t=0;e>t;t++)-1==r.indexOf(o[t])&&n.push(o[t]);for(e=r.length,t=0;e>t;t++)-1==o.indexOf(r[t])&&i.push(r[t])}else r.length>0?i=r:o.length>0&&(n=o);if(this._selectedIndices=o,i.length>0)for(e=i.length,t=0;e>t;t++)this.itemSelected(i[t],!1);if(n.length>0)for(e=n.length,t=0;e>t;t++)this.itemSelected(n[t],!0);this._proposedSelectedIndices=null},i.prototype.$isItemIndexSelected=function(t){return this.allowMultipleSelection?-1!=this._selectedIndices.indexOf(t):e.prototype.$isItemIndexSelected.call(this,t)},i.prototype.dataProviderRefreshed=function(){this.allowMultipleSelection||e.prototype.dataProviderRefreshed.call(this)},i.prototype.calculateSelectedIndices=function(t){var e=[],i=this._selectedIndices,n=i.length;if(n>0){if(1==n&&i[0]==t)return this.$ListBase[0]?(e.splice(0,0,i[0]),e):e;for(var r=!1,o=0;n>o;o++)i[o]==t?r=!0:i[o]!=t&&e.splice(0,0,i[o]);return r||e.splice(0,0,t),e}return e.splice(0,0,t),e},i.prototype.onRendererTouchEnd=function(i){if(this.allowMultipleSelection){var n=i.currentTarget,r=this.$ListBase[7];if(n!=r)return;this.setSelectedIndices(this.calculateSelectedIndices(n.itemIndex),!0),t.ItemTapEvent.dispatchItemTapEvent(this,t.ItemTapEvent.ITEM_TAP,n)}else e.prototype.onRendererTouchEnd.call(this,i)},i}(t.ListBase);t.List=e,__reflect(e.prototype,"eui.List")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.closeButton=null,t.moveArea=null,t.titleDisplay=null,t._title="",t.offsetPointX=0,t.offsetPointY=0,t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,t.onWindowTouchBegin,t,!1,100),t}return __extends(i,e),i.prototype.onWindowTouchBegin=function(t){this.$parent.addChild(this)},Object.defineProperty(i.prototype,"elementsContent",{set:function(t){if(t)for(var e=t.length,i=0;e>i;i++)this.addChild(t[i])},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"title",{get:function(){return this._title},set:function(t){this._title=t,this.titleDisplay&&(this.titleDisplay.text=this.title)},enumerable:!0,configurable:!0}),i.prototype.partAdded=function(t,i){e.prototype.partAdded.call(this,t,i),i==this.titleDisplay?this.titleDisplay.text=this._title:i==this.moveArea?this.moveArea.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegin,this):i==this.closeButton&&this.closeButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onCloseButtonClick,this)},i.prototype.partRemoved=function(t,i){e.prototype.partRemoved.call(this,t,i),i==this.moveArea?this.moveArea.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegin,this):i==this.closeButton&&this.closeButton.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onCloseButtonClick,this)},i.prototype.onCloseButtonClick=function(e){t.UIEvent.dispatchUIEvent(this,t.UIEvent.CLOSING,!0,!0)&&this.close()},i.prototype.close=function(){this.$parent&&this.$parent.removeChild(this)},i.prototype.onTouchBegin=function(t){this.$includeInLayout=!1,this.offsetPointX=this.x-t.$stageX,this.offsetPointY=this.y-t.$stageY,this.$stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.$stage.addEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnd,this)},i.prototype.onTouchMove=function(t){this.x=t.$stageX+this.offsetPointX,this.y=t.$stageY+this.offsetPointY},i.prototype.onTouchEnd=function(t){var e=t.$currentTarget;e.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),e.removeEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnd,this)},i}(t.Component);t.Panel=e,__reflect(e.prototype,"eui.Panel"),t.registerProperty(e,"elementsContent","Array",!0)}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var i=e.call(this)||this;return i.thumb=null,i.labelDisplay=null,i._labelFunction=null,i._slideDuration=500,i._direction=t.Direction.LTR,i.slideToValue=0,i.animationValue=0,i.thumbInitX=0,i.thumbInitY=0,i.animation=new t.sys.Animation(i.animationUpdateHandler,i),i}return __extends(i,e),Object.defineProperty(i.prototype,"labelFunction",{get:function(){return this._labelFunction},set:function(t){this._labelFunction!=t&&(this._labelFunction=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),i.prototype.valueToLabel=function(t,e){return null!=this.labelFunction?this._labelFunction(t,e):t+" / "+e},Object.defineProperty(i.prototype,"slideDuration",{get:function(){return this._slideDuration},set:function(t){t=0|+t,this._slideDuration!==t&&(this._slideDuration=t,this.animation.isPlaying&&(this.animation.stop(),this.setValue(this.slideToValue)))},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"direction",{get:function(){return this._direction},set:function(t){this._direction!=t&&(this.thumb&&(this.thumb.x=this.thumbInitX),this.thumb&&(this.thumb.y=this.thumbInitY),this._direction=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),i.prototype.$setValue=function(t){if(this.value===t)return!1;var i=this.$Range,n=e.prototype.$setValue.call(this,t);if(this._slideDuration>0&&this.$stage){this.validateProperties();var r=this.animation;if(r.isPlaying&&(this.animationValue=this.slideToValue,this.invalidateDisplayList(),r.stop()),this.slideToValue=this.nearestValidValue(t,i[7]),this.slideToValue===this.animationValue)return n;var o=this._slideDuration*(Math.abs(this.animationValue-this.slideToValue)/(i[0]-i[2]));r.duration=o===1/0?0:o,r.from=this.animationValue,r.to=this.slideToValue,r.play()}else this.animationValue=this.value;return n},i.prototype.animationUpdateHandler=function(t){var e=this.$Range,i=this.nearestValidValue(t.currentValue,e[7]);this.animationValue=Math.min(e[0],Math.max(e[2],i)),this.invalidateDisplayList()},i.prototype.partAdded=function(t,i){e.prototype.partAdded.call(this,t,i),i===this.thumb&&(this.thumb.x&&(this.thumbInitX=this.thumb.x),this.thumb.y&&(this.thumbInitY=this.thumb.y),this.thumb.addEventListener(egret.Event.RESIZE,this.onThumbResize,this))},i.prototype.partRemoved=function(t,i){e.prototype.partRemoved.call(this,t,i),i===this.thumb&&this.thumb.removeEventListener(egret.Event.RESIZE,this.onThumbResize,this)},i.prototype.onThumbResize=function(t){this.updateSkinDisplayList()},i.prototype.updateSkinDisplayList=function(){var e=this.animation.isPlaying?this.animationValue:this.value,i=this.maximum,n=this.thumb;if(n){var r=n.width,o=n.height,s=Math.round(e/i*r);(0>s||s===1/0)&&(s=0);var a=Math.round(e/i*o);(0>a||a===1/0)&&(a=0);var h=n.$scrollRect;h||(h=egret.$TempRectangle),h.setTo(0,0,r,o);var l=n.x-h.x,u=n.y-h.y;switch(this._direction){case t.Direction.LTR:h.width=s,n.x=l;break;case t.Direction.RTL:h.width=s,h.x=r-s,n.x=h.x;break;case t.Direction.TTB:h.height=a,n.y=u;break;case t.Direction.BTT:h.height=a,h.y=o-a,n.y=h.y}n.scrollRect=h}this.labelDisplay&&(this.labelDisplay.text=this.valueToLabel(e,i))},i}(t.Range);t.ProgressBar=e,__reflect(e.prototype,"eui.ProgressBar")}(eui||(eui={}));var eui;!function(t){var e={},i=function(i){function n(){var t=i.call(this)||this;return t.$indexNumber=0,t.$radioButtonGroup=null,t._group=null,t.groupChanged=!1,t._groupName="radioGroup",t._value=null,t.groupName="radioGroup",t}return __extends(n,i),Object.defineProperty(n.prototype,"enabled",{get:function(){return this.$Component[3]?!this.$radioButtonGroup||this.$radioButtonGroup.$enabled:!1},set:function(t){this.$setEnabled(t)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"group",{get:function(){if(!this._group&&this._groupName){var i=e[this._groupName];i||(i=new t.RadioButtonGroup,i.$name=this._groupName,e[this._groupName]=i),this._group=i}return this._group},set:function(t){this._group!=t&&(this.$radioButtonGroup&&this.$radioButtonGroup.$removeInstance(this,!1),this._group=t,this._groupName=t?this.group.$name:"radioGroup",this.groupChanged=!0,this.invalidateProperties(),this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"groupName",{get:function(){return this._groupName},set:function(t){t&&""!=t&&(this._groupName=t,this.$radioButtonGroup&&this.$radioButtonGroup.$removeInstance(this,!1),this._group=null,this.groupChanged=!0,this.invalidateProperties(),this.invalidateDisplayList())},enumerable:!0,configurable:!0}),n.prototype.$setSelected=function(t){var e=i.prototype.$setSelected.call(this,t);return this.invalidateDisplayList(),e},Object.defineProperty(n.prototype,"value",{get:function(){return this._value},set:function(e){this._value!=e&&(this._value=e,this.$selected&&this.group&&t.PropertyEvent.dispatchPropertyEvent(this.group,t.PropertyEvent.PROPERTY_CHANGE,"selectedValue"))},enumerable:!0,configurable:!0}),n.prototype.commitProperties=function(){this.groupChanged&&(this.addToGroup(),this.groupChanged=!1),i.prototype.commitProperties.call(this)},n.prototype.updateDisplayList=function(t,e){i.prototype.updateDisplayList.call(this,t,e),this.group&&(this.$selected?this._group.$setSelection(this,!1):this.group.selection==this&&this._group.$setSelection(null,!1))},n.prototype.buttonReleased=function(){this.enabled&&!this.selected&&(this.$radioButtonGroup||this.addToGroup(),i.prototype.buttonReleased.call(this),this.group.$setSelection(this,!0))},n.prototype.addToGroup=function(){var t=this.group;return t&&t.$addInstance(this),t},n}(t.ToggleButton);t.RadioButton=i,__reflect(i.prototype,"eui.RadioButton")}(eui||(eui={}));var eui;!function(t){function e(t,i){var n=t.parent,r=i.parent;if(!n||!r)return 0;var o=t.$nestLevel,s=i.$nestLevel,a=0,h=0;return n==r&&(a=n.getChildIndex(t),h=r.getChildIndex(i)),o>s||a>h?1:s>o||h>a?-1:t==i?0:e(n,r)}var i=0,n=function(n){function r(){var t=n.call(this)||this;return t.$name=null,t.radioButtons=[],t.$enabled=!0,t._selectedValue=null,t._selection=null,t.$name="_radioButtonGroup"+i++,t}return __extends(r,n),r.prototype.getRadioButtonAt=function(t){return this.radioButtons[t]},Object.defineProperty(r.prototype,"enabled",{get:function(){return this.$enabled},set:function(t){if(t=!!t,this.$enabled!==t){this.$enabled=t;for(var e=this.radioButtons,i=e.length,n=0;i>n;n++)e[n].invalidateState()}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"numRadioButtons",{get:function(){return this.radioButtons.length},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selectedValue",{get:function(){return this.selection?null!=this.selection.value?this.selection.value:this.selection.label:null},set:function(e){if(this._selectedValue=e,null==e)return void this.$setSelection(null,!1);for(var i=this.numRadioButtons,n=0;i>n;n++){var r=this.radioButtons[n];if(r.value==e||r.label==e){this.changeSelection(n,!1),this._selectedValue=null,t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedValue");break}}},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"selection",{get:function(){return this._selection},set:function(t){this._selection!=t&&this.$setSelection(t,!1)},enumerable:!0,configurable:!0}),r.prototype.$addInstance=function(t){t.addEventListener(egret.Event.REMOVED_FROM_STAGE,this.removedHandler,this);var i=this.radioButtons;i.push(t),i.sort(e);for(var n=i.length,r=0;n>r;r++)i[r].$indexNumber=r;this._selectedValue&&(this.selectedValue=this._selectedValue),1==t.selected&&(this.selection=t),t.$radioButtonGroup=this,t.invalidateState()},r.prototype.$removeInstance=function(t,e){if(t)for(var i=!1,n=this.radioButtons,r=n.length,o=0;r>o;o++){var s=n[o];i?s.$indexNumber=s.$indexNumber-1:s==t&&(e&&t.addEventListener(egret.Event.ADDED_TO_STAGE,this.addedHandler,this),t==this._selection&&(this._selection=null),t.$radioButtonGroup=null,t.invalidateState(),this.radioButtons.splice(o,1),i=!0,o--,r--)}},r.prototype.$setSelection=function(e,i){if(this._selection==e)return!1;if(e){for(var n=this.numRadioButtons,r=0;n>r;r++)if(e==this.getRadioButtonAt(r)){this.changeSelection(r,i);break}}else this._selection&&(this._selection.selected=!1,this._selection=null,i&&this.dispatchEventWith(egret.Event.CHANGE));return t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"selectedValue"),!0},r.prototype.changeSelection=function(t,e){var i=this.getRadioButtonAt(t);i&&i!=this._selection&&(this._selection&&(this._selection.selected=!1),this._selection=i,this._selection.selected=!0,e&&this.dispatchEventWith(egret.Event.CHANGE))},r.prototype.addedHandler=function(t){var e=t.target;e==t.currentTarget&&(e.removeEventListener(egret.Event.ADDED_TO_STAGE,this.addedHandler,this),this.$addInstance(e))},r.prototype.removedHandler=function(t){var e=t.target;e==t.currentTarget&&(e.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.removedHandler,this),this.$removeInstance(e,!0))},r}(egret.EventDispatcher);t.RadioButtonGroup=n,__reflect(n.prototype,"eui.RadioButtonGroup"),t.registerBindable(n.prototype,"selectedValue")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(e,i,n){var r=t.call(this)||this;return r.$fillColor=0,r.$fillAlpha=1,r.$strokeColor=4473924,r.$strokeAlpha=1,r.$strokeWeight=0,r.$ellipseWidth=0,r.$ellipseHeight=0,r.touchChildren=!1,r.$graphics=new egret.Graphics,r.$graphics.$setTarget(r),r.width=e,r.height=i,r.fillColor=n,r}return __extends(e,t),Object.defineProperty(e.prototype,"graphics",{get:function(){return this.$graphics},enumerable:!0,configurable:!0}),e.prototype.$measureContentBounds=function(t){this.$graphics&&t.setTo(0,0,this.width,this.height)},Object.defineProperty(e.prototype,"fillColor",{get:function(){return this.$fillColor},set:function(t){void 0!=t&&this.$fillColor!=t&&(this.$fillColor=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"fillAlpha",{get:function(){return this.$fillAlpha},set:function(t){this.$fillAlpha!=t&&(this.$fillAlpha=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeColor",{get:function(){return this.$strokeColor},set:function(t){this.$strokeColor!=t&&(this.$strokeColor=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeAlpha",{get:function(){return this.$strokeAlpha},set:function(t){this.$strokeAlpha!=t&&(this.$strokeAlpha=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"strokeWeight",{get:function(){return this.$strokeWeight},set:function(t){this.$strokeWeight!=t&&(this.$strokeWeight=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ellipseWidth",{get:function(){return this.$ellipseWidth},set:function(t){this.$ellipseWidth!=t&&(this.$ellipseWidth=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"ellipseHeight",{get:function(){return this.$ellipseHeight},set:function(t){this.$ellipseHeight!=t&&(this.$ellipseHeight=t,this.invalidateDisplayList())},enumerable:!0,configurable:!0}),e.prototype.updateDisplayList=function(t,e){var i=this.graphics;i.clear(),this.$strokeWeight>0&&(i.beginFill(this.$fillColor,0),i.lineStyle(this.$strokeWeight,this.$strokeColor,this.$strokeAlpha,!0,"normal","square","miter"),0==this.$ellipseWidth&&0==this.$ellipseHeight?i.drawRect(this.$strokeWeight/2,this.$strokeWeight/2,t-this.$strokeWeight,e-this.$strokeWeight):i.drawRoundRect(this.$strokeWeight/2,this.$strokeWeight/2,t-this.$strokeWeight,e-this.$strokeWeight,this.$ellipseWidth,this.$ellipseHeight),i.endFill()),i.beginFill(this.$fillColor,this.$fillAlpha),i.lineStyle(this.$strokeWeight,this.$strokeColor,0,!0,"normal","square","miter"),0==this.$ellipseWidth&&0==this.$ellipseHeight?i.drawRect(this.$strokeWeight,this.$strokeWeight,t-2*this.$strokeWeight,e-2*this.$strokeWeight):i.drawRoundRect(this.$strokeWeight,this.$strokeWeight,t-2*this.$strokeWeight,e-2*this.$strokeWeight,this.$ellipseWidth,this.$ellipseHeight),i.endFill(),this.$invalidateContentBounds()},e}(t.Component);t.Rect=e,__reflect(e.prototype,"eui.Rect")}(eui||(eui={}));var eui;!function(t){var e,i=function(i){function n(){var e=i.call(this)||this;e.$bounces=!0,e.horizontalScrollBar=null,e.verticalScrollBar=null;var n=new t.sys.TouchScroll(e.horizontalUpdateHandler,e.horizontalEndHandler,e),r=new t.sys.TouchScroll(e.verticalUpdateHandler,e.verticalEndHanlder,e);return e.$Scroller={0:"auto",1:"auto",2:null,3:0,4:0,5:!1,6:!1,7:!1,8:n,9:r,10:null,11:!1,12:!1},e}return __extends(n,i),Object.defineProperty(n.prototype,"bounces",{get:function(){return this.$bounces},set:function(t){this.$bounces=!!t;var e=this.$Scroller[8];e&&(e.$bounces=this.$bounces);var i=this.$Scroller[9];i&&(i.$bounces=this.$bounces)},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"throwSpeed",{get:function(){return this.$Scroller[8].$scrollFactor},set:function(t){t=+t,0>t&&(t=0),this.$Scroller[8].$scrollFactor=t,this.$Scroller[9].$scrollFactor=t},enumerable:!0,configurable:!0}),n.prototype.$getThrowInfo=function(i,n){return e?(e.currentPos=i,e.toPos=n):e=new t.ScrollerThrowEvent(t.ScrollerThrowEvent.THROW,!1,!1,i,n),e},Object.defineProperty(n.prototype,"scrollPolicyV",{get:function(){return this.$Scroller[0]},set:function(t){var e=this.$Scroller;e[0]!=t&&(e[0]=t,this.checkScrollPolicy())},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"scrollPolicyH",{get:function(){return this.$Scroller[1]},set:function(t){var e=this.$Scroller;e[1]!=t&&(e[1]=t,this.checkScrollPolicy())},enumerable:!0,configurable:!0}),n.prototype.stopAnimation=function(){var e=this.$Scroller,i=e[9],n=e[8];i.animation.isPlaying?t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_END):n.animation.isPlaying&&t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_END),i.stop(),n.stop();var r=this.verticalScrollBar,o=this.horizontalScrollBar;r&&r.autoVisibility&&(r.visible=!1),o&&o.autoVisibility&&(o.visible=!1)},Object.defineProperty(n.prototype,"viewport",{get:function(){return this.$Scroller[10]},set:function(t){var e=this.$Scroller;t!=e[10]&&(this.uninstallViewport(),e[10]=t,e[11]=!1,this.installViewport())},enumerable:!0,configurable:!0}),n.prototype.installViewport=function(){var t=this.viewport;t&&(this.addChildAt(t,0),t.scrollEnabled=!0,t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBeginCapture,this,!0),t.addEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEndCapture,this,!0),t.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onTouchTapCapture,this,!0),t.addEventListener(egret.Event.REMOVED,this.onViewPortRemove,this)),this.horizontalScrollBar&&(this.horizontalScrollBar.viewport=t),this.verticalScrollBar&&(this.verticalScrollBar.viewport=t)},n.prototype.uninstallViewport=function(){this.horizontalScrollBar&&(this.horizontalScrollBar.viewport=null),this.verticalScrollBar&&(this.verticalScrollBar.viewport=null);var t=this.viewport;t&&(t.scrollEnabled=!1,t.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBeginCapture,this,!0),t.removeEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEndCapture,this,!0),t.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onTouchTapCapture,this,!0),t.removeEventListener(egret.Event.REMOVED,this.onViewPortRemove,this),0==this.$Scroller[11]&&this.removeChild(t))},n.prototype.onViewPortRemove=function(t){t.target==this.viewport&&(this.$Scroller[11]=!0,this.viewport=null)},n.prototype.setSkin=function(t){i.prototype.setSkin.call(this,t);var e=this.viewport;e&&this.addChildAt(e,0)},n.prototype.onTouchBeginCapture=function(t){this.$Scroller[12]=!1;var e=this.checkScrollPolicy();e&&this.onTouchBegin(t)},n.prototype.onTouchEndCapture=function(t){this.$Scroller[12]&&(t.$bubbles=!1,this.dispatchBubbleEvent(t),t.$bubbles=!0,t.stopPropagation(),this.onTouchEnd(t))},n.prototype.onTouchTapCapture=function(t){this.$Scroller[12]&&(t.$bubbles=!1,this.dispatchBubbleEvent(t),t.$bubbles=!0,t.stopPropagation())},n.prototype.checkScrollPolicy=function(){var t=this.$Scroller,e=t[10];if(!e)return!1;var i,n=e.$UIComponent;switch(t[1]){case"auto":i=e.contentWidth>n[10]||0!==e.scrollH?!0:!1;break;case"on":i=!0;break;case"off":i=!1}t[6]=i;var r;switch(t[0]){case"auto":r=e.contentHeight>n[11]||0!==e.scrollV?!0:!1;break;case"on":r=!0;break;case"off":r=!1}return t[7]=r,i||r},n.prototype.onTouchBegin=function(t){if(!t.isDefaultPrevented()&&this.checkScrollPolicy()){this.downTarget=t.target;var e=this.$Scroller;this.stopAnimation(),e[3]=t.$stageX,e[4]=t.$stageY,e[6]&&e[8].start(t.$stageX),e[7]&&e[9].start(t.$stageY);var i=this.$stage;this.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),i.addEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnd,this,!0),this.addEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancel,this),this.addEventListener(egret.Event.REMOVED_FROM_STAGE,this.onRemoveListeners,this),this.tempStage=i}},n.prototype.onTouchMove=function(e){if(!e.isDefaultPrevented()){var i=this.$Scroller;if(!i[5]){var r=void 0;r=Math.abs(i[3]-e.$stageX)h;h++)if(r[h]===e){a=h;break}r.splice(0,r.length-a+1),s=0,this.$dispatchPropagationEvent(i,r,s),egret.Event.release(i)}},n.prototype.dispatchCancelEvent=function(t){var e=this.$Scroller[10];if(e){var i=egret.Event.create(egret.TouchEvent,egret.TouchEvent.TOUCH_CANCEL,t.bubbles,t.cancelable);i.$initTo(t.$stageX,t.$stageY,t.touchPointID);var n=this.downTarget;i.$setTarget(n);for(var r=this.$getPropagationList(n),o=r.length,s=.5*r.length,a=-1,h=0;o>h;h++)if(r[h]===e){a=h;break}r.splice(0,a+1-2),r.splice(r.length-1-a+2,a+1-2),s-=a+1,this.$dispatchPropagationEvent(i,r,s),egret.Event.release(i)}},n.prototype.onTouchEnd=function(t){var e=this.$Scroller;e[5]=!1,this.onRemoveListeners();var i=e[10],n=i.$UIComponent;e[8].isStarted()&&e[8].finish(i.scrollH,i.contentWidth-n[10]),e[9].isStarted()&&e[9].finish(i.scrollV,i.contentHeight-n[11])},n.prototype.onRemoveListeners=function(){var t=this.tempStage||this.$stage;this.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),t.removeEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnd,this,!0),t.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.removeEventListener(egret.TouchEvent.TOUCH_CANCEL,this.onTouchCancel,this),this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.onRemoveListeners,this)},n.prototype.horizontalUpdateHandler=function(t){this.$Scroller[10].scrollH=t,this.dispatchEventWith(egret.Event.CHANGE)},n.prototype.verticalUpdateHandler=function(t){this.$Scroller[10].scrollV=t,this.dispatchEventWith(egret.Event.CHANGE)},n.prototype.horizontalEndHandler=function(){this.$Scroller[9].isPlaying()||this.onChangeEnd()},n.prototype.verticalEndHanlder=function(){this.$Scroller[8].isPlaying()||this.onChangeEnd()},n.prototype.onChangeEnd=function(){var e=this.$Scroller,i=this.horizontalScrollBar,n=this.verticalScrollBar;(i&&i.visible||n&&n.visible)&&(e[2]||(e[2]=new egret.Timer(200,1),e[2].addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.onAutoHideTimer,this)),e[2].reset(),e[2].start()),t.UIEvent.dispatchUIEvent(this,t.UIEvent.CHANGE_END)},n.prototype.onAutoHideTimer=function(t){var e=this.horizontalScrollBar,i=this.verticalScrollBar;e&&e.autoVisibility&&(e.visible=!1),i&&i.autoVisibility&&(i.visible=!1)},n.prototype.updateDisplayList=function(t,e){i.prototype.updateDisplayList.call(this,t,e);var n=this.viewport;n&&(n.setLayoutBoundsSize(t,e),n.setLayoutBoundsPosition(0,0))},n.prototype.partAdded=function(t,e){i.prototype.partAdded.call(this,t,e),e==this.horizontalScrollBar?(this.horizontalScrollBar.touchChildren=!1,this.horizontalScrollBar.touchEnabled=!1,this.horizontalScrollBar.viewport=this.viewport,this.horizontalScrollBar.autoVisibility&&(this.horizontalScrollBar.visible=!1)):e==this.verticalScrollBar&&(this.verticalScrollBar.touchChildren=!1,this.verticalScrollBar.touchEnabled=!1,this.verticalScrollBar.viewport=this.viewport,this.verticalScrollBar.autoVisibility&&(this.verticalScrollBar.visible=!1))},n.scrollThreshold=5,n}(t.Component);t.Scroller=i,__reflect(i.prototype,"eui.Scroller"),t.registerProperty(i,"viewport","eui.IViewport",!0)}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var i=null!==e&&e.apply(this,arguments)||this;return i.maxWidth=1e5,i.minWidth=0,i.maxHeight=1e5,i.minHeight=0,i.width=0/0,i.height=0/0,i.$elementsContent=[],i._hostComponent=null,i.$stateValues=new t.sys.StateValues,i}return __extends(i,e),Object.defineProperty(i.prototype,"elementsContent",{set:function(t){this.$elementsContent=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"hostComponent",{get:function(){return this._hostComponent},set:function(e){if(this._hostComponent!=e){this._hostComponent&&this._hostComponent.removeEventListener(egret.Event.ADDED_TO_STAGE,this.onAddedToStage,this),this._hostComponent=e;var i=this.$stateValues;i.parent=e,e&&(this.commitCurrentState(),this.$stateValues.intialized||(e.$stage?this.initializeStates(e.$stage):e.once(egret.Event.ADDED_TO_STAGE,this.onAddedToStage,this))),t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"hostComponent")}},enumerable:!0,configurable:!0}),i.prototype.onAddedToStage=function(t){this.initializeStates(this._hostComponent.$stage)},i}(egret.EventDispatcher);t.Skin=e,__reflect(e.prototype,"eui.Skin"),t.sys.mixin(e,t.sys.StateClient),t.registerProperty(e,"elementsContent","Array",!0),t.registerProperty(e,"states","State[]"),t.registerBindable(e.prototype,"hostComponent")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var t=e.call(this)||this;return t.indexBeingUpdated=!1,t.requireSelection=!0,t.useVirtualLayout=!1,t}return __extends(i,e),i.prototype.createChildren=function(){if(!this.$layout){var i=new t.HorizontalLayout;i.gap=0,i.horizontalAlign=t.JustifyAlign.JUSTIFY,i.verticalAlign=t.JustifyAlign.CONTENT_JUSTIFY,this.$setLayout(i)}e.prototype.createChildren.call(this)},i.prototype.$setDataProvider=function(i){var n=this.$dataProvider;return n&&n instanceof t.ViewStack&&(n.removeEventListener(t.PropertyEvent.PROPERTY_CHANGE,this.onViewStackIndexChange,this),this.removeEventListener(egret.Event.CHANGE,this.onIndexChanged,this)),i&&i instanceof t.ViewStack&&(i.addEventListener(t.PropertyEvent.PROPERTY_CHANGE,this.onViewStackIndexChange,this),this.addEventListener(egret.Event.CHANGE,this.onIndexChanged,this)),e.prototype.$setDataProvider.call(this,i)},i.prototype.onIndexChanged=function(t){this.indexBeingUpdated=!0,this.$dataProvider.selectedIndex=this.selectedIndex,this.indexBeingUpdated=!1},i.prototype.onViewStackIndexChange=function(t){"selectedIndex"!=t.property||this.indexBeingUpdated||this.setSelectedIndex(this.$dataProvider.selectedIndex,!1)},i}(t.ListBase);t.TabBar=e,__reflect(e.prototype,"eui.TabBar")}(eui||(eui={}));var eui;!function(t){var e=egret.FocusEvent,i=function(i){function n(){var t=i.call(this)||this;return t.isFocus=!1,t.$TextInput={0:null,1:null,2:null,3:null,4:null,5:null,6:"",7:null,8:egret.TextFieldInputType.TEXT},t}return __extends(n,i),Object.defineProperty(n.prototype,"prompt",{get:function(){return this.promptDisplay?this.promptDisplay.text:this.$TextInput[0]},set:function(t){this.$TextInput[0]=t,this.promptDisplay&&(this.promptDisplay.text=t),this.invalidateProperties(),this.invalidateState()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"displayAsPassword",{get:function(){if(this.textDisplay)return this.textDisplay.displayAsPassword;var t=this.$TextInput[1];return t?t:!1},set:function(t){this.$TextInput[1]=t,this.textDisplay&&(this.textDisplay.displayAsPassword=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"inputType",{get:function(){return this.textDisplay?this.textDisplay.inputType:this.$TextInput[8]},set:function(t){this.$TextInput[8]=t,this.textDisplay&&(this.textDisplay.inputType=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"textColor",{get:function(){return this.textDisplay?this.textDisplay.textColor:this.$TextInput[2]},set:function(t){this.$TextInput[2]=t,this.textDisplay&&(this.textDisplay.textColor=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxChars",{get:function(){if(this.textDisplay)return this.textDisplay.maxChars;var t=this.$TextInput[3];return t?t:0},set:function(t){this.$TextInput[3]=t,this.textDisplay&&(this.textDisplay.maxChars=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxWidth",{get:function(){if(this.textDisplay)return this.textDisplay.maxWidth;var t=this.$TextInput[4];return t?t:1e5},set:function(t){this.$TextInput[4]=t,this.textDisplay&&(this.textDisplay.maxWidth=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"maxHeight",{get:function(){this.textDisplay;var t=this.$TextInput[5];return t?t:1e5},set:function(t){this.$TextInput[5]=t,this.textDisplay&&(this.textDisplay.maxHeight=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"text",{get:function(){return this.textDisplay?this.textDisplay.text:this.$TextInput[6]},set:function(t){this.$TextInput[6]=t,this.textDisplay&&(this.textDisplay.text=t),this.invalidateProperties(),this.invalidateState()},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"restrict",{get:function(){return this.textDisplay?this.textDisplay.restrict:this.$TextInput[7]},set:function(t){this.$TextInput[7]=t,this.textDisplay&&(this.textDisplay.restrict=t),this.invalidateProperties()},enumerable:!0,configurable:!0}),n.prototype.focusInHandler=function(t){this.isFocus=!0,this.invalidateState()},n.prototype.focusOutHandler=function(t){this.isFocus=!1,this.invalidateState()},n.prototype.getCurrentState=function(){var t=this.skin;return!this.prompt||this.isFocus||this.text?this.enabled?"normal":"disabled":this.enabled&&t.hasState("normalWithPrompt")?"normalWithPrompt":!this.enabled&&t.hasState("disabledWithPrompt")?"disabledWithPrompt":void 0},n.prototype.partAdded=function(n,r){i.prototype.partAdded.call(this,n,r);var o=this.$TextInput;r==this.textDisplay?(this.textDisplayAdded(),this.textDisplay instanceof t.EditableText&&(this.textDisplay.addEventListener(e.FOCUS_IN,this.focusInHandler,this),this.textDisplay.addEventListener(e.FOCUS_OUT,this.focusOutHandler,this))):r==this.promptDisplay&&o[0]&&(this.promptDisplay.text=o[0]) },n.prototype.partRemoved=function(n,r){i.prototype.partRemoved.call(this,n,r),r==this.textDisplay?(this.textDisplayRemoved(),this.textDisplay instanceof t.EditableText&&(this.textDisplay.removeEventListener(e.FOCUS_IN,this.focusInHandler,this),this.textDisplay.removeEventListener(e.FOCUS_OUT,this.focusOutHandler,this))):r==this.promptDisplay&&(this.$TextInput[0]=this.promptDisplay.text)},n.prototype.textDisplayAdded=function(){var t=this.$TextInput;t[1]&&(this.textDisplay.displayAsPassword=t[1]),t[2]&&(this.textDisplay.textColor=t[2]),t[3]&&(this.textDisplay.maxChars=t[3]),t[4]&&(this.textDisplay.maxWidth=t[4]),t[5]&&(this.textDisplay.maxHeight=t[5]),t[6]&&(this.textDisplay.text=t[6]),t[7]&&(this.textDisplay.restrict=t[7]),t[8]&&(this.textDisplay.inputType=t[8])},n.prototype.textDisplayRemoved=function(){var t=this.$TextInput;t[1]=this.textDisplay.displayAsPassword,t[2]=this.textDisplay.textColor,t[3]=this.textDisplay.maxChars,t[4]=this.textDisplay.maxWidth,t[5]=this.textDisplay.maxHeight,t[6]=this.textDisplay.text,t[7]=this.textDisplay.restrict,t[8]=this.textDisplay.inputType},n}(t.Component);t.TextInput=i,__reflect(i.prototype,"eui.TextInput")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e}(t.ToggleButton);t.CheckBox=e,__reflect(e.prototype,"eui.CheckBox")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e}(t.ToggleButton);t.ToggleSwitch=e,__reflect(e.prototype,"eui.ToggleSwitch")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=t.call(this)||this;return e.addEventListener(egret.Event.ADDED_TO_STAGE,e.onAddToStage,e),e.addEventListener(egret.Event.REMOVED_FROM_STAGE,e.onRemoveFromStage,e),e}return __extends(e,t),e.prototype.onAddToStage=function(t){this.$stage.addEventListener(egret.Event.RESIZE,this.onResize,this),this.onResize()},e.prototype.onRemoveFromStage=function(t){this.$stage.removeEventListener(egret.Event.RESIZE,this.onResize,this)},e.prototype.onResize=function(t){var e=this.$stage;this.$setWidth(e.$stageWidth),this.$setHeight(e.$stageHeight)},e}(t.Group);t.UILayer=e,__reflect(e.prototype,"eui.UILayer")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return __extends(e,t),e.prototype.updateDisplayList=function(e,i){t.prototype.updateDisplayList.call(this,e,i);var n=this.thumb,r=this.$viewport;if(n&&r){var o=egret.$TempRectangle;n.getPreferredBounds(o);var s=o.height,a=o.x,h=r.scrollV,l=r.contentHeight,u=r.height;if(0>=h){var p=s*(1- -h/(.5*u));p=Math.max(5,Math.round(p)),n.setLayoutBoundsSize(0/0,p),n.setLayoutBoundsPosition(a,0)}else if(h>=l-u){var p=s*(1-(h-l+u)/(.5*u));p=Math.max(5,Math.round(p)),n.setLayoutBoundsSize(0/0,p),n.setLayoutBoundsPosition(a,i-p)}else{var c=(i-s)*h/(l-u);n.setLayoutBoundsSize(0/0,0/0),n.setLayoutBoundsPosition(a,c)}}},e.prototype.onPropertyChanged=function(t){switch(t.property){case"scrollV":case"contentHeight":this.invalidateDisplayList()}},e}(t.ScrollBarBase);t.VScrollBar=e,__reflect(e.prototype,"eui.VScrollBar")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){return t.call(this)||this}return __extends(e,t),e.prototype.pointToValue=function(t,e){if(!this.thumb||!this.track)return 0;var i=this.$Range,n=i[0]-i[2],r=this.getThumbRange();return i[2]+(0!=r?(r-e)/r*n:0)},e.prototype.getThumbRange=function(){var t=egret.$TempRectangle;this.track.getLayoutBounds(t);var e=t.height;return this.thumb.getLayoutBounds(t),e-t.height},e.prototype.updateSkinDisplayList=function(){if(this.thumb&&this.track){var t=this.$Range,e=this.getThumbRange(),i=t[0]-t[2],n=i>0?e-(this.pendingValue-t[2])/i*e:0,r=this.track.localToGlobal(0,n,egret.$TempPoint),o=r.x,s=r.y,a=this.thumb.$parent.globalToLocal(o,s,egret.$TempPoint).y,h=egret.$TempRectangle,l=h.height;if(this.thumb.getLayoutBounds(h),this.thumb.setLayoutBoundsPosition(h.x,Math.round(a)),this.trackHighlight){var u=this.trackHighlight.$parent.globalToLocal(o,s,egret.$TempPoint).y;this.trackHighlight.y=Math.round(u+l),this.trackHighlight.height=Math.round(e-u)}}},e}(t.SliderBase);t.VSlider=e,__reflect(e.prototype,"eui.VSlider")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){var i=e.call(this)||this;return i._selectedChild=null,i.proposedSelectedIndex=t.ListBase.NO_PROPOSED_SELECTION,i._selectedIndex=-1,i}return __extends(i,e),Object.defineProperty(i.prototype,"layout",{get:function(){return this.$layout},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"selectedChild",{get:function(){var t=this.selectedIndex;return t>=0&&t=0&&e0?0==n?(this.proposedSelectedIndex=0,this.invalidateProperties()):this.setSelectedIndex(0):this.setSelectedIndex(-1):r>n&&this.setSelectedIndex(r-1),t.CollectionEvent.dispatchCollectionEvent(this,t.CollectionEvent.COLLECTION_CHANGE,t.CollectionEventKind.REMOVE,n,-1,[i.name])},i.prototype.commitProperties=function(){e.prototype.commitProperties.call(this),this.proposedSelectedIndex!=t.ListBase.NO_PROPOSED_SELECTION&&(this.commitSelection(this.proposedSelectedIndex),this.proposedSelectedIndex=t.ListBase.NO_PROPOSED_SELECTION)},i.prototype.commitSelection=function(t){t>=0&&tn;n++)if(e[n].name==t)return n;return-1},i}(t.Group);t.ViewStack=e,__reflect(e.prototype,"eui.ViewStack",["eui.ICollection","egret.IEventDispatcher"]),t.registerBindable(e.prototype,"selectedIndex")}(eui||(eui={}));var eui;!function(t){var e;!function(t){function e(t){return-.5*(Math.cos(Math.PI*t)-1)}var i=function(){function t(t,i){this.easerFunction=e,this.isPlaying=!1,this.duration=500,this.currentValue=0,this.from=0,this.to=0,this.startTime=0,this.endFunction=null,this.updateFunction=t,this.thisObject=i}return t.prototype.play=function(){this.stop(),this.start()},t.prototype.start=function(){this.isPlaying=!1,this.currentValue=0,this.startTime=egret.getTimer(),this.doInterval(this.startTime),egret.startTick(this.doInterval,this)},t.prototype.stop=function(){this.isPlaying=!1,this.startTime=0,egret.stopTick(this.doInterval,this)},t.prototype.doInterval=function(t){var e=t-this.startTime;this.isPlaying||(this.isPlaying=!0);var i=this.duration,n=0==i?1:Math.min(e,i)/i;this.easerFunction&&(n=this.easerFunction(n)),this.currentValue=this.from+(this.to-this.from)*n,this.updateFunction&&this.updateFunction.call(this.thisObject,this);var r=e>=i;return r&&this.stop(),r&&this.endFunction&&this.endFunction.call(this.thisObject,this),!1},t}();t.Animation=i,__reflect(i.prototype,"eui.sys.Animation")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(){function t(){}return t.prototype.getTheme=function(t,e,i,n){function r(t){var i=t.target;e.call(n,i.response)}function o(t){i.call(n)}var s=new egret.HttpRequest;s.addEventListener(egret.Event.COMPLETE,r,n),s.addEventListener(egret.IOErrorEvent.IO_ERROR,o,n),s.responseType=egret.HttpResponseType.TEXT,s.open(t),s.send()},t}();t.DefaultThemeAdapter=e,__reflect(e.prototype,"eui.DefaultThemeAdapter",["eui.IThemeAdapter"])}(eui||(eui={}));var eui;!function(t){function e(t,i){var n=Object.getOwnPropertyDescriptor(t,i);if(n)return n;var r=Object.getPrototypeOf(t);return r?e(r,i):null}function i(t,e){for(var i=t[n],r=i.length,o=0;r>o;o+=2){var s=i[o],a=i[o+1];s.call(a,e)}}var n="__listeners__",r="__bindables__",o=0,s=function(){function s(t,e,i,n){this.isExecuting=!1,this.property=t,this.handler=e,this.next=n,this.thisObject=i}return s.watch=function(t,e,i,n){if(e.length>0){var r=e.shift(),o=s.watch(null,e,i,n),a=new s(r,i,n,o);return a.reset(t),a}return null},s.checkBindable=function(s,a){var h=s[r];if(h&&-1!=h.indexOf(a))return!0;var l=egret.is(s,"egret.IEventDispatcher");l||s[n]||(s[n]=[]);var u=e(s,a);if(u&&u.set&&u.get){var p=u.set;u.set=function(e){this[a]!=e&&(p.call(this,e),l?t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,a):i(this,a))}}else{if(u&&(u.get||u.set))return!1;o++;var c="_"+o+a;s[c]=u?u.value:null,u={enumerable:!0,configurable:!0},u.get=function(){return this[c]},u.set=function(e){this[c]!=e&&(this[c]=e,l?t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,a):i(this,a))}}Object.defineProperty(s,a,u),t.registerBindable(s,a)},s.prototype.unwatch=function(){this.reset(null),this.handler=null,this.next&&(this.next.handler=null)},s.prototype.getValue=function(){return this.next?this.next.getValue():this.getHostPropertyValue()},s.prototype.setHandler=function(t,e){this.handler=t,this.thisObject=e,this.next&&this.next.setHandler(t,e)},s.prototype.reset=function(e){var i=this.host;if(i)if(egret.is(i,"egret.IEventDispatcher"))i.removeEventListener(t.PropertyEvent.PROPERTY_CHANGE,this.wrapHandler,this);else{var r=i[n],o=r.indexOf(this);r.splice(o-1,2)}if(this.host=e,e)if(s.checkBindable(e,this.property),egret.is(e,"egret.IEventDispatcher"))e.addEventListener(t.PropertyEvent.PROPERTY_CHANGE,this.wrapHandler,this,!1,100);else{var r=e[n];r.push(this.onPropertyChange),r.push(this)}this.next&&this.next.reset(this.getHostPropertyValue())},s.prototype.getHostPropertyValue=function(){return this.host?this.host[this.property]:null},s.prototype.wrapHandler=function(t){this.onPropertyChange(t.property)},s.prototype.onPropertyChange=function(t){if(t==this.property&&!this.isExecuting)try{this.isExecuting=!0,this.next&&this.next.reset(this.getHostPropertyValue()),this.handler.call(this.thisObject,this.getValue())}finally{this.isExecuting=!1}},s}();t.Watcher=s,__reflect(s.prototype,"eui.Watcher")}(eui||(eui={}));var eui;!function(t){function e(e){for(var i=e[0],n=i instanceof t.Watcher?i.getValue():i,r=e.length,o=1;r>o;o++){var s=e[o];s instanceof t.Watcher&&(s=s.getValue()),n+=s}return n}var i=function(){function i(){}return i.bindProperty=function(e,i,n,r){var o=t.Watcher.watch(e,i,null,null);if(o){var s=function(t){n[r]=t};o.setHandler(s,null),s(o.getValue())}return o},i.bindHandler=function(e,i,n,r){var o=t.Watcher.watch(e,i,n,r);return o&&n.call(r,o.getValue()),o},i.$bindProperties=function(n,r,o,s,a){if(1==r.length&&1==o.length)return i.bindProperty(n,r[0].split("."),s,a);for(var h,l=function(){s[a]=e(r)},u=o.length,p=0;u>p;p++){var c=o[p],d=r[c].split(".");h=t.Watcher.watch(n,d,null,null),h&&(r[c]=h,h.setHandler(l,null))}return l(),h},i}();t.Binding=i,__reflect(i.prototype,"eui.Binding")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(t){var i=e.call(this)||this;return t?i._source=t:i._source=[],i}return __extends(i,e),Object.defineProperty(i.prototype,"source",{get:function(){return this._source},set:function(e){e||(e=[]),this._source=e,this.dispatchCoEvent(t.CollectionEventKind.RESET)},enumerable:!0,configurable:!0}),i.prototype.refresh=function(){this.dispatchCoEvent(t.CollectionEventKind.REFRESH)},Object.defineProperty(i.prototype,"length",{get:function(){return this._source.length},enumerable:!0,configurable:!0}),i.prototype.addItem=function(e){this._source.push(e),this.dispatchCoEvent(t.CollectionEventKind.ADD,this._source.length-1,-1,[e])},i.prototype.addItemAt=function(e,i){0>i||i>this._source.length,this._source.splice(i,0,e),this.dispatchCoEvent(t.CollectionEventKind.ADD,i,-1,[e])},i.prototype.getItemAt=function(t){return this._source[t]},i.prototype.getItemIndex=function(t){for(var e=this._source.length,i=0;e>i;i++)if(this._source[i]===t)return i;return-1},i.prototype.itemUpdated=function(e){var i=this.getItemIndex(e);-1!=i&&this.dispatchCoEvent(t.CollectionEventKind.UPDATE,i,-1,[e])},i.prototype.removeAll=function(){var e=this._source.concat();this._source=[],this.dispatchCoEvent(t.CollectionEventKind.REMOVE,0,-1,e)},i.prototype.removeItemAt=function(e){if(!(0>e||e>=this._source.length)){var i=this._source.splice(e,1)[0];return this.dispatchCoEvent(t.CollectionEventKind.REMOVE,e,-1,[i]),i}},i.prototype.replaceItemAt=function(e,i){if(!(0>i||i>=this._source.length)){var n=this._source.splice(i,1,e)[0];return this.dispatchCoEvent(t.CollectionEventKind.REPLACE,i,-1,[e],[n]),n}},i.prototype.replaceAll=function(t){t||(t=[]);for(var e=t.length,i=this._source.length,n=e;i>n;n++)this.removeItemAt(e);for(var n=0;e>n;n++)n>=i?this.addItemAt(t[n],n):this.replaceItemAt(t[n],n);this._source=t},i.prototype.dispatchCoEvent=function(e,i,n,r,o){t.CollectionEvent.dispatchCollectionEvent(this,t.CollectionEvent.COLLECTION_CHANGE,e,i,n,r,o)},i}(egret.EventDispatcher);t.ArrayCollection=e,__reflect(e.prototype,"eui.ArrayCollection",["eui.ICollection","egret.IEventDispatcher"]),t.registerProperty(e,"source","Array",!0)}(eui||(eui={}));var eui;!function(t){var e=t.sys.UIComponentImpl,i=function(i){function n(){var t=i.call(this)||this;return t._widthConstraint=0/0,t.$isShowPrompt=!1,t.$promptColor=6710886,t.$isFocusIn=!1,t.initializeUIValues(),t.type=egret.TextFieldType.INPUT,t.$EditableText={0:null,1:16777215,2:!1},t}return __extends(n,i),n.prototype.$invalidateContentBounds=function(){i.prototype.$invalidateContentBounds.call(this),this.invalidateSize()},n.prototype.$setWidth=function(t){var n=i.prototype.$setWidth.call(this,t),r=e.prototype.$setWidth.call(this,t);return n&&r},n.prototype.$setHeight=function(t){var n=i.prototype.$setHeight.call(this,t),r=e.prototype.$setHeight.call(this,t);return n&&r},n.prototype.$getText=function(){var t=i.prototype.$getText.call(this);return t==this.$EditableText[0]&&(t=""),t},n.prototype.$setText=function(e){var n=this.$EditableText[0];(n!=e||null==n)&&(this.$isShowPrompt=!1,this.textColor=this.$EditableText[1],this.displayAsPassword=this.$EditableText[2]),this.$isFocusIn||(""==e||null==e)&&(e=n,this.$isShowPrompt=!0,i.prototype.$setTextColor.call(this,this.$promptColor),i.prototype.$setDisplayAsPassword.call(this,!1));var r=i.prototype.$setText.call(this,e);return t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"text"),r},n.prototype.$onAddToStage=function(e,i){t.sys.UIComponentImpl.prototype.$onAddToStage.call(this,e,i),this.addEventListener(egret.FocusEvent.FOCUS_IN,this.onfocusIn,this),this.addEventListener(egret.FocusEvent.FOCUS_OUT,this.onfocusOut,this)},n.prototype.$onRemoveFromStage=function(){t.sys.UIComponentImpl.prototype.$onRemoveFromStage.call(this),this.removeEventListener(egret.FocusEvent.FOCUS_IN,this.onfocusIn,this),this.removeEventListener(egret.FocusEvent.FOCUS_OUT,this.onfocusOut,this)},Object.defineProperty(n.prototype,"prompt",{get:function(){return this.$EditableText[0]},set:function(t){var e=this.$EditableText,i=e[0];if(i!=t){e[0]=t;var n=this.text;n&&n!=i||this.showPromptText()}},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"promptColor",{get:function(){return this.$promptColor},set:function(t){if(t=0|+t,this.$promptColor!=t){this.$promptColor=t;var e=this.text;e&&e!=this.$EditableText[0]||this.showPromptText()}},enumerable:!0,configurable:!0}),n.prototype.onfocusOut=function(){this.$isFocusIn=!1,this.text||this.showPromptText()},n.prototype.onfocusIn=function(){this.$isFocusIn=!0,this.$isShowPrompt=!1,this.displayAsPassword=this.$EditableText[2];var t=this.$EditableText,e=this.text;e&&e!=t[0]||(this.textColor=t[1],this.text="")},n.prototype.showPromptText=function(){var t=this.$EditableText;this.$isShowPrompt=!0,i.prototype.$setTextColor.call(this,this.$promptColor),i.prototype.$setDisplayAsPassword.call(this,!1),this.text=t[0]},n.prototype.$setTextColor=function(t){return t=0|+t,this.$EditableText[1]=t,this.$isShowPrompt||i.prototype.$setTextColor.call(this,t),!0},n.prototype.$setDisplayAsPassword=function(t){return this.$EditableText[2]=t,this.$isShowPrompt||i.prototype.$setDisplayAsPassword.call(this,t),!0},n.prototype.createChildren=function(){this.onfocusOut()},n.prototype.childrenCreated=function(){},n.prototype.commitProperties=function(){},n.prototype.measure=function(){var t=this.$UIComponent,e=this.$TextField,n=e[3],r=0/0;isNaN(this._widthConstraint)?isNaN(t[8])?1e5!=t[13]&&(r=t[13]):r=t[8]:(r=this._widthConstraint,this._widthConstraint=0/0),i.prototype.$setWidth.call(this,r),this.setMeasuredSize(this.textWidth,this.textHeight),i.prototype.$setWidth.call(this,n)},n.prototype.updateDisplayList=function(t,e){i.prototype.$setWidth.call(this,t),i.prototype.$setHeight.call(this,e)},n.prototype.invalidateParentLayout=function(){},n.prototype.setMeasuredSize=function(t,e){},n.prototype.invalidateProperties=function(){},n.prototype.validateProperties=function(){},n.prototype.invalidateSize=function(){},n.prototype.validateSize=function(t){},n.prototype.invalidateDisplayList=function(){},n.prototype.validateDisplayList=function(){},n.prototype.validateNow=function(){},n.prototype.setLayoutBoundsSize=function(t,i){if(e.prototype.setLayoutBoundsSize.call(this,t,i),!isNaN(t)&&t!==this._widthConstraint&&0!=t){var n=this.$UIComponent;isNaN(n[9])&&t!=n[16]&&(this._widthConstraint=t,this.invalidateSize())}},n.prototype.setLayoutBoundsPosition=function(t,e){},n.prototype.getLayoutBounds=function(t){},n.prototype.getPreferredBounds=function(t){},n}(egret.TextField);t.EditableText=i,__reflect(i.prototype,"eui.EditableText",["eui.UIComponent","egret.DisplayObject","eui.IDisplayText"]),t.sys.implementUIComponent(i,egret.TextField),t.registerBindable(i.prototype,"text")}(eui||(eui={}));var eui;!function(t){var e;!function(t){function e(t){var e=t-1;return e*e*e+1}var i=4,n=[1,1.33,1.66,2],r=2.33,o=.02,s=.998,a=.95,h=Math.log(s),l=function(){function l(i,n,r){this.$scrollFactor=1,this.previousTime=0,this.velocity=0,this.previousVelocity=[],this.currentPosition=0,this.previousPosition=0,this.currentScrollPos=0,this.maxScrollPos=0,this.offsetPoint=0,this.$bounces=!0,this.started=!0,this.updateFunction=i,this.endFunction=n,this.target=r,this.animation=new t.Animation(this.onScrollingUpdate,this),this.animation.endFunction=this.finishScrolling,this.animation.easerFunction=e}return l.prototype.isPlaying=function(){return this.animation.isPlaying},l.prototype.stop=function(){this.animation.stop(),egret.stopTick(this.onTick,this),this.started=!1},l.prototype.isStarted=function(){return this.started},l.prototype.start=function(t){this.started=!0,this.velocity=0,this.previousVelocity.length=0,this.previousTime=egret.getTimer(),this.previousPosition=this.currentPosition=t,this.offsetPoint=t,egret.startTick(this.onTick,this)},l.prototype.update=function(t,e,i){e=Math.max(e,0),this.currentPosition=t,this.maxScrollPos=e;var n=this.offsetPoint-t,r=n+i;this.offsetPoint=t,0>r&&(this.$bounces?r-=.5*n:r=0),r>e&&(this.$bounces?r-=.5*n:r=e),this.currentScrollPos=r,this.updateFunction.call(this.target,r)},l.prototype.finish=function(t,e){egret.stopTick(this.onTick,this),this.started=!1;for(var i=this.velocity*r,l=this.previousVelocity,u=l.length,p=r,c=0;u>c;c++){var d=n[c];i+=l[0]*d,p+=d}var f=i/p,y=Math.abs(f),g=0,v=0;if(y>o)if(v=t+(f-o)/h*2*this.$scrollFactor,0>v||v>e)for(v=t;Math.abs(f)>o;)v-=f,f*=0>v||v>e?s*a:s,g++;else g=Math.log(o/y)/h;else v=t;if(this.target.$getThrowInfo){var m=this.target.$getThrowInfo(t,v);v=m.toPos}g>0?(this.$bounces||(0>v?v=0:v>e&&(v=e)),this.throwTo(v,g)):this.finishScrolling()},l.prototype.onTick=function(t){var e=t-this.previousTime;if(e>10){var n=this.previousVelocity;n.length>=i&&n.shift(),this.velocity=(this.currentPosition-this.previousPosition)/e,n.push(this.velocity),this.previousTime=t,this.previousPosition=this.currentPosition}return!0},l.prototype.finishScrolling=function(t){var e=this.currentScrollPos,i=this.maxScrollPos,n=e;0>e&&(n=0),e>i&&(n=i),this.throwTo(n,300)},l.prototype.throwTo=function(t,e){void 0===e&&(e=500);var i=this.currentScrollPos;if(i==t)return void this.endFunction.call(this.target);var n=this.animation;n.duration=e,n.from=i,n.to=t,n.play()},l.prototype.onScrollingUpdate=function(t){this.currentScrollPos=t.currentValue,this.updateFunction.call(this.target,t.currentValue)},l}();t.TouchScroll=l,__reflect(l.prototype,"eui.sys.TouchScroll")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(){function t(){}return t.LTR="ltr",t.RTL="rtl",t.TTB="ttb",t.BTT="btt",t}();t.Direction=e,__reflect(e.prototype,"eui.Direction")}(eui||(eui={}));var eui;!function(t){var e=function(){function t(){}return t.AUTO="auto",t.OFF="off",t.ON="on",t}();t.ScrollPolicy=e,__reflect(e.prototype,"eui.ScrollPolicy")}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(t,i){var n=e.call(this)||this;return n.delayList=[],n.skinMap={},n.$styles={},n.initialized=!t,i&&egret.registerImplementation("eui.Theme",n),n.$configURL=t,n.load(t),n}return __extends(i,e),i.prototype.load=function(e){var i=this;t.getTheme(e,function(t){return i.onConfigLoaded(t)})},i.prototype.onConfigLoaded=function(t){var e;if("string"==typeof t)try{e=JSON.parse(t)}catch(i){egret.$error(3e3)}else e=t;if(e&&e.skins)for(var n=this.skinMap,r=e.skins,o=Object.keys(r),s=o.length,a=0;s>a;a++){var h=o[a];n[h]||this.mapSkin(h,r[h])}e.styles&&(this.$styles=e.styles),e.exmls&&0!=e.exmls.length?e.exmls[0].gjs?(e.exmls.forEach(function(t){return EXML.$parseURLContentAsJs(t.path,t.gjs,t.className)}),this.onLoaded()):e.exmls[0].content?(e.exmls.forEach(function(t){return EXML.$parseURLContent(t.path,t.content)}),this.onLoaded()):EXML.$loadAll(e.exmls,this.onLoaded,this,!0):this.onLoaded()},i.prototype.onLoaded=function(t,e){this.initialized=!0,this.handleDelayList(),this.dispatchEventWith(egret.Event.COMPLETE)},i.prototype.handleDelayList=function(){for(var t=this.delayList,e=t.length,i=0;e>i;i++){var n=t[i];if(!n.$Component[5]){var r=this.getSkinName(n);r&&(n.$Component[1]=r,n.$parseSkinName())}}t.length=0},i.prototype.getSkinName=function(t){if(!this.initialized)return-1==this.delayList.indexOf(t)&&this.delayList.push(t),"";var e=this.skinMap,i=e[t.hostComponentKey];return i||(i=this.findSkinName(t)),i},i.prototype.findSkinName=function(t){if(!t)return"";var e=t.__class__;if(void 0===e)return"";var i=this.skinMap[e];return i||"eui.Component"==e?i:this.findSkinName(Object.getPrototypeOf(t))},i.prototype.mapSkin=function(t,e){this.skinMap[t]=e},i.prototype.$getStyleConfig=function(t){return this.$styles[t]},i}(egret.EventDispatcher);t.Theme=e,__reflect(e.prototype,"eui.Theme")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(e,i,n,r,o,s,a,h){var l=t.call(this,e,i,n)||this;return l.$initTo(r,o,s,a,h),l}return __extends(e,t),e.prototype.$initTo=function(t,e,i,n,r){this.kind=t,this.location=0|+e,this.oldLocation=0|+i,this.items=n||[],this.oldItems=r||[]},e.prototype.clean=function(){t.prototype.clean.call(this),this.items=this.oldItems=null},e.dispatchCollectionEvent=function(t,i,n,r,o,s,a){if(!t.hasEventListener(i))return!0;var h=egret.Event.create(e,i);h.$initTo(n,r,o,s,a);var l=t.dispatchEvent(h);return egret.Event.release(h),l},e.COLLECTION_CHANGE="collectionChange",e}(egret.Event);t.CollectionEvent=e,__reflect(e.prototype,"eui.CollectionEvent")}(eui||(eui={}));var eui;!function(t){var e=function(){function t(){}return t.ADD="add",t.REFRESH="refresh",t.REMOVE="remove",t.REPLACE="replace",t.RESET="reset",t.UPDATE="update",t}();t.CollectionEventKind=e,__reflect(e.prototype,"eui.CollectionEventKind")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.item=null,e.itemRenderer=null,e.itemIndex=-1,e}return __extends(e,t),e.prototype.clean=function(){t.prototype.clean.call(this),this.item=this.itemRenderer=null},e.dispatchItemTapEvent=function(t,i,n){if(!t.hasEventListener(i))return!0;var r=egret.Event.create(e,i);r.item=n.data,r.itemIndex=n.itemIndex,r.itemRenderer=n;var o=t.dispatchEvent(r);return egret.Event.release(r),o},e.ITEM_TAP="itemTap",e}(egret.Event);t.ItemTapEvent=e,__reflect(e.prototype,"eui.ItemTapEvent")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(e,i,n,r){var o=t.call(this,e,i,n)||this;return o.property=r,o}return __extends(e,t),e.dispatchPropertyEvent=function(t,i,n){if(!t.hasEventListener(i))return!0;var r=egret.Event.create(e,i);r.property=n;var o=t.dispatchEvent(r);return egret.Event.release(r),o},e.PROPERTY_CHANGE="propertyChange",e}(egret.Event);t.PropertyEvent=e,__reflect(e.prototype,"eui.PropertyEvent")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(e,i,n,r,o){var s=t.call(this,e,i,n)||this;return r=+r,o=+o,s.currentPos=r,s.toPos=o,s}return __extends(e,t),e.THROW="throw",e}(egret.Event);t.ScrollerThrowEvent=e,__reflect(e.prototype,"eui.ScrollerThrowEvent")}(eui||(eui={}));var eui;!function(t){var e=function(t){function e(e,i,n){return t.call(this,e,i,n)||this}return __extends(e,t),e.dispatchUIEvent=function(t,i,n,r){if(!t.hasEventListener(i))return!0;var o=egret.Event.create(e,i,n,r),s=t.dispatchEvent(o);return egret.Event.release(o),s},e.CREATION_COMPLETE="creationComplete",e.CHANGE_END="changeEnd",e.CHANGE_START="changeStart",e.CLOSING="closing",e.MOVE="move",e}(egret.Event);t.UIEvent=e,__reflect(e.prototype,"eui.UIEvent")}(eui||(eui={}));var eui;!function(t){var e;!function(t){var e="eui.State",i="eui.AddItems",n="eui.SetProperty",r="eui.SetStateProperty",o="eui.Binding.$bindProperties",s=function(){function t(){this.indent=0}return t.prototype.toCode=function(){return""},t.prototype.getIndent=function(t){void 0===t&&(t=this.indent);for(var e="",i=0;t>i;i++)e+=" ";return e},t}();t.CodeBase=s,__reflect(s.prototype,"eui.sys.CodeBase");var a=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.className="",e.superClass="",e.innerClassBlock=[],e.variableBlock=[],e.functionBlock=[],e}return __extends(e,t),e.prototype.addInnerClass=function(t){-1==this.innerClassBlock.indexOf(t)&&this.innerClassBlock.push(t)},e.prototype.addVariable=function(t){-1==this.variableBlock.indexOf(t)&&this.variableBlock.push(t)},e.prototype.getVariableByName=function(t){for(var e=this.variableBlock,i=e.length,n=0;i>n;n++){var r=e[n];if(r.name==t)return r}return null},e.prototype.addFunction=function(t){-1==this.functionBlock.indexOf(t)&&this.functionBlock.push(t)},e.prototype.getFuncByName=function(t){for(var e=this.functionBlock,i=e.length,n=0;i>n;n++){var r=e[n];if(r.name==t)return r}return null},e.prototype.toCode=function(){var t=this.indent,e=this.getIndent(t),i=this.getIndent(t+1),n=this.getIndent(t+2),r=e+"(function (";r+=this.superClass?"_super) {\n"+i+"__extends("+this.className+", _super);\n":") {\n";for(var o=this.innerClassBlock,s=o.length,a=0;s>a;a++){var h=o[a];h.indent=t+1,r+=i+"var "+h.className+" = "+h.toCode()+"\n\n"}r+=i+"function "+this.className+"() {\n",this.superClass&&(r+=n+"_super.call(this);\n");var l=this.variableBlock;s=l.length;for(var a=0;s>a;a++){var u=l[a];u.defaultValue&&(r+=n+u.toCode()+"\n")}if(this.constructCode){var p=this.constructCode.toCode().split("\n");s=p.length;for(var a=0;s>a;a++){var c=p[a];r+=n+c+"\n"}}r+=i+"}\n",r+=i+"var _proto = "+this.className+".prototype;\n\n";var d=this.functionBlock;s=d.length;for(var a=0;s>a;a++){var f=d[a];f.indent=t+1,r+=f.toCode()+"\n"}return r+=i+"return "+this.className+";\n"+e,r+=this.superClass?"})("+this.superClass+");":"})();"},e}(s);t.EXClass=a,__reflect(a.prototype,"eui.sys.EXClass");var h=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.lines=[],e}return __extends(e,t),e.prototype.addVar=function(t,e){var i=e?" = "+e:"";this.addCodeLine("var "+t+i+";")},e.prototype.addAssignment=function(t,e,i){var n=i?"."+i:"";this.addCodeLine(t+n+" = "+e+";")},e.prototype.addReturn=function(t){this.addCodeLine("return "+t+";")},e.prototype.addEmptyLine=function(){this.addCodeLine("")},e.prototype.startIf=function(t){this.addCodeLine("if("+t+")"),this.startBlock()},e.prototype.startElse=function(){this.addCodeLine("else"),this.startBlock()},e.prototype.startElseIf=function(t){this.addCodeLine("else if("+t+")"),this.startBlock()},e.prototype.startBlock=function(){this.addCodeLine("{"),this.indent++},e.prototype.endBlock=function(){this.indent--,this.addCodeLine("}")},e.prototype.doFunction=function(t,e){var i=e.join(",");this.addCodeLine(t+"("+i+")")},e.prototype.addCodeLine=function(t){this.lines.push(this.getIndent()+t)},e.prototype.addCodeLineAt=function(t,e){this.lines.splice(e,0,this.getIndent()+t)},e.prototype.containsCodeLine=function(t){return-1!=this.lines.indexOf(t)},e.prototype.concat=function(t){this.lines=this.lines.concat(t.lines)},e.prototype.toCode=function(){return this.lines.join("\n")},e}(s);t.EXCodeBlock=h,__reflect(h.prototype,"eui.sys.EXCodeBlock");var l=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.codeBlock=null,e.isGet=!1,e.name="",e}return __extends(e,t),e.prototype.toCode=function(){var t,e=this.getIndent(),i=this.getIndent(this.indent+1),n=e;if(this.isGet?(t=this.getIndent(this.indent+2),n+='Object.defineProperty(_proto, "skinParts", {\n',n+=i+"get: function () {\n"):(t=i,n+="_proto."+this.name+" = function () {\n"),this.codeBlock)for(var r=this.codeBlock.toCode().split("\n"),o=r.length,s=0;o>s;s++){var a=r[s];n+=t+a+"\n"}return n+=this.isGet?i+"},\n"+i+"enumerable: true,\n"+i+"configurable: true\n"+e+"});":e+"};"},e}(s);t.EXFunction=l,__reflect(l.prototype,"eui.sys.EXFunction");var u=function(t){function e(e,i){var n=t.call(this)||this;return n.indent=2,n.name=e,n.defaultValue=i,n}return __extends(e,t),e.prototype.toCode=function(){return this.defaultValue?"this."+this.name+" = "+this.defaultValue+";":""},e}(s);t.EXVariable=u,__reflect(u.prototype,"eui.sys.EXVariable");var p=function(t){function i(e,i){var n=t.call(this)||this;return n.name="",n.stateGroups=[],n.addItems=[],n.setProperty=[],n.name=e,i&&(n.stateGroups=i),n}return __extends(i,t),i.prototype.addOverride=function(t){t instanceof c?this.addItems.push(t):this.setProperty.push(t)},i.prototype.toCode=function(){for(var t=this.getIndent(1),i="new "+e+' ("'+this.name+'",\n'+t+"[\n",n=0,r=!0,o=this.addItems.concat(this.setProperty);nl;l++){var u=a[l];a[l]=t+t+u}i+=a.join("\n"),n++}return i+="\n"+t+"])"},i}(s);t.EXState=p,__reflect(p.prototype,"eui.sys.EXState");var c=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.target=e,o.property=i,o.position=n,o.relativeTo=r,o}return __extends(e,t),e.prototype.toCode=function(){var t="new "+i+'("'+this.target+'","'+this.property+'",'+this.position+',"'+this.relativeTo+'")'; return t},e}(s);t.EXAddItems=c,__reflect(c.prototype,"eui.sys.EXAddItems");var d=function(t){function e(e,i,n){var r=t.call(this)||this;return r.target=e,r.name=i,r.value=n,r}return __extends(e,t),e.prototype.toCode=function(){return"new "+n+'("'+this.target+'","'+this.name+'",'+this.value+")"},e}(s);t.EXSetProperty=d,__reflect(d.prototype,"eui.sys.EXSetProperty");var f=function(t){function e(e,i,n,r){var o=t.call(this)||this;return e=e?"this."+e:"this",o.target=e,o.property=i,o.templates=n,o.chainIndex=r,o}return __extends(e,t),e.prototype.toCode=function(){var t=this.templates.join(","),e=this.chainIndex.join(",");return"new "+r+"(this, ["+t+"],["+e+"],"+this.target+',"'+this.property+'")'},e}(s);t.EXSetStateProperty=f,__reflect(f.prototype,"eui.sys.EXSetStateProperty");var y=function(t){function e(e,i,n,r){var o=t.call(this)||this;return o.target=e,o.property=i,o.templates=n,o.chainIndex=r,o}return __extends(e,t),e.prototype.toCode=function(){var t=this.templates.join(","),e=this.chainIndex.join(",");return o+"(this, ["+t+"],["+e+"],"+this.target+',"'+this.property+'")'},e}(s);t.EXBinding=y,__reflect(y.prototype,"eui.sys.EXBinding")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=t.sys.UIComponentImpl,i=function(i){function n(t){var e=i.call(this)||this;return e.$createChildrenCalled=!1,e.$fontChanged=!1,e._widthConstraint=0/0,e._heightConstraint=0/0,e.initializeUIValues(),e.text=t,e}return __extends(n,i),n.prototype.$invalidateContentBounds=function(){i.prototype.$invalidateContentBounds.call(this),this.invalidateSize()},n.prototype.$setWidth=function(t){var n=i.prototype.$setWidth.call(this,t),r=e.prototype.$setWidth.call(this,t);return n&&r},n.prototype.$setHeight=function(t){var n=i.prototype.$setHeight.call(this,t),r=e.prototype.$setHeight.call(this,t);return n&&r},n.prototype.$setText=function(e){var n=i.prototype.$setText.call(this,e);return t.PropertyEvent.dispatchPropertyEvent(this,t.PropertyEvent.PROPERTY_CHANGE,"text"),n},n.prototype.$setFont=function(t){this.$BitmapText;return this.$font==t?!1:(this.$font=t,this.$createChildrenCalled?this.$parseFont():this.$fontChanged=!0,this.$BitmapText[6]=!0,!0)},n.prototype.$parseFont=function(){var e=this;this.$fontChanged=!1;var i=this.$font;"string"==typeof i?t.getAssets(i,function(t){e.$setFontData(t)}):this.$setFontData(i)},n.prototype.$setFontData=function(t){return t==this.$BitmapText[5]?!1:(this.$BitmapText[5]=t,this.$invalidateContentBounds(),!0)},n.prototype.createChildren=function(){this.$fontChanged&&this.$parseFont(),this.$createChildrenCalled=!0},n.prototype.childrenCreated=function(){},n.prototype.commitProperties=function(){},n.prototype.measure=function(){var t=this.$UIComponent,e=this.$BitmapText,n=e[0],r=e[1],o=0/0;isNaN(this._widthConstraint)?isNaN(t[8])?1e5!=t[13]&&(o=t[13]):o=t[8]:(o=this._widthConstraint,this._widthConstraint=0/0),i.prototype.$setWidth.call(this,o);var s=0/0;isNaN(this._heightConstraint)?isNaN(t[9])?1e5!=t[15]&&(s=t[15]):s=t[9]:(s=this._heightConstraint,this._heightConstraint=0/0),i.prototype.$setHeight.call(this,s),this.setMeasuredSize(this.textWidth,this.textHeight),i.prototype.$setWidth.call(this,n),i.prototype.$setHeight.call(this,r)},n.prototype.updateDisplayList=function(t,e){i.prototype.$setWidth.call(this,t),i.prototype.$setHeight.call(this,e)},n.prototype.invalidateParentLayout=function(){},n.prototype.setMeasuredSize=function(t,e){},n.prototype.invalidateProperties=function(){},n.prototype.validateProperties=function(){},n.prototype.invalidateSize=function(){},n.prototype.validateSize=function(t){},n.prototype.invalidateDisplayList=function(){},n.prototype.validateDisplayList=function(){},n.prototype.validateNow=function(){},n.prototype.setLayoutBoundsSize=function(t,i){if(e.prototype.setLayoutBoundsSize.call(this,t,i),!isNaN(t)&&t!==this._widthConstraint&&0!=t){var n=this.$UIComponent;isNaN(n[9])&&t!=n[16]&&(this._widthConstraint=t,this._heightConstraint=i,this.invalidateSize())}},n.prototype.setLayoutBoundsPosition=function(t,e){},n.prototype.getLayoutBounds=function(t){},n.prototype.getPreferredBounds=function(t){},n}(egret.BitmapText);t.BitmapLabel=i,__reflect(i.prototype,"eui.BitmapLabel",["eui.UIComponent","egret.DisplayObject","eui.IDisplayText"]),t.sys.implementUIComponent(i,egret.BitmapText),t.registerBindable(i.prototype,"text")}(eui||(eui={}));var EXML;!function(t){function e(t){return h.parse(t)}function i(t,e,i,n){if(void 0===n&&(n=!1),n&&t in u)return void(e&&e.call(i,u[t],t));var r=l[t];return r?void r.push([e,i]):(l[t]=[[e,i]],void a(t,s))}function n(t,e,i,n){if(void 0===n&&(n=!1),!t||0==t.length)return void(e&&e.call(i,[],t));var o=[];t.forEach(function(s){var h=function(n,s){o[n]=s,o.push(n),o.length==t.length&&r(t,o,e,i)};return n&&s in u?void h(s,""):void a(s,h)})}function r(t,e,i,n){var r=[];t.forEach(function(t,i){if(t in u&&!e[t])return void(r[i]=u[t]);var n=e[t],o=s(t,n);r[i]=o}),i&&i.call(n,r,t)}function o(t,e,i){var n=null;if(e&&(n=h.$parseCode(e,i)),t){u[t]=n;var r=l[t];delete l[t];for(var o=r?r.length:0,s=0;o>s;s++){var a=r[s];a[0]&&a[1]&&a[0].call(a[1],n,t)}}return n}function s(t,i){var n=null;if(i)try{n=e(i)}catch(r){console.error(t+"\n"+r.message)}if(t){n&&(u[t]=n);var o=l[t];delete l[t];for(var s=o?o.length:0,a=0;s>a;a++){var h=o[a];h[0]&&h[1]&&h[0].call(h[1],n,t)}}return n}function a(t,e){var i=t;-1==t.indexOf("://")&&(i=p+t);var n=function(i){i||(i=""),e(t,i)};eui.getTheme(i,n)}var h=new eui.sys.EXMLParser,l={},u={},p="";Object.defineProperty(t,"prefixURL",{get:function(){return p},set:function(t){p=t},enumerable:!0,configurable:!0}),t.parse=e,t.load=i,t.$loadAll=n,t.$parseURLContentAsJs=o,t.$parseURLContent=s}(EXML||(EXML={}));var eui;!function(t){var e;!function(t){function e(t){return"[object Array]"===Object.prototype.toString.call(t)}function i(t){var e=egret.getDefinitionByName(t);return e?e.prototype:null}function n(t){if(!t)return null;var e;return e=new t}t.NS_S="http://ns.egret.com/eui",t.NS_W="http://ns.egret.com/wing";var r=["Point","Matrix","Rectangle"],o=["Array","boolean","string","number"],s="eui.",a=0,h={},l=function(){function l(){}return l.prototype.$describe=function(t){if(!t)return null;var i=Object.getPrototypeOf(t);if(!i)return null;var r;if(i.hasOwnProperty("__hashCode__")&&(r=h[i.__hashCode__]))return r;var s=Object.getPrototypeOf(i);if(!s)return null;var l=n(s.constructor),u=this.$describe(l);if(u){var p=function(){};p.prototype=u,r=new p}else r={};for(var c=Object.keys(i).concat(Object.keys(t)),d=c.length,f=t.__meta__,y=0;d>y;y++){var g=c[y];if("constructor"!=g&&"_"!=g.charAt(0)&&"$"!=g.charAt(0)){var v=void 0;if(f&&f[g])v=f[g];else if(e(t[g]))v="Array";else{if(v=typeof t[g],"function"==v)continue;-1==o.indexOf(v)&&(v="any")}r[g]=v}}return Object.getPrototypeOf(s)&&(i.__hashCode__=a++,h[i.__hashCode__]=r),r},l.prototype.getClassNameById=function(e,n){if(n==t.NS_S){if("Object"==e)return e;if(-1!=r.indexOf(e))return"egret."+e}var a="";return-1!=o.indexOf(e)?e:(n==t.NS_W||(a=n&&n!=t.NS_S?n.substring(0,n.length-1)+e:s+e),i(a)||(a=""),a)},l.prototype.getDefaultPropById=function(t,e){var n,r=this.getClassNameById(t,e),o=i(r);return o&&(n=o.__defaultProperty__),n?n:""},l.prototype.getPropertyType=function(t,e){if("Object"==e)return"any";var r="",o=i(e);if(o){if(!o.hasOwnProperty("__hashCode__")){var s=egret.getDefinitionByName(e),a=n(s);if(!a)return r;this.$describe(a)}var l=h[o.__hashCode__];l&&(r=l[t])}return r},l}();t.EXMLConfig=l,__reflect(l.prototype,"eui.sys.EXMLConfig")}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){egret.$locale_strings=egret.$locale_strings||{},egret.$locale_strings.en_US=egret.$locale_strings.en_US||{};var e=egret.$locale_strings.en_US;e[2001]="EXML parsing error {0}: EXML file can't be found ",e[2002]="EXML parsing error : invalid XML file:\n{0}",e[2003]="EXML parsing error {0}: the class definitions corresponding to nodes can't be found \n {1}",e[2004]="EXML parsing error {0}: nodes cannot contain id property with the same name \n {1}",e[2005]="EXML parsing error {0}: property with the name of '{1}' does not exist on the node, or the property does not have a default value: \n {2}",e[2006]="EXML parsing error {0}: undefined view state name: '{1}' \n {2}",e[2007]="EXML parsing error {0}: only UIComponent objects within the container can use the includeIn and excludeFrom properties\n {1}",e[2008]="EXML parsing error {0}: fail to assign values of '{1}' class to property: '{2}' \n {3}",e[2009]="EXML parsing error {0}: only one ID can be referenced in the node property value '{}' label; and complex expression is not allowed to use \n {1}",e[2010]="EXML parsing error {0}: ID referenced by property: '{1}': '{2}' does not exist \n {3}",e[2011]="EXML parsing error {0}: fail to assign more than one child nodes to the same property: '{1}' \n {2}",e[2012]="EXML parsing error {0}: no default property exists on the node; and you must explicitly declare the property name that the child node is assigned to \n {1}",e[2013]="EXML parsing error {0}: view state grammar is not allowed to use on property nodes of Array class \n {1} ",e[2014]="EXML parsing error {0}: assigning the skin class itself to the node property is not allowed \n {1}",e[2015]="EXML parsing error {0}: class definition referenced by node: {1} does not exist \n {2}",e[2016]="EXML parsing error {0}: format error of 'scale9Grid' property value on the node: {1}",e[2017]="EXML parsing error {0}: namespace prefix missing on the node: {1}",e[2018]="EXML parsing error {0}: format error of 'skinName' property value on the node: {1}",e[2019]="EXML parsing error {0}: the container’s child item must be visible nodes: {1}",e[2020]="EXML parsing error {0}: for child nodes in w: Declarations, the includeIn and excludeFrom properties are not allowed to use \n {1}",e[2021]="Compile errors in {0}, the attribute name: {1}, the attribute value: {2}.",e[2022]="EXML parsing error: there contains illegal characters in the id `{0}`",e[2101]="EXML parsing warnning : fail to register the class property : {0},there is already a class with the same name in the global,please try to rename the class name for the exml. \n {1}",e[2102]="EXML parsing warnning {0}: no child node can be found on the property code \n {1}",e[2103]="EXML parsing warnning {0}: the same property '{1}' on the node is assigned multiple times \n {2}",e[2104]="EXML parsing warnning, Instantiate class {0} error,the parameters of its constructor method must be empty.",e[2201]="BasicLayout doesn't support virtualization.",e[2202]="parse skinName error,the parsing result of skinName must be a instance of eui.Skin.",e[2203]="Could not find the skin class '{0}'。",e[2301]="parse source failed,could not find asset from URL:{0} ."}(eui||(eui={}));var eui;!function(t){egret.$locale_strings=egret.$locale_strings||{},egret.$locale_strings.zh_CN=egret.$locale_strings.zh_CN||{};var e=egret.$locale_strings.zh_CN;e[2001]="EXML解析错误 {0}: 找不到EXML文件",e[2002]="EXML解析错误: 不是有效的XML文件:\n{0}",e[2003]="EXML解析错误 {0}: 无法找到节点所对应的类定义\n{1}",e[2004]="EXML解析错误 {0}: 节点不能含有同名的id属性\n{1}",e[2005]="EXML解析错误 {0}: 节点上不存在名为'{1}'的属性,或者该属性没有初始值:\n{2}",e[2006]="EXML解析错误 {0}: 未定义的视图状态名称:'{1}'\n{2}",e[2007]="EXML解析错误 {0}: 只有处于容器内的 UIComponent 对象可以使用includeIn和excludeFrom属性\n{1}",e[2008]="EXML解析错误 {0}: 无法将'{1}'类型的值赋给属性:'{2}'\n{3}",e[2009]="EXML解析错误 {0}: 在节点属性值的‘{}’标签内只能引用一个ID,不允许使用复杂表达式\n{1}",e[2010]="EXML解析错误 {0}: 属性:'{1}'所引用的ID: '{2}'不存在\n{3}",e[2011]="EXML解析错误 {0}: 无法将多个子节点赋值给同一个属性:'{1}'\n{2}",e[2012]="EXML解析错误 {0}: 节点上不存在默认属性,必须显式声明子节点要赋值到的属性名\n{1}",e[2013]="EXML解析错误 {0}: 类型为Array的属性节点上不允许使用视图状态语法\n{1}",e[2014]="EXML解析错误 {0}: 不允许将皮肤类自身赋值给节点属性\n{1}",e[2015]="EXML解析错误 {0}: 节点引用的类定义:{1}不存在\n{2}",e[2016]="EXML解析错误 {0}: 节点上'scale9Grid'属性值的格式错误:{1}",e[2017]="EXML解析错误 {0}: 节点上缺少命名空间前缀:{1}",e[2018]="EXML解析错误 {0}: 节点上'skinName'属性值的格式错误:{1}",e[2019]="EXML解析错误 {0}: 容器的子项必须是可视节点:{1}",e[2020]="EXML解析错误 {0}: 在w:Declarations内的子节点,不允许使用includeIn和excludeFrom属性\n{1}",e[2021]="{0} 中存在编译错误,属性名 : {1},属性值 : {2}",e[2022]="EXML解析错误: id `{0}` 中含有非法字符",e[2101]="EXML解析警告: 在EXML根节点上声明的 class 属性: {0} 注册失败,所对应的类已经存在,请尝试重命名要注册的类名。\n{1}",e[2102]="EXML解析警告 {0}: 在属性节点上找不到任何子节点\n{1}",e[2103]="EXML解析警告 {0}: 节点上的同一个属性'{1}'被多次赋值\n{2}",e[2104]="EXML解析警告,无法直接实例化自定义组件:{0} ,在EXML中使用的自定义组件必须要能直接被实例化,否则可能导致后续EXML解析报错。",e[2201]="BasicLayout 不支持虚拟化。",e[2202]="皮肤解析出错,属性 skinName 的值必须要能够解析为一个 eui.Skin 的实例。",e[2203]="找不到指定的皮肤类 '{0}'。",e[2301]="素材解析失败,找不到URL:{0} 所对应的资源。"}(eui||(eui={}));var eui;!function(t){var e=function(e){function i(){return e.call(this)||this}return __extends(i,e),i.prototype.measure=function(){e.prototype.measure.call(this),t.sys.measure(this.$target)},i.prototype.updateDisplayList=function(i,n){e.prototype.updateDisplayList.call(this,i,n);var r=this.$target,o=t.sys.updateDisplayList(r,i,n);r.setContentSize(Math.ceil(o.x),Math.ceil(o.y))},i}(t.LayoutBase);t.BasicLayout=e,__reflect(e.prototype,"eui.BasicLayout")}(eui||(eui={})),function(t){var e;!function(t){function e(t,e){if(!t||"number"==typeof t)return t;var i=t,n=i.indexOf("%");if(-1==n)return+i;var r=+i.substring(0,n);return.01*r*e}function i(t){if(t){for(var e=0,i=0,n=egret.$TempRectangle,o=t.numChildren,s=0;o>s;s++){var a=t.getChildAt(s);if(egret.is(a,r)&&a.$includeInLayout){var h=a.$UIComponent,l=+h[4],u=+h[5],p=+h[0],c=+h[1],d=+h[2],f=+h[3],y=void 0,g=void 0;a.getPreferredBounds(n),isNaN(p)||isNaN(c)?isNaN(l)?isNaN(p)&&isNaN(c)?y=n.x:(y=isNaN(p)?0:p,y+=isNaN(c)?0:c):y=2*Math.abs(l):y=p+c,isNaN(d)||isNaN(f)?isNaN(u)?isNaN(d)&&isNaN(f)?g=n.y:(g=isNaN(d)?0:d,g+=isNaN(f)?0:f):g=2*Math.abs(u):g=d+f;var v=n.width,m=n.height;e=Math.ceil(Math.max(e,y+v)),i=Math.ceil(Math.max(i,g+m))}}t.setMeasuredSize(e,i)}}function n(t,i,n){if(t){for(var o=t.numChildren,s=0,a=0,h=egret.$TempRectangle,l=0;o>l;l++){var u=t.getChildAt(l);if(egret.is(u,r)&&u.$includeInLayout){var p=u.$UIComponent,c=e(p[4],.5*i),d=e(p[5],.5*n),f=e(p[0],i),y=e(p[1],i),g=e(p[2],n),v=e(p[3],n),m=p[6],$=p[7],E=0/0,C=0/0;isNaN(f)||isNaN(y)?isNaN(m)||(E=Math.round(i*Math.min(.01*m,1))):E=i-y-f,isNaN(g)||isNaN(v)?isNaN($)||(C=Math.round(n*Math.min(.01*$,1))):C=n-v-g,u.setLayoutBoundsSize(E,C),u.getLayoutBounds(h);var _=h.width,b=h.height,S=0/0,T=0/0;S=isNaN(c)?isNaN(f)?isNaN(y)?h.x:i-_-y:f:Math.round((i-_)/2+c),T=isNaN(d)?isNaN(g)?isNaN(v)?h.y:n-b-v:g:Math.round((n-b)/2+d),u.setLayoutBoundsPosition(S,T),s=Math.max(s,S+_),a=Math.max(a,T+b)}}return egret.$TempPoint.setTo(s,a)}}var r="eui.UIComponent";t.measure=i,t.updateDisplayList=n}(e=t.sys||(t.sys={}))}(eui||(eui={}));var eui;!function(t){var e=function(){function t(){}return t.LEFT="left",t.JUSTIFY_USING_GAP="justifyUsingGap",t.JUSTIFY_USING_WIDTH="justifyUsingWidth",t}();t.ColumnAlign=e,__reflect(e.prototype,"eui.ColumnAlign")}(eui||(eui={}));var eui;!function(t){var e="eui.UIComponent",i=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return __extends(n,i),n.prototype.measureReal=function(){for(var t=this.$target,i=t.numElements,n=i,r=0,o=0,s=egret.$TempRectangle,a=0;i>a;a++){var h=t.getElementAt(a);egret.is(h,e)&&h.$includeInLayout?(h.getPreferredBounds(s),r+=s.width,o=Math.max(o,s.height)):n--}r+=(n-1)*this.$gap;var l=this.$paddingLeft+this.$paddingRight,u=this.$paddingTop+this.$paddingBottom;t.setMeasuredSize(r+l,o+u)},n.prototype.measureVirtual=function(){for(var t=this.$target,i=this.$typicalWidth,n=this.getElementTotalSize(),r=Math.max(this.maxElementSize,this.$typicalHeight),o=egret.$TempRectangle,s=this.endIndex,a=this.elementSizeTable,h=this.startIndex;s>h;h++){var l=t.getElementAt(h);egret.is(l,e)&&l.$includeInLayout&&(l.getPreferredBounds(o),n+=o.width,n-=isNaN(a[h])?i:a[h],r=Math.max(r,o.height))}var u=this.$paddingLeft+this.$paddingRight,p=this.$paddingTop+this.$paddingBottom;t.setMeasuredSize(n+u,r+p)},n.prototype.updateDisplayListReal=function(i,n){var r=this.$target,o=this.$paddingLeft,s=this.$paddingRight,a=this.$paddingTop,h=this.$paddingBottom,l=this.$gap,u=Math.max(0,i-o-s),p=Math.max(0,n-a-h),c=this.$horizontalAlign==t.JustifyAlign.JUSTIFY,d=this.$verticalAlign==t.JustifyAlign.JUSTIFY||this.$verticalAlign==t.JustifyAlign.CONTENT_JUSTIFY,f=0;d||(this.$verticalAlign==egret.VerticalAlign.MIDDLE?f=.5:this.$verticalAlign==egret.VerticalAlign.BOTTOM&&(f=1));var y,g,v,m=r.numElements,$=m,E=o,C=a,_=0,b=0,S=[],T=u,x=this.maxElementSize,I=egret.$TempRectangle;for(y=0;m>y;y++){var P=r.getElementAt(y);if(egret.is(P,e)&&P.$includeInLayout)if(P.getPreferredBounds(I),x=Math.max(x,I.height),c)_+=I.width;else{var L=P.$UIComponent;isNaN(L[6])?T-=I.width:(b+=L[6],v=new t.sys.ChildInfo,v.layoutElement=P,v.percent=L[6],v.min=L[12],v.max=L[13],S.push(v))}else $--}T-=l*($-1),T=T>0?T:0;var N,O=u-_-l*($-1),B=$,A={};if(c){if(0>O){for(N=T/$,y=0;m>y;y++)g=r.getElementAt(y),egret.is(g,e)&&g.$includeInLayout&&(g.getPreferredBounds(I),I.width<=N&&(T-=I.width,B--));T=T>0?T:0}}else if(b>0){this.flexChildrenProportionally(u,T,b,S);var D=0,R=S.length;for(y=0;R>y;y++){v=S[y];var M=Math.round(v.size+D);D+=v.size-M,A[v.layoutElement.$hashCode]=M,T-=M}T=T>0?T:0}this.$horizontalAlign==egret.HorizontalAlign.CENTER?E=o+.5*T:this.$horizontalAlign==egret.HorizontalAlign.RIGHT&&(E=o+T);var w=o,V=a,H=0,z=0,U=Math.ceil(p);this.$verticalAlign==t.JustifyAlign.CONTENT_JUSTIFY&&(U=Math.ceil(Math.max(p,x)));var k,F,G=0;for(y=0;m>y;y++){var j=0;if(g=r.getElementAt(y),egret.is(g,e)&&g.$includeInLayout){if(g.getPreferredBounds(I),k=0/0,c?(F=0/0,O>0?F=T*I.width/_:0>O&&I.width>N&&(F=T/B),isNaN(F)||(k=Math.round(F+G),G+=F-k)):k=A[g.$hashCode],d)C=a,g.setLayoutBoundsSize(k,U),g.getLayoutBounds(I);else{var W=0/0,L=g.$UIComponent;if(!isNaN(g.percentHeight)){var X=Math.min(100,L[7]);W=Math.round(p*X*.01)}g.setLayoutBoundsSize(k,W),g.getLayoutBounds(I),j=(p-I.height)*f,j=j>0?j:0,C=a+j}g.setLayoutBoundsPosition(Math.round(E),Math.round(C)),H=Math.ceil(I.width),z=Math.ceil(I.height),w=Math.max(w,E+H),V=Math.max(V,C+z),E+=H+l}}this.maxElementSize=x,r.setContentSize(w+s,V+h)},n.prototype.updateDisplayListVirtual=function(i,n){var r=this.$target;this.indexInViewCalculated?this.indexInViewCalculated=!1:this.getIndexInView();var o,s=this.$paddingRight,a=this.$paddingTop,h=this.$paddingBottom,l=this.$gap,u=r.numElements;if(-1==this.startIndex||-1==this.endIndex)return o=this.getStartPosition(u)-l+s,void r.setContentSize(o,r.contentHeight);var p=this.endIndex;r.setVirtualElementIndicesInView(this.startIndex,p);var c=this.$verticalAlign==t.JustifyAlign.JUSTIFY||this.$verticalAlign==t.JustifyAlign.CONTENT_JUSTIFY,d=this.$verticalAlign==t.JustifyAlign.CONTENT_JUSTIFY,f=0;c||(this.$verticalAlign==egret.VerticalAlign.MIDDLE?f=.5:this.$verticalAlign==egret.VerticalAlign.BOTTOM&&(f=1));var y,g=egret.$TempRectangle,v=Math.max(0,n-a-h),m=Math.ceil(v),$=this.$typicalHeight,E=this.$typicalWidth,C=this.maxElementSize,_=Math.max($,this.maxElementSize);if(d){for(var b=this.startIndex;p>=b;b++)y=r.getVirtualElementAt(b),egret.is(y,e)&&y.$includeInLayout&&(y.getPreferredBounds(g),C=Math.max(C,g.height));m=Math.ceil(Math.max(v,C))}for(var S,T=0,x=0,I=0,P=!1,L=this.elementSizeTable,N=this.startIndex;p>=N;N++){var O=0;y=r.getVirtualElementAt(N),egret.is(y,e)&&y.$includeInLayout&&(y.getPreferredBounds(g),d||(C=Math.max(C,g.height)),c?(x=a,y.setLayoutBoundsSize(0/0,m),y.getLayoutBounds(g)):(y.getLayoutBounds(g),O=(v-g.height)*f,O=O>0?O:0,x=a+O),I=Math.max(I,g.height),P||(S=isNaN(L[N])?E:L[N],S!=g.width&&(P=!0)),L[N]=g.width,T=this.getStartPosition(N),y.setLayoutBoundsPosition(Math.round(T),Math.round(x)))}I+=a+h,o=this.getStartPosition(u)-l+s,this.maxElementSize=C,r.setContentSize(o,I),(P||_s;s++){var a=o[s];isNaN(a)&&(a=i),n+=a+r}return n},n.prototype.getElementSize=function(t){if(this.$useVirtualLayout){var e=this.elementSizeTable[t];return isNaN(e)&&(e=this.$typicalWidth),e}return this.$target?this.$target.getElementAt(t).width:0},n.prototype.getElementTotalSize=function(){for(var t=this.$typicalWidth,e=this.$gap,i=0,n=this.$target.numElements,r=this.elementSizeTable,o=0;n>o;o++){var s=r[o];isNaN(s)&&(s=t),i+=s+e}return i-=e},n.prototype.elementAdded=function(t){this.useVirtualLayout&&(i.prototype.elementAdded.call(this,t),this.elementSizeTable.splice(t,0,this.$typicalWidth))},n.prototype.getIndexInView=function(){var t=this.$target;if(!t||0==t.numElements)return this.startIndex=this.endIndex=-1,!1;var e=t.$UIComponent;if(e[10]<=0||e[11]<=0)return this.startIndex=this.endIndex=-1,!1;var i=t.numElements,n=this.getStartPosition(i-1)+this.elementSizeTable[i-1]+this.$paddingRight,r=t.scrollH;if(r>n-this.$paddingRight)return this.startIndex=-1,this.endIndex=-1,!1;var o=t.scrollH+e[10];if(o0?this._requestedColumnCount:this._columnCount,l=this._requestedRowCount>0?this._requestedRowCount:this._rowCount,u=isNaN(this._horizontalGap)?0:this._horizontalGap,p=isNaN(this._verticalGap)?0:this._verticalGap;h>0&&(o=h*(this._columnWidth+u)-u),l>0&&(s=l*(this._rowHeight+p)-p);var c=this._paddingLeft+this._paddingRight,d=this._paddingTop+this._paddingBottom;t.setMeasuredSize(o+c,s+d),this._columnCount=e,this._rowCount=i,this._columnWidth=n,this._rowHeight=r}},n.prototype.calculateRowAndColumn=function(i,n){var r=this.$target,o=isNaN(this._horizontalGap)?0:this._horizontalGap,s=isNaN(this._verticalGap)?0:this._verticalGap;this._rowCount=this._columnCount=-1;for(var a=r.numElements,h=a,l=0;h>l;l++){var u=r.getElementAt(l);!u||egret.is(u,e)&&u.$includeInLayout||a--}if(0==a)return void(this._rowCount=this._columnCount=0);(isNaN(this.explicitColumnWidth)||isNaN(this.explicitRowHeight))&&this.updateMaxElementSize(),isNaN(this.explicitColumnWidth)?this._columnWidth=this.maxElementWidth:this._columnWidth=this.explicitColumnWidth,isNaN(this.explicitRowHeight)?this._rowHeight=this.maxElementHeight:this._rowHeight=this.explicitRowHeight;var p=this._columnWidth+o;0>=p&&(p=1);var c=this._rowHeight+s;0>=c&&(c=1);var d=this._orientation==t.TileOrientation.COLUMNS,f=!isNaN(i),y=!isNaN(n),g=this._paddingLeft,v=this._paddingRight,m=this._paddingTop,$=this._paddingBottom;if(this._requestedColumnCount>0||this._requestedRowCount>0)this._requestedRowCount>0&&(this._rowCount=Math.min(this._requestedRowCount,a)),this._requestedColumnCount>0&&(this._columnCount=Math.min(this._requestedColumnCount,a));else if(f||y)if(!f||y&&d){var E=Math.max(0,n-m-$);this._rowCount=Math.floor((E+s)/c),this._rowCount=Math.max(1,Math.min(this._rowCount,a))}else{var C=Math.max(0,i-g-v);this._columnCount=Math.floor((C+o)/p),this._columnCount=Math.max(1,Math.min(this._columnCount,a))}else{var _=Math.sqrt(a*p*c);d?this._rowCount=Math.max(1,Math.round(_/c)):this._columnCount=Math.max(1,Math.round(_/p))}-1==this._rowCount&&(this._rowCount=Math.max(1,Math.ceil(a/this._columnCount))),-1==this._columnCount&&(this._columnCount=Math.max(1,Math.ceil(a/this._rowCount))),this._requestedColumnCount>0&&this._requestedRowCount>0&&(this._orientation==t.TileOrientation.ROWS?this._rowCount=Math.max(1,Math.ceil(a/this._requestedColumnCount)):this._columnCount=Math.max(1,Math.ceil(a/this._requestedRowCount)))},n.prototype.updateMaxElementSize=function(){this.$target&&(this.$useVirtualLayout?(this.maxElementWidth=Math.max(this.maxElementWidth,this.$typicalWidth),this.maxElementHeight=Math.max(this.maxElementHeight,this.$typicalHeight),this.doUpdateMaxElementSize(this.startIndex,this.endIndex)):this.doUpdateMaxElementSize(0,this.$target.numElements-1))},n.prototype.doUpdateMaxElementSize=function(t,i){var n=this.maxElementWidth,r=this.maxElementHeight,o=egret.$TempRectangle,s=this.$target;if(-1!=t&&-1!=i)for(var a=t;i>=a;a++){var h=s.getVirtualElementAt(a);egret.is(h,e)&&h.$includeInLayout&&(h.getPreferredBounds(o),n=Math.max(n,o.width),r=Math.max(r,o.height))}this.maxElementWidth=n,this.maxElementHeight=r},n.prototype.clearVirtualLayoutCache=function(){i.prototype.clearVirtualLayoutCache.call(this),this.maxElementWidth=0,this.maxElementHeight=0},n.prototype.scrollPositionChanged=function(){if(this.$useVirtualLayout){var t=this.getIndexInView();t&&(this.indexInViewCalculated=!0,this.$target.invalidateDisplayList())}},n.prototype.getIndexInView=function(){if(!this.$target||0==this.$target.numElements)return this.startIndex=this.endIndex=-1,!1;var e=this.$target,i=e.numElements;if(!this.$useVirtualLayout)return this.startIndex=0,this.endIndex=i-1,!1;var n=e.$UIComponent;if(0==n[10]||0==n[11])return this.startIndex=this.endIndex=-1,!1;var r=this.startIndex,o=this.endIndex,s=this._paddingLeft,a=this._paddingTop,h=isNaN(this._horizontalGap)?0:this._horizontalGap,l=isNaN(this._verticalGap)?0:this._verticalGap;if(this._orientation==t.TileOrientation.COLUMNS){var u=this._columnWidth+h;if(0>=u)return this.startIndex=0,this.endIndex=i-1,!1;var p=e.scrollH,c=p+n[10],d=Math.floor((p-s)/u);0>d&&(d=0);var f=Math.ceil((c-s)/u);0>f&&(f=0),this.startIndex=Math.min(i-1,Math.max(0,d*this._rowCount)),this.endIndex=Math.min(i-1,Math.max(0,f*this._rowCount-1))}else{var y=this._rowHeight+l;if(0>=y)return this.startIndex=0,this.endIndex=i-1,!1;var g=e.scrollV,v=g+n[11],m=Math.floor((g-a)/y);0>m&&(m=0);var $=Math.ceil((v-a)/y);0>$&&($=0),this.startIndex=Math.min(i-1,Math.max(0,m*this._columnCount)),this.endIndex=Math.min(i-1,Math.max(0,$*this._columnCount-1))}return this.startIndex!=r||this.endIndex!=o},n.prototype.updateDisplayList=function(n,r){if(i.prototype.updateDisplayList.call(this,n,r),this.$target){var o=this.$target,s=this._paddingLeft,a=this._paddingRight,h=this._paddingTop,l=this._paddingBottom;if(this.indexInViewCalculated)this.indexInViewCalculated=!1;else{if(this.calculateRowAndColumn(n,r),0==this._rowCount||0==this._columnCount)return void o.setContentSize(s+a,h+l);this.adjustForJustify(n,r),this.getIndexInView()}if(this.$useVirtualLayout&&(this.calculateRowAndColumn(n,r),this.adjustForJustify(n,r)),-1==this.startIndex||-1==this.endIndex)return void o.setContentSize(0,0);var u=this.endIndex;o.setVirtualElementIndicesInView(this.startIndex,u);for(var p,c,d,f,y,g=this._orientation==t.TileOrientation.COLUMNS,v=this.startIndex,m=isNaN(this._horizontalGap)?0:this._horizontalGap,$=isNaN(this._verticalGap)?0:this._verticalGap,E=this._rowCount,C=this._columnCount,_=this._columnWidth,b=this._rowHeight,S=this.startIndex;u>=S;S++)if(p=this.$useVirtualLayout?this.target.getVirtualElementAt(S):this.target.getElementAt(S),egret.is(p,e)&&p.$includeInLayout){switch(g?(f=Math.ceil((v+1)/E)-1,y=Math.ceil((v+1)%E)-1,-1==y&&(y=E-1)):(f=Math.ceil((v+1)%C)-1,-1==f&&(f=C-1),y=Math.ceil((v+1)/C)-1),this._horizontalAlign){case egret.HorizontalAlign.RIGHT:c=n-(f+1)*(_+m)+m-a; break;case egret.HorizontalAlign.LEFT:c=f*(_+m)+s;break;default:c=f*(_+m)+s}switch(this._verticalAlign){case egret.VerticalAlign.TOP:d=y*(b+$)+h;break;case egret.VerticalAlign.BOTTOM:d=r-(y+1)*(b+$)+$-l;break;default:d=y*(b+$)+h}this.sizeAndPositionElement(p,c,d,_,b),v++}var T=s+a,x=h+l,I=(_+m)*C-m,P=(b+$)*E-$;o.setContentSize(I+T,P+x)}},n.prototype.sizeAndPositionElement=function(e,i,n,r,o){var s=0/0,a=0/0,h=e.$UIComponent;this._horizontalAlign==t.JustifyAlign.JUSTIFY?s=r:isNaN(h[6])||(s=r*h[6]*.01),this._verticalAlign==t.JustifyAlign.JUSTIFY?a=o:isNaN(h[7])||(a=o*h[7]*.01),e.setLayoutBoundsSize(Math.round(s),Math.round(a));var l=i,u=egret.$TempRectangle;switch(e.getLayoutBounds(u),this._horizontalAlign){case egret.HorizontalAlign.RIGHT:l+=r-u.width;break;case egret.HorizontalAlign.CENTER:l=i+(r-u.width)/2}var p=n;switch(this._verticalAlign){case egret.VerticalAlign.BOTTOM:p+=o-u.height;break;case egret.VerticalAlign.MIDDLE:p+=(o-u.height)/2}e.setLayoutBoundsPosition(Math.round(l),Math.round(p))},n.prototype.adjustForJustify=function(e,i){var n=this._paddingLeft,r=this._paddingRight,o=this._paddingTop,s=this._paddingBottom,a=Math.max(0,e-n-r),h=Math.max(0,i-o-s);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;var l,u=h-this._rowHeight*this._rowCount,p=a-this._columnWidth*this._columnCount;u>0&&(this._rowAlign==t.RowAlign.JUSTIFY_USING_GAP?(l=Math.max(1,this._rowCount-1),this._verticalGap=u/l):this._rowAlign==t.RowAlign.JUSTIFY_USING_HEIGHT&&this._rowCount>0&&(this._rowHeight+=(u-(this._rowCount-1)*this._verticalGap)/this._rowCount)),p>0&&(this._columnAlign==t.ColumnAlign.JUSTIFY_USING_GAP?(l=Math.max(1,this._columnCount-1),this._horizontalGap=p/l):this._columnAlign==t.ColumnAlign.JUSTIFY_USING_WIDTH&&this._columnCount>0&&(this._columnWidth+=(p-(this._columnCount-1)*this._horizontalGap)/this._columnCount))},n}(t.LayoutBase);t.TileLayout=i,__reflect(i.prototype,"eui.TileLayout")}(eui||(eui={}));var eui;!function(t){var e=function(){function t(){}return t.ROWS="rows",t.COLUMNS="columns",t}();t.TileOrientation=e,__reflect(e.prototype,"eui.TileOrientation")}(eui||(eui={}));var eui;!function(t){var e="eui.UIComponent",i=function(i){function n(){return null!==i&&i.apply(this,arguments)||this}return __extends(n,i),n.prototype.measureReal=function(){for(var t=this.$target,i=t.numElements,n=i,r=0,o=0,s=egret.$TempRectangle,a=0;i>a;a++){var h=t.getElementAt(a);egret.is(h,e)&&h.$includeInLayout?(h.getPreferredBounds(s),o+=s.height,r=Math.max(r,s.width)):n--}o+=(n-1)*this.$gap;var l=this.$paddingLeft+this.$paddingRight,u=this.$paddingTop+this.$paddingBottom;t.setMeasuredSize(r+l,o+u)},n.prototype.measureVirtual=function(){for(var t=this.$target,i=this.$typicalHeight,n=this.getElementTotalSize(),r=Math.max(this.maxElementSize,this.$typicalWidth),o=egret.$TempRectangle,s=this.endIndex,a=this.elementSizeTable,h=this.startIndex;s>h;h++){var l=t.getElementAt(h);egret.is(l,e)&&l.$includeInLayout&&(l.getPreferredBounds(o),n+=o.height,n-=isNaN(a[h])?i:a[h],r=Math.max(r,o.width))}var u=this.$paddingLeft+this.$paddingRight,p=this.$paddingTop+this.$paddingBottom;t.setMeasuredSize(r+u,n+p)},n.prototype.updateDisplayListReal=function(i,n){var r=this.$target,o=this.$paddingLeft,s=this.$paddingRight,a=this.$paddingTop,h=this.$paddingBottom,l=this.$gap,u=Math.max(0,i-o-s),p=Math.max(0,n-a-h),c=this.$verticalAlign==t.JustifyAlign.JUSTIFY,d=this.$horizontalAlign==t.JustifyAlign.JUSTIFY||this.$horizontalAlign==t.JustifyAlign.CONTENT_JUSTIFY,f=0;d||(this.$horizontalAlign==egret.HorizontalAlign.CENTER?f=.5:this.$horizontalAlign==egret.HorizontalAlign.RIGHT&&(f=1));var y,g,v,m=r.numElements,$=m,E=o,C=a,_=0,b=0,S=[],T=p,x=this.maxElementSize,I=egret.$TempRectangle;for(y=0;m>y;y++){var P=r.getElementAt(y);if(egret.is(P,e)&&P.$includeInLayout)if(P.getPreferredBounds(I),x=Math.max(x,I.width),c)_+=I.height;else{var L=P.$UIComponent;isNaN(L[7])?T-=I.height:(b+=L[7],v=new t.sys.ChildInfo,v.layoutElement=P,v.percent=L[7],v.min=L[14],v.max=L[15],S.push(v))}else $--}T-=l*($-1),T=T>0?T:0;var N,O=p-_-l*($-1),B=$,A={};if(c){if(0>O){for(N=T/$,y=0;m>y;y++)g=r.getElementAt(y),egret.is(g,e)&&g.$includeInLayout&&(g.getPreferredBounds(I),I.height<=N&&(T-=I.height,B--));T=T>0?T:0}}else if(b>0){this.flexChildrenProportionally(p,T,b,S);var D=0,R=S.length;for(y=0;R>y;y++){v=S[y];var M=Math.round(v.size+D);D+=v.size-M,A[v.layoutElement.$hashCode]=M,T-=M}T=T>0?T:0}this.$verticalAlign==egret.VerticalAlign.MIDDLE?C=a+.5*T:this.$verticalAlign==egret.VerticalAlign.BOTTOM&&(C=a+T);var w=o,V=a,H=0,z=0,U=Math.ceil(u);this.$horizontalAlign==t.JustifyAlign.CONTENT_JUSTIFY&&(U=Math.ceil(Math.max(u,x)));var k,F,G=0;for(y=0;m>y;y++){var j=0;if(g=r.getElementAt(y),egret.is(g,e)&&g.$includeInLayout){if(g.getPreferredBounds(I),k=0/0,c?(F=0/0,O>0?F=T*I.height/_:0>O&&I.height>N&&(F=T/B),isNaN(F)||(k=Math.round(F+G),G+=F-k)):k=A[g.$hashCode],d)E=o,g.setLayoutBoundsSize(U,k),g.getLayoutBounds(I);else{var W=0/0,L=g.$UIComponent;if(!isNaN(L[6])){var X=Math.min(100,L[6]);W=Math.round(u*X*.01)}g.setLayoutBoundsSize(W,k),g.getLayoutBounds(I),j=(u-I.width)*f,j=j>0?j:0,E=o+j}g.setLayoutBoundsPosition(Math.round(E),Math.round(C)),H=Math.ceil(I.width),z=Math.ceil(I.height),w=Math.max(w,E+H),V=Math.max(V,C+z),C+=z+l}}this.maxElementSize=x,r.setContentSize(w+s,V+h)},n.prototype.updateDisplayListVirtual=function(i,n){var r=this.$target;this.indexInViewCalculated?this.indexInViewCalculated=!1:this.getIndexInView();var o,s=this.$paddingBottom,a=this.$paddingLeft,h=this.$paddingRight,l=this.$gap,u=r.numElements;if(-1==this.startIndex||-1==this.endIndex)return o=this.getStartPosition(u)-l+s,void r.setContentSize(r.contentWidth,o);var p=this.endIndex;r.setVirtualElementIndicesInView(this.startIndex,p);var c=this.$horizontalAlign==t.JustifyAlign.JUSTIFY||this.$horizontalAlign==t.JustifyAlign.CONTENT_JUSTIFY,d=this.$horizontalAlign==t.JustifyAlign.CONTENT_JUSTIFY,f=0;c||(this.$horizontalAlign==egret.HorizontalAlign.CENTER?f=.5:this.$horizontalAlign==egret.HorizontalAlign.RIGHT&&(f=1));var y,g=egret.$TempRectangle,v=Math.max(0,i-a-h),m=Math.ceil(v),$=this.$typicalHeight,E=this.$typicalWidth,C=this.maxElementSize,_=Math.max(E,this.maxElementSize);if(d){for(var b=this.startIndex;p>=b;b++)y=r.getVirtualElementAt(b),egret.is(y,e)&&y.$includeInLayout&&(y.getPreferredBounds(g),C=Math.max(C,g.width));m=Math.ceil(Math.max(v,C))}for(var S,T=0,x=0,I=0,P=!1,L=this.elementSizeTable,N=this.startIndex;p>=N;N++){var O=0;y=r.getVirtualElementAt(N),egret.is(y,e)&&y.$includeInLayout&&(y.getPreferredBounds(g),d||(C=Math.max(C,g.width)),c?(T=a,y.setLayoutBoundsSize(m,0/0),y.getLayoutBounds(g)):(y.getLayoutBounds(g),O=(v-g.width)*f,O=O>0?O:0,T=a+O),I=Math.max(I,g.width),P||(S=isNaN(L[N])?$:L[N],S!=g.height&&(P=!0)),L[N]=g.height,x=this.getStartPosition(N),y.setLayoutBoundsPosition(Math.round(T),Math.round(x)))}I+=a+h,o=this.getStartPosition(u)-l+s,this.maxElementSize=C,r.setContentSize(I,o),(P||_s;s++){var a=o[s];isNaN(a)&&(a=i),n+=a+r}return n},n.prototype.getElementSize=function(t){if(this.$useVirtualLayout){var e=this.elementSizeTable[t];return isNaN(e)&&(e=this.$typicalHeight),e}return this.$target?this.$target.getElementAt(t).height:0},n.prototype.getElementTotalSize=function(){for(var t=this.$typicalHeight,e=this.$gap,i=0,n=this.$target.numElements,r=this.elementSizeTable,o=0;n>o;o++){var s=r[o];isNaN(s)&&(s=t),i+=s+e}return i-=e},n.prototype.elementAdded=function(t){this.$useVirtualLayout&&(i.prototype.elementAdded.call(this,t),this.elementSizeTable.splice(t,0,this.$typicalHeight))},n.prototype.getIndexInView=function(){var t=this.$target;if(!t||0==t.numElements)return this.startIndex=this.endIndex=-1,!1;var e=t.$UIComponent;if(0==e[10]||0==e[11])return this.startIndex=this.endIndex=-1,!1;var i=t.numElements,n=this.getStartPosition(i-1)+this.elementSizeTable[i-1]+this.$paddingBottom,r=t.scrollV;if(r>n-this.$paddingBottom)return this.startIndex=-1,this.endIndex=-1,!1;var o=t.scrollV+e[11];if(o=h){var p=s*(1- -h/(.5*u));p=Math.max(5,Math.round(p)),n.setLayoutBoundsSize(p,0/0),n.setLayoutBoundsPosition(0,a)}else if(h>=l-u){var p=s*(1-(h-l+u)/(.5*u));p=Math.max(5,Math.round(p)),n.setLayoutBoundsSize(p,0/0),n.setLayoutBoundsPosition(e-p,a)}else{var c=(e-s)*h/(l-u);n.setLayoutBoundsSize(0/0,0/0),n.setLayoutBoundsPosition(c,a)}}},e.prototype.onPropertyChanged=function(t){switch(t.property){case"scrollH":case"contentWidth":this.invalidateDisplayList()}},e}(t.ScrollBarBase);t.HScrollBar=e,__reflect(e.prototype,"eui.HScrollBar")}(eui||(eui={}));var eui;!function(t){var e=function(){function t(t,e,i,n){this.target=t,this.propertyName=e,this.position=i,this.relativeTo=n}return t.prototype.apply=function(t,e){var i,n=t[this.relativeTo],r=t[this.target],o=this.propertyName?t[this.propertyName]:e;if(r&&o){switch(this.position){case 0:i=0;break;case 1:i=-1;break;case 2:i=o.getChildIndex(n);break;case 3:i=o.getChildIndex(n)+1}-1==i&&(i=o.numChildren),egret.is(o,"eui.Component")&&o.$Component[8].$elementsContent.push(r),o.addChildAt(r,i)}},t.prototype.remove=function(t,e){var i=this.propertyName?t[this.propertyName]:e,n=t[this.target];if(n&&i&&(n.$parent===i&&i.removeChild(n),egret.is(i,"eui.Component"))){var r=i.$Component[8].$elementsContent,o=r.indexOf(n);o>-1&&r.splice(o,1)}},t}();t.AddItems=e,__reflect(e.prototype,"eui.AddItems",["eui.IOverride"])}(eui||(eui={}));var eui;!function(t){var e=function(){function t(t,e,i){this.target=t,this.name=e,this.value=i}return t.prototype.apply=function(t,e){var i=this.target?t[this.target]:t;i&&(this.oldValue=i[this.name],this.setPropertyValue(i,this.name,this.value,this.oldValue))},t.prototype.remove=function(t,e){var i=this.target?t[this.target]:t;i&&(this.setPropertyValue(i,this.name,this.oldValue,this.oldValue),this.oldValue=null)},t.prototype.setPropertyValue=function(t,e,i,n){void 0===i||null===i?t[e]=i:"number"==typeof n?t[e]=+i:"boolean"==typeof n?t[e]=this.toBoolean(i):t[e]=i},t.prototype.toBoolean=function(t){return"string"==typeof t?"true"==t.toLowerCase():0!=t},t}();t.SetProperty=e,__reflect(e.prototype,"eui.SetProperty",["eui.IOverride"])}(eui||(eui={}));var eui;!function(t){var e=function(){function e(t,e,i,n,r){this.host=t,this.templates=e,this.chainIndex=i,this.target=n,this.prop=r}return e.prototype.apply=function(e,i){if(this.target){var n=this.target[this.prop];this.oldValue&&this.setPropertyValue(this.target,this.prop,this.oldValue,this.oldValue),n&&(this.oldValue=n),t.Binding.$bindProperties(this.host,this.templates.concat(),this.chainIndex.concat(),this.target,this.prop)}},e.prototype.remove=function(t,e){if(this.target){var i=this.oldValue;this.target[this.prop]&&(this.oldValue=this.target[this.prop]),i&&this.setPropertyValue(this.target,this.prop,i,i)}},e.prototype.setPropertyValue=function(t,e,i,n){void 0===i||null===i?t[e]=i:"number"==typeof n?t[e]=+i:"boolean"==typeof n?t[e]=this.toBoolean(i):t[e]=i},e.prototype.toBoolean=function(t){return"string"==typeof t?"true"==t.toLowerCase():0!=t},e}();t.SetStateProperty=e,__reflect(e.prototype,"eui.SetStateProperty",["eui.IOverride"])}(eui||(eui={}));var eui;!function(t){var e;!function(t){function e(t,e,i,n,o,s,a,h,l,u){var p;if(!isNaN(i)&&isNaN(n)){if(p=r(t,e,i,s,i,h,i,u))return p}else if(isNaN(i)&&!isNaN(n)&&(p=r(t,e,o,n,a,n,l,n)))return p;return p=r(t,e,o,s,a,h,l,u)}function i(t,e,i,r,o,s,a,h,l,u){var p;if(!isNaN(i)&&isNaN(r)){if(p=n(t,e,i,s,i,h,i,u))return p}else if(isNaN(i)&&!isNaN(r)&&(p=n(t,e,o,r,a,r,l,r)))return p;return p=n(t,e,o,s,a,h,l,u)}function n(t,e,i,n,r,s,h,l){var u=e.b,p=e.d;if(u>-1e-9&&1e-9>u&&(u=0),p>-1e-9&&1e-9>p&&(p=0),0==u&&0==p)return null;if(0==u&&0==p)return null;if(0==u)return egret.Point.create(i,t/Math.abs(p));if(0==p)return egret.Point.create(t/Math.abs(u),n);var c,d,f,y=u*p>=0?p:-p;if(0!=y&&i>0){var g=1/y;i=Math.max(r,Math.min(h,i)),d=i,f=(t-u*d)*g,f>=s&&l>=f&&u*d+y*f>=0&&(c=egret.Point.create(d,f)),f=(-t-u*d)*g,f>=s&&l>=f&&0>u*d+y*f&&(!c||a(c.x,c.y,e).width>a(d,f,e).width)&&(egret.Point.release(c),c=egret.Point.create(d,f))}if(0!=u&&n>0){var v=1/u;n=Math.max(s,Math.min(l,n)),f=n,d=(t-y*f)*v,d>=r&&h>=d&&u*d+y*f>=0&&(!c||a(c.x,c.y,e).width>a(d,f,e).width)&&(c=egret.Point.create(d,f)),d=(-t-y*f)*v,d>=r&&h>=d&&0>u*d+y*f&&(!c||a(c.x,c.y,e).width>a(d,f,e).width)&&(egret.Point.release(c),c=egret.Point.create(d,f))}if(c)return c;var m=e.a,$=e.c,E=m*$>=0?$:-$;return o(u,y,t,r,s,h,l,m,E)}function r(t,e,i,n,r,s,h,l){var u=e.a,p=e.c;if(u>-1e-9&&1e-9>u&&(u=0),p>-1e-9&&1e-9>p&&(p=0),0==u&&0==p)return null;if(0==u)return egret.Point.create(i,t/Math.abs(p));if(0==p)return egret.Point.create(t/Math.abs(u),n);var c,d,f,y=u*p>=0?p:-p;if(0!=y&&i>0){var g=1/y;i=Math.max(r,Math.min(h,i)),d=i,f=(t-u*d)*g,f>=s&&l>=f&&u*d+y*f>=0&&(c=egret.Point.create(d,f)),f=(-t-u*d)*g,f>=s&&l>=f&&0>u*d+y*f&&(!c||a(c.x,c.y,e).height>a(d,f,e).height)&&(egret.Point.release(c),c=egret.Point.create(d,f))}if(0!=u&&n>0){var v=1/u;n=Math.max(s,Math.min(l,n)),f=n,d=(t-y*f)*v,d>=r&&h>=d&&u*d+y*f>=0&&(!c||a(c.x,c.y,e).height>a(d,f,e).height)&&(egret.Point.release(c),c=egret.Point.create(d,f)),d=(-t-y*f)*v,d>=r&&h>=d&&0>u*d+y*f&&(!c||a(c.x,c.y,e).height>a(d,f,e).height)&&(egret.Point.release(c),c=egret.Point.create(d,f))}if(c)return c;var m=e.b,$=e.d,E=m*$>=0?$:-$;return o(u,y,t,r,s,h,l,m,E)}function o(t,e,i,n,r,o,s,a,h){if(0==t||0==e)return null;var l,u,p=(i-n*t)/e,c=(i-o*t)/e,d=Math.max(r,Math.min(p,c)),f=Math.min(s,Math.max(p,c)),y=a*e-t*h;return f>=d?(u=Math.abs(y)<1e-9?i/(t+e):a*i/y,u=Math.max(d,Math.min(u,f)),l=(i-e*u)/t,egret.Point.create(l,u)):(p=-(n*t+i)/e,c=-(o*t+i)/e,d=Math.max(r,Math.min(p,c)),f=Math.min(s,Math.max(p,c)),f>=d?(u=Math.abs(y)<1e-9?-i/(t+e):-a*i/y,u=Math.max(d,Math.min(u,f)),l=(-i-e*u)/t,egret.Point.create(l,u)):null)}function s(t,e,i,n,r,s,a){var l=i.a,u=i.b,p=i.c,c=i.d;if(l>-1e-9&&1e-9>l&&(l=0),u>-1e-9&&1e-9>u&&(u=0),p>-1e-9&&1e-9>p&&(p=0),c>-1e-9&&1e-9>c&&(c=0),0==u&&0==p)return 0==l||0==c?null:egret.Point.create(t/Math.abs(l),e/Math.abs(c));if(0==l&&0==c)return 0==u||0==p?null:egret.Point.create(e/Math.abs(u),t/Math.abs(p));var d=l*p>=0?p:-p,f=u*c>=0?c:-c,y=l*f-u*d;if(Math.abs(y)<1e-9)return 0==d||0==l||l==-d?null:Math.abs(l*e-u*t)>1e-9?null:o(l,d,t,n,n,s,a,u,f);var g=1/y;t*=g,e*=g;var v;return v=h(l,d,u,f,t,e),v&&n<=v.x&&v.x<=s&&r<=v.y&&v.y<=a&&l*v.x+d*v.x>=0&&u*v.x+f*v.y>=0?v:(v=h(l,d,u,f,t,-e),v&&n<=v.x&&v.x<=s&&r<=v.y&&v.y<=a&&l*v.x+d*v.x>=0&&u*v.x+f*v.y<0?v:(v=h(l,d,u,f,-t,e),v&&n<=v.x&&v.x<=s&&r<=v.y&&v.y<=a&&l*v.x+d*v.x<0&&u*v.x+f*v.y>=0?v:(v=h(l,d,u,f,-t,-e),v&&n<=v.x&&v.x<=s&&r<=v.y&&v.y<=a&&l*v.x+d*v.x<0&&u*v.x+f*v.y<0?v:(egret.Point.release(v),null))))}function a(t,e,i){var n=egret.$TempRectangle.setTo(0,0,t,e);return i.$transformBounds(n),n}function h(t,e,i,n,r,o){return egret.Point.create(n*r-e*o,t*o-i*r)}var l=.1,u=.1,p=function(){function t(){}return t.fitBounds=function(t,n,r,o,h,p,c,d,f,y,g){if(isNaN(t)&&isNaN(n))return egret.Point.create(p,c);var v,m=u>d?0:d-u,$=u>f?0:f-u,E=y+u,C=g+u;if(isNaN(t)||isNaN(n))return isNaN(t)?i(n,r,o,h,p,c,m,$,E,C):e(t,r,o,h,p,c,m,$,E,C);if(v=s(t,n,r,m,$,E,C),!v){var _=void 0;if(_=e(t,r,o,h,p,c,m,$,E,C)){var b=a(_.x,_.y,r).height;b-l>n&&(egret.Point.release(_),_=null)}var S=void 0;if(S=i(n,r,o,h,p,c,m,$,E,C)){var T=a(S.x,S.y,r).width;T-l>t&&(egret.Point.release(S),S=null)}v=_&&S?_.x*_.y>S.x*S.y?_:S:_?_:S,egret.Point.release(_),egret.Point.release(S)}return v},t}();t.MatrixUtil=p,__reflect(p.prototype,"eui.sys.MatrixUtil")}(e=t.sys||(t.sys={}))}(eui||(eui={})); //libs/modules/res/res.min.js var __reflect=this&&this.__reflect||function(e,t,r){e.__class__=t,r?r.push(t):r=[t],e.__types__=e.__types__?r.concat(e.__types__):r},__extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])};return function(t,r){function i(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),RES;!function(e){var t=function(t){function r(){var r=t.call(this)||this;return r.resourceConfig=null,r.resourceConfig=e.configInstance,r}return __extends(r,t),r.prototype.addSubkey=function(e,t){this.resourceConfig.addSubkey(e,t)},r.prototype.loadFile=function(e,t,r){},r.prototype.getRes=function(e){},r.prototype.destroyRes=function(e){return!1},r.getStringPrefix=function(e){if(!e)return"";var t=e.indexOf(".");return-1!=t?e.substring(0,t):""},r.getStringTail=function(e){if(!e)return"";var t=e.indexOf(".");return-1!=t?e.substring(t+1):""},r}(egret.HashObject);e.AnalyzerBase=t,__reflect(t.prototype,"RES.AnalyzerBase")}(RES||(RES={}));var RES;!function(e){var t=function(t){function r(){var e=t.call(this)||this;return e.fileDic={},e.resItemDic=[],e._dataFormat=egret.HttpResponseType.ARRAY_BUFFER,e.recycler=[],e}return __extends(r,t),r.prototype.loadFile=function(t,r,i){if(this.fileDic[t.name])return void r.call(i,t);var n=this.getRequest();this.resItemDic[n.hashCode]={item:t,func:r,thisObject:i},n.open(e.$getVirtualUrl(t.url)),n.send()},r.prototype.getRequest=function(){var e=this.recycler.pop();return e||(e=new egret.HttpRequest,e.addEventListener(egret.Event.COMPLETE,this.onLoadFinish,this),e.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this)),e.responseType=this._dataFormat,e},r.prototype.onLoadFinish=function(e){var t=e.target,r=this.resItemDic[t.hashCode];delete this.resItemDic[t.hashCode];var i=r.item,n=r.func;i.loaded=e.type==egret.Event.COMPLETE,i.loaded&&this.analyzeData(i,t.response),this.recycler.push(t),n.call(r.thisObject,i)},r.prototype.analyzeData=function(e,t){var r=e.name;this.fileDic[r]||""!=t&&!t||(this.fileDic[r]=t)},r.prototype.getRes=function(e){return this.fileDic[e]},r.prototype.hasRes=function(e){var t=this.getRes(e);return null!=t},r.prototype.destroyRes=function(e){return this.fileDic[e]?(this.onResourceDestroy(this.fileDic[e]),delete this.fileDic[e],!0):!1},r.prototype.onResourceDestroy=function(e){},r}(e.AnalyzerBase);e.BinAnalyzer=t,__reflect(t.prototype,"RES.BinAnalyzer")}(RES||(RES={}));var RES;!function(e){var t=function(){function e(e,t,r){this.groupName="",this.data=null,this._loaded=!1,this.name=e,this.url=t,this.type=r}return Object.defineProperty(e.prototype,"loaded",{get:function(){return this.data?this.data.loaded:this._loaded},set:function(e){this.data&&(this.data.loaded=e),this._loaded=e},enumerable:!0,configurable:!0}),e.prototype.toString=function(){return'[ResourceItem name="'+this.name+'" url="'+this.url+'" type="'+this.type+'"]'},e.TYPE_XML="xml",e.TYPE_IMAGE="image",e.TYPE_BIN="bin",e.TYPE_TEXT="text",e.TYPE_JSON="json",e.TYPE_SHEET="sheet",e.TYPE_FONT="font",e.TYPE_SOUND="sound",e}();e.ResourceItem=t,__reflect(t.prototype,"RES.ResourceItem")}(RES||(RES={}));var RES;!function(e){var t=function(t){function r(){var e=t.call(this)||this;return e.sheetMap={},e.textureMap={},e.recyclerIamge=[],e._dataFormat=egret.HttpResponseType.TEXT,e}return __extends(r,t),r.prototype.getRes=function(t){var r=this.fileDic[t];if(r||(r=this.textureMap[t]),!r){var i=e.AnalyzerBase.getStringPrefix(t);if(r=this.fileDic[i]){var n=e.AnalyzerBase.getStringTail(t);r=r.getTexture(n)}}return r},r.prototype.onLoadFinish=function(e){var t=e.target,r=this.resItemDic[t.$hashCode];delete this.resItemDic[t.hashCode];var i=r.item,n=r.func;if(i.loaded=e.type==egret.Event.COMPLETE,i.loaded)if(t instanceof egret.HttpRequest){i.loaded=!1;var o=this.analyzeConfig(i,t.response);if(o)return this.loadImage(o,r),void this.recycler.push(t)}else{var s=new egret.Texture;s._setBitmapData(t.data),this.analyzeBitmap(i,s)}t instanceof egret.HttpRequest?this.recycler.push(t):this.recyclerIamge.push(t),n.call(r.thisObject,i)},r.prototype.analyzeConfig=function(e,t){var r,i=e.name,n="";try{var o=t;r=JSON.parse(o)}catch(s){egret.$warn(1017,e.url,t)}return r&&(this.sheetMap[i]=r,n=this.getRelativePath(e.url,r.file)),n},r.prototype.analyzeBitmap=function(e,t){var r=e.name;if(!this.fileDic[r]&&t){var i=this.sheetMap[r];delete this.sheetMap[r];var n=e.data&&e.data.subkeys?"":r,o=this.parseSpriteSheet(t,i,n);this.fileDic[r]=o}},r.prototype.getRelativePath=function(e,t){e=e.split("\\").join("/");var r=e.match(/#.*|\?.*/),i="";r&&(i=r[0]);var n=e.lastIndexOf("/");return e=-1!=n?e.substring(0,n+1)+t:t,e+i},r.prototype.parseSpriteSheet=function(e,t,r){var i=t.frames;if(!i)return null;var n=new egret.SpriteSheet(e),o=this.textureMap;for(var s in i){var a=i[s],u=n.createTexture(s,a.x,a.y,a.w,a.h,a.offX,a.offY,a.sourceW,a.sourceH);if(a.scale9grid){var c=a.scale9grid,l=c.split(",");u.scale9Grid=new egret.Rectangle(parseInt(l[0]),parseInt(l[1]),parseInt(l[2]),parseInt(l[3]))}null==o[s]&&(o[s]=u,r&&this.addSubkey(s,r))}return n},r.prototype.destroyRes=function(e){var t=this.fileDic[e];if(t){delete this.fileDic[e];var r=void 0;for(var i in t._textureMap)null==r&&(r=t._textureMap[i],this.onResourceDestroy(r),r=null),delete this.textureMap[i];return t.dispose&&t.dispose(),!0}return!1},r.prototype.loadImage=function(t,r){var i=this.getImageLoader();this.resItemDic[i.hashCode]=r,i.load(e.$getVirtualUrl(t))},r.prototype.getImageLoader=function(){var e=this.recyclerIamge.pop();return e||(e=new egret.ImageLoader,e.addEventListener(egret.Event.COMPLETE,this.onLoadFinish,this),e.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this)),e},r.prototype.onResourceDestroy=function(e){e&&e.dispose()},r}(e.BinAnalyzer);e.SheetAnalyzer=t,__reflect(t.prototype,"RES.SheetAnalyzer")}(RES||(RES={}));var RES;!function(e){}(RES||(RES={}));var RES;!function(e){var t=function(t){function r(){var e=t.call(this)||this;return e.fileDic={},e.resItemDic=[],e.recycler=[],e}return __extends(r,t),r.prototype.loadFile=function(t,r,i){if(this.fileDic[t.name])return void r.call(i,t);var n=this.getLoader();this.resItemDic[n.$hashCode]={item:t,func:r,thisObject:i},n.load(e.$getVirtualUrl(t.url))},r.prototype.getLoader=function(){var e=this.recycler.pop();return e||(e=new egret.ImageLoader,e.addEventListener(egret.Event.COMPLETE,this.onLoadFinish,this),e.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this)),e},r.prototype.onLoadFinish=function(e){var t=e.$target,r=this.resItemDic[t.$hashCode];delete this.resItemDic[t.$hashCode];var i=r.item,n=r.func;if(i.loaded=e.$type==egret.Event.COMPLETE,i.loaded){var o=new egret.Texture;o._setBitmapData(t.data),this.analyzeData(i,o)}this.recycler.push(t),n.call(r.thisObject,i)},r.prototype.analyzeData=function(e,t){var r=e.name;if(!this.fileDic[r]&&t){this.fileDic[r]=t;var i=e.data;if(i&&i.scale9grid){var n=i.scale9grid,o=n.split(",");t.scale9Grid=new egret.Rectangle(parseInt(o[0]),parseInt(o[1]),parseInt(o[2]),parseInt(o[3]))}}},r.prototype.getRes=function(e){return this.fileDic[e]},r.prototype.hasRes=function(e){var t=this.getRes(e);return null!=t},r.prototype.destroyRes=function(e){return this.fileDic[e]?(this.onResourceDestroy(this.fileDic[e]),delete this.fileDic[e],!0):!1},r.prototype.onResourceDestroy=function(e){e.dispose()},r}(e.AnalyzerBase);e.ImageAnalyzer=t,__reflect(t.prototype,"RES.ImageAnalyzer")}(RES||(RES={}));var RES;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t._dataFormat=egret.HttpResponseType.TEXT,t}return __extends(t,e),t}(e.BinAnalyzer);e.TextAnalyzer=t,__reflect(t.prototype,"RES.TextAnalyzer")}(RES||(RES={}));var RES;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t._dataFormat=egret.HttpResponseType.TEXT,t}return __extends(t,e),t.prototype.analyzeData=function(e,t){var r=e.name;if(!this.fileDic[r]&&t)try{var i=t;this.fileDic[r]=JSON.parse(i)}catch(n){egret.$warn(1017,e.url,t)}},t}(e.BinAnalyzer);e.JsonAnalyzer=t,__reflect(t.prototype,"RES.JsonAnalyzer")}(RES||(RES={}));var RES;!function(e){var t=function(t){function r(){var e=t.call(this)||this;return e.thread=2,e.loadingCount=0,e.callBack=null,e.resInstance=null,e.groupTotalDic={},e.numLoadedDic={},e.itemListDic={},e.groupErrorDic={},e.retryTimesDic={},e.maxRetryTimes=3,e.failedList=new Array,e.priorityQueue={},e.lazyLoadList=new Array,e.analyzerDic={},e.queueIndex=0,e}return __extends(r,t),r.prototype.isGroupInLoading=function(e){return void 0!==this.itemListDic[e]},r.prototype.loadGroup=function(t,r,i){if(void 0===i&&(i=0),!this.itemListDic[r]&&r){if(!t||0==t.length){egret.$warn(3201,r);var n=new e.ResourceEvent(e.ResourceEvent.GROUP_LOAD_ERROR);return n.groupName=r,void this.dispatchEvent(n)}this.priorityQueue[i]?this.priorityQueue[i].push(r):this.priorityQueue[i]=[r],this.itemListDic[r]=t;for(var o=t.length,s=0;o>s;s++){var a=t[s];a.groupName=r}this.groupTotalDic[r]=t.length,this.numLoadedDic[r]=0,this.next()}},r.prototype.loadItem=function(e){this.lazyLoadList.push(e),e.groupName="",this.next()},r.prototype.next=function(){for(;this.loadingCount0)return this.failedList.shift();var e=Number.NEGATIVE_INFINITY;for(var t in this.priorityQueue)e=Math.max(e,t);var r=this.priorityQueue[e];if(!r||0==r.length)return 0==this.lazyLoadList.length?null:this.lazyLoadList.pop();for(var i,n=r.length,o=0;n>o&&(this.queueIndex>=n&&(this.queueIndex=0),i=this.itemListDic[r[this.queueIndex]],!(i.length>0));o++)this.queueIndex++;return 0==i.length?null:i.shift()},r.prototype.onItemComplete=function(t){this.loadingCount--;var r=t.groupName;if(!t.loaded){var i=this.retryTimesDic[t.name]||1;if(!(i>this.maxRetryTimes))return this.retryTimesDic[t.name]=i+1,this.failedList.push(t),void this.next();delete this.retryTimesDic[t.name],e.ResourceEvent.dispatchResourceEvent(this.resInstance,e.ResourceEvent.ITEM_LOAD_ERROR,r,t)}if(r){this.numLoadedDic[r]++;var n=this.numLoadedDic[r],o=this.groupTotalDic[r];if(t.loaded||(this.groupErrorDic[r]=!0),e.ResourceEvent.dispatchResourceEvent(this.resInstance,e.ResourceEvent.GROUP_PROGRESS,r,t,n,o),n==o){var s=this.groupErrorDic[r];this.removeGroupName(r),delete this.groupTotalDic[r],delete this.numLoadedDic[r],delete this.itemListDic[r],delete this.groupErrorDic[r],s?e.ResourceEvent.dispatchResourceEvent(this,e.ResourceEvent.GROUP_LOAD_ERROR,r):e.ResourceEvent.dispatchResourceEvent(this,e.ResourceEvent.GROUP_COMPLETE,r)}}else this.callBack.call(this.resInstance,t);this.next()},r.prototype.removeGroupName=function(e){for(var t in this.priorityQueue){for(var r=this.priorityQueue[t],i=0,n=!1,o=r.length,s=0;o>s;s++){var a=r[s];if(a==e){r.splice(i,1),n=!0;break}i++}if(n){0==r.length&&delete this.priorityQueue[t];break}}},r}(egret.EventDispatcher);e.ResourceLoader=t,__reflect(t.prototype,"RES.ResourceLoader")}(RES||(RES={}));var RES;!function(e){var t=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.analyzeConfig=function(e,t){var r,i=e.name,n="";try{var o=t;r=JSON.parse(o)}catch(s){}return r?n=this.getRelativePath(e.url,r.file):(r=t,n=this.getTexturePath(e.url,r)),this.sheetMap[i]=r,n},t.prototype.analyzeBitmap=function(e,t){var r=e.name;if(!this.fileDic[r]&&t){var i=this.sheetMap[r];delete this.sheetMap[r];var n=new egret.BitmapFont(t,i);this.fileDic[r]=n}},t.prototype.getTexturePath=function(e,t){var r="",i=t.split("\n"),n=i[2],o=n.indexOf('file="');return-1!=o&&(n=n.substring(o+6),o=n.indexOf('"'),r=n.substring(0,o)),e=e.split("\\").join("/"),o=e.lastIndexOf("/"),e=-1!=o?e.substring(0,o+1)+r:r},t.prototype.onResourceDestroy=function(e){e&&e.dispose()},t}(e.SheetAnalyzer);e.FontAnalyzer=t,__reflect(t.prototype,"RES.FontAnalyzer")}(RES||(RES={}));var RES;!function(e){var t=function(){function t(){this.keyMap={},this.groupDic={},e.configInstance=this}return t.prototype.getGroupByName=function(e){var t=new Array;if(!this.groupDic[e])return t;for(var r=this.groupDic[e],i=r.length,n=0;i>n;n++){var o=r[n];t.push(this.parseResourceItem(o))}return t},t.prototype.getRawGroupByName=function(e){return this.groupDic[e]?this.groupDic[e]:[]},t.prototype.createGroup=function(e,t,r){if(void 0===r&&(r=!1),!r&&this.groupDic[e]||!t||0==t.length)return!1;for(var i=this.groupDic,n=[],o=t.length,s=0;o>s;s++){var a=t[s],u=i[a];if(u)for(var c=u.length,l=0;c>l;l++){var p=u[l];-1==n.indexOf(p)&&n.push(p)}else{var p=this.keyMap[a];p?-1==n.indexOf(p)&&n.push(p):egret.$warn(3200,a)}}return 0==n.length?!1:(this.groupDic[e]=n,!0)},t.prototype.parseConfig=function(e,t){if(e){var r=e.resources;if(r)for(var i=r.length,n=0;i>n;n++){var o=r[n],s=o.url;s&&-1==s.indexOf("://")&&(o.url=t+s),this.addItemToKeyMap(o)}var a=e.groups;if(a)for(var u=a.length,n=0;u>n;n++){for(var c=a[n],l=[],p=c.keys.split(","),h=p.length,f=0;h>f;f++){var d=p[f].trim(),o=this.keyMap[d];o&&-1==l.indexOf(o)&&l.push(o)}this.groupDic[c.name]=l}}},t.prototype.addSubkey=function(e,t){var r=this.keyMap[t];r&&!this.keyMap[e]&&(this.keyMap[e]=r)},t.prototype.addItemToKeyMap=function(e){if(this.keyMap[e.name]||(this.keyMap[e.name]=e),e.hasOwnProperty("subkeys")){var t=e.subkeys.split(",");e.subkeys=t;for(var r=t.length,i=0;r>i;i++){var n=t[i];null==this.keyMap[n]&&(this.keyMap[n]=e)}}},t.prototype.getName=function(e){var t=this.keyMap[e];return t?t.name:""},t.prototype.getType=function(e){var t=this.keyMap[e];return t?t.type:""},t.prototype.getRawResourceItem=function(e){return this.keyMap[e]},t.prototype.getResourceItem=function(e){var t=this.keyMap[e];return t?this.parseResourceItem(t):null},t.prototype.parseResourceItem=function(t){var r=new e.ResourceItem(t.name,t.url,t.type);return r.data=t,r},t}();e.ResourceConfig=t,__reflect(t.prototype,"RES.ResourceConfig")}(RES||(RES={}));var RES;!function(e){var t=function(e){function t(){var t=e.call(this)||this;return t._dataFormat=egret.HttpResponseType.TEXT,t}return __extends(t,e),t.prototype.analyzeData=function(e,t){var r=e.name;if(!this.fileDic[r]&&t)try{var i=t,n=egret.XML.parse(i);this.fileDic[r]=n}catch(o){}},t}(e.BinAnalyzer);e.XMLAnalyzer=t,__reflect(t.prototype,"RES.XMLAnalyzer")}(RES||(RES={}));var RES;!function(e){var t=function(e){function t(t,r,i){void 0===r&&(r=!1),void 0===i&&(i=!1);var n=e.call(this,t,r,i)||this;return n.itemsLoaded=0,n.itemsTotal=0,n.groupName="",n.resItem=null,n}return __extends(t,e),t.dispatchResourceEvent=function(e,r,i,n,o,s){void 0===i&&(i=""),void 0===n&&(n=null),void 0===o&&(o=0),void 0===s&&(s=0);var a=egret.Event.create(t,r);a.groupName=i,a.resItem=n,a.itemsLoaded=o,a.itemsTotal=s;var u=e.dispatchEvent(a);return egret.Event.release(a),u},t.ITEM_LOAD_ERROR="itemLoadError",t.CONFIG_COMPLETE="configComplete",t.CONFIG_LOAD_ERROR="configLoadError",t.GROUP_PROGRESS="groupProgress",t.GROUP_COMPLETE="groupComplete",t.GROUP_LOAD_ERROR="groupLoadError",t}(egret.Event);e.ResourceEvent=t,__reflect(t.prototype,"RES.ResourceEvent")}(RES||(RES={}));var RES;!function(e){var t;!function(t){var r=function(e){function t(){var t=e.call(this)||this;return t._versionInfo={},t}return __extends(t,e),t.prototype.fetchVersion=function(e){e.onSuccess(null)},t.prototype.getChangeList=function(){return[]},t.prototype.getVirtualUrl=function(e){return e},t}(egret.EventDispatcher);t.Html5VersionController=r,__reflect(r.prototype,"RES.web.Html5VersionController",["RES.VersionController","RES.IVersionController"]),egret.Capabilities.runtimeType==egret.RuntimeType.WEB&&(e.VersionController=r)}(t=e.web||(e.web={}))}(RES||(RES={}));var RES;!function(e){var t;!function(t){var r=function(){function e(){this._versionInfo={},this._versionPath="",this._localFileArr=[]}return e.prototype.fetchVersion=function(e){var t=this;if(t._versionPath="all.manifest",t._versionInfo=t.getLocalData(t._versionPath),null==t._versionInfo)return void egret.callLater(function(){e.onFail(1,null)},t);var r=0,i=function(i){if(i)for(var n=0;ns;s++){var a=i[s],u=new e.ResourceItem(a.url,a.url,a.type);o.push(u)}var c={onSuccess:function(e){t.resLoader.loadGroup(o,r.GROUP_CONFIG,Number.MAX_VALUE)},onFail:function(r,i){e.ResourceEvent.dispatchResourceEvent(t,e.ResourceEvent.CONFIG_LOAD_ERROR)}};this.vcs?this.vcs.fetchVersion(c):this.resLoader.loadGroup(o,r.GROUP_CONFIG,Number.MAX_VALUE)},r.prototype.isGroupLoaded=function(e){return-1!=this.loadedGroups.indexOf(e)},r.prototype.getGroupByName=function(e){return this.resConfig.getGroupByName(e)},r.prototype.loadGroup=function(t,r){if(void 0===r&&(r=0),-1!=this.loadedGroups.indexOf(t))return void e.ResourceEvent.dispatchResourceEvent(this,e.ResourceEvent.GROUP_COMPLETE,t);if(!this.resLoader.isGroupInLoading(t))if(this.configComplete){var i=this.resConfig.getGroupByName(t);this.resLoader.loadGroup(i,t,r)}else this.groupNameList.push({name:t,priority:r})},r.prototype.createGroup=function(e,t,r){if(void 0===r&&(r=!1),r){var i=this.loadedGroups.indexOf(e);-1!=i&&this.loadedGroups.splice(i,1)}return this.resConfig.createGroup(e,t,r)},r.prototype.onGroupComp=function(t){if(t.groupName==r.GROUP_CONFIG){for(var i=this.loadingConfigList.length,n=0;i>n;n++){var o=this.loadingConfigList[n],s=this.$getAnalyzerByType(o.type),a=s.getRes(o.url);s.destroyRes(o.url),this.resConfig.parseConfig(a,o.resourceRoot)}this.configComplete=!0,this.loadingConfigList=null,e.ResourceEvent.dispatchResourceEvent(this,e.ResourceEvent.CONFIG_COMPLETE),this.loadDelayGroups()}else this.loadedGroups.push(t.groupName),this.dispatchEvent(t)},r.prototype.loadDelayGroups=function(){var e=this.groupNameList;this.groupNameList=[];for(var t=e.length,r=0;t>r;r++){var i=e[r];this.loadGroup(i.name,i.priority)}},r.prototype.onGroupError=function(t){t.groupName==r.GROUP_CONFIG?(this.loadingConfigList=null,e.ResourceEvent.dispatchResourceEvent(this,e.ResourceEvent.CONFIG_LOAD_ERROR)):this.dispatchEvent(t)},r.prototype.hasRes=function(t){var r=this.resConfig.getType(t);if(""==r){var i=e.AnalyzerBase.getStringTail(t);if(r=this.resConfig.getType(i),""==r)return!1}return!0},r.prototype.parseConfig=function(e,t){this.resConfig.parseConfig(e,t),this.configComplete||this.loadingConfigList||(this.configComplete=!0,this.loadDelayGroups())},r.prototype.getRes=function(t){var r=this.resConfig.getType(t);if(""==r){var i=e.AnalyzerBase.getStringPrefix(t);if(r=this.resConfig.getType(i),""==r)return null}var n=this.$getAnalyzerByType(r);return n.getRes(t)},r.prototype.getResAsync=function(t,r,i){var n=this.resConfig.getType(t),o=this.resConfig.getName(t);if(""==n&&(o=e.AnalyzerBase.getStringPrefix(t),n=this.resConfig.getType(o),""==n))return void egret.$callAsync(r,i);var s=this.$getAnalyzerByType(n),a=s.getRes(t);if(a)return void egret.$callAsync(r,i,a,t);var u={key:t,compFunc:r,thisObject:i};if(this.asyncDic[o])this.asyncDic[o].push(u);else{this.asyncDic[o]=[u];var c=this.resConfig.getResourceItem(o);this.resLoader.loadItem(c)}},r.prototype.getResByUrl=function(t,r,i,n){if(void 0===n&&(n=""),!t)return void egret.$callAsync(r,i);n||(n=this.getTypeByUrl(t)),null!=this._loadedUrlTypes[t]&&this._loadedUrlTypes[t]!=n&&egret.$warn(3202),this._loadedUrlTypes[t]=n;var o=this.$getAnalyzerByType(n),s=t,a=o.getRes(s);if(a)return void egret.$callAsync(r,i,a,t);var u={key:s,compFunc:r,thisObject:i};if(this.asyncDic[s])this.asyncDic[s].push(u);else{this.asyncDic[s]=[u];var c=new e.ResourceItem(s,t,n);this.resLoader.loadItem(c)}},r.prototype.getTypeByUrl=function(t){var r=t.substr(t.lastIndexOf(".")+1);r&&(r=r.toLowerCase());var i;switch(r){case e.ResourceItem.TYPE_XML:case e.ResourceItem.TYPE_JSON:case e.ResourceItem.TYPE_SHEET:i=r;break;case"png":case"jpg":case"gif":case"jpeg":case"bmp":i=e.ResourceItem.TYPE_IMAGE;break;case"fnt":i=e.ResourceItem.TYPE_FONT;break;case"txt":i=e.ResourceItem.TYPE_TEXT;break;case"mp3":case"ogg":case"mpeg":case"wav":case"m4a":case"mp4":case"aiff":case"wma":case"mid":i=e.ResourceItem.TYPE_SOUND;break;default:i=e.ResourceItem.TYPE_BIN}return i},r.prototype.onResourceItemComp=function(e){var t=this.asyncDic[e.name];delete this.asyncDic[e.name];for(var r=this.$getAnalyzerByType(e.type),i=t.length,n=0;i>n;n++){var o=t[n],s=r.getRes(o.key);o.compFunc.call(o.thisObject,s,o.key)}},r.prototype.destroyRes=function(e,t){void 0===t&&(t=!0);var r=this.resConfig.getRawGroupByName(e);if(r&&r.length>0){var i=this.loadedGroups.indexOf(e);-1!=i&&this.loadedGroups.splice(i,1);for(var n=r.length,o=0;n>o;o++){var s=r[o];if(!t&&this.isResInLoadedGroup(s.name));else{s.loaded=!1;var a=this.$getAnalyzerByType(s.type);a.destroyRes(s.name),this.removeLoadedGroupsByItemName(s.name)}}return!0}var u=this.resConfig.getType(e);if(""==u){if(u=this._loadedUrlTypes[e],null==u||""==u)return!1;delete this._loadedUrlTypes[e];var c=this.$getAnalyzerByType(u);return c.destroyRes(e),!0}var s=this.resConfig.getRawResourceItem(e);s.loaded=!1;var a=this.$getAnalyzerByType(u),l=a.destroyRes(e);return this.removeLoadedGroupsByItemName(s.name),l},r.prototype.removeLoadedGroupsByItemName=function(e){for(var t=this.loadedGroups,r=t.length,i=0;r>i;i++)for(var n=this.resConfig.getRawGroupByName(t[i]),o=n.length,s=0;o>s;s++){var a=n[s];if(a.name==e){t.splice(i,1),i--,r=t.length;break}}},r.prototype.isResInLoadedGroup=function(e){for(var t=this.loadedGroups,r=t.length,i=0;r>i;i++)for(var n=this.resConfig.getRawGroupByName(t[i]),o=n.length,s=0;o>s;s++){var a=n[s];if(a.name==e)return!0}return!1},r.prototype.setMaxLoadingThread=function(e){1>e&&(e=1),this.resLoader.thread=e},r.prototype.setMaxRetryTimes=function(e){e=Math.max(e,0),this.resLoader.maxRetryTimes=e},r.GROUP_CONFIG="RES__CONFIG",r}(egret.EventDispatcher);__reflect(_.prototype,"Resource");var I=new _}(RES||(RES={}));var RES;!function(e){var t=function(t){function r(){var e=t.call(this)||this;return e.sheetMap={},e.recyclerIamge=[],e._dataFormat=egret.HttpResponseType.TEXT,e}return __extends(r,t),r.prototype.onLoadFinish=function(e){var t=e.target,r=this.resItemDic[t.$hashCode];delete this.resItemDic[t.hashCode];var i=r.item,n=r.func;if(i.loaded=e.type==egret.Event.COMPLETE,i.loaded)if(t instanceof egret.HttpRequest){i.loaded=!1;var o=this.analyzeConfig(i,t.response);if(o)return this.loadImage(o,r),void this.recycler.push(t)}else this.analyzeBitmap(i,t.data);t instanceof egret.HttpRequest?this.recycler.push(t):this.recyclerIamge.push(t),n.call(r.thisObject,i)},r.prototype.analyzeConfig=function(e,t){var r,i=e.name,n="";try{var o=t;r=JSON.parse(o)}catch(s){egret.$warn(1017,e.url,t)}if(r)if(this.sheetMap[i]=r,r.file)n=this.getRelativePath(e.url,r.file);else{var a=e.url.split("?"),u=a[0].split("/");u[u.length-1]=u[u.length-1].split(".")[0]+".png",n="";for(var c=0;cu;u++){i=t.res[o[u].res];var c=new egret.Texture;c._bitmapData=e,c.$initData(i.x,i.y,i.w,i.h,o[u].x,o[u].y,o[u].sourceW,o[u].sourceH,e.width,e.height)}return a},r.prototype.destroyRes=function(e){var t=this.fileDic[e];return t?(delete this.fileDic[e],!0):!1},r.prototype.loadImage=function(t,r){var i=this.getImageLoader();this.resItemDic[i.hashCode]=r,i.load(e.$getVirtualUrl(t))},r.prototype.getImageLoader=function(){var e=this.recyclerIamge.pop();return e||(e=new egret.ImageLoader,e.addEventListener(egret.Event.COMPLETE,this.onLoadFinish,this),e.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onLoadFinish,this)),e},r}(e.BinAnalyzer);e.AnimationAnalyzer=t,__reflect(t.prototype,"RES.AnimationAnalyzer")}(RES||(RES={}));var egret;!function(e){e.$locale_strings=e.$locale_strings||{},e.$locale_strings.en_US=e.$locale_strings.en_US||{};var t=e.$locale_strings.en_US;t[3200]="RES.createGroup() passed in non-existed key value in configuration: {0}",t[3201]='RES loaded non-existed or empty resource group:"{0}"',t[3202]="Do not use the different types of ways to load the same material!",t[3203]="Can't find the analyzer of the specified file type:{0}。 Please register the specified analyzer in the initialization of the project first,then start the resource loading process。"}(egret||(egret={}));var egret;!function(e){e.$locale_strings=e.$locale_strings||{},e.$locale_strings.zh_CN=e.$locale_strings.zh_CN||{};var t=e.$locale_strings.zh_CN;t[3200]="RES.createGroup()传入了配置中不存在的键值: {0}",t[3201]='RES加载了不存在或空的资源组:"{0}"',t[3202]="请不要使用不同的类型方式来加载同一个素材!",t[3203]="找不到指定文件类型的解析器:{0}。 请先在项目初始化里注册指定文件类型的解析器,再启动资源加载。"}(egret||(egret={})); //libs/modules/game/game.min.js var __reflect=this&&this.__reflect||function(t,e,r){t.__class__=e,r?r.push(e):r=[e],t.__types__=t.__types__?r.concat(t.__types__):r},__extends=this&&this.__extends||function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function i(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(i.prototype=r.prototype,new i)}}(),egret;!function(t){var e=function(){function t(){}return t.BINARY="binary",t.TEXT="text",t.VARIABLES="variables",t.TEXTURE="texture",t.SOUND="sound",t}();t.URLLoaderDataFormat=e,__reflect(e.prototype,"egret.URLLoaderDataFormat")}(egret||(egret={}));var egret;!function(t){var e=function(t){function e(e,r,i){var o=t.call(this)||this;return o._name=e,o._frame=0|r,i&&(o._end=0|i),o}return __extends(e,t),Object.defineProperty(e.prototype,"name",{get:function(){return this._name},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this._frame},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"end",{get:function(){return this._end},enumerable:!0,configurable:!0}),e.prototype.clone=function(){return new e(this._name,this._frame,this._end)},e}(t.EventDispatcher);t.FrameLabel=e,__reflect(e.prototype,"egret.FrameLabel")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(){var t=e.call(this)||this;return t.$mcData=null,t.numFrames=1,t.frames=[],t.labels=null,t.events=[],t.frameRate=0,t.textureData=null,t.spriteSheet=null,t}return __extends(r,e),r.prototype.$init=function(t,e,r){this.textureData=e,this.spriteSheet=r,this.setMCData(t)},r.prototype.getKeyFrameData=function(t){var e=this.frames[t-1];return e.frame&&(e=this.frames[e.frame-1]),e},r.prototype.getTextureByFrame=function(t){var e=this.getKeyFrameData(t);if(e.res){var r=this.getTextureByResName(e.res);return r}return null},r.prototype.$getOffsetByFrame=function(t,e){var r=this.getKeyFrameData(t);r.res&&e.setTo(0|r.x,0|r.y)},r.prototype.getTextureByResName=function(t){if(null==this.spriteSheet)return null;var e=this.spriteSheet.getTexture(t);if(!e){var r=this.textureData[t];e=this.spriteSheet.createTexture(t,r.x,r.y,r.w,r.h)}return e},r.prototype.$isDataValid=function(){return this.frames.length>0},r.prototype.$isTextureValid=function(){return null!=this.textureData&&null!=this.spriteSheet},r.prototype.$fillMCData=function(t){this.frameRate=t.frameRate||24,this.fillFramesData(t.frames),this.fillFrameLabelsData(t.labels),this.fillFrameEventsData(t.events)},r.prototype.fillFramesData=function(t){for(var e,r=this.frames,i=t?t.length:0,o=0;i>o;o++){var n=t[o];if(r.push(n),n.duration){var s=parseInt(n.duration);if(s>1){e=r.length;for(var a=1;s>a;a++)r.push({frame:e})}}}this.numFrames=r.length},r.prototype.fillFrameLabelsData=function(e){if(e){var r=e.length;if(r>0){this.labels=[];for(var i=0;r>i;i++){var o=e[i];this.labels.push(new t.FrameLabel(o.name,o.frame,o.end))}}}},r.prototype.fillFrameEventsData=function(t){if(t){var e=t.length;if(e>0){this.events=[];for(var r=0;e>r;r++){var i=t[r];this.events[i.frame]=i.name}}}},Object.defineProperty(r.prototype,"mcData",{get:function(){return this.$mcData},set:function(t){this.setMCData(t)},enumerable:!0,configurable:!0}),r.prototype.setMCData=function(t){this.$mcData!=t&&(this.$mcData=t,t&&this.$fillMCData(t))},r}(t.HashObject);t.MovieClipData=e,__reflect(e.prototype,"egret.MovieClipData")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(t,r){var i=e.call(this)||this;return i.enableCache=!0,i.$mcDataCache={},i.$mcDataSet=t,i.setTexture(r),i}return __extends(r,e),r.prototype.clearCache=function(){this.$mcDataCache={}},r.prototype.generateMovieClipData=function(e){if(void 0===e&&(e=""),""==e&&this.$mcDataSet)for(e in this.$mcDataSet.mc)break;if(""==e)return null;var r=this.findFromCache(e,this.$mcDataCache);return r||(r=new t.MovieClipData,this.fillData(e,r,this.$mcDataCache)),r},r.prototype.findFromCache=function(t,e){return this.enableCache&&e[t]?e[t]:null},r.prototype.fillData=function(t,e,r){if(this.$mcDataSet){var i=this.$mcDataSet.mc[t];i&&(e.$init(i,this.$mcDataSet.res,this.$spriteSheet),this.enableCache&&(r[t]=e))}},Object.defineProperty(r.prototype,"mcDataSet",{get:function(){return this.$mcDataSet},set:function(t){this.$mcDataSet=t},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"texture",{set:function(t){this.setTexture(t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"spriteSheet",{get:function(){return this.$spriteSheet},enumerable:!0,configurable:!0}),r.prototype.setTexture=function(e){this.$spriteSheet=e?new t.SpriteSheet(e):null},r}(t.EventDispatcher);t.MovieClipDataFactory=e,__reflect(e.prototype,"egret.MovieClipDataFactory")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(t,r,i,o){void 0===r&&(r=!1),void 0===i&&(i=!1),void 0===o&&(o=null);var n=e.call(this,t,r,i)||this;return n.frameLabel=null,n.frameLabel=o,n}return __extends(r,e),r.dispatchMovieClipEvent=function(e,i,o){void 0===o&&(o=null);var n=t.Event.create(r,i);n.frameLabel=o;var s=e.dispatchEvent(n);return t.Event.release(n),s},r.FRAME_LABEL="frame_label",r}(t.Event);t.MovieClipEvent=e,__reflect(e.prototype,"egret.MovieClipEvent")}(egret||(egret={}));var egret;!function(t){var e=function(){function e(){t.$error(1014)}return e.get=function(t){return-1>t&&(t=-1),t>1&&(t=1),function(e){return 0==t?e:0>t?e*(e*-t+1+t):e*((2-e)*t+(1-t))}},e.getPowOut=function(t){return function(e){return 1-Math.pow(1-e,t)}},e.quintOut=e.getPowOut(5),e.quartOut=e.getPowOut(4),e}();t.ScrollEase=e,__reflect(e.prototype,"egret.ScrollEase");var r=function(e){function r(t,r,i){var o=e.call(this)||this;return o._target=null,o._useTicks=!1,o.ignoreGlobalPause=!1,o.loop=!1,o.pluginData=null,o._steps=null,o._actions=null,o.paused=!1,o.duration=0,o._prevPos=-1,o.position=null,o._prevPosition=0,o._stepPosition=0,o.passive=!1,o.initialize(t,r,i),o}return __extends(r,e),r.get=function(t,e,i,o){return void 0===e&&(e=null),void 0===i&&(i=null),void 0===o&&(o=!1),o&&r.removeTweens(t),new r(t,e,i)},r.removeTweens=function(t){if(t.tween_count){for(var e=r._tweens,i=e.length-1;i>=0;i--)e[i]._target==t&&(e[i].paused=!0,e.splice(i,1));t.tween_count=0}},r.tick=function(t,e){void 0===e&&(e=!1);var i=t-r._lastTime;r._lastTime=t;for(var o=r._tweens.concat(),n=o.length-1;n>=0;n--){var s=o[n];e&&!s.ignoreGlobalPause||s.paused||s.tick(s._useTicks?1:i)}return!1},r._register=function(e,i){var o=e._target,n=r._tweens;if(i)o&&(o.tween_count=o.tween_count>0?o.tween_count+1:1),n.push(e),r._inited||(r._lastTime=t.getTimer(),t.ticker.$startTick(r.tick,null),r._inited=!0);else{o&&o.tween_count--;for(var s=n.length;s--;)if(n[s]==e)return void n.splice(s,1)}},r.prototype.initialize=function(t,e,i){this._target=t,e&&(this._useTicks=e.useTicks,this.ignoreGlobalPause=e.ignoreGlobalPause,this.loop=e.loop,e.onChange&&this.addEventListener("change",e.onChange,e.onChangeObj),e.override&&r.removeTweens(t)),this.pluginData=i||{},this._curQueueProps={},this._initQueueProps={},this._steps=[],this._actions=[],e&&e.paused?this.paused=!0:r._register(this,!0),e&&null!=e.position&&this.setPosition(e.position)},r.prototype.setPosition=function(t,e){void 0===e&&(e=1),0>t&&(t=0);var r=t,i=!1;if(r>=this.duration&&(this.loop?r%=this.duration:(r=this.duration,i=!0)),r==this._prevPos)return i;var o=this._prevPos;if(this.position=this._prevPos=r,this._prevPosition=t,this._target)if(i)this._updateTargetProps(null,1);else if(this._steps.length>0){var n=void 0,s=this._steps.length;for(n=0;s>n&&!(this._steps[n].t>r);n++);var a=this._steps[n-1];this._updateTargetProps(a,(this._stepPosition=r-a.t)/a.d)}return i&&this.setPaused(!0),0!=e&&this._actions.length>0&&(this._useTicks?this._runActions(r,r):1==e&&o>r?(o!=this.duration&&this._runActions(o,this.duration),this._runActions(0,r,!0)):this._runActions(o,r)),this.dispatchEventWith("change"),i},r.prototype._runActions=function(t,e,r){void 0===r&&(r=!1);var i=t,o=e,n=-1,s=this._actions.length,a=1;for(t>e&&(i=e,o=t,n=s,s=a=-1);(n+=a)!=s;){var l=this._actions[n],c=l.t;(c==o||c>i&&o>c||r&&c==t)&&l.f.apply(l.o,l.p)}},r.prototype._updateTargetProps=function(t,e){var i,o,n,s,a,l;if(t||1!=e){if(this.passive=!!t.v,this.passive)return;t.e&&(e=t.e(e,0,1,1)),i=t.p0,o=t.p1}else this.passive=!1,i=o=this._curQueueProps;for(var c in this._initQueueProps){null==(s=i[c])&&(i[c]=s=this._initQueueProps[c]),null==(a=o[c])&&(o[c]=a=s),n=s==a||0==e||1==e||"number"!=typeof s?1==e?a:s:s+(a-s)*e;var h=!1;if(l=r._plugins[c])for(var u=0,p=l.length;p>u;u++){var _=l[u].tween(this,c,n,i,o,e,!!t&&i==o,!t);_==r.IGNORE?h=!0:n=_}h||(this._target[c]=n)}},r.prototype.setPaused=function(t){return this.paused=t,r._register(this,!t),this},r.prototype._cloneProps=function(t){var e={};for(var r in t)e[r]=t[r];return e},r.prototype._addStep=function(t){return t.d>0&&(this._steps.push(t),t.t=this.duration,this.duration+=t.d),this},r.prototype._appendQueueProps=function(t){var e,i,o,n,s;for(var a in t)if(void 0===this._initQueueProps[a]){if(i=this._target[a],e=r._plugins[a])for(o=0,n=e.length;n>o;o++)i=e[o].init(this,a,i);this._initQueueProps[a]=this._curQueueProps[a]=void 0===i?null:i}else i=this._curQueueProps[a];for(var a in t){if(i=this._curQueueProps[a],e=r._plugins[a])for(s=s||{},o=0,n=e.length;n>o;o++)e[o].step&&e[o].step(this,a,i,t[a],s);this._curQueueProps[a]=t[a]}return s&&this._appendQueueProps(s),this._curQueueProps},r.prototype._addAction=function(t){return t.t=this.duration,this._actions.push(t),this},r.prototype.to=function(t,e,r){return void 0===r&&(r=void 0),(isNaN(e)||0>e)&&(e=0),this._addStep({d:e||0,p0:this._cloneProps(this._curQueueProps),e:r,p1:this._cloneProps(this._appendQueueProps(t))})},r.prototype.call=function(t,e,r){return void 0===e&&(e=void 0),void 0===r&&(r=void 0),this._addAction({f:t,p:r?r:[],o:e?e:this._target})},r.prototype.tick=function(t){this.paused||this.setPosition(this._prevPosition+t)},r._tweens=[],r.IGNORE={},r._plugins={},r._inited=!1,r._lastTime=0,r}(t.EventDispatcher);t.ScrollTween=r,__reflect(r.prototype,"egret.ScrollTween")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(r){void 0===r&&(r=null);var i=e.call(this)||this;return i.scrollBeginThreshold=10,i.scrollSpeed=1,i._content=null,i.delayTouchBeginEvent=null,i.touchBeginTimer=null,i.touchEnabled=!0,i._ScrV_Props_=new t.ScrollViewProperties,r&&i.setContent(r),i}return __extends(r,e),Object.defineProperty(r.prototype,"bounces",{get:function(){return this._ScrV_Props_._bounces},set:function(t){this._ScrV_Props_._bounces=!!t},enumerable:!0,configurable:!0}),r.prototype.setContent=function(t){this._content!==t&&(this.removeContent(),t&&(this._content=t,e.prototype.addChild.call(this,t),this._addEvents()))},r.prototype.removeContent=function(){this._content&&(this._removeEvents(),e.prototype.removeChildAt.call(this,0)),this._content=null},Object.defineProperty(r.prototype,"verticalScrollPolicy",{get:function(){return this._ScrV_Props_._verticalScrollPolicy},set:function(t){t!=this._ScrV_Props_._verticalScrollPolicy&&(this._ScrV_Props_._verticalScrollPolicy=t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"horizontalScrollPolicy",{get:function(){return this._ScrV_Props_._horizontalScrollPolicy},set:function(t){t!=this._ScrV_Props_._horizontalScrollPolicy&&(this._ScrV_Props_._horizontalScrollPolicy=t)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollLeft",{get:function(){return this._ScrV_Props_._scrollLeft},set:function(t){t!=this._ScrV_Props_._scrollLeft&&(this._ScrV_Props_._scrollLeft=t,this._validatePosition(!1,!0),this._updateContentPosition())},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"scrollTop",{get:function(){return this._ScrV_Props_._scrollTop},set:function(t){t!=this._ScrV_Props_._scrollTop&&(this._ScrV_Props_._scrollTop=t,this._validatePosition(!0,!1),this._updateContentPosition())},enumerable:!0,configurable:!0}),r.prototype.setScrollPosition=function(t,e,r){if(void 0===r&&(r=!1),(!r||0!=t||0!=e)&&(r||this._ScrV_Props_._scrollTop!=t||this._ScrV_Props_._scrollLeft!=e)){var i=this._ScrV_Props_._scrollTop,o=this._ScrV_Props_._scrollLeft;if(r){var n=this.getMaxScrollLeft(),s=this.getMaxScrollTop();(0>=i||i>=s)&&(t/=2),(0>=o||o>=n)&&(e/=2);var a=i+t,l=o+e,c=this._ScrV_Props_._bounces;c||((0>=a||a>=s)&&(a=Math.max(0,Math.min(a,s))),(0>=l||l>=n)&&(l=Math.max(0,Math.min(l,n)))),this._ScrV_Props_._scrollTop=a,this._ScrV_Props_._scrollLeft=l}else this._ScrV_Props_._scrollTop=t,this._ScrV_Props_._scrollLeft=e;this._validatePosition(!0,!0),this._updateContentPosition()}},r.prototype._validatePosition=function(t,e){if(void 0===t&&(t=!1),void 0===e&&(e=!1),t){var r=this.height,i=this._getContentHeight();this._ScrV_Props_._scrollTop=Math.max(this._ScrV_Props_._scrollTop,(0-r)/2),this._ScrV_Props_._scrollTop=Math.min(this._ScrV_Props_._scrollTop,i>r?i-r/2:r/2)}if(e){var o=this.width,n=this._getContentWidth();this._ScrV_Props_._scrollLeft=Math.max(this._ScrV_Props_._scrollLeft,(0-o)/2),this._ScrV_Props_._scrollLeft=Math.min(this._ScrV_Props_._scrollLeft,n>o?n-o/2:o/2)}},r.prototype.$setWidth=function(t){if(this.$getExplicitWidth()==t)return!1;var r=e.prototype.$setWidth.call(this,t);return this._updateContentPosition(),r},r.prototype.$setHeight=function(t){if(this.$getExplicitHeight()==t)return!1;e.prototype.$setHeight.call(this,t);return this._updateContentPosition(),!0},r.prototype._updateContentPosition=function(){var e=this.height,r=this.width;this.scrollRect=new t.Rectangle(Math.round(this._ScrV_Props_._scrollLeft),Math.round(this._ScrV_Props_._scrollTop),r,e),this.dispatchEvent(new t.Event(t.Event.CHANGE))},r.prototype._checkScrollPolicy=function(){var t=this._ScrV_Props_._horizontalScrollPolicy,e=this.__checkScrollPolicy(t,this._getContentWidth(),this.width);this._ScrV_Props_._hCanScroll=e;var r=this._ScrV_Props_._verticalScrollPolicy,i=this.__checkScrollPolicy(r,this._getContentHeight(),this.height);return this._ScrV_Props_._vCanScroll=i,e||i},r.prototype.__checkScrollPolicy=function(t,e,r){return"on"==t?!0:"off"==t?!1:e>r},r.prototype._addEvents=function(){this.addEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this),this.addEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0),this.addEventListener(t.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)},r.prototype._removeEvents=function(){this.removeEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBegin,this),this.removeEventListener(t.TouchEvent.TOUCH_BEGIN,this._onTouchBeginCapture,this,!0),this.removeEventListener(t.TouchEvent.TOUCH_END,this._onTouchEndCapture,this,!0)},r.prototype._onTouchBegin=function(e){if(!e.$isDefaultPrevented){var r=this._checkScrollPolicy();r&&(this._ScrV_Props_._touchStartPosition.x=e.stageX,this._ScrV_Props_._touchStartPosition.y=e.stageY,(this._ScrV_Props_._isHTweenPlaying||this._ScrV_Props_._isVTweenPlaying)&&this._onScrollFinished(),this._tempStage=this.stage,this._tempStage.addEventListener(t.TouchEvent.TOUCH_MOVE,this._onTouchMove,this),this._tempStage.addEventListener(t.TouchEvent.TOUCH_END,this._onTouchEnd,this),this._tempStage.addEventListener(t.TouchEvent.LEAVE_STAGE,this._onTouchEnd,this),this.addEventListener(t.Event.ENTER_FRAME,this._onEnterFrame,this),this._logTouchEvent(e),e.preventDefault())}},r.prototype._onTouchBeginCapture=function(e){var r=this._checkScrollPolicy();if(r){for(var i=e.target;i!=this;){if("_checkScrollPolicy"in i&&(r=i._checkScrollPolicy()))return;i=i.parent}e.stopPropagation();var o=this.cloneTouchEvent(e);this.delayTouchBeginEvent=o,this.touchBeginTimer||(this.touchBeginTimer=new t.Timer(100,1),this.touchBeginTimer.addEventListener(t.TimerEvent.TIMER_COMPLETE,this._onTouchBeginTimer,this)),this.touchBeginTimer.start(),this._onTouchBegin(e)}},r.prototype._onTouchEndCapture=function(e){var r=this;if(this.delayTouchBeginEvent){this._onTouchBeginTimer(),e.stopPropagation();var i=this.cloneTouchEvent(e);t.callLater(function(){r.stage&&r.dispatchPropagationEvent(i)},this)}},r.prototype._onTouchBeginTimer=function(){this.touchBeginTimer.stop();var t=this.delayTouchBeginEvent;this.delayTouchBeginEvent=null,this.stage&&this.dispatchPropagationEvent(t)},r.prototype.dispatchPropagationEvent=function(e){for(var r=e.$target,i=this.$getPropagationList(r),o=i.length,n=.5*i.length,s=-1,a=0;o>a;a++)if(i[a]===this._content){s=a;break}i.splice(0,s+1),n-=s+1,this.$dispatchPropagationEvent(e,i,n),t.Event.release(e)},r.prototype._onTouchMove=function(t){if(this._ScrV_Props_._lastTouchPosition.x!=t.stageX||this._ScrV_Props_._lastTouchPosition.y!=t.stageY){if(!this._ScrV_Props_._scrollStarted){var e=t.stageX-this._ScrV_Props_._touchStartPosition.x,r=t.stageY-this._ScrV_Props_._touchStartPosition.y,i=Math.sqrt(e*e+r*r);if(i100&&r-this._ScrV_Props_._lastTouchTime<300&&this._calcVelocitys(this._ScrV_Props_._lastTouchEvent)},r.prototype._logTouchEvent=function(e){this._ScrV_Props_._lastTouchPosition.x=e.stageX,this._ScrV_Props_._lastTouchPosition.y=e.stageY,this._ScrV_Props_._lastTouchEvent=this.cloneTouchEvent(e),this._ScrV_Props_._lastTouchTime=t.getTimer()},r.prototype._getPointChange=function(t){return{x:this._ScrV_Props_._hCanScroll===!1?0:this._ScrV_Props_._lastTouchPosition.x-t.stageX,y:this._ScrV_Props_._vCanScroll===!1?0:this._ScrV_Props_._lastTouchPosition.y-t.stageY}},r.prototype._calcVelocitys=function(e){var r=t.getTimer();if(0==this._ScrV_Props_._lastTouchTime)return void(this._ScrV_Props_._lastTouchTime=r);var i=this._getPointChange(e),o=r-this._ScrV_Props_._lastTouchTime;i.x/=o,i.y/=o,this._ScrV_Props_._velocitys.push(i),this._ScrV_Props_._velocitys.length>5&&this._ScrV_Props_._velocitys.shift(),this._ScrV_Props_._lastTouchPosition.x=e.stageX,this._ScrV_Props_._lastTouchPosition.y=e.stageY},r.prototype._getContentWidth=function(){return this._content.$getExplicitWidth()||this._content.width},r.prototype._getContentHeight=function(){return this._content.$getExplicitHeight()||this._content.height},r.prototype.getMaxScrollLeft=function(){var t=this._getContentWidth()-this.width;return Math.max(0,t)},r.prototype.getMaxScrollTop=function(){var t=this._getContentHeight()-this.height;return Math.max(0,t)},r.prototype._moveAfterTouchEnd=function(){if(0!=this._ScrV_Props_._velocitys.length){for(var t={x:0,y:0},e=0,i=0;i.02?this.getAnimationDatas(s,this._ScrV_Props_._scrollLeft,h):{position:this._ScrV_Props_._scrollLeft,duration:1},_=c>.02?this.getAnimationDatas(a,this._ScrV_Props_._scrollTop,u):{position:this._ScrV_Props_._scrollTop,duration:1};this.setScrollLeft(p.position,p.duration),this.setScrollTop(_.position,_.duration)}},r.prototype.onTweenFinished=function(t){t==this._ScrV_Props_._vScrollTween&&(this._ScrV_Props_._isVTweenPlaying=!1),t==this._ScrV_Props_._hScrollTween&&(this._ScrV_Props_._isHTweenPlaying=!1),0==this._ScrV_Props_._isHTweenPlaying&&0==this._ScrV_Props_._isVTweenPlaying&&this._onScrollFinished()},r.prototype._onScrollStarted=function(){},r.prototype._onScrollFinished=function(){t.ScrollTween.removeTweens(this),this._ScrV_Props_._hScrollTween=null,this._ScrV_Props_._vScrollTween=null,this._ScrV_Props_._isHTweenPlaying=!1,this._ScrV_Props_._isVTweenPlaying=!1,this.dispatchEvent(new t.Event(t.Event.COMPLETE))},r.prototype.setScrollTop=function(e,r){void 0===r&&(r=0);var i=Math.min(this.getMaxScrollTop(),Math.max(e,0));if(0==r)return void(this.scrollTop=i);0==this._ScrV_Props_._bounces&&(e=i);var o=t.ScrollTween.get(this).to({scrollTop:e},r,t.ScrollEase.quartOut);i!=e&&o.to({scrollTop:i},300,t.ScrollEase.quintOut),this._ScrV_Props_._isVTweenPlaying=!0,this._ScrV_Props_._vScrollTween=o,o.call(this.onTweenFinished,this,[o]),this._ScrV_Props_._isHTweenPlaying||this._onScrollStarted()},r.prototype.setScrollLeft=function(e,r){void 0===r&&(r=0);var i=Math.min(this.getMaxScrollLeft(),Math.max(e,0));if(0==r)return void(this.scrollLeft=i);0==this._ScrV_Props_._bounces&&(e=i);var o=t.ScrollTween.get(this).to({scrollLeft:e},r,t.ScrollEase.quartOut);i!=e&&o.to({scrollLeft:i},300,t.ScrollEase.quintOut),this._ScrV_Props_._isHTweenPlaying=!0,this._ScrV_Props_._hScrollTween=o,o.call(this.onTweenFinished,this,[o]),this._ScrV_Props_._isVTweenPlaying||this._onScrollStarted()},r.prototype.getAnimationDatas=function(t,e,r){var i=Math.abs(t),o=.95,n=0,s=.998,a=.02,l=e+500*t;if(0>l||l>r)for(l=e;Math.abs(t)!=1/0&&Math.abs(t)>a;)l+=t,t*=0>l||l>r?s*o:s,n++;else n=500*-Math.log(a/i);var c={position:Math.min(r+50,Math.max(l,-50)),duration:n};return c},r.prototype.cloneTouchEvent=function(e){var r=new t.TouchEvent(e.type,e.bubbles,e.cancelable);return r.touchPointID=e.touchPointID,r.$stageX=e.stageX,r.$stageY=e.stageY,r.touchDown=e.touchDown,r.$isDefaultPrevented=!1,r.$target=e.target,r},r.prototype.throwNotSupportedError=function(){t.$error(1023)},r.prototype.addChild=function(t){return this.throwNotSupportedError(),null},r.prototype.addChildAt=function(t,e){return this.throwNotSupportedError(),null},r.prototype.removeChild=function(t){return this.throwNotSupportedError(),null},r.prototype.removeChildAt=function(t){return this.throwNotSupportedError(),null},r.prototype.setChildIndex=function(t,e){this.throwNotSupportedError()},r.prototype.swapChildren=function(t,e){this.throwNotSupportedError()},r.prototype.swapChildrenAt=function(t,e){this.throwNotSupportedError()},r.weight=[1,1.33,1.66,2,2.33],r}(t.DisplayObjectContainer);t.ScrollView=e,__reflect(e.prototype,"egret.ScrollView")}(egret||(egret={}));var egret;!function(t){var e=function(){function e(){this._verticalScrollPolicy="auto",this._horizontalScrollPolicy="auto",this._scrollLeft=0,this._scrollTop=0,this._hCanScroll=!1,this._vCanScroll=!1,this._lastTouchPosition=new t.Point(0,0),this._touchStartPosition=new t.Point(0,0),this._scrollStarted=!1,this._lastTouchTime=0,this._lastTouchEvent=null,this._velocitys=[],this._isHTweenPlaying=!1,this._isVTweenPlaying=!1,this._hScrollTween=null,this._vScrollTween=null,this._bounces=!0}return e}();t.ScrollViewProperties=e,__reflect(e.prototype,"egret.ScrollViewProperties")}(egret||(egret={}));var egret;!function(t){function e(e){var r=e.url;return-1==r.indexOf("?")&&e.method==t.URLRequestMethod.GET&&e.data&&e.data instanceof t.URLVariables&&(r=r+"?"+e.data.toString()),r}var r=function(r){function i(e){void 0===e&&(e=null);var i=r.call(this)||this;return i.dataFormat=t.URLLoaderDataFormat.TEXT,i.data=null,i._request=null,i._status=-1,e&&i.load(e),i}return __extends(i,r),i.prototype.load=function(r){this._request=r,this.data=null;var i=this;if(i.dataFormat==t.URLLoaderDataFormat.TEXTURE)return void this.loadTexture(i);if(i.dataFormat==t.URLLoaderDataFormat.SOUND)return void this.loadSound(i);var o=e(r),n=new t.HttpRequest;n.open(o,r.method==t.URLRequestMethod.POST?t.HttpMethod.POST:t.HttpMethod.GET);var s;if(r.method!=t.URLRequestMethod.GET&&r.data)if(r.data instanceof t.URLVariables){t.Capabilities.runtimeType==t.RuntimeType.WEB&&n.setRequestHeader("Content-Type","application/x-www-form-urlencoded");var a=r.data;s=a.toString()}else t.Capabilities.runtimeType==t.RuntimeType.WEB&&n.setRequestHeader("Content-Type","multipart/form-data"),s=r.data;else;for(var l=r.requestHeaders.length,c=0;l>c;c++){var h=r.requestHeaders[c];n.setRequestHeader(h.name,h.value)}n.addEventListener(t.Event.COMPLETE,function(){i.data=n.response,t.Event.dispatchEvent(i,t.Event.COMPLETE)},this),n.addEventListener(t.IOErrorEvent.IO_ERROR,function(){t.IOErrorEvent.dispatchIOErrorEvent(i)},this),n.responseType=i.dataFormat==t.URLLoaderDataFormat.BINARY?t.HttpResponseType.ARRAY_BUFFER:t.HttpResponseType.TEXT,n.send(s)},i.prototype.getResponseType=function(e){switch(e){case t.URLLoaderDataFormat.TEXT:case t.URLLoaderDataFormat.VARIABLES:return t.URLLoaderDataFormat.TEXT;case t.URLLoaderDataFormat.BINARY:return"arraybuffer";default:return e}},i.prototype.loadSound=function(e){function r(t){e.dispatchEvent(t)}function i(t){n(),e.dispatchEvent(t)}function o(r){n(),e.data=l,window.setTimeout(function(){e.dispatchEventWith(t.Event.COMPLETE)},0)}function n(){l.removeEventListener(t.Event.COMPLETE,o,s),l.removeEventListener(t.IOErrorEvent.IO_ERROR,i,s),l.removeEventListener(t.ProgressEvent.PROGRESS,r,s)}var s=this,a=e._request.url,l=new t.Sound;l.addEventListener(t.Event.COMPLETE,o,s),l.addEventListener(t.IOErrorEvent.IO_ERROR,i,s),l.addEventListener(t.ProgressEvent.PROGRESS,r,s),l.load(a)},i.prototype.loadTexture=function(e){function r(t){e.dispatchEvent(t)}function i(t){n(),e.dispatchEvent(t)}function o(r){n();var i=l.data;t.Capabilities.runtimeType==t.RuntimeType.WEB&&i.source.setAttribute("bitmapSrc",a);var o=new t.Texture;o._setBitmapData(i),e.data=o,window.setTimeout(function(){e.dispatchEventWith(t.Event.COMPLETE)},s)}function n(){l.removeEventListener(t.Event.COMPLETE,o,s),l.removeEventListener(t.IOErrorEvent.IO_ERROR,i,s),l.removeEventListener(t.ProgressEvent.PROGRESS,r,s)}var s=this,a=e._request.url,l=new t.ImageLoader;l.addEventListener(t.Event.COMPLETE,o,s),l.addEventListener(t.IOErrorEvent.IO_ERROR,i,s),l.addEventListener(t.ProgressEvent.PROGRESS,r,s),l.load(a)},i.prototype.__recycle=function(){this._request=null,this.data=null},i}(t.EventDispatcher);t.URLLoader=r,__reflect(r.prototype,"egret.URLLoader")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(r){var i=e.call(this)||this;return i.$bitmapData=null,i.offsetPoint=t.Point.create(0,0),i.$movieClipData=null,i.frames=null,i.$totalFrames=0,i.frameLabels=null,i.$frameLabelStart=0,i.$frameLabelEnd=0,i.frameEvents=null,i.frameIntervalTime=0,i.$eventPool=null,i.$isPlaying=!1,i.isStopped=!0,i.playTimes=0,i.$currentFrameNum=0,i.$nextFrameNum=1,i.displayedKeyFrameNum=0,i.passedTime=0,i.$frameRate=0/0,i.lastTime=0,i.$smoothing=t.Bitmap.defaultSmoothing,i.$renderNode=new t.sys.BitmapNode,i.setMovieClipData(r),i}return __extends(r,e),Object.defineProperty(r.prototype,"smoothing",{get:function(){return this.$smoothing},set:function(t){t=!!t,t!=this.$smoothing&&(this.$smoothing=t,this.$invalidate())},enumerable:!0,configurable:!0}),r.prototype.$init=function(){this.$reset();var t=this.$movieClipData;t&&t.$isDataValid()&&(this.frames=t.frames,this.$totalFrames=t.numFrames,this.frameLabels=t.labels,this.frameEvents=t.events,this.$frameRate=t.frameRate,this.frameIntervalTime=1e3/this.$frameRate,this._initFrame())},r.prototype.$reset=function(){this.frames=null,this.playTimes=0,this.$isPlaying=!1,this.setIsStopped(!0),this.$currentFrameNum=0,this.$nextFrameNum=1,this.displayedKeyFrameNum=0,this.passedTime=0,this.$eventPool=[]},r.prototype._initFrame=function(){this.$movieClipData.$isTextureValid()&&(this.advanceFrame(),this.constructFrame())},r.prototype.$render=function(){var e=this.$bitmapData;if(e){var r=Math.round(this.offsetPoint.x),i=Math.round(this.offsetPoint.y),o=e._bitmapWidth,n=e._bitmapHeight,s=e.$getTextureWidth(),a=e.$getTextureHeight(),l=Math.round(e.$getScaleBitmapWidth()),c=Math.round(e.$getScaleBitmapHeight()),h=e._sourceWidth,u=e._sourceHeight;t.sys.BitmapNode.$updateTextureData(this.$renderNode,e._bitmapData,e._bitmapX,e._bitmapY,o,n,r,i,s,a,l,c,h,u,null,t.BitmapFillMode.SCALE,this.$smoothing)}},r.prototype.$measureContentBounds=function(t){var e=this.$bitmapData;if(e){var r=this.offsetPoint.x,i=this.offsetPoint.y,o=e.$getTextureWidth(),n=e.$getTextureHeight();t.setTo(r,i,o,n)}else t.setEmpty()},r.prototype.$onAddToStage=function(t,r){e.prototype.$onAddToStage.call(this,t,r),this.$isPlaying&&this.$totalFrames>1&&this.setIsStopped(!1)},r.prototype.$onRemoveFromStage=function(){e.prototype.$onRemoveFromStage.call(this),this.setIsStopped(!0)},r.prototype.getFrameLabelByName=function(t,e){void 0===e&&(e=!1),e&&(t=t.toLowerCase());var r=this.frameLabels;if(r)for(var i=null,o=0;ot)return e;e=r}return e},r.prototype.play=function(t){void 0===t&&(t=0),this.$isPlaying=!0,this.setPlayTimes(t),this.$totalFrames>1&&this.$stage&&this.setIsStopped(!1)},r.prototype.stop=function(){this.$isPlaying=!1,this.setIsStopped(!0)},r.prototype.prevFrame=function(){this.gotoAndStop(this.$currentFrameNum-1)},r.prototype.nextFrame=function(){this.gotoAndStop(this.$currentFrameNum+1)},r.prototype.gotoAndPlay=function(e,r){void 0===r&&(r=0),(0==arguments.length||arguments.length>2)&&t.$error(1022,"MovieClip.gotoAndPlay()"),"string"==typeof e?this.getFrameStartEnd(e):(this.$frameLabelStart=0,this.$frameLabelEnd=0),this.play(r),this.gotoFrame(e)},r.prototype.gotoAndStop=function(e){1!=arguments.length&&t.$error(1022,"MovieClip.gotoAndStop()"),this.stop(),this.gotoFrame(e)},r.prototype.gotoFrame=function(e){var r;"string"==typeof e?r=this.getFrameLabelByName(e).frame:(r=parseInt(e+"",10),r!=e&&t.$error(1022,"Frame Label Not Found")),1>r?r=1:r>this.$totalFrames&&(r=this.$totalFrames),r!=this.$nextFrameNum&&(this.$nextFrameNum=r,this.advanceFrame(),this.constructFrame(),this.handlePendingEvent())},r.prototype.advanceTime=function(e){var r=this,i=e-r.lastTime;r.lastTime=e;var o=r.frameIntervalTime,n=r.passedTime+i;r.passedTime=n%o;var s=n/o;if(1>s)return!1;for(;s>=1;){if(s--,r.$nextFrameNum++,r.$nextFrameNum>r.$totalFrames||r.$frameLabelStart>0&&r.$nextFrameNum>r.$frameLabelEnd)if(-1==r.playTimes)r.$eventPool.push(t.Event.LOOP_COMPLETE),r.$nextFrameNum=1;else{if(r.playTimes--,!(r.playTimes>0)){r.$nextFrameNum=r.$totalFrames,r.$eventPool.push(t.Event.COMPLETE),r.stop();break}r.$eventPool.push(t.Event.LOOP_COMPLETE),r.$nextFrameNum=1}r.$currentFrameNum==r.$frameLabelEnd&&(r.$nextFrameNum=r.$frameLabelStart),r.advanceFrame()}return r.constructFrame(),r.handlePendingEvent(),!1},r.prototype.advanceFrame=function(){this.$currentFrameNum=this.$nextFrameNum;var e=this.frameEvents[this.$nextFrameNum];e&&""!=e&&t.MovieClipEvent.dispatchMovieClipEvent(this,t.MovieClipEvent.FRAME_LABEL,e)},r.prototype.constructFrame=function(){var t=this.$currentFrameNum;this.displayedKeyFrameNum!=t&&(this.$bitmapData=this.$movieClipData.getTextureByFrame(t),this.$movieClipData.$getOffsetByFrame(t,this.offsetPoint),this.$invalidateContentBounds(),this.displayedKeyFrameNum=t)},r.prototype.$renderFrame=function(){this.$bitmapData=this.$movieClipData.getTextureByFrame(this.$currentFrameNum),this.$invalidateContentBounds()},r.prototype.handlePendingEvent=function(){if(0!=this.$eventPool.length){this.$eventPool.reverse(); for(var e=this.$eventPool,r=e.length,i=!1,o=!1,n=0;r>n;n++){var s=e.pop();s==t.Event.LOOP_COMPLETE?o=!0:s==t.Event.COMPLETE?i=!0:this.dispatchEventWith(s)}o&&this.dispatchEventWith(t.Event.LOOP_COMPLETE),i&&this.dispatchEventWith(t.Event.COMPLETE)}},Object.defineProperty(r.prototype,"totalFrames",{get:function(){return this.$totalFrames},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"currentFrame",{get:function(){return this.$currentFrameNum},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"currentFrameLabel",{get:function(){var t=this.getFrameLabelByFrame(this.$currentFrameNum);return t&&t.name},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"currentLabel",{get:function(){var t=this.getFrameLabelForFrame(this.$currentFrameNum);return t?t.name:null},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"frameRate",{get:function(){return this.$frameRate},set:function(t){t!=this.$frameRate&&(this.$frameRate=t,this.frameIntervalTime=1e3/this.$frameRate)},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"isPlaying",{get:function(){return this.$isPlaying},enumerable:!0,configurable:!0}),Object.defineProperty(r.prototype,"movieClipData",{get:function(){return this.$movieClipData},set:function(t){this.setMovieClipData(t)},enumerable:!0,configurable:!0}),r.prototype.setMovieClipData=function(t){this.$movieClipData!=t&&(this.$movieClipData=t,this.$init())},r.prototype.setPlayTimes=function(t){(0>t||t>=1)&&(this.playTimes=0>t?-1:Math.floor(t))},r.prototype.setIsStopped=function(e){this.isStopped!=e&&(this.isStopped=e,e?t.ticker.$stopTick(this.advanceTime,this):(this.playTimes=0==this.playTimes?1:this.playTimes,this.lastTime=t.getTimer(),t.ticker.$startTick(this.advanceTime,this)))},r}(t.DisplayObject);t.MovieClip=e,__reflect(e.prototype,"egret.MovieClip")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(r){void 0===r&&(r=null);var i=e.call(this)||this;return i.data=null,i.method=t.URLRequestMethod.GET,i.url="",i.requestHeaders=[],i.url=r,i}return __extends(r,e),r}(t.HashObject);t.URLRequest=e,__reflect(e.prototype,"egret.URLRequest")}(egret||(egret={}));var egret;!function(t){var e=function(){function t(t,e){this.name="",this.value="",this.name=t,this.value=e}return t}();t.URLRequestHeader=e,__reflect(e.prototype,"egret.URLRequestHeader")}(egret||(egret={}));var egret;!function(t){var e=function(){function t(){}return t.GET="get",t.POST="post",t}();t.URLRequestMethod=e,__reflect(e.prototype,"egret.URLRequestMethod")}(egret||(egret={}));var egret;!function(t){var e=function(t){function e(e){void 0===e&&(e=null);var r=t.call(this)||this;return r.variables=null,null!==e&&r.decode(e),r}return __extends(e,t),e.prototype.decode=function(t){this.variables||(this.variables={}),t=t.split("+").join(" ");for(var e,r=/[?&]?([^=]+)=([^&]*)/g;e=r.exec(t);){var i=decodeURIComponent(e[1]),o=decodeURIComponent(e[2]);if(i in this.variables!=0){var n=this.variables[i];n instanceof Array?n.push(o):this.variables[i]=[n,o]}else this.variables[i]=o}},e.prototype.toString=function(){if(!this.variables)return"";var t=this.variables,e=[];for(var r in t)e.push(this.encodeValue(r,t[r]));return e.join("&")},e.prototype.encodeValue=function(t,e){return e instanceof Array?this.encodeArray(t,e):encodeURIComponent(t)+"="+encodeURIComponent(e)},e.prototype.encodeArray=function(t,e){return t?0==e.length?encodeURIComponent(t)+"=":e.map(function(e){return encodeURIComponent(t)+"="+encodeURIComponent(e)}).join("&"):""},e}(t.HashObject);t.URLVariables=e,__reflect(e.prototype,"egret.URLVariables")}(egret||(egret={}));var egret;!function(t){var e=function(e){function r(){var i=e.call(this)||this;return i._timeScale=1,i._paused=!1,i._callIndex=-1,i._lastTime=0,i.callBackList=[],null!=r.instance,t.ticker.$startTick(i.update,i),i._lastTime=t.getTimer(),i}return __extends(r,e),r.prototype.update=function(t){var e=t-this._lastTime;if(this._lastTime=t,this._paused)return!1;var r=e*this._timeScale;for(this._callList=this.callBackList.concat(),this._callIndex=0;this._callIndext&&(t=1),r.autoDisposeTime=t,r.frameCount=0,r}return __extends(r,e),r.$init=function(){t.ticker.$startTick(r.onUpdate,r)},r.onUpdate=function(t){for(var e=r._callBackList,i=e.length-1;i>=0;i--)e[i].$checkFrame();return!1},r.prototype.$checkFrame=function(){this.frameCount--,this.frameCount<=0&&this.dispose()},Object.defineProperty(r.prototype,"length",{get:function(){return this._length},enumerable:!0,configurable:!0}),r.prototype.push=function(t){var e=this.objectPool;-1==e.indexOf(t)&&(e.push(t),t.__recycle&&t.__recycle(),this._length++,0==this.frameCount&&(this.frameCount=this.autoDisposeTime,r._callBackList.push(this)))},r.prototype.pop=function(){return 0==this._length?null:(this._length--,this.objectPool.pop())},r.prototype.dispose=function(){this._length>0&&(this.objectPool=[],this._length=0),this.frameCount=0;var t=r._callBackList,e=t.indexOf(this);-1!=e&&t.splice(e,1)},r._callBackList=[],r}(t.HashObject);t.Recycler=e,__reflect(e.prototype,"egret.Recycler"),e.$init()}(egret||(egret={}));var egret;!function(t){function e(e,r,l){for(var c=[],h=3;h0){for(var i=0,r=this._objects;i0){for(var n=0;ni){a.length=i}t._maxCountMap[r]=i}else{t._defaultMaxCount=i;for(var r in t._poolsMap){var a=t._poolsMap[r];if(a.length>i){a.length=i}if(r in t._maxCountMap){t._maxCountMap[r]=i}}}};t.clearPool=function(e){if(e===void 0){e=null}if(e!==null){var i=String(e);var r=i in t._poolsMap?t._poolsMap[i]:null;if(r!==null&&r.length>0){r.length=0}}else{for(var a in t._poolsMap){var r=t._poolsMap[a];r.length=0}}};t.borrowObject=function(e){var i=String(e);var r=i in t._poolsMap?t._poolsMap[i]:null;if(r!==null&&r.length>0){var a=r.pop();a._isInPool=false;return a}var n=new e;n._onClear();return n};t.prototype.returnToPool=function(){this._onClear();t._returnObject(this)};t._hashCode=0;t._defaultMaxCount=3e3;t._maxCountMap={};t._poolsMap={};return t}();t.BaseObject=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,r,a,n){if(t===void 0){t=1}if(e===void 0){e=0}if(i===void 0){i=0}if(r===void 0){r=1}if(a===void 0){a=0}if(n===void 0){n=0}this.a=t;this.b=e;this.c=i;this.d=r;this.tx=a;this.ty=n}t.prototype.toString=function(){return"[object dragonBones.Matrix] a:"+this.a+" b:"+this.b+" c:"+this.c+" d:"+this.d+" tx:"+this.tx+" ty:"+this.ty};t.prototype.copyFrom=function(t){this.a=t.a;this.b=t.b;this.c=t.c;this.d=t.d;this.tx=t.tx;this.ty=t.ty;return this};t.prototype.copyFromArray=function(t,e){if(e===void 0){e=0}this.a=t[e];this.b=t[e+1];this.c=t[e+2];this.d=t[e+3];this.tx=t[e+4];this.ty=t[e+5];return this};t.prototype.identity=function(){this.a=this.d=1;this.b=this.c=0;this.tx=this.ty=0;return this};t.prototype.concat=function(t){var e=this.a*t.a;var i=0;var r=0;var a=this.d*t.d;var n=this.tx*t.a+t.tx;var s=this.ty*t.d+t.ty;if(this.b!==0||this.c!==0){e+=this.b*t.c;i+=this.b*t.d;r+=this.c*t.a;a+=this.c*t.b}if(t.b!==0||t.c!==0){i+=this.a*t.b;r+=this.d*t.c;n+=this.ty*t.c;s+=this.tx*t.b}this.a=e;this.b=i;this.c=r;this.d=a;this.tx=n;this.ty=s;return this};t.prototype.invert=function(){var t=this.a;var e=this.b;var i=this.c;var r=this.d;var a=this.tx;var n=this.ty;if(e===0&&i===0){this.b=this.c=0;if(t===0||r===0){this.a=this.b=this.tx=this.ty=0}else{t=this.a=1/t;r=this.d=1/r;this.tx=-t*a;this.ty=-r*n}return this}var s=t*r-e*i;if(s===0){this.a=this.d=1;this.b=this.c=0;this.tx=this.ty=0;return this}s=1/s;var o=this.a=r*s;e=this.b=-e*s;i=this.c=-i*s;r=this.d=t*s;this.tx=-(o*a+i*n);this.ty=-(e*a+r*n);return this};t.prototype.transformPoint=function(t,e,i,r){if(r===void 0){r=false}i.x=this.a*t+this.c*e;i.y=this.b*t+this.d*e;if(!r){i.x+=this.tx;i.y+=this.ty}};t.prototype.transformRectangle=function(t,e){if(e===void 0){e=false}var i=this.a;var r=this.b;var a=this.c;var n=this.d;var s=e?0:this.tx;var o=e?0:this.ty;var l=t.x;var h=t.y;var u=l+t.width;var f=h+t.height;var _=i*l+a*h+s;var c=r*l+n*h+o;var p=i*u+a*h+s;var m=r*u+n*h+o;var d=i*u+a*f+s;var y=r*u+n*f+o;var g=i*l+a*f+s;var v=r*l+n*f+o;var b=0;if(_>p){b=_;_=p;p=b}if(d>g){b=d;d=g;g=b}t.x=Math.floor(_g?p:g)-t.x);if(c>m){b=c;c=m;m=b}if(y>v){b=y;y=v;v=b}t.y=Math.floor(cv?m:v)-t.y)};return t}();t.Matrix=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,r,a,n){if(t===void 0){t=0}if(e===void 0){e=0}if(i===void 0){i=0}if(r===void 0){r=0}if(a===void 0){a=1}if(n===void 0){n=1}this.x=t;this.y=e;this.skew=i;this.rotation=r;this.scaleX=a;this.scaleY=n}t.normalizeRadian=function(t){t=(t+Math.PI)%(Math.PI*2);t+=t>0?-Math.PI:Math.PI;return t};t.prototype.toString=function(){return"[object dragonBones.Transform] x:"+this.x+" y:"+this.y+" skewX:"+this.skew*180/Math.PI+" skewY:"+this.rotation*180/Math.PI+" scaleX:"+this.scaleX+" scaleY:"+this.scaleY};t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y;this.skew=t.skew;this.rotation=t.rotation;this.scaleX=t.scaleX;this.scaleY=t.scaleY;return this};t.prototype.identity=function(){this.x=this.y=0;this.skew=this.rotation=0;this.scaleX=this.scaleY=1;return this};t.prototype.add=function(t){this.x+=t.x;this.y+=t.y;this.skew+=t.skew;this.rotation+=t.rotation;this.scaleX*=t.scaleX;this.scaleY*=t.scaleY;return this};t.prototype.minus=function(t){this.x-=t.x;this.y-=t.y;this.skew-=t.skew;this.rotation-=t.rotation;this.scaleX/=t.scaleX;this.scaleY/=t.scaleY;return this};t.prototype.fromMatrix=function(e){var i=this.scaleX,r=this.scaleY;var a=t.PI_Q;this.x=e.tx;this.y=e.ty;this.rotation=Math.atan(e.b/e.a);var n=Math.atan(-e.c/e.d);this.scaleX=this.rotation>-a&&this.rotation-a&&n=0&&this.scaleX<0){this.scaleX=-this.scaleX;this.rotation=this.rotation-Math.PI}if(r>=0&&this.scaleY<0){this.scaleY=-this.scaleY;n=n-Math.PI}this.skew=n-this.rotation;return this};t.prototype.toMatrix=function(t){if(this.skew!==0||this.rotation!==0){t.a=Math.cos(this.rotation);t.b=Math.sin(this.rotation);if(this.skew===0){t.c=-t.b;t.d=t.a}else{t.c=-Math.sin(this.skew+this.rotation);t.d=Math.cos(this.skew+this.rotation)}if(this.scaleX!==1){t.a*=this.scaleX;t.b*=this.scaleX}if(this.scaleY!==1){t.c*=this.scaleY;t.d*=this.scaleY}}else{t.a=this.scaleX;t.b=0;t.c=0;t.d=this.scaleY}t.tx=this.x;t.ty=this.y;return this};t.PI_D=Math.PI*2;t.PI_H=Math.PI/2;t.PI_Q=Math.PI/4;t.RAD_DEG=180/Math.PI;t.DEG_RAD=Math.PI/180;return t}();t.Transform=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,r,a,n,s,o){if(t===void 0){t=1}if(e===void 0){e=1}if(i===void 0){i=1}if(r===void 0){r=1}if(a===void 0){a=0}if(n===void 0){n=0}if(s===void 0){s=0}if(o===void 0){o=0}this.alphaMultiplier=t;this.redMultiplier=e;this.greenMultiplier=i;this.blueMultiplier=r;this.alphaOffset=a;this.redOffset=n;this.greenOffset=s;this.blueOffset=o}t.prototype.copyFrom=function(t){this.alphaMultiplier=t.alphaMultiplier;this.redMultiplier=t.redMultiplier;this.greenMultiplier=t.greenMultiplier;this.blueMultiplier=t.blueMultiplier;this.alphaOffset=t.alphaOffset;this.redOffset=t.redOffset;this.greenOffset=t.greenOffset;this.blueOffset=t.blueOffset};t.prototype.identity=function(){this.alphaMultiplier=this.redMultiplier=this.greenMultiplier=this.blueMultiplier=1;this.alphaOffset=this.redOffset=this.greenOffset=this.blueOffset=0};return t}();t.ColorTransform=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e){if(t===void 0){t=0}if(e===void 0){e=0}this.x=t;this.y=e}t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y};t.prototype.clear=function(){this.x=this.y=0};return t}();t.Point=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(){function t(t,e,i,r){if(t===void 0){t=0}if(e===void 0){e=0}if(i===void 0){i=0}if(r===void 0){r=0}this.x=t;this.y=e;this.width=i;this.height=r}t.prototype.copyFrom=function(t){this.x=t.x;this.y=t.y;this.width=t.width;this.height=t.height};t.prototype.clear=function(){this.x=this.y=0;this.width=this.height=0};return t}();t.Rectangle=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.ints=[];e.floats=[];e.strings=[];return e}e.toString=function(){return"[class dragonBones.UserData]"};e.prototype._onClear=function(){this.ints.length=0;this.floats.length=0;this.strings.length=0};e.prototype.addInt=function(t){this.ints.push(t)};e.prototype.addFloat=function(t){this.floats.push(t)};e.prototype.addString=function(t){this.strings.push(t)};e.prototype.getInt=function(t){if(t===void 0){t=0}return t>=0&&t=0&&t=0&&t=t){i=0}if(this.sortedBones.indexOf(a)>=0){continue}var n=false;for(var s in this.constraints){var o=this.constraints[s];if(o.root===a&&this.sortedBones.indexOf(o.target)<0){n=true;break}}if(n){continue}if(a.parent!==null&&this.sortedBones.indexOf(a.parent)<0){continue}this.sortedBones.push(a);r++}};i.prototype.cacheFrames=function(t){if(this.cacheFrameRate>0){return}this.cacheFrameRate=t;for(var e in this.animations){this.animations[e].cacheFrames(this.cacheFrameRate)}};i.prototype.setCacheFrame=function(t,e){var i=this.parent.cachedFrames;var r=i.length;i.length+=10;i[r]=t.a;i[r+1]=t.b;i[r+2]=t.c;i[r+3]=t.d;i[r+4]=t.tx;i[r+5]=t.ty;i[r+6]=e.rotation;i[r+7]=e.skew;i[r+8]=e.scaleX;i[r+9]=e.scaleY;return r};i.prototype.getCacheFrame=function(t,e,i){var r=this.parent.cachedFrames;t.a=r[i];t.b=r[i+1];t.c=r[i+2];t.d=r[i+3];t.tx=r[i+4];t.ty=r[i+5];e.rotation=r[i+6];e.skew=r[i+7];e.scaleX=r[i+8];e.scaleY=r[i+9];e.x=t.tx;e.y=t.ty};i.prototype.addBone=function(t){if(t.name in this.bones){console.warn("Same bone: "+t.name);return}this.bones[t.name]=t;this.sortedBones.push(t)};i.prototype.addSlot=function(t){if(t.name in this.slots){console.warn("Same slot: "+t.name);return}this.slots[t.name]=t;this.sortedSlots.push(t)};i.prototype.addConstraint=function(t){if(t.name in this.constraints){console.warn("Same constraint: "+t.name);return}this.constraints[t.name]=t};i.prototype.addSkin=function(t){if(t.name in this.skins){console.warn("Same skin: "+t.name);return}t.parent=this;this.skins[t.name]=t;if(this.defaultSkin===null){this.defaultSkin=t}if(t.name==="default"){this.defaultSkin=t}};i.prototype.addAnimation=function(t){if(t.name in this.animations){console.warn("Same animation: "+t.name);return}t.parent=this;this.animations[t.name]=t;this.animationNames.push(t.name);if(this.defaultAnimation===null){this.defaultAnimation=t}};i.prototype.addAction=function(t,e){if(e){this.defaultActions.push(t)}else{this.actions.push(t)}};i.prototype.getBone=function(t){return t in this.bones?this.bones[t]:null};i.prototype.getSlot=function(t){return t in this.slots?this.slots[t]:null};i.prototype.getConstraint=function(t){return t in this.constraints?this.constraints[t]:null};i.prototype.getSkin=function(t){return t in this.skins?this.skins[t]:null};i.prototype.getAnimation=function(t){return t in this.animations?this.animations[t]:null};return i}(t.BaseObject);t.ArmatureData=e;var i=function(e){__extends(i,e);function i(){var i=e!==null&&e.apply(this,arguments)||this;i.transform=new t.Transform;i.userData=null;return i}i.toString=function(){return"[class dragonBones.BoneData]"};i.prototype._onClear=function(){if(this.userData!==null){this.userData.returnToPool()}this.inheritTranslation=false;this.inheritRotation=false;this.inheritScale=false;this.inheritReflection=false;this.length=0;this.name="";this.transform.identity();this.userData=null;this.parent=null};return i}(t.BaseObject);t.BoneData=i;var r=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.vertices=[];return e}e.toString=function(){return"[class dragonBones.SurfaceData]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.vertexCountX=0;this.vertexCountY=0;this.vertices.length=0};return e}(i);t.SurfaceData=r;var a=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t.color=null;t.userData=null;return t}i.createColor=function(){return new t.ColorTransform};i.toString=function(){return"[class dragonBones.SlotData]"};i.prototype._onClear=function(){if(this.userData!==null){this.userData.returnToPool()}this.blendMode=0;this.displayIndex=0;this.zOrder=0;this.name="";this.color=null;this.userData=null;this.parent=null};i.DEFAULT_COLOR=new t.ColorTransform;return i}(t.BaseObject);t.SlotData=a})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.CanvasData]"};e.prototype._onClear=function(){this.hasBackground=false;this.color=0;this.x=0;this.y=0;this.width=0;this.height=0};return e}(t.BaseObject);t.CanvasData=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.displays={};return e}e.toString=function(){return"[class dragonBones.SkinData]"};e.prototype._onClear=function(){for(var t in this.displays){var e=this.displays[t];for(var i=0,r=e;ia){s|=2}if(en){s|=8}return s};e.rectangleIntersectsSegment=function(t,i,r,a,n,s,o,l,h,u,f){if(h===void 0){h=null}if(u===void 0){u=null}if(f===void 0){f=null}var _=t>n&&ts&&in&&rs&&a=-i&&t<=i){var r=this.height*.5;if(e>=-r&&e<=r){return true}}return false};e.prototype.intersectsSegment=function(t,i,r,a,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}var l=this.width*.5;var h=this.height*.5;var u=e.rectangleIntersectsSegment(t,i,r,a,-l,-h,l,h,n,s,o);return u};return e}(e);t.RectangleBoundingBoxData=i;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.EllipseData]"};e.ellipseIntersectsSegment=function(t,e,i,r,a,n,s,o,l,h,u){if(l===void 0){l=null}if(h===void 0){h=null}if(u===void 0){u=null}var f=s/o;var _=f*f;e*=f;r*=f;var c=i-t;var p=r-e;var m=Math.sqrt(c*c+p*p);var d=c/m;var y=p/m;var g=(a-t)*d+(n-e)*y;var v=g*g;var b=t*t+e*e;var T=s*s;var D=T-b+v;var A=0;if(D>=0){var x=Math.sqrt(D);var O=g-x;var S=g+x;var E=O<0?-1:O<=m?0:1;var B=S<0?-1:S<=m?0:1;var M=E*B;if(M<0){return-1}else if(M===0){if(E===-1){A=2;i=t+S*d;r=(e+S*y)/f;if(l!==null){l.x=i;l.y=r}if(h!==null){h.x=i;h.y=r}if(u!==null){u.x=Math.atan2(r/T*_,i/T);u.y=u.x+Math.PI}}else if(B===1){A=1;t=t+O*d;e=(e+O*y)/f;if(l!==null){l.x=t;l.y=e}if(h!==null){h.x=t;h.y=e}if(u!==null){u.x=Math.atan2(e/T*_,t/T);u.y=u.x+Math.PI}}else{A=3;if(l!==null){l.x=t+O*d;l.y=(e+O*y)/f;if(u!==null){u.x=Math.atan2(l.y/T*_,l.x/T)}}if(h!==null){h.x=t+S*d;h.y=(e+S*y)/f;if(u!==null){u.y=Math.atan2(h.y/T*_,h.x/T)}}}}}return A};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.type=1};e.prototype.containsPoint=function(t,e){var i=this.width*.5;if(t>=-i&&t<=i){var r=this.height*.5;if(e>=-r&&e<=r){e*=i/r;return Math.sqrt(t*t+e*e)<=i}}return false};e.prototype.intersectsSegment=function(t,i,r,a,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}var l=e.ellipseIntersectsSegment(t,i,r,a,0,0,this.width*.5,this.height*.5,n,s,o);return l};return e}(e);t.EllipseBoundingBoxData=r;var a=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.vertices=[];e.weight=null;return e}e.toString=function(){return"[class dragonBones.PolygonBoundingBoxData]"};e.polygonIntersectsSegment=function(t,e,i,r,a,n,s,o){if(n===void 0){n=null}if(s===void 0){s=null}if(o===void 0){o=null}if(t===i){t=i+1e-6}if(e===r){e=r+1e-6}var l=a.length;var h=t-i;var u=e-r;var f=t*r-e*i;var _=0;var c=a[l-2];var p=a[l-1];var m=0;var d=0;var y=0;var g=0;var v=0;var b=0;for(var T=0;T=c&&B<=D||B>=D&&B<=c)&&(h===0||B>=t&&B<=i||B>=i&&B<=t)){var M=(f*O-u*S)/E;if((M>=p&&M<=A||M>=A&&M<=p)&&(u===0||M>=e&&M<=r||M>=r&&M<=e)){if(s!==null){var w=B-t;if(w<0){w=-w}if(_===0){m=w;d=w;y=B;g=M;v=B;b=M;if(o!==null){o.x=Math.atan2(A-p,D-c)-Math.PI*.5;o.y=o.x}}else{if(wd){d=w;v=B;b=M;if(o!==null){o.y=Math.atan2(A-p,D-c)-Math.PI*.5}}}_++}else{y=B;g=M;v=B;b=M;_++;if(o!==null){o.x=Math.atan2(A-p,D-c)-Math.PI*.5;o.y=o.x}break}}}c=D;p=A}if(_===1){if(n!==null){n.x=y;n.y=g}if(s!==null){s.x=y;s.y=g}if(o!==null){o.y=o.x+Math.PI}}else if(_>1){_++;if(n!==null){n.x=y;n.y=g}if(s!==null){s.x=v;s.y=b}}return _};e.prototype._onClear=function(){t.prototype._onClear.call(this);if(this.weight!==null){this.weight.returnToPool()}this.type=2;this.x=0;this.y=0;this.vertices.length=0;this.weight=null};e.prototype.containsPoint=function(t,e){var i=false;if(t>=this.x&&t<=this.width&&e>=this.y&&e<=this.height){for(var r=0,a=this.vertices.length,n=a-2;r=e||s=e){var l=this.vertices[n];var h=this.vertices[r];if((e-o)*(l-h)/(s-o)+h0){return}this.cacheFrameRate=Math.max(Math.ceil(t*this.scale),1);var e=Math.ceil(this.cacheFrameRate*this.duration)+1;this.cachedFrames.length=e;for(var i=0,r=this.cacheFrames.length;i=0};e.prototype.addBoneMask=function(t,e,i){if(i===void 0){i=true}var r=t.getBone(e);if(r===null){return}if(this.boneMask.indexOf(e)<0){this.boneMask.push(e)}if(i){for(var a=0,n=t.getBones();a=0){this.boneMask.splice(r,1)}if(i){var a=t.getBone(e);if(a!==null){if(this.boneMask.length>0){for(var n=0,s=t.getBones();n=0&&a.contains(o)){this.boneMask.splice(l,1)}}}else{for(var h=0,u=t.getBones();he._zOrder?1:-1};i.prototype._onClear=function(){if(this._clock!==null){this._clock.remove(this)}for(var t=0,e=this._bones;t=t){i=0}if(this._bones.indexOf(a)>=0){continue}if(a._hasConstraint){var n=false;for(var s=0,o=this._constraints;s=n){continue}var o=i[s];var l=this.getSlot(o.name);if(l!==null){l._setZorder(a)}}this._slotsDirty=true;this._zOrderDirty=!r}};i.prototype._addBoneToBoneList=function(t){if(this._bones.indexOf(t)<0){this._bonesDirty=true;this._bones.push(t)}};i.prototype._removeBoneFromBoneList=function(t){var e=this._bones.indexOf(t);if(e>=0){this._bones.splice(e,1)}};i.prototype._addSlotToSlotList=function(t){if(this._slots.indexOf(t)<0){this._slotsDirty=true;this._slots.push(t)}};i.prototype._removeSlotFromSlotList=function(t){var e=this._slots.indexOf(t);if(e>=0){this._slots.splice(e,1)}};i.prototype._bufferAction=function(t,e){if(this._actions.indexOf(t)<0){if(e){this._actions.push(t)}else{this._actions.unshift(t)}}};i.prototype.dispose=function(){if(this._armatureData!==null){this._lockUpdate=true;this._dragonBones.bufferObject(this)}};i.prototype.init=function(e,i,r,a){if(this._armatureData!==null){return}this._armatureData=e;this._animation=t.BaseObject.borrowObject(t.Animation);this._proxy=i;this._display=r;this._dragonBones=a;this._proxy.dbInit(this);this._animation.init(this);this._animation.animations=this._armatureData.animations};i.prototype.advanceTime=function(t){if(this._lockUpdate){return}if(this._armatureData===null){console.warn("The armature has been disposed.");return}else if(this._armatureData.parent===null){console.warn("The armature data has been disposed.\nPlease make sure dispose armature before call factory.clear().");return}var e=this._cacheFrameIndex;this._animation.advanceTime(t);if(this._bonesDirty){this._bonesDirty=false;this._sortBones()}if(this._slotsDirty){this._slotsDirty=false;this._sortSlots()}if(this._cacheFrameIndex<0||this._cacheFrameIndex!==e){var i=0,r=0;for(i=0,r=this._bones.length;i0){this._lockUpdate=true;for(var a=0,n=this._actions;a0){var i=this.getBone(t);if(i!==null){i.invalidUpdate();if(e){for(var r=0,a=this._slots;r0){if(a!==null||n!==null){if(a!==null){var D=o?a.y-e:a.x-t;if(D<0){D=-D}if(d===null||Dh){h=D;_=n.x;c=n.y;y=b;if(s!==null){m=s.y}}}}else{d=b;break}}}if(d!==null&&a!==null){a.x=u;a.y=f;if(s!==null){s.x=p}}if(y!==null&&n!==null){n.x=_;n.y=c;if(s!==null){s.y=m}}return d};i.prototype.getBone=function(t){for(var e=0,i=this._bones;e0?this.getBone(e):null)};i.prototype.addSlot=function(t,e){var i=this.getBone(e);console.assert(t!==null&&i!==null);t._setArmature(this);t._setParent(i)};i.prototype.addConstraint=function(t){if(this._constraints.indexOf(t)<0){this._constraints.push(t)}};i.prototype.removeBone=function(t){console.assert(t!==null&&t.armature===this);t._setParent(null);t._setArmature(null)};i.prototype.removeSlot=function(t){console.assert(t!==null&&t.armature===this);t._setParent(null);t._setArmature(null)};i.prototype.getBones=function(){return this._bones};i.prototype.getSlots=function(){return this._slots};Object.defineProperty(i.prototype,"flipX",{get:function(){return this._flipX},set:function(t){if(this._flipX===t){return}this._flipX=t;this.invalidUpdate()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"flipY",{get:function(){return this._flipY},set:function(t){if(this._flipY===t){return}this._flipY=t;this.invalidUpdate()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"cacheFrameRate",{get:function(){return this._armatureData.cacheFrameRate},set:function(t){if(this._armatureData.cacheFrameRate!==t){this._armatureData.cacheFrames(t);for(var e=0,i=this._slots;e=0&&this._cachedFrameIndices!==null){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e){this._transformDirty=false}else if(e>=0){this._transformDirty=true;this._cachedFrameIndex=e}else{if(this._hasConstraint){for(var i=0,r=this._armature._constraints;i=0){this._transformDirty=false;this._cachedFrameIndices[t]=this._cachedFrameIndex}else{this._transformDirty=true;this._cachedFrameIndex=-1}}}else{if(this._hasConstraint){for(var n=0,s=this._armature._constraints;n=0;if(this._localDirty){this._updateGlobalTransformMatrix(o)}if(o&&this._cachedFrameIndices!==null){this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global)}}else{this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex)}}else if(this._childrenTransformDirty){this._childrenTransformDirty=false}this._localDirty=true};i.prototype.updateByConstraint=function(){if(this._localDirty){this._localDirty=false;if(this._transformDirty||this._parent!==null&&this._parent._childrenTransformDirty){this._updateGlobalTransformMatrix(true)}this._transformDirty=true}};i.prototype.invalidUpdate=function(){this._transformDirty=true};i.prototype.contains=function(t){if(t===this){return false}var e=t;while(e!==this&&e!==null){e=e.parent}return e===this};Object.defineProperty(i.prototype,"boneData",{get:function(){return this._boneData},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){if(this._visible===t){return}this._visible=t;for(var e=0,i=this._armature.getSlots();e=0&&this._rawDisplayDatas!==null&&this._displayIndex=0&&this._displayIndex=0&&this._displayIndex=0&&this._rawDisplayDatas!==null&&this._displayIndex0){for(var o=0,l=n;o0){if(this._displayList.length!==e.length){this._displayList.length=e.length}for(var i=0,r=e.length;i0){this._displayList.length=0}if(this._displayIndex>=0&&this._displayIndex=0&&this._cachedFrameIndices!==null){var e=this._cachedFrameIndices[t];if(e>=0&&this._cachedFrameIndex===e){this._transformDirty=false}else if(e>=0){this._transformDirty=true;this._cachedFrameIndex=e}else if(this._transformDirty||this._parent._childrenTransformDirty){this._transformDirty=true;this._cachedFrameIndex=-1}else if(this._cachedFrameIndex>=0){this._transformDirty=false;this._cachedFrameIndices[t]=this._cachedFrameIndex}else{this._transformDirty=true;this._cachedFrameIndex=-1}}else if(this._transformDirty||this._parent._childrenTransformDirty){t=-1;this._transformDirty=true;this._cachedFrameIndex=-1}if(this._display===null){return}if(this._visibleDirty){this._visibleDirty=false;this._updateVisible()}if(this._blendModeDirty){this._blendModeDirty=false;this._updateBlendMode()}if(this._colorDirty){this._colorDirty=false;this._updateColor()}if(this._meshData!==null&&this._display===this._meshDisplay){var i=this._meshData.weight!==null;if(this._meshDirty||i&&this._isMeshBonesUpdate()){this._meshDirty=false;this._updateMesh()}if(i){if(this._transformDirty&&this._skinedMeshTransformDirty){this._transformDirty=false;this._skinedMeshTransformDirty=false;this._updateTransform(true)}return}}if(this._transformDirty){this._transformDirty=false;if(this._cachedFrameIndex<0){var r=t>=0;this._updateGlobalTransformMatrix(r);if(r&&this._cachedFrameIndices!==null){this._cachedFrameIndex=this._cachedFrameIndices[t]=this._armature._armatureData.setCacheFrame(this.globalTransformMatrix,this.global)}}else{this._armature._armatureData.getCacheFrame(this.globalTransformMatrix,this.global,this._cachedFrameIndex)}this._updateTransform(false)}};i.prototype.updateTransformAndMatrix=function(){if(this._transformDirty){this._transformDirty=false;this._updateGlobalTransformMatrix(false)}};i.prototype.replaceDisplayData=function(t,e){if(e===void 0){e=-1}if(e<0){if(this._displayIndex<0){e=0}else{e=this._displayIndex}}if(this._displayDatas.length<=e){this._displayDatas.length=e+1;for(var i=0,r=this._displayDatas.length;i0){if(l===1||l===2){if(n!==null){this.globalTransformMatrix.transformPoint(n.x,n.y,n);if(s!==null){s.x=n.x;s.y=n.y}}else if(s!==null){this.globalTransformMatrix.transformPoint(s.x,s.y,s)}}else{if(n!==null){this.globalTransformMatrix.transformPoint(n.x,n.y,n)}if(s!==null){this.globalTransformMatrix.transformPoint(s.x,s.y,s)}}if(o!==null){this.globalTransformMatrix.transformPoint(Math.cos(o.x),Math.sin(o.x),i._helpPoint,true);o.x=Math.atan2(i._helpPoint.y,i._helpPoint.x);this.globalTransformMatrix.transformPoint(Math.cos(o.y),Math.sin(o.y),i._helpPoint,true);o.y=Math.atan2(i._helpPoint.y,i._helpPoint.x)}}return l};i.prototype.invalidUpdate=function(){this._displayDirty=true;this._transformDirty=true};Object.defineProperty(i.prototype,"visible",{get:function(){return this._visible},set:function(t){if(this._visible===t){return}this._visible=t;this._updateVisible()},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"displayIndex",{get:function(){return this._displayIndex},set:function(t){if(this._setDisplayIndex(t)){this.update(-1)}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"name",{get:function(){return this._slotData.name},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"displayList",{get:function(){return this._displayList.concat()},set:function(e){var i=this._displayList.concat();var r=new Array;if(this._setDisplayList(e)){this.update(-1)}for(var a=0,n=i;a0){this._animatebles[e-i]=a;this._animatebles[e]=null}a.advanceTime(t)}else{i++}}if(i>0){r=this._animatebles.length;for(;e=0){this._animatebles[e]=null;t.clock=null}};t.prototype.clear=function(){for(var t=0,e=this._animatebles;t0&&i._subFadeState>0){this._armature._dragonBones.bufferObject(i);this._animationStates.length=0;this._lastAnimationState=null}else{var r=i._animationData;var a=r.cacheFrameRate;if(this._animationDirty&&a>0){this._animationDirty=false;for(var n=0,s=this._armature.getBones();n1){for(var f=0,_=0;f0&&i._subFadeState>0){_++;this._armature._dragonBones.bufferObject(i);this._animationDirty=true;if(this._lastAnimationState===i){this._lastAnimationState=null}}else{if(_>0){this._animationStates[f-_]=i}i.advanceTime(t,0)}if(f===e-1&&_>0){this._animationStates.length-=_;if(this._lastAnimationState===null&&this._animationStates.length>0){this._lastAnimationState=this._animationStates[this._animationStates.length-1]}}}this._armature._cacheFrameIndex=-1}else{this._armature._cacheFrameIndex=-1}};i.prototype.reset=function(){for(var t=0,e=this._animationStates;t1){if(e.position<0){e.position%=r.duration;e.position=r.duration-e.position}else if(e.position===r.duration){e.position-=1e-6}else if(e.position>r.duration){e.position%=r.duration}if(e.duration>0&&e.position+e.duration>r.duration){e.duration=r.duration-e.position}if(e.playTimes<0){e.playTimes=r.playTimes}}else{e.playTimes=1;e.position=0;if(e.duration>0){e.duration=0}}if(e.duration===0){e.duration=-1}this._fadeOut(e);var o=t.BaseObject.borrowObject(t.AnimationState);o.init(this._armature,r,e);this._animationDirty=true;this._armature._cacheFrameIndex=-1;if(this._animationStates.length>0){var l=false;for(var h=0,u=this._animationStates.length;h=this._animationStates[h].layer){}else{l=true;this._animationStates.splice(h,0,o);break}}if(!l){this._animationStates.push(o)}}else{this._animationStates.push(o)}for(var f=0,_=this._armature.getSlots();f<_.length;f++){var c=_[f];var p=c.childArmature;if(p!==null&&p.inheritAnimation&&p.animation.hasAnimation(i)&&p.animation.getState(i)===null){p.animation.fadeIn(i)}}if(e.fadeInTime<=0){this._armature.advanceTime(0)}this._lastAnimationState=o;return o};i.prototype.play=function(t,e){if(t===void 0){t=null}if(e===void 0){e=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=e;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t!==null?t:"";if(t!==null&&t.length>0){this.playConfig(this._animationConfig)}else if(this._lastAnimationState===null){var i=this._armature.armatureData.defaultAnimation;if(i!==null){this._animationConfig.animation=i.name;this.playConfig(this._animationConfig)}}else if(!this._lastAnimationState.isPlaying&&!this._lastAnimationState.isCompleted){this._lastAnimationState.play()}else{this._animationConfig.animation=this._lastAnimationState.name;this.playConfig(this._animationConfig)}return this._lastAnimationState};i.prototype.fadeIn=function(t,e,i,r,a,n){if(e===void 0){e=-1}if(i===void 0){i=-1}if(r===void 0){r=0}if(a===void 0){a=null}if(n===void 0){n=3}this._animationConfig.clear();this._animationConfig.fadeOutMode=n;this._animationConfig.playTimes=i;this._animationConfig.layer=r;this._animationConfig.fadeInTime=e;this._animationConfig.animation=t;this._animationConfig.group=a!==null?a:"";return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByTime=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.position=e;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByFrame=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;var r=t in this._animations?this._animations[t]:null;if(r!==null){this._animationConfig.position=r.duration*e/r.frameCount}return this.playConfig(this._animationConfig)};i.prototype.gotoAndPlayByProgress=function(t,e,i){if(e===void 0){e=0}if(i===void 0){i=-1}this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.playTimes=i;this._animationConfig.fadeInTime=0;this._animationConfig.animation=t;var r=t in this._animations?this._animations[t]:null;if(r!==null){this._animationConfig.position=r.duration*(e>0?e:0)}return this.playConfig(this._animationConfig)};i.prototype.gotoAndStopByTime=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByTime(t,e,1);if(i!==null){i.stop()}return i};i.prototype.gotoAndStopByFrame=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByFrame(t,e,1);if(i!==null){i.stop()}return i};i.prototype.gotoAndStopByProgress=function(t,e){if(e===void 0){e=0}var i=this.gotoAndPlayByProgress(t,e,1);if(i!==null){i.stop()}return i};i.prototype.getState=function(t){var e=this._animationStates.length;while(e--){var i=this._animationStates[e];if(i.name===t){return i}}return null};i.prototype.hasAnimation=function(t){return t in this._animations};i.prototype.getStates=function(){return this._animationStates};Object.defineProperty(i.prototype,"isPlaying",{get:function(){for(var t=0,e=this._animationStates;t0},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"lastAnimationName",{get:function(){return this._lastAnimationState!==null?this._lastAnimationState.name:""},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationNames",{get:function(){return this._animationNames},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animations",{get:function(){return this._animations},set:function(t){if(this._animations===t){return}this._animationNames.length=0;for(var e in this._animations){delete this._animations[e]}for(var e in t){this._animationNames.push(e);this._animations[e]=t[e]}},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationConfig",{get:function(){this._animationConfig.clear();return this._animationConfig},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"lastAnimationState",{get:function(){return this._lastAnimationState},enumerable:true,configurable:true});i.prototype.gotoAndPlay=function(t,e,i,r,a,n,s,o,l){if(e===void 0){e=-1}if(i===void 0){i=-1}if(r===void 0){r=-1}if(a===void 0){a=0}if(n===void 0){n=null}if(s===void 0){s=3}if(o===void 0){o=true}if(l===void 0){l=true}o;l;this._animationConfig.clear();this._animationConfig.resetToPose=true;this._animationConfig.fadeOutMode=s;this._animationConfig.playTimes=r;this._animationConfig.layer=a;this._animationConfig.fadeInTime=e;this._animationConfig.animation=t;this._animationConfig.group=n!==null?n:"";var h=this._animations[t];if(h&&i>0){this._animationConfig.timeScale=h.duration/i}return this.playConfig(this._animationConfig)};i.prototype.gotoAndStop=function(t,e){if(e===void 0){e=0}return this.gotoAndStopByTime(t,e)};Object.defineProperty(i.prototype,"animationList",{get:function(){return this._animationNames},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationDataList",{get:function(){var t=[];for(var e=0,i=this._animationNames.length;e0;if(this._subFadeState<0){this._subFadeState=0;var r=i?t.EventObject.FADE_OUT:t.EventObject.FADE_IN;if(this._armature.eventDispatcher.hasDBEventListener(r)){var a=t.BaseObject.borrowObject(t.EventObject);a.type=r;a.armature=this._armature;a.animationState=this;this._armature._dragonBones.bufferEvent(a)}}if(e<0){e=-e}this._fadeTime+=e;if(this._fadeTime>=this.fadeTotalTime){this._subFadeState=1;this._fadeProgress=i?0:1}else if(this._fadeTime>0){this._fadeProgress=i?1-this._fadeTime/this.fadeTotalTime:this._fadeTime/this.fadeTotalTime}else{this._fadeProgress=i?1:0}if(this._subFadeState>0){if(!i){this._playheadState|=1;this._fadeState=0}var r=i?t.EventObject.FADE_OUT_COMPLETE:t.EventObject.FADE_IN_COMPLETE;if(this._armature.eventDispatcher.hasDBEventListener(r)){var a=t.BaseObject.borrowObject(t.EventObject);a.type=r;a.armature=this._armature;a.animationState=this;this._armature._dragonBones.bufferEvent(a)}}};r.prototype._blendBoneTimline=function(t){var e=this._weightResult>0?this._weightResult:-this._weightResult;var i=t.bone;var r=t.bonePose.result;var a=i.animationPose;if(!i._blendDirty){i._blendDirty=true;i._blendLayer=this.layer;i._blendLayerWeight=e;i._blendLeftWeight=1;a.x=r.x*e;a.y=r.y*e;a.rotation=r.rotation*e;a.skew=r.skew*e;a.scaleX=(r.scaleX-1)*e+1;a.scaleY=(r.scaleY-1)*e+1}else{e*=i._blendLeftWeight;i._blendLayerWeight+=e;a.x+=r.x*e;a.y+=r.y*e;a.rotation+=r.rotation*e;a.skew+=r.skew*e;a.scaleX+=(r.scaleX-1)*e;a.scaleY+=(r.scaleY-1)*e}if(this._fadeState!==0||this._subFadeState!==0){i._transformDirty=true}};r.prototype.init=function(e,i,r){if(this._armature!==null){return}this._armature=e;this._animationData=i;this.resetToPose=r.resetToPose;this.additiveBlending=r.additiveBlending;this.displayControl=r.displayControl;this.actionEnabled=r.actionEnabled;this.layer=r.layer;this.playTimes=r.playTimes;this.timeScale=r.timeScale;this.fadeTotalTime=r.fadeInTime;this.autoFadeOutTime=r.autoFadeOutTime;this.weight=r.weight;this.name=r.name.length>0?r.name:r.animation;this.group=r.group;if(r.pauseFadeIn){this._playheadState=2}else{this._playheadState=3}if(r.duration<0){this._position=0;this._duration=this._animationData.duration;if(r.position!==0){if(this.timeScale>=0){this._time=r.position}else{this._time=r.position-this._duration}}else{this._time=0}}else{this._position=r.position;this._duration=r.duration;this._time=0}if(this.timeScale<0&&this._time===0){this._time=-1e-6}if(this.fadeTotalTime<=0){this._fadeProgress=.999999}if(r.boneMask.length>0){this._boneMask.length=r.boneMask.length;for(var a=0,n=this._boneMask.length;a0;var a=true;var n=true;var s=this._time;this._weightResult=this.weight*this._fadeProgress;if(this._actionTimeline.playState<=0){this._actionTimeline.update(s)}if(r){var o=i*2;this._actionTimeline.currentTime=Math.floor(this._actionTimeline.currentTime*o)/o}if(this._zOrderTimeline!==null&&this._zOrderTimeline.playState<=0){this._zOrderTimeline.update(s)}if(r){var l=Math.floor(this._actionTimeline.currentTime*i);if(this._armature._cacheFrameIndex===l){a=false;n=false}else{this._armature._cacheFrameIndex=l;if(this._animationData.cachedFrames[l]){n=false}else{this._animationData.cachedFrames[l]=true}}}if(a){if(n){var h=null;var u=null;for(var f=0,_=this._boneTimelines.length;f<_;++f){var c=this._boneTimelines[f];if(h!==c.bone){if(h!==null){this._blendBoneTimline(u);if(h._blendDirty){if(h._blendLeftWeight>0){if(h._blendLayer!==this.layer){if(h._blendLayerWeight>=h._blendLeftWeight){h._blendLeftWeight=0;h=null}else{h._blendLayer=this.layer;h._blendLeftWeight-=h._blendLayerWeight;h._blendLayerWeight=0}}}else{h=null}}}h=c.bone}if(h!==null){if(c.playState<=0){c.update(s)}if(f===_-1){this._blendBoneTimline(c)}else{u=c}}}}if(this.displayControl){for(var f=0,_=this._slotTimelines.length;f<_;++f){var c=this._slotTimelines[f];var p=c.slot.displayController;if(p===null||p===this.name||p===this.group){if(c.playState<=0){c.update(s)}}}}for(var f=0,_=this._constraintTimelines.length;f<_;++f){var c=this._constraintTimelines[f];if(c.playState<=0){c.update(s)}}}if(this._fadeState===0){if(this._subFadeState>0){this._subFadeState=0;if(this._poseTimelines.length>0){for(var m=0,d=this._poseTimelines;m0){if(this.autoFadeOutTime>=0){this.fadeOut(this.autoFadeOutTime)}}}};r.prototype.play=function(){this._playheadState=3};r.prototype.stop=function(){this._playheadState&=1};r.prototype.fadeOut=function(t,e){if(e===void 0){e=true}if(t<0){t=0}if(e){this._playheadState&=2}if(this._fadeState>0){if(t>this.fadeTotalTime-this._fadeTime){return}}else{this._fadeState=1;this._subFadeState=-1;if(t<=0||this._fadeProgress<=0){this._fadeProgress=1e-6}for(var i=0,r=this._boneTimelines;i1e-6?t/this._fadeProgress:0;this._fadeTime=this.fadeTotalTime*(1-this._fadeProgress)};r.prototype.containsBoneMask=function(t){return this._boneMask.length===0||this._boneMask.indexOf(t)>=0};r.prototype.addBoneMask=function(t,e){if(e===void 0){e=true}var i=this._armature.getBone(t);if(i===null){return}if(this._boneMask.indexOf(t)<0){this._boneMask.push(t)}if(e){for(var r=0,a=this._armature.getBones();r=0){this._boneMask.splice(i,1)}if(e){var r=this._armature.getBone(t);if(r!==null){var a=this._armature.getBones();if(this._boneMask.length>0){for(var n=0,s=a;n=0&&r.contains(o)){this._boneMask.splice(l,1)}}}else{for(var h=0,u=a;h0},enumerable:true,configurable:true});Object.defineProperty(r.prototype,"isFadeComplete",{get:function(){return this._fadeState===0},enumerable:true,configurable:true});Object.defineProperty(r.prototype,"isPlaying",{get:function(){return(this._playheadState&2)!==0&&this._actionTimeline.playState<=0},enumerable:true,configurable:true});Object.defineProperty(r.prototype,"isCompleted",{get:function(){return this._actionTimeline.playState>0},enumerable:true,configurable:true});Object.defineProperty(r.prototype,"currentPlayTimes",{get:function(){return this._actionTimeline.currentPlayTimes},enumerable:true,configurable:true});Object.defineProperty(r.prototype,"totalTime",{get:function(){return this._duration},enumerable:true,configurable:true});Object.defineProperty(r.prototype,"currentTime",{get:function(){return this._actionTimeline.currentTime},set:function(t){var e=this._actionTimeline.currentPlayTimes-(this._actionTimeline.playState>0?1:0);if(t<0||this._duration0&&e===this.playTimes-1&&t===this._duration){t=this._duration-1e-6}if(this._time===t){return}this._time=t;this._actionTimeline.setCurrentTime(this._time);if(this._zOrderTimeline!==null){this._zOrderTimeline.playState=-1}for(var i=0,r=this._boneTimelines;i=0?1:-1;this.currentPlayTimes=1;this.currentTime=this._actionTimeline.currentTime}else if(this._actionTimeline===null||this._timeScale!==1||this._timeOffset!==0){var a=this._animationState.playTimes;var n=a*this._duration;t*=this._timeScale;if(this._timeOffset!==0){t+=this._timeOffset*this._animationData.duration}if(a>0&&(t>=n||t<=-n)){if(this.playState<=0&&this._animationState._playheadState===3){this.playState=1}this.currentPlayTimes=a;if(t<0){this.currentTime=0}else{this.currentTime=this._duration}}else{if(this.playState!==0&&this._animationState._playheadState===3){this.playState=0}if(t<0){t=-t;this.currentPlayTimes=Math.floor(t/this._duration);this.currentTime=this._duration-t%this._duration}else{this.currentPlayTimes=Math.floor(t/this._duration);this.currentTime=t%this._duration}}this.currentTime+=this._position}else{this.playState=this._actionTimeline.playState;this.currentPlayTimes=this._actionTimeline.currentPlayTimes;this.currentTime=this._actionTimeline.currentTime}if(this.currentPlayTimes===i&&this.currentTime===r){return false}if(e<0&&this.playState!==e||this.playState<=0&&this.currentPlayTimes!==i){this._frameIndex=-1}return true};e.prototype.init=function(t,e,i){this._armature=t;this._animationState=e;this._timelineData=i;this._actionTimeline=this._animationState._actionTimeline;if(this===this._actionTimeline){this._actionTimeline=null}this._animationData=this._animationState._animationData;this._frameRate=this._animationData.parent.frameRate;this._frameRateR=1/this._frameRate;this._position=this._animationState._position;this._duration=this._animationState._duration;this._dragonBonesData=this._animationData.parent.parent;if(this._timelineData!==null){this._frameIntArray=this._dragonBonesData.frameIntArray;this._frameFloatArray=this._dragonBonesData.frameFloatArray;this._frameArray=this._dragonBonesData.frameArray;this._timelineArray=this._dragonBonesData.timelineArray;this._frameIndices=this._dragonBonesData.frameIndices;this._frameCount=this._timelineArray[this._timelineData.offset+2];this._frameValueOffset=this._timelineArray[this._timelineData.offset+4];this._timeScale=100/this._timelineArray[this._timelineData.offset+0];this._timeOffset=this._timelineArray[this._timelineData.offset+1]*.01}};e.prototype.fadeOut=function(){};e.prototype.update=function(t){if(this._setCurrentTime(t)){if(this._frameCount>1){var e=Math.floor(this.currentTime*this._frameRate);var i=this._frameIndices[this._timelineData.frameIndicesOffset+e];if(this._frameIndex!==i){this._frameIndex=i;this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+this._frameIndex];this._onArriveAtFrame()}}else if(this._frameIndex<0){this._frameIndex=0;if(this._timelineData!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5]}this._onArriveAtFrame()}if(this._tweenState!==0){this._onUpdateFrame()}}};return e}(t.BaseObject);t.TimelineState=e;var i=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e._getEasingValue=function(t,e,i){var r=e;switch(t){case 3:r=Math.pow(e,2);break;case 4:r=1-Math.pow(1-e,2);break;case 5:r=.5*(1-Math.cos(e*Math.PI));break}return(r-e)*i+e};e._getEasingCurveValue=function(t,e,i,r){if(t<=0){return 0}else if(t>=1){return 1}var a=i+1;var n=Math.floor(t*a);var s=n===0?0:e[r+n-1];var o=n===a-1?1e4:e[r+n];return(s+(o-s)*(t*a-n))*1e-4};e.prototype._onClear=function(){t.prototype._onClear.call(this);this._tweenType=0;this._curveCount=0;this._framePosition=0;this._frameDurationR=0;this._tweenProgress=0;this._tweenEasing=0};e.prototype._onArriveAtFrame=function(){if(this._frameCount>1&&(this._frameIndex!==this._frameCount-1||this._animationState.playTimes===0||this._animationState.currentPlayTimes0){this._frameDurationR=1/e}else{this._frameDurationR=0}}}else{this._tweenState=1}};e.prototype._onUpdateFrame=function(){if(this._tweenState===2){this._tweenProgress=(this.currentTime-this._framePosition)*this._frameDurationR;if(this._tweenType===2){this._tweenProgress=e._getEasingCurveValue(this._tweenProgress,this._frameArray,this._curveCount,this._frameOffset+3)}else if(this._tweenType!==1){this._tweenProgress=e._getEasingValue(this._tweenType,this._tweenProgress,this._tweenEasing)}}else{this._tweenProgress=0}};return e}(e);t.TweenTimelineState=i;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.bone=null;this.bonePose=null};return e}(i);t.BoneTimelineState=r;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.slot=null};return e}(i);t.SlotTimelineState=a;var n=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.prototype._onClear=function(){t.prototype._onClear.call(this);this.constraint=null};return e}(i);t.ConstraintTimelineState=n})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.ActionTimelineState]"};i.prototype._onCrossFrame=function(e){var i=this._armature.eventDispatcher;if(this._animationState.actionEnabled){var r=this._animationData.frameOffset+this._timelineArray[this._timelineData.offset+5+e];var a=this._frameArray[r+1];var n=this._animationData.parent.actions;for(var s=0;s0){if(n.hasDBEventListener(t.EventObject.COMPLETE)){h=t.BaseObject.borrowObject(t.EventObject);h.type=t.EventObject.COMPLETE;h.armature=this._armature;h.animationState=this._animationState}}}if(this._frameCount>1){var u=this._timelineData;var f=Math.floor(this.currentTime*this._frameRate);var _=this._frameIndices[u.frameIndicesOffset+f];if(this._frameIndex!==_){var c=this._frameIndex;this._frameIndex=_;if(this._timelineArray!==null){this._frameOffset=this._animationData.frameOffset+this._timelineArray[u.offset+5+this._frameIndex];if(o){if(c<0){var p=Math.floor(a*this._frameRate);c=this._frameIndices[u.frameIndicesOffset+p];if(this.currentPlayTimes===r){if(c===_){c=-1}}}while(c>=0){var m=this._animationData.frameOffset+this._timelineArray[u.offset+5+c];var d=this._frameArray[m]/this._frameRate;if(this._position<=d&&d<=this._position+this._duration){this._onCrossFrame(c)}if(l!==null&&c===0){this._armature._dragonBones.bufferEvent(l);l=null}if(c>0){c--}else{c=this._frameCount-1}if(c===_){break}}}else{if(c<0){var p=Math.floor(a*this._frameRate);c=this._frameIndices[u.frameIndicesOffset+p];var m=this._animationData.frameOffset+this._timelineArray[u.offset+5+c];var d=this._frameArray[m]/this._frameRate;if(this.currentPlayTimes===r){if(a<=d){if(c>0){c--}else{c=this._frameCount-1}}else if(c===_){c=-1}}}while(c>=0){if(c=0){var t=this._frameArray[this._frameOffset+1];if(t>0){this._armature._sortZOrder(this._frameArray,this._frameOffset+2)}else{this._armature._sortZOrder(null,0)}}};e.prototype._onUpdateFrame=function(){};return e}(t.TimelineState);t.ZOrderTimelineState=i;var r=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.BoneAllTimelineState]"};i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var t=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*6;var i=this._armature._armatureData.scale;var r=this._frameFloatArray;var a=this.bonePose.current;var n=this.bonePose.delta;a.x=r[t++]*i;a.y=r[t++]*i;a.rotation=r[t++];a.skew=r[t++];a.scaleX=r[t++];a.scaleY=r[t++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){t=this._animationData.frameFloatOffset+this._frameValueOffset}n.x=r[t++]*i-a.x;n.y=r[t++]*i-a.y;n.rotation=r[t++]-a.rotation;n.skew=r[t++]-a.skew;n.scaleX=r[t++]-a.scaleX;n.scaleY=r[t++]-a.scaleY}else{n.x=0;n.y=0;n.rotation=0;n.skew=0;n.scaleX=0;n.scaleY=0}}else{var a=this.bonePose.current;var n=this.bonePose.delta;a.x=0;a.y=0;a.rotation=0;a.skew=0;a.scaleX=1;a.scaleY=1;n.x=0;n.y=0;n.rotation=0;n.skew=0;n.scaleX=0;n.scaleY=0}};i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current;var i=this.bonePose.delta;var r=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}r.x=t.x+i.x*this._tweenProgress;r.y=t.y+i.y*this._tweenProgress;r.rotation=t.rotation+i.rotation*this._tweenProgress;r.skew=t.skew+i.skew*this._tweenProgress;r.scaleX=t.scaleX+i.scaleX*this._tweenProgress;r.scaleY=t.scaleY+i.scaleY*this._tweenProgress};i.prototype.fadeOut=function(){var e=this.bonePose.result;e.rotation=t.Transform.normalizeRadian(e.rotation);e.skew=t.Transform.normalizeRadian(e.skew)};return i}(t.BoneTimelineState);t.BoneAllTimelineState=r;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.BoneTranslateTimelineState]"};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*2;var i=this._armature._armatureData.scale;var r=this._frameFloatArray;var a=this.bonePose.current;var n=this.bonePose.delta;a.x=r[e++]*i;a.y=r[e++]*i;if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){e=this._animationData.frameFloatOffset+this._frameValueOffset}n.x=r[e++]*i-a.x;n.y=r[e++]*i-a.y}else{n.x=0;n.y=0}}else{var a=this.bonePose.current;var n=this.bonePose.delta;a.x=0;a.y=0;n.x=0;n.y=0}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);var e=this.bonePose.current;var i=this.bonePose.delta;var r=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}r.x=e.x+i.x*this._tweenProgress;r.y=e.y+i.y*this._tweenProgress};return e}(t.BoneTimelineState);t.BoneTranslateTimelineState=a;var n=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.toString=function(){return"[class dragonBones.BoneRotateTimelineState]"};i.prototype._onArriveAtFrame=function(){e.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var t=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*2;var i=this._frameFloatArray;var r=this.bonePose.current;var a=this.bonePose.delta;r.rotation=i[t++];r.skew=i[t++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){t=this._animationData.frameFloatOffset+this._frameValueOffset}a.rotation=i[t++]-r.rotation;a.skew=i[t++]-r.skew}else{a.rotation=0;a.skew=0}}else{var r=this.bonePose.current;var a=this.bonePose.delta;r.rotation=0;r.skew=0;a.rotation=0;a.skew=0}};i.prototype._onUpdateFrame=function(){e.prototype._onUpdateFrame.call(this);var t=this.bonePose.current;var i=this.bonePose.delta;var r=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}r.rotation=t.rotation+i.rotation*this._tweenProgress;r.skew=t.skew+i.skew*this._tweenProgress};i.prototype.fadeOut=function(){var e=this.bonePose.result;e.rotation=t.Transform.normalizeRadian(e.rotation);e.skew=t.Transform.normalizeRadian(e.skew)};return i}(t.BoneTimelineState);t.BoneRotateTimelineState=n;var s=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.BoneScaleTimelineState]"};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*2;var i=this._frameFloatArray;var r=this.bonePose.current;var a=this.bonePose.delta;r.scaleX=i[e++];r.scaleY=i[e++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){e=this._animationData.frameFloatOffset+this._frameValueOffset}a.scaleX=i[e++]-r.scaleX;a.scaleY=i[e++]-r.scaleY}else{a.scaleX=0;a.scaleY=0}}else{var r=this.bonePose.current;var a=this.bonePose.delta;r.scaleX=1;r.scaleY=1;a.scaleX=0;a.scaleY=0}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);var e=this.bonePose.current;var i=this.bonePose.delta;var r=this.bonePose.result;this.bone._transformDirty=true;if(this._tweenState!==2){this._tweenState=0}r.scaleX=e.scaleX+i.scaleX*this._tweenProgress;r.scaleY=e.scaleY+i.scaleY*this._tweenProgress};return e}(t.BoneTimelineState);t.BoneScaleTimelineState=s;var o=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}e.toString=function(){return"[class dragonBones.SlotDislayTimelineState]"};e.prototype._onArriveAtFrame=function(){if(this.playState>=0){var t=this._timelineData!==null?this._frameArray[this._frameOffset+1]:this.slot._slotData.displayIndex;if(this.slot.displayIndex!==t){this.slot._setDisplayIndex(t,true)}}};return e}(t.SlotTimelineState);t.SlotDislayTimelineState=o;var l=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e._current=[0,0,0,0,0,0,0,0];e._delta=[0,0,0,0,0,0,0,0];e._result=[0,0,0,0,0,0,0,0];return e}e.toString=function(){return"[class dragonBones.SlotColorTimelineState]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this._dirty=false};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._dragonBonesData.intArray;var i=this._frameIntArray;var r=this._animationData.frameIntOffset+this._frameValueOffset+this._frameIndex*1;var a=i[r];if(a<0){a+=32767}this._current[0]=e[a++];this._current[1]=e[a++];this._current[2]=e[a++];this._current[3]=e[a++];this._current[4]=e[a++];this._current[5]=e[a++];this._current[6]=e[a++];this._current[7]=e[a++];if(this._tweenState===2){if(this._frameIndex===this._frameCount-1){a=i[this._animationData.frameIntOffset+this._frameValueOffset]}else{a=i[r+1*1]}if(a<0){a+=32767}this._delta[0]=e[a++]-this._current[0];this._delta[1]=e[a++]-this._current[1];this._delta[2]=e[a++]-this._current[2];this._delta[3]=e[a++]-this._current[3];this._delta[4]=e[a++]-this._current[4];this._delta[5]=e[a++]-this._current[5];this._delta[6]=e[a++]-this._current[6];this._delta[7]=e[a++]-this._current[7]}}else{var n=this.slot._slotData.color;this._current[0]=n.alphaMultiplier*100;this._current[1]=n.redMultiplier*100;this._current[2]=n.greenMultiplier*100;this._current[3]=n.blueMultiplier*100;this._current[4]=n.alphaOffset;this._current[5]=n.redOffset;this._current[6]=n.greenOffset;this._current[7]=n.blueOffset}};e.prototype._onUpdateFrame=function(){t.prototype._onUpdateFrame.call(this);this._dirty=true;if(this._tweenState!==2){this._tweenState=0}this._result[0]=(this._current[0]+this._delta[0]*this._tweenProgress)*.01;this._result[1]=(this._current[1]+this._delta[1]*this._tweenProgress)*.01;this._result[2]=(this._current[2]+this._delta[2]*this._tweenProgress)*.01;this._result[3]=(this._current[3]+this._delta[3]*this._tweenProgress)*.01;this._result[4]=this._current[4]+this._delta[4]*this._tweenProgress;this._result[5]=this._current[5]+this._delta[5]*this._tweenProgress;this._result[6]=this._current[6]+this._delta[6]*this._tweenProgress;this._result[7]=this._current[7]+this._delta[7]*this._tweenProgress};e.prototype.fadeOut=function(){this._tweenState=0;this._dirty=false};e.prototype.update=function(e){t.prototype.update.call(this,e);if(this._tweenState!==0||this._dirty){var i=this.slot._colorTransform;if(this._animationState._fadeState!==0||this._animationState._subFadeState!==0){if(i.alphaMultiplier!==this._result[0]||i.redMultiplier!==this._result[1]||i.greenMultiplier!==this._result[2]||i.blueMultiplier!==this._result[3]||i.alphaOffset!==this._result[4]||i.redOffset!==this._result[5]||i.greenOffset!==this._result[6]||i.blueOffset!==this._result[7]){var r=Math.pow(this._animationState._fadeProgress,4);i.alphaMultiplier+=(this._result[0]-i.alphaMultiplier)*r;i.redMultiplier+=(this._result[1]-i.redMultiplier)*r;i.greenMultiplier+=(this._result[2]-i.greenMultiplier)*r;i.blueMultiplier+=(this._result[3]-i.blueMultiplier)*r;i.alphaOffset+=(this._result[4]-i.alphaOffset)*r;i.redOffset+=(this._result[5]-i.redOffset)*r;i.greenOffset+=(this._result[6]-i.greenOffset)*r;i.blueOffset+=(this._result[7]-i.blueOffset)*r;this.slot._colorDirty=true}}else if(this._dirty){this._dirty=false;if(i.alphaMultiplier!==this._result[0]||i.redMultiplier!==this._result[1]||i.greenMultiplier!==this._result[2]||i.blueMultiplier!==this._result[3]||i.alphaOffset!==this._result[4]||i.redOffset!==this._result[5]||i.greenOffset!==this._result[6]||i.blueOffset!==this._result[7]){i.alphaMultiplier=this._result[0];i.redMultiplier=this._result[1];i.greenMultiplier=this._result[2];i.blueMultiplier=this._result[3];i.alphaOffset=this._result[4];i.redOffset=this._result[5];i.greenOffset=this._result[6];i.blueOffset=this._result[7];this.slot._colorDirty=true}}}};return e}(t.SlotTimelineState);t.SlotColorTimelineState=l;var h=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e._current=[];e._delta=[];e._result=[];return e}e.toString=function(){return"[class dragonBones.SlotFFDTimelineState]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);this.meshOffset=0;this._dirty=false;this._frameFloatOffset=0;this._valueCount=0;this._ffdCount=0;this._valueOffset=0;this._current.length=0;this._delta.length=0;this._result.length=0};e.prototype._onArriveAtFrame=function(){t.prototype._onArriveAtFrame.call(this);if(this._timelineData!==null){var e=this._animationData.frameFloatOffset+this._frameValueOffset+this._frameIndex*this._valueCount;var i=this._armature._armatureData.scale;var r=this._frameFloatArray;if(this._tweenState===2){var a=e+this._valueCount;if(this._frameIndex===this._frameCount-1){a=this._animationData.frameFloatOffset+this._frameValueOffset}for(var n=0;n255){return encodeURI(a)}}}return a}return String(a)}return r};r.prototype._getCurvePoint=function(t,e,i,r,a,n,s,o,l,h){var u=1-l;var f=u*u;var _=l*l;var c=u*f;var p=3*l*f;var m=3*u*_;var d=l*_;h.x=c*t+p*i+m*a+d*s;h.y=c*e+p*r+m*n+d*o};r.prototype._samplingEasingCurve=function(t,e){var i=t.length;var r=-2;for(var a=0,n=e.length;a=0&&r+61e-4){var g=(y+d)*.5;this._getCurvePoint(l,h,u,f,_,c,p,m,g,this._helpPoint);if(s-this._helpPoint.x>0){d=g}else{y=g}}e[a]=this._helpPoint.y}};r.prototype._parseActionDataInFrame=function(t,e,i,a){if(r.EVENT in t){this._mergeActionFrame(t[r.EVENT],e,10,i,a)}if(r.SOUND in t){this._mergeActionFrame(t[r.SOUND],e,11,i,a)}if(r.ACTION in t){this._mergeActionFrame(t[r.ACTION],e,0,i,a)}if(r.EVENTS in t){this._mergeActionFrame(t[r.EVENTS],e,10,i,a)}if(r.ACTIONS in t){this._mergeActionFrame(t[r.ACTIONS],e,0,i,a)}};r.prototype._mergeActionFrame=function(e,r,a,n,s){var o=t.DragonBones.webAssembly?this._armature.actions.size():this._armature.actions.length;var l=this._parseActionData(e,a,n,s);var h=0;var u=null;for(var f=0,_=l;f<_.length;f++){var c=_[f];this._armature.addAction(c,false)}if(this._actionFrames.length===0){u=new i;u.frameStart=0;this._actionFrames.push(u);u=null}for(var p=0,m=this._actionFrames;pr){break}h++}if(u===null){u=new i;u.frameStart=r;this._actionFrames.splice(h+1,0,u)}for(var y=0;y0){var p=a.getBone(_);if(p!==null){c.parent=p}else{if(!(_ in this._cacheBones)){this._cacheBones[_]=[]}this._cacheBones[_].push(c)}}if(c.name in this._cacheBones){for(var m=0,d=this._cacheBones[c.name];m0&&i.parent!==null){n.root=i.parent;n.bone=i}else{n.root=i;n.bone=null}return n};r.prototype._parseSlot=function(e,i){var a=t.BaseObject.borrowObject(t.SlotData);a.displayIndex=r._getNumber(e,r.DISPLAY_INDEX,0);a.zOrder=i;a.name=r._getString(e,r.NAME,"");a.parent=this._armature.getBone(r._getString(e,r.PARENT,""));if(r.BLEND_MODE in e&&typeof e[r.BLEND_MODE]==="string"){a.blendMode=r._getBlendMode(e[r.BLEND_MODE])}else{a.blendMode=r._getNumber(e,r.BLEND_MODE,0)}if(r.COLOR in e){a.color=t.SlotData.createColor();this._parseColorTransform(e[r.COLOR],a.color)}else{a.color=t.SlotData.DEFAULT_COLOR}if(r.ACTIONS in e){this._slotChildActions[a.name]=this._parseActionData(e[r.ACTIONS],0,null,null)}return a};r.prototype._parseSkin=function(e){var i=t.BaseObject.borrowObject(t.SkinData);i.name=r._getString(e,r.NAME,r.DEFAULT_NAME);if(i.name.length===0){i.name=r.DEFAULT_NAME}if(r.SLOT in e){var a=e[r.SLOT];this._skin=i;for(var n=0,s=a;n0?a:i;this._parsePivot(e,o);break;case 1:var l=s=t.BaseObject.borrowObject(t.ArmatureDisplayData);l.name=i;l.path=a.length>0?a:i;l.inheritAnimation=true;if(r.ACTIONS in e){var h=this._parseActionData(e[r.ACTIONS],0,null,null);for(var u=0,f=h;u0?a:i;y.inheritAnimation=r._getBoolean(e,r.INHERIT_FFD,true);this._parsePivot(e,y);if(d.length>0){var g=r._getString(e,r.SKIN,"");var v=this._slot.name;if(g.length===0){g=r.DEFAULT_NAME}if(!(g in this._cacheMeshs)){this._cacheMeshs[g]={}}var b=this._cacheMeshs[g];if(!(v in b)){b[v]={}}var T=b[v];if(!(d in T)){T[d]=[]}T[d].push(y)}else{this._parseMesh(e,y)}break;case 3:var D=this._parseBoundingBox(e);if(D!==null){var A=s=t.BaseObject.borrowObject(t.BoundingBoxDisplayData);A.name=i;A.path=a.length>0?a:i;A.boundingBox=D}break}if(s!==null){if(r.TRANSFORM in e){this._parseTransform(e[r.TRANSFORM],s.transform,this._armature.scale)}}return s};r.prototype._parsePivot=function(t,e){if(r.PIVOT in t){var i=t[r.PIVOT];e.pivot.x=r._getNumber(i,r.X,0);e.pivot.y=r._getNumber(i,r.Y,0)}else{e.pivot.x=.5;e.pivot.y=.5}};r.prototype._parseMesh=function(e,i){var a=e[r.VERTICES];var n=e[r.UVS];var s=e[r.TRIANGLES];var o=Math.floor(a.length/2);var l=Math.floor(s.length/3);var h=this._floatArray.length;var u=h+o*2;var f=this._intArray.length;i.offset=f;this._intArray.length+=1+1+1+1+l*3;this._intArray[f+0]=o;this._intArray[f+1]=l;this._intArray[f+2]=h;for(var _=0,c=l*3;_i.width){i.width=l}if(hi.height){i.height=h}}}}else{console.warn("Data error.\n Please reexport DragonBones Data to fixed the bug.")}return i};r.prototype._parseAnimation=function(e){var i=t.BaseObject.borrowObject(t.AnimationData);i.frameCount=Math.max(r._getNumber(e,r.DURATION,1),1);i.playTimes=r._getNumber(e,r.PLAY_TIMES,1);i.duration=i.frameCount/this._armature.frameRate;i.fadeInTime=r._getNumber(e,r.FADE_IN_TIME,0);i.scale=r._getNumber(e,r.SCALE,1);i.name=r._getString(e,r.NAME,r.DEFAULT_NAME);if(i.name.length===0){i.name=r.DEFAULT_NAME}i.frameIntOffset=this._frameIntArray.length;i.frameFloatOffset=this._frameFloatArray.length;i.frameOffset=this._frameArray.length;this._animation=i;if(r.FRAME in e){var a=e[r.FRAME];var n=a.length;if(n>0){for(var s=0,o=0;s0){this._animation.actionTimeline=this._parseTimeline(null,this._actionFrames,"",0,false,false,0,this._parseActionFrame);this._actionFrames.length=0}this._animation=null;return i};r.prototype._parseTimeline=function(e,a,n,s,o,l,h,u){if(e!==null&&n.length>0&&n in e){a=e[n]}if(a===null){return null}var f=a.length;if(f===0){return null}var _=this._frameIntArray.length;var c=this._frameFloatArray.length;var p=t.BaseObject.borrowObject(t.TimelineData);var m=this._timelineArray.length;this._timelineArray.length+=1+1+1+1+1+f;if(e!==null){this._timelineArray[m+0]=Math.round(r._getNumber(e,r.SCALE,1)*100);this._timelineArray[m+1]=Math.round(r._getNumber(e,r.OFFSET,0)*100)}else{this._timelineArray[m+0]=100;this._timelineArray[m+1]=0}this._timelineArray[m+2]=f;this._timelineArray[m+3]=h;if(o){this._timelineArray[m+4]=_-this._animation.frameIntOffset}else if(l){this._timelineArray[m+4]=c-this._animation.frameFloatOffset}else{this._timelineArray[m+4]=0}this._timeline=p;p.type=s;p.offset=m;if(f===1){p.frameIndicesOffset=-1;this._timelineArray[m+5+0]=u.call(this,a[0],0,0)-this._animation.frameOffset}else{var d=this._animation.frameCount+1;var y=this._data.frameIndices;var g=0;if(t.DragonBones.webAssembly){g=y.size();y.resize(g+d,0)}else{g=y.length;y.length+=d}p.frameIndicesOffset=g;for(var v=0,b=0,T=0,D=0;v0){if(r.CURVE in t){var n=i+1;this._helpArray.length=n;this._samplingEasingCurve(t[r.CURVE],this._helpArray);this._frameArray.length+=1+1+this._helpArray.length;this._frameArray[a+1]=2;this._frameArray[a+2]=n;for(var s=0;s0){var s=this._armature.sortedSlots.length;var o=new Array(s-n.length/2);var l=new Array(s);for(var h=0;h0?n>=this._prevRotation:n<=this._prevRotation){this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1}n=this._prevRotation+n-this._prevRotation+t.Transform.PI_D*this._prevClockwise}}this._prevClockwise=r._getNumber(e,r.TWEEN_ROTATE,0);this._prevRotation=n;var s=this._parseTweenFrame(e,i,a);var o=this._frameFloatArray.length;this._frameFloatArray.length+=6;this._frameFloatArray[o++]=this._helpTransform.x;this._frameFloatArray[o++]=this._helpTransform.y;this._frameFloatArray[o++]=n;this._frameFloatArray[o++]=this._helpTransform.skew;this._frameFloatArray[o++]=this._helpTransform.scaleX;this._frameFloatArray[o++]=this._helpTransform.scaleY;this._parseActionDataInFrame(e,i,this._bone,this._slot);return s};r.prototype._parseBoneTranslateFrame=function(t,e,i){var a=this._parseTweenFrame(t,e,i);var n=this._frameFloatArray.length;this._frameFloatArray.length+=2;this._frameFloatArray[n++]=r._getNumber(t,r.X,0);this._frameFloatArray[n++]=r._getNumber(t,r.Y,0);return a};r.prototype._parseBoneRotateFrame=function(e,i,a){var n=r._getNumber(e,r.ROTATE,0)*t.Transform.DEG_RAD;if(i!==0){if(this._prevClockwise===0){n=this._prevRotation+t.Transform.normalizeRadian(n-this._prevRotation)}else{if(this._prevClockwise>0?n>=this._prevRotation:n<=this._prevRotation){this._prevClockwise=this._prevClockwise>0?this._prevClockwise-1:this._prevClockwise+1}n=this._prevRotation+n-this._prevRotation+t.Transform.PI_D*this._prevClockwise}}this._prevClockwise=r._getNumber(e,r.CLOCK_WISE,0);this._prevRotation=n;var s=this._parseTweenFrame(e,i,a);var o=this._frameFloatArray.length;this._frameFloatArray.length+=2;this._frameFloatArray[o++]=n;this._frameFloatArray[o++]=r._getNumber(e,r.SKEW,0)*t.Transform.DEG_RAD;return s};r.prototype._parseBoneScaleFrame=function(t,e,i){var a=this._parseTweenFrame(t,e,i);var n=this._frameFloatArray.length;this._frameFloatArray.length+=2;this._frameFloatArray[n++]=r._getNumber(t,r.X,1);this._frameFloatArray[n++]=r._getNumber(t,r.Y,1);return a};r.prototype._parseSlotDisplayFrame=function(t,e,i){var a=this._parseFrame(t,e,i);this._frameArray.length+=1;if(r.VALUE in t){this._frameArray[a+1]=r._getNumber(t,r.VALUE,0)}else{this._frameArray[a+1]=r._getNumber(t,r.DISPLAY_INDEX,0)}this._parseActionDataInFrame(t,e,this._slot.parent,this._slot);return a};r.prototype._parseSlotColorFrame=function(t,e,i){var a=this._parseTweenFrame(t,e,i);var n=-1;if(r.VALUE in t||r.COLOR in t){var s=r.VALUE in t?t[r.VALUE]:t[r.COLOR];for(var o in s){o;this._parseColorTransform(s,this._helpColorTransform);n=this._intArray.length;this._intArray.length+=8;this._intArray[n++]=Math.round(this._helpColorTransform.alphaMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.redMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.greenMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.blueMultiplier*100);this._intArray[n++]=Math.round(this._helpColorTransform.alphaOffset);this._intArray[n++]=Math.round(this._helpColorTransform.redOffset);this._intArray[n++]=Math.round(this._helpColorTransform.greenOffset);this._intArray[n++]=Math.round(this._helpColorTransform.blueOffset);n-=8;break}}if(n<0){if(this._defaultColorOffset<0){this._defaultColorOffset=n=this._intArray.length;this._intArray.length+=8;this._intArray[n++]=100;this._intArray[n++]=100;this._intArray[n++]=100;this._intArray[n++]=100;this._intArray[n++]=0;this._intArray[n++]=0;this._intArray[n++]=0;this._intArray[n++]=0}n=this._defaultColorOffset}var l=this._frameIntArray.length;this._frameIntArray.length+=1;this._frameIntArray[l]=n;return a};r.prototype._parseSlotFFDFrame=function(t,e,i){var a=this._frameFloatArray.length;var n=this._parseTweenFrame(t,e,i);var s=r.VERTICES in t?t[r.VERTICES]:null;var o=r._getNumber(t,r.OFFSET,0);var l=this._intArray[this._mesh.offset+0];var h=this._skin.name+"_"+this._slot.name+"_"+this._mesh.name;var u=0;var f=0;var _=0;var c=0;if(this._mesh.weight!==null){var p=this._weightSlotPose[h];this._helpMatrixA.copyFromArray(p,0);this._frameFloatArray.length+=this._mesh.weight.count*2;_=this._mesh.weight.offset+2+this._mesh.weight.bones.length}else{this._frameFloatArray.length+=l*2}for(var m=0;m=s.length){u=0}else{u=s[m-o]}if(m+1=s.length){f=0}else{f=s[m+1-o]}}if(this._mesh.weight!==null){var d=this._weightBonePoses[h];var y=this._intArray[_++];this._helpMatrixA.transformPoint(u,f,this._helpPoint,true);u=this._helpPoint.x;f=this._helpPoint.y;for(var g=0;g=0||r.DATA_VERSIONS.indexOf(n)>=0){var s=t.BaseObject.borrowObject(t.DragonBonesData);s.version=a;s.name=r._getString(e,r.NAME,"");s.frameRate=r._getNumber(e,r.FRAME_RATE,24);if(s.frameRate===0){s.frameRate=24}if(r.ARMATURE in e){this._data=s;this._parseArray(e);var o=e[r.ARMATURE];for(var l=0,h=o;l0){s.stage=s.getArmature(s.armatureNames[0])}this._data=null}if(r.TEXTURE_ATLAS in e){this._rawTextureAtlases=e[r.TEXTURE_ATLAS]}return s}else{console.assert(false,"Nonsupport data version: "+a+"\n"+"Please convert DragonBones data to support version.\n"+"Read more: https://github.com/DragonBones/Tools/")}return null};r.prototype.parseTextureAtlasData=function(e,i,a){if(a===void 0){a=1}console.assert(e!==undefined);if(e===null){if(this._rawTextureAtlases===null||this._rawTextureAtlases.length===0){return false}var n=this._rawTextureAtlases[this._rawTextureAtlasIndex++];this.parseTextureAtlasData(n,i,a);if(this._rawTextureAtlasIndex>=this._rawTextureAtlases.length){this._rawTextureAtlasIndex=0;this._rawTextureAtlases=null}return true}i.width=r._getNumber(e,r.WIDTH,0);i.height=r._getNumber(e,r.HEIGHT,0);i.scale=a===1?1/r._getNumber(e,r.SCALE,1):a;i.name=r._getString(e,r.NAME,"");i.imagePath=r._getString(e,r.IMAGE_PATH,"");if(r.SUB_TEXTURE in e){var s=e[r.SUB_TEXTURE];for(var o=0,l=s.length;o0&&_>0){u.frame=t.TextureData.createRectangle();u.frame.x=r._getNumber(h,r.FRAME_X,0);u.frame.y=r._getNumber(h,r.FRAME_Y,0);u.frame.width=f;u.frame.height=_}i.addTexture(u)}}return true};r.getInstance=function(){if(r._objectDataParserInstance===null){r._objectDataParserInstance=new r}return r._objectDataParserInstance};r._objectDataParserInstance=null;return r}(t.DataParser);t.ObjectDataParser=e;var i=function(){function t(){this.frameStart=0;this.actions=[]}return t}();t.ActionFrame=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}i.prototype._inRange=function(t,e,i){return e<=t&&t<=i};i.prototype._decodeUTF8=function(t){var e=-1;var i=-1;var r=65533;var a=0;var n="";var s;var o=0;var l=0;var h=0;var u=0;while(t.length>a){var f=t[a++];if(f===e){if(l!==0){s=r}else{s=i}}else{if(l===0){if(this._inRange(f,0,127)){s=f}else{if(this._inRange(f,194,223)){l=1;u=128;o=f-192}else if(this._inRange(f,224,239)){l=2;u=2048;o=f-224}else if(this._inRange(f,240,244)){l=3;u=65536;o=f-240}else{}o=o*Math.pow(64,l);s=null}}else if(!this._inRange(f,128,191)){o=0;l=0;h=0;u=0;a--;s=f}else{h+=1;o=o+(f-128)*Math.pow(64,l-h);if(h!==l){s=null}else{var _=o;var c=u;o=0;l=0;h=0;u=0;if(this._inRange(_,c,1114111)&&!this._inRange(_,55296,57343)){s=_}else{s=f}}}}if(s!==null&&s!==i){if(s<=65535){if(s>0)n+=String.fromCharCode(s)}else{s-=65536;n+=String.fromCharCode(55296+(s>>10&1023));n+=String.fromCharCode(56320+(s&1023))}}}return n};i.prototype._getUTF16Key=function(t){for(var e=0,i=t.length;e255){return encodeURI(t)}}return t};i.prototype._parseBinaryTimeline=function(e,i,r){if(r===void 0){r=null}var a=r!==null?r:t.BaseObject.borrowObject(t.TimelineData);a.type=e;a.offset=i;this._timeline=a;var n=this._timelineArrayBuffer[a.offset+2];if(n===1){a.frameIndicesOffset=-1}else{var s=0;var o=this._animation.frameCount+1;var l=this._data.frameIndices;if(t.DragonBones.webAssembly){s=l.size();l.resize(s+o,0)}else{s=l.length;l.length+=o}a.frameIndicesOffset=s;for(var h=0,u=0,f=0,_=0;h=0){var a=t.BaseObject.borrowObject(t.WeightData);var n=this._intArrayBuffer[i.offset+0];var s=this._intArrayBuffer[r+0];a.offset=r;for(var o=0;o0){if(e in this._dragonBonesDataMap){n=this._dragonBonesDataMap[e];s=n.getArmature(i)}}if(s===null&&(e.length===0||this.autoSearch)){for(var o in this._dragonBonesDataMap){n=this._dragonBonesDataMap[o];if(e.length===0||n.autoSearch){s=n.getArmature(i);if(s!==null){e=o;break}}}}if(s!==null){t.dataName=e;t.textureAtlasName=a;t.data=n;t.armature=s;t.skin=null;if(r.length>0){t.skin=s.getSkin(r);if(t.skin===null&&this.autoSearch){for(var o in this._dragonBonesDataMap){var l=this._dragonBonesDataMap[o];var h=l.getArmature(r);if(h!==null){t.skin=h.defaultSkin;break}}}}if(t.skin===null){t.skin=s.defaultSkin}return true}return false};e.prototype._buildBones=function(e,i){for(var r=0,a=e.armature.sortedBones;r0){s.texture=this._getTextureData(t.textureAtlasName,e.path)}if(i!==null&&i.type===2&&this._isSupportMesh()){n=r.meshDisplay}else{n=r.rawDisplay}break}case 2:{var o=e;if(o.texture===null){o.texture=this._getTextureData(a,o.path)}else if(t!==null&&t.textureAtlasName.length>0){o.texture=this._getTextureData(t.textureAtlasName,o.path)}if(this._isSupportMesh()){n=r.meshDisplay}else{n=r.rawDisplay}break}case 1:{var l=e;var h=this._buildChildArmature(t,r,e);if(h!==null){h.inheritAnimation=l.inheritAnimation;if(!h.inheritAnimation){var u=l.actions.length>0?l.actions:h.armatureData.defaultActions;if(u.length>0){for(var f=0,_=u;f<_.length;f++){var c=_[f];h._bufferAction(c,true)}}else{h.animation.play()}}l.armature=h.armatureData}n=h;break}case 3:break;default:break}return n};e.prototype.parseDragonBonesData=function(t,i,r){if(i===void 0){i=null}if(r===void 0){r=1}var a=t instanceof ArrayBuffer?e._binaryParser:this._dataParser;var n=a.parseDragonBonesData(t,r);while(true){var s=this._buildTextureAtlasData(null,null);if(a.parseTextureAtlasData(null,s,r)){this.addTextureAtlasData(s,i)}else{s.returnToPool();break}}if(n!==null){this.addDragonBonesData(n,i)}return n};e.prototype.parseTextureAtlasData=function(t,e,i,r){if(i===void 0){i=null}if(r===void 0){r=1}var a=this._buildTextureAtlasData(null,null);this._dataParser.parseTextureAtlasData(t,a,r);this._buildTextureAtlasData(a,e||null);this.addTextureAtlasData(a,i);return a};e.prototype.updateTextureAtlasData=function(t,e){var i=this.getTextureAtlasData(t);if(i!==null){for(var r=0,a=i.length;r=0){continue}var u=i.getDisplays(h.name);if(!u){if(s!==null&&i!==s){u=s.getDisplays(h.name)}if(!u){if(r){h.rawDisplayDatas=null;h.displayList=[]}continue}}var f=t.DragonBones.webAssembly?u.size():u.length;var _=h.displayList;_.length=f;for(var c=0,p=f;c0?this.width:i.width;var a=this.height>0?this.height:i.height;for(var n in this.textures){var s=egret.$TextureScaleFactor;var o=this.textures[n];var l=o.region.width;var h=o.region.height;if(o.renderTexture===null){o.renderTexture=new egret.Texture}if(t.EgretFactory._isV5){o.renderTexture["$bitmapData"]=i}else{o.renderTexture._bitmapData=i}if(o.rotated){o.renderTexture.$initData(o.region.x*s,o.region.y*s,h*s,l*s,0,0,h*s,l*s,r,a,o.rotated)}else{o.renderTexture.$initData(o.region.x*s,o.region.y*s,l*s,h*s,0,0,l*s,h*s,r,a)}}}else{for(var n in this.textures){var o=this.textures[n];o.renderTexture=null}}},enumerable:true,configurable:true});r.prototype.dispose=function(){console.warn("已废弃。");this.returnToPool()};Object.defineProperty(r.prototype,"texture",{get:function(){console.warn("已废弃。");return this.renderTexture},enumerable:true,configurable:true});return r}(t.TextureAtlasData);t.EgretTextureAtlasData=e;var i=function(t){__extends(e,t);function e(){var e=t!==null&&t.apply(this,arguments)||this;e.renderTexture=null;return e}e.toString=function(){return"[class dragonBones.EgretTextureData]"};e.prototype._onClear=function(){t.prototype._onClear.call(this);if(this.renderTexture!==null){}this.renderTexture=null};return e}(t.TextureData);t.EgretTextureData=i})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){return e!==null&&e.apply(this,arguments)||this}Object.defineProperty(i.prototype,"eventObject",{get:function(){return this.data},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationName",{get:function(){var t=this.eventObject.animationState;return t!==null?t.name:""},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"armature",{get:function(){return this.eventObject.armature},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"bone",{get:function(){return this.eventObject.bone},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"slot",{get:function(){return this.eventObject.slot},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"animationState",{get:function(){return this.eventObject.animationState},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"frameLabel",{get:function(){return this.eventObject.name},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"sound",{get:function(){return this.eventObject.name},enumerable:true,configurable:true});Object.defineProperty(i.prototype,"movementID",{get:function(){return this.animationName},enumerable:true,configurable:true});i.START=t.EventObject.START;i.LOOP_COMPLETE=t.EventObject.LOOP_COMPLETE;i.COMPLETE=t.EventObject.COMPLETE;i.FADE_IN=t.EventObject.FADE_IN;i.FADE_IN_COMPLETE=t.EventObject.FADE_IN_COMPLETE;i.FADE_OUT=t.EventObject.FADE_OUT;i.FADE_OUT_COMPLETE=t.EventObject.FADE_OUT_COMPLETE;i.FRAME_EVENT=t.EventObject.FRAME_EVENT;i.SOUND_EVENT=t.EventObject.SOUND_EVENT;i.ANIMATION_FRAME_EVENT=t.EventObject.FRAME_EVENT;i.BONE_FRAME_EVENT=t.EventObject.FRAME_EVENT;i.MOVEMENT_FRAME_EVENT=t.EventObject.FRAME_EVENT;i.SOUND=t.EventObject.SOUND_EVENT;return i}(egret.Event);t.EgretEvent=e;var i=function(i){__extends(r,i);function r(){var t=i!==null&&i.apply(this,arguments)||this;t.debugDraw=false;t._batchEnabled=!__global["nativeRender"];t._childDirty=true;t._debugDraw=false;t._disposeProxy=false;t._armature=null;t._bounds=null;t._debugDrawer=null;return t}r._cleanBeforeRender=function(){};r.prototype.dbInit=function(t){this._armature=t;if(this._batchEnabled){this.$renderNode=new egret.sys.GroupNode;this.$renderNode.cleanBeforeRender=r._cleanBeforeRender}};r.prototype.dbClear=function(){this._armature=null;this._bounds=null;this._debugDrawer=null};r.prototype.dbUpdate=function(){var e=t.DragonBones.debugDraw||this.debugDraw;if(e||this._debugDraw){this._debugDraw=e;if(this._debugDraw){if(this._debugDrawer===null){this._debugDrawer=new egret.Sprite}this.addChild(this._debugDrawer);this._debugDrawer.graphics.clear();for(var i=0,r=this._armature.getBones();i0){a.setTo(999999,999999,-999999,-999999);for(var f=0,_=u.length;f<_;f+=2){var c=u[f];var p=u[f+1];if(a.x>c)a.x=c;if(a.widthp)a.y=p;if(a.heighte.width){e.width=v}if(b>e.height){e.height=b}}}e.width-=e.x;e.height-=e.y;if(t.EgretFactory._isV5){if(this._bounds===null){this._bounds=new egret.Rectangle}this._bounds.copyFrom(e)}}else if(t.EgretFactory._isV5){if(this._bounds===null){this._bounds=new egret.Rectangle}e.copyFrom(this._bounds)}return e}return i.prototype.$measureContentBounds.call(this,e)};r.prototype.hasEvent=function(t){return this.hasDBEventListener(t)};r.prototype.addEvent=function(t,e,i){this.addDBEventListener(t,e,i)};r.prototype.removeEvent=function(t,e,i){this.removeDBEventListener(t,e,i)};r.prototype.advanceTimeBySelf=function(e){if(e){this._armature.clock=t.EgretFactory.factory.clock}else{this._armature.clock=null}};return r}(egret.DisplayObjectContainer);t.EgretArmatureDisplay=i;var r=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.Event=r;var a=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.ArmatureEvent=a;var n=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.AnimationEvent=n;var s=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.FrameEvent=s;var o=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(e);t.SoundEvent=o;var l=function(e){__extends(i,e);function i(i,r,a){if(a===void 0){a=1}var n=e.call(this)||this;console.warn("已废弃");n._onClear();t.ObjectDataParser.getInstance().parseTextureAtlasData(r,n,a);n.renderTexture=i;return n}i.toString=function(){return"[class dragonBones.EgretTextureAtlas]"};return i}(t.EgretTextureAtlasData);t.EgretTextureAtlas=l;var h=function(t){__extends(e,t);function e(){return t!==null&&t.apply(this,arguments)||this}return e}(l);t.EgretSheetAtlas=h;var u=function(){function e(){}e.getInstance=function(){console.warn("已废弃");return t.EgretFactory.factory.soundEventManager};return e}();t.SoundEventManager=u;var f=function(){function t(){console.warn("已废弃")}return t}();t.AnimationCacheManager=f})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=function(e){__extends(i,e);function i(){var t=e!==null&&e.apply(this,arguments)||this;t.transformUpdateEnabled=false;t._armatureDisplay=null;t._renderDisplay=null;t._colorFilter=null;return t}i.toString=function(){return"[class dragonBones.EgretSlot]"};i.prototype.init=function(i,r,a,n){e.prototype.init.call(this,i,r,a,n);if(t.EgretFactory._isV5){this._updateTransform=this._updateTransformV5}else{this._updateTransform=this._updateTransformV4}};i.prototype._onClear=function(){e.prototype._onClear.call(this);this._armatureDisplay=null;this._renderDisplay=null;this._colorFilter=null};i.prototype._initDisplay=function(t){t};i.prototype._disposeDisplay=function(t){t};i.prototype._onUpdateDisplay=function(){this._armatureDisplay=this._armature.display;this._renderDisplay=this._display!==null?this._display:this._rawDisplay;if(t.EgretFactory._isV5){if(this._renderDisplay===this._rawDisplay&&!(this._renderDisplay.$renderNode instanceof egret.sys.BitmapNode)){this._renderDisplay.$renderNode=new egret.sys.BitmapNode}}if(this._armatureDisplay._batchEnabled){if(this._renderDisplay!==this._rawDisplay&&this._renderDisplay!==this._meshDisplay){this._armatureDisplay.disableBatch()}else{var e=this._renderDisplay.$renderNode;if(!e.matrix){e.matrix=new egret.Matrix}}}};i.prototype._addDisplay=function(){if(this._armatureDisplay._batchEnabled){this._armatureDisplay.$renderNode.addNode(this._renderDisplay.$renderNode)}else{this._armatureDisplay.addChild(this._renderDisplay)}};i.prototype._replaceDisplay=function(t){var e=t;if(this._armatureDisplay._batchEnabled){var i=this._armatureDisplay.$renderNode.drawData;i[i.indexOf(e.$renderNode)]=this._renderDisplay.$renderNode}else{this._armatureDisplay.addChild(this._renderDisplay);this._armatureDisplay.swapChildren(this._renderDisplay,e);this._armatureDisplay.removeChild(e)}};i.prototype._removeDisplay=function(){if(this._armatureDisplay._batchEnabled){var t=this._armatureDisplay.$renderNode.drawData;t.splice(t.indexOf(this._renderDisplay.$renderNode),1)}else{this._renderDisplay.parent.removeChild(this._renderDisplay)}};i.prototype._updateZOrder=function(){if(this._armatureDisplay._batchEnabled){var t=this._armatureDisplay.$renderNode.drawData;t[this._zOrder]=this._renderDisplay.$renderNode}else{var e=this._armatureDisplay.getChildIndex(this._renderDisplay);if(e===this._zOrder){return}this._armatureDisplay.addChildAt(this._renderDisplay,this._zOrder)}};i.prototype._updateVisible=function(){var t=this._parent.visible&&this._visible;if(this._armatureDisplay._batchEnabled){var e=this._renderDisplay.$renderNode;e.alpha=t?1:0}else{this._renderDisplay.visible=t}};i.prototype._updateBlendMode=function(){switch(this._blendMode){case 0:this._renderDisplay.blendMode=egret.BlendMode.NORMAL;break;case 1:this._renderDisplay.blendMode=egret.BlendMode.ADD;break;case 5:this._renderDisplay.blendMode=egret.BlendMode.ERASE;break;default:break}if(this._armatureDisplay._batchEnabled){var t=this._renderDisplay.$renderNode;t.blendMode=egret.sys.blendModeToNumber(this._renderDisplay.blendMode)}};i.prototype._updateColor=function(){if(this._colorTransform.redMultiplier!==1||this._colorTransform.greenMultiplier!==1||this._colorTransform.blueMultiplier!==1||this._colorTransform.redOffset!==0||this._colorTransform.greenOffset!==0||this._colorTransform.blueOffset!==0||this._colorTransform.alphaOffset!==0){if(this._colorFilter===null){this._colorFilter=new egret.ColorMatrixFilter}var t=this._colorFilter.matrix;t[0]=this._colorTransform.redMultiplier;t[6]=this._colorTransform.greenMultiplier;t[12]=this._colorTransform.blueMultiplier;t[18]=this._colorTransform.alphaMultiplier;t[4]=this._colorTransform.redOffset;t[9]=this._colorTransform.greenOffset;t[14]=this._colorTransform.blueOffset;t[19]=this._colorTransform.alphaOffset;this._colorFilter.matrix=t;if(this._armatureDisplay._batchEnabled){var e=this._renderDisplay.$renderNode;e.filter=this._colorFilter;e.alpha=1}var i=this._renderDisplay.filters;if(!i){i=[]}if(i.indexOf(this._colorFilter)<0){i.push(this._colorFilter)}this._renderDisplay.filters=i;this._renderDisplay.$setAlpha(1)}else{if(this._armatureDisplay._batchEnabled){var e=this._renderDisplay.$renderNode;e.filter=null;e.alpha=this._colorTransform.alphaMultiplier}this._renderDisplay.filters=null;this._renderDisplay.$setAlpha(this._colorTransform.alphaMultiplier)}};i.prototype._updateFrame=function(){var e=this._display===this._meshDisplay?this._meshData:null;var i=this._textureData;if(this._displayIndex>=0&&this._display!==null&&i!==null){if(this._armature.replacedTexture!==null&&this._rawDisplayDatas!==null&&this._rawDisplayDatas.indexOf(this._displayData)>=0){var r=i.parent;if(this._armature._replaceTextureAtlasData===null){r=t.BaseObject.borrowObject(t.EgretTextureAtlasData);r.copyFrom(i.parent);r.renderTexture=this._armature.replacedTexture;this._armature._replaceTextureAtlasData=r}else{r=this._armature._replaceTextureAtlasData}i=r.getTexture(i.name)}if(i.renderTexture!==null){if(e!==null){var a=e.parent.parent.parent;var n=a.intArray;var s=a.floatArray;var o=n[e.offset+0];var l=n[e.offset+1];var h=n[e.offset+2];if(h<0){h+=65536}var u=h+o*2;var f=this._renderDisplay;var _=f.$renderNode;_.uvs.length=o*2;_.vertices.length=o*2;_.indices.length=l*3;for(var c=0,p=o*2;c0;var i=this._armature._armatureData.scale;var r=this._meshData;var a=r.weight;var n=this._renderDisplay;var s=n.$renderNode;if(a!==null){var o=r.parent.parent.parent;var l=o.intArray;var h=o.floatArray;var u=l[r.offset+0];var f=l[a.offset+1];if(f<0){f+=65536}for(var _=0,c=0,p=a.offset+2+a.bones.length,m=f,d=0;_=5.1;var n=new t.EgretArmatureDisplay;i._dragonBonesInstance=new t.DragonBones(n);i._dragonBonesInstance.clock.time=egret.getTimer()*.001;egret.startTick(i._clockHandler,i)}a._dragonBones=i._dragonBonesInstance;return a}i._clockHandler=function(t){t*=.001;var e=i._dragonBonesInstance.clock;var r=t-e.time;i._dragonBonesInstance.advanceTime(r);e.time=t;return false};Object.defineProperty(i,"factory",{get:function(){if(i._factory===null){i._factory=new i}return i._factory},enumerable:true,configurable:true});i.prototype._isSupportMesh=function(){if(egret.Capabilities.renderMode==="webgl"||egret.Capabilities.runtimeType===egret.RuntimeType.NATIVE){return true}console.warn("Canvas can not support mesh, please change renderMode to webgl.");return false};i.prototype._buildTextureAtlasData=function(e,i){if(e!==null){if(i instanceof egret.Texture){e.renderTexture=i}else{var r=new egret.Texture;r.bitmapData=new egret.BitmapData(i);e.disposeEnabled=true;e.renderTexture=r}}else{e=t.BaseObject.borrowObject(t.EgretTextureAtlasData)}return e};i.prototype._buildArmature=function(e){var i=t.BaseObject.borrowObject(t.Armature);var r=new t.EgretArmatureDisplay;i.init(e.armature,r,r,this._dragonBones);return i};i.prototype._buildSlot=function(e,i,r,a){e;a;var n=t.BaseObject.borrowObject(t.EgretSlot);n.init(i,r,new egret.Bitmap,new egret.Mesh);return n};i.prototype.buildArmatureDisplay=function(t,e,i,r){if(e===void 0){e=""}if(i===void 0){i=""}if(r===void 0){r=""}var a=this.buildArmature(t,e||"",i||"",r||"");if(a!==null){this._dragonBones.clock.add(a);return a.display}return null};i.prototype.getTextureDisplay=function(t,e){if(e===void 0){e=null}var i=this._getTextureData(e!==null?e:"",t);if(i!==null&&i.renderTexture!==null){var r=i.renderTexture;var a=new egret.Bitmap(r);a.width=r.textureWidth*i.parent.scale;a.height=r.textureHeight*i.parent.scale;return a}return null};Object.defineProperty(i.prototype,"soundEventManager",{get:function(){return this._dragonBones.eventManager},enumerable:true,configurable:true});Object.defineProperty(i,"clock",{get:function(){return i.factory.clock},enumerable:true,configurable:true});i.prototype.addSkeletonData=function(t,e){if(e===void 0){e=null}console.warn("已废弃");this.addDragonBonesData(t,e)};i.prototype.getSkeletonData=function(t){console.warn("已废弃");return this.getDragonBonesData(t)};i.prototype.removeSkeletonData=function(t){console.warn("已废弃");this.removeDragonBonesData(t)};i.prototype.addTextureAtlas=function(t,e){if(e===void 0){e=null}console.warn("已废弃");this.addTextureAtlasData(t,e)};i.prototype.getTextureAtlas=function(t){console.warn("已废弃");return this.getTextureAtlasData(t)};i.prototype.removeTextureAtlas=function(t){console.warn("已废弃");this.removeTextureAtlasData(t)};i.prototype.buildFastArmature=function(t,e,i){if(e===void 0){e=""}if(i===void 0){i=""}console.warn("已废弃");return this.buildArmature(t,e||"",i||"")};i.prototype.dispose=function(){console.warn("已废弃");this.clear()};i._isV5=false;i._dragonBonesInstance=null;i._factory=null;return i}(t.BaseFactory);t.EgretFactory=e})(dragonBones||(dragonBones={}));var dragonBones;(function(t){var e=new egret.Rectangle;var i=new egret.Matrix;var r={};function a(t,e){for(var i=0,r=t.length;i=0){e.displayConfig=this._groupConfig.display[e.displayIndex];if(e.displayConfig.type===1){var a=e.displayConfig.name in e.childMovies?e.childMovies[e.displayConfig.name]:null;if(!a){a=u(e.displayConfig.name,this._groupConfig.name);if(a){e.childMovies[e.displayConfig.name]=a}}if(a){e.display=a;e.childMovie=a}else{e.display=e.rawDisplay;e.childMovie=null}}else{e.display=e.rawDisplay;e.childMovie=null}}else{e.displayConfig=null;e.display=e.rawDisplay;e.childMovie=null}if(e.display!==i){if(i){this.addChild(e.display);this.swapChildren(e.display,i);this.removeChild(i)}this._updateSlotBlendMode(e)}if(e.display===e.rawDisplay){if(e.displayConfig&&e.displayConfig.regionIndex!==null&&e.displayConfig.regionIndex!==undefined){if(!e.displayConfig.texture){var n=this._groupConfig.textures[e.displayConfig.textureIndex||0];var s=e.displayConfig.regionIndex*4;var o=this._groupConfig.rectangleArray[s];var l=this._groupConfig.rectangleArray[s+1];var h=this._groupConfig.rectangleArray[s+2];var f=this._groupConfig.rectangleArray[s+3];e.displayConfig.texture=new egret.Texture;if(t.EgretFactory._isV5){e.displayConfig.texture["$bitmapData"]=n["$bitmapData"]}else{e.displayConfig.texture._bitmapData=n._bitmapData}e.displayConfig.texture.$initData(o,l,Math.min(h,n.textureWidth-o),Math.min(f,n.textureHeight-l),0,0,Math.min(h,n.textureWidth-o),Math.min(f,n.textureHeight-l),n.textureWidth,n.textureHeight)}if(this._batchEnabled){var _=e.displayConfig.texture;var c=e.rawDisplay.$renderNode;egret.sys.RenderNode.prototype.cleanBeforeRender.call(e.rawDisplay.$renderNode);if(t.EgretFactory._isV5){c.image=_["$bitmapData"];c.drawImage(_.$bitmapX,_.$bitmapY,_.$bitmapWidth,_.$bitmapHeight,_.$offsetX,_.$offsetY,_.textureWidth,_.textureHeight);c.imageWidth=_._sourceWidth;c.imageHeight=_._sourceHeight}else{c.image=_._bitmapData;c.drawImage(_._bitmapX,_._bitmapY,_._bitmapWidth,_._bitmapHeight,_._offsetX,_._offsetY,_.textureWidth,_.textureHeight);c.imageWidth=_._sourceWidth;c.imageHeight=_._sourceHeight}}else{e.rawDisplay.visible=true;e.rawDisplay.$setBitmapData(e.displayConfig.texture)}}else{if(this._batchEnabled){e.rawDisplay.$renderNode.image=null}else{e.rawDisplay.visible=false;e.rawDisplay.$setBitmapData(null)}}}if(e.childMovie!==r){if(r){r.stop();this._childMovies.slice(this._childMovies.indexOf(r),1)}if(e.childMovie){if(this._childMovies.indexOf(e.childMovie)<0){this._childMovies.push(e.childMovie)}if(e.config.action){e.childMovie.play(e.config.action)}else{e.childMovie.play(e.childMovie._config.action)}}}};a.prototype._getSlot=function(t){for(var e=0,i=this._slots.length;e0&&(n>=a||n<=-a)){this._isCompleted=true;s=this._playTimes;if(n<0){n=0}else{n=r}}else{this._isCompleted=false;if(n<0){s=Math.floor(-n/r);n=r- -n%r}else{s=Math.floor(n/r);n%=r}if(this._playTimes>0&&s>this._playTimes){s=this._playTimes}}if(this._currentTime===n){return}var o=Math.floor(n*this._clipConfig.cacheTimeToFrameScale);if(this._cacheFrameIndex!==o){this._cacheFrameIndex=o;var l=this._groupConfig.displayFrameArray;var h=this._groupConfig.transformArray;var u=this._groupConfig.colorArray;var f=true;var c=false;var p=false;var m=this._cacheRectangle;this._cacheRectangle=this._clipConfig.cacheRectangles[this._cacheFrameIndex];if(this._batchEnabled&&!this._cacheRectangle){p=true;this._cacheRectangle=new egret.Rectangle;this._clipConfig.cacheRectangles[this._cacheFrameIndex]=this._cacheRectangle}for(var d=0,y=this._slots.length;d=this._clipArray.length){v=this._frameSize*(this._cacheFrameIndex-1)+d*2}var b=this._clipArray[v]*2;if(b>=0){var T=l[b];var D=l[b+1]*8;var A=this._clipArray[v+1]*6;var x=false;if(g.displayIndex!==T){g.displayIndex=T;x=true;this._updateSlotDisplay(g)}if(g.colorIndex!==D||x){g.colorIndex=D;if(g.colorIndex>=0){this._updateSlotColor(g,u[D]*.01,u[D+1]*.01,u[D+2]*.01,u[D+3]*.01,u[D+4],u[D+5],u[D+6],u[D+7])}else{this._updateSlotColor(g,1,1,1,1,0,0,0,0)}}c=true;if(g.transformIndex!==A){g.transformIndex=A;if(this._batchEnabled){var O=g.display.$renderNode.matrix;if(!O){O=g.display.$renderNode.matrix=new egret.Matrix}O.a=h[A];O.b=h[A+1];O.c=h[A+2];O.d=h[A+3];O.tx=h[A+4];O.ty=h[A+5]}else{i.a=h[A];i.b=h[A+1];i.c=h[A+2];i.d=h[A+3];i.tx=h[A+4];i.ty=h[A+5];g.display.$setMatrix(i)}}if(this._batchEnabled&&p&&g.displayConfig){var O=g.display.$renderNode.matrix;e.x=0;e.y=0;e.width=g.displayConfig.texture.textureWidth;e.height=g.displayConfig.texture.textureHeight;O.$transformBounds(e);if(f){f=false;this._cacheRectangle.x=e.x;this._cacheRectangle.width=e.x+e.width;this._cacheRectangle.y=e.y;this._cacheRectangle.height=e.y+e.height}else{this._cacheRectangle.x=Math.min(this._cacheRectangle.x,e.x);this._cacheRectangle.width=Math.max(this._cacheRectangle.width,e.x+e.width);this._cacheRectangle.y=Math.min(this._cacheRectangle.y,e.y);this._cacheRectangle.height=Math.max(this._cacheRectangle.height,e.y+e.height)}}}else if(g.displayIndex!==-1){g.displayIndex=-1;this._updateSlotDisplay(g)}}if(this._cacheRectangle){if(c&&p&&f&&m){this._cacheRectangle.x=m.x;this._cacheRectangle.y=m.y;this._cacheRectangle.width=m.width;this._cacheRectangle.height=m.height}this.$invalidateContentBounds()}}if(this._isCompleted){this._isPlaying=false}if(!this._isStarted){this._isStarted=true;if(this.hasEventListener(_.START)){var S=egret.Event.create(_,_.START);S.movie=this;S.clipName=this._clipConfig.name;S.name="";S.slotName="";this.dispatchEvent(S)}}this._isReversing=this._currentTime>n&&this._currentPlayTimes===s;this._currentTime=n;var E=this._clipConfig.frame?this._clipConfig.frame.length:0;if(E>0){var B=Math.floor(this._currentTime*this._config.frameRate);var M=this._groupConfig.frame[this._clipConfig.frame[B]];if(this._currentFrameConfig!==M){if(E>1){var w=this._currentFrameConfig;this._currentFrameConfig=M;if(!w){var P=Math.floor(this._currentTime*this._config.frameRate);w=this._groupConfig.frame[this._clipConfig.frame[P]];if(this._isReversing){}else{if(this._currentTime<=w.position||this._currentPlayTimes!==s){w=this._groupConfig.frame[w.prev]}}}if(this._isReversing){while(w!==M){this._onCrossFrame(w);w=this._groupConfig.frame[w.prev]}}else{while(w!==M){w=this._groupConfig.frame[w.next];this._onCrossFrame(w)}}}else{this._currentFrameConfig=M;if(this._currentFrameConfig){this._onCrossFrame(this._currentFrameConfig)}}}}if(this._currentPlayTimes!==s){this._currentPlayTimes=s;if(this.hasEventListener(_.LOOP_COMPLETE)){var C=egret.Event.create(_,_.LOOP_COMPLETE);C.movie=this;C.clipName=this._clipConfig.name;C.name="";C.slotName="";this.dispatchEvent(C);egret.Event.release(C)}if(this._isCompleted&&this.hasEventListener(_.COMPLETE)){var I=egret.Event.create(_,_.COMPLETE);I.movie=this;I.clipName=this._clipConfig.name;I.name="";I.slotName="";this.dispatchEvent(I);egret.Event.release(I)}}}this._isLockDispose=false;if(this._isDelayDispose){this.dispose()}};a.prototype.play=function(t,e){if(t===void 0){t=null}if(e===void 0){e=-1}if(t){var i=null;for(var r=0,a=this._config.clip.length;r-1?e.addEventListener("DOMMouseScroll",v,{passive:!0}):e.addEventListener("mousewheel",v,{passive:!0})},a=function(){var e=document.getElementById("game");navigator.userAgent.toLowerCase().indexOf("firefox")>-1?e.removeEventListener("DOMMouseScroll",v,{passive:!0}):e.removeEventListener("mousewheel",v,{passive:!0})},v=function(t){var o=Math.max(-1,Math.min(1,t.wheelDelta||-t.detail));s(e.MouseEvent.WHEEL,!0,0,o)},E=function(o,n){t&&!t.$stage&&(s(e.MouseEvent.MOUSE_OUT,!0,o,n),s(e.MouseEvent.ROLL_OUT,!1,o,n),t=null,a());var u=r.$hitTest(o,n);null!=u&&u!=r?t?u!=t&&(s(e.MouseEvent.MOUSE_OUT,!0,o,n),t.$getConcatenatedVisible()&&t.hitTestPoint(o,n)||(s(e.MouseEvent.ROLL_OUT,!1,o,n),a()),t=u,s(e.MouseEvent.ROLL_OVER,!1,o,n),s(e.MouseEvent.MOUSE_OVER,!0,o,n),i()):(t=u,s(e.MouseEvent.ROLL_OVER,!1,o,n),s(e.MouseEvent.MOUSE_OVER,!0,o,n),i()):t&&(s(e.MouseEvent.MOUSE_OUT,!0,o,n),s(e.MouseEvent.ROLL_OUT,!1,o,n),t=null,a())},l=NaN,O=NaN,c=egret.sys.TouchHandler.prototype.onTouchMove;egret.sys.TouchHandler.prototype.onTouchMove=function(t,n,s){if(l=t,O=n,c.call(this,t,n,s),u){var r=o.$hitTest(t,n);r||(r=o),egret.TouchEvent.dispatchTouchEvent(r,e.MouseEvent.MOUSE_MOVE,!0,!0,t,n,s,!0)}E(t,n)};var M=egret.sys.TouchHandler.prototype.onTouchBegin;egret.sys.TouchHandler.prototype.onTouchBegin=function(e,t,o){M.call(this,e,t,o),E(e,t)};var d=egret.sys.TouchHandler.prototype.onTouchEnd;egret.sys.TouchHandler.prototype.onTouchEnd=function(e,t,o){d.call(this,e,t,o),E(e,t)},r.addEventListener(egret.Event.ENTER_FRAME,function(){NaN!=l&&NaN!=O&&E(l,O)},null)},e.setButtonMode=function(e,t){e.buttonModeForMouse=t};var u=!1;e.setMouseMoveEnabled=function(e){u=e}}(mouse||(mouse={})); //libs/commonlibs/app/app.min.js function launchFullscreen(element) { if(element.requestFullscreen) { element.requestFullscreen(); } else if(element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if(element.webkitRequestFullscreen) { element.webkitRequestFullscreen(); } else if(element.msRequestFullscreen) { element.msRequestFullscreen(); } } function hideLanding() { if(document.getElementById("logo")) { document.getElementById("logo").style.display = "none"; } if(document.getElementById("loading")) { document.getElementById("loading").style.display = "none"; } if(document.getElementById("msg")) { document.getElementById("msg").style.display = "none"; } if(document.getElementById("poweredby")) { document.getElementById("poweredby").style.display = "none"; } if(document.getElementById("animation_container")) { var animation_container = document.getElementById("animation_container"); while (animation_container.hasChildNodes()) { animation_container.removeChild(animation_container.firstChild); } document.getElementById("animation_container").style.display = "none"; } } function isIOS13Safari() { var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); var iosVersion; if (/iP(hone|od|ad)/.test(navigator.platform)) { // supports iOS 2.0 and later: var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; if(iosVersion[0] == 13 && isSafari) { return true; } } } function isOverIOS13Safari(){ var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); var iosVersion; if (/iP(hone|od|ad)/.test(navigator.platform)) { // supports iOS 2.0 and later: var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; if(iosVersion[0] >= 13 && isSafari) { return true; } } } function isIOS14(){ var iosVersion; if (/iP(hone|od|ad)/.test(navigator.platform)) { // supports iOS 2.0 and later: var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; if(iosVersion[0] >= 14) { return true; } } } function isIOS15Safari(){ var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); var iosVersion; if (/iP(hone|od|ad)/.test(navigator.platform)) { // supports iOS 2.0 and later: var v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; if(iosVersion[0] >= 15 && isSafari) { return true; } } } function isIOSover18Safari() { var isSafari = !!navigator.userAgent.match(/Version\/[\d\.]+.*Safari/); var iosVersion; if (/iP(hone|od|ad)/.test(navigator.platform)) { let v = (navigator.appVersion).match(/OS (\d+)_(\d+)_?(\d+)?/); iosVersion = [parseInt(v[1], 10), parseInt(v[2], 10), parseInt((v[3] || '0'), 10)]; if (iosVersion[0] >= 18 && isSafari) { return true; } } } function isAndroidChrome() { var ischrome = 0; if (navigator.userAgent.toLowerCase().indexOf('chrome/') > -1) { ischrome = 1; return true; } } function isIOSChrome() { var is_ios_chrome = 0; if (navigator.userAgent.toLowerCase().indexOf('crios/') > -1) // chrome for ios9 { is_ios_chrome = 1; return true; } } function isFullScreen() { return (document.fullscreenElement || document.mozFullScreenElement || document.webkitFullscreenElement || document.msFullscreenElement); } function isSupportFullScreen() { var element = document.documentElement; var requestMethod = element.requestFullscreen || element.webkitRequestFullscreen || element.mozRequestFullScreen || element.msRequestFullscreen; if (requestMethod) { return true; } return false; } /** * detect IE * returns version of IE or false, if browser is not Internet Explorer */ function detectIE() { var ua = window.navigator.userAgent; // Test values; Uncomment to check result … // IE 10 // ua = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)'; // IE 11 // ua = 'Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko'; // Edge 12 (Spartan) // ua = 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.71 Safari/537.36 Edge/12.0'; // Edge 13 // ua = 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2486.0 Safari/537.36 Edge/13.10586'; var msie = ua.indexOf('MSIE '); if (msie > 0) { // IE 10 or older => return version number return parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10); } var trident = ua.indexOf('Trident/'); if (trident > 0) { // IE 11 => return version number var rv = ua.indexOf('rv:'); return parseInt(ua.substring(rv + 3, ua.indexOf('.', rv)), 10); } var edge = ua.indexOf('Edge/'); if (edge > 0) { // Edge (IE 12+) => return version number return parseInt(ua.substring(edge + 5, ua.indexOf('.', edge)), 10); } // other browser return false; } function detectFirefox() { var f = navigator.userAgent.search("Firefox"); if (f > -1) { return true; } return false; } //libs/commonlibs/apputil/apputil.min.js var apputil = (function () { function apputil() { } apputil.exitFullScreen = function(){ var element = document.getElementById("game"); if(element.exitFullscreen) { element.exitFullscreen(); } else if(element.mozExitFullScreen) { element.mozExitFullScreen(); } else if(element.webkitExitFullscreen) { element.webkitExitFullscreen(); } else if(element.msExitFullscreen) { element.msExitFullscreen(); } else if(document.cancelFullScreen) { document.cancelFullScreen(); } else if(document.mozCancelFullScreen) { document.mozCancelFullScreen(); } else if(document.webkitCancelFullScreen) { document.webkitCancelFullScreen(); } }; apputil.isIOSSafari = function(){ var ua = window.navigator.userAgent; // var iOS = !!ua.match(/iPad/i) || !!ua.match(/iPhone/i); var iPhone = !!ua.match(/iPhone/i); var webkit = !!ua.match(/WebKit/i); var iPhoneSafari = iPhone && webkit && !ua.match(/CriOS/i); return iPhoneSafari; } apputil.enterFullScreen = function(){ window.scrollTo(0,1); var standalone = 1; if (("standalone" in window.navigator) && !window.navigator.standalone) { standalone = 0; } var ischrome = 0; if (navigator.userAgent.toLowerCase().indexOf('chrome/') > -1) { ischrome = 1; } var is_ios_chrome = 0; if (navigator.userAgent.toLowerCase().indexOf('crios/') > -1) // chrome for ios9 { is_ios_chrome = 1; } var element = document.getElementById ("game"); if (ischrome > 0) { if(element.requestFullscreen) { element.requestFullscreen(); } else if(element.mozRequestFullScreen) { element.mozRequestFullScreen(); } else if(element.webkitRequestFullscreen) { element.webkitRequestFullscreen(); } else if(element.msRequestFullscreen) { element.msRequestFullscreen(); } } }; return apputil; })(); // function IPhone7Helper() {} // IPhone7Helper.prototype.ResetScroll = function() { // if (window.scrollY != 0) // window.scrollTo(0, 0) // } // ; // IPhone7Helper.prototype.ScrollHandler = function() { // this.ResetScroll() // } // ; // IPhone8Helper.prototype = Object.create(IPhone7Helper.prototype); // IPhone8Helper.prototype.constructor = IPhone8Helper; // function IPhone8Helper() { // IPhone7Helper.call(this); // this.root = null; // this.canvas = null; // this.isTouch = false; // this.isTopPanel = false; // this.isLandscape = false; // this.resetScrollTimeout = null; // this.clientHeight = 0; // this.panelHiddenTime = -1; // this.scaleRootMarginTop = -1 // } // IPhone8Helper.prototype.GameStarted = function() { // // var logoVisible = window["UHTLogoIsVisible"]; // // var loaderVisible = window["loaderIsVisible"] != undefined ? window["loaderIsVisible"] : true; // // return !logoVisible && !loaderVisible // var loaderVisible = window["loaderIsVisible"] != undefined ? window["loaderIsVisible"] : true; // return !loaderVisible // } // ; // IPhone8Helper.prototype.CreateElement = function(className, append) { // var el = document.createElement("div"); // el.className = className; // if (append) // document.body.appendChild(el); // return el // } // ; // IPhone8Helper.prototype.InitElements = function() { // var self = this; // this.CreateElement("fullscreen-reserve", true); // this.root = this.CreateElement("fullscreen-root-hidden", true); // this.root.addEventListener("touchstart", function() { // self.HandleTouchStart.apply(self, arguments) // }, false); // this.root.addEventListener("touchmove", function() { // self.HandleTouchMove.apply(self, arguments) // }, false); // this.root.addEventListener("touchend", function() { // self.HandleTouchEnd.apply(self, arguments) // }, false); // this.root.addEventListener("touchcancel", function() { // self.HandleTouchEnd.apply(self, arguments) // }, false); // this.root.addEventListener("gesturestart", function() { // self.PreventEvent.apply(self, arguments) // }, false); // this.root.addEventListener("gesturechange", function() { // self.PreventEvent.apply(self, arguments) // }, false); // this.root.addEventListener("gestureend", function() { // self.PreventEvent.apply(self, arguments) // }, false); // this.canvas = document.getElementsByTagName("canvas")[0] // } // ; // IPhone8Helper.prototype.PreventEvent = function(e) { // e.preventDefault() // } // ; // IPhone8Helper.prototype.ResizeHandler = function(e) { // var self = this; // if (!this.GameStarted()) { // setTimeout(function() { // self.ResizeHandler() // }, 100); // return // } // if (this.root == null) // this.InitElements(); // var wasLandscape = this.isLandscape; // this.isLandscape = window.innerWidth > window.innerHeight; // if (!this.isTouch) // if (wasLandscape == this.isLandscape) { // if (this.panelHiddenTime > 0) // if (Date.now() - this.panelHiddenTime < 69) { // setTimeout(function() { // self.ResizeHandler(e) // }, 500); // return // } // } else // this.ResetScroll(); // var screenHeight = this.isLandscape ? Math.min(screen.width, screen.height) : Math.max(screen.width, screen.height) - 60; // this.clientHeight = this.GetClientHeight(); // var wasTopPanel = this.isTopPanel; // this.isTopPanel = this.clientHeight < screenHeight; // if (this.isTopPanel) { // if (!wasTopPanel) { // this.UpdateStyle(true); // this.ResetScroll(); // this.UpdateScrollable(true); // // UHTEventBroker.Trigger(UHTEventBroker.Type.Game, JSON.stringify({ // // common: "EVT_FULLSCREEN_OVERLAY_SHOWN", // // args: null // // })); // this.panelHiddenTime = -1 // } // } else { // if (wasTopPanel) { // this.UpdateStyle(false); // // UHTEventBroker.Trigger(UHTEventBroker.Type.Game, JSON.stringify({ // // common: "EVT_FULLSCREEN_OVERLAY_HIDDEN", // // args: null // // })); // this.panelHiddenTime = Date.now() // } // this.UpdateScrollable(false) // } // if (e !== undefined) // setTimeout(function() { // self.ResizeHandler() // }, 500) // } // ; // IPhone8Helper.prototype.UpdateStyle = function(visible) { // var c = String(document.documentElement.className).replace("fullscreen-visible", "").split(" "); // var cn = []; // for (var i = 0; i < c.length; ++i) // if (c[i] != "") // cn.push(c[i]); // if (visible) // cn.push("fullscreen-visible"); // document.documentElement.className = cn.join(" "); // this.root.className = visible ? "fullscreen-root-visible" : "fullscreen-root-hidden" // } // ; // IPhone8Helper.prototype.UpdateScrollable = function(scrollable) { // document.body.style.position = scrollable ? "static" : "fixed"; // this.canvas.style.position = scrollable ? "fixed" : "static" // } // ; // IPhone8Helper.prototype.HandleTouchStart = function(event) { // if (this.resetScrollTimeout != null) { // clearTimeout(this.resetScrollTimeout); // this.resetScrollTimeout = null // } // this.isTouch = true; // this.UpdateScrollable(false) // } // ; // IPhone8Helper.prototype.HandleTouchMove = function(event) { // if (this.isTopPanel) // this.ResizeHandler(); // if (this.isTopPanel && window.scrollY > 0) // this.UpdateScrollable(true); // else // this.UpdateScrollable(false) // } // ; // IPhone8Helper.prototype.HandleTouchEnd = function() { // var self = this; // this.isTouch = false; // this.UpdateScrollable(false); // this.resetScrollTimeout = setTimeout(function() { // self.ResetScroll() // }, 200) // } // ; // IPhone8Helper.prototype.ScrollHandler = function() { // if (this.clientHeight != this.GetClientHeight()) { // var event = document.createEvent("HTMLEvents"); // event.initEvent("resize", true, true); // window.dispatchEvent(event) // } // } // ; // IPhone8Helper.prototype.ResetScroll = function() { // if (window.scrollY != 0) // window.scrollTo(0, 0) // } // ; // IPhone8Helper.prototype.GetClientHeight = function() { // var height = window.innerHeight; // if (!this.isTouch && this.resetScrollTimeout == null) // if (window.scrollY > 0) // height -= window.scrollY; // return height // } // ; // var FullScreenIPhoneHelper = {}; // FullScreenIPhoneHelper.Init = function() { // // if (UHT_FRAME) // // return; // // var parser = new UAParser2; // // var device = parser.getDevice(); // // var browser = parser.getBrowser(); // // if (!(device.model == "iPhone" && browser.name == "Mobile Safari")) // // return; // // var os = parser.getOS(); // // var version = _number.otoui(os.version); // // if (version == 7) { // // var h = new IPhone7Helper; // // var onScroll = function() { // // h.ScrollHandler.apply(h, arguments) // // }; // // window.addEventListener("scroll", onScroll, false); // // h.ScrollHandler() // // } else // { // var h = new IPhone8Helper; // var onScroll = function() { // h.ScrollHandler.apply(h, arguments) // }; // var onResize = function() { // h.ResizeHandler.apply(h, arguments) // }; // window.addEventListener("resize", onResize, false); // window.addEventListener("scroll", onScroll, false); // h.ResizeHandler(); // h.ScrollHandler(); // h.ResetScroll() // } // } // ; // (function() { // var keyboardAllowed = typeof Element !== "undefined" && "ALLOW_KEYBOARD_INPUT"in Element; // var fn = function() { // var val; // var valLength; // var fnMap = [["requestFullscreen", "exitFullscreen", "fullscreenElement", "fullscreenEnabled", "fullscreenchange", "fullscreenerror"], ["webkitRequestFullscreen", "webkitExitFullscreen", "webkitFullscreenElement", "webkitFullscreenEnabled", "webkitfullscreenchange", "webkitfullscreenerror"], ["webkitRequestFullScreen", "webkitCancelFullScreen", "webkitCurrentFullScreenElement", "webkitCancelFullScreen", "webkitfullscreenchange", "webkitfullscreenerror"], ["mozRequestFullScreen", "mozCancelFullScreen", "mozFullScreenElement", "mozFullScreenEnabled", "mozfullscreenchange", "mozfullscreenerror"], ["msRequestFullscreen", "msExitFullscreen", "msFullscreenElement", "msFullscreenEnabled", "MSFullscreenChange", "MSFullscreenError"]]; // var i = 0; // var l = fnMap.length; // var ret = {}; // for (; i < l; i++) { // val = fnMap[i]; // if (val && val[1]in document) { // for (i = 0, // valLength = val.length; i < valLength; i++) // ret[fnMap[0][i]] = val[i]; // return ret // } // } // return false // }(); // var screenfull = { // request: function(elem) { // var request = fn.requestFullscreen; // elem = elem || document.documentElement; // if (/5\.1[\.\d]* Safari/.test(navigator.userAgent)) // elem[request](); // else // elem[request](keyboardAllowed && Element.ALLOW_KEYBOARD_INPUT) // }, // exit: function() { // document[fn.exitFullscreen]() // }, // toggle: function(elem) { // if (this.isFullscreen) // this.exit(); // else // this.request(elem) // }, // raw: fn // }; // if (!fn) { // window.screenfull = false; // return // } // Object.defineProperties(screenfull, { // isFullscreen: { // get: function() { // return !!document[fn.fullscreenElement] // } // }, // element: { // enumerable: true, // get: function() { // return document[fn.fullscreenElement] // } // }, // enabled: { // enumerable: true, // get: function() { // return !!document[fn.fullscreenEnabled] // } // } // }); // window.screenfull = screenfull // } // )(); // var FullScreenManager = {}; // FullScreenManager.overlay = null; // FullScreenManager.reserve = null; // FullScreenManager.RequestFullscreen = function() { // if (!window.screenfull.isFullscreen) // window.screenfull.request() // } // ; // FullScreenManager.ExitFullscreen = function() { // if (window.screenfull.isFullscreen) // window.screenfull.exit() // } // ; // FullScreenManager.IsFullscreen = function() { // return window.screenfull.isFullscreen // } // ; // FullScreenManager.Init = function() { // // if (!UHT_DEVICE_TYPE.MOBILE) // // return; // var self = FullScreenManager; // if (window.screenfull && window.screenfull.enabled) // { // window.addEventListener('load', function () { // window.document.body.addEventListener('touchend', function(e){ // self.RequestFullscreen(); // }, false) // }); // } // // var inputMng = globalColliderInputManager; // // if (inputMng == undefined) { // // setTimeout(self.Init, 50); // // return // // } // // if (window.screenfull && window.screenfull.enabled) // // inputMng.addEventHandler(ColliderEvent.ButtonUp, new EventHandler(self,self.RequestFullscreen)); // FullScreenIPhoneHelper.Init() // } // ; // FullScreenManager.OnLoad = function() { // var self = FullScreenManager; // self.Init(); // window.RequestFullscreen = self.RequestFullscreen; // window.ExitFullscreen = self.ExitFullscreen; // window.IsFullscreen = self.IsFullscreen // } // ; // FullScreenManager.OnLoad(); // var NoSleep = {}; // NoSleep.os = null; // NoSleep.uap = null; // NoSleep.browserName = ""; // NoSleep.Android = function() { // var srcWebM = document.createElement("source"); // srcWebM.src = "data:video/webm;base64,GkXfo0AgQoaBAUL3gQFC8oEEQvOBCEKCQAR3ZWJtQoeBAkKFgQIYU4BnQI0VSalmQCgq17FAAw9CQE2AQAZ3aGFtbXlXQUAGd2hhbW15RIlACECPQAAAAAAAFlSua0AxrkAu14EBY8WBAZyBACK1nEADdW5khkAFVl9WUDglhohAA1ZQOIOBAeBABrCBCLqBCB9DtnVAIueBAKNAHIEAAIAwAQCdASoIAAgAAUAmJaQAA3AA/vz0AAA="; // srcWebM.type = "video/webm"; // var srcMP4 = document.createElement("source"); // srcMP4.src = "data:video/mp4;base64,AAAAHGZ0eXBpc29tAAACAGlzb21pc28ybXA0MQAAAAhmcmVlAAAAG21kYXQAAAGzABAHAAABthADAowdbb9/AAAC6W1vb3YAAABsbXZoZAAAAAB8JbCAfCWwgAAAA+gAAAAAAAEAAAEAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAIAAAIVdHJhawAAAFx0a2hkAAAAD3wlsIB8JbCAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAIAAAACAAAAAABsW1kaWEAAAAgbWRoZAAAAAB8JbCAfCWwgAAAA+gAAAAAVcQAAAAAAC1oZGxyAAAAAAAAAAB2aWRlAAAAAAAAAAAAAAAAVmlkZW9IYW5kbGVyAAAAAVxtaW5mAAAAFHZtaGQAAAABAAAAAAAAAAAAAAAkZGluZgAAABxkcmVmAAAAAAAAAAEAAAAMdXJsIAAAAAEAAAEcc3RibAAAALhzdHNkAAAAAAAAAAEAAACobXA0dgAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAIAAgASAAAAEgAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABj//wAAAFJlc2RzAAAAAANEAAEABDwgEQAAAAADDUAAAAAABS0AAAGwAQAAAbWJEwAAAQAAAAEgAMSNiB9FAEQBFGMAAAGyTGF2YzUyLjg3LjQGAQIAAAAYc3R0cwAAAAAAAAABAAAAAQAAAAAAAAAcc3RzYwAAAAAAAAABAAAAAQAAAAEAAAABAAAAFHN0c3oAAAAAAAAAEwAAAAEAAAAUc3RjbwAAAAAAAAABAAAALAAAAGB1ZHRhAAAAWG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAK2lsc3QAAAAjqXRvbwAAABtkYXRhAAAAAQAAAABMYXZmNTIuNzguMw=="; // srcMP4.type = "video/mp4"; // var video = document.createElement("video"); // video.setAttribute("loop", ""); // video.appendChild(srcWebM); // video.appendChild(srcMP4); // video.play(); // renderCanvas.removeEventListener("touchend", NoSleep.Android, false); // NoSleep = null // } // ; // NoSleep.IOS10 = function() { // var video = document.createElement("video"); // video.setAttribute("playsinline", ""); // video.setAttribute("src", "data:video/mp4;base64,AAAAIGZ0eXBtcDQyAAACAGlzb21pc28yYXZjMW1wNDEAAAAIZnJlZQAACKBtZGF0AAAC8wYF///v3EXpvebZSLeWLNgg2SPu73gyNjQgLSBjb3JlIDE0MiByMjQ3OSBkZDc5YTYxIC0gSC4yNjQvTVBFRy00IEFWQyBjb2RlYyAtIENvcHlsZWZ0IDIwMDMtMjAxNCAtIGh0dHA6Ly93d3cudmlkZW9sYW4ub3JnL3gyNjQuaHRtbCAtIG9wdGlvbnM6IGNhYmFjPTEgcmVmPTEgZGVibG9jaz0xOjA6MCBhbmFseXNlPTB4MToweDExMSBtZT1oZXggc3VibWU9MiBwc3k9MSBwc3lfcmQ9MS4wMDowLjAwIG1peGVkX3JlZj0wIG1lX3JhbmdlPTE2IGNocm9tYV9tZT0xIHRyZWxsaXM9MCA4eDhkY3Q9MCBjcW09MCBkZWFkem9uZT0yMSwxMSBmYXN0X3Bza2lwPTEgY2hyb21hX3FwX29mZnNldD0wIHRocmVhZHM9NiBsb29rYWhlYWRfdGhyZWFkcz0xIHNsaWNlZF90aHJlYWRzPTAgbnI9MCBkZWNpbWF0ZT0xIGludGVybGFjZWQ9MCBibHVyYXlfY29tcGF0PTAgY29uc3RyYWluZWRfaW50cmE9MCBiZnJhbWVzPTMgYl9weXJhbWlkPTIgYl9hZGFwdD0xIGJfYmlhcz0wIGRpcmVjdD0xIHdlaWdodGI9MSBvcGVuX2dvcD0wIHdlaWdodHA9MSBrZXlpbnQ9MzAwIGtleWludF9taW49MzAgc2NlbmVjdXQ9NDAgaW50cmFfcmVmcmVzaD0wIHJjX2xvb2thaGVhZD0xMCByYz1jcmYgbWJ0cmVlPTEgY3JmPTIwLjAgcWNvbXA9MC42MCBxcG1pbj0wIHFwbWF4PTY5IHFwc3RlcD00IHZidl9tYXhyYXRlPTIwMDAwIHZidl9idWZzaXplPTI1MDAwIGNyZl9tYXg9MC4wIG5hbF9ocmQ9bm9uZSBmaWxsZXI9MCBpcF9yYXRpbz0xLjQwIGFxPTE6MS4wMACAAAAAOWWIhAA3//p+C7v8tDDSTjf97w55i3SbRPO4ZY+hkjD5hbkAkL3zpJ6h/LR1CAABzgB1kqqzUorlhQAAAAxBmiQYhn/+qZYADLgAAAAJQZ5CQhX/AAj5IQADQGgcIQADQGgcAAAACQGeYUQn/wALKCEAA0BoHAAAAAkBnmNEJ/8ACykhAANAaBwhAANAaBwAAAANQZpoNExDP/6plgAMuSEAA0BoHAAAAAtBnoZFESwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBnqVEJ/8ACykhAANAaBwAAAAJAZ6nRCf/AAsoIQADQGgcIQADQGgcAAAADUGarDRMQz/+qZYADLghAANAaBwAAAALQZ7KRRUsK/8ACPkhAANAaBwAAAAJAZ7pRCf/AAsoIQADQGgcIQADQGgcAAAACQGe60Qn/wALKCEAA0BoHAAAAA1BmvA0TEM//qmWAAy5IQADQGgcIQADQGgcAAAAC0GfDkUVLCv/AAj5IQADQGgcAAAACQGfLUQn/wALKSEAA0BoHCEAA0BoHAAAAAkBny9EJ/8ACyghAANAaBwAAAANQZs0NExDP/6plgAMuCEAA0BoHAAAAAtBn1JFFSwr/wAI+SEAA0BoHCEAA0BoHAAAAAkBn3FEJ/8ACyghAANAaBwAAAAJAZ9zRCf/AAsoIQADQGgcIQADQGgcAAAADUGbeDRMQz/+qZYADLkhAANAaBwAAAALQZ+WRRUsK/8ACPghAANAaBwhAANAaBwAAAAJAZ+1RCf/AAspIQADQGgcAAAACQGft0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bm7w0TEM//qmWAAy4IQADQGgcAAAAC0Gf2kUVLCv/AAj5IQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHAAAAAkBn/tEJ/8ACykhAANAaBwAAAANQZvgNExDP/6plgAMuSEAA0BoHCEAA0BoHAAAAAtBnh5FFSwr/wAI+CEAA0BoHAAAAAkBnj1EJ/8ACyghAANAaBwhAANAaBwAAAAJAZ4/RCf/AAspIQADQGgcAAAADUGaJDRMQz/+qZYADLghAANAaBwAAAALQZ5CRRUsK/8ACPkhAANAaBwhAANAaBwAAAAJAZ5hRCf/AAsoIQADQGgcAAAACQGeY0Qn/wALKSEAA0BoHCEAA0BoHAAAAA1Bmmg0TEM//qmWAAy5IQADQGgcAAAAC0GehkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGepUQn/wALKSEAA0BoHAAAAAkBnqdEJ/8ACyghAANAaBwAAAANQZqsNExDP/6plgAMuCEAA0BoHCEAA0BoHAAAAAtBnspFFSwr/wAI+SEAA0BoHAAAAAkBnulEJ/8ACyghAANAaBwhAANAaBwAAAAJAZ7rRCf/AAsoIQADQGgcAAAADUGa8DRMQz/+qZYADLkhAANAaBwhAANAaBwAAAALQZ8ORRUsK/8ACPkhAANAaBwAAAAJAZ8tRCf/AAspIQADQGgcIQADQGgcAAAACQGfL0Qn/wALKCEAA0BoHAAAAA1BmzQ0TEM//qmWAAy4IQADQGgcAAAAC0GfUkUVLCv/AAj5IQADQGgcIQADQGgcAAAACQGfcUQn/wALKCEAA0BoHAAAAAkBn3NEJ/8ACyghAANAaBwhAANAaBwAAAANQZt4NExC//6plgAMuSEAA0BoHAAAAAtBn5ZFFSwr/wAI+CEAA0BoHCEAA0BoHAAAAAkBn7VEJ/8ACykhAANAaBwAAAAJAZ+3RCf/AAspIQADQGgcAAAADUGbuzRMQn/+nhAAYsAhAANAaBwhAANAaBwAAAAJQZ/aQhP/AAspIQADQGgcAAAACQGf+UQn/wALKCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHCEAA0BoHAAACiFtb292AAAAbG12aGQAAAAA1YCCX9WAgl8AAAPoAAAH/AABAAABAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADAAAAGGlvZHMAAAAAEICAgAcAT////v7/AAAF+XRyYWsAAABcdGtoZAAAAAPVgIJf1YCCXwAAAAEAAAAAAAAH0AAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAEAAAAAAygAAAMoAAAAAACRlZHRzAAAAHGVsc3QAAAAAAAAAAQAAB9AAABdwAAEAAAAABXFtZGlhAAAAIG1kaGQAAAAA1YCCX9WAgl8AAV+QAAK/IFXEAAAAAAAtaGRscgAAAAAAAAAAdmlkZQAAAAAAAAAAAAAAAFZpZGVvSGFuZGxlcgAAAAUcbWluZgAAABR2bWhkAAAAAQAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZgAAAAAAAAABAAAADHVybCAAAAABAAAE3HN0YmwAAACYc3RzZAAAAAAAAAABAAAAiGF2YzEAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAygDKAEgAAABIAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAY//8AAAAyYXZjQwFNQCj/4QAbZ01AKOyho3ySTUBAQFAAAAMAEAAr8gDxgxlgAQAEaO+G8gAAABhzdHRzAAAAAAAAAAEAAAA8AAALuAAAABRzdHNzAAAAAAAAAAEAAAABAAAB8GN0dHMAAAAAAAAAPAAAAAEAABdwAAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAADqYAAAAAQAAF3AAAAABAAAAAAAAAAEAAAu4AAAAAQAAOpgAAAABAAAXcAAAAAEAAAAAAAAAAQAAC7gAAAABAAA6mAAAAAEAABdwAAAAAQAAAAAAAAABAAALuAAAAAEAAC7gAAAAAQAAF3AAAAABAAAAAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAEEc3RzegAAAAAAAAAAAAAAPAAAAzQAAAAQAAAADQAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAAPAAAADQAAAA0AAAARAAAADwAAAA0AAAANAAAAEQAAAA8AAAANAAAADQAAABEAAAANAAAADQAAAQBzdGNvAAAAAAAAADwAAAAwAAADZAAAA3QAAAONAAADoAAAA7kAAAPQAAAD6wAAA/4AAAQXAAAELgAABEMAAARcAAAEbwAABIwAAAShAAAEugAABM0AAATkAAAE/wAABRIAAAUrAAAFQgAABV0AAAVwAAAFiQAABaAAAAW1AAAFzgAABeEAAAX+AAAGEwAABiwAAAY/AAAGVgAABnEAAAaEAAAGnQAABrQAAAbPAAAG4gAABvUAAAcSAAAHJwAAB0AAAAdTAAAHcAAAB4UAAAeeAAAHsQAAB8gAAAfjAAAH9gAACA8AAAgmAAAIQQAACFQAAAhnAAAIhAAACJcAAAMsdHJhawAAAFx0a2hkAAAAA9WAgl/VgIJfAAAAAgAAAAAAAAf8AAAAAAAAAAAAAAABAQAAAAABAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAACsm1kaWEAAAAgbWRoZAAAAADVgIJf1YCCXwAArEQAAWAAVcQAAAAAACdoZGxyAAAAAAAAAABzb3VuAAAAAAAAAAAAAAAAU3RlcmVvAAAAAmNtaW5mAAAAEHNtaGQAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAidzdGJsAAAAZ3N0c2QAAAAAAAAAAQAAAFdtcDRhAAAAAAAAAAEAAAAAAAAAAAACABAAAAAArEQAAAAAADNlc2RzAAAAAAOAgIAiAAIABICAgBRAFQAAAAADDUAAAAAABYCAgAISEAaAgIABAgAAABhzdHRzAAAAAAAAAAEAAABYAAAEAAAAABxzdHNjAAAAAAAAAAEAAAABAAAAAQAAAAEAAAAUc3RzegAAAAAAAAAGAAAAWAAAAXBzdGNvAAAAAAAAAFgAAAOBAAADhwAAA5oAAAOtAAADswAAA8oAAAPfAAAD5QAAA/gAAAQLAAAEEQAABCgAAAQ9AAAEUAAABFYAAARpAAAEgAAABIYAAASbAAAErgAABLQAAATHAAAE3gAABPMAAAT5AAAFDAAABR8AAAUlAAAFPAAABVEAAAVXAAAFagAABX0AAAWDAAAFmgAABa8AAAXCAAAFyAAABdsAAAXyAAAF+AAABg0AAAYgAAAGJgAABjkAAAZQAAAGZQAABmsAAAZ+AAAGkQAABpcAAAauAAAGwwAABskAAAbcAAAG7wAABwYAAAcMAAAHIQAABzQAAAc6AAAHTQAAB2QAAAdqAAAHfwAAB5IAAAeYAAAHqwAAB8IAAAfXAAAH3QAAB/AAAAgDAAAICQAACCAAAAg1AAAIOwAACE4AAAhhAAAIeAAACH4AAAiRAAAIpAAACKoAAAiwAAAItgAACLwAAAjCAAAAFnVkdGEAAAAObmFtZVN0ZXJlbwAAAHB1ZHRhAAAAaG1ldGEAAAAAAAAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAAO2lsc3QAAAAzqXRvbwAAACtkYXRhAAAAAQAAAABIYW5kQnJha2UgMC4xMC4yIDIwMTUwNjExMDA="); // video.addEventListener("timeupdate", function() { // if (video.currentTime > .5) // video.currentTime = Math.random() // }); // video.play(); // document.removeEventListener("touchstart", NoSleep.IOS10, false); // NoSleep = null // } // ; // NoSleep.Init = function() { // if (NoSleep.uap == null) { // NoSleep.uap = new UAParser2; // NoSleep.os = NoSleep.uap.getOS() || { // name: "", // version: "0" // }; // NoSleep.browserName = NoSleep.uap.getBrowser().name // } // if (NoSleep.os.name == "Android" && NoSleep.uap.getBrowser().name == "Chrome") { // if (renderCanvas == undefined) { // setTimeout(NoSleep.Init, 100); // return // } // renderCanvas.addEventListener("touchend", NoSleep.Android, false) // } else if (NoSleep.os.name == "iOS" && ["Safari", "Chrome"].indexOf(NoSleep.browserName) != -1) // if (parseFloat(NoSleep.os.version) >= 10) // document.addEventListener("touchstart", NoSleep.IOS10, false) // } // ; // NoSleep.Init(); //libs/commonlibs/webaudio/webaudio.min.js var webaudio = (function () { var audioCtx = null; var soundclip = null; var masterVolumn = 1; var sources = []; function webaudio() { } webaudio.isSupported = function () { if('webkitAudioContext' in window || 'AudioContext' in window ) { return true; } return false; } webaudio.stopAll = function () { for (var i =0; i.998){var n=this._time;this.render(0,!0,!1),this._initted=!1,this.render(n,!0,!1)}else if(this._time>0){this._initted=!1,this._init();for(var a,o=1/(1-r),h=this._firstPT;h;)a=h.s+h.c,h.c*=o,h.s=a-h.c,h=h._next}return this},_.render=function(t,e,i){this._initted||0===this._duration&&this.vars.repeat&&this.invalidate();var s,r,o,h,_,u,c,m,p=this._dirty?this.totalDuration():this._totalDuration,f=this._time,d=this._totalTime,g=this._cycle,v=this._duration,y=this._rawPrevTime;if(t>=p?(this._totalTime=p,this._cycle=this._repeat,this._yoyo&&0!==(1&this._cycle)?(this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0):(this._time=v,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1),this._reversed||(s=!0,r="onComplete"),0===v&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0===t||0>y||y===n)&&y!==t&&(i=!0,y>n&&(r="onReverseComplete")),this._rawPrevTime=m=!e||t||y===t?t:n)):1e-7>t?(this._totalTime=this._time=this._cycle=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==d||0===v&&y>0&&y!==n)&&(r="onReverseComplete",s=this._reversed),0>t?(this._active=!1,0===v&&(this._initted||!this.vars.lazy||i)&&(y>=0&&(i=!0),this._rawPrevTime=m=!e||t||y===t?t:n)):this._initted||(i=!0)):(this._totalTime=this._time=t,0!==this._repeat&&(h=v+this._repeatDelay,this._cycle=this._totalTime/h>>0,0!==this._cycle&&this._cycle===this._totalTime/h&&this._cycle--,this._time=this._totalTime-this._cycle*h,this._yoyo&&0!==(1&this._cycle)&&(this._time=v-this._time),this._time>v?this._time=v:0>this._time&&(this._time=0)),this._easeType?(_=this._time/v,u=this._easeType,c=this._easePower,(1===u||3===u&&_>=.5)&&(_=1-_),3===u&&(_*=2),1===c?_*=_:2===c?_*=_*_:3===c?_*=_*_*_:4===c&&(_*=_*_*_*_),this.ratio=1===u?1-_:2===u?_:.5>this._time/v?_/2:1-_/2):this.ratio=this._ease.getRatio(this._time/v)),f===this._time&&!i&&g===this._cycle)return void(d!==this._totalTime&&this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||l)));if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=f,this._totalTime=d,this._rawPrevTime=y,this._cycle=g,a.lazyTweens.push(this),void(this._lazy=t);this._time&&!s?this.ratio=this._ease.getRatio(this._time/v):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==f&&t>=0&&(this._active=!0),0===d&&(2===this._initted&&t>0&&this._init(),this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._totalTime||0===v)&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||l))),o=this._firstPT;o;)o.f?o.t[o.p](o.c*this.ratio+o.s):o.t[o.p]=o.c*this.ratio+o.s,o=o._next;this._onUpdate&&(0>t&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._totalTime!==d||s)&&this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||l)),this._cycle!==g&&(e||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||l)),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||l),0===v&&this._rawPrevTime===n&&m!==n&&(this._rawPrevTime=0))},r.to=function(t,e,i){return new r(t,e,i)},r.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new r(t,e,i)},r.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new r(t,e,s)},r.staggerTo=r.allTo=function(t,e,n,a,_,u,c){a=a||0;var m,p,f,d,g=n.delay||0,v=[],y=function(){n.onComplete&&n.onComplete.apply(n.onCompleteScope||this,arguments),_.apply(c||this,u||l)};for(h(t)||("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=s(t))),m=t.length,f=0;m>f;f++){p={};for(d in n)p[d]=n[d];p.delay=g,f===m-1&&_&&(p.onComplete=y),v[f]=new r(t[f],e,p),g+=a}return v},r.staggerFrom=r.allFrom=function(t,e,i,s,n,a,o){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,r.staggerTo(t,e,i,s,n,a,o)},r.staggerFromTo=r.allFromTo=function(t,e,i,s,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,r.staggerTo(t,e,s,n,a,o,h)},r.delayedCall=function(t,e,i,s,n){return new r(e,0,{delay:t,onComplete:e,onCompleteParams:i,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!1,useFrames:n,overwrite:0})},r.set=function(t,e){return new r(t,0,e)},r.isTweening=function(t){return i.getTweensOf(t,!0).length>0};var u=function(t,e){for(var s=[],r=0,n=t._first;n;)n instanceof i?s[r++]=n:(e&&(s[r++]=n),s=s.concat(u(n,e)),r=s.length),n=n._next;return s},c=r.getAllTweens=function(e){return u(t._rootTimeline,e).concat(u(t._rootFramesTimeline,e))};r.killAll=function(t,i,s,r){null==i&&(i=!0),null==s&&(s=!0);var n,a,o,h=c(0!=r),_=h.length,l=i&&s&&r;for(o=0;_>o;o++)a=h[o],(l||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&(t?a.totalTime(a._reversed?0:a.totalDuration()):a._enabled(!1,!1))},r.killChildTweensOf=function(t,e){if(null!=t){var n,_,l,u,c,m=a.tweenLookup;if("string"==typeof t&&(t=i.selector(t)||t),o(t)&&(t=s(t)),h(t))for(u=t.length;--u>-1;)r.killChildTweensOf(t[u],e);else{n=[];for(l in m)for(_=m[l].target.parentNode;_;)_===t&&(n=n.concat(m[l].tweens)),_=_.parentNode;for(c=n.length,u=0;c>u;u++)e&&n[u].totalTime(n[u].totalDuration()),n[u]._enabled(!1,!1)}}};var m=function(t,i,s,r){i=i!==!1,s=s!==!1,r=r!==!1;for(var n,a,o=c(r),h=i&&s&&r,_=o.length;--_>-1;)a=o[_],(h||a instanceof e||(n=a.target===a.vars.onComplete)&&s||i&&!n)&&a.paused(t)};return r.pauseAll=function(t,e,i){m(!0,t,e,i)},r.resumeAll=function(t,e,i){m(!1,t,e,i)},r.globalTimeScale=function(e){var s=t._rootTimeline,r=i.ticker.time;return arguments.length?(e=e||n,s._startTime=r-(r-s._startTime)*s._timeScale/e,s=t._rootFramesTimeline,r=i.ticker.frame,s._startTime=r-(r-s._startTime)*s._timeScale/e,s._timeScale=t._rootTimeline._timeScale=e,e):s._timeScale},_.progress=function(t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},_.totalProgress=function(t){return arguments.length?this.totalTime(this.totalDuration()*t,!1):this._totalTime/this.totalDuration()},_.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!==(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},_.duration=function(e){return arguments.length?t.prototype.duration.call(this,e):this._duration},_.totalDuration=function(t){return arguments.length?-1===this._repeat?this:this.duration((t-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat,this._dirty=!1),this._totalDuration)},_.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},_.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},_.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},r},!0),_gsScope._gsDefine("TimelineLite",["core.Animation","core.SimpleTimeline","TweenLite"],function(t,e,i){var s=function(t){e.call(this,t),this._labels={},this.autoRemoveChildren=this.vars.autoRemoveChildren===!0,this.smoothChildTiming=this.vars.smoothChildTiming===!0,this._sortChildren=!0,this._onUpdate=this.vars.onUpdate;var i,s,r=this.vars;for(s in r)i=r[s],o(i)&&-1!==i.join("").indexOf("{self}")&&(r[s]=this._swapSelfInParams(i));o(r.tweens)&&this.add(r.tweens,0,r.align,r.stagger)},r=1e-10,n=i._internals,a=n.isSelector,o=n.isArray,h=n.lazyTweens,_=n.lazyRender,l=[],u=_gsScope._gsDefine.globals,c=function(t){var e,i={};for(e in t)i[e]=t[e];return i},m=function(t,e,i,s){t._timeline.pause(t._startTime),e&&e.apply(s||t._timeline,i||l)},p=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},f=s.prototype=new e;return s.version="1.13.1",f.constructor=s,f.kill()._gc=!1,f.to=function(t,e,s,r){var n=s.repeat&&u.TweenMax||i;return e?this.add(new n(t,e,s),r):this.set(t,s,r)},f.from=function(t,e,s,r){return this.add((s.repeat&&u.TweenMax||i).from(t,e,s),r)},f.fromTo=function(t,e,s,r,n){var a=r.repeat&&u.TweenMax||i;return e?this.add(a.fromTo(t,e,s,r),n):this.set(t,r,n)},f.staggerTo=function(t,e,r,n,o,h,_,l){var u,m=new s({onComplete:h,onCompleteParams:_,onCompleteScope:l,smoothChildTiming:this.smoothChildTiming});for("string"==typeof t&&(t=i.selector(t)||t),a(t)&&(t=p(t)),n=n||0,u=0;t.length>u;u++)r.startAt&&(r.startAt=c(r.startAt)),m.to(t[u],e,c(r),u*n);return this.add(m,o)},f.staggerFrom=function(t,e,i,s,r,n,a,o){return i.immediateRender=0!=i.immediateRender,i.runBackwards=!0,this.staggerTo(t,e,i,s,r,n,a,o)},f.staggerFromTo=function(t,e,i,s,r,n,a,o,h){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,this.staggerTo(t,e,s,r,n,a,o,h)},f.call=function(t,e,s,r){return this.add(i.delayedCall(0,t,e,s),r)},f.set=function(t,e,s){return s=this._parseTimeOrLabel(s,0,!0),null==e.immediateRender&&(e.immediateRender=s===this._time&&!this._paused),this.add(new i(t,0,e),s)},s.exportRoot=function(t,e){t=t||{},null==t.smoothChildTiming&&(t.smoothChildTiming=!0);var r,n,a=new s(t),o=a._timeline;for(null==e&&(e=!0),o._remove(a,!0),a._startTime=0,a._rawPrevTime=a._time=a._totalTime=o._time,r=o._first;r;)n=r._next,e&&r instanceof i&&r.target===r.vars.onComplete||a.add(r,r._startTime-r._delay),r=n;return o.add(a,0),a},f.add=function(r,n,a,h){var _,l,u,c,m,p;if("number"!=typeof n&&(n=this._parseTimeOrLabel(n,0,!0,r)),!(r instanceof t)){if(r instanceof Array||r&&r.push&&o(r)){for(a=a||"normal",h=h||0,_=n,l=r.length,u=0;l>u;u++)o(c=r[u])&&(c=new s({tweens:c})),this.add(c,_),"string"!=typeof c&&"function"!=typeof c&&("sequence"===a?_=c._startTime+c.totalDuration()/c._timeScale:"start"===a&&(c._startTime-=c.delay())),_+=h;return this._uncache(!0)}if("string"==typeof r)return this.addLabel(r,n);if("function"!=typeof r)throw"Cannot add "+r+" into the timeline; it is not a tween, timeline, function, or string.";r=i.delayedCall(0,r)}if(e.prototype.add.call(this,r,n),(this._gc||this._time===this._duration)&&!this._paused&&this._durationr._startTime;m._timeline;)p&&m._timeline.smoothChildTiming?m.totalTime(m._totalTime,!0):m._gc&&m._enabled(!0,!1),m=m._timeline;return this},f.remove=function(e){if(e instanceof t)return this._remove(e,!1);if(e instanceof Array||e&&e.push&&o(e)){for(var i=e.length;--i>-1;)this.remove(e[i]);return this}return"string"==typeof e?this.removeLabel(e):this.kill(null,e)},f._remove=function(t,i){e.prototype._remove.call(this,t,i);var s=this._last;return s?this._time>s._startTime+s._totalDuration/s._timeScale&&(this._time=this.duration(),this._totalTime=this._totalDuration):this._time=this._totalTime=this._duration=this._totalDuration=0,this},f.append=function(t,e){return this.add(t,this._parseTimeOrLabel(null,e,!0,t))},f.insert=f.insertMultiple=function(t,e,i,s){return this.add(t,e||0,i,s)},f.appendMultiple=function(t,e,i,s){return this.add(t,this._parseTimeOrLabel(null,e,!0,t),i,s)},f.addLabel=function(t,e){return this._labels[t]=this._parseTimeOrLabel(e),this},f.addPause=function(t,e,i,s){return this.call(m,["{self}",e,i,s],this,t)},f.removeLabel=function(t){return delete this._labels[t],this},f.getLabelTime=function(t){return null!=this._labels[t]?this._labels[t]:-1},f._parseTimeOrLabel=function(e,i,s,r){var n;if(r instanceof t&&r.timeline===this)this.remove(r);else if(r&&(r instanceof Array||r.push&&o(r)))for(n=r.length;--n>-1;)r[n]instanceof t&&r[n].timeline===this&&this.remove(r[n]);if("string"==typeof i)return this._parseTimeOrLabel(i,s&&"number"==typeof e&&null==this._labels[i]?e-this.duration():0,s);if(i=i||0,"string"!=typeof e||!isNaN(e)&&null==this._labels[e])null==e&&(e=this.duration());else{if(n=e.indexOf("="),-1===n)return null==this._labels[e]?s?this._labels[e]=this.duration()+i:i:this._labels[e]+i;i=parseInt(e.charAt(n-1)+"1",10)*Number(e.substr(n+1)),e=n>1?this._parseTimeOrLabel(e.substr(0,n-1),0,s):this.duration()}return Number(e)+i},f.seek=function(t,e){return this.totalTime("number"==typeof t?t:this._parseTimeOrLabel(t),e!==!1)},f.stop=function(){return this.paused(!0)},f.gotoAndPlay=function(t,e){return this.play(t,e)},f.gotoAndStop=function(t,e){return this.pause(t,e)},f.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,n,a,o,u,c=this._dirty?this.totalDuration():this._totalDuration,m=this._time,p=this._startTime,f=this._timeScale,d=this._paused;if(t>=c?(this._totalTime=this._time=c,this._reversed||this._hasPausedChild()||(n=!0,o="onComplete",0===this._duration&&(0===t||0>this._rawPrevTime||this._rawPrevTime===r)&&this._rawPrevTime!==t&&this._first&&(u=!0,this._rawPrevTime>r&&(o="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=c+1e-4):1e-7>t?(this._totalTime=this._time=0,(0!==m||0===this._duration&&this._rawPrevTime!==r&&(this._rawPrevTime>0||0>t&&this._rawPrevTime>=0))&&(o="onReverseComplete",n=this._reversed),0>t?(this._active=!1,this._rawPrevTime>=0&&this._first&&(u=!0),this._rawPrevTime=t):(this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,t=0,this._initted||(u=!0))):this._totalTime=this._time=this._rawPrevTime=t,this._time!==m&&this._first||i||u){if(this._initted||(this._initted=!0),this._active||!this._paused&&this._time!==m&&t>0&&(this._active=!0),0===m&&this.vars.onStart&&0!==this._time&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||l)),this._time>=m)for(s=this._first;s&&(a=s._next,!this._paused||d);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;else for(s=this._last;s&&(a=s._prev,!this._paused||d);)(s._active||m>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=a;this._onUpdate&&(e||(h.length&&_(),this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||l))),o&&(this._gc||(p===this._startTime||f!==this._timeScale)&&(0===this._time||c>=this.totalDuration())&&(n&&(h.length&&_(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[o]&&this.vars[o].apply(this.vars[o+"Scope"]||this,this.vars[o+"Params"]||l)))}},f._hasPausedChild=function(){for(var t=this._first;t;){if(t._paused||t instanceof s&&t._hasPausedChild())return!0;t=t._next}return!1},f.getChildren=function(t,e,s,r){r=r||-9999999999;for(var n=[],a=this._first,o=0;a;)r>a._startTime||(a instanceof i?e!==!1&&(n[o++]=a):(s!==!1&&(n[o++]=a),t!==!1&&(n=n.concat(a.getChildren(!0,e,s)),o=n.length))),a=a._next;return n},f.getTweensOf=function(t,e){var s,r,n=this._gc,a=[],o=0;for(n&&this._enabled(!0,!0),s=i.getTweensOf(t),r=s.length;--r>-1;)(s[r].timeline===this||e&&this._contains(s[r]))&&(a[o++]=s[r]);return n&&this._enabled(!1,!0),a},f._contains=function(t){for(var e=t.timeline;e;){if(e===this)return!0;e=e.timeline}return!1},f.shiftChildren=function(t,e,i){i=i||0;for(var s,r=this._first,n=this._labels;r;)r._startTime>=i&&(r._startTime+=t),r=r._next;if(e)for(s in n)n[s]>=i&&(n[s]+=t);return this._uncache(!0)},f._kill=function(t,e){if(!t&&!e)return this._enabled(!1,!1);for(var i=e?this.getTweensOf(e):this.getChildren(!0,!0,!1),s=i.length,r=!1;--s>-1;)i[s]._kill(t,e)&&(r=!0);return r},f.clear=function(t){var e=this.getChildren(!1,!0,!0),i=e.length;for(this._time=this._totalTime=0;--i>-1;)e[i]._enabled(!1,!1);return t!==!1&&(this._labels={}),this._uncache(!0)},f.invalidate=function(){for(var t=this._first;t;)t.invalidate(),t=t._next;return this},f._enabled=function(t,i){if(t===this._gc)for(var s=this._first;s;)s._enabled(t,!0),s=s._next;return e.prototype._enabled.call(this,t,i)},f.duration=function(t){return arguments.length?(0!==this.duration()&&0!==t&&this.timeScale(this._duration/t),this):(this._dirty&&this.totalDuration(),this._duration)},f.totalDuration=function(t){if(!arguments.length){if(this._dirty){for(var e,i,s=0,r=this._last,n=999999999999;r;)e=r._prev,r._dirty&&r.totalDuration(),r._startTime>n&&this._sortChildren&&!r._paused?this.add(r,r._startTime-r._delay):n=r._startTime,0>r._startTime&&!r._paused&&(s-=r._startTime,this._timeline.smoothChildTiming&&(this._startTime+=r._startTime/this._timeScale),this.shiftChildren(-r._startTime,!1,-9999999999),n=0),i=r._startTime+r._totalDuration/r._timeScale,i>s&&(s=i),r=e;this._duration=this._totalDuration=s,this._dirty=!1}return this._totalDuration}return 0!==this.totalDuration()&&0!==t&&this.timeScale(this._totalDuration/t),this},f.usesFrames=function(){for(var e=this._timeline;e._timeline;)e=e._timeline;return e===t._rootFramesTimeline},f.rawTime=function(){return this._paused?this._totalTime:(this._timeline.rawTime()-this._startTime)*this._timeScale},s},!0),_gsScope._gsDefine("TimelineMax",["TimelineLite","TweenLite","easing.Ease"],function(t,e,i){var s=function(e){t.call(this,e),this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._cycle=0,this._yoyo=this.vars.yoyo===!0,this._dirty=!0},r=1e-10,n=[],a=e._internals,o=a.lazyTweens,h=a.lazyRender,_=new i(null,null,1,0),l=s.prototype=new t;return l.constructor=s,l.kill()._gc=!1,s.version="1.13.1",l.invalidate=function(){return this._yoyo=this.vars.yoyo===!0,this._repeat=this.vars.repeat||0,this._repeatDelay=this.vars.repeatDelay||0,this._uncache(!0),t.prototype.invalidate.call(this)},l.addCallback=function(t,i,s,r){return this.add(e.delayedCall(0,t,s,r),i)},l.removeCallback=function(t,e){if(t)if(null==e)this._kill(null,t);else for(var i=this.getTweensOf(t,!1),s=i.length,r=this._parseTimeOrLabel(e);--s>-1;)i[s]._startTime===r&&i[s]._enabled(!1,!1);return this},l.tweenTo=function(t,i){i=i||{};var s,r,a,o={ease:_,overwrite:i.delay?2:1,useFrames:this.usesFrames(),immediateRender:!1};for(r in i)o[r]=i[r];return o.time=this._parseTimeOrLabel(t),s=Math.abs(Number(o.time)-this._time)/this._timeScale||.001,a=new e(this,s,o),o.onStart=function(){a.target.paused(!0),a.vars.time!==a.target.time()&&s===a.duration()&&a.duration(Math.abs(a.vars.time-a.target.time())/a.target._timeScale),i.onStart&&i.onStart.apply(i.onStartScope||a,i.onStartParams||n)},a},l.tweenFromTo=function(t,e,i){i=i||{},t=this._parseTimeOrLabel(t),i.startAt={onComplete:this.seek,onCompleteParams:[t],onCompleteScope:this},i.immediateRender=i.immediateRender!==!1;var s=this.tweenTo(e,i);return s.duration(Math.abs(s.vars.time-t)/this._timeScale||.001)},l.render=function(t,e,i){this._gc&&this._enabled(!0,!1);var s,a,_,l,u,c,m=this._dirty?this.totalDuration():this._totalDuration,p=this._duration,f=this._time,d=this._totalTime,g=this._startTime,v=this._timeScale,y=this._rawPrevTime,T=this._paused,w=this._cycle;if(t>=m?(this._locked||(this._totalTime=m,this._cycle=this._repeat),this._reversed||this._hasPausedChild()||(a=!0,l="onComplete",0===this._duration&&(0===t||0>y||y===r)&&y!==t&&this._first&&(u=!0,y>r&&(l="onReverseComplete"))),this._rawPrevTime=this._duration||!e||t||this._rawPrevTime===t?t:r,this._yoyo&&0!==(1&this._cycle)?this._time=t=0:(this._time=p,t=p+1e-4)):1e-7>t?(this._locked||(this._totalTime=this._cycle=0),this._time=0,(0!==f||0===p&&y!==r&&(y>0||0>t&&y>=0)&&!this._locked)&&(l="onReverseComplete",a=this._reversed),0>t?(this._active=!1,y>=0&&this._first&&(u=!0),this._rawPrevTime=t):(this._rawPrevTime=p||!e||t||this._rawPrevTime===t?t:r,t=0,this._initted||(u=!0))):(0===p&&0>y&&(u=!0),this._time=this._rawPrevTime=t,this._locked||(this._totalTime=t,0!==this._repeat&&(c=p+this._repeatDelay,this._cycle=this._totalTime/c>>0,0!==this._cycle&&this._cycle===this._totalTime/c&&this._cycle--,this._time=this._totalTime-this._cycle*c,this._yoyo&&0!==(1&this._cycle)&&(this._time=p-this._time),this._time>p?(this._time=p,t=p+1e-4):0>this._time?this._time=t=0:t=this._time))),this._cycle!==w&&!this._locked){var b=this._yoyo&&0!==(1&w),P=b===(this._yoyo&&0!==(1&this._cycle)),S=this._totalTime,R=this._cycle,C=this._rawPrevTime,k=this._time;if(this._totalTime=w*p,w>this._cycle?b=!b:this._totalTime+=p,this._time=f,this._rawPrevTime=0===p?y-1e-4:y,this._cycle=w,this._locked=!0,f=b?0:p,this.render(f,e,0===p),e||this._gc||this.vars.onRepeat&&this.vars.onRepeat.apply(this.vars.onRepeatScope||this,this.vars.onRepeatParams||n),P&&(f=b?p+1e-4:-1e-4,this.render(f,!0,!1)),this._locked=!1,this._paused&&!T)return;this._time=k,this._totalTime=S,this._cycle=R,this._rawPrevTime=C}if(!(this._time!==f&&this._first||i||u))return void(d!==this._totalTime&&this._onUpdate&&(e||this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||n)));if(this._initted||(this._initted=!0),this._active||!this._paused&&this._totalTime!==d&&t>0&&(this._active=!0),0===d&&this.vars.onStart&&0!==this._totalTime&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||n)),this._time>=f)for(s=this._first;s&&(_=s._next,!this._paused||T);)(s._active||s._startTime<=this._time&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=_;else for(s=this._last;s&&(_=s._prev,!this._paused||T);)(s._active||f>=s._startTime&&!s._paused&&!s._gc)&&(s._reversed?s.render((s._dirty?s.totalDuration():s._totalDuration)-(t-s._startTime)*s._timeScale,e,i):s.render((t-s._startTime)*s._timeScale,e,i)),s=_;this._onUpdate&&(e||(o.length&&h(),this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||n))),l&&(this._locked||this._gc||(g===this._startTime||v!==this._timeScale)&&(0===this._time||m>=this.totalDuration())&&(a&&(o.length&&h(),this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[l]&&this.vars[l].apply(this.vars[l+"Scope"]||this,this.vars[l+"Params"]||n)))},l.getActive=function(t,e,i){null==t&&(t=!0),null==e&&(e=!0),null==i&&(i=!1);var s,r,n=[],a=this.getChildren(t,e,i),o=0,h=a.length;for(s=0;h>s;s++)r=a[s],r.isActive()&&(n[o++]=r);return n},l.getLabelAfter=function(t){t||0!==t&&(t=this._time);var e,i=this.getLabelsArray(),s=i.length;for(e=0;s>e;e++)if(i[e].time>t)return i[e].name;return null},l.getLabelBefore=function(t){null==t&&(t=this._time);for(var e=this.getLabelsArray(),i=e.length;--i>-1;)if(t>e[i].time)return e[i].name;return null},l.getLabelsArray=function(){var t,e=[],i=0;for(t in this._labels)e[i++]={time:this._labels[t],name:t};return e.sort(function(t,e){return t.time-e.time}),e},l.progress=function(t){return arguments.length?this.totalTime(this.duration()*(this._yoyo&&0!==(1&this._cycle)?1-t:t)+this._cycle*(this._duration+this._repeatDelay),!1):this._time/this.duration()},l.totalProgress=function(t){return arguments.length?this.totalTime(this.totalDuration()*t,!1):this._totalTime/this.totalDuration()},l.totalDuration=function(e){return arguments.length?-1===this._repeat?this:this.duration((e-this._repeat*this._repeatDelay)/(this._repeat+1)):(this._dirty&&(t.prototype.totalDuration.call(this),this._totalDuration=-1===this._repeat?999999999999:this._duration*(this._repeat+1)+this._repeatDelay*this._repeat),this._totalDuration)},l.time=function(t,e){return arguments.length?(this._dirty&&this.totalDuration(),t>this._duration&&(t=this._duration),this._yoyo&&0!==(1&this._cycle)?t=this._duration-t+this._cycle*(this._duration+this._repeatDelay):0!==this._repeat&&(t+=this._cycle*(this._duration+this._repeatDelay)),this.totalTime(t,e)):this._time},l.repeat=function(t){return arguments.length?(this._repeat=t,this._uncache(!0)):this._repeat},l.repeatDelay=function(t){return arguments.length?(this._repeatDelay=t,this._uncache(!0)):this._repeatDelay},l.yoyo=function(t){return arguments.length?(this._yoyo=t,this):this._yoyo},l.currentLabel=function(t){return arguments.length?this.seek(t,!0):this.getLabelBefore(this._time+1e-8)},s},!0),function(){var t=180/Math.PI,e=[],i=[],s=[],r={},n=function(t,e,i,s){this.a=t,this.b=e,this.c=i,this.d=s,this.da=s-t,this.ca=i-t,this.ba=e-t},a=",x,y,z,left,top,right,bottom,marginTop,marginLeft,marginRight,marginBottom,paddingLeft,paddingTop,paddingRight,paddingBottom,backgroundPosition,backgroundPosition_y,",o=function(t,e,i,s){var r={a:t},n={},a={},o={c:s},h=(t+e)/2,_=(e+i)/2,l=(i+s)/2,u=(h+_)/2,c=(_+l)/2,m=(c-u)/8;return r.b=h+(t-h)/4,n.b=u+m,r.c=n.a=(r.b+n.b)/2,n.c=a.a=(u+c)/2,a.b=c-m,o.b=l+(s-l)/4,a.c=o.a=(a.b+o.b)/2,[r,n,a,o]},h=function(t,r,n,a,h){var _,l,u,c,m,p,f,d,g,v,y,T,w,b=t.length-1,P=0,S=t[0].a;for(_=0;b>_;_++)m=t[P],l=m.a,u=m.d,c=t[P+1].d,h?(y=e[_],T=i[_],w=.25*(T+y)*r/(a?.5:s[_]||.5),p=u-(u-l)*(a?.5*r:0!==y?w/y:0),f=u+(c-u)*(a?.5*r:0!==T?w/T:0),d=u-(p+((f-p)*(3*y/(y+T)+.5)/4||0))):(p=u-.5*(u-l)*r,f=u+.5*(c-u)*r,d=u-(p+f)/2),p+=d,f+=d,m.c=g=p,m.b=0!==_?S:S=m.a+.6*(m.c-m.a),m.da=u-l,m.ca=g-l,m.ba=S-l,n?(v=o(l,S,g,u),t.splice(P,1,v[0],v[1],v[2],v[3]),P+=4):P++,S=f;m=t[P],m.b=S,m.c=S+.4*(m.d-S),m.da=m.d-m.a,m.ca=m.c-m.a,m.ba=S-m.a,n&&(v=o(m.a,S,m.c,m.d),t.splice(P,1,v[0],v[1],v[2],v[3]))},_=function(t,s,r,a){var o,h,_,l,u,c,m=[];if(a)for(t=[a].concat(t),h=t.length;--h>-1;)"string"==typeof(c=t[h][s])&&"="===c.charAt(1)&&(t[h][s]=a[s]+Number(c.charAt(0)+c.substr(2)));if(o=t.length-2,0>o)return m[0]=new n(t[0][s],0,0,t[-1>o?0:1][s]),m;for(h=0;o>h;h++)_=t[h][s],l=t[h+1][s],m[h]=new n(_,0,0,l),r&&(u=t[h+2][s],e[h]=(e[h]||0)+(l-_)*(l-_),i[h]=(i[h]||0)+(u-l)*(u-l));return m[h]=new n(t[h][s],0,0,t[h+1][s]),m},l=function(t,n,o,l,u,c){var m,p,f,d,g,v,y,T,w={},b=[],P=c||t[0];u="string"==typeof u?","+u+",":a,null==n&&(n=1);for(p in t[0])b.push(p);if(t.length>1){for(T=t[t.length-1],y=!0,m=b.length;--m>-1;)if(p=b[m],Math.abs(P[p]-T[p])>.05){y=!1;break}y&&(t=t.concat(),c&&t.unshift(c),t.push(t[1]),c=t[t.length-3])}for(e.length=i.length=s.length=0,m=b.length;--m>-1;)p=b[m],r[p]=-1!==u.indexOf(","+p+","),w[p]=_(t,p,r[p],c);for(m=e.length;--m>-1;)e[m]=Math.sqrt(e[m]),i[m]=Math.sqrt(i[m]);if(!l){for(m=b.length;--m>-1;)if(r[p])for(f=w[b[m]],v=f.length-1,d=0;v>d;d++)g=f[d+1].da/i[d]+f[d].da/e[d],s[d]=(s[d]||0)+g*g;for(m=s.length;--m>-1;)s[m]=Math.sqrt(s[m])}for(m=b.length,d=o?4:1;--m>-1;)p=b[m],f=w[p],h(f,n,o,l,r[p]),y&&(f.splice(0,d),f.splice(f.length-d,d));return w},u=function(t,e,i){e=e||"soft";var s,r,a,o,h,_,l,u,c,m,p,f={},d="cubic"===e?3:2,g="soft"===e,v=[];if(g&&i&&(t=[i].concat(t)),null==t||d+1>t.length)throw"invalid Bezier data";for(c in t[0])v.push(c);for(_=v.length;--_>-1;){for(c=v[_],f[c]=h=[],m=0,u=t.length,l=0;u>l;l++)s=null==i?t[l][c]:"string"==typeof(p=t[l][c])&&"="===p.charAt(1)?i[c]+Number(p.charAt(0)+p.substr(2)):Number(p),g&&l>1&&u-1>l&&(h[m++]=(s+h[m-2])/2),h[m++]=s;for(u=m-d+1,m=0,l=0;u>l;l+=d)s=h[l],r=h[l+1],a=h[l+2],o=2===d?0:h[l+3],h[m++]=p=3===d?new n(s,r,a,o):new n(s,(2*r+s)/3,(2*r+a)/3,a);h.length=m}return f},c=function(t,e,i){for(var s,r,n,a,o,h,_,l,u,c,m,p=1/i,f=t.length;--f>-1;)for(c=t[f],n=c.a,a=c.d-n,o=c.c-n,h=c.b-n,s=r=0,l=1;i>=l;l++)_=p*l,u=1-_,s=r-(r=(_*_*a+3*u*(_*o+u*h))*_),m=f*i+l-1,e[m]=(e[m]||0)+s*s},m=function(t,e){e=e>>0||6;var i,s,r,n,a=[],o=[],h=0,_=0,l=e-1,u=[],m=[];for(i in t)c(t[i],a,e);for(r=a.length,s=0;r>s;s++)h+=Math.sqrt(a[s]),n=s%e,m[n]=h,n===l&&(_+=h,n=s/e>>0,u[n]=m,o[n]=_,h=0,m=[]);return{length:_,lengths:o,segments:u}},p=_gsScope._gsDefine.plugin({propName:"bezier",priority:-1,version:"1.3.3",API:2,global:!0,init:function(t,e,i){this._target=t,e instanceof Array&&(e={values:e}),this._func={},this._round={},this._props=[],this._timeRes=null==e.timeResolution?6:parseInt(e.timeResolution,10);var s,r,n,a,o,h=e.values||[],_={},c=h[0],p=e.autoRotate||i.vars.orientToBezier;this._autoRotate=p?p instanceof Array?p:[["x","y","rotation",p===!0?0:Number(p)||0]]:null;for(s in c)this._props.push(s);for(n=this._props.length;--n>-1;)s=this._props[n],this._overwriteProps.push(s),r=this._func[s]="function"==typeof t[s],_[s]=r?t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]():parseFloat(t[s]),o||_[s]!==h[0][s]&&(o=_);if(this._beziers="cubic"!==e.type&&"quadratic"!==e.type&&"soft"!==e.type?l(h,isNaN(e.curviness)?1:e.curviness,!1,"thruBasic"===e.type,e.correlate,o):u(h,e.type,_),this._segCount=this._beziers[s].length,this._timeRes){var f=m(this._beziers,this._timeRes);this._length=f.length,this._lengths=f.lengths,this._segments=f.segments,this._l1=this._li=this._s1=this._si=0,this._l2=this._lengths[0],this._curSeg=this._segments[0],this._s2=this._curSeg[0],this._prec=1/this._curSeg.length}if(p=this._autoRotate)for(this._initialRotations=[],p[0]instanceof Array||(this._autoRotate=p=[p]),n=p.length;--n>-1;){for(a=0;3>a;a++)s=p[n][a],this._func[s]="function"==typeof t[s]?t[s.indexOf("set")||"function"!=typeof t["get"+s.substr(3)]?s:"get"+s.substr(3)]:!1;s=p[n][2],this._initialRotations[n]=this._func[s]?this._func[s].call(this._target):this._target[s]}return this._startRatio=i.vars.runBackwards?1:0,!0},set:function(e){var i,s,r,n,a,o,h,_,l,u,c=this._segCount,m=this._func,p=this._target,f=e!==this._startRatio;if(this._timeRes){if(l=this._lengths,u=this._curSeg,e*=this._length,r=this._li,e>this._l2&&c-1>r){for(_=c-1;_>r&&e>=(this._l2=l[++r]););this._l1=l[r-1],this._li=r,this._curSeg=u=this._segments[r],this._s2=u[this._s1=this._si=0]}else if(this._l1>e&&r>0){for(;r>0&&(this._l1=l[--r])>=e;);0===r&&this._l1>e?this._l1=0:r++,this._l2=l[r],this._li=r,this._curSeg=u=this._segments[r],this._s1=u[(this._si=u.length-1)-1]||0,this._s2=u[this._si]}if(i=r,e-=this._l1,r=this._si,e>this._s2&&u.length-1>r){for(_=u.length-1;_>r&&e>=(this._s2=u[++r]););this._s1=u[r-1],this._si=r}else if(this._s1>e&&r>0){for(;r>0&&(this._s1=u[--r])>=e;);0===r&&this._s1>e?this._s1=0:r++,this._s2=u[r],this._si=r}o=(r+(e-this._s1)/(this._s2-this._s1))*this._prec}else i=0>e?0:e>=1?c-1:c*e>>0,o=(e-i*(1/c))*c;for(s=1-o,r=this._props.length;--r>-1;)n=this._props[r],a=this._beziers[n][i],h=(o*o*a.da+3*s*(o*a.ca+s*a.ba))*o+a.a,this._round[n]&&(h=Math.round(h)),m[n]?p[n](h):p[n]=h; if(this._autoRotate){var d,g,v,y,T,w,b,P=this._autoRotate;for(r=P.length;--r>-1;)n=P[r][2],w=P[r][3]||0,b=P[r][4]===!0?1:t,a=this._beziers[P[r][0]],d=this._beziers[P[r][1]],a&&d&&(a=a[i],d=d[i],g=a.a+(a.b-a.a)*o,y=a.b+(a.c-a.b)*o,g+=(y-g)*o,y+=(a.c+(a.d-a.c)*o-y)*o,v=d.a+(d.b-d.a)*o,T=d.b+(d.c-d.b)*o,v+=(T-v)*o,T+=(d.c+(d.d-d.c)*o-T)*o,h=f?Math.atan2(T-v,y-g)*b+w:this._initialRotations[r],m[n]?p[n](h):p[n]=h)}}}),f=p.prototype;p.bezierThrough=l,p.cubicToQuadratic=o,p._autoCSS=!0,p.quadraticToCubic=function(t,e,i){return new n(t,(2*e+t)/3,(2*e+i)/3,i)},p._cssRegister=function(){var t=_gsScope._gsDefine.globals.CSSPlugin;if(t){var e=t._internals,i=e._parseToProxy,s=e._setPluginRatio,r=e.CSSPropTween;e._registerComplexSpecialProp("bezier",{parser:function(t,e,n,a,o,h){e instanceof Array&&(e={values:e}),h=new p;var _,l,u,c=e.values,m=c.length-1,f=[],d={};if(0>m)return o;for(_=0;m>=_;_++)u=i(t,c[_],a,o,h,m!==_),f[_]=u.end;for(l in e)d[l]=e[l];return d.values=f,o=new r(t,"bezier",0,0,u.pt,2),o.data=u,o.plugin=h,o.setRatio=s,0===d.autoRotate&&(d.autoRotate=!0),!d.autoRotate||d.autoRotate instanceof Array||(_=d.autoRotate===!0?0:Number(d.autoRotate),d.autoRotate=null!=u.end.left?[["left","top","rotation",_,!1]]:null!=u.end.x?[["x","y","rotation",_,!1]]:!1),d.autoRotate&&(a._transform||a._enableTransforms(!1),u.autoRotate=a._target._gsTransform),h._onInitTween(u.proxy,d,a._tween),o}})}},f._roundProps=function(t,e){for(var i=this._overwriteProps,s=i.length;--s>-1;)(t[i[s]]||t.bezier||t.bezierThrough)&&(this._round[i[s]]=e)},f._kill=function(t){var e,i,s=this._props;for(e in this._beziers)if(e in t)for(delete this._beziers[e],delete this._func[e],i=s.length;--i>-1;)s[i]===e&&s.splice(i,1);return this._super._kill.call(this,t)}}(),_gsScope._gsDefine("plugins.CSSPlugin",["plugins.TweenPlugin","TweenLite"],function(t,e){},!0),function(){var t=_gsScope._gsDefine.plugin({propName:"roundProps",priority:-1,API:2,init:function(t,e,i){return this._tween=i,!0}}),e=t.prototype;e._onInitAllProps=function(){for(var t,e,i,s=this._tween,r=s.vars.roundProps instanceof Array?s.vars.roundProps:s.vars.roundProps.split(","),n=r.length,a={},o=s._propLookup.roundProps;--n>-1;)a[r[n]]=1;for(n=r.length;--n>-1;)for(t=r[n],e=s._firstPT;e;)i=e._next,e.pg?e.t._roundProps(a,!0):e.n===t&&(this._add(e.t,t,e.s,e.c),i&&(i._prev=e._prev),e._prev?e._prev._next=i:s._firstPT===e&&(s._firstPT=i),e._next=e._prev=null,s._propLookup[t]=o),e=i;return!1},e._add=function(t,e,i,s){this._addTween(t,e,i,i+s,e,!0),this._overwriteProps.push(e)}}(),_gsScope._gsDefine.plugin({propName:"attr",API:2,version:"0.3.3",init:function(t,e){var i,s,r;if("function"!=typeof t.setAttribute)return!1;this._target=t,this._proxy={},this._start={},this._end={};for(i in e)this._start[i]=this._proxy[i]=s=t.getAttribute(i),r=this._addTween(this._proxy,i,parseFloat(s),e[i],i),this._end[i]=r?r.s+r.c:e[i],this._overwriteProps.push(i);return!0},set:function(t){this._super.setRatio.call(this,t);for(var e,i=this._overwriteProps,s=i.length,r=1===t?this._end:t?this._proxy:this._start;--s>-1;)e=i[s],this._target.setAttribute(e,r[e]+"")}}),_gsScope._gsDefine.plugin({propName:"directionalRotation",version:"0.2.1",API:2,init:function(t,e){"object"!=typeof e&&(e={rotation:e}),this.finals={};var i,s,r,n,a,o,h=e.useRadians===!0?2*Math.PI:360,_=1e-6;for(i in e)"useRadians"!==i&&(o=(e[i]+"").split("_"),s=o[0],r=parseFloat("function"!=typeof t[i]?t[i]:t[i.indexOf("set")||"function"!=typeof t["get"+i.substr(3)]?i:"get"+i.substr(3)]()),n=this.finals[i]="string"==typeof s&&"="===s.charAt(1)?r+parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)):Number(s)||0,a=n-r,o.length&&(s=o.join("_"),-1!==s.indexOf("short")&&(a%=h,a!==a%(h/2)&&(a=0>a?a+h:a-h)),-1!==s.indexOf("_cw")&&0>a?a=(a+9999999999*h)%h-(0|a/h)*h:-1!==s.indexOf("ccw")&&a>0&&(a=(a-9999999999*h)%h-(0|a/h)*h)),(a>_||-_>a)&&(this._addTween(t,i,r,r+a,i),this._overwriteProps.push(i)));return!0},set:function(t){var e;if(1!==t)this._super.setRatio.call(this,t);else for(e=this._firstPT;e;)e.f?e.t[e.p](this.finals[e.p]):e.t[e.p]=this.finals[e.p],e=e._next}})._autoCSS=!0,_gsScope._gsDefine("easing.Back",["easing.Ease"],function(t){var e,i,s,r=_gsScope.GreenSockGlobals||_gsScope,n=r.com.greensock,a=2*Math.PI,o=Math.PI/2,h=n._class,_=function(e,i){var s=h("easing."+e,function(){},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,s},l=t.register||function(){},u=function(t,e,i,s){var r=h("easing."+t,{easeOut:new e,easeIn:new i,easeInOut:new s},!0);return l(r,t),r},c=function(t,e,i){this.t=t,this.v=e,i&&(this.next=i,i.prev=this,this.c=i.v-e,this.gap=i.t-t)},m=function(e,i){var s=h("easing."+e,function(t){this._p1=t||0===t?t:1.70158,this._p2=1.525*this._p1},!0),r=s.prototype=new t;return r.constructor=s,r.getRatio=i,r.config=function(t){return new s(t)},s},p=u("Back",m("BackOut",function(t){return(t-=1)*t*((this._p1+1)*t+this._p1)+1}),m("BackIn",function(t){return t*t*((this._p1+1)*t-this._p1)}),m("BackInOut",function(t){return 1>(t*=2)?.5*t*t*((this._p2+1)*t-this._p2):.5*((t-=2)*t*((this._p2+1)*t+this._p2)+2)})),f=h("easing.SlowMo",function(t,e,i){e=e||0===e?e:.7,null==t?t=.7:t>1&&(t=1),this._p=1!==t?e:0,this._p1=(1-t)/2,this._p2=t,this._p3=this._p1+this._p2,this._calcEnd=i===!0},!0),d=f.prototype=new t;return d.constructor=f,d.getRatio=function(t){var e=t+(.5-t)*this._p;return this._p1>t?this._calcEnd?1-(t=1-t/this._p1)*t:e-(t=1-t/this._p1)*t*t*t*e:t>this._p3?this._calcEnd?1-(t=(t-this._p3)/this._p1)*t:e+(t-e)*(t=(t-this._p3)/this._p1)*t*t*t:this._calcEnd?1:e},f.ease=new f(.7,.7),d.config=f.config=function(t,e,i){return new f(t,e,i)},e=h("easing.SteppedEase",function(t){t=t||1,this._p1=1/t,this._p2=t+1},!0),d=e.prototype=new t,d.constructor=e,d.getRatio=function(t){return 0>t?t=0:t>=1&&(t=.999999999),(this._p2*t>>0)*this._p1},d.config=e.config=function(t){return new e(t)},i=h("easing.RoughEase",function(e){e=e||{};for(var i,s,r,n,a,o,h=e.taper||"none",_=[],l=0,u=0|(e.points||20),m=u,p=e.randomize!==!1,f=e.clamp===!0,d=e.template instanceof t?e.template:null,g="number"==typeof e.strength?.4*e.strength:.4;--m>-1;)i=p?Math.random():1/u*m,s=d?d.getRatio(i):i,"none"===h?r=g:"out"===h?(n=1-i,r=n*n*g):"in"===h?r=i*i*g:.5>i?(n=2*i,r=.5*n*n*g):(n=2*(1-i),r=.5*n*n*g),p?s+=Math.random()*r-.5*r:m%2?s+=.5*r:s-=.5*r,f&&(s>1?s=1:0>s&&(s=0)),_[l++]={x:i,y:s};for(_.sort(function(t,e){return t.x-e.x}),o=new c(1,1,null),m=u;--m>-1;)a=_[m],o=new c(a.x,a.y,o);this._prev=new c(0,0,0!==o.t?o:o.next)},!0),d=i.prototype=new t,d.constructor=i,d.getRatio=function(t){var e=this._prev;if(t>e.t){for(;e.next&&t>=e.t;)e=e.next;e=e.prev}else for(;e.prev&&e.t>=t;)e=e.prev;return this._prev=e,e.v+(t-e.t)/e.gap*e.c},d.config=function(t){return new i(t)},i.ease=new i,u("Bounce",_("BounceOut",function(t){return 1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375}),_("BounceIn",function(t){return 1/2.75>(t=1-t)?1-7.5625*t*t:2/2.75>t?1-(7.5625*(t-=1.5/2.75)*t+.75):2.5/2.75>t?1-(7.5625*(t-=2.25/2.75)*t+.9375):1-(7.5625*(t-=2.625/2.75)*t+.984375)}),_("BounceInOut",function(t){var e=.5>t;return t=e?1-2*t:2*t-1,t=1/2.75>t?7.5625*t*t:2/2.75>t?7.5625*(t-=1.5/2.75)*t+.75:2.5/2.75>t?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375,e?.5*(1-t):.5*t+.5})),u("Circ",_("CircOut",function(t){return Math.sqrt(1-(t-=1)*t)}),_("CircIn",function(t){return-(Math.sqrt(1-t*t)-1)}),_("CircInOut",function(t){return 1>(t*=2)?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)})),s=function(e,i,s){var r=h("easing."+e,function(t,e){this._p1=t||1,this._p2=e||s,this._p3=this._p2/a*(Math.asin(1/this._p1)||0)},!0),n=r.prototype=new t;return n.constructor=r,n.getRatio=i,n.config=function(t,e){return new r(t,e)},r},u("Elastic",s("ElasticOut",function(t){return this._p1*Math.pow(2,-10*t)*Math.sin((t-this._p3)*a/this._p2)+1},.3),s("ElasticIn",function(t){return-(this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2))},.3),s("ElasticInOut",function(t){return 1>(t*=2)?-.5*this._p1*Math.pow(2,10*(t-=1))*Math.sin((t-this._p3)*a/this._p2):.5*this._p1*Math.pow(2,-10*(t-=1))*Math.sin((t-this._p3)*a/this._p2)+1},.45)),u("Expo",_("ExpoOut",function(t){return 1-Math.pow(2,-10*t)}),_("ExpoIn",function(t){return Math.pow(2,10*(t-1))-.001}),_("ExpoInOut",function(t){return 1>(t*=2)?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*(t-1)))})),u("Sine",_("SineOut",function(t){return Math.sin(t*o)}),_("SineIn",function(t){return-Math.cos(t*o)+1}),_("SineInOut",function(t){return-.5*(Math.cos(Math.PI*t)-1)})),h("easing.EaseLookup",{find:function(e){return t.map[e]}},!0),l(r.SlowMo,"SlowMo","ease,"),l(i,"RoughEase","ease,"),l(e,"SteppedEase","ease,"),p},!0)}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(),function(t,e){"use strict";var i=t.GreenSockGlobals=t.GreenSockGlobals||t;if(!i.TweenLite){var s,r,n,a,o,h=function(t){var e,s=t.split("."),r=i;for(e=0;s.length>e;e++)r[s[e]]=r=r[s[e]]||{};return r},_=h("com.greensock"),l=1e-10,u=function(t){var e,i=[],s=t.length;for(e=0;e!==s;i.push(t[e++]));return i},c=function(){},m=function(){var t=Object.prototype.toString,e=t.call([]);return function(i){return null!=i&&(i instanceof Array||"object"==typeof i&&!!i.push&&t.call(i)===e)}}(),p={},f=function(s,r,n,a){this.sc=p[s]?p[s].sc:[],p[s]=this,this.gsClass=null,this.func=n;var o=[];this.check=function(_){for(var l,u,c,m,d=r.length,g=d;--d>-1;)(l=p[r[d]]||new f(r[d],[])).gsClass?(o[d]=l.gsClass,g--):_&&l.sc.push(this);if(0===g&&n)for(u=("com.greensock."+s).split("."),c=u.pop(),m=h(u.join("."))[c]=this.gsClass=n.apply(n,o),a&&(i[c]=m,"function"==typeof define&&define.amd?define((t.GreenSockAMDPath?t.GreenSockAMDPath+"/":"")+s.split(".").pop(),[],function(){return m}):s===e&&"undefined"!=typeof module&&module.exports&&(module.exports=m)),d=0;this.sc.length>d;d++)this.sc[d].check()},this.check(!0)},d=t._gsDefine=function(t,e,i,s){return new f(t,e,i,s)},g=_._class=function(t,e,i){return e=e||function(){},d(t,[],function(){return e},i),e};d.globals=i;var v=[0,0,1,1],y=[],T=g("easing.Ease",function(t,e,i,s){this._func=t,this._type=i||0,this._power=s||0,this._params=e?v.concat(e):v},!0),w=T.map={},b=T.register=function(t,e,i,s){for(var r,n,a,o,h=e.split(","),l=h.length,u=(i||"easeIn,easeOut,easeInOut").split(",");--l>-1;)for(n=h[l],r=s?g("easing."+n,null,!0):_.easing[n]||{},a=u.length;--a>-1;)o=u[a],w[n+"."+o]=w[o+n]=r[o]=t.getRatio?t:t[o]||new t};for(n=T.prototype,n._calcEnd=!1,n.getRatio=function(t){if(this._func)return this._params[0]=t,this._func.apply(null,this._params);var e=this._type,i=this._power,s=1===e?1-t:2===e?t:.5>t?2*t:2*(1-t);return 1===i?s*=s:2===i?s*=s*s:3===i?s*=s*s*s:4===i&&(s*=s*s*s*s),1===e?1-s:2===e?s:.5>t?s/2:1-s/2},s=["Linear","Quad","Cubic","Quart","Quint,Strong"],r=s.length;--r>-1;)n=s[r]+",Power"+r,b(new T(null,null,1,r),n,"easeOut",!0),b(new T(null,null,2,r),n,"easeIn"+(0===r?",easeNone":"")),b(new T(null,null,3,r),n,"easeInOut");w.linear=_.easing.Linear.easeIn,w.swing=_.easing.Quad.easeInOut;var P=g("events.EventDispatcher",function(t){this._listeners={},this._eventTarget=t||this});n=P.prototype,n.addEventListener=function(t,e,i,s,r){r=r||0;var n,h,_=this._listeners[t],l=0;for(null==_&&(this._listeners[t]=_=[]),h=_.length;--h>-1;)n=_[h],n.c===e&&n.s===i?_.splice(h,1):0===l&&r>n.pr&&(l=h+1);_.splice(l,0,{c:e,s:i,up:s,pr:r}),this!==a||o||a.wake()},n.removeEventListener=function(t,e){var i,s=this._listeners[t];if(s)for(i=s.length;--i>-1;)if(s[i].c===e)return void s.splice(i,1)},n.dispatchEvent=function(t){var e,i,s,r=this._listeners[t];if(r)for(e=r.length,i=this._eventTarget;--e>-1;)s=r[e],s.up?s.c.call(s.s||i,{type:t,target:i}):s.c.call(s.s||i)};var S=t.requestAnimationFrame,R=t.cancelAnimationFrame,C=Date.now||function(){return(new Date).getTime()},k=C();for(s=["ms","moz","webkit","o"],r=s.length;--r>-1&&!S;)S=t[s[r]+"RequestAnimationFrame"],R=t[s[r]+"CancelAnimationFrame"]||t[s[r]+"CancelRequestAnimationFrame"];g("Ticker",function(t,e){var i,s,r,n,h,_=this,u=C(),m=e!==!1&&S,p=500,f=33,d=function(t){var e,a,o=C()-k;o>p&&(u+=o-f),k+=o,_.time=(k-u)/1e3,e=_.time-h,(!i||e>0||t===!0)&&(_.frame++,h+=e+(e>=n?.004:n-e),a=!0),t!==!0&&(r=s(d)),a&&_.dispatchEvent("tick")};P.call(_),_.time=_.frame=0,_.tick=function(){d(!0)},_.lagSmoothing=function(t,e){p=t||1/l,f=Math.min(e,p,0)},_.sleep=function(){null!=r&&(m&&R?R(r):tweenClearTimeout(r),s=c,r=null,_===a&&(o=!1))},_.wake=function(){null!==r?_.sleep():_.frame>10&&(k=C()-p+5),s=0===i?c:m&&S?S:function(t){return tweenSetTimeOut(t,0|1e3*(h-_.time)+1)},_===a&&(o=!0),d(2)},_.fps=function(t){return arguments.length?(i=t,n=1/(i||60),h=this.time+n,void _.wake()):i},_.useRAF=function(t){return arguments.length?(_.sleep(),m=t,void _.fps(i)):m},_.fps(t),tweenSetTimeOut(function(){m&&(!r||5>_.frame)&&_.useRAF(!1)},1500)}),n=_.Ticker.prototype=new _.events.EventDispatcher,n.constructor=_.Ticker;var A=g("core.Animation",function(t,e){if(this.vars=e=e||{},this._duration=this._totalDuration=t||0,this._delay=Number(e.delay)||0,this._timeScale=1,this._active=e.immediateRender===!0,this.data=e.data,this._reversed=e.reversed===!0,G){o||a.wake();var i=this.vars.useFrames?j:G;i.add(this,i._time),this.vars.paused&&this.paused(!0)}});a=A.ticker=new _.Ticker,n=A.prototype,n._dirty=n._gc=n._initted=n._paused=!1,n._totalTime=n._time=0,n._rawPrevTime=-1,n._next=n._last=n._onUpdate=n._timeline=n.timeline=null,n._paused=!1;var D=function(){o&&C()-k>2e3&&a.wake(),tweenSetTimeOut(D,2e3)};D(),n.play=function(t,e){return null!=t&&this.seek(t,e),this.reversed(!1).paused(!1)},n.pause=function(t,e){return null!=t&&this.seek(t,e),this.paused(!0)},n.resume=function(t,e){return null!=t&&this.seek(t,e),this.paused(!1)},n.seek=function(t,e){return this.totalTime(Number(t),e!==!1)},n.restart=function(t,e){return this.reversed(!1).paused(!1).totalTime(t?-this._delay:0,e!==!1,!0)},n.reverse=function(t,e){return null!=t&&this.seek(t||this.totalDuration(),e),this.reversed(!0).paused(!1)},n.render=function(){},n.invalidate=function(){return this},n.isActive=function(){var t,e=this._timeline,i=this._startTime;return!e||!this._gc&&!this._paused&&e.isActive()&&(t=e.rawTime())>=i&&i+this.totalDuration()/this._timeScale>t},n._enabled=function(t,e){return o||a.wake(),this._gc=!t,this._active=this.isActive(),e!==!0&&(t&&!this.timeline?this._timeline.add(this,this._startTime-this._delay):!t&&this.timeline&&this._timeline._remove(this,!0)),!1},n._kill=function(){return this._enabled(!1,!1)},n.kill=function(t,e){return this._kill(t,e),this},n._uncache=function(t){for(var e=t?this:this.timeline;e;)e._dirty=!0,e=e.timeline;return this},n._swapSelfInParams=function(t){for(var e=t.length,i=t.concat();--e>-1;)"{self}"===t[e]&&(i[e]=this);return i},n.eventCallback=function(t,e,i,s){if("on"===(t||"").substr(0,2)){var r=this.vars;if(1===arguments.length)return r[t];null==e?delete r[t]:(r[t]=e,r[t+"Params"]=m(i)&&-1!==i.join("").indexOf("{self}")?this._swapSelfInParams(i):i,r[t+"Scope"]=s),"onUpdate"===t&&(this._onUpdate=e)}return this},n.delay=function(t){return arguments.length?(this._timeline.smoothChildTiming&&this.startTime(this._startTime+t-this._delay),this._delay=t,this):this._delay},n.duration=function(t){return arguments.length?(this._duration=this._totalDuration=t,this._uncache(!0),this._timeline.smoothChildTiming&&this._time>0&&this._timethis._duration?this._duration:t,e)):this._time},n.totalTime=function(t,e,i){if(o||a.wake(),!arguments.length)return this._totalTime;if(this._timeline){if(0>t&&!i&&(t+=this.totalDuration()),this._timeline.smoothChildTiming){this._dirty&&this.totalDuration();var s=this._totalDuration,r=this._timeline;if(t>s&&!i&&(t=s),this._startTime=(this._paused?this._pauseTime:r._time)-(this._reversed?s-t:t)/this._timeScale,r._dirty||this._uncache(!1),r._timeline)for(;r._timeline;)r._timeline._time!==(r._startTime+r._totalTime)/r._timeScale&&r.totalTime(r._totalTime,!0),r=r._timeline}this._gc&&this._enabled(!0,!1),(this._totalTime!==t||0===this._duration)&&(this.render(t,e,!1),E.length&&Q())}return this},n.progress=n.totalProgress=function(t,e){return arguments.length?this.totalTime(this.duration()*t,e):this._time/this.duration()},n.startTime=function(t){return arguments.length?(t!==this._startTime&&(this._startTime=t,this.timeline&&this.timeline._sortChildren&&this.timeline.add(this,t-this._delay)),this):this._startTime},n.timeScale=function(t){if(!arguments.length)return this._timeScale;if(t=t||l,this._timeline&&this._timeline.smoothChildTiming){var e=this._pauseTime,i=e||0===e?e:this._timeline.totalTime();this._startTime=i-(i-this._startTime)*this._timeScale/t}return this._timeScale=t,this._uncache(!1)},n.reversed=function(t){return arguments.length?(t!=this._reversed&&(this._reversed=t,this.totalTime(this._timeline&&!this._timeline.smoothChildTiming?this.totalDuration()-this._totalTime:this._totalTime,!0)),this):this._reversed},n.paused=function(t){if(!arguments.length)return this._paused;if(t!=this._paused&&this._timeline){o||t||a.wake();var e=this._timeline,i=e.rawTime(),s=i-this._pauseTime;!t&&e.smoothChildTiming&&(this._startTime+=s,this._uncache(!1)),this._pauseTime=t?i:null,this._paused=t,this._active=this.isActive(),!t&&0!==s&&this._initted&&this.duration()&&this.render(e.smoothChildTiming?this._totalTime:(i-this._startTime)/this._timeScale,!0,!0)}return this._gc&&!t&&this._enabled(!0,!1),this};var x=g("core.SimpleTimeline",function(t){A.call(this,0,t),this.autoRemoveChildren=this.smoothChildTiming=!0});n=x.prototype=new A,n.constructor=x,n.kill()._gc=!1,n._first=n._last=null,n._sortChildren=!1,n.add=n.insert=function(t,e){var i,s;if(t._startTime=Number(e||0)+t._delay,t._paused&&this!==t._timeline&&(t._pauseTime=t._startTime+(this.rawTime()-t._startTime)/t._timeScale),t.timeline&&t.timeline._remove(t,!0),t.timeline=t._timeline=this,t._gc&&t._enabled(!0,!0),i=this._last,this._sortChildren)for(s=t._startTime;i&&i._startTime>s;)i=i._prev;return i?(t._next=i._next,i._next=t):(t._next=this._first,this._first=t),t._next?t._next._prev=t:this._last=t,t._prev=i,this._timeline&&this._uncache(!0),this},n._remove=function(t,e){return t.timeline===this&&(e||t._enabled(!1,!0),t._prev?t._prev._next=t._next:this._first===t&&(this._first=t._next),t._next?t._next._prev=t._prev:this._last===t&&(this._last=t._prev),t._next=t._prev=t.timeline=null,this._timeline&&this._uncache(!0)),this},n.render=function(t,e,i){var s,r=this._first;for(this._totalTime=this._time=this._rawPrevTime=t;r;)s=r._next,(r._active||t>=r._startTime&&!r._paused)&&(r._reversed?r.render((r._dirty?r.totalDuration():r._totalDuration)-(t-r._startTime)*r._timeScale,e,i):r.render((t-r._startTime)*r._timeScale,e,i)),r=s},n.rawTime=function(){return o||a.wake(),this._totalTime};var O=g("TweenLite",function(e,i,s){if(A.call(this,i,s),this.render=O.prototype.render,null==e)throw"Cannot tween a null target.";this.target=e="string"!=typeof e?e:O.selector(e)||e;var r,n,a,o=e.jquery||e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType),h=this.vars.overwrite;if(this._overwrite=h=null==h?q[O.defaultOverwrite]:"number"==typeof h?h>>0:q[h],(o||e instanceof Array||e.push&&m(e))&&"number"!=typeof e[0])for(this._targets=a=u(e),this._propLookup=[],this._siblings=[],r=0;a.length>r;r++)n=a[r],n?"string"!=typeof n?n.length&&n!==t&&n[0]&&(n[0]===t||n[0].nodeType&&n[0].style&&!n.nodeType)?(a.splice(r--,1),this._targets=a=a.concat(u(n))):(this._siblings[r]=$(n,this,!1),1===h&&this._siblings[r].length>1&&K(n,this,null,1,this._siblings[r])):(n=a[r--]=O.selector(n),"string"==typeof n&&a.splice(r+1,1)):a.splice(r--,1);else this._propLookup={},this._siblings=$(e,this,!1),1===h&&this._siblings.length>1&&K(e,this,null,1,this._siblings);(this.vars.immediateRender||0===i&&0===this._delay&&this.vars.immediateRender!==!1)&&(this._time=-l,this.render(-this._delay))},!0),I=function(e){return e.length&&e!==t&&e[0]&&(e[0]===t||e[0].nodeType&&e[0].style&&!e.nodeType)},z=function(t,e){var i,s={};for(i in t)B[i]||i in e&&"transform"!==i&&"x"!==i&&"y"!==i&&"width"!==i&&"height"!==i&&"className"!==i&&"border"!==i||!(!U[i]||U[i]&&U[i]._autoCSS)||(s[i]=t[i],delete t[i]);t.css=s};n=O.prototype=new A,n.constructor=O,n.kill()._gc=!1,n.ratio=0,n._firstPT=n._targets=n._overwrittenProps=n._startAt=null,n._notifyPluginsOfEnabled=n._lazy=!1,O.version="1.13.1",O.defaultEase=n._ease=new T(null,null,1,1),O.defaultOverwrite="auto",O.ticker=a,O.autoSleep=!0,O.lagSmoothing=function(t,e){a.lagSmoothing(t,e)},O.selector=t.$||t.jQuery||function(e){var i=t.$||t.jQuery;return i?(O.selector=i,i(e)):"undefined"==typeof document?e:document.querySelectorAll?document.querySelectorAll(e):document.getElementById("#"===e.charAt(0)?e.substr(1):e)};var E=[],M={},L=O._internals={isArray:m,isSelector:I,lazyTweens:E},U=O._plugins={},N=L.tweenLookup={},F=0,B=L.reservedProps={ease:1,delay:1,overwrite:1,onComplete:1,onCompleteParams:1,onCompleteScope:1,useFrames:1,runBackwards:1,startAt:1,onUpdate:1,onUpdateParams:1,onUpdateScope:1,onStart:1,onStartParams:1,onStartScope:1,onReverseComplete:1,onReverseCompleteParams:1,onReverseCompleteScope:1,onRepeat:1,onRepeatParams:1,onRepeatScope:1,easeParams:1,yoyo:1,immediateRender:1,repeat:1,repeatDelay:1,data:1,paused:1,reversed:1,autoCSS:1,lazy:1},q={none:0,all:1,auto:2,concurrent:3,allOnStart:4,preexisting:5,"true":1,"false":0},j=A._rootFramesTimeline=new x,G=A._rootTimeline=new x,Q=L.lazyRender=function(){var t=E.length;for(M={};--t>-1;)s=E[t],s&&s._lazy!==!1&&(s.render(s._lazy,!1,!0),s._lazy=!1);E.length=0};G._startTime=a.time,j._startTime=a.frame,G._active=j._active=!0,tweenSetTimeOut(Q,1),A._updateRoot=O.render=function(){var t,e,i;if(E.length&&Q(),G.render((a.time-G._startTime)*G._timeScale,!1,!1),j.render((a.frame-j._startTime)*j._timeScale,!1,!1),E.length&&Q(),!(a.frame%120)){for(i in N){for(e=N[i].tweens,t=e.length;--t>-1;)e[t]._gc&&e.splice(t,1);0===e.length&&delete N[i]}if(i=G._first,(!i||i._paused)&&O.autoSleep&&!j._first&&1===a._listeners.tick.length){for(;i&&i._paused;)i=i._next;i||a.sleep()}}},a.addEventListener("tick",A._updateRoot);var $=function(t,e,i){var s,r,n=t._gsTweenID;if(N[n||(t._gsTweenID=n="t"+F++)]||(N[n]={target:t,tweens:[]}),e&&(s=N[n].tweens,s[r=s.length]=e,i))for(;--r>-1;)s[r]===e&&s.splice(r,1);return N[n].tweens},K=function(t,e,i,s,r){var n,a,o,h;if(1===s||s>=4){for(h=r.length,n=0;h>n;n++)if((o=r[n])!==e)o._gc||o._enabled(!1,!1)&&(a=!0);else if(5===s)break;return a}var _,u=e._startTime+l,c=[],m=0,p=0===e._duration;for(n=r.length;--n>-1;)(o=r[n])===e||o._gc||o._paused||(o._timeline!==e._timeline?(_=_||H(e,0,p),0===H(o,_,p)&&(c[m++]=o)):u>=o._startTime&&o._startTime+o.totalDuration()/o._timeScale>u&&((p||!o._initted)&&2e-10>=u-o._startTime||(c[m++]=o)));for(n=m;--n>-1;)o=c[n],2===s&&o._kill(i,t)&&(a=!0),(2!==s||!o._firstPT&&o._initted)&&o._enabled(!1,!1)&&(a=!0);return a},H=function(t,e,i){for(var s=t._timeline,r=s._timeScale,n=t._startTime;s._timeline;){if(n+=s._startTime,r*=s._timeScale,s._paused)return-100;s=s._timeline}return n/=r,n>e?n-e:i&&n===e||!t._initted&&2*l>n-e?l:(n+=t.totalDuration()/t._timeScale/r)>e+l?0:n-e-l};n._init=function(){var t,e,i,s,r,n=this.vars,a=this._overwrittenProps,o=this._duration,h=!!n.immediateRender,_=n.ease;if(n.startAt){this._startAt&&(this._startAt.render(-1,!0),this._startAt.kill()),r={};for(s in n.startAt)r[s]=n.startAt[s];if(r.overwrite=!1,r.immediateRender=!0,r.lazy=h&&n.lazy!==!1,r.startAt=r.delay=null,this._startAt=O.to(this.target,0,r),h)if(this._time>0)this._startAt=null;else if(0!==o)return}else if(n.runBackwards&&0!==o)if(this._startAt)this._startAt.render(-1,!0),this._startAt.kill(),this._startAt=null;else{i={};for(s in n)B[s]&&"autoCSS"!==s||(i[s]=n[s]);if(i.overwrite=0,i.data="isFromStart",i.lazy=h&&n.lazy!==!1,i.immediateRender=h,this._startAt=O.to(this.target,0,i),h){if(0===this._time)return}else this._startAt._init(),this._startAt._enabled(!1)}if(this._ease=_=_?_ instanceof T?_:"function"==typeof _?new T(_,n.easeParams):w[_]||O.defaultEase:O.defaultEase,n.easeParams instanceof Array&&_.config&&(this._ease=_.config.apply(_,n.easeParams)),this._easeType=this._ease._type,this._easePower=this._ease._power,this._firstPT=null,this._targets)for(t=this._targets.length;--t>-1;)this._initProps(this._targets[t],this._propLookup[t]={},this._siblings[t],a?a[t]:null)&&(e=!0);else e=this._initProps(this.target,this._propLookup,this._siblings,a);if(e&&O._onPluginEvent("_onInitAllProps",this),a&&(this._firstPT||"function"!=typeof this.target&&this._enabled(!1,!1)),n.runBackwards)for(i=this._firstPT;i;)i.s+=i.c,i.c=-i.c,i=i._next;this._onUpdate=n.onUpdate,this._initted=!0},n._initProps=function(e,i,s,r){var n,a,o,h,_,l;if(null==e)return!1;M[e._gsTweenID]&&Q(),this.vars.css||e.style&&e!==t&&e.nodeType&&U.css&&this.vars.autoCSS!==!1&&z(this.vars,e);for(n in this.vars){if(l=this.vars[n],B[n])l&&(l instanceof Array||l.push&&m(l))&&-1!==l.join("").indexOf("{self}")&&(this.vars[n]=l=this._swapSelfInParams(l,this));else if(U[n]&&(h=new U[n])._onInitTween(e,this.vars[n],this)){for(this._firstPT=_={_next:this._firstPT,t:h,p:"setRatio",s:0,c:1,f:!0,n:n,pg:!0,pr:h._priority},a=h._overwriteProps.length;--a>-1;)i[h._overwriteProps[a]]=this._firstPT;(h._priority||h._onInitAllProps)&&(o=!0),(h._onDisable||h._onEnable)&&(this._notifyPluginsOfEnabled=!0)}else this._firstPT=i[n]=_={_next:this._firstPT,t:e,p:n,f:"function"==typeof e[n],n:n,pg:!1,pr:0},_.s=_.f?e[n.indexOf("set")||"function"!=typeof e["get"+n.substr(3)]?n:"get"+n.substr(3)]():parseFloat(e[n]),_.c="string"==typeof l&&"="===l.charAt(1)?parseInt(l.charAt(0)+"1",10)*Number(l.substr(2)):Number(l)-_.s||0;_&&_._next&&(_._next._prev=_)}return r&&this._kill(r,e)?this._initProps(e,i,s,r):this._overwrite>1&&this._firstPT&&s.length>1&&K(e,this,i,this._overwrite,s)?(this._kill(i,e),this._initProps(e,i,s,r)):(this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration)&&(M[e._gsTweenID]=!0),o)},n.render=function(t,e,i){var s,r,n,a,o=this._time,h=this._duration,_=this._rawPrevTime;if(t>=h)this._totalTime=this._time=h,this.ratio=this._ease._calcEnd?this._ease.getRatio(1):1,this._reversed||(s=!0,r="onComplete"),0===h&&(this._initted||!this.vars.lazy||i)&&(this._startTime===this._timeline._duration&&(t=0),(0===t||0>_||_===l)&&_!==t&&(i=!0,_>l&&(r="onReverseComplete")),this._rawPrevTime=a=!e||t||_===t?t:l);else if(1e-7>t)this._totalTime=this._time=0,this.ratio=this._ease._calcEnd?this._ease.getRatio(0):0,(0!==o||0===h&&_>0&&_!==l)&&(r="onReverseComplete",s=this._reversed),0>t?(this._active=!1,0===h&&(this._initted||!this.vars.lazy||i)&&(_>=0&&(i=!0),this._rawPrevTime=a=!e||t||_===t?t:l)):this._initted||(i=!0);else if(this._totalTime=this._time=t,this._easeType){var u=t/h,c=this._easeType,m=this._easePower;(1===c||3===c&&u>=.5)&&(u=1-u),3===c&&(u*=2),1===m?u*=u:2===m?u*=u*u:3===m?u*=u*u*u:4===m&&(u*=u*u*u*u),this.ratio=1===c?1-u:2===c?u:.5>t/h?u/2:1-u/2}else this.ratio=this._ease.getRatio(t/h);if(this._time!==o||i){if(!this._initted){if(this._init(),!this._initted||this._gc)return;if(!i&&this._firstPT&&(this.vars.lazy!==!1&&this._duration||this.vars.lazy&&!this._duration))return this._time=this._totalTime=o,this._rawPrevTime=_,E.push(this),void(this._lazy=t);this._time&&!s?this.ratio=this._ease.getRatio(this._time/h):s&&this._ease._calcEnd&&(this.ratio=this._ease.getRatio(0===this._time?0:1))}for(this._lazy!==!1&&(this._lazy=!1),this._active||!this._paused&&this._time!==o&&t>=0&&(this._active=!0),0===o&&(this._startAt&&(t>=0?this._startAt.render(t,e,i):r||(r="_dummyGS")),this.vars.onStart&&(0!==this._time||0===h)&&(e||this.vars.onStart.apply(this.vars.onStartScope||this,this.vars.onStartParams||y))),n=this._firstPT;n;)n.f?n.t[n.p](n.c*this.ratio+n.s):n.t[n.p]=n.c*this.ratio+n.s,n=n._next;this._onUpdate&&(0>t&&this._startAt&&this._startTime&&this._startAt.render(t,e,i),e||(this._time!==o||s)&&this._onUpdate.apply(this.vars.onUpdateScope||this,this.vars.onUpdateParams||y)),r&&(!this._gc||i)&&(0>t&&this._startAt&&!this._onUpdate&&this._startTime&&this._startAt.render(t,e,i),s&&(this._timeline.autoRemoveChildren&&this._enabled(!1,!1),this._active=!1),!e&&this.vars[r]&&this.vars[r].apply(this.vars[r+"Scope"]||this,this.vars[r+"Params"]||y),0===h&&this._rawPrevTime===l&&a!==l&&(this._rawPrevTime=0))}},n._kill=function(t,e){if("all"===t&&(t=null),null==t&&(null==e||e===this.target))return this._lazy=!1,this._enabled(!1,!1);e="string"!=typeof e?e||this._targets||this.target:O.selector(e)||e;var i,s,r,n,a,o,h,_;if((m(e)||I(e))&&"number"!=typeof e[0])for(i=e.length;--i>-1;)this._kill(t,e[i])&&(o=!0);else{if(this._targets){for(i=this._targets.length;--i>-1;)if(e===this._targets[i]){a=this._propLookup[i]||{},this._overwrittenProps=this._overwrittenProps||[],s=this._overwrittenProps[i]=t?this._overwrittenProps[i]||{}:"all";break}}else{if(e!==this.target)return!1;a=this._propLookup,s=this._overwrittenProps=t?this._overwrittenProps||{}:"all"}if(a){h=t||a,_=t!==s&&"all"!==s&&t!==a&&("object"!=typeof t||!t._tempKill);for(r in h)(n=a[r])&&(n.pg&&n.t._kill(h)&&(o=!0),n.pg&&0!==n.t._overwriteProps.length||(n._prev?n._prev._next=n._next:n===this._firstPT&&(this._firstPT=n._next),n._next&&(n._next._prev=n._prev),n._next=n._prev=null),delete a[r]),_&&(s[r]=1);!this._firstPT&&this._initted&&this._enabled(!1,!1)}}return o},n.invalidate=function(){return this._notifyPluginsOfEnabled&&O._onPluginEvent("_onDisable",this),this._firstPT=null,this._overwrittenProps=null,this._onUpdate=null,this._startAt=null,this._initted=this._active=this._notifyPluginsOfEnabled=this._lazy=!1,this._propLookup=this._targets?{}:[],this},n._enabled=function(t,e){if(o||a.wake(),t&&this._gc){var i,s=this._targets;if(s)for(i=s.length;--i>-1;)this._siblings[i]=$(s[i],this,!0);else this._siblings=$(this.target,this,!0)}return A.prototype._enabled.call(this,t,e),this._notifyPluginsOfEnabled&&this._firstPT?O._onPluginEvent(t?"_onEnable":"_onDisable",this):!1},O.to=function(t,e,i){return new O(t,e,i)},O.from=function(t,e,i){return i.runBackwards=!0,i.immediateRender=0!=i.immediateRender,new O(t,e,i)},O.fromTo=function(t,e,i,s){return s.startAt=i,s.immediateRender=0!=s.immediateRender&&0!=i.immediateRender,new O(t,e,s)},O.delayedCall=function(t,e,i,s,r){return new O(e,0,{delay:t,onComplete:e,onCompleteParams:i,onCompleteScope:s,onReverseComplete:e,onReverseCompleteParams:i,onReverseCompleteScope:s,immediateRender:!1,useFrames:r,overwrite:0})},O.set=function(t,e){return new O(t,0,e)},O.getTweensOf=function(t,e){if(null==t)return[];t="string"!=typeof t?t:O.selector(t)||t;var i,s,r,n;if((m(t)||I(t))&&"number"!=typeof t[0]){for(i=t.length,s=[];--i>-1;)s=s.concat(O.getTweensOf(t[i],e));for(i=s.length;--i>-1;)for(n=s[i],r=i;--r>-1;)n===s[r]&&s.splice(i,1)}else for(s=$(t).concat(),i=s.length;--i>-1;)(s[i]._gc||e&&!s[i].isActive())&&s.splice(i,1);return s},O.killTweensOf=O.killDelayedCallsTo=function(t,e,i){"object"==typeof e&&(i=e,e=!1);for(var s=O.getTweensOf(t,e),r=s.length;--r>-1;)s[r]._kill(i,t)};var J=g("plugins.TweenPlugin",function(t,e){this._overwriteProps=(t||"").split(","),this._propName=this._overwriteProps[0],this._priority=e||0,this._super=J.prototype},!0);if(n=J.prototype,J.version="1.10.1",J.API=2,n._firstPT=null,n._addTween=function(t,e,i,s,r,n){var a,o;return null!=s&&(a="number"==typeof s||"="!==s.charAt(1)?Number(s)-i:parseInt(s.charAt(0)+"1",10)*Number(s.substr(2)))?(this._firstPT=o={_next:this._firstPT,t:t,p:e,s:i,c:a,f:"function"==typeof t[e],n:r||e,r:n},o._next&&(o._next._prev=o),o):void 0},n.setRatio=function(t){for(var e,i=this._firstPT,s=1e-6;i;)e=i.c*t+i.s,i.r?e=Math.round(e):s>e&&e>-s&&(e=0),i.f?i.t[i.p](e):i.t[i.p]=e,i=i._next},n._kill=function(t){var e,i=this._overwriteProps,s=this._firstPT;if(null!=t[this._propName])this._overwriteProps=[];else for(e=i.length;--e>-1;)null!=t[i[e]]&&i.splice(e,1); for(;s;)null!=t[s.n]&&(s._next&&(s._next._prev=s._prev),s._prev?(s._prev._next=s._next,s._prev=null):this._firstPT===s&&(this._firstPT=s._next)),s=s._next;return!1},n._roundProps=function(t,e){for(var i=this._firstPT;i;)(t[this._propName]||null!=i.n&&t[i.n.split(this._propName+"_").join("")])&&(i.r=e),i=i._next},O._onPluginEvent=function(t,e){var i,s,r,n,a,o=e._firstPT;if("_onInitAllProps"===t){for(;o;){for(a=o._next,s=r;s&&s.pr>o.pr;)s=s._next;(o._prev=s?s._prev:n)?o._prev._next=o:r=o,(o._next=s)?s._prev=o:n=o,o=a}o=e._firstPT=r}for(;o;)o.pg&&"function"==typeof o.t[t]&&o.t[t]()&&(i=!0),o=o._next;return i},J.activate=function(t){for(var e=t.length;--e>-1;)t[e].API===J.API&&(U[(new t[e])._propName]=t[e]);return!0},d.plugin=function(t){if(!(t&&t.propName&&t.init&&t.API))throw"illegal plugin definition.";var e,i=t.propName,s=t.priority||0,r=t.overwriteProps,n={init:"_onInitTween",set:"setRatio",kill:"_kill",round:"_roundProps",initAll:"_onInitAllProps"},a=g("plugins."+i.charAt(0).toUpperCase()+i.substr(1)+"Plugin",function(){J.call(this,i,s),this._overwriteProps=r||[]},t.global===!0),o=a.prototype=new J(i);o.constructor=a,a.API=t.API;for(e in n)"function"==typeof t[e]&&(o[n[e]]=t[e]);return a.version=t.version,J.activate([a]),a},s=t._gsQueue){for(r=0;s.length>r;r++)s[r]();for(n in p)p[n].func||t.console.log("GSAP encountered missing dependency: com.greensock."+n)}o=!1}}("undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window,"TweenMax"); //libs/commonlibs/tripledes/DESEncrypt.min.js var DESEncrypt = (function () { function DESEncrypt() { } DESEncrypt.encrypt = function(msg, key){ var key = CryptoJS.enc.Utf8.parse(key); var msg = CryptoJS.enc.Utf8.parse(msg); var encrypted = CryptoJS.DES.encrypt(msg, key, { iv: key,mode:CryptoJS.mode.CBC}); return encrypted; }; // added by alex.leung DESEncrypt.md5hash = function(msg) { var hash = CryptoJS.MD5(msg).toString(); return hash; }; return DESEncrypt; })(); //libs/commonlibs/tripledes/tripledes.min.js /* CryptoJS v3.1.2 code.google.com/p/crypto-js (c) 2009-2013 by Jeff Mott. All rights reserved. code.google.com/p/crypto-js/wiki/License */ var CryptoJS=CryptoJS||function(u,l){var d={},n=d.lib={},p=function(){},s=n.Base={extend:function(a){p.prototype=this;var c=new p;a&&c.mixIn(a);c.hasOwnProperty("init")||(c.init=function(){c.$super.init.apply(this,arguments)});c.init.prototype=c;c.$super=this;return c},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var c in a)a.hasOwnProperty(c)&&(this[c]=a[c]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, q=n.WordArray=s.extend({init:function(a,c){a=this.words=a||[];this.sigBytes=c!=l?c:4*a.length},toString:function(a){return(a||v).stringify(this)},concat:function(a){var c=this.words,m=a.words,f=this.sigBytes;a=a.sigBytes;this.clamp();if(f%4)for(var t=0;t>>2]|=(m[t>>>2]>>>24-8*(t%4)&255)<<24-8*((f+t)%4);else if(65535>>2]=m[t>>>2];else c.push.apply(c,m);this.sigBytes+=a;return this},clamp:function(){var a=this.words,c=this.sigBytes;a[c>>>2]&=4294967295<< 32-8*(c%4);a.length=u.ceil(c/4)},clone:function(){var a=s.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var c=[],m=0;m>>2]>>>24-8*(f%4)&255;m.push((t>>>4).toString(16));m.push((t&15).toString(16))}return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>3]|=parseInt(a.substr(f, 2),16)<<24-4*(f%8);return new q.init(m,c/2)}},b=w.Latin1={stringify:function(a){var c=a.words;a=a.sigBytes;for(var m=[],f=0;f>>2]>>>24-8*(f%4)&255));return m.join("")},parse:function(a){for(var c=a.length,m=[],f=0;f>>2]|=(a.charCodeAt(f)&255)<<24-8*(f%4);return new q.init(m,c)}},x=w.Utf8={stringify:function(a){try{return decodeURIComponent(escape(b.stringify(a)))}catch(c){throw Error("Malformed UTF-8 data");}},parse:function(a){return b.parse(unescape(encodeURIComponent(a)))}}, r=n.BufferedBlockAlgorithm=s.extend({reset:function(){this._data=new q.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=x.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var c=this._data,m=c.words,f=c.sigBytes,t=this.blockSize,b=f/(4*t),b=a?u.ceil(b):u.max((b|0)-this._minBufferSize,0);a=b*t;f=u.min(4*a,f);if(a){for(var e=0;e>>2]>>>24-8*(q%4)&255)<<16|(n[q+1>>>2]>>>24-8*((q+1)%4)&255)<<8|n[q+2>>>2]>>>24-8*((q+2)%4)&255,v=0;4>v&&q+0.75*v>>6*(3-v)&63));if(n=s.charAt(64))for(;d.length%4;)d.push(n);return d.join("")},parse:function(d){var n=d.length,p=this._map,s=p.charAt(64);s&&(s=d.indexOf(s),-1!=s&&(n=s));for(var s=[],q=0,w=0;w< n;w++)if(w%4){var v=p.indexOf(d.charAt(w-1))<<2*(w%4),b=p.indexOf(d.charAt(w))>>>6-2*(w%4);s[q>>>2]|=(v|b)<<24-8*(q%4);q++}return l.create(s,q)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}})(); (function(u){function l(b,e,a,c,m,f,t){b=b+(e&a|~e&c)+m+t;return(b<>>32-f)+e}function d(b,e,a,c,m,f,t){b=b+(e&c|a&~c)+m+t;return(b<>>32-f)+e}function n(b,e,a,c,m,f,t){b=b+(e^a^c)+m+t;return(b<>>32-f)+e}function p(b,e,a,c,m,f,t){b=b+(a^(e|~c))+m+t;return(b<>>32-f)+e}for(var s=CryptoJS,q=s.lib,w=q.WordArray,v=q.Hasher,q=s.algo,b=[],x=0;64>x;x++)b[x]=4294967296*u.abs(u.sin(x+1))|0;q=q.MD5=v.extend({_doReset:function(){this._hash=new w.init([1732584193,4023233417,2562383102,271733878])}, _doProcessBlock:function(r,e){for(var a=0;16>a;a++){var c=e+a,m=r[c];r[c]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360}var a=this._hash.words,c=r[e+0],m=r[e+1],f=r[e+2],t=r[e+3],y=r[e+4],q=r[e+5],s=r[e+6],w=r[e+7],v=r[e+8],u=r[e+9],x=r[e+10],z=r[e+11],A=r[e+12],B=r[e+13],C=r[e+14],D=r[e+15],g=a[0],h=a[1],j=a[2],k=a[3],g=l(g,h,j,k,c,7,b[0]),k=l(k,g,h,j,m,12,b[1]),j=l(j,k,g,h,f,17,b[2]),h=l(h,j,k,g,t,22,b[3]),g=l(g,h,j,k,y,7,b[4]),k=l(k,g,h,j,q,12,b[5]),j=l(j,k,g,h,s,17,b[6]),h=l(h,j,k,g,w,22,b[7]), g=l(g,h,j,k,v,7,b[8]),k=l(k,g,h,j,u,12,b[9]),j=l(j,k,g,h,x,17,b[10]),h=l(h,j,k,g,z,22,b[11]),g=l(g,h,j,k,A,7,b[12]),k=l(k,g,h,j,B,12,b[13]),j=l(j,k,g,h,C,17,b[14]),h=l(h,j,k,g,D,22,b[15]),g=d(g,h,j,k,m,5,b[16]),k=d(k,g,h,j,s,9,b[17]),j=d(j,k,g,h,z,14,b[18]),h=d(h,j,k,g,c,20,b[19]),g=d(g,h,j,k,q,5,b[20]),k=d(k,g,h,j,x,9,b[21]),j=d(j,k,g,h,D,14,b[22]),h=d(h,j,k,g,y,20,b[23]),g=d(g,h,j,k,u,5,b[24]),k=d(k,g,h,j,C,9,b[25]),j=d(j,k,g,h,t,14,b[26]),h=d(h,j,k,g,v,20,b[27]),g=d(g,h,j,k,B,5,b[28]),k=d(k,g, h,j,f,9,b[29]),j=d(j,k,g,h,w,14,b[30]),h=d(h,j,k,g,A,20,b[31]),g=n(g,h,j,k,q,4,b[32]),k=n(k,g,h,j,v,11,b[33]),j=n(j,k,g,h,z,16,b[34]),h=n(h,j,k,g,C,23,b[35]),g=n(g,h,j,k,m,4,b[36]),k=n(k,g,h,j,y,11,b[37]),j=n(j,k,g,h,w,16,b[38]),h=n(h,j,k,g,x,23,b[39]),g=n(g,h,j,k,B,4,b[40]),k=n(k,g,h,j,c,11,b[41]),j=n(j,k,g,h,t,16,b[42]),h=n(h,j,k,g,s,23,b[43]),g=n(g,h,j,k,u,4,b[44]),k=n(k,g,h,j,A,11,b[45]),j=n(j,k,g,h,D,16,b[46]),h=n(h,j,k,g,f,23,b[47]),g=p(g,h,j,k,c,6,b[48]),k=p(k,g,h,j,w,10,b[49]),j=p(j,k,g,h, C,15,b[50]),h=p(h,j,k,g,q,21,b[51]),g=p(g,h,j,k,A,6,b[52]),k=p(k,g,h,j,t,10,b[53]),j=p(j,k,g,h,x,15,b[54]),h=p(h,j,k,g,m,21,b[55]),g=p(g,h,j,k,v,6,b[56]),k=p(k,g,h,j,D,10,b[57]),j=p(j,k,g,h,s,15,b[58]),h=p(h,j,k,g,B,21,b[59]),g=p(g,h,j,k,y,6,b[60]),k=p(k,g,h,j,z,10,b[61]),j=p(j,k,g,h,f,15,b[62]),h=p(h,j,k,g,u,21,b[63]);a[0]=a[0]+g|0;a[1]=a[1]+h|0;a[2]=a[2]+j|0;a[3]=a[3]+k|0},_doFinalize:function(){var b=this._data,e=b.words,a=8*this._nDataBytes,c=8*b.sigBytes;e[c>>>5]|=128<<24-c%32;var m=u.floor(a/ 4294967296);e[(c+64>>>9<<4)+15]=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360;e[(c+64>>>9<<4)+14]=(a<<8|a>>>24)&16711935|(a<<24|a>>>8)&4278255360;b.sigBytes=4*(e.length+1);this._process();b=this._hash;e=b.words;for(a=0;4>a;a++)c=e[a],e[a]=(c<<8|c>>>24)&16711935|(c<<24|c>>>8)&4278255360;return b},clone:function(){var b=v.clone.call(this);b._hash=this._hash.clone();return b}});s.MD5=v._createHelper(q);s.HmacMD5=v._createHmacHelper(q)})(Math); (function(){var u=CryptoJS,l=u.lib,d=l.Base,n=l.WordArray,l=u.algo,p=l.EvpKDF=d.extend({cfg:d.extend({keySize:4,hasher:l.MD5,iterations:1}),init:function(d){this.cfg=this.cfg.extend(d)},compute:function(d,l){for(var p=this.cfg,v=p.hasher.create(),b=n.create(),u=b.words,r=p.keySize,p=p.iterations;u.length>>2]&255}};d.BlockCipher=v.extend({cfg:v.cfg.extend({mode:b,padding:r}),reset:function(){v.reset.call(this);var a=this.cfg,c=a.iv,a=a.mode;if(this._xformMode==this._ENC_XFORM_MODE)var b=a.createEncryptor;else b=a.createDecryptor,this._minBufferSize=1;this._mode=b.call(a, this,c&&c.words)},_doProcessBlock:function(a,c){this._mode.processBlock(a,c)},_doFinalize:function(){var a=this.cfg.padding;if(this._xformMode==this._ENC_XFORM_MODE){a.pad(this._data,this.blockSize);var c=this._process(!0)}else c=this._process(!0),a.unpad(c);return c},blockSize:4});var e=d.CipherParams=n.extend({init:function(a){this.mixIn(a)},toString:function(a){return(a||this.formatter).stringify(this)}}),b=(l.format={}).OpenSSL={stringify:function(a){var c=a.ciphertext;a=a.salt;return(a?p.create([1398893684, 1701076831]).concat(a).concat(c):c).toString(q)},parse:function(a){a=q.parse(a);var c=a.words;if(1398893684==c[0]&&1701076831==c[1]){var b=p.create(c.slice(2,4));c.splice(0,4);a.sigBytes-=16}return e.create({ciphertext:a,salt:b})}},a=d.SerializableCipher=n.extend({cfg:n.extend({format:b}),encrypt:function(a,c,b,d){d=this.cfg.extend(d);var l=a.createEncryptor(b,d);c=l.finalize(c);l=l.cfg;return e.create({ciphertext:c,key:b,iv:l.iv,algorithm:a,mode:l.mode,padding:l.padding,blockSize:a.blockSize,formatter:d.format})}, decrypt:function(a,c,b,e){e=this.cfg.extend(e);c=this._parse(c,e.format);return a.createDecryptor(b,e).finalize(c.ciphertext)},_parse:function(a,c){return"string"==typeof a?c.parse(a,this):a}}),l=(l.kdf={}).OpenSSL={execute:function(a,c,b,d){d||(d=p.random(8));a=w.create({keySize:c+b}).compute(a,d);b=p.create(a.words.slice(c),4*b);a.sigBytes=4*c;return e.create({key:a,iv:b,salt:d})}},c=d.PasswordBasedCipher=a.extend({cfg:a.cfg.extend({kdf:l}),encrypt:function(c,b,e,d){d=this.cfg.extend(d);e=d.kdf.execute(e, c.keySize,c.ivSize);d.iv=e.iv;c=a.encrypt.call(this,c,b,e.key,d);c.mixIn(e);return c},decrypt:function(c,b,e,d){d=this.cfg.extend(d);b=this._parse(b,d.format);e=d.kdf.execute(e,c.keySize,c.ivSize,b.salt);d.iv=e.iv;return a.decrypt.call(this,c,b,e.key,d)}})}(); (function(){function u(b,a){var c=(this._lBlock>>>b^this._rBlock)&a;this._rBlock^=c;this._lBlock^=c<>>b^this._lBlock)&a;this._lBlock^=c;this._rBlock^=c<c;c++){var d=q[c]-1;a[c]=b[d>>>5]>>>31-d%32&1}b=this._subKeys=[];for(d=0;16>d;d++){for(var f=b[d]=[],l=v[d],c=0;24>c;c++)f[c/6|0]|=a[(w[c]-1+l)%28]<<31-c%6,f[4+(c/6|0)]|=a[28+(w[c+24]-1+l)%28]<<31-c%6;f[0]=f[0]<<1|f[0]>>>31;for(c=1;7>c;c++)f[c]>>>= 4*(c-1)+3;f[7]=f[7]<<5|f[7]>>>27}a=this._invSubKeys=[];for(c=0;16>c;c++)a[c]=b[15-c]},encryptBlock:function(b,a){this._doCryptBlock(b,a,this._subKeys)},decryptBlock:function(b,a){this._doCryptBlock(b,a,this._invSubKeys)},_doCryptBlock:function(e,a,c){this._lBlock=e[a];this._rBlock=e[a+1];u.call(this,4,252645135);u.call(this,16,65535);l.call(this,2,858993459);l.call(this,8,16711935);u.call(this,1,1431655765);for(var d=0;16>d;d++){for(var f=c[d],n=this._lBlock,p=this._rBlock,q=0,r=0;8>r;r++)q|=b[r][((p^ f[r])&x[r])>>>0];this._lBlock=p;this._rBlock=n^q}c=this._lBlock;this._lBlock=this._rBlock;this._rBlock=c;u.call(this,1,1431655765);l.call(this,8,16711935);l.call(this,2,858993459);u.call(this,16,65535);u.call(this,4,252645135);e[a]=this._lBlock;e[a+1]=this._rBlock},keySize:2,ivSize:2,blockSize:2});d.DES=n._createHelper(r);s=s.TripleDES=n.extend({_doReset:function(){var b=this._key.words;this._des1=r.createEncryptor(p.create(b.slice(0,2)));this._des2=r.createEncryptor(p.create(b.slice(2,4)));this._des3= r.createEncryptor(p.create(b.slice(4,6)))},encryptBlock:function(b,a){this._des1.encryptBlock(b,a);this._des2.decryptBlock(b,a);this._des3.encryptBlock(b,a)},decryptBlock:function(b,a){this._des3.decryptBlock(b,a);this._des2.encryptBlock(b,a);this._des1.decryptBlock(b,a)},keySize:6,ivSize:2,blockSize:2});d.TripleDES=n._createHelper(s)})(); //main.min.js var __reflect=this&&this.__reflect||function(e,t,n){e.__class__=t,n?n.push(t):n=[t],e.__types__=e.__types__?n.concat(e.__types__):n},__extends=this&&this.__extends||function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])};return function(t,n){function i(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(i.prototype=n.prototype,new i)}}(),GameStateController=function(){function e(){this.hasBigWin=!1,this.statusFlag={},this.isActive=!1,this.data=SocketManager.getInstance().GetData()}return e.prototype.Start=function(e){void 0===e&&(e=!1),this.AddListeners(),this.SetActive(!0)},e.prototype.Stop=function(){this.RemoveListeners(),this.SetActive(!1)},e.prototype.SetActive=function(e){this.isActive=e},e.prototype.ToState=function(e){return CommonFunc.log("To State: "+GameState[e]),this.isActive?!1:!0},e.prototype.AddListeners=function(){},e.prototype.RemoveListeners=function(){},e}();__reflect(GameStateController.prototype,"GameStateController");var SlotGameStatusFlag;!function(e){e[e.BookFinished=0]="BookFinished",e[e.LoopFinished=1]="LoopFinished",e[e.BigWinFinished=2]="BigWinFinished"}(SlotGameStatusFlag||(SlotGameStatusFlag={}));var SlotGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Start=function(t){e.prototype.Start.call(this,t)},t.prototype.AddListeners=function(){EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.on_button_pressed,this),EventCentral.getInstance().addEventListener(SceneNotify.SPIN_STOPPED,this.on_reel_stopped,this),EventCentral.getInstance().addEventListener(SceneNotify.TRIGGER_ANIMATION_FINISHED,this.on_trigger_animation_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.LOOP_COMPLETE,this.on_first_animation_loop_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_BOOKING_FINISHED,this.on_win_booking_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.BIG_WIN_FINISHED,this.on_big_win_finished,this)},t.prototype.RemoveListeners=function(){EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.on_button_pressed,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPIN_STOPPED,this.on_reel_stopped,this),EventCentral.getInstance().removeEventListener(SceneNotify.TRIGGER_ANIMATION_FINISHED,this.on_trigger_animation_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.LOOP_COMPLETE,this.on_first_animation_loop_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.WIN_BOOKING_FINISHED,this.on_win_booking_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.BIG_WIN_FINISHED,this.on_big_win_finished,this)},t.prototype.on_button_pressed=function(e){var t=e.data;switch(t){case ButtonType.Start:this.on_start_pressed()}},t.prototype.on_start_pressed=function(){},t.prototype.on_reel_stopped=function(e){this.CheckNextStateAfterReelStopOrJackpotFinished()},t.prototype.on_trigger_animation_finished=function(e){this.ToState(GameState.Slot_Result_Displaying)},t.prototype.on_first_animation_loop_finished=function(e){this.currentState==GameState.Slot_Result_Displaying&&(this.statusFlag[SlotGameStatusFlag.LoopFinished]=!0,this.CheckResultDisplayFinished())},t.prototype.on_win_booking_finished=function(e){this.currentState==GameState.Slot_Result_Displaying&&(this.statusFlag[SlotGameStatusFlag.BookFinished]=!0,this.CheckResultDisplayFinished())},t.prototype.on_big_win_finished=function(e){this.currentState==GameState.Slot_Result_Displaying&&(this.statusFlag[SlotGameStatusFlag.BigWinFinished]=!0,this.CheckResultDisplayFinished())},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.ToState(GameState.Slot_End)},t.prototype.CheckResultDisplayFinished=function(){var e=!0;this.statusFlag[SlotGameStatusFlag.BookFinished]||(e=!1),this.statusFlag[SlotGameStatusFlag.LoopFinished]||(e=!1),this.hasBigWin&&(this.statusFlag[SlotGameStatusFlag.BigWinFinished]?GameConfig.TurboModeState&&GameConfig.isTurboMode&&(e||EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop))):e=!1),e&&(this.hasBigWin=!1,this.statusFlag[SlotGameStatusFlag.BookFinished]=!1,this.statusFlag[SlotGameStatusFlag.LoopFinished]=!1,this.statusFlag[SlotGameStatusFlag.BigWinFinished]=!1,this.CheckEndState())},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(this.currentState=t,t){case GameState.Slot_Idle:return this.StateIdle(),StringUtil.getParameterByName("inum")&&(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes||SocketManager.getInstance().GetData().isNextFSOSpin()||SocketManager.getInstance().GetData().IsFreeGame()||IFrameCloseButtonState(!0),SocketManager.getInstance().GetData().IsLastFreeGameFinished()&&!SocketManager.getInstance().GetData().isNextFSOSpin()&&IFrameCloseButtonState(!0)),!0;case GameState.Slot_Spinning:return this.StateSpinning(),StringUtil.getParameterByName("inum")&&(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes||IFrameCloseButtonState(!1)),!0;case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_Special_Event:return this.StateSpecialEvent(),!0;case GameState.Slot_Result_Displaying:return this.StateResultDisplay(),!0;case GameState.Slot_End:return this.StateEnd(),!0}return!1},t.prototype.StateIdle=function(){},t.prototype.StateSpinning=function(){},t.prototype.StateFeatureTriggered=function(){},t.prototype.StateSpecialEvent=function(){},t.prototype.StateResultDisplay=function(){},t.prototype.StateEnd=function(){SocketManager.getInstance().SendActionDone(),this.endToIdleDelayID=egret.setTimeout(this.EndToIdle,this,1e3/60,1)},t.prototype.EndToIdle=function(){egret.clearTimeout(this.endToIdleDelayID),this.ToState(GameState.Slot_Idle)},t}(GameStateController);__reflect(SlotGameStateController.prototype,"SlotGameStateController");var SceneHandler=function(){function e(e){void 0===e&&(e=SceneType.Unknown),this.sceneType=SceneType.Unknown,this.fromType=SceneType.Unknown,this.itemLoaded=new Object,this.itemTotal=0,this.isDummyLoaded=!1,this.sceneType=e,this.timeoutHelper=new TimeoutHelper(this.Timeout,this,1e3*SlotConfig.spinTimeout),EventCentral.getInstance().addEventListener(SceneNotify.DUMMY_SCENE_COMPLETED,this.DummyLoadCompleted,this)}return e.prototype.Timeout=function(){EventCentral.getInstance().dispatchEvent(SysNotify.SysError(GameError.TIMEOUT))},e.prototype.GetRelatedgroupList=function(){return[]},e.prototype.ResourceGroupLoaded=function(e){CommonFunc.log(e.groupName+" is loaded."),this.timeoutHelper.Reset(),this.currentLoadingGroup++,this.nWaitGroup==this.currentLoadingGroup&&this.AllResourceGroupLoaded()},e.prototype.CreateAndTransit=function(){this.CreateSceneAndController(),this.StartTransitToScene()},e.prototype.DummyLoadCompleted=function(e){this.isDummyLoaded=e.data,0==this.isDummyLoaded&&EventCentral.getInstance().removeEventListener(SceneNotify.DUMMY_SCENE_COMPLETED,this.DummyLoadCompleted,this)},e.prototype.CheckAndLoadResources=function(){var e=this.GetRelatedgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;for(var t=0,n=0;ni?(n>r&&(o=!0,n=r),t=n*i):(t>a&&(o=!0,t=a),n=t/i),Math.abs(this.stage.stageWidth-t)<5||(o||this.canvas.classList.contains("Pixelate")?o&&this.canvas.classList.contains("Pixelate")&&this.canvas.classList.remove("Pixelate"):this.canvas.classList.add("Pixelate"),GameConfig.ContentScaleInv=t/GameConfig.DefaultContentWidth,e.scaleX=GameConfig.ContentScaleInv,e.scaleY=GameConfig.ContentScaleInv,this.stage.setContentSize(t,n))},e.prototype.InitSceneHandlers=function(){var e=new BaseGameSceneHandler(SceneType.Base),t=new FreeGameSceneHandler(SceneType.Free),n=new FreeSpinOfferGameSceneHandler(SceneType.FSO);e.initializer=this,t.initializer=this,n.initializer=this,GameSceneManager.GetInstance().AddSceneHandler(SceneType.Base,e),GameSceneManager.GetInstance().AddSceneHandler(SceneType.Free,t),GameSceneManager.GetInstance().AddSceneHandler(SceneType.FSO,n);var i=new MiniLobbyOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("MiniLobby",i);var o=new BigWinOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("BigWin",o);var a=new JackpotOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Jackpot",a);var r=new PaytableOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Paytable",r);var s=new GameRulesOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("GameRule",s)},e.prototype.SetCSIPList=function(e){for(var t=0;t"+t+"::"+i.ip+":"+i.port),GameConfig.sshosts.push(i)}},e.prototype.SetRegionSSIPList=function(e){for(var t=0;t0),StringUtil.getParameterByName("FT")&&(GameConfig.isFeatureTrial=parseInt(StringUtil.getParameterByName("FT"))>0),StringUtil.getParameterByName("feature")&&(GameConfig.isShowQuitButton=0!=(2048&parseInt(StringUtil.getParameterByName("feature"))),0!=(4096&parseInt(StringUtil.getParameterByName("feature")))?GameConfig.quitGameMethod="_top":0!=(8192&parseInt(StringUtil.getParameterByName("feature")))?GameConfig.quitGameMethod="_parent":0!=(16384&parseInt(StringUtil.getParameterByName("feature")))&&(GameConfig.quitGameMethod="_self")),StringUtil.getParameterByName("referer")&&(GameConfig.referer=StringUtil.getParameterByName("referer")),"undefined"==typeof GameConfig.token&&(alert("Invalid Token"),CommonFunc.leaveGame())},e.prototype.LoadCommonErrorCodeFile=function(){var e,t=GameConfig.langData[GameConfig.Locale].code;e=CDNPath2();var n=e+"CommonResources/commonErrorCode_"+t+".json?t="+(new Date).getTime(),i=new egret.URLLoader;i.dataFormat=egret.URLLoaderDataFormat.TEXT;var o=new egret.URLRequest;o.url=n,i.addEventListener(egret.Event.COMPLETE,this.OnCommonErrorCodeLoaded,this),i.addEventListener(egret.IOErrorEvent.IO_ERROR,this.CommonErrorCodeLoadedFailed,this),i.load(o)},e.prototype.OnCommonErrorCodeLoaded=function(e){var t=e.target,n=t.data;if(null==n){var i=GameConfig.langData[GameConfig.Locale].code;GameConfig.CommonErrorCodeFile=RES.getRes("commonErrorCode_"+i+"_json")}else GameConfig.CommonErrorCodeFile=JSON.parse(n)},e.prototype.CommonErrorCodeLoadedFailed=function(e){console.log("Common Error code translation files load fail");var t=GameConfig.langData[GameConfig.Locale].code;GameConfig.CommonErrorCodeFile=RES.getRes("commonErrorCode_"+t+"_json")},e.prototype.LoadLobbyInfo=function(e,t){this.lobbyInfoLoadedCallback=e.bind(t);var n;n=CDNPath2();var i=n+"CommonResources/LobbyInfo.dat?t="+(new Date).getTime(),o=new egret.URLVariables,a="t="+(new Date).getTime();o.decode(a);var r=new egret.URLLoader;r.dataFormat=egret.URLLoaderDataFormat.TEXT;var s=new egret.URLRequest;s.url=i,r.data=o,r.addEventListener(egret.Event.COMPLETE,this.OnLobbyInfoLoaded,this),r.addEventListener(egret.IOErrorEvent.IO_ERROR,this.LobbyInfoLoadedFailed,this),r.load(s)},e.prototype.OnLobbyInfoLoaded=function(e){var t=e.target.data;GameConfig.lobbyInfo=JSON.parse(StringUtil.tryDecode64(t)),this.SetLobby(GameConfig.lobby),this.lobbyInfoLoadedCallback()},e.prototype.LobbyInfoLoadedFailed=function(e){alert("Fail to load lobby info"),this.LoadLobbyInfoTemplate()},e.prototype.LoadLobbyInfoTemplate=function(){var e="resource/UI/commonUI/images/MiniLobby/LobbyInfo_Template.dat",t=new egret.URLVariables,n="t="+(new Date).getTime();t.decode(n);var i=new egret.URLLoader;i.dataFormat=egret.URLLoaderDataFormat.TEXT;var o=new egret.URLRequest;o.url=e,i.data=t,i.addEventListener(egret.Event.COMPLETE,this.OnLobbyInfoLoaded,this),i.addEventListener(egret.IOErrorEvent.IO_ERROR,this.LobbyInfoLoadedFailed,this),i.load(o),StringUtil.getParameterByName("inum")&&(GameConfig.isMiniLobbyEnabled=!1)},e.prototype.CheckSupportedLanguage=function(e){for(var t=GameConfig.Locale,n=!1,i=0;i0?GameConfig.isTurboMode=!1:GameConfig.isTurboMode=!0),GameConfig.isTurboModeReady||(GameConfig.isTurboMode=!1),GameConfig.lobbyInfo[GameConfig.lobby].GameListException){GameConfig.gameListException=GameConfig.lobbyInfo[GameConfig.lobby].GameListException;for(var i=0;i=0&&GameConfig.gameList.splice(o,1)}}var a=GameConfig.GameCode.split("-"),o=GameConfig.gameList.indexOf(a[a.length-1]);o>=0&&GameConfig.gameList.splice(o,1),this.SetSupportedLanguageList(t),CommonFunc.log(GameConfig.GetGeneralRuleURL())},e.prototype.SetSupportedLanguageList=function(e){GameConfig.supportedLanguageList=e;for(var t=0;twindow.innerWidth?(GameConfig.Orientation=OrientationState.Portrait,isIOSChrome()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&this.hideIOSChromeFullScreenTips(),GameConfig.platform==Platform.mobile&&"Android"==egret.Capabilities.os&&isSupportFullScreen()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&this.hideChromeFullscreenTips(),apputil.isIOSSafari()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&this.hideIOSFullscreenTips()):(GameConfig.Orientation=OrientationState.Landscape,GameConfig.platform==Platform.mobile&&isIOSChrome()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&(this.toShowIOSFullscreenTips()?(document.getElementsByTagName("html")[0].style.overflow="visible",document.getElementsByTagName("body")[0].style.overflow="visible",this.showIOSChromeFullScreenTips()):(document.getElementsByTagName("html")[0].style.overflow="hidden",document.getElementsByTagName("body")[0].style.overflow="hidden",this.hideIOSChromeFullScreenTips())),GameConfig.platform==Platform.mobile&&"Android"==egret.Capabilities.os&&isSupportFullScreen()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&(this.disableAndroidChromFullscreen||this.showChromeFullscreenTips()),apputil.isIOSSafari()&&1!=parseInt(StringUtil.getParameterByName("webview"))&&(this.showIOSFullscreenTips(),this.doFullscreenCheck()&&this.hideIOSFullscreenTips())),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.ORIENTATION_CHANGED)),this.oldHeight=window.innerHeight,this.oldWidth=window.innerWidth,this.stage.addEventListener(egret.Event.RESIZE,this.OnOrientation,this),window.addEventListener("touchstart",this.onTouchStart),window.addEventListener("touchend",this.onTouchEnd)},e.prototype.initIOSFullScreenTip=function(){var e=document.createElement("div");e.id="iphone-tips",document.getElementsByTagName("body")[0].appendChild(e),isIOSover18Safari()?document.getElementById("iphone-tips").innerHTML='':isIOS15Safari()?document.getElementById("iphone-tips").innerHTML='':document.getElementById("iphone-tips").innerHTML='',apputil.isIOSSafari()&&isIOS14()&&(isIOS15Safari()?(document.getElementById("iphone-tips").style.height="100%",document.getElementById("iphone-tips").style.top="0%"):(document.getElementById("iphone-tips").style.height="130%",document.getElementById("iphone-tips").style.top="30%"))},e.prototype.initAndroidChromeFullScreenTip=function(){var e=this,t=document.createElement("div");t.id="chrome-tips",document.getElementsByTagName("body")[0].appendChild(t);var n=document.createElement("img");n.src="../CommonResources/commonImage/AndroidFullScreenTip/close.png",n.id="android-chrome-tips-close-button",t.appendChild(n);var i=document.createElement("img");i.src="../CommonResources/commonImage/AndroidFullScreenTip/doubleClick_animation.gif",i.id="android-chrome-tips-doubletap-animation",t.appendChild(i),egret.Ticker.getInstance().register(this.onDoubleClickTimeOut,this),t.addEventListener("click",function(){e.doubleClick<=0?e.doubleClick=600:apputil.enterFullScreen()}),n.addEventListener("click",function(){e.removeChromeFullscreenTips()})},e.prototype.showChromeFullscreenTips=function(){document.getElementById("chrome-tips").style.visibility="visible"},e.prototype.hideChromeFullscreenTips=function(){document.getElementById("chrome-tips").style.visibility="hidden"},e.prototype.removeChromeFullscreenTips=function(){document.getElementById("chrome-tips").style.visibility="hidden",this.disableAndroidChromFullscreen=!0},e.prototype.ScrollToTop=function(){var e=this;egret.setTimeout(function(){window.scrollY>0&&window.scrollTo(0,0),e.ScrollToTop()},this,1e3)},e.prototype.initIOSChromeFullScreenTips=function(){var e=this;this.bgGroup=document.createElement("div"),this.bgGroup.id="iosTips",this.bgGroup.style.width="100%",isIOSChrome()?this.bgGroup.style.height="150%":isIOS14()?this.bgGroup.style.height="130%":this.bgGroup.style.height="100%",this.bgGroup.style.position="absolute",this.bgGroup.style.top="0",this.bgGroup.style.left="0",this.bgGroup.style.backgroundColor="rgba(0, 0, 0, 0.7)",this.bgGroup.style.textAlign="center",document.body.appendChild(this.bgGroup),this.animImage=document.createElement("img"),this.animImage.id="animImage",isIOSChrome()?this.animImage.style.height="40%":this.animImage.style.height="70%",this.animImage.style.border="0",this.animImage.style.position="absolute",this.animImage.style.top="10%",this.animImage.style.right="30%",this.animImage.src="../CommonResources/commonImage/IOSFullScreenTip/drag_animation.gif",this.bgGroup.appendChild(this.animImage),this.btnClose=document.createElement("img"),this.btnClose.id="btnClose",this.btnClose.style.width="5%",this.btnClose.style.border="0",this.btnClose.style.position="absolute",this.btnClose.style.top="3%",this.btnClose.style.right="2%",this.btnClose.src="../CommonResources/commonImage/IOSFullScreenTip/close.png",this.btnClose.addEventListener("click",function(){e.removeIOSChromeFullScreenTips()}),this.bgGroup.appendChild(this.btnClose),this.bgGroup.style.visibility="hidden"},e.prototype.showIOSChromeFullScreenTips=function(){"iOS"==egret.Capabilities.os&&(this.bgGroup.style.visibility="visible",this.isIOSChromeFullscreenTipsAlive=!0)},e.prototype.hideIOSChromeFullScreenTips=function(){var e=this;"iOS"==egret.Capabilities.os&&(this.bgGroup.style.visibility="hidden",this.isIOSChromeFullscreenTipsAlive&&egret.setTimeout(function(){egret.updateAllScreens(),e.isIOSChromeFullscreenTipsAlive=!1},this,1e3))},e.prototype.removeIOSChromeFullScreenTips=function(){"iOS"==egret.Capabilities.os&&(this.bgGroup.style.display="none")},e.prototype.onDoubleClickTimeOut=function(e){this.doubleClick-=e},e.prototype.doFullscreenCheck=function(){var e=Math.min(screen.availHeight,screen.availWidth);return window.innerHeight==window.outerHeight?!0:0==window.outerHeight&&window.innerHeight==e?!0:isOverIOS13Safari()?window.innerHeight>=window.outerHeight-20?!0:window.innerHeight=377?!0:void 0:(window.scrollY>0&&window.scrollTo(0,0),!1)},e.prototype.showIOSFullscreenTips=function(){"iOS"==egret.Capabilities.os&&(document.getElementById("iphone-tips").style.visibility="visible")},e.prototype.hideIOSFullscreenTips=function(){"iOS"==egret.Capabilities.os&&(document.getElementById("iphone-tips").style.visibility="hidden")},e.prototype.toShowIOSFullscreenTips=function(){var e=(1.90?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:this.stateController.Start();break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t}(SceneHandler);__reflect(FeatureGameSceneHandler.prototype,"FeatureGameSceneHandler");var ReelSpinAnimationHandler=function(){function e(){}return e.prototype.InitResult=function(){},e.prototype.StartSpin=function(){},e.prototype.PositionUpdate=function(e){},e.prototype.PrepareToStop=function(){},e.prototype.StopSpin=function(e){void 0===e&&(e=!1)},e.prototype.OnReelStop=function(){},e}();__reflect(ReelSpinAnimationHandler.prototype,"ReelSpinAnimationHandler");var FreeGameStateController=function(e){function t(){var t=e.call(this)||this;return t.tempTimeoutID=-1,t}return __extends(t,e),t.prototype.InitFreeReelStrip=function(){var e=new Object;e.classtype=UpdateSlotReelStripEffect;var t=new Object;t.gameMode=SceneType.Free,e.arg=t,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))},t.prototype.Start=function(t){this.InitFreeReelStrip(),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),e.prototype.Start.call(this,t),this.SetInitState(t)},t.prototype.SetInitState=function(e){var t=this.data.nTriggeredAccFreeGame,n=this.data.nPlayedFreeGame+","+t;if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,n)),e){if(this.data.fso){var n=this.data.fsoPlayed+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,n)),SocketManager.getInstance().GetData().SetFSOBetSetting(),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON))}if(1==this.data.waitClient)EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.PreAccFreeAmount)),CommonFunc.log("Free Game Resume"),this.Resume();else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),CommonFunc.log("init Idle");var i=new Object;i.type=MessageType.PressToStart,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}}else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,Math.max(this.data.winAmount,this.data.accumulatedWinAmount)));var i=new Object;i.type=MessageType.FreeGameRemaining,i.current=this.data.nPlayedFreeGame+1,i.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}},t.prototype.Resume=function(){AudioManager.Instance.setBgm(Sound.FreeBGM,!0),this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY))},t.prototype.AddListeners=function(){e.prototype.AddListeners.call(this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_SUMMARY_FINISHED,this.on_win_summary_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().addEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1,1)},t.prototype.RemoveListeners=function(){e.prototype.RemoveListeners.call(this),EventCentral.getInstance().removeEventListener(SceneNotify.WIN_SUMMARY_FINISHED,this.on_win_summary_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().removeEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1)},t.prototype.on_button_pressed=function(e){var t=e.data;switch(t){case ButtonType.Start:this.on_start_pressed()}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:if(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),console.log(GameConfig.SYMBOL_DATA),null!=GameConfig.SYMBOL_DATA&&GameConfig.SYMBOL_DATA.length>0&&!GameConfig.demoPanelOn){var e=new SpinDebugInput;e.symbols=GameConfig.SYMBOL_DATA,SocketManager.getInstance().SendFreeActionDebug(e),GameConfig.SYMBOL_DATA=null}else SocketManager.getInstance().SendFreeSpinAction();this.data.nTriggeredAccFreeGame+=this.data.nTriggeredFreeGame,this.data.nTriggeredFreeGame=0,GameConfig.SYMBOL_DATA=null;var t=this.data.nPlayedFreeGame+1+","+this.data.nTriggeredAccFreeGame;this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,t));break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.on_reel_stopped=function(e){this.CheckNextStateAfterReelStop()},t.prototype.on_trigger_animation_finished=function(e){this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.on_special_event_finished=function(e){this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.on_sync_data_ready=function(e){this.data.isWinAmountInclude=!1},t.prototype.on_data_ready=function(e){EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.STOP_ENABLE)),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,this.tempTimeoutID=egret.setTimeout(this.StopSpin,this,16.67)},t.prototype.on_win_summary_finished=function(e){this.data.fso||this.data.fsoPlayed==this.data.fsoCount&&-1!=this.data.fsoPlayed&&-1!=this.data.fsoCount?this.ToFSO():this.ToBaseGame()},t.prototype.StopSpin=function(){egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ENABLE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_SPIN)),GameConfig.isTurboMode&&GameConfig.TurboModeState&&(EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)))},t.prototype.isSpecialEvent=function(){return!1},t.prototype.ShowBigWin=function(e,t,n){void 0===n&&(n=-1),0>n&&(n=t);var i=this.data.lineBet*this.data.denominationList[this.data.denominationId],o=e.toString()+","+t+","+i+","+n;CommonFunc.log("Show big win, type: "+e+", amount: "+t+", credit: "+i+", totalWinAmount: "+n),GameSceneManager.GetInstance().ShowOverlay("BigWin",o)},t.prototype.CheckNextStateAfterReelStop=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.CheckEndState=function(){this.data.IsLastFreeGameFinished()?this.ToState(GameState.Slot_To_Summary):this.ToState(GameState.Slot_End)},t.prototype.stop_bgm=function(e){this.timer.removeEventListener("stop_bgm",this.stop_bgm,this),AudioManager.Instance.stopBgm()},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_To_Summary:return this.StateSummary(),!0;default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}return!1},t.prototype.StateIdle=function(){!GameConfig.isDebugPanelOpened||GameConfig.demoPanelOn?this.on_start_pressed():EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.START_ENABLE))},t.prototype.StateSpinning=function(){var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.nPlayedFreeGame:e.current=this.data.nPlayedFreeGame+1,e.total=this.data.nTriggeredAccFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t.prototype.StateFeatureTriggered=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_TRIGGER_ANIMATION))},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_EFFECT))},t.prototype.StateResultDisplay=function(){if(this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.normal)EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.hasBigWin=!0,this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.mega?this.ShowBigWin(3,this.data.winAmount,this.data.accumulatedWinAmount):this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin["super"]?this.ShowBigWin(2,this.data.winAmount,this.data.accumulatedWinAmount):this.ShowBigWin(1,this.data.winAmount,this.data.accumulatedWinAmount);else{if(GameConfig.TurboModeState&&GameConfig.isTurboMode){var e=new Object;e.classtype=TurboModeNormalWinEffect;var t=new Object;t.winAmount=this.data.winAmount,e.arg=t,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,this.data.accumulatedWinAmount)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE))}EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_RESULT)),GameConfig.TurboModeState&&GameConfig.isTurboMode&&this.data.winAmount=this.Length()&&(t-=this.Length()),this.At(t)},e}();__reflect(ReelStrip.prototype,"ReelStrip");var EffectContainer=function(){function e(){this.effects=new Array}return e.prototype.AddEffect=function(e){this.effects.push(e)},e.prototype.FindEffect=function(e){return this.effects[this.effects.indexOf(e)]},e.prototype.RemoveEffect=function(e){this.effects.indexOf(e)>=0&&this.effects.splice(this.effects.indexOf(e),1)},e.prototype.FindEffectWithClass=function(e){for(var t=0;t=0;n--){var i=this.slotReel.GetQueuedSymbol(n);egret.Tween.removeTweens(i),t=egret.Tween.get(i),t.to({y:i.y+.9*SlotConfig.SLOT_HEIGHT},50)}t.call(this.StartPositionUpdate.bind(this))},t.prototype.StartPositionUpdate=function(){for(var e=this.slotReel.GetQueueOrder(),t=e.length-1;t>=0;t--){var n=this.slotReel.GetQueuedSymbol(t),i=this.GetReelStripIndexWithOffset(t),o=this.reelStrip.At(i);n.SetResult(o)}this.slotReel.addEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this)},t.prototype.PositionUpdate=function(){if(this.isStopped)return!0;var e=egret.getTimer(),t=e-this.previousTime;this.previousTime=e,t=1e3/30;for(var n,i=Math.floor(this.speed*t),o=(Math.floor(i/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),a=o.length-1;a>=0;a--)n=this.slotReel.GetQueuedSymbol(a),n.y+=i;return this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions()),!0},t.prototype.PrepareToStop=function(){this.slotReel.StopSpin(!0)},t.prototype.StopSpin=function(e){void 0===e&&(e=!1);for(var t,n=this.slotReel.GetQueueOrder(),i=n.length-1;i>=0;i--)t=this.slotReel.GetQueuedSymbol(i),egret.Tween.removeTweens(t);this.isPrepareToStop=!1,this.isStopped=!0,this.slotReel.removeEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this);for(var i=0;ii)if(a.yt&&(t=e);a.y=i)for(e=Math.floor((i-a.y)/SlotConfig.SLOT_HEIGHT),t>e&&(t=e);a.y>i;)a.y-=i-n}return this.slotReel.UpdateQueueOrder(),t},t.prototype.UpdateAllSymbolResults=function(e,t){if(void 0===t&&(t=0),0!=e){var n;if(this.OffsetReelStrip(e),e>0){var i=Math.max(0,this.slotReel.nSymbol-e);n=e;for(var o=i;o=0;r--){var a=this.slotReel.GetQueuedSymbol(r);this.UpdateSymbolResult(a,r,n,t)}}}},t.prototype.UpdateSymbolResult=function(e,t,n,i){void 0===i&&(i=0);var o=i>0;if(o)e.SetResult(i);else{var a=(this.currentReelStripIdx+t)%this.reelStrip.Length(),r=this.reelStrip.At(a);e.SetResult(r)}},t.prototype.GetReelStripIndexWithOffset=function(e){return e%=this.reelStrip.Length(),(this.currentReelStripIdx+e+this.reelStrip.Length())%this.reelStrip.Length()},t.prototype.OffsetReelStrip=function(e){this.currentReelStripIdx=this.GetReelStripIndexWithOffset(e)},t}(ReelSpinAnimationHandler);__reflect(SimpleSpinningReelAnimationHandler.prototype,"SimpleSpinningReelAnimationHandler",["SpinningReelValidator"]);var FreeGameSceneHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[RESGroupKey.UIPanelCommon,GameConfig.platform==Platform.desktop?this.LoadUIPanel():this.LoadUIPanelMobile(),GameConfig.platform==Platform.desktop?this.LoadSlotSceneCommon():this.LoadSlotSceneCommonMobile(),GameConfig.platform==Platform.desktop?RESGroupKey.BaseGame:RESGroupKey.BaseGameMobile,GameConfig.platform==Platform.desktop?this.LoadFreeGameGroup():this.LoadFreeGameMobileGroup(),GameConfig.platform==Platform.desktop?this.LoadJackpotWinNotice():this.LoadJackpotWinNotice(),GameConfig.platform==Platform.desktop?this.LoadFSOPrizeWinNotice():this.LoadFSOPrizeWinNotice()]},t.prototype.LoadUIPanel=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.UIPanelEng;case Language.SimplifiedChinese:return RESGroupKey.UIPanelCn;case Language.TraditionalChinese:return RESGroupKey.UIPanelZh;case Language.Korean:return RESGroupKey.UIPanelKr;case Language.Japanese:return RESGroupKey.UIPanelJp;case Language.Thai:return RESGroupKey.UIPanelTh;case Language.Vietnam:return RESGroupKey.UIPanelVi;case Language.Indonesia:return RESGroupKey.UIPanelId}},t.prototype.LoadUIPanelMobile=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.UIPanelMobileEng;case Language.SimplifiedChinese:return RESGroupKey.UIPanelMobileCn;case Language.TraditionalChinese:return RESGroupKey.UIPanelMobileZh;case Language.Korean:return RESGroupKey.UIPanelMobileKr;case Language.Japanese:return RESGroupKey.UIPanelMobileJp;case Language.Thai:return RESGroupKey.UIPanelMobileTh;case Language.Vietnam:return RESGroupKey.UIPanelMobileVi;case Language.Indonesia:return RESGroupKey.UIPanelMobileId}},t.prototype.LoadFreeGameGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameZh;case Language.Korean:return RESGroupKey.FreeGameKr;case Language.Japanese:return RESGroupKey.FreeGameJp;case Language.Thai:return RESGroupKey.FreeGameTh;case Language.Vietnam:return RESGroupKey.FreeGameVi;case Language.Indonesia:return RESGroupKey.FreeGameId}},t.prototype.LoadFreeGameMobileGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameMobileEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameMobileCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameMobileZh;case Language.Korean:return RESGroupKey.FreeGameMobileKr;case Language.Japanese:return RESGroupKey.FreeGameMobileJp;case Language.Thai:return RESGroupKey.FreeGameMobileTh;case Language.Vietnam:return RESGroupKey.FreeGameMobileVi;case Language.Indonesia:return RESGroupKey.FreeGameMobileId}},t.prototype.LoadSlotSceneCommon=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.SlotSceneCommonEng;case Language.SimplifiedChinese:return RESGroupKey.SlotSceneCommonCn;case Language.TraditionalChinese:return RESGroupKey.SlotSceneCommonZh;case Language.Korean:return RESGroupKey.SlotSceneCommonKr;case Language.Japanese:return RESGroupKey.SlotSceneCommonJp;case Language.Thai:return RESGroupKey.SlotSceneCommonTh;case Language.Vietnam:return RESGroupKey.SlotSceneCommonVi;case Language.Indonesia:return RESGroupKey.SlotSceneCommonId}},t.prototype.LoadSlotSceneCommonMobile=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.SlotSceneCommonMobileEng;case Language.SimplifiedChinese:return RESGroupKey.SlotSceneCommonMobileCn;case Language.TraditionalChinese:return RESGroupKey.SlotSceneCommonMobileZh;case Language.Korean:return RESGroupKey.SlotSceneCommonMobileKr;case Language.Japanese:return RESGroupKey.SlotSceneCommonMobileJp;case Language.Thai:return RESGroupKey.SlotSceneCommonMobileTh;case Language.Vietnam:return RESGroupKey.SlotSceneCommonMobileVi;case Language.Indonesia:return RESGroupKey.SlotSceneCommonMobileId}},t.prototype.CreateSceneAndController=function(){if(!AssetManager.GetInstance().ContainKey("SlotGameUI")){var e=new SlotConfig.CGameUI;AssetManager.GetInstance().AddAsset("SlotGameUI",e),GameLayer.GetInstance().AddObjectToLayer(e,Layer.Slot)}if(AssetManager.GetInstance().GetAsset("SlotGameUI").visible=!0,!AssetManager.GetInstance().ContainKey("UIController")){var n=new SlotConfig.CUIController;AssetManager.GetInstance().AddAsset("UIController",n),GameLayer.GetInstance().AddObjectToLayer(n,Layer.UI)}if(!AssetManager.GetInstance().ContainKey(t.kSlotController)){this.initializer.InitSlotController();AssetManager.GetInstance().GetAsset("SlotController")}if((GameConfig.gameType==GameType.LineBase||GameConfig.gameType==GameType.FixedLineBase)&&GameConfig.maxNumOfLine>1&&!AssetManager.GetInstance().ContainKey("WinLine")){var e=AssetManager.GetInstance().GetAsset("SlotGameUI"),i=new LineDetail;i.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,i.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("LineDetail",i),e.AddObjectToUI(i,"winEffectLayer");var o=new ParticleWinLineManager;o.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,o.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("WinLine",o),e.AddObjectToUI(o,"winEffectLayer")}null==this.stateController&&(this.stateController=new SlotConfig.CFreeGameStateController)},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.FSO:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Free,this.OnTransitionEnd,this);break;case SceneType.Feature1:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),this.stateController.Start();break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.fromType]+"] to Mode:["+SceneType[this.sceneType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t.prototype.createBitmapByName=function(e){var t=new egret.Bitmap,n=RES.getRes(e);return t.texture=n,t},t.prototype.OnTransitionEnd=function(){this.stateController.Start()},t.kSlotController="SlotController",t}(SceneHandler);__reflect(FreeGameSceneHandler.prototype,"FreeGameSceneHandler");var ChargingEffect=function(e){function t(){var t=e.call(this)||this;return t.featureSymbolContainingArray=new Array(5),t.validFeatureSymbolArray=new Array(5),t.data=new Object,t.data.ChargingArray=new Array,t}return __extends(t,e),t.prototype.Evaluate=function(){this.data.FeatureSymbolArray=SlotConfig.FeatureSymbolIDs,this.data.ChargingArray=this.CheckFeatureAndCharging(this.data.FeatureSymbolArray),EventCentral.getInstance().addEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().addEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.IsNeed=function(e){return void 0===e&&(e=-1),e>this.data.ChargingArray.length?!1:null!=this.data.ChargingArray&&this.data.ChargingArray[e].length>0?!0:!1},t.prototype.OnReelStartStoppingExecute=function(e){null!=this.chargingChannel?this.chargingChannel.stop():AudioManager.Instance.stopSound(Sound.Charging);var t=this.slotController.slotView.GetStopReelOrderByReelId(e.data);t++,t>=this.slotController.slotView.reelCount||this.IsNeed(t)&&this.Execute(t,"")},t.prototype.OnReelStopExecute=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.Execute=function(e,t){this.chargingChannel=AudioManager.Instance.playSound(Sound.Charging),this.slotController.slotView.GetStopReelOrderedReel(e).effectHandler.ExecuteEffect(SlotEffectCollection.charging,t)},t.prototype.Clear=function(t){e.prototype.Clear.call(this,t),this.slotController.slotView.GetStopReelOrderedReel(t).effectHandler.ClearEffect(SlotEffectCollection.charging)},t.prototype.CheckFeatureAndCharging=function(e){var t,n,i,o;this.data.ChargingArray=new Array(5);var a=this.data.ChargingArray;for(t=0;t1&&a[t].push(e[i]),n=0;n0?(n=a,t="major"):r>0?(n=r,t="minor"):s>0&&(n=s,t="mini"),SlotConfig.JackpotWinData.push({key:t,name:i,totalAmount:n}),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_JACKPOT_WINNING_NOTICE))},t.prototype.onSpSimplayCampaignList=function(e){if(CommonFunc.log("onSpSimplayCampaignList"),CommonFunc.log("CMDSpSimplayCampaignList"+e.CampaignList),CommonFunc.log("CMDSpSimplayCampaignList"+e.CampaignList.length),e.CampaignList.length>0){var t=new CampaignDetailOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("CampaignDetail",t),GameConfig.IsCampaignEnable=!0,this.data.campaignList=e.CampaignList,CommonFunc.log(" this.data.campaignList.CampaignID"+this.data.campaignList[e.CampaignList.length-1].CampaignID),CommonFunc.log(" this.data.campaignList.Popup"+this.data.campaignList[e.CampaignList.length-1].Popup),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_CAMPAIGN_BUTTON))}},t.prototype.onSpSimplayCampaignDetail=function(e){egret.clearTimeout(this.campaignDetailTimeoutTimer),this.campaignDetailTimeoutTimer=-1,this.data.campaignInvolvedGamesData=e.EGameList,EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.CAMPAIGN_DETAIL_RECEIVED))},t.prototype.onSpSimplayCampaignWinnerList=function(e){egret.clearTimeout(this.campaignWinnerListTimeoutTimer),this.campaignWinnerListTimeoutTimer=-1,this.data.campaignWinnerListData=e.WinnerList,CommonFunc.log("onSpSimplayCampaignWinnerList WinnerList"+e.WinnerList),EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.CAMPAIGN_WINNERLIST_RECEIVED))},t.prototype.SendRequestCampaignDetailAction=function(e){if(this.isSendCustomAction=!0,this.isCampaignDetailReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected())return SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect();this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,this.isCampaignDetailReconnect=!1,this.isSendCustomAction=!1;var t=new CMDPsCampaignDetail;t.CampaignID=e,t.PlayerID=SocketManager.getInstance().GetData().playerID,this._net.send(t),this.campaignDetailTimeoutTimer=egret.setTimeout(this.onCampaignDetailTimerComplete,this,1e4)},t.prototype.SendRequestCampaignWinnerListAction=function(e){if(this.isSendCustomAction=!0,this.isCampaignWinnerListReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected())return SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect();this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,this.isCampaignWinnerListReconnect=!1,this.isSendCustomAction=!1;var t=new CMDPsCampaignWinner;t.CampaignID=e,t.PlayerID=SocketManager.getInstance().GetData().playerID,this._net.send(t),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.REQUESTING_CAMPAIGN_WINNERLIST)),this.campaignWinnerListTimeoutTimer=egret.setTimeout(this.onCampaignWinnerListTimerComplete,this,1e4)},t.prototype.onSpCampaignNotice=function(e){var t,n=e.PlayerName,i=e.Prize,o=(e.Type,e.Value);switch(i){case 1:t="1st";break;case 2:t="2nd";break;case 3:t="3rd";break;case 4:t="4th"}SlotConfig.JackpotWinData.push({key:t,name:n,totalAmount:o}),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_JACKPOT_WINNING_NOTICE))},t.prototype.onSpSimplayFsoEventList=function(e){255==e.Result&&(SocketManager.getInstance().GetData().SetFSOEventList(e.EventList),SocketManager.getInstance().GetData().fsoEventListPopup=e.Popup,EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.SHOW_GIFTBOX)),EventCentral.getInstance().dispatchEvent(new egret.Event(SysNotify.FSO_EVENTLIST_RECEIVED)),GameConfig.isFSOOverlayOpened&&(0==e.EventList.length?(CommonFunc.ShowMessage(Localization.Instance.getString("common.freeSpinOffer.fso_redeem_page_updated_withoutGame"),!1),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.HIDE_FSO_REDEEM_PAGE))):(CommonFunc.ShowMessage(Localization.Instance.getString("common.freeSpinOffer.fso_redeem_page_updated"),!1),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.HIDE_FSO_REDEEM_PAGE)))))},t.prototype.onSpSimplayFsoEventDetail=function(e){if(console.log("Received on Sp SimplayFsoEventDetail"),255==e.Result)if(GameConfig.checkingFSOEventValid){for(var t=0;t0?e=this.data.statusInit:e==SlotAction.Free?0!=this.data.nRemainingFreeGame||0!=this.data.nFreeGame&&this.data.nFreeGame||(e=0):this.data.nRemainingFreeGame>0&&(e=1)),e},t.prototype.onSpInitSlot=function(e){if(this._retryTimes=0,SocketManager.getInstance().isWaitingForBalanceUpdate||this.ReadInitPacket(e),SocketManager.getInstance().isReconnecting){if(SocketManager.getInstance().isReconnecting=!1,SocketManager.getInstance().isWaitingForBalanceUpdate){var t=JSON.parse(e.UnknownData);return void 0!=t[JSONTag.WaitClient]&&(this.data.waitClient=t[JSONTag.WaitClient]),1==this.data.waitClient&&(this.SendActionDone(),this.data.waitClient=0),SocketManager.getInstance().isActionPending&&(SocketManager.getInstance().isActionPending=!1,this.ResendAction()),void(SocketManager.getInstance().isStarted=!0)}return SocketManager.getInstance().isWaitingForResponse?(SocketManager.getInstance().isWaitingForResponse=!1,0==this.data.waitClient?(this.ResendAction(),void(SocketManager.getInstance().isStarted=!0)):(egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,this.data.waitClient=0,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY)),void(SocketManager.getInstance().isStarted=!0))):(1==this.data.waitClient&&(this.SendActionDone(),this.data.waitClient=0),SocketManager.getInstance().isBetLogReconnect||SocketManager.getInstance().isFSORedeemReconnect||SocketManager.getInstance().isRankingReconnect||this.isSendCustomAction||this.ResendAction(),SocketManager.getInstance().isBetLogReconnect&&this.SendBetQuery(this.betlogFromDate,this.betlogToDate),SocketManager.getInstance().isRankingReconnect&&this.SendRankingListRequest(this.rankingReconnect[0],this.rankingReconnect[1]),this.isCampaignDetailReconnect&&this.SendRequestCampaignDetailAction(this.data.campaignList[this.data.campaignList.length-1].CampaignID),this.isCampaignWinnerListReconnect&&this.SendRequestCampaignWinnerListAction(this.data.campaignList[this.data.campaignList.length-1].CampaignID),void(SocketManager.getInstance().isStarted=!0))}SocketManager.getInstance().isStarted=!0,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.INIT_DATA_READY)),FesEventController.getInstance().Init(),FesConstant.FES_ENABLE&&FesEventController.getInstance().StartRequest() },t.prototype.onSpSlotAction=function(e){SocketManager.getInstance().isReconnecting||(CommonFunc.log("data recieved"),SocketManager.getInstance().isWaitingForResponse=!1,this._retryTimes=0,this.ReadPacket(e),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY)))},t.prototype.onSpSlotJackpot=function(e){this.data.majorJackpot=e.Jackpot.MajorJP,this.data.minorJackpot=e.Jackpot.MinorJP,this.data.miniJackpot=e.Jackpot.MiniJP,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.JACKPOT_DATA_READY))},t.prototype.onScSyncData=function(e){(!SocketManager.getInstance().isStarted||SocketManager.getInstance().IsConnected())&&(SocketManager.getInstance().isWaitingForBalanceUpdate=!1,this.ReadBalancePacket(e),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.SYNC_DATA_READY)))},t.prototype.onSpSlotError=function(e){CommonFunc.ShowMessage(Localization.Instance.translateErrorMsg(StringUtil.SearchErrorCodeInJson(50037),e.Error),!0)},t.prototype.onShGameServerKick=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.SysError(50026))},t.prototype.onPlayerBeDisabled=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.SysError(50067))},t.prototype.onShGameProcessingFail=function(e){switch(e.errorCode){case 94:this.ResendAction();break;case 95:this.SendActionDone(),this.ResendAction();break;case 114:case 76:this._retryTimes>=GameConfig.MaxRetryTimes?(this.data.errorCode=e.errorCode,EventCentral.getInstance().dispatchEvent(SysNotify.SysError(e.errorCode))):(this._retryTimes++,this.ResendAction());break;default:this.data.errorCode=e.errorCode,EventCentral.getInstance().dispatchEvent(SysNotify.SysError(e.errorCode))}},t.prototype.onSpTokenRequest=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.TOKEN_READY,e))},t.prototype.ReadPacket=function(e){var t=e;if(null!=t.Jackpot){var n=t.Jackpot;n.MajorJP>0?(this.data.jackpotType=1,this.data.jackpotAmount=n.MajorJP):n.MinorJP>0?(this.data.jackpotType=2,this.data.jackpotAmount=n.MinorJP):n.MiniJP>0?(this.data.jackpotType=3,this.data.jackpotAmount=n.MiniJP):(this.data.jackpotType=0,this.data.jackpotAmount=0)}this.data.betID=t.BetID,this.ReadData(t.UnknownData)},t.prototype.ReadData=function(e){var t=JSON.parse(e);this._setGameData(t),this.data.fso||(void 0!==t[JSONTag.DenominationId]&&(this.data.denominationId=t[JSONTag.DenominationId]),(this.data.denominationId>=this.data.denominationList.length||this.data.denominationId<0)&&(this.data.denominationId=0),void 0!==t[JSONTag.LineBet]&&(this.data.lineBet=t[JSONTag.LineBet]),this.data.lineBet=Math.min(this.data.lineBet,10),this.data.lineBet=Math.max(this.data.lineBet,0),GameConfig.gameType!=GameType.WayBase&&(null!=t[JSONTag.BetLineNum]&&(this.data.nBetLine=parseInt(t[JSONTag.BetLineNum])),(this.data.nBetLine<=0||this.data.nBetLine>GameConfig.maxNumOfLine)&&(this.data.nBetLine=GameConfig.maxNumOfLine)),GameConfig.gameType==GameType.DirectionalWayBase&&null!=t[JSONTag.BetDirection]&&this.data.direction.SetDirection(parseInt(t[JSONTag.BetDirection])))},t.prototype.ReadInitPacket=function(e){var t=e;if(this.data.playerID=t.PlayerID,this.data.betID=t.BetID,this.data.NoChanceJackpot=1==t.NoChanceJackpot,this.data.lobbyCode=t.LobbyCode,this.data.isCW=t.IsCommonWallet,this.data.currencyName=t.CurrencyName,""!=t.UnsettleEGameList&&(this.data.unsettledEGamesList=t.UnsettleEGameList.split(",")),null!=t.Jackpot){var n=t.Jackpot;n.MajorJP>0?(this.data.jackpotType=1,this.data.jackpotAmount=n.MajorJP):n.MinorJP>0?(this.data.jackpotType=2,this.data.jackpotAmount=n.MinorJP):n.MiniJP>0?(this.data.jackpotType=3,this.data.jackpotAmount=n.MiniJP):(this.data.jackpotType=0,this.data.jackpotAmount=0)}SocketManager.getInstance().isReconnecting||GameConfig.slotGameInitializer.SetLobby(t.LobbyCode),this.ReadInitData(t.UnknownData)},t.prototype.ReadInitData=function(e){var t=JSON.parse(e);if(void 0!=t[JSONTag.Status]&&(this.data.statusInit=t[JSONTag.Status]),void 0!=t[JSONTag.WaitClient]&&(this.data.waitClient=t[JSONTag.WaitClient]),void 0!=t[JSONTag.DenominationType]&&(this.data.denominationType=t[JSONTag.DenominationType]),void 0!=t[JSONTag.DenominationList]){var n,i=t[JSONTag.DenominationList],o=[];for(n=0;n=this.data.denominationList.length||this.data.denominationId<0)&&(this.data.denominationId=0),void 0!==t[JSONTag.LineBet]&&(this.data.lineBet=t[JSONTag.LineBet]),this.data.lineBet=Math.min(this.data.lineBet,10),this.data.lineBet=Math.max(this.data.lineBet,0),GameConfig.gameType!=GameType.WayBase&&(null!=t[JSONTag.BetLineNum]&&(this.data.nBetLine=parseInt(t[JSONTag.BetLineNum])),(this.data.nBetLine<=0||this.data.nBetLine>GameConfig.maxNumOfLine)&&(this.data.nBetLine=GameConfig.maxNumOfLine)),GameConfig.gameType==GameType.DirectionalWayBase&&null!=t[JSONTag.BetDirection]&&this.data.direction.SetDirection(parseInt(t[JSONTag.BetDirection]))),this._setGameData(t)},t.prototype._setGameData=function(e){var t=[];if(void 0!=e[JSONTag.Symbol]){if("string"==typeof e[JSONTag.Symbol]){this.isIntArray=!1;var n=e[JSONTag.Symbol];t=SymbolResultConverter.CharStringToIntArray(n)}else{this.isIntArray=!0;for(var i in e[JSONTag.Symbol])t[i]=e[JSONTag.Symbol][i]}this.data.slotSymbols=t}if(t=[],void 0!=e[JSONTag.SymbolExt])if("string"==typeof e[JSONTag.SymbolExt].T){var o=e[JSONTag.SymbolExt].T,a=e[JSONTag.SymbolExt].B;t[1]=SymbolResultConverter.CharStringToIntArray(o),t[0]=SymbolResultConverter.CharStringToIntArray(a)}else{var r=e[JSONTag.SymbolExt].T,s=e[JSONTag.SymbolExt].B;t[0]=[],t[1]=[];for(var l=0;5>l;l++)t[1][l]=parseFloat(r[l]),t[0][l]=parseFloat(s[l])}else this.data.slotSymExts=new Array,t[0]=[3,7,9,5,7],t[1]=[3,7,9,5,7];this.data.slotSymExts=t,void 0!==e[JSONTag.NextAction]?this.data.nextAction=e[JSONTag.NextAction]:this.data.nextAction=-1,void 0!==e[JSONTag.WinAmount]&&(this.data.winAmount=e[JSONTag.WinAmount]),void 0!==e[JSONTag.FrAccuAmount]&&(this.data.frAccAmount=e[JSONTag.FrAccuAmount]),void 0!==e[JSONTag.GameTypeTrigger]?this.data.triggeredType=e[JSONTag.GameTypeTrigger]:this.data.triggeredType=BonusType.None,void 0!==e[JSONTag.AccuAmount]?this.data.accumulatedWinAmount=e[JSONTag.AccuAmount]:this.data.accumulatedWinAmount=BonusType.None,void 0!==e[JSONTag.FrTriggerNum]?this.data.nTriggeredFreeGame=e[JSONTag.FrTriggerNum]:this.data.nTriggeredFreeGame=0,void 0!==e[JSONTag.FrTriggerAcc]?this.data.nTriggeredAccFreeGame=e[JSONTag.FrTriggerAcc]:this.data.nTriggeredAccFreeGame=0,void 0!==e[JSONTag.FrPlayedNum]?this.data.nPlayedFreeGame=e[JSONTag.FrPlayedNum]:this.data.nPlayedFreeGame=0,void 0!==e[JSONTag.FrMultiplier]?this.data.resultMultiplier=e[JSONTag.FrMultiplier]:this.data.resultMultiplier=1,void 0!==e[JSONTag.FrSpinCount]?this.data.nFreeSpinCount=e[JSONTag.FrSpinCount]:this.data.nFreeSpinCount=0,void 0!==e[JSONTag.FrRemainNum]?this.data.nRemainingFreeGame=e[JSONTag.FrRemainNum]:this.data.nRemainingFreeGame=0,void 0!==e[JSONTag.FrMeter]?this.data.nFreeGame=e[JSONTag.FrMeter]:this.data.nFreeGame=0,void 0!==e[JSONTag.FrDepth]?this.data.gameLevel=e[JSONTag.FrDepth]:this.data.gameLevel=0,void 0!==e[JSONTag.FeAccuAmount]?this.data.featureAccumulatedAmount=e[JSONTag.FeAccuAmount]:this.data.featureAccumulatedAmount=0,void 0!==e[JSONTag.NextSpinFSO]?this.data.fso=e[JSONTag.NextSpinFSO]:this.data.fso=!1,void 0!==e[JSONTag.FSOSpinCount]?this.data.fsoCount=e[JSONTag.FSOSpinCount]:this.data.fsoCount=-1,void 0!==e[JSONTag.FSOSpinPlayed]?this.data.fsoPlayed=e[JSONTag.FSOSpinPlayed]:this.data.fsoPlayed=-1,void 0!==e[JSONTag.FSOAccumulatedWin]?this.data.fsoAccumulatedWin=e[JSONTag.FSOAccumulatedWin]:this.data.fsoAccumulatedWin=-1,void 0!==e[JSONTag.FSOEventName]?this.data.fsoName=e[JSONTag.FSOEventName]:this.data.fsoName="",null!=this._winInfoParser&&(this.data.winInfo=this._winInfoParser.ParseWinInfo(e))},t.prototype.ReadTokenPacket=function(e){var t=e;GameConfig.token=t.Token},t.prototype.ReadBalancePacket=function(e){var t=e,n=t.Field;this.data.balance,this.data.betPending;for(var i in n){var o=n[i].Index,a=n[i].Value;o==GameConfig.DataValidityFieldID?GameConfig.isSyncDataValid=1==a:o==GameConfig.LowBalanceFieldID?this.data.loBal=a:o==GameConfig.HighBalanceFieldID?this.data.hiBal=a:o==GameConfig.LowBetPendingFieldID?this.data.loPed=a:o==GameConfig.HighBetPendingFieldID?this.data.hiPed=a:o==GameConfig.isShowInGameLobbyID&&(StringUtil.getParameterByName("inum")?GameConfig.isMiniLobbyEnabled=!1:GameConfig.isMiniLobbyEnabled=(512&a)>0)}if(GameConfig.isSyncDataValid){console.log("Valid SyncData");var r=this.data.hiBal*Math.pow(2,32),s=this.data.hiPed*Math.pow(2,32);this.data.hiBal>=2147483648?this.data.balance=r|this.data.loBal:this.data.balance=r+this.data.loBal,this.data.hiPed>=2147483648?this.data.betPending=s|this.data.loPed:this.data.betPending=s+this.data.loPed}},t.prototype.ReadErrorPacket=function(e){var t=e;this.data.errorCode=t.errorCode},t.prototype.ReadJackpotPacket=function(e){var t=e,n=t.Jackpot.MajorJP,i=t.Jackpot.MinorJP,o=t.Jackpot.MiniJP;this.data.majorJackpot=n,this.data.minorJackpot=i,this.data.miniJackpot=o},t.prototype.SendRequestTokenAction=function(e){var t=Command.getCommand(55028);t.GameCode=e,t.Language=this.getLanguageString(),t.GenFor=LoginTokenGenFor.InGameTransferLogin,this._net.send(t)},t.prototype.getLanguageString=function(){switch(Localization.Instance.currentLanguage){case Language.SimplifiedChinese:return"ZH_CN";case Language.English:return"EN";case Language.TraditionalChinese:return"ZH_TW";case Language.Korean:return"KR";case Language.Japanese:return"JP";case Language.Thai:return"TH";case Language.Vietnam:return"VN";case Language.Indonesia:return"ID";default:return"EN"}},t.prototype.ResendAction=function(){this.isResend=!0,this.SendAction(this._previousAction,this._betSource,this._previousInput)},t.prototype.SendAction=function(e,t,n){if(void 0===n&&(n=null),!this.isResend){var i=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.Timeout,this,i)}this.data.waitClient=0;var o=new CMDPsSlotAction;o.Action=e%SlotAction.DebugAction,o.BetSource=t,this._betSource=t;var a=new Object;if(this._previousAction=e,this._previousInput=n,this.CreateJsonObject(a,e,n),SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected())return SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect();var r=JSON.stringify(a);CommonFunc.log("PsAction "+r);var s=new egret.ByteArray;s.endian=egret.Endian.LITTLE_ENDIAN,s.position=0,BitwiseUtil.writeString(s,r),s.position=0,o.UnknownData=s,this._net.send(o),this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!0,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1},t.prototype.CheckTimeout=function(){SocketManager.getInstance().IsConnected()?SocketManager.getInstance().isWaitingForBalanceUpdate=!0:(SocketManager.getInstance().isWaitingForBalanceUpdate=!0,SocketManager.getInstance().Reconnect())},t.prototype.Timeout=function(){CommonFunc.log("SendAction Timeout."),SocketManager.getInstance().isStarted=!1,SocketManager.getInstance().ForceClose()},t.prototype.SendActionDone=function(){if(0!=this.data.triggeredType){if(!SocketManager.getInstance().IsConnected())return}else if(this.data.IsFreeGame()){if(-1==this.data.nextAction){if(this.data.IsLastFreeGameFinished()&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return}else if(0==this.data.nextAction&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return}else if(-1==this.data.nextAction){if(!this.data.IsFreeGameTriggered()&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return}else if(0==this.data.nextAction&&(this.CheckTimeout(),!SocketManager.getInstance().IsConnected()))return;var e=new CMDPsSlotActionDone;this._net.send(e)},t.prototype.SendDebugJackpot=function(e){var t=new CMDPsEgameDebugJackpot;t.JackpotType=e,this._net.send(t)},t.prototype.CreateJsonObject=function(e,t,n){switch(void 0===n&&(n=null),t){case SlotAction.Spin:this.CreateSpinJSONData(e);break;case SlotAction.Free:case SlotAction.Free2:var i=n;this.CreateFreeSpinJSONData(e,i);break;case SlotAction.Feature1:var o=n;this.CreateFeatureJSONData(e,o);break;case SlotAction.DebugFeature1:var a=n;this.CreateDebugFeatureJSONData(e,a);break;case SlotAction.DebugSpin:var r=n;this.CreateDebugSpinJSONData(e,r);break;case SlotAction.DebugFree:case SlotAction.DebugFree2:r=n,this.CreateDebugSpinJSONData(e,r)}},t.prototype.AddCommonJSONData=function(e){e[JSONTag.GameCode]=GameConfig.GameCode,e[JSONTag.DenominationId]=String(this.data.denominationId),e[JSONTag.LineBet]=String(this.data.lineBet),e[JSONTag.GmGambleAct]="-1",e[JSONTag.Feature1SelectionId]="-1",e[JSONTag.Feature2SelectionId]="-1",GameConfig.gameType==GameType.DirectionalWayBase&&(e[JSONTag.BetDirection]=this.data.direction.GetDirection())},t.prototype.CreatePSSlotDebugJackpot=function(e){var t=Command.getCommand(55027);return t.JackpotType=e,t},t.prototype.CreateSpinJSONData=function(e){this.AddCommonJSONData(e)},t.prototype.CreateFreeSpinJSONData=function(e,t){void 0===t&&(t=null),this.AddCommonJSONData(e),null!=t&&-1!=t.selectionId&&(e[JSONTag.FrSymbolSelected]=t.selectionId)},t.prototype.CreateDebugSpinJSONData=function(e,t){if(this.AddCommonJSONData(e),GameConfig.isScreenBased){var n,i=[],o=t.symbols.length;for(n=0;o>n;n++){var a=t.symbols[n];if("object"==typeof a[0])for(var r=0;rn;n++)s.push(String(t.symbols[n]));this.isIntArray?e[JSONTag.ExpectedSymbol]=s:e[JSONTag.ExpectedSymbol]=SymbolResultConverter.IntArrayToCharString(s)}},t.prototype.CreateFeatureJSONData=function(e,t){this.AddCommonJSONData(e);var t=t;-1!=t.featureSelectCharacter?e[JSONTag.CharacterSelectID]=t.featureSelectCharacter:e[JSONTag.Feature1SelectionId]=t.featureSelectionID},t.prototype.CreateDebugFeatureJSONData=function(e,t){this.AddCommonJSONData(e);var t=t;-1!=t.featureSelectCharacter?e[JSONTag.CharacterSelectID]=t.featureSelectCharacter:(e[JSONTag.Feature1SelectionId]=t.featureSelectionID,e[JSONTag.ExpectedF1Result]=t.featureExpectResult)},t.prototype.SendBetQuery=function(e,t){var n=new CMDPsBetLogQuery;return n.FromDate=e,n.ToDate=t,this.betlogFromDate=e,this.betlogToDate=t,SocketManager.getInstance().isBetLogReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected()?SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect():(this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,SocketManager.getInstance().isBetLogReconnect=!1,void this._net.send(n))},t.prototype.SendRankingListRequest=function(e,t){var n=new CMDPsRankingList;return n.RankingType=e,n.GameCategory=t,this.rankingReconnect=[e,t],SocketManager.getInstance().isRankingReconnect=!0,SocketManager.getInstance().isStarted&&!SocketManager.getInstance().IsConnected()?SocketManager.getInstance().isReconnecting?void(SocketManager.getInstance().isActionPending=!0):void SocketManager.getInstance().Reconnect():(this.isResend=!1,SocketManager.getInstance().isWaitingForResponse=!1,SocketManager.getInstance().isWaitingForBalanceUpdate=!1,SocketManager.getInstance().isActionPending=!1,SocketManager.getInstance().isRankingReconnect=!1,void this._net.send(n))},t.prototype.onCampaignDetailTimerComplete=function(){egret.clearTimeout(this.campaignDetailTimeoutTimer),this.campaignDetailTimeoutTimer=-1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.CAMPAIGN_DETAIL_TIMEOUT))},t.prototype.onCampaignWinnerListTimerComplete=function(){egret.clearTimeout(this.campaignWinnerListTimeoutTimer),this.campaignWinnerListTimeoutTimer=-1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.CAMPAIGN_WINNERLIST_TIMEOUT))},t.LOW_BANLANCE=7,t.HIGH_BANLANCE=8,t.LOW_BET_PENDING=9,t.HIGH_BET_PENDING=10,t}(egret.EventDispatcher);__reflect(SlotActionManager.prototype,"SlotActionManager");var SlotData=function(){function e(){this.balance=-1,this.betPending=0,this.hiBal=0,this.loBal=0,this.hiPed=0,this.loPed=0,this.isCW=0,this.direction=new BetDirection,this.unsettledEGamesList=[],this.isWinAmountInclude=!1,this.lineBetList=[],this.denominationList=[],this.slotSymbols=[],this.winInfo=[],this.slotSymExts=[],this.freeMeter=0,this.selectionID=-1,this.randomID=-1,this.campaignDetailsData=[],this.campaignWinnerListData=[],this.campaignInvolvedGamesData=[],this.campaignList=[],this.campaignAwardData=[],this.fsoEventListPopup=-1}return e.prototype.GetInitGameMode=function(){switch(this.statusInit){case SceneType.Base:return!this.isNextFSOSpin()&&this.fsoPlayed<=0?SceneType.Base:SceneType.FSO;case SceneType.Free:return this.IsFreeGameCompleted()?!this.isNextFSOSpin()&&this.fsoPlayed<=0?SceneType.Base:SceneType.FSO:SceneType.Free;case SceneType.Feature1:return this.IsFeatureGameCompleted()?SceneType.Free:SceneType.Feature1}return SceneType.Base},e.prototype.isNextFSOSpin=function(){return this.fso},e.prototype.isLastFSOSpin=function(){return this.fsoCount-this.fsoPlayed==0},e.prototype.GetCredit=function(){return this.denominationList[this.denominationId]*this.lineBet},e.prototype.GetTotalBet=function(){return this.nBetLine*this.denominationList[this.denominationId]*this.lineBet},e.prototype.GetFSOTotalBet=function(){return this.nBetLine*this.fsoDenominationValue*this.lineBet},e.prototype.IsBalanceReady=function(){return this.balance>=0},e.prototype.IsEnoughBalance=function(){CommonFunc.log("balance: "+(this.balance-this.betPending)),CommonFunc.log("Total Bet: "+this.GetTotalBet());var e=this.balance-this.betPending;return this.isWinAmountInclude&&(e+=this.IsFreeGameCompleted()?this.accumulatedWinAmount:this.winAmount),e>=this.GetTotalBet()?!0:!1},e.prototype.IsEnoughBalanceMax=function(){var e=this.balance-this.betPending;return this.isWinAmountInclude&&(e+=this.IsFreeGameCompleted()?this.accumulatedWinAmount:this.winAmount),e>=GameConfig.maxNumOfLine*this.denominationList[this.denominationId]*10?!0:!1},e.prototype.SetMaxBet=function(){this.nBetLine=GameConfig.maxNumOfLine,this.lineBet=10},e.prototype.ParseFSODetailJson=function(){var e=JSON.parse(this.fsoDetailJsonString);this.lineBet=e.FSOLB,GameConfig.gameType==GameType.LineBase||GameConfig.gameType==GameType.FixedLineBase?this.nBetLine=e.FSOLN:this.nBetLine=GameConfig.maxNumOfLine,this.fsoDenominationValue=e.FSODV,this.fsoCount=e.FSOC,this.fsoPlayed=e.FSOP,this.fso=e.FSO,this.fsoName=e.FSON},e.prototype.SetFSOBetSetting=function(){GameConfig.gameType==GameType.LineBase||GameConfig.gameType==GameType.FixedLineBase?this.nBetLine=this.fsoLineNumber:this.nBetLine=GameConfig.maxNumOfLine,this.lineBet=this.fsoLineBet},e.prototype.IsFreeGameCompleted=function(){return 0==this.nFreeGame&&this.nPlayedFreeGame==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0&&0==this.waitClient?!0:!1},e.prototype.IsLastFreeGameFinished=function(){return 0==this.nFreeGame&&this.nPlayedFreeGame==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0?!0:!1},e.prototype.IsFreeGame=function(){return this.nTriggeredFreeGame>0||this.nTriggeredAccFreeGame>0?!0:!1},e.prototype.IsFreeGameTriggered=function(){return 0!=this.triggeredType?!0:!1},e.prototype.IsFeatureGameCompleted=function(){return!1},e.prototype.GetTriggerWinInfoIdx=function(){for(var e=new Array,t=0;t0&&e.push(t);return e},e.prototype.IsWinInfoHasPayout=function(e){return this.winInfo[e].GetPayout()>0?!0:!1},e.prototype.GetScreenID=function(){return this.screenID},e.prototype.ResetScreenID=function(){this.screenID=0},e.prototype.IncrementScreenID=function(){this.screenID++},e.prototype.SetLastScreenID=function(){this.screenID=this.GetLastScreenID()},e.prototype.GetLastScreenID=function(){return this.screenDatas.length-1},e.prototype.UpdateCurrentScreenData=function(e){void 0===e&&(e=-1),-1==e&&(e=this.GetLastScreenID()),this.slotSymbols=this.screenDatas[e].slotSymbols,this.winInfo=this.screenDatas[e].winInfo,this.winAmount=this.screenDatas[e].winAmount,this.accumulatedWinAmount=this.screenDatas[e].accumulatedWinAmount,this.triggeredType=this.screenDatas[e].triggerType},e.prototype.CheckInitScreenDatas=function(){for(var e=0;e0&&this.fsoEventDetail.splice(t,1),this.fsoID=-1);EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.SHOW_GIFTBOX))},e.prototype.CheckFSOEventDetailOrder=function(){for(var e=0;e0&&this.gameStateController.ResetFreeGameData(!1),this.gameStateController.balance+=t.accumulatedWinAmount,this.CreateAndReturnPacketWithDelay(30008,.2,this.gameStateController.balance))}},DebugNetSocket.prototype.close=function(){},DebugNetSocket.prototype.destroy=function(){},DebugNetSocket.prototype.CreateAndReturnPacketWithDelay=function(e,t){for(var n=[],i=2;i0&&(t=e[0]);var n=Command.getCommand(30008),i=new CMDField;i.Index=7,i.Value=t;var o=new CMDField;return o.Index=19,o.Value=1,n.Field=[i,o],n},DebugNetSocket.prototype.RandomInitData=function(){var e=DebugResultType.DataWithNoWin+Math.floor(1*Math.random());return JSON.stringify(this.warpInitResult(this.CreateData(e,!1)))},DebugNetSocket.prototype.RandomData=function(){var e=0;if(this.gameStateController.GetState()==LocalDebug.GameState.Base){if(this.gameStateController.GetState()==LocalDebug.GameState.Base&&(this.tempAccumulatedWinAmount=0,this.tempFreeAccumulatedWinAmount=0),this.gameStateController.ResetFreeGameData(),GameConfig.DebugResultType==DebugResultType.DataWithTriggerWin)return GameConfig.DebugResultType=-1,this.gameStateController.ToFree(),e=DebugResultType.DataWithTriggerWin,JSON.stringify(this.CreateData(e,!1));var t=this.gameStateController.ToNextGameStateFromBaseGame();return t==LocalDebug.GameState.Free?(e=DebugResultType.DataWithTriggerWin,JSON.stringify(this.CreateData(e,!1))):(e=this.GetRandomIndex(),GameConfig.DebugResultType>=0&&(e=GameConfig.DebugResultType,GameConfig.DebugResultType=-1),JSON.stringify(this.CreateData(e,!1)))}return e=this.GetRandomIndex(),GameConfig.DebugResultType>=0&&(e=GameConfig.DebugResultType,GameConfig.DebugResultType=-1),JSON.stringify(this.warpFreeResult(this.CreateData(e,!1),e))},DebugNetSocket.prototype.GetRandomIndex=function(){for(var e=Math.floor(5*Math.random()),t=(e+1)*(e+1);0!=Math.floor(Math.random()*t);)e=Math.floor(5*Math.random()),t=(e+1)*(e+1);return e},DebugNetSocket.prototype.CreateData=function(e,t){var n="Create"+DebugResultType[e],i=this[n].bind(this);return"function"==typeof i?(CommonFunc.log(n),i()):"error"},DebugNetSocket.prototype.CreateDataWithNoWin=function(){var e=this.resultArray[DebugResultType.DataWithNoWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithWin=function(){var e=this.resultArray[DebugResultType.DataWithWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithJackpotWin=function(){var e=this.resultArray[DebugResultType.DataWithWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithTriggerWin=function(){var e=this.resultArray[DebugResultType.DataWithTriggerWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithBigWin=function(){var e=this.resultArray[DebugResultType.DataWithBigWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithSuperBigWin=function(){var e=this.resultArray[DebugResultType.DataWithSuperBigWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.CreateDataWithMegaBigWin=function(){var e=this.resultArray[DebugResultType.DataWithMegaBigWin],t=Math.floor(Math.random()*e.length);return this.generateBaseResult(e[t])},DebugNetSocket.prototype.generateBaseResult=function(result){this.tempWinAmount=0;for(var jsonObj=CommonFunc.assign(new Object,result.base),availableSymbolArray=result.s.slice(),sortedSymbolArray=[];availableSymbolArray.length>0;){var rand=Math.floor(Math.random()*availableSymbolArray.length);sortedSymbolArray[sortedSymbolArray.length]=availableSymbolArray[rand],availableSymbolArray.splice(rand,1)}jsonObj.CSB=this.generateSymbolResultStr(jsonObj.CSB,sortedSymbolArray),null!=jsonObj.CSE&&(jsonObj.CSE.T=this.generateSymbolResultStr(jsonObj.CSE.T,sortedSymbolArray),jsonObj.CSE.B=this.generateSymbolResultStr(jsonObj.CSE.B,sortedSymbolArray));var winInfos=jsonObj.CWL;if((GameConfig.gameType==GameType.WayBase||GameConfig.gameType==GameType.DirectionalWayBase)&&(winInfos=jsonObj.CWP),null!=winInfos)for(var i=0;i0?data.freeMeter+=TriggerTimes:data.freeMeter+=jsonObj.CGT>0?1:0}else null!=jsonObj.FTF&&(TriggerTimes>0||jsonObj.CGT>0)&&this.gameStateController.AddFreeSpin(jsonObj.FTF);return jsonObj},DebugNetSocket.prototype.generateScreenResult=function(jsonObj,sortedSymbolArray){this.tempWinAmount=0,jsonObj.CSB=this.generateSymbolResultStr(jsonObj.CSB,sortedSymbolArray),null!=jsonObj.CSE&&(jsonObj.CSE.T=this.generateSymbolResultStr(jsonObj.CSE.T,sortedSymbolArray),jsonObj.CSE.B=this.generateSymbolResultStr(jsonObj.CSE.B,sortedSymbolArray));var winInfos=jsonObj.CWL;if((GameConfig.gameType==GameType.WayBase||GameConfig.gameType==GameType.DirectionalWayBase)&&(winInfos=jsonObj.CWP),null!=winInfos)for(var i=0;i0?(null!=jsonObj.FTF&&this.gameStateController.AddFreeSpin(jsonObj.FTF),!0):!1},DebugNetSocket.prototype.warpInitResult=function(e){var t=CommonFunc.assign(e,this.initJson.base);return t},DebugNetSocket.prototype.warpFreeResult=function(e,t){var n=3;this.gameStateController.IncrementFreeSpinIndex();var i=CommonFunc.assign(e,this.freeJson);i.FSN=this.gameStateController.GetCurrentFreeSpinIndex();var o=0;if(null!=i.FTF&&(o=i.FTF),i.FFC=this.gameStateController.GetFreeGameSpinCount()-o,i.FSC=this.gameStateController.GetTotalFreeSpinPlayed()-o,this.tempFreeAccumulatedWinAmount+=i.CWA,null!=e.SPR){for(var a=0;a0&&(this.animationCount++,this.fullReelWildIndexArray.push(o));this.totalAnimationCount=this.animationCount;var a=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount],r=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount]+1;if(GameConfig.platform==Platform.desktop)switch(this.reelMultiArray[a]){case 2:n="FullReelWildB",i="FullReelWildBLoop",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:n="FullReelWildA",i="FullReelWildALoop",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}else switch(this.reelMultiArray[a]){case 2:n="FullReelWildB_Mobile",i="FullReelWildBLoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:n="FullReelWildA_Mobile",i="FullReelWildALoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}var s=new Object;s.Multiplier=this.reelMultiArray[a];for(var l=this.slotController.slotView.GetStopReelOrderedReel(r),o=1;o0&&s.CurrentSymbol.SetContent(n,i),EventCentral.getInstance().addEventListener(SceneNotify.BIGSYMBOL_ANIMATION_COMPLETED,this.OnAnimationFinished,this),this.slotController.slotView.GetStopReelOrderedReel(r).effectHandler.ExecuteEffect(SlotEffectCollection.fullReelWild,s)},t.prototype.Clear=function(t){e.prototype.Clear.call(this,t),this.slotController.slotView.GetStopReelOrderedReel(t).effectHandler.ClearEffect(SlotEffectCollection.fullReelWild),this.animationCount=0,this.totalAnimationCount=0,this.reelMultiArray=[],this.fullReelWildIndexArray=new Array},t.prototype.NextFullReelWildAnimation=function(){var e="",t="",n=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount],i=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount]+1;if(GameConfig.platform==Platform.desktop)switch(this.reelMultiArray[n]){case 2:e="FullReelWildB",t="FullReelWildBLoop",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:e="FullReelWildA",t="FullReelWildALoop",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}else switch(this.reelMultiArray[n]){case 2:e="FullReelWildB_Mobile",t="FullReelWildBLoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:e="FullReelWildA_Mobile",t="FullReelWildALoop_Mobile",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}var o=new Object;o.Multiplier=this.reelMultiArray[n];for(var a=this.slotController.slotView.GetStopReelOrderedReel(i),r=1;r0&&o.CurrentSymbol.SetContent(e,t),this.slotController.slotView.GetStopReelOrderedReel(i).effectHandler.ExecuteEffect(SlotEffectCollection.fullReelWild,o)},t.prototype.OnAnimationFinished=function(e){this.animationCount--,0==this.animationCount?(EventCentral.getInstance().removeEventListener(SceneNotify.BIGSYMBOL_ANIMATION_COMPLETED,this.OnAnimationFinished,this),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SPECIAL_EVENT_FINISHED))):this.NextFullReelWildAnimation()},t}(Effect);__reflect(FullReelWildEffect.prototype,"FullReelWildEffect");var ScatterOneSecondEffect=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.featureSymbolContainingArray=new Array(5),t.validFeatureSymbolArray=new Array(5),t}return __extends(t,e),t.prototype.Evaluate=function(){this.data.FeatureSymbolArray=new Array,this.data.FeatureSymbolArray=SlotConfig.FeatureSymbolIDs,this.data.ScatterSymbolPosition=new Array,this.data.SoundCount=-1,EventCentral.getInstance().addEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().addEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.IsNeed=function(e){void 0===e&&(e=-1),this.CheckFeatureAndCharging(this.data.FeatureSymbolArray);var t=this.CheckFeatureSymbols(e);return null!=t&&t.length>0?(this.data.ScatterSymbolPosition=t,!0):!1},t.prototype.Execute=function(e,t){void 0===t&&(t=null);this.CheckFeatureSymbols(e);this.data.ScatterSymbolPosition.length>0&&this.data.SoundCount++,this.slotController.slotView.GetStopReelOrderedReel(e).effectHandler.ExecuteEffect(SlotEffectCollection.scatterOneSecond,this.data)},t.prototype.Clear=function(t){e.prototype.Clear.call(this,t),this.slotController.slotView.GetStopReelOrderedReel(t).effectHandler.ClearEffect(SlotEffectCollection.scatterOneSecond),this.data=new Object},t.prototype.OnReelStartStoppingExecute=function(e){var t=this.slotController.slotView.GetStopReelOrderByReelId(e.data);this.IsNeed(t)&&this.Execute(t,"")},t.prototype.OnReelStopExecute=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.ON_STARTSTOPPING,this.OnReelStartStoppingExecute,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPIN_STOPPED,this.OnReelStopExecute,this)},t.prototype.CheckFeatureAndCharging=function(e){var t,n,i,o;this.data.ChargingArray=new Array(5);var a=this.data.ChargingArray;for(t=0;t1&&a[t].push(e[i]),n=0;n0){var e=Math.floor(this.data.jackpotAmount/100),t=this.data.jackpotType.toString()+","+e.toString(),n=new SysNotify(SysNotify.SHOW_RESUME_JACKPOT_POPUP);n.data=t,EventCentral.getInstance().dispatchEvent(n),this.data.jackpotAmount=0,this.data.jackpotType=0}},t.prototype.Resume=function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DATA_READY))},t.prototype.AddListeners=function(){e.prototype.AddListeners.call(this),EventCentral.getInstance().addEventListener(SceneNotify.JACKPOT_FINISHED,this.on_jackpot_finished,this),EventCentral.getInstance().addEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().addEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1,1),EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_FINISHED,this.on_restart_game,this),EventCentral.getInstance().addEventListener(SysNotify.FSO_REDEEMED,this.on_fso_redeemed,this)},t.prototype.RemoveListeners=function(){e.prototype.RemoveListeners.call(this),EventCentral.getInstance().removeEventListener(SceneNotify.JACKPOT_FINISHED,this.on_jackpot_finished,this),EventCentral.getInstance().removeEventListener(SceneNotify.SPECIAL_EVENT_FINISHED,this.on_special_event_finished,this),EventCentral.getInstance().removeEventListener(SysNotify.SYNC_DATA_READY,this.on_sync_data_ready,this),EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.on_data_ready,this,!1),EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_FINISHED,this.on_restart_game,this),EventCentral.getInstance().removeEventListener(SysNotify.FSO_REDEEMED,this.on_fso_redeemed,this)},t.prototype.on_button_pressed=function(e){var t=e.data;switch(t){case ButtonType.Start:this.on_start_pressed()}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction(),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Feature_Idle:this.data.triggeredType==BonusType.Feature1?this.ToFeature1():this.ToFreeGame()}},t.prototype.on_reel_stopped=function(e){this.CheckNextStateAfterReelStopOrJackpotFinished()},t.prototype.on_trigger_animation_finished=function(e){this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_To_Feature_Idle)},t.prototype.on_jackpot_finished=function(e){this.data.jackpotAmount=0,this.CheckNextStateAfterReelStopOrJackpotFinished()},t.prototype.on_special_event_finished=function(e){this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.on_sync_data_ready=function(e){this.data.IsBalanceReady&&this.currentState==SlotReelState.IDLE&&(this.data.IsEnoughBalance()?FesConstant.FES_ENABLE&&FesInfo.INFO_LOADED&&FesInfo.TO_SHOW&&!FesInfo.FINISHED||GameConfig.isOverlayOpened||EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.ENABLE_ALL_BUTTON)):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund"))),this.data.isWinAmountInclude=!1},t.prototype.on_data_ready=function(e){EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.STOP_ENABLE)),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,GameConfig.TurboModeState&&GameConfig.isTurboMode?requestAnimationFrame(this.StopSpin):this.tempTimeoutID=egret.setTimeout(this.StopSpin,this,16.67)},t.prototype.on_fso_redeemed=function(e){this.ToFSO()},t.prototype.on_restart_game=function(e){console.log("After Effect restart game"),this.ToState(GameConfig.previousGameState),GameConfig.previousGameState=-1},t.prototype.stop_bgm=function(e){this.timer.removeEventListener("stop_bgm",this.stop_bgm,this),AudioManager.Instance.stopBgm()},t.prototype.StopSpin=function(){egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ENABLE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_SPIN)),GameConfig.isTurboMode&&GameConfig.TurboModeState&&(EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)))},t.prototype.isSpecialEvent=function(){return!1},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.jackpotAmount>0?this.ToState(GameState.Slot_Jackpot):this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_End)},t.prototype.CheckAndExecuteAutoSpin=function(){0!=GameConfig.autoSpinTimes&&this.data.IsEnoughBalance()?this.on_start_pressed():this.data.IsEnoughBalance()||(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE)))},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_Jackpot:return this.StateJackpot(),!0;case GameState.Slot_To_Feature_Idle:return this.StateFeatureIdle(),!0;default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}return!1},t.prototype.StateIdle=function(){if(this.data.currentGameState=GameState.Slot_Idle,void 0!=FesEventController&&null!=FesEventController&&FesEventController.getInstance().IsFesEventTriggered())return GameConfig.previousGameState=GameState.Slot_Idle,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),void FesEventController.getInstance().CheckIsInfoReady();if(FesEventController.getInstance().RemoveListeners(),this.data.IsBalanceReady()&&!this.data.IsEnoughBalance(),this.data.isNextFSOSpin())return this.ToFSO(),void(GameConfig.isAutoSpin&&(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))));if(EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.ENABLE_ALL_BUTTON)),this.data.isReceivedFSOPrize){CommonFunc.log(" ShowFreeSpinOfferCongratulationPanel");new CampaignAward;this.data.isReceivedFSOPrize=!1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_FSO_CONGRATULATIONPANEL)),SocketManager.getInstance().SendRequestFSOEventListAction(),GameConfig.isAutoSpin&&(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE)))}if(GameConfig.isAutoSpin&&this.CheckAndExecuteAutoSpin(),!this.data.isNextFSOSpin()&&1==this.data.fsoEventListPopup&&this.data.fsoEventList.length>0&&0==GameConfig.isAutoSpin){SocketManager.getInstance().SendFsoNotificationReceived(),CommonFunc.log(" ShowFreeSpinOfferRedeemPage");new FSOPanel}},t.prototype.StateSpinning=function(){this.data.currentGameState=GameState.Slot_Spinning,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var e=new Object;e.type=MessageType.GoodLuck,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t.prototype.StateJackpot=function(){this.ShowJackpot()},t.prototype.StateFeatureTriggered=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_TRIGGER_ANIMATION))},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_EFFECT))},t.prototype.StateResultDisplay=function(){if(this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.normal)EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.hasBigWin=!0,this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin.mega?this.ShowBigWin(3,this.data.winAmount):this.data.winAmount>=this.data.GetTotalBet()*GameConfig.bigwin["super"]?this.ShowBigWin(2,this.data.winAmount):this.ShowBigWin(1,this.data.winAmount);else{if(GameConfig.TurboModeState&&GameConfig.isTurboMode){var e=new Object;e.classtype=TurboModeNormalWinEffect;var t=new Object;t.winAmount=this.data.winAmount,e.arg=t,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,this.data.winAmount)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE))}EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_RESULT)),GameConfig.TurboModeState&&GameConfig.isTurboMode&&this.data.winAmountn&&(n=t);var i=this.data.lineBet*this.data.denominationList[this.data.denominationId],o=e.toString()+","+t+","+i+","+n;CommonFunc.log("Show big win, type: "+e+", amount: "+t+", credit: "+i+", totalWinAmount: "+n),GameSceneManager.GetInstance().ShowOverlay("BigWin",o)},t.prototype.ShowJackpot=function(){var e=this.data.jackpotType.toString()+","+this.data.jackpotAmount;CommonFunc.log("Show Jackpot, amount: "+this.data.jackpotAmount),GameSceneManager.GetInstance().ShowOverlay("Jackpot",e)},t.prototype.CheckTimeout=function(){},t.prototype.ToFreeGame=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Free)},t.prototype.ToFeature1=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Feature1)},t.prototype.ToFSO=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.FSO)},t.prototype.delay_stop_bgm=function(){this.timer=new egret.Timer(5e3,1),this.timer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.stop_bgm,this),this.timer.start()},t}(SlotGameStateController);__reflect(BaseGameStateController.prototype,"BaseGameStateController");var BaseSlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;return a.slotView=o,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,GameConfig.platform==Platform.desktop?a.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_json."+a.currentId.toString())):a.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_Mobile_json."+a.currentId.toString())),a.movieClipSource=SlotConfig.Items[a.currentId.toString()],a.idleMask=t,a.winningMask=n,a.borderMask=i,a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content),null==a.currentSymbol?(console.error("cannot find slot "+a.currentId.toString()),a):(a.visible=!0,a.currentSymbol.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,a.currentSymbol.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,a.currentSymbol.anchorOffsetX=.5*a.currentSymbol.width,a.currentSymbol.anchorOffsetY=.5*a.currentSymbol.height,a.currentSymbol.x=.5*a.width,a.currentSymbol.y=.5*a.height,a.touchEnabled=!1,a.addChild(a.currentSymbol),a)}return __extends(t,e),t.prototype.SetReelId=function(e){this.reelId=e},t.prototype.Fade=function(e,t){var n=egret.Tween.get(this.content);e?n.to({alpha:1},t):n.to({alpha:0},t)},t.prototype.StopReelTween=function(){TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.SetResult=function(e){this.currentId=e;try{this.currentSymbol.parent.removeChild(this.currentSymbol)}catch(t){}this.movieClipSource=SlotConfig.Items[this.currentId.toString()],null!=this.movieClipSource&&(GameConfig.platform==Platform.desktop?this.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_json."+this.currentId.toString())):this.currentSymbol=new egret.Bitmap(RES.getRes("AllSlotSymbol_Mobile_json."+this.currentId.toString())),this.currentSymbol.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.currentSymbol.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.currentSymbol.anchorOffsetX=.5*this.currentSymbol.width,this.currentSymbol.anchorOffsetY=.5*this.currentSymbol.height,this.currentSymbol.x=.5*this.width,this.currentSymbol.y=.5*this.height,this.addChild(this.currentSymbol))},t.prototype.GetResult=function(){return this.currentId},t.prototype.SetOriginPosition=function(e,t){this.x=e,this.y=t,this.posX=e,this.posY=t},t.prototype.PlayAnimation=function(e){return null!=this.content&&(this.content.parent.removeChild(this.content),this.content=null),this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content?void console.error("cannot find slot "+this.currentId.toString()):(this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=this.currentSymbol.anchorOffsetX,this.content.anchorOffsetY=this.currentSymbol.anchorOffsetY,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.currentSymbol.visible=!1,this.addChild(this.content),e&&this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y,void this.content.gotoAndPlay(0))},t.prototype.HitSpecialAnimation=function(e){var t=this;return null!=this.content&&(this.content.parent.removeChild(this.content),this.content=null),this.movieClipSource=SlotConfig.Items[e.toString()],this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content?void console.error("cannot find slot "+e.toString()):(this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=this.currentSymbol.anchorOffsetX,this.content.anchorOffsetY=this.currentSymbol.anchorOffsetY,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.currentSymbol.visible=!1,this.addChildAt(this.content,0),this.winningMask.addChild(this),this.content.gotoAndPlay(0),void(this.newSpecialTimer=setInterval(function(){return t.CheckAnimationFinished()},1e3/30))) },t.prototype.CheckAnimationFinished=function(){this.content.currentFrame==this.content.totalFrames&&(this.currentSymbol.visible=!0,null!=this.content&&(this.content.gotoAndStop(0),this.content.parent.removeChild(this.content),this.content=null),clearInterval(this.newSpecialTimer),this.SetResult(this.currentId))},t.prototype.StopSymbolAnimation=function(){clearInterval(this.newSpecialTimer),this.idleMask.UpdateLayer(this),this.symbolBorder.StopAnimation(),null!=this.content&&(this.content.gotoAndStop(0),this.content.parent.removeChild(this.content),this.content=null),this.currentSymbol.visible=!0},t.prototype.SetValidSymbolIdxRange=function(e,t){this.minIdx=e,this.maxIdx=t},t.prototype.InitContent=function(){},t}(SlotSymbol);__reflect(BaseSlotSymbol.prototype,"BaseSlotSymbol");var DragonBones2SlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;return a.slotView=o,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,a.idleMask=t,a.winningMask=n,a.borderMask=i,SlotConfig.isSymbolBorderExist?(a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content)):a.symbolBorder=null,a.visible=!0,a.backgroundEffect=new Object,a.body=new Object,a.overlayEffect=new Object,a.image=new egret.Bitmap,a.touchEnabled=!1,a.SetResult(a.currentId),a}return __extends(t,e),t.prototype.SetResult=function(e){this.currentId=e,void 0!=this.image.parent&&this.removeChild(this.image);var t;switch(GameConfig.platform==Platform.desktop,t="AllSlotSymbol_Idle_json",this.slotSymbolState){case SlotSymbolState.IDLE:this.image=new egret.Bitmap(RES.getRes(t+"."+SlotConfig.Items[this.currentId].idle)),this.image.visible=!0;break;case SlotSymbolState.ANIMATION:this.image.visible=!1;break;case SlotSymbolState.SPINNING:this.image=new egret.Bitmap(RES.getRes(t+"."+SlotConfig.Items[this.currentId].idle)),this.image.visible=!0}void 0==this.image.parent&&this.addChildAt(this.image,0),this.image.anchorOffsetX=.5*this.image.width,this.image.anchorOffsetY=.5*this.image.height,this.image.scaleX=SlotConfig.SLOT_IDLE_SCALE*GameConfig.ContentScale,this.image.scaleY=SlotConfig.SLOT_IDLE_SCALE*GameConfig.ContentScale,this.image.x=.5*this.width,this.image.y=.5*this.height},t.prototype.GetResult=function(){return this.currentId},t.prototype.PlayAnimation=function(e){this.StopSymbolAnimation(),this.slotSymbolState=SlotSymbolState.ANIMATION,this.winningMask.addChild(this),e&&SlotConfig.isSymbolBorderExist&&(this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y),this.image.visible=!1,""!=SlotConfig.Items[this.currentId].background&&(this.backgroundEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].background),this.backgroundEffect=this.backgroundEffectArmature.display,void 0==this.backgroundEffect.parent&&this.addChildAt(this.backgroundEffect,0),this.backgroundEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations["2s"].background),this.backgroundEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.x=.5*this.width,this.backgroundEffect.y=.5*this.height),this.bodyArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].body),this.body=this.bodyArmature.display,void 0==this.body.parent&&this.addChildAt(this.body,1),this.body.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations["2s"].body),this.body.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.x=.5*this.width,this.body.y=.5*this.height,""!=SlotConfig.Items[this.currentId].overlay&&(this.overlayEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].overlay),this.overlayEffect=this.overlayEffectArmature.display,void 0==this.overlayEffect.parent&&this.addChildAt(this.overlayEffect,2),this.overlayEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations["2s"].overlay),this.overlayEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.x=.5*this.width,this.overlayEffect.y=.5*this.height)},t.prototype.HitSpecialAnimation=function(e){switch(this.StopSymbolAnimation(),this.slotSymbolState=SlotSymbolState.ANIMATION,this.winningMask.addChild(this),this.image.visible=!1,this.animationName="",e){case SymbolType.FourSecScatter:this.currentId=SymbolType.Scatter,this.animationName="4s";break;case SymbolType.FourSecWild:this.currentId=SymbolType.Wild,this.animationName="4s";break;case SymbolType.OneSecScatter:this.currentId=SymbolType.Scatter,this.animationName="1s";break;case SymbolType.OneSecWild:this.currentId=SymbolType.Wild,this.animationName="1s";break;default:this.animationName="2s"}""!=SlotConfig.Items[this.currentId].background&&(this.backgroundEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].background),this.backgroundEffect=this.backgroundEffectArmature.display,void 0==this.backgroundEffect.parent&&this.addChildAt(this.backgroundEffect,0),this.backgroundEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations[this.animationName].background,0,0,1),this.backgroundEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.backgroundEffect.x=.5*this.width,this.backgroundEffect.y=.5*this.height),this.bodyArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].body),this.body=this.bodyArmature.display,void 0==this.body.parent&&this.addChildAt(this.body,1),this.body.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations[this.animationName].body,0,0,1),this.body.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.body.x=.5*this.width,this.body.y=.5*this.height,""!=SlotConfig.Items[this.currentId].overlay&&(this.overlayEffectArmature=DragonBonesManager.getInstance().CreateArmature(SlotConfig.Items[this.currentId].overlay),this.overlayEffect=this.overlayEffectArmature.display,void 0==this.overlayEffect.parent&&this.addChildAt(this.overlayEffect,0),this.overlayEffect.animation.gotoAndPlay(SlotConfig.Items[this.currentId].animations[this.animationName].overlay,0,0,1),this.overlayEffect.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.overlayEffect.x=.5*this.width,this.overlayEffect.y=.5*this.height)},t.prototype.StopReelTween=function(){GameConfig.isTurboMode&&GameConfig.TurboModeState?TweenLite.to(this,.01,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)}):TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){GameConfig.isTurboMode&&GameConfig.TurboModeState?(this.y=this.posY+40,TweenLite.to(this,.2,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})):(this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)}))},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.StopSymbolAnimation=function(){SlotConfig.isSymbolBorderExist&&this.symbolBorder.StopAnimation(),null!=this.backgroundEffect&&(null!=this.backgroundEffect.parent&&(this.removeChild(this.backgroundEffect),this.backgroundEffect=null),this.backgroundEffect=new Object,void 0!=this.backgroundEffectArmature&&(this.backgroundEffectArmature.dispose(),this.backgroundEffectArmature=null)),null!=this.overlayEffect&&(this.overlayEffect.parent==this&&(this.removeChild(this.overlayEffect),this.overlayEffect=null),this.overlayEffect=new Object,void 0!=this.overlayEffectArmature&&(this.overlayEffectArmature.dispose(),this.overlayEffectArmature=null)),null!=this.body&&(this.body.parent==this&&(this.removeChild(this.body),this.body=null),this.body=new Object,void 0!=this.bodyArmature&&(this.bodyArmature.dispose(),this.bodyArmature=null)),this.slotSymbolState=SlotSymbolState.IDLE,this.SetResult(this.currentId)},t}(SlotSymbol);__reflect(DragonBones2SlotSymbol.prototype,"DragonBones2SlotSymbol");var DragonBonesSlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;a.slotView=o,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,a.idleMask=t,a.winningMask=n,a.borderMask=i,a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content),a.visible=!0,a.content=DragonBonesManager.getInstance().CreateArmature("SlotSymbol"),a.sequenceContent=DragonBonesManager.getInstance().CreateArmature("SlotSymbol_seq");var r=a.content.getDisplay();return r.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.x=.5*a.width,r.y=.5*a.height,a.addChild(r),void 0!=a.sequenceContent&&(r=a.sequenceContent.getDisplay(),r.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,r.x=.5*a.width,r.y=.5*a.height,a.addChild(r)),a.touchEnabled=!1,a.SetResult(a.currentId),a}return __extends(t,e),t.prototype.StopReelTween=function(){TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.SetResult=function(e){this.currentId=e,0==SlotConfig.Items[e].isSequence||null==SlotConfig.Items[e].isSequence?(this.content.animation.gotoAndStop(this.currentId.toString()),this.content.getDisplay().visible=!0,void 0!=this.sequenceContent&&(this.sequenceContent.getDisplay().visible=!1),this.currentContent=this.content):(this.sequenceContent.animation.gotoAndStop(this.currentId.toString()),this.content.getDisplay().visible=!1,this.sequenceContent.getDisplay().visible=!0,this.currentContent=this.sequenceContent)},t.prototype.GetResult=function(){return this.currentId},t.prototype.PlayAnimation=function(e){this.currentContent.animation.gotoAndPlay(this.currentId.toString()),e&&this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y},t.prototype.HitSpecialAnimation=function(e){this.winningMask.addChild(this),0==SlotConfig.Items[e].isSequence?(this.content.animation.gotoAndPlay(e.toString(),0,0,1),this.content.getDisplay().visible=!0,void 0!=this.sequenceContent&&(this.sequenceContent.getDisplay().visible=!1),this.currentContent=this.content):(this.sequenceContent.animation.gotoAndPlay(e.toString(),0,0,1),this.content.getDisplay().visible=!1,this.sequenceContent.getDisplay().visible=!0,this.currentContent=this.sequenceContent)},t.prototype.StopSymbolAnimation=function(){this.symbolBorder.StopAnimation();var e=this.currentContent;e.animation.gotoAndStopByFrame(e.animation.lastAnimationName,0)},t}(SlotSymbol);__reflect(DragonBonesSlotSymbol.prototype,"DragonBonesSlotSymbol");var SlotController=function(e){function t(){var t=e.call(this)||this;return t.featureSymbolContainingArray=new Array(5),t.validFeatureSymbolArray=new Array(5),t.previousTime=0,t.timeBuffer=0,t.normalInterval=1e3,t.chargingInterval=2800,t.currentReelIdx=0,t.effectHandler=new SlotEffectHandler(t),t.AddListeners(),t.normalInterval=SlotConfig.SPIN_DUR,t.chargingInterval=SlotConfig.SPIN_DUR_SP,t}return __extends(t,e),t.prototype.AddListeners=function(){e.prototype.AddListeners.call(this),EventCentral.getInstance().addEventListener(SceneNotify.START_SPIN,this.OnSpinStart,this),EventCentral.getInstance().addEventListener(SceneNotify.STOP_SPIN,this.StopSpin,this),EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),EventCentral.getInstance().addEventListener(SysNotify.BET_INFO_UPDATE,this.OnLineInfoUpdate,this),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.OnDataReady,this,!1,0),EventCentral.getInstance().addEventListener(SceneNotify.SHOW_WININFO_ANIMATION,this.OnShowWinningAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,this.StopAllSymbolAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.SHOW_All_RESULT,this.OnShowAllWinningAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.START_TRIGGER_ANIMATION,this.ShowTriggerAnimation,this),EventCentral.getInstance().addEventListener(SceneNotify.PLAY_EFFECT,this.PlayEffect,this)},t.prototype.RemoveListeners=function(){e.prototype.RemoveListeners.call(this),EventCentral.getInstance().removeEventListener(SceneNotify.START_SPIN,this.OnSpinStart,this),EventCentral.getInstance().removeEventListener(SceneNotify.STOP_SPIN,this.StopSpin,this),EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),EventCentral.getInstance().removeEventListener(SysNotify.BET_INFO_UPDATE,this.OnLineInfoUpdate,this),EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.OnDataReady,this),EventCentral.getInstance().removeEventListener(SceneNotify.SHOW_WININFO_ANIMATION,this.OnShowWinningAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,this.StopAllSymbolAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.SHOW_All_RESULT,this.OnShowAllWinningAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.START_TRIGGER_ANIMATION,this.ShowTriggerAnimation,this),EventCentral.getInstance().removeEventListener(SceneNotify.PLAY_EFFECT,this.PlayEffect,this)},t.prototype.ShowAllReels=function(){for(var e=0;en){this.timeBuffer=0,this.slotView.GetStopReelOrderedReel(this.currentReelIdx).PrepareToStop();for(var i=0;ia;a++)this.numOfSignificantSymbols.push(i);else if(i instanceof Object)for(var a=0;a0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Feature1,this.OnTransitionEnd,this);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.OnTransitionEnd=function(){console.log("----------------OnTransitionEnd"),this.HideSlotGameUI(),AssetManager.GetInstance().GetAsset("FeatureGameUI").visible=!0,this.stateController.Start()},t}(FeatureGameSceneHandler);__reflect(FLTypeFeatureGameSceneHandler.prototype,"FLTypeFeatureGameSceneHandler");var FLTypeFreeGameStateController=function(e){function t(){var t=e.call(this)||this;return t.isSpecialEventPlayed=!1,t}return __extends(t,e),Object.defineProperty(t.prototype,"flData",{get:function(){return SocketManager.getInstance().GetData()},enumerable:!0,configurable:!0}),t.prototype.Start=function(t){e.prototype.Start.call(this,t)},t.prototype.SetInitState=function(e){if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,this.GetRemainContent())),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_RETRIGGER,this.GetRetriggerContent())),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_MULTIPLIER,0)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(FLSceneNotify.FEATURE_MYSTERY_TYPE_SELECTED,this.GetSelectedMysteryType())),e){if(this.data.fso){var t=this.data.fsoPlayed+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,t)),SocketManager.getInstance().GetData().SetFSOBetSetting(),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON))}if(1==this.flData.waitClient)CommonFunc.log("Free Game Resume"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount-this.data.winAmount)),this.Resume();else if(this.flData.triggeredType==BonusType.Feature1)CommonFunc.log("to feature idle"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),this.ToState(GameState.Slot_To_Feature_Idle);else if(this.flData.IsFeatureGameRemain()&&!this.flData.IsFreeSpinRemain())console.log("Next",this.flData.nRemainingFreeGame,this.flData.nPlayedFreeGame,this.flData.nTriggeredAccFreeGame,this.flData.nTriggeredFreeGame),this.ToState(GameState.Slot_To_Feature_Idle);else{CommonFunc.log("init Idle"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),this.ToState(GameState.Slot_Idle);var n=new Object;n.type=MessageType.FreeGameRemaining,n.current=1==this.data.nPlayedFreeGame?this.data.nPlayedFreeGame:this.data.nPlayedFreeGame+1,n.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n))}}else if(this.flData.IsFeatureGameRemain()&&!this.flData.IsFreeSpinRemain())this.ToState(GameState.Slot_To_Feature_Idle);else{var n=new Object;n.type=MessageType.FreeGameRemaining,n.current=1==this.data.nPlayedFreeGame?this.data.nPlayedFreeGame:this.data.nPlayedFreeGame+1,n.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,this.Resume(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(FLSceneNotify.FREEGAME_RETRIGGER,this.flData.freeMeter))},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_MULTIPLIER,0)),this.isSpecialEventPlayed=!1,this.currentState){case GameState.Slot_Idle:if(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),console.log(GameConfig.SYMBOL_DATA),null!=GameConfig.SYMBOL_DATA&&GameConfig.SYMBOL_DATA.length>0&&!GameConfig.demoPanelOn){var e=new SpinDebugInput;e.symbols=GameConfig.SYMBOL_DATA,SocketManager.getInstance().SendFreeActionDebug(e),GameConfig.SYMBOL_DATA=null}else SocketManager.getInstance().SendFreeSpinAction();GameConfig.SYMBOL_DATA=null,this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,this.GetRemainContent(1)));break;case GameState.Slot_To_Feature_Idle:this.flData.triggeredType==BonusType.Feature1&&this.ToFeatureGame();break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.CheckEndState=function(){this.flData.triggeredType==BonusType.Feature1?this.ToState(GameState.Slot_To_Feature_Idle):this.flData.IsFreeSpinRemain()?this.ToState(GameState.Slot_End):this.flData.IsFeatureGameRemain()?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_To_Summary)},t.prototype.isSpecialEvent=function(){return this.isSpecialEventPlayed?!1:this.GetMultiplierContent()>1?!0:!1},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_To_Summary:return this.StateSummary(),!0;case GameState.Slot_To_Feature_Idle:this.StateFeatureIdle(); default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}},t.prototype.StateIdle=function(){!GameConfig.isDebugPanelOpened||GameConfig.demoPanelOn?this.on_start_pressed():EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.START_ENABLE))},t.prototype.StateSpinning=function(){var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.nPlayedFreeGame:e.current=this.data.nPlayedFreeGame+1,0==this.data.waitClient?e.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame:e.total=this.data.nTriggeredAccFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN)),0==this.data.waitClient&&(this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,5e3))},t.prototype.StateFeatureIdle=function(){SocketManager.getInstance().SendActionDone(),setTimeout(this.ToFeatureGame.bind(this),33)},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.isSpecialEventPlayed=!0;var e,t;t=new Object,t.classtype=FreeMultiplierWinAnimationEffect,e=new Object,e.CurMulitplier=this.GetMultiplierContent();for(var n=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multiplierMeter"),i=this.GetSelectedMysteryType()-1,o=[],a=0;a0&&AudioManager.Instance.playSound("Multiplier_mp3"),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_RETRIGGER,this.GetRetriggerContent()))},t.prototype.StateSummary=function(){this.ShowWinSummary()},t.prototype.on_data_ready=function(t){e.prototype.on_data_ready.call(this,t)},t.prototype.ToFeatureGame=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Feature1),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.STOP_ALL_WINNING_ANIMATION))},t.prototype.ToBaseGame=function(){EventCentral.getInstance().dispatchEventWith(SceneNotify.SET_FREE_MULTIPLIER,!1,0),e.prototype.ToBaseGame.call(this)},t.prototype.GetRemainContent=function(e){return void 0===e&&(e=0),this.data.nPlayedFreeGame+e+","+this.data.nTriggeredAccFreeGame},t.prototype.GetRetriggerContent=function(){return this.data.nFreeGame},t.prototype.GetMultiplierContent=function(){var e=this.flData.resultMultiplier;return e},t.prototype.GetSelectedMysteryType=function(){return 6==this.flData.featureResultID?this.flData.randomID:this.flData.featureResultID},t}(FreeGameStateController);__reflect(FLTypeFreeGameStateController.prototype,"FLTypeFreeGameStateController");var FLTypeSlotGameInitializer=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.InitSceneHandlers=function(){var e=new BaseGameSceneHandler(SceneType.Base),t=new FreeGameSceneHandler(SceneType.Free),n=new FreeSpinOfferGameSceneHandler(SceneType.FSO),i=new FLTypeFeatureGameSceneHandler(SceneType.Feature1);e.initializer=this,t.initializer=this,i.initializer=this,n.initializer=this,GameSceneManager.GetInstance().AddSceneHandler(SceneType.Base,e),GameSceneManager.GetInstance().AddSceneHandler(SceneType.Free,t),GameSceneManager.GetInstance().AddSceneHandler(SceneType.Feature1,i),GameSceneManager.GetInstance().AddSceneHandler(SceneType.FSO,n);var o=new MiniLobbyOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("MiniLobby",o);var a=new BigWinOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("BigWin",a);var r=new JackpotOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Jackpot",r);var s=new PaytableOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Paytable",s);var l=new GameRulesOverlayHandler;if(GameSceneManager.GetInstance().AddOverlayHandler("GameRule",l),GameConfig.isBetLogEnabled){var h=new BetlogOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Betlog",h)}if(GameConfig.IsRankingEnable)if(1==GameConfig.JackpotRankingEnable||1==GameConfig.FishRankingEnable||1==GameConfig.SlotRankingEnable){var c=new RankingOverlayHandler;GameSceneManager.GetInstance().AddOverlayHandler("Ranking",c)}else EventCentral.getInstance().addEventListener(SceneNotify.WAITING_RANKING_ENABLE,this.OnReceiveRankingEnable,this)},t.prototype.InitSlotController=function(){var e=new FLTypeSlotView,t=[6,6,6,6,6];e.SetSlotViewParameter(1,5,t,4,[0,1,2,3,4]);var n=DragonBonesManager.getInstance();n.Init(),GameConfig.platform==Platform.desktop?(n.LoadAnimationData("L1",1),n.LoadAnimationData("L2",1),n.LoadAnimationData("L3",1),n.LoadAnimationData("L4",1),n.LoadAnimationData("L5",1),n.LoadAnimationData("L6",1),n.LoadAnimationData("H1",1),n.LoadAnimationData("H2",1),n.LoadAnimationData("H3",1),n.LoadAnimationData("H4",1),n.LoadAnimationData("H5",1),n.LoadAnimationData("wild",1),n.LoadAnimationData("scatter",1)):(n.LoadAnimationData("L1_Mobile",1),n.LoadAnimationData("L2_Mobile",1),n.LoadAnimationData("L3_Mobile",1),n.LoadAnimationData("L4_Mobile",1),n.LoadAnimationData("L5_Mobile",1),n.LoadAnimationData("L6_Mobile",1),n.LoadAnimationData("H1_Mobile",1),n.LoadAnimationData("H2_Mobile",1),n.LoadAnimationData("H3_Mobile",1),n.LoadAnimationData("H4_Mobile",1),n.LoadAnimationData("H5_Mobile",1),n.LoadAnimationData("wild_Mobile",1),n.LoadAnimationData("scatter_Mobile",1)),e.SetRelatedClasses(SlotReel,FLTypeDragonBones2SlotSymbol);var i=new SymbolMask,o=new SymbolMask,a=new SymbolMask,r=new SymbolMask,s=AssetManager.GetInstance().GetAsset("SlotGameUI"),l=this.GetMask(new egret.Rectangle(0,0,SlotConfig.SLOT_MASK_WIDTH,SlotConfig.SLOT_MASK_HEIGHT));s.slotLayer.addChild(l),s.slotLayer.mask=l,s.AddObjectToUI(o,"slotLayer"),s.AddObjectToUI(i,"slotLayer"),s.AddObjectToUI(a,"winEffectLayer"),s.AddObjectToUI(r,"winEffectLayer"),e.CreateSlotReelsAndSymbols(i,a,r);var h=new Object([i,o]);e.SetSymbolMasks(h),e.InitReelResults();var c=new SlotController;c.SetSlotView(e);var u=new SlotEffectHandler(c);u.AddEffect(new FLTypeChargingEffect),u.AddEffect(new FLTypeScatterOneSecondEffect),u.AddEffect(new UpdateSlotReelStripEffect),u.AddEffect(new FreeMultiplierWinAnimationEffect),GameConfig.isTurboMode&&u.AddEffect(new TurboModeNormalWinEffect);for(var p,g=0;ge||e>this.GetCurrentClipTotalFrames()-1||this.GetCurrentClip().gotoAndStop(e)},t.prototype.IsCurrentStylePlaying=function(){return this.GetCurrentClip().isPlaying},t.prototype.GetSize=function(){var e=new egret.Point(0,0);return e.x=this.GetCurrentClip().width,e.y=this.GetCurrentClip().height,e},t.LOOP_ACTING_END="loop_acting_end",t.ACTING_END="acting_end",t}(HTMLUI.UIBase);__reflect(UIActingClip.prototype,"UIActingClip");var UIFreeGameMetersManager=function(){function e(e,t,n){this.multiplierStay=!1,this.remainMeter=null==e?new UIFreeGameRemainMeter:e,this.remainMeter.Hide(),this.retriggerMeter=null==t?new UIFreeGameRetriggerMeter:t,this.retriggerMeter.Hide(),this.multiplierMeter=null==n?new UIFreeGameMultiplierMeter:n,this.multiplierMeter.Hide(),this.RegisterEvent()}return e.prototype.RegisterEvent=function(){EventCentral.getInstance().addEventListener(SceneNotify.SET_FREE_REMAIN,this.UpdateRemainMeter,this),EventCentral.getInstance().addEventListener(SceneNotify.SET_FREE_MULTIPLIER,this.UpdateMultiplierMeter,this),EventCentral.getInstance().addEventListener(SceneNotify.SET_FREE_RETRIGGER,this.UpdateRetriggerMeter,this)},e.prototype.UnregisterEvent=function(){EventCentral.getInstance().removeEventListener(SceneNotify.SET_FREE_REMAIN,this.UpdateRemainMeter,this),EventCentral.getInstance().removeEventListener(SceneNotify.SET_FREE_MULTIPLIER,this.UpdateMultiplierMeter,this),EventCentral.getInstance().removeEventListener(SceneNotify.SET_FREE_RETRIGGER,this.UpdateRetriggerMeter,this)},e.prototype.SetRemainMeter=function(e){this.remainMeter=e},e.prototype.GetRemainMeter=function(){return this.remainMeter},e.prototype.SetRemainMeterReferencePoint=function(e){this.SetRemainMeterPosition(e.x,e.y),this.SetRemainMeterScale(e.scaleX,e.scaleY)},e.prototype.SetRemainMeterPosition=function(e,t){this.remainMeter.SetPosition(e,t)},e.prototype.SetRemainMeterScale=function(e,t){this.remainMeter.SetScale(e,t)},e.prototype.ShowRemainMeter=function(){this.remainMeter.Show()},e.prototype.HideRemainMeter=function(){this.remainMeter.Hide()},e.prototype.UpdateRemainMeter=function(e){if(null!=this.remainMeter){this.ShowRemainMeter();var t=e.data.split(","),n=parseInt(t[0]),i=parseInt(t[1]);console.log("-----------UpdateRemainMeter: "+n+"/"+i),this.remainMeter.SetSpinLeft(n),this.remainMeter.SetSpinMax(i)}},e.prototype.SetRetriggerMeter=function(e){this.retriggerMeter=e},e.prototype.GetRetriggerMeter=function(){return this.retriggerMeter},e.prototype.SetRetriggerMeterReferencePoint=function(e){this.SetRetriggerMeterPosition(e.x,e.y),this.SetRetriggerMeterScale(e.scaleX,e.scaleY)},e.prototype.SetRetriggerMeterPosition=function(e,t){this.retriggerMeter.SetPosition(e,t)},e.prototype.SetRetriggerMeterScale=function(e,t){this.retriggerMeter.SetScale(e,t)},e.prototype.ShowRetriggerMeter=function(){this.retriggerMeter.Show()},e.prototype.HideRetriggerMeter=function(){this.retriggerMeter.Hide()},e.prototype.UpdateRetriggerMeter=function(e){if(console.log("---------------- UpdateRetriggerMeter"),null!=this.retriggerMeter){var t=parseInt(e.data);this.retriggerMeter.SetRetriggerCount(t),t>0?this.ShowRetriggerMeter():this.HideRetriggerMeter()}},e.prototype.SteppingRetriggerAmount=function(e){var t=this.retriggerMeter.GetRetriggerCount()+1,n=SocketManager.getInstance().GetData().triggerWon,i=n-t;i>0&&(this.retriggerMeter.SetRetriggerCount(t),egret.setTimeout(this.SteppingRetriggerAmount,this,500))},e.prototype.SetMultiplierMeter=function(e){this.multiplierMeter=e},e.prototype.GetMultiplierMeter=function(){return this.multiplierMeter},e.prototype.SetMultiplierMeterPosition=function(e,t){this.multiplierMeter.SetPosition(e,t)},e.prototype.SetMultiplierMeterScale=function(e,t){this.multiplierMeter.SetScale(e,t)},e.prototype.ShowMultiplierMeter=function(){this.multiplierMeter.Show()},e.prototype.HideMultiplierMeter=function(){this.multiplierMeter.Hide()},e.prototype.UpdateMultiplierMeter=function(e){if(console.log("---------------- UpdateMultiplierMeter"),null!=this.multiplierMeter){var t=parseInt(e.data);this.multiplierStay?this.ShowMultiplierMeter():t>0?this.ShowMultiplierMeter():this.HideMultiplierMeter(),t>0||this.multiplierMeter.HideLabel()}},e.prototype.ShowAllMeters=function(){this.ShowMultiplierMeter(),this.ShowRemainMeter(),this.ShowRetriggerMeter()},e.prototype.HideAllMeters=function(){this.HideRemainMeter(),this.HideRetriggerMeter(),this.HideMultiplierMeter()},Object.defineProperty(e.prototype,"isMultiplierStay",{set:function(e){this.multiplierStay=e},enumerable:!0,configurable:!0}),e}();__reflect(UIFreeGameMetersManager.prototype,"UIFreeGameMetersManager");var ButtonType=function(){function e(){}return e.Start=0,e.Stop=1,e.StopAuto=2,e.MaxBet=3,e.MiniLobby=4,e.Paytable=5,e.Quit=6,e.GameRule=7,e.Betlog=8,e.Giftbox=9,e.Ranking=10,e.CampaignDetail=11,e}();__reflect(ButtonType.prototype,"ButtonType");var ValueType=function(){function e(){}return e.Volume=0,e.LineBet=1,e.NumberOfLine=2,e.Denomination=3,e.AutoSpinCount=4,e.TotalWin=5,e.Language=6,e.Direction=7,e}();__reflect(ValueType.prototype,"ValueType");var DelegateType=function(){function e(){}return e.COUNT=0,e.LanguageChange=e.COUNT++,e.BalanceUpdate=e.COUNT++,e.BetIDUpdate=e.COUNT++,e.BetInfoUpdate=e.COUNT++,e.TotalWinUpdate=e.COUNT++,e.SetWinAmount=e.COUNT++,e.StartWinBooking=e.COUNT++,e.EnableAllButton=e.COUNT++,e.DisableAllButton=e.COUNT++,e.EnableStartButton=e.COUNT++,e.EnableStopButton=e.COUNT++,e.ShowPaytable=e.COUNT++,e.ShowBetlog=e.COUNT++,e.ShowFreeSpinOfferRedeemPage=e.COUNT++,e.ShowMiniLobby=e.COUNT++,e.QuitGame=e.COUNT++,e.VolumeUpdate=e.COUNT++,e.ShowMessage=e.COUNT++,e.ButtonPressed=e.COUNT++,e.AutoSpinCountUpdate=e.COUNT++,e.JackpotDataReady=e.COUNT++,e.ShowGameRule=e.COUNT++,e.BetDirectionUpdate=e.COUNT++,e.EnableTurboModeButton=e.COUNT++,e.ShowRanking=e.COUNT++,e.ShowCampaignDetail=e.COUNT++,e}();__reflect(DelegateType.prototype,"DelegateType");var UIController=function(e){function t(){var t=e.call(this)||this;t.delegates=[];for(var n=0;n=3?(StringUtil.getParameterByName("inum")&&IFrameCloseButtonState(!1),CommonFunc.log("AutoSpinCountSelected"),GameConfig.isAutoSpin=!0,GameConfig.autoSpinTimes=this.autoValue[this.autoList.getChildIndex(e.currentTarget)],this.setAutoMenu(),this.autoplaybtn.visible=!1,this.stopautobtn.visible=!0,this.stopautobtn.enabled=!0,void this.uiController.ValueUpdated(ValueType.AutoSpinCount)):(CommonFunc.log("SPIN PRESSED BUT NOT ENOUGH BALANCE"),SocketManager.getInstance().GetData().balance<0?CommonFunc.ShowMessage(Localization.Instance.getString("common.system.unable_retrieve_balance")):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund_beforeSpin")),void(this.autoPopupMenu.visible=!1))},t.prototype.onSpinPressed=function(e){return SocketManager.getInstance().GetData().IsEnoughBalance()||0!=SocketManager.getInstance().GetData().triggeredType||SocketManager.getInstance().GetData().nextAction>=3?(CommonFunc.log("SpinPressed"),this.OnDisableAllButton(),void this.uiController.ButtonPressed(ButtonType.Start)):(CommonFunc.log("SPIN PRESSED BUT NOT ENOUGH BALANCE"),void(SocketManager.getInstance().GetData().balance<0?CommonFunc.ShowMessage(Localization.Instance.getString("common.system.unable_retrieve_balance")):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund_beforeSpin"))))},t.prototype.onStopPressed=function(e){CommonFunc.log("StopPressed"),this.OnDisableAllButton(),this.uiController.ButtonPressed(ButtonType.Stop)},t.prototype.onStopAutoPressed=function(e){CommonFunc.log("StopAutoPressed"),GameConfig.isAutoSpin=!1,GameConfig.autoSpinTimes=0,this.AutoSpinCountUpdate(this),this.uiController.ButtonPressed(ButtonType.StopAuto)},t.prototype.onMaxBetPressed=function(e){CommonFunc.log("MaxBetPressed"),this.uiController.ButtonPressed(ButtonType.MaxBet)},t.prototype.setAutoMenu=function(){this.autoPopupMenu.visible?(this.autoPopupMenu.visible=!1,this.autoInfinitySymbol.visible=!1,this.autoOutside.removeEventListener(mouse.MouseEvent.MOUSE_OVER,this.setAutoMenu,this)):(this.autoPopupMenu.visible=!0,this.autoInfinitySymbol.visible=!0,this.autoOutside.addEventListener(mouse.MouseEvent.MOUSE_OVER,this.setAutoMenu,this))},t.prototype.AutoSpinCountUpdate=function(e){for(var t=[],n=1;n0,void(this.autoCount.text=""+GameConfig.autoSpinTimes)):(GameConfig.isAutoSpin=!1,GameConfig.autoSpinTimes=0,this.autoplaybtn.visible=!0,this.stopautobtn.visible=!1,this.autoCountBg.visible=!1,this.autoCountBg.visible=!1,this.autoCountInfinity.visible=!1,void(this.autoCount.visible=!1))},t.prototype.onTurboOnPressed=function(e){GameConfig.isTurboMode&&(this.turboModeMsg.text=Localization.Instance.getString("common.turbomode.activated"),GameConfig.TurboModeState=!0,this.btnTurboOff.enabled=!0,this.ToggleTurboMode(GameConfig.TurboModeState))},t.prototype.onTurboOffPressed=function(e){GameConfig.isTurboMode&&(this.turboModeMsg.text=Localization.Instance.getString("common.turbomode.deactivated"),GameConfig.TurboModeState=!1,this.btnTurboOn.enabled=!0,this.ToggleTurboMode(GameConfig.TurboModeState))},t.prototype.OnEnableTurboModeButton=function(e){for(var t=[],n=1;n0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.on_sync_data_ready=function(e){this.data.isWinAmountInclude=!1},t.prototype.on_data_ready=function(e){EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.STOP_ENABLE)),egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,GameConfig.TurboModeState&&GameConfig.isTurboMode?requestAnimationFrame(this.StopSpin):this.tempTimeoutID=egret.setTimeout(this.StopSpin,this,16.67)},t.prototype.StopSpin=function(){egret.clearTimeout(this.tempTimeoutID),this.tempTimeoutID=-1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ENABLE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_SPIN)),GameConfig.isTurboMode&&GameConfig.TurboModeState&&(EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)))},t.prototype.isSpecialEvent=function(){return!1},t.prototype.ShowBigWin=function(e,t,n){void 0===n&&(n=-1),0>n&&(n=t);var i=this.data.lineBet*this.data.denominationList[this.data.denominationId],o=e.toString()+","+t+","+i+","+n;CommonFunc.log("Show big win, type: "+e+", amount: "+t+", credit: "+i+", totalWinAmount: "+n),GameSceneManager.GetInstance().ShowOverlay("BigWin",o)},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.jackpotAmount>0?this.ToState(GameState.Slot_Jackpot):this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckNextStateAfterReelStop=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.CheckEndState=function(){this.data.triggeredType!=BonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.data.IsLastFreeGameFinished()?this.ToState(GameState.Slot_To_Summary):this.ToState(GameState.Slot_End)},t.prototype.ToState=function(t){if(e.prototype.ToState.call(this,t))return!0;switch(t){case GameState.Slot_To_Feature_Idle:return this.StateFeatureIdle(),!0;case GameState.Slot_Feature_Triggered:return this.StateFeatureTriggered(),!0;case GameState.Slot_To_Summary:return this.StateSummary(),!0;case GameState.FreeSpinOffer_Idle:return this.StateFreeSpinOfferIdle(),!0;default:CommonFunc.log(this.constructor.toString()+" has no state:"+GameState[t])}return!1},t.prototype.StateFreeSpinOfferIdle=function(){this.isResume=!1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_STARTMENU_FSO))},t.prototype.StateFeatureIdle=function(){if(void 0!=FesEventController&&null!=FesEventController&&FesEventController.getInstance().IsFesEventTriggered())return GameConfig.previousGameState=GameState.Slot_To_Feature_Idle,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),void FesEventController.getInstance().CheckIsInfoReady();FesEventController.getInstance().RemoveListeners(),SocketManager.getInstance().SendActionDone(),GameConfig.isAutoSpin&&(GameConfig.autoSpinTimes=0,GameConfig.isAutoSpin=!1,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE)));var e=new Object;e.type=MessageType.PressToFeature,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.START_ENABLE)),GameConfig.isTurboMode&&EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.ENABLE_TURBOMODEBUTTON))},t.prototype.StateIdle=function(){GameConfig.isDebugPanelOpened&&!GameConfig.demoPanelOn||!this.data.isNextFSOSpin()?EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.START_ENABLE)):this.isResume?this.ToState(GameState.FreeSpinOffer_Idle):this.on_start_pressed()},t.prototype.StateSpinning=function(){EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0));var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.fsoPlayed:e.current=this.data.fsoPlayed+1,e.total=this.data.fsoCount,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t.prototype.StateFeatureTriggered=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_TRIGGER_ANIMATION))},t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_EFFECT))},t.prototype.StateResultDisplay=function(){if(this.data.winAmount>=this.data.GetFSOTotalBet()*GameConfig.bigwin.normal)EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.hasBigWin=!0,this.data.winAmount>=this.data.GetFSOTotalBet()*GameConfig.bigwin.mega?this.ShowBigWin(3,this.data.winAmount):this.data.winAmount>=this.data.GetFSOTotalBet()*GameConfig.bigwin["super"]?this.ShowBigWin(2,this.data.winAmount):this.ShowBigWin(1,this.data.winAmount);else{if(GameConfig.TurboModeState&&GameConfig.isTurboMode){var e=new Object;e.classtype=TurboModeNormalWinEffect;var t=new Object;t.winAmount=this.data.winAmount,e.arg=t,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.PLAY_EFFECT,e))}EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,this.data.winAmount)),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE))}EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.SHOW_RESULT)),GameConfig.TurboModeState&&GameConfig.isTurboMode&&this.data.winAmount0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_To_Feature_Idle)},t.prototype.ToBaseGame=function(){this.Stop(),GameSceneManager.GetInstance().ToGameMode(SceneType.Base),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.REMOVE_FSO_REMAIN))},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:case GameState.FreeSpinOffer_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction();var e=this.data.fsoPlayed+1+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,e)),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Summary:this.ToBaseGame();case GameState.Slot_To_Feature_Idle:this.data.triggeredType==BonusType.Feature1?this.ToFeature1():this.ToFreeGame()}},t.prototype.on_fsoStartMenu_start_pressed=function(){console.log("FSO START MENU START PRESSED")},t}(SlotGameStateController);__reflect(FreeSpinOfferGameStateController.prototype,"FreeSpinOfferGameStateController");var DebugPanel=function(e){function t(){var t=e.call(this)||this;return t}return __extends(t,e),t.prototype.childrenCreated=function(){},t.prototype.OnDebugButtonPressed=function(e){},t.prototype.InitBaseDebugOptionPane=function(){},t.prototype.CreateBasicDetailDebugOptionPane=function(){},t.prototype.CreateCustomDetailDebugOptionPane=function(){},t.prototype.CreateDetailDebugOptionPane=function(){},t.prototype.AddTouchEvent=function(e,t){},t.prototype.OnActionButtonPressed=function(e){},t.prototype.ExecuteAction=function(e){},t.prototype.ToggleDebugSymbolPane=function(){},t.prototype.ToggleDebugFeaturePane=function(){},t.prototype.OnDebugSymbolPaneStartPressed=function(e){},t.prototype.OnDebugButtonPaneStartPressed=function(e){},t.prototype.ExecuteData=function(e){},t}(eui.Component);__reflect(DebugPanel.prototype,"DebugPanel");var DemoDebugPanel=function(e){function t(){var t=e.call(this)||this;return t}return __extends(t,e),t.prototype.childrenCreated=function(){},t.prototype.OnDebugButtonPressed=function(e){},t.prototype.InitDebugList=function(){},t.prototype.CreateDetailDebugOptionPane=function(){},t.prototype.AddTouchEvent=function(e,t){},t.prototype.OnActionButtonPressed=function(e){},t.prototype.ExecuteAction=function(e){},t.prototype.ExecuteData=function(e){},t}(eui.Component);__reflect(DemoDebugPanel.prototype,"DemoDebugPanel");var UIBackgroundManager=function(){function e(){GameConfig.platform==Platform.mobile?this.background=new UIBackground("base_bg_png","freegame_bg_PNG"):this.background=new UIBackground("base_bg_png","freegame_bg_PNG")}return e.prototype.SwitchToBaseGameBackground=function(){this.background.SwitchToBaseGameBackground()},e.prototype.SwitchToFreeGameBackground=function(){this.background.SwitchToFreeGameBackground()},e.prototype.GetBackgroundObject=function(){return this.background},e}();__reflect(UIBackgroundManager.prototype,"UIBackgroundManager"); var SceneNotify=function(e){function t(t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=!1),e.call(this,t,n,i)||this}return __extends(t,e),t.Notify=function(e,n){void 0===n&&(n=null);var i=new t(e);return i.data=n,i},t.ENTER_SETTING="ENTER_SETTING",t.LEAVE_SETTING="LEAVE_SETTING",t.DUMMY_SCENE_COMPLETED="DUMMY_SCENE_COMPLETED",t.START_SPIN="START_SPIN",t.STOP_SPIN="STOP_SPIN",t.START_ENABLE="START_ENABLE",t.STOP_ENABLE="STOP_ENABLE",t.SPIN_STOPPED="SPIN_STOPPED",t.SHOW_WIN_SUMMARY="SHOW_WIN_SUMMARY",t.WIN_SUMMARY_FINISHED="WIN_SUMMARY_FINISHED",t.SHOW_TRIGGER_ANIMATION="SHOW_TRIGGER_ANIMATION",t.START_TRIGGER_ANIMATION="START_TRIGGER_ANIMATION",t.TRIGGER_ANIMATION_FINISHED="TRIGGER_ANIMATION_FINISHED",t.SHOW_SPECIAL_EVENT="SHOW_SPECIAL_EVENT",t.SPECIAL_EVENT_FINISHED="SPECIAL_EVENT_FINISHED",t.AUTO_SPIN_UPDATE="AUTO_SPIN_UPDATE",t.SHOW_RESULT="SHOW_RESULT",t.SHOW_All_RESULT="SHOW_ALL_RESULT",t.SHOW_WININFO_ANIMATION="SHOW_WININFO_ANIMATION",t.PLAY_EFFECT="PLAY_EFFECT",t.ON_STARTSTOPPING="ON_STARTSTOPPING",t.STOP_ALL_WINNING_ANIMATION="STOP_ALL_WINNING_ANIMATION",t.SET_WIN_AMOUNT="SET_WIN_AMOUNT",t.WIN_BOOKING_START="UI.WIN_BOOKING_START",t.WIN_BOOKING_FINISHED="UI.WIN_BOOKING_FINISHED",t.SET_FREE_REMAIN="SET_FREE_REMAIN",t.SET_FREE_MULTIPLIER="SET_FREE_MULTIPLIER",t.SET_FREE_RETRIGGER="SET_FREE_RETRIGGER",t.SET_TURBOMODEBUTTON_VISIBLE="SET_TURBOMODEBUTTON_VISIBLE",t.BASE_RANDOM_IN="BASE_RANDOM_IN",t.BASE_TRIGGER="BASE_TRIGGER",t.BASE_NO_TRIGGER="BASE_NO_TRIGGER",t.SHOW_JACKPOT_METER="SHOW_JACKPOT_METER",t.HIDE_JACKPOT_METER="HIDE_JACKPOT_METER",t.SHOW_JACKPOT_PANEL="SHOW_JACKPOT_PANEL",t.SHOW_BIG_WIN="SHOW_BIG_WIN",t.BIG_WIN_FINISHED="BIG_WIN_FINISHED",t.JACKPOT_FINISHED="JACKPOT_FINISHED",t.SHOW_MESSAGE="SHOW_MESSAGE",t.FEATURE_DISABLE_ALLBUTTON="FEATURE_DISABLE_ALLBUTTON",t.FEATURE_ENABLE_ALLBUTTON="FEATURE_ENABLE_ALLBUTTON",t.FEATURE_ITEM_SELECTED="FEATURE_ITEM_SELECTED",t.FEATURE_SHOW_ANIMATION="FEATURE_SHOW_ANIMATION",t.FEATURE_ANIMATION_COMPLETED="FEATURE_ANIMATION_COMPLETED",t.FEATURE_HISTORY_UPDATE="FEATURE_HISTORY_UPDATE",t.FEATURE_TEAM_SELECTED="FEATURE_TEAM_SELECTED",t.FEATURE_ALL_ANIMATION_ENED="FEATURE_ALL_ANIMATION_ENED",t.FEATURE_SHOW_SELECTTEAM_TRANSITION="FEATURE_SHOW_SELECTTEAM_TRANSITION",t.FEATURE_SHOW_SELECTCHARACTER_TRANSITION="FEATURE_SHOW_SELECTCHARACTER_TRANSITION",t.FEATURE_ROUND_NUMBER="FEATURE_ROUND_NUMBER",t.FEATURE_FEATURE_MULTIPLIER="FEATURE_FEATURE_MULTIPLIER",t.FEATURE_RESET="FEATURE_RESET",t.FEATURE_EXIT="FEATURE_EXIT",t.FEATURE_CHARACTER_SELECTED="FEATURE_CHARACTER_SELECTED",t.FEATURE_PLAY_IDLE="FEATURE_PLAY_IDLE",t.FEATURE_IDLE_ENDED="FEATURE_IDLE_ENDED",t.FEATURE_PLAY_RESULT="FEATURE_PLAY_RESULT",t.FEATURE_RESULT_ENDED="FEATURE_RESULT_ENDED",t.FEATURE_CHANCE_UPDATE="FEATURE_CHANCE_UPDATE",t.FEATURE_BONUS_START="FEATURE_BONUS_START",t.FEATURE_BONUS_SELECTED="FEATURE_BONUS_SELECTED",t.FEATURE_BONUS_RESULT="FEATURE_BONUS_RESULT",t.FEATURE_BONUS_RESULT_ENDED="FEATURE_BONUS_RESULT_ENDED",t.FEATURE_DEBUG_ACTION="FEATURE_DEBUG_ACTION",t.FEATURE_BONUS_RESULT_RESUME="FEATURE_BONUS_RESULT_RESUME",t.FEATURE_HISTORY_UPDATE_RESUME_ZH="FEATURE_HISTORY_UPDATE_RESUME_ZH",t.VIDEO_LOAD_COMPLETED="VIDEO_LOAD_COMPLETED",t.BIGSYMBOL_ANIMATION_COMPLETED="BIGSYMBOL_ANIMATION_COMPLETED",t.FULLREELWILD_NUDGE_FINISHED="FULLREELWILD_NUDGE_FINISHED",t.ON_NUDGEEFFECT_STARTED="ON_NUDGEEFFECT_STARTED",t.EXPLODE="EXPLODE",t.SYMBOL_EXPLODE_FINISHED="SYMBOL_EXPLODE_FINISHED",t.REEL_EXPLODE_FINISHED="REEL_EXPLODE_FINISHED",t.SCREEN_EXPLODE_FINISHED="SCREEN_EXPLODE_FINISHED",t.RESPINNING="RESPINNING",t.SYMBOL_DROPIN_FINISHED="SYMBOL_DROPIN_FINIISHED",t.IDLE_TO_FREE_DROPOUT="IDLE_TO_FREE_DROPOUT",t.SYMBOL_TRANSFORM_FINISHED="SYMBOL_TRANSFORM_FINISHED",t.ADD_OR_REMOVE_EFFECT="ADD_OR_REMOVE_EFFECT",t.FIXED_REEL_EFFECT_FINISHED="FIXED_REEL_EFFECT_FINISHED",t.START_REEL_SYNC_EFFECT="START_REEL_SYNC_EFFECT",t.REEL_SYNC_EFFECT_FINISHED="REEL_SYNC_EFFECT_FINISHED",t.STOP_ALL_REEL_SYNC_EFFECT="STOP_ALL_REEL_SYNC_EFFECT",t.START_REEL_POSITION_UPDATE="START_REEL_POSITION_UPDATE",t.FES_IS_TRIGGERED="FES_IS_TRIGGERED",t.FES_IS_FINISHED="FES_IS_FINISHED",t.FES_IS_INFO_LOADED="FES_IS_INFO_LOADED",t.IS_LOADING_READY="IS_LOADING_READY",t.CHANGE_TO_FULLREELWILD="CHANGE_TO_FULLREELWILD",t.CHANGE_TO_BOMBWILD="CHANGE_TO_BOMBWILD",t.CHANGE_TO_RANDOMWILD="CHANGE_TO_RANDOMWILD",t.WILD_FEATURE_FINISHED="WILD_FEATURE_FINISHED",t.RESUME_WITH_WILD_FEATURE="RESUME_WITH_WILD_FEATURE",t.SCATTER_ONE_SECOND="SCATTER_ONE_SECOND",t.CREATE_FREE_GAME_METER="CREATE_FREE_GAME_METER",t.START_REEL_TRANSITION="START_REEL_TRANSITION",t.END_REEL_TRANSITION="END_REEL_TRANSITION",t.START_EFFECT_BEGIN="START_EFFECT_BEGIN",t.START_EFFECT_END="START_EFFECT_END",t.SHOW_LIGHT_FOR_MODE_3="SHOW_LIGHT_FOR_MODE_3",t.FEATURE_SCENE_INIT="FEATURE_SCENE_INIT",t.FEATURE_SCENE_REVEAL_ALL="FEATURE_SCENE_REVEAL_ALL",t.FEATURE_SCENE_REVEAL_ALL_FINISHED="FEATURE_SCENE_REVEAL_ALL_FINISHED",t.FEATURE_SHOW_WIN_SUMMARY="FEATURE_SHOW_WIN_SUMMARY",t.FEATURE_WIN_SUMMARY_FINISHED="FEATURE_WIN_SUMMARY_FINISHED",t.ON_UICONTROLLER_CREATED="ON_UICONTROLLER_CREATED",t.REELBOARD_STAGE_2="REELBOARD_STAGE_2",t.REELBOARD_STAGE_3="REELBOARD_STAGE_3",t.LEVEL_UP_FINISHED="LEVEL_UP_FINISHED",t.CHANGE_WAYS="CHANGE_WAYS",t.SLOT_VIEW_UPDATED="SLOT_VIEW_UPDATED",t.START_SCATTER_COUNT="START_SCATTER_COUNT",t.END_SCATTER_COUNT="END_SCATTER_COUNT",t.COUNTING_FINISHED="COUNTING_FINISHED",t.START_SHAKING="START_SHAKING",t.STOP_SHAKING="STOP_SHAKING",t.PLAY_MULTIPLIER_METER_ANIMATION="PLAY_MULTIPLIER_METER_ANIMATION",t.ENABLE_TURBOMODEBUTTON="ENABLE_TURBOMODEBUTTON",t.SHOW_WIN_SUMMARY_FSO="SHOW_WIN_SUMMARY_FSO",t.WIN_SUMMARY_FINISHED_FSO="WIN_SUMMARY_FINISHED_FSO",t.SET_FSO_REMAIN="SET_FSO_REMAIN",t.REMOVE_FSO_REMAIN="REMOVE_FSO_REMAIN",t.SHOW_STARTMENU_FSO="SHOW_STARTMENU_FSO",t.START_PRESSED_FSO="START_PRESSED_FSO",t.SHOW_GIFTBOX="SHOW_GIFTBOX",t.HIDE_FSO_REDEEM_PAGE="HIDE_FSO_REDEEM_PAGE",t.SHOW_FSO_CONGRATULATIONPANEL="SHOW_FSO_CONGRATULATIONPANEL",t.SHOW_JACKPOT_WINNING_NOTICE="SHOW_JACKPOT_WINNING_NOTICE",t.RANKING_DATA_UPDATE="RANKING_DATA_UPDATE",t.RANKING_JACKPOT_UPDATE="RANKING_JACKPOT_UPDATE",t.RANKING_SHOW_DETAIL="RANKING_SHOW_DETAIL",t.LOAD_RANKING_ICON="LOAD_RANKING_ICON",t.RANKING_ICON_LOADED="RANKING_ICON_LOADED",t.WAITING_RANKING_ENABLE="WAITING_RANKING_ENABLE",t.REQUESTING_RANKING_INFO="REQUESTING_RANKING_INFO",t.RANKING_TIMEOUT="RANKING_TIMEOUT",t.SHOW_CAMPAIGN_BUTTON="SHOW_CAMPAIGN_BUTTON",t.CAMPAIGN_DETAIL_RECEIVED="CAMPAIGN_DETAIL_RECEIVED",t.CAMPAIGN_WINNERLIST_RECEIVED="CAMPAIGN_WINNERLIST_RECEIVED",t.CAMPAIGN_DETAIL_TIMEOUT="CAMPAIGN_DETAIL_TIMEOUT",t.CAMPAIGN_WINNERLIST_TIMEOUT="CAMPAIGN_WINNERLIST_TIMEOUT",t.REQUESTING_CAMPAIGN_WINNERLIST="REQUESTING_CAMPAIGN_WINNERLIST",t.SP_SIMPLEPLAY_GAME_LIST_LOADED="SP_SIMPLEPLAY_GAME_LIST_LOADED",t}(egret.Event);__reflect(SceneNotify.prototype,"SceneNotify");var UIBGTranscation=function(e){function t(t,n,i){void 0===t&&(t=""),void 0===n&&(n=0),void 0===i&&(i=24);var o=e.call(this)||this;return o.frameSetName=t,o.totalFrames=n,o.currentFrame=0,o.framePerSecond=i,o.fadeTime=500,o.lastTimestamp=0,o.timer=new egret.Timer(1e3/o.framePerSecond),o.bitmap=new egret.Bitmap,o.addChild(o.bitmap),o}return __extends(t,e),t.prototype.StartTranscation=function(e,n,i){void 0===e&&(e=!0),this.isForward=e,this.previousTime=egret.getTimer(),this.callbackTarget=i,this.transationEndCallback=n,this.isForward||(this.currentFrame=this.totalFrames),this.timer.addEventListener(egret.TimerEvent.TIMER,this.ChangeFrame,this),this.timer.start(),this.lastTimestamp=egret.getTimer(),this.FadeInOut(),EventCentral.getInstance().dispatchEvent(new SceneNotify(t.START))},t.prototype.SkipTranscation=function(){this.StopTranscation()},t.prototype.StopTranscation=function(){this.timer.stop(),this.timer.removeEventListener(egret.TimerEvent.TIMER,this.ChangeFrame,this),null!=this.callbackTarget&&(this.transationEndCallback.call(this.callbackTarget),EventCentral.getInstance().dispatchEvent(new SceneNotify(t.END))),this.RemoveFromParent()},t.prototype.RemoveFromParent=function(){this.parent.removeChild(this)},t.prototype.ChangeFrame=function(e){var t=this.totalFrames.toString().length,n=(egret.getTimer()-this.lastTimestamp)/(1e3/this.framePerSecond);if(!(Math.round(n)<1)){this.isForward?this.currentFrame+=Math.round(n):this.currentFrame-=Math.round(n);var i=RES.getRes(this.frameSetName+this.ZeroFillNumber(this.currentFrame,t));null==i&&this.StopTranscation(),this.bitmap.texture=i,this.lastTimestamp=egret.getTimer()}},t.prototype.ZeroFillNumber=function(e,t){for(var n="",i=0;t>i;i++)n+="0";return n=n.substr(0,t-e.toString().length)+e},t.prototype.FadeInOut=function(){var e=this.totalFrames/this.framePerSecond*1e3-2*this.fadeTime;this.alpha=0;var n=egret.Tween.get(this);n.to({alpha:1},this.fadeTime).call(function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(t.FADEIN_END))}).wait(e).call(function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(t.FADEOUT_START))}).to({alpha:0},this.fadeTime)},t.prototype.SetFPS=function(e){this.framePerSecond=e,this.timer.delay=1e3/this.framePerSecond},t.START="TranscationStart",t.END="TranscationEnd",t.FADEIN_START="transcation_ fadein_start",t.FADEIN_END="transcation_ fadein_end",t.FADEOUT_START="transcation_ fadeout_start",t.FADEOUT_END="transcation_ fadeout_end",t}(eui.Component);__reflect(UIBGTranscation.prototype,"UIBGTranscation");var UIGameLogo=function(e){function t(){var t=e.call(this)||this;return GameConfig.platform==Platform.desktop?t.skinName="UIGameLogoSkin":t.skinName="UIGameLogoSkin_mobile",t}return __extends(t,e),t.prototype.partAdded=function(t,n){n.name=t,e.prototype.partAdded.call(this,t,n)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.changeLanguageHandler=new UIChangeLanguage(this.OnLanguageChanged,this),this.OnLanguageChanged(GameConfig.Locale)},Object.defineProperty(t.prototype,"width",{get:function(){return null==this.logoBitmap?e.prototype.$getWidth.call(this):this.logoBitmap.width},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return null==this.logoBitmap?e.prototype.$getHeight.call(this):this.logoBitmap.height},enumerable:!0,configurable:!0}),t.prototype.OnLanguageChanged=function(e){var t=null;t=GameConfig.platform==Platform.desktop?RES.getRes(Localization.Instance.getString("common.game_logo")):RES.getRes(Localization.Instance.getString("common.game_logo_mobile")),this.logoBitmap.texture=t,this.logoBitmap.x=-this.logoBitmap.width/2,this.logoBitmap.y=-this.logoBitmap.height/2},t}(HTMLUI.UIBase);__reflect(UIGameLogo.prototype,"UIGameLogo");var UIWinSummary=function(e){function t(){var t=e.call(this)||this;return t.skinName="UIWinSummarySkin",t.SetScale(.001,.001),t.anchorOffsetX=t.width/2,t.anchorOffsetY=t.height/2,t.fixedScale=!0,t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.lblWinAmountTitle.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won");Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won");this.lblWinAmountTitle.font=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won_font"),this.lblPlayCountTitle.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played");Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played");this.lblPlayCountTitle.font=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played_font"),this.lblPlayCountTitle.addEventListener(egret.Event.RESIZE,this.OnTitleResize,this)},t.prototype.Init=function(e,t,n){void 0===n&&(n=0),this.lblWinAmount.text=n.toString(),this.lblPlayCount.text=e.toString()},t.prototype.Start=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this.Init(e,t,n),this.FadeIn()},t.prototype.FadeIn=function(){this.SetScale(.001,.001);var e=egret.Tween.get(this);e.to({scaleX:1,scaleY:1},500,egret.Ease.backOut).call(this.FadeInFinished),this.backdrop.alpha=.1;var t=egret.Tween.get(this.backdrop);t.to({alpha:1},500)},t.prototype.FadeInFinished=function(){this.dispatchEvent(new egret.Event(t.FADE_IN_COMPLETE))},t.prototype.SetPlayCount=function(e){this.lblPlayCount.text=e.toString()},t.prototype.SetWinAmount=function(e){this.lblWinAmount.text=StringUtil.numberFormat(Number(e)/100,2)},t.prototype.Close=function(){this.FadeOut()},t.prototype.FadeOut=function(){this.SetScale(1,1);var e=egret.Tween.get(this);e.to({scaleX:.001,scaleY:.001},500,egret.Ease.backIn).call(this.FadeOutFinished);var t=egret.Tween.get(this.backdrop);t.to({alpha:.1},500)},t.prototype.FadeOutFinished=function(){this.dispatchEvent(new egret.Event(t.FADE_OUT_COMPLETE))},t.prototype.WinSummaryFinished=function(e){this.dispatchEvent(new egret.Event(egret.Event.COMPLETE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(t.WINSUMMARY_FINISH))},t.prototype.OnTitleResize=function(){var e=this.lblPlayCountTitle,t=this.lblPlayCountTitle.textWidth;if(null!=e.$textLinesWidth){t=0;for(var n=0;n=0&&500>=a?25:a>500&&2500>=a?100:a>2500&&6500>=a?200:a>6500&&12500>=a?300:600;var s=r*o;return s},e.prototype.ComputeTime=function(e){var t=0,n=SocketManager.getInstance().GetData().GetCredit(),i=e/n;return t=i>=0&&500>=i?i/25:i>500&&2500>=i?20+(i-500)/100:i>2500&&6500>=i?40+(i-2500)/200:i>6500&&12500>=i?60+(i-6500)/300:i>12500?80+(i-12500)/600:80+i/600},e}();__reflect(BookingSpeedCalculator.prototype,"BookingSpeedCalculator",["IBookingSpeedCalculator"]);var GameState;!function(e){e[e.Slot_Idle=0]="Slot_Idle",e[e.Slot_Spinning=1]="Slot_Spinning",e[e.Slot_Jackpot=2]="Slot_Jackpot",e[e.Slot_Feature_Triggered=3]="Slot_Feature_Triggered",e[e.Slot_Special_Event=4]="Slot_Special_Event",e[e.Slot_Result_Displaying=5]="Slot_Result_Displaying",e[e.Slot_End=6]="Slot_End",e[e.Slot_To_Feature_Idle=7]="Slot_To_Feature_Idle",e[e.Slot_To_Summary=8]="Slot_To_Summary",e[e.Feature_SelectTeam=9]="Feature_SelectTeam",e[e.Feature_Idle=10]="Feature_Idle",e[e.Feature_ShowResult=11]="Feature_ShowResult",e[e.Feature_ShowWin=12]="Feature_ShowWin",e[e.Feature_ShowLose=13]="Feature_ShowLose",e[e.Feature_End=14]="Feature_End",e[e.Feature_To_Summary=15]="Feature_To_Summary",e[e.FreeSpinOffer_Idle=16]="FreeSpinOffer_Idle",e[e.Feature_Intro=17]="Feature_Intro",e[e.Feature_SelectCharacter=18]="Feature_SelectCharacter",e[e.Feature_Bonus=19]="Feature_Bonus",e[e.Slot_Exploding=20]="Slot_Exploding",e[e.Slot_Respinning=21]="Slot_Respinning",e[e.Slot_TotalResultDisplay=22]="Slot_TotalResultDisplay",e[e.Free_Game_Unlock_Meter=23]="Free_Game_Unlock_Meter"}(GameState||(GameState={}));var MovieClip=function(){function e(){}return e.movieClipBySpriteSheet=function(t,n){void 0===n&&(n=SlotConfig.SLOT_FRAME_RATE);var i=RES.getRes(t+"_json"),o=RES.getRes(t+"_png");i||console.error(t+"_json not found"),o||console.error(t+"_png not found");var a=[],r={mc:{mov:{frameRate:n,frames:a}},res:i.frames},s=0,l=t+"_"+e.fillZore(s,2);for(void 0==i.frames[l]&&(s=1,l=t+"_"+e.fillZore(s,2));void 0!=i.frames[l];)a.push({duration:1,res:l,x:i.frames[l].offX,y:i.frames[l].offY}),s++,l=t+"_"+e.fillZore(s,2);var h=new egret.MovieClipDataFactory(r,o),c=new egret.MovieClip(h.generateMovieClipData("mov"));c.width!=i.frames[t+"_01"].sourceW&&(c.width=i.frames[t+"_01"].sourceW,c.height=i.frames[t+"_01"].sourceH);var u=new MultiResolutionMovieClip(c.movieClipData);return u.width=c.width,u.height=c.height,u},e.movieClipByName=function(e,t){void 0===t&&(t="");var n=RES.getRes(e+"_json"),i=RES.getRes(e+"_png"),o=new egret.MovieClipDataFactory(n,i);""==t&&(t=e);var a=new egret.MovieClip(o.generateMovieClipData(t)),r=new MultiResolutionMovieClip(a.movieClipData);return r},e.fillZore=function(e,t){for(var n="",i=0;t>i;i++)n+="0";return n+=e.toString(),n.substr(n.length-t,t)},e}();__reflect(MovieClip.prototype,"MovieClip");var ShakeAnimation=function(){function e(){this.count=0,this.timer=new egret.Timer(1e3)}return e.prototype.shakeObj=function(e,t,n,i){this.stop(),this.target=e,this.initX=e.x,this.initY=e.y,this.maxDis=i,this.count=t*n,this.rate=n,this.timer.delay=1e3/n,this.timer.repeatCount=this.count,this.timer.addEventListener(egret.TimerEvent.TIMER,this.shaking,this),this.timer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.shakeComplete,this),this.timer.reset(),this.timer.start()},e.prototype.shaking=function(){egret.Tween.removeTweens(this.target),this.target.x=this.initX-this.maxDis+Math.random()*this.maxDis*2,this.target.y=this.initY-this.maxDis+Math.random()*this.maxDis*2,egret.Tween.get(this.target).to({x:this.initX,y:this.initY},999/this.rate)},e.prototype.shakeComplete=function(){this.target&&(egret.Tween.removeTweens(this.target),this.target.x=this.initX,this.target.y=this.initY,this.target=null),this.timer.removeEventListener(egret.TimerEvent.TIMER,this.shaking,this),this.timer.removeEventListener(egret.TimerEvent.TIMER_COMPLETE,this.shakeComplete,this)},e.prototype.stop=function(){this.shakeComplete()},e}();__reflect(ShakeAnimation.prototype,"ShakeAnimation");var NewBaseGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Start=function(e){if(AudioManager.Instance.stopBgm(),this.InitBaseReelStrip(),e?EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)):EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),this.AddListeners(),this.SetActive(!0),e)if(1==this.data.waitClient)CommonFunc.log("Base Game Resume"),this.CheckResumeJackpot(),this.Resume();else if(this.data.nextAction!=NGABonusType.None)CommonFunc.log("init To_Feature_Idle"),this.ToState(GameState.Slot_To_Feature_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.winAmount));else{CommonFunc.log("init Idle");var t=new Object;t.type=MessageType.PressToStart,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,t)),this.ToState(GameState.Slot_Idle)}else{var t=new Object;t.type=MessageType.TotalWin,t.data=this.data.accumulatedWinAmount,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,t)),this.ToState(GameState.Slot_Idle)}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction(),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Feature_Idle:this.data.nextAction==NGABonusType.Feature1?this.ToFeature1():this.ToFreeGame()}},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.jackpotAmount>0?this.ToState(GameState.Slot_Jackpot):this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_End)},t}(BaseGameStateController);__reflect(NewBaseGameStateController.prototype,"NewBaseGameStateController");var NewFreeGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.CheckNextStateAfterReelStop=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.CheckEndState()},t.prototype.SetInitState=function(e){var t=this.data.nTriggeredAccFreeGame,n=this.data.nFreeSpinCount+","+t;if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,n)),e){if(this.data.fso){var n=this.data.fsoPlayed+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,n)),SocketManager.getInstance().GetData().SetFSOBetSetting(),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON))}if(1==this.data.waitClient)EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.PreAccFreeAmount)),CommonFunc.log("Free Game Resume"),this.Resume();else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.accumulatedWinAmount)),CommonFunc.log("init Idle");var i=new Object;i.type=MessageType.PressToStart,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}}else{EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,Math.max(this.data.winAmount,this.data.accumulatedWinAmount)));var i=new Object;i.type=MessageType.FreeGameRemaining,i.current=this.data.nFreeSpinCount+1,i.total=this.data.nTriggeredAccFreeGame+this.data.nTriggeredFreeGame,this.ToState(GameState.Slot_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,i))}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.Slot_Idle:if(GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.FreeBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),console.log(GameConfig.SYMBOL_DATA),null!=GameConfig.SYMBOL_DATA&&GameConfig.SYMBOL_DATA.length>0&&!GameConfig.demoPanelOn){var e=new SpinDebugInput;e.symbols=GameConfig.SYMBOL_DATA,SocketManager.getInstance().SendFreeActionDebug(e),GameConfig.SYMBOL_DATA=null}else SocketManager.getInstance().SendFreeSpinAction();this.data.nTriggeredAccFreeGame+=this.data.nTriggeredFreeGame,this.data.nTriggeredFreeGame=0,GameConfig.SYMBOL_DATA=null;var t=this.data.nFreeSpinCount+1+","+this.data.nTriggeredAccFreeGame;this.ToState(GameState.Slot_Spinning),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_REMAIN,t));break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.StateSpinning=function(){var e=new Object;e.type=MessageType.FreeGameRemaining,1==this.data.waitClient?e.current=this.data.nFreeSpinCount:e.current=this.data.nFreeSpinCount+1,e.total=this.data.nTriggeredAccFreeGame,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,e)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.START_SPIN));var t=1e3*SlotConfig.spinTimeout;this.tempTimeoutID=egret.setTimeout(this.CheckTimeout,this,t)},t}(FreeGameStateController);__reflect(NewFreeGameStateController.prototype,"NewFreeGameStateController");var NewFreeSpinOfferGameStateController=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Start=function(e){e&&(this.isResume=!0),AudioManager.Instance.stopBgm(),this.InitBaseReelStrip(),e&&SocketManager.getInstance().GetData().SetFSOBetSetting();var t=this.data.fsoPlayed+","+this.data.fsoCount;if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,t)),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BET_INFO_UPDATE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON)),e?EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)):EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,0)),this.AddListeners(),this.SetActive(!0),e)if(1==this.data.waitClient)CommonFunc.log("FSO Game Resume"),this.Resume();else if(this.data.nextAction!=NGABonusType.None)CommonFunc.log("init To_Feature_Idle"),this.ToState(GameState.Slot_To_Feature_Idle),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_WIN_AMOUNT,this.data.winAmount));else{CommonFunc.log("init Idle");var n=new Object;n.type=MessageType.PressToStart,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n)),this.ToState(GameState.FreeSpinOffer_Idle)}else{var n=new Object;n.type=MessageType.PressToStart,n.data=this.data.accumulatedWinAmount,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SHOW_MESSAGE,n)),0==this.data.fsoPlayed?this.ToState(GameState.FreeSpinOffer_Idle):this.data.isNextFSOSpin()?this.ToState(GameState.Slot_Idle):this.ToState(GameState.Slot_To_Summary)}},t.prototype.on_start_pressed=function(){switch(EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.STOP_ALL_WINNING_ANIMATION)),this.currentState){case GameState.FreeSpinOffer_Idle:case GameState.Slot_Idle:GameConfig.isAutoSpin&&0!=GameConfig.autoSpinTimes&&(GameConfig.autoSpinTimes>0&&GameConfig.autoSpinTimes--,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.AUTO_SPIN_UPDATE))),null!=this.timer&&(this.timer.stop(),this.timer.removeEventListener("stop_bgm",this.stop_bgm,this)),AudioManager.Instance.setBgm(Sound.BaseBGM,!0),EventCentral.getInstance().dispatchEvent(new SceneNotify(SysNotify.DISABLE_ALL_BUTTON));SocketManager.getInstance().SendSpinAction();var e=this.data.fsoPlayed+1+","+this.data.fsoCount;EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FSO_REMAIN,e)),this.ToState(GameState.Slot_Spinning);break;case GameState.Slot_To_Feature_Idle:this.data.nextAction==NGABonusType.Feature1?this.ToFeature1():this.ToFreeGame();break;case GameState.Slot_To_Summary:this.ToBaseGame()}},t.prototype.CheckNextStateAfterReelStopOrJackpotFinished=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_Feature_Triggered):this.isSpecialEvent()?this.ToState(GameState.Slot_Special_Event):this.data.winAmount>0?this.ToState(GameState.Slot_Result_Displaying):this.ToState(GameState.Slot_End)},t.prototype.CheckEndState=function(){this.data.nextAction!=NGABonusType.None?this.ToState(GameState.Slot_To_Feature_Idle):this.ToState(GameState.Slot_End)},t}(FreeSpinOfferGameStateController);__reflect(NewFreeSpinOfferGameStateController.prototype,"NewFreeSpinOfferGameStateController");var AssetManager=function(){function e(){this.map={}}return e.GetInstance=function(){return null==e._instance&&(e._instance=new e),e._instance},e.prototype.AddAsset=function(e,t){this.ContainKey(e)?CommonFunc.log("Key:"+e+" is already exist."):this.map[e]=t},e.prototype.RemoveAsset=function(e){this.ContainKey(e)&&(this.map[e]=null)},e.prototype.ContainKey=function(e){return null==this.map[e]?!1:!0},e.prototype.GetAsset=function(e){return this.ContainKey(e)?this.map[e]:void 0},e}();__reflect(AssetManager.prototype,"AssetManager");var Layer;!function(e){e[e.Root=1e3]="Root",e[e.Slot=1001]="Slot",e[e.Feature=1002]="Feature",e[e.UI=1003]="UI",e[e.Translation=1004]="Translation",e[e.Overlay=1005]="Overlay",e[e.LandscapeOnlyOverlay=1006]="LandscapeOnlyOverlay"}(Layer||(Layer={}));var GameLayer=function(e){function t(){var t=e.call(this)||this;return t.map={},t}return __extends(t,e),t.GetInstance=function(){return null==t._instance&&(t._instance=new t),t._instance},t.prototype.InitLayer=function(){this.RegisterLayer(Layer.Root,this),this.AddNewLayerToLayer(Layer.Slot,Layer.Root),this.AddNewLayerToLayer(Layer.Feature,Layer.Root),this.AddNewLayerToLayer(Layer.UI,Layer.Root),this.AddNewLayerToLayer(Layer.Translation,Layer.Root),this.AddNewLayerToLayer(Layer.Overlay,Layer.Root),this.AddNewLayerToLayer(Layer.LandscapeOnlyOverlay,Layer.Root)},t.prototype.AddNewLayerToLayer=function(e,t){var n=new egret.Sprite;this.AddObjectToLayer(n,t),this.RegisterLayer(e,n)},t.prototype.RegisterLayer=function(e,t){if(null!=this.map[e])throw new Error("The Layer is already exist! Please check the keys' value and see if they are duplicated");this.map[e]=t},t.prototype.DeregisterLayer=function(e){null!=this.map[e]&&(this.map[e]=null)},t.prototype.AddObjectToLayer=function(e,t){var n=this.map[t];n.addChild(e);var i=document.getElementById("egretDOMRoot");if(i&&(t===Layer.Overlay||t===Layer.LandscapeOnlyOverlay)&&"BetLog"!==e.name){i.remove(); var o=this.getObjectToLauyer(Layer.Overlay,"BetLog");o&&o.parent.removeChild(o)}},t.prototype.ClearLayer=function(e){var t=this.map[e];t.removeChildren()},t.prototype.AddObjectToLayerAt=function(e,t,n){var i=this.map[t];i.addChildAt(e,n)},t.prototype.GetLayer=function(e){return this.map[e]},t.prototype.getObjectToLauyer=function(e,t){var n=this.map[e];return n.getChildByName(t)},t}(egret.Sprite);__reflect(GameLayer.prototype,"GameLayer");var LoadingStatus;!function(e){e.COUNT=0,e.InitGameAndSlotConfigStart=e.COUNT++,e.InitGameAndSlotConfigFinish=e.COUNT++,e.LoadLocalConfigStart=e.COUNT++,e.LoadLocalConfigFinish=e.COUNT++,e.LoadCommonConfigStart=e.COUNT++,e.LoadCommonConfigFinish=e.COUNT++,e.InitBeforeLoadResourceStart=e.COUNT++,e.InitBeforeLoadResourceFinish=e.COUNT++,e.LoadThemeAndResourceStart=e.COUNT++,e.LoadThemeAndResourceFinish=e.COUNT++,e.LoadQueryStringAndLobbyInfoStart=e.COUNT++,e.LoadQueryStringAndLobbyInfoFinish=e.COUNT++,e.InitAfterLoadResourceStart=e.COUNT++,e.InitAfterLoadResourceFinish=e.COUNT++,e.LoginStart=e.COUNT++,e.LoginFinish=e.COUNT++}(LoadingStatus||(LoadingStatus={}));var GameLoadingManager=function(){function e(e){this._loadingStatus=LoadingStatus.InitGameAndSlotConfigStart,this.doubleClick=0,this.isThemeLoadEnd=!1,this.isResourceLoadEnd=!1,this.numOfResource=6,this.numOfResLoaded=0,this.stage=e}return Object.defineProperty(e.prototype,"loadingStatus",{get:function(){return this._loadingStatus},set:function(e){CommonFunc.log(e),this._loadingStatus=e},enumerable:!0,configurable:!0}),e.prototype.StartLoading=function(){this.loadingStatus=LoadingStatus.InitGameAndSlotConfigStart,this.CheckStatus()},e.prototype.CheckStatus=function(){switch(this.loadingStatus){case LoadingStatus.InitGameAndSlotConfigStart:this.InitGameAndSlotConfig();break;case LoadingStatus.InitGameAndSlotConfigFinish:this.LoadLocalConfig();break;case LoadingStatus.LoadLocalConfigFinish:this.LoadCommonConfig();break;case LoadingStatus.LoadCommonConfigFinish:this.InitBeforeLoadResource();break;case LoadingStatus.InitBeforeLoadResourceFinish:this.LoadThemeAndResource();break;case LoadingStatus.LoadThemeAndResourceFinish:this.LoadQueryStringAndLobbyInfo();break;case LoadingStatus.LoadQueryStringAndLobbyInfoFinish:this.InitAfterLoadResource();break;case LoadingStatus.InitAfterLoadResourceFinish:this.Login()}},e.prototype.InitGameAndSlotConfig=function(){ConfigInitializer.initGameConfig(),ConfigInitializer.initSlotConfig(),this.initializer=new SlotConfig.CInitializer,GameConfig.platform==Platform.mobile?(this.stage.addEventListener(egret.Event.DEACTIVATE,this.onDeactivate,this),this.stage.addEventListener(egret.Event.ACTIVATE,this.onActivate,this)):this.initMouse(),this.loadingStatus=LoadingStatus.InitGameAndSlotConfigFinish,this.CheckStatus()},e.prototype.onDoubleClickTimeOut=function(e){this.doubleClick-=e},e.prototype.onDeactivate=function(){CommonFunc.log("onDeactivate"),AudioManager.Instance.onDeactivate()},e.prototype.onActivate=function(){CommonFunc.log("onActivate"),AudioManager.Instance.onActivate()},e.prototype.initMouse=function(){mouse.enable(this.stage),KeyPressManager.Instance},e.prototype.LoadLocalConfig=function(){this.loadingStatus=LoadingStatus.LoadLocalConfigStart;var e=new egret.HttpRequest;e.responseType=egret.HttpResponseType.TEXT,e.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),e.addEventListener(egret.Event.COMPLETE,function(t){var n=e.response;this.onLocalConfigFileLoaded(n)},this),e.open("html5web/resource/LocalConfig.json?t="+(new Date).getTime(),egret.HttpMethod.GET),e.send()},e.prototype.onLocalConfigFileLoaded=function(e){if(null==e)throw new Error("Load config xml error");var t=JSON.parse(e);GameConfig.CDNVersion=t.CDNVersion,this.loadingStatus=LoadingStatus.LoadLocalConfigFinish,this.CheckStatus()},e.prototype.LoadCommonConfig=function(){this.loadingStatus=LoadingStatus.LoadCommonConfigStart;var e=0==GameConfig.configPath.indexOf("//"),t=(e?window.location.protocol:"")+GameConfig.configPath+"?t="+(new Date).getTime();CommonFunc.log("Config: "+t);var n=new egret.HttpRequest;n.responseType=egret.HttpResponseType.TEXT,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),n.addEventListener(egret.Event.COMPLETE,function(e){var t=n.response;this.onConfigFileLoaded(t)},this),n.open(t,egret.HttpMethod.GET),n.send()},e.prototype.onConfigFileLoaded=function(e){if(null==e)throw new Error("Load config xml error");this.initializer.OnConfigLoaded(e),this.loadingStatus=LoadingStatus.LoadCommonConfigFinish,this.CheckStatus()},e.prototype.InitBeforeLoadResource=function(){egret.ImageLoader.crossOrigin="anonymous",this.loadingStatus=LoadingStatus.InitBeforeLoadResourceStart,this.initializer.InitBeforePreload(this.stage),this.loadingStatus=LoadingStatus.InitBeforeLoadResourceFinish,this.CheckStatus()},e.prototype.LoadThemeAndResource=function(){var e=new RES.VersionController;e.getVirtualUrl=function(e){return e+"?v="+GameConfig.version+"."+SlotConfig.SLOT_VERSION},RES.registerVersionController(e),this.loadingStatus=LoadingStatus.LoadThemeAndResourceStart;var t=new AssetAdapter;this.stage.registerImplementation("eui.IAssetAdapter",t),this.stage.registerImplementation("eui.IThemeAdapter",new ThemeAdapter);var n=0==GameConfig.resourceRootPath.indexOf("//"),i=GameConfig.resourceDirectory;GameConfig.isUseCDNVersion&&(i=i.replace("/resource","/"+GameConfig.CDNVersion+"/resource"));var o=(n?window.location.protocol:"")+GameConfig.resourceRootPath+i;CommonFunc.log("Resource Root: "+o),ResUtils.getInstance().addConfig(o+"default.res.json",o),ResUtils.getInstance().addConfig(o+"UI/commonUI/default.res.json",o),ResUtils.getInstance().addConfig(o+"UI/desktopUI/default.res.json",o),ResUtils.getInstance().addConfig(o+"UI/mobileUI/default.res.json",o),ResUtils.getInstance().loadConfig(this.onConfigComplete,this)},e.prototype.parseConfig=function(e){},e.prototype.onConfigComplete=function(e){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigComplete,this);var t=0==GameConfig.resourceRootPath.indexOf("//"),n=GameConfig.resourceDirectory;GameConfig.isUseCDNVersion&&(n=n.replace("/resource","/"+GameConfig.CDNVersion+"/resource"));var i=(t?window.location.protocol:"")+GameConfig.resourceRootPath+n;CommonFunc.log("Resource Root: "+i);var o=new eui.Theme(i+"default.thm.json",this.stage);o.addEventListener(eui.UIEvent.COMPLETE,this.onThemeLoadComplete,this),RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.addEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this),RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,this.onItemLoadError,this),this.numOfResource=6,this.numOfResLoaded=0,this.initializer.LoadURLQueryString(),GameConfig.Locale>Language.Indonesia&&(GameConfig.Locale=GameConfig.FallbackLocale),RES.loadGroup("config"),RES.loadGroup(this.LoadLanguage()),RES.loadGroup("loadingCommon"),RES.loadGroup(this.LoadLanguageCommon()),RES.loadGroup("postload"),RES.loadGroup(this.LoadLoadingPage())},e.prototype.LoadLanguage=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.languageEng;case Language.SimplifiedChinese:return RESGroupKey.languageCn;case Language.TraditionalChinese:return RESGroupKey.languageZh;case Language.Korean:return RESGroupKey.languageKr;case Language.Japanese:return RESGroupKey.languageJp;case Language.Thai:return RESGroupKey.languageTh;case Language.Vietnam:return RESGroupKey.languageVi;case Language.Indonesia:return RESGroupKey.languageId;default:return RESGroupKey.languageEng}},e.prototype.LoadLanguageCommon=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.languageCommonEng;case Language.SimplifiedChinese:return RESGroupKey.languageCommonCn;case Language.TraditionalChinese:return RESGroupKey.languageCommonZh;case Language.Korean:return RESGroupKey.languageCommonKr;case Language.Japanese:return RESGroupKey.languageCommonJp;case Language.Thai:return RESGroupKey.languageCommonTh;case Language.Vietnam:return RESGroupKey.languageCommonVi;case Language.Indonesia:return RESGroupKey.languageCommonId;default:return RESGroupKey.languageCommonEng}},e.prototype.LoadLoadingPage=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.loadingEng;case Language.SimplifiedChinese:return RESGroupKey.loadingCn;case Language.TraditionalChinese:return RESGroupKey.loadingZh;case Language.Korean:return RESGroupKey.loadingKr;case Language.Japanese:return RESGroupKey.loadingJp;case Language.Thai:return RESGroupKey.loadingTh;case Language.Vietnam:return RESGroupKey.loadingVi;case Language.Indonesia:return RESGroupKey.loadingId;default:return RESGroupKey.loadingEng}},e.prototype.onThemeLoadComplete=function(){this.isThemeLoadEnd=!0,this.LoadThemeAndResourceCompleted()},e.prototype.onResourceLoadComplete=function(e){switch(CommonFunc.log("Resource Group name: %s",e.groupName),e.groupName){case this.LoadLanguageCommon():this.numOfResLoaded++,this.CheckResourceLoadCompleted();var t=GameConfig.langData[GameConfig.Locale].code;GameConfig.CommonErrorCodeFile=RES.getRes("commonErrorCode_"+t+"_json"),this.initializer.LoadCommonErrorCodeFile();break;case this.LoadLanguage():this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case"config":this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case this.LoadLoadingPage():this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case"loadingCommon":this.numOfResLoaded++,this.CheckResourceLoadCompleted();break;case"postload":this.numOfResLoaded++,this.CheckResourceLoadCompleted()}},e.prototype.CheckResourceLoadCompleted=function(){this.numOfResLoaded==this.numOfResource&&(this.isResourceLoadEnd=!0,this.LoadThemeAndResourceCompleted())},e.prototype.onItemLoadError=function(e){console.warn("Url:"+e.resItem.url+" has failed to load")},e.prototype.onResourceLoadError=function(e){console.warn("Group:"+e.groupName+" has failed to load"),this.onResourceLoadComplete(e)},e.prototype.LoadThemeAndResourceCompleted=function(){this.isThemeLoadEnd&&this.isResourceLoadEnd&&(RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),RES.removeEventListener(RES.ResourceEvent.GROUP_LOAD_ERROR,this.onResourceLoadError,this),RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,this.onItemLoadError,this),this.loadingStatus=LoadingStatus.LoadThemeAndResourceFinish,this.CheckStatus())},e.prototype.LoadQueryStringAndLobbyInfo=function(){this.loadingStatus=LoadingStatus.LoadQueryStringAndLobbyInfoStart,this.initializer.LoadLobbyInfo(this.LoadLobbyInfoFinished,this)},e.prototype.LoadLobbyInfoFinished=function(){this.loadingStatus=LoadingStatus.LoadQueryStringAndLobbyInfoFinish,this.CheckStatus()},e.prototype.InitAfterLoadResource=function(){this.loadingStatus=LoadingStatus.InitAfterLoadResourceStart,this.initializer.InitAfterPreLoad(this.stage),this.initializer.createMsgBoxLandscapeOnly(),this.loadingStatus=LoadingStatus.InitAfterLoadResourceFinish,this.CheckStatus()},e.prototype.getIOSAppBetSource=function(){return BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSMobile|BetSource.BSApp|BetSource.BSIOS},e.prototype.getAndroidAppBetSource=function(){return BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSMobile|BetSource.BSApp|BetSource.BSAndroid},e.prototype.Login=function(){this.loadingStatus=LoadingStatus.LoginStart;var e=new SlotConfig.CNetSocket,t=new SlotConfig.CNetSocket,n=new Network.LoginManager(t,e),i=new SlotConfig.CSlotActionManager(e),o=new SlotConfig.CWinInfoParser;i.SetWinInfoParser(o),SocketManager.getInstance().SetLoginManager(n),SocketManager.getInstance().SetActionManager(i),SocketManager.getInstance().SetLocation(GameConfig.cshosts,GameConfig.port,GameConfig.sshosts),"Android"==egret.Capabilities.os&&parseInt(StringUtil.getParameterByName("native"))>=1&&(SlotConfig.BetSource=this.getAndroidAppBetSource()),"iOS"==egret.Capabilities.os&&parseInt(StringUtil.getParameterByName("native"))>=1&&(SlotConfig.BetSource=this.getIOSAppBetSource()),SocketManager.getInstance().Login(GameConfig.GameCode,GameConfig.token,SlotConfig.BetSource),EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.LOGIN_STARTED)),this.loadingStatus=LoadingStatus.LoginFinish},e}();__reflect(GameLoadingManager.prototype,"GameLoadingManager");var GameSceneManager=function(e){function t(){var t=e.call(this)||this;return t.sceneHandlers={},t.componentHandlers={},t.sceneHandlers=[],t}return __extends(t,e),t.GetInstance=function(){return null==t._instance&&(t._instance=new t),t._instance},t.prototype.AddEventListeners=function(){GameConfig.hasOpeningVideo&&GameConfig.platform==Platform.desktop?(EventCentral.getInstance().addEventListener(SysNotify.OPENING_VIDEO_COMPLETED,this.VideoComplete,this),EventCentral.getInstance().addEventListener(SysNotify.LOGIN_STARTED,this.InitGame,this)):EventCentral.getInstance().addEventListener(SysNotify.LOGIN_STARTED,this.InitGame,this)},t.prototype.AddSceneHandler=function(e,t){if(null!=this.sceneHandlers[e])throw new Error("GameMode: "+SceneType[e]+" has already got a sceneHandler registered");CommonFunc.log("Register GameMode: "+SceneType[e]),this.sceneHandlers[e]=t},t.prototype.AddOverlayHandler=function(e,t){null==this.componentHandlers[e]?(CommonFunc.log("Register Overlay: "+e),this.componentHandlers[e]=t):console.log("Overlay: "+e+" has already got a sceneHandler registered")},t.prototype.InitGame=function(e){void 0===e&&(e=null),hideLanding(),SocketManager.getInstance().GetData().balance>=0&&EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.SYNC_DATA_READY)),this.removeEventListener(SysNotify.LOGIN_STARTED,this.InitGame,this),setTimeout(this.InitScene.bind(this),16)},t.prototype.InitScene=function(){var e=new DummySceneHandler(SceneType.Dummy);t.GetInstance().AddSceneHandler(SceneType.Dummy,e);var n=SceneType.Dummy;if(null==this.sceneHandlers[n])throw new Error("This game has no status: "+n);var i=this.sceneHandlers[n];this.loadingScene=AssetManager.GetInstance().GetAsset("LoadingScene"),i.InitScene(this.loadingScene),GameConfig.platform==Platform.desktop&&1==GameConfig.hasOpeningVideo&&this.LoadingSceneVisible(!1),this.currentGameMode=n},t.prototype.VideoComplete=function(){EventCentral.getInstance().removeEventListener(SysNotify.OPENING_VIDEO_COMPLETED,this.VideoComplete,this),this.LoadingSceneVisible(!0)},t.prototype.LoadingSceneVisible=function(e){this.loadingScene.SetVisible(e)},t.prototype.InitSceneFromDummy=function(){var e=SocketManager.getInstance().GetData().GetInitGameMode();if(null==this.sceneHandlers[e])throw new Error("This game has no status: "+e);var t=this.sceneHandlers[e];this.currentGameMode=e,GameConfig.platform==Platform.desktop&&1==GameConfig.hasOpeningVideo&&this.LoadingSceneVisible(!0),t.InitScene(this.loadingScene)},t.prototype.ToGameMode=function(e){if(null==this.sceneHandlers[e])throw new Error("This game has no status: "+e);var t=this.sceneHandlers[e],n=AssetManager.GetInstance().GetAsset("InGameLoadingIndicator");t.EnterFrom(this.currentGameMode,n),this.currentGameMode=e},t.prototype.ShowOverlay=function(e,t){if(void 0===t&&(t=null),null==this.componentHandlers[e])throw new Error("This game has no component: "+e);var n=this.componentHandlers[e];n.data=t;var i=AssetManager.GetInstance().GetAsset("InGameLoadingIndicator");n.EnterFrom(this.currentGameMode,i)},t}(egret.EventDispatcher);__reflect(GameSceneManager.prototype,"GameSceneManager");var AssetAdapter=function(){function e(){}return e.prototype.getAsset=function(e,t,n){function i(i){t.call(n,i,e)}if(RES.hasRes(e)){var o=RES.getRes(e);o?i(o):RES.getResAsync(e,i,this)}else RES.getResByUrl(e,i,this,RES.ResourceItem.TYPE_IMAGE)},e}();__reflect(AssetAdapter.prototype,"AssetAdapter",["eui.IAssetAdapter"]);var DBInGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.isIndicatorLooping=!0,t.frameCount=100,t.isFixedScale=!0,t.skinName="skins.DBInGameLoadingIndicatorSkin",t.loadingIndicator.source="LoadingInd",t.loadingIndicator.animationName="LoadingIndicator",t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%")},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(DBInGameLoadingIndicator.prototype,"DBInGameLoadingIndicator",["IProcessIndiator"]);var InGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.isIndicatorLooping=!0,t.frameCount=100,t.skinName=skins.InGameLoadingIndicatorSkin,t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.loadingIndicator&&this.isIndicatorLooping&&this.loadingIndicator.play(-1),null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%"),null==this.loadingIndicator||this.isIndicatorLooping||this.loadingIndicator.gotoAndStop(Math.ceil(e*this.frameCount*.01))},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(InGameLoadingIndicator.prototype,"InGameLoadingIndicator",["IProcessIndiator"]);var BSFeatureView=function(e){function t(){var t=e.call(this)||this;return t.selection=[],t.isMysteryOptionSelected=!1,t.skinName="FeatureUISkin",t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.InitScene()},t.prototype.InitScene=function(){for(var e=0;6>e;e++){var t=new BSFeatureSelection(e);this.selectionGroup.addChild(t),this.selection.push(t),t.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnBtnTap,this)}EventCentral.getInstance().addEventListener(FLSceneNotify.FEATURE_MYSTERY_ROULETTE_START,this.OnMysteryOptionSelected,this)},t.prototype.OnBtnTap=function(e){5==e.currentTarget.SelectionId&&(this.isMysteryOptionSelected=!0),e.currentTarget.IsSelected=!0;var t=new SceneNotify(SceneNotify.FEATURE_ITEM_SELECTED);t.data=e.currentTarget.SelectionId,EventCentral.getInstance().dispatchEvent(t),EventCentral.getInstance().addEventListener(SysNotify.DATA_READY,this.OnDataReady,this)},t.prototype.OnMysteryOptionSelected=function(){this.featureMysteryResult=new FeatureMysteryResult,this.mysteryGroup.addChild(this.featureMysteryResult)},t.prototype.OnDataReady=function(){var e=this;if(EventCentral.getInstance().removeEventListener(SysNotify.DATA_READY,this.OnDataReady,this),this.isMysteryOptionSelected){var t=SocketManager.getInstance().GetData();egret.setTimeout(function(){e.featureMysteryResult.ReadyToStop(t.nTriggeredAccFreeGame,t.randomID)},this,2e3)}else EventCentral.getInstance().dispatchEvent(new SceneNotify(FLSceneNotify.FEATURE_SCENE_REVEAL_FINISHED))},t}(HTMLUI.UIBase);__reflect(BSFeatureView.prototype,"BSFeatureView");var LoadingSceneHint=function(e){function t(){var t=e.call(this)||this;return t.rand=0,t.numberOfHints=1,t.isInSequence=!0,t.skinName=skins.LoadingSceneHintSkin,t.addEventListener(egret.Event.LEAVE_STAGE,t.CancelUpdate,t),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.showHints(),this.updateHints=egret.setInterval(this.showHints,this,4e3)},t.prototype.showHints=function(){this.UpdateIndex(),this.hintsIcon&&(this.hintsIcon.source="hints_icon_json.symbol0"+(this.rand+1).toString()),this.hintsLabel&&(this.hintsLabel.font=Localization.Instance.getString(GameConfig.GameCode+".font.loading"),this.hintsLabel.text=Localization.Instance.getString(GameConfig.GameCode+".loading.hints")[this.rand])},t.prototype.UpdateIndex=function(){return this.isInSequence?this.rand=++this.rand%this.numberOfHints:this.rand=Math.floor(Math.random()*this.numberOfHints),this.rand},t.prototype.CancelUpdate=function(e){egret.clearInterval(this.updateHints)},t}(eui.Component);__reflect(LoadingSceneHint.prototype,"LoadingSceneHint");var SpInGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.skinName="skins.InGameLoadingIndicatorSkin",t.loadingIndicator.source="LoadingIndicator",t.loadingIndicator.animationName="loop",t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%")},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(SpInGameLoadingIndicator.prototype,"SpInGameLoadingIndicator",["IProcessIndiator"]);var SpriteInGameLoadingIndicator=function(e){function t(){var t=e.call(this)||this;return t.isIndicatorLooping=!0,t.frameCount=100,t.skinName=skins.InGameLoadingIndicatorSkin,t}return __extends(t,e),t.prototype.Show=function(){GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.visible=!0,null!=this.loadingIndicator&&this.isIndicatorLooping&&this.loadingIndicator.play(-1),null!=this.progressLabel&&(this.progressLabel.text="")},t.prototype.Hide=function(){this.visible=!1,null!=this.parent&&this.parent.removeChild(this)},t.prototype.SetProcess=function(e){null!=this.progressLabel&&(this.progressLabel.text=Math.floor(e)+"%"),null==this.loadingIndicator||this.isIndicatorLooping||this.loadingIndicator.gotoAndStop(Math.ceil(e*this.frameCount*.01))},t.prototype.SetVisible=function(e){this.visible=e},t}(eui.Component);__reflect(SpriteInGameLoadingIndicator.prototype,"SpriteInGameLoadingIndicator",["IProcessIndiator"]);var BaseGameSceneHandler=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.timeoutId=-1,t}return __extends(t,e),t.prototype.LoadFreeGameGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameZh;case Language.Korean:return RESGroupKey.FreeGameKr;case Language.Japanese:return RESGroupKey.FreeGameJp;case Language.Thai:return RESGroupKey.FreeGameTh;case Language.Vietnam:return RESGroupKey.FreeGameVi;case Language.Indonesia:return RESGroupKey.FreeGameId}},t.prototype.LoadFreeGameMobileGroup=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.FreeGameMobileEng;case Language.SimplifiedChinese:return RESGroupKey.FreeGameMobileCn;case Language.TraditionalChinese:return RESGroupKey.FreeGameMobileZh;case Language.Korean:return RESGroupKey.FreeGameMobileKr;case Language.Japanese:return RESGroupKey.FreeGameMobileJp;case Language.Thai:return RESGroupKey.FreeGameMobileTh;case Language.Vietnam:return RESGroupKey.FreeGameMobileVi;case Language.Indonesia:return RESGroupKey.FreeGameMobileId}},t.prototype.GetPreloadgroupList=function(){return console.log("##################################### GetPreloadgroupList"),[RESGroupKey.UIPanelCommon,GameConfig.platform==Platform.desktop?this.LoadUIPanel():this.LoadUIPanelMobile(),GameConfig.platform==Platform.desktop?this.LoadSlotSceneCommon():this.LoadSlotSceneCommonMobile(),GameConfig.platform==Platform.desktop?this.LoadFreeGameGroup():this.LoadFreeGameMobileGroup(),GameConfig.platform==Platform.desktop?RESGroupKey.BaseGame:RESGroupKey.BaseGameMobile]},t.prototype.PreLoadResources=function(){var e=this.GetPreloadgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;console.log(e),console.log(e.length);for(var t=0;t1&&!AssetManager.GetInstance().ContainKey("WinLine")){var e=AssetManager.GetInstance().GetAsset("SlotGameUI"),i=new LineDetail;AssetManager.GetInstance().AddAsset("LineDetail",i),e.AddObjectToUI(i,"winEffectLayer");var o=new ParticleWinLineManager;o.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,o.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("WinLine",o),e.AddObjectToUI(o,"winEffectLayer")}null==this.stateController&&(this.stateController=new SlotConfig.CBaseGameStateController),this.timeoutId=egret.setTimeout(this.Progress2,this,1e3)},t.prototype.Progress2=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1,this.PreLoadResources()},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;SocketManager.getInstance().GetData().waitClient>0||SocketManager.getInstance().GetData().unsettledEGamesList.length>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Base,this.OnTransitionEnd,this,this.fromType);break;case SceneType.Feature1:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Base,this.OnTransitionEnd,this,this.fromType);break;case SceneType.FSO:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Base,this.OnTransitionEnd,this,this.fromType);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t.prototype.createBitmapByName=function(e){var t=new egret.Bitmap,n=RES.getRes(e);return t.texture=n,t},t.prototype.OnTransitionEnd=function(){this.stateController.Start()},t.kSlotController="SlotController",t}(SceneHandler);__reflect(BaseGameSceneHandler.prototype,"BaseGameSceneHandler");var BetlogOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.hasExtraResource=!0,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[GameConfig.platform==Platform.desktop?this.LoadBetlogGroup():this.LoadBetlogGroupMobile()]},t.prototype.LoadExtraResource=function(){this.IsGameListArrayLoaded()?this.CreateSceneAndController():this.LoadGameListDetail()},t.prototype.IsGameListArrayLoaded=function(){return null!=GameConfig.gameListDetail},t.prototype.LoadGameListDetail=function(){var e=CommonFunc.getGameListURL(),t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.OnGameListDetailLoaded=function(e){var t=e.target,n=t.data;if(null==n){var i=RES.getRes("GameList_Template_json");GameConfig.gameListDetail=i,this.processIndicator.Hide(),this.CreateSceneAndController()}else GameConfig.gameListDetail=JSON.parse(StringUtil.tryDecode64(n)),this.processIndicator.Hide(),this.CreateSceneAndController()},t.prototype.GameListDetailLoadedFailed=function(e){alert("Fail to load GameListDetail"),GameConfig.debugPanelOn||GameConfig.demoPanelOn?this.LoadGameListDetailTemplate():this.LoadGameListDetailTemplate()},t.prototype.LoadGameListDetailTemplate=function(){var e="resource/UI/commonUI/images/MiniLobby/GameList_Template.dat",t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.CheckAndLoadResources=function(){var e=this.GetRelatedgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;for(var t=0,n=0;n1&&!AssetManager.GetInstance().ContainKey("WinLine")){var e=AssetManager.GetInstance().GetAsset("SlotGameUI"),n=new LineDetail;AssetManager.GetInstance().AddAsset("LineDetail",n),e.AddObjectToUI(n,"winEffectLayer");var i=new ParticleWinLineManager;i.x=SlotConfig.WINNING_MASK_BORDER_WIDTH,i.y=SlotConfig.WINNING_MASK_BORDER_WIDTH,AssetManager.GetInstance().AddAsset("WinLine",i),e.AddObjectToUI(i,"winEffectLayer")}null==this.stateController&&(this.stateController=new SlotConfig.CFreeSpinOfferGameStateController)},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.FSO,this.OnTransitionEnd,this,this.fromType);break;case SceneType.Feature1:case SceneType.Base:this.processIndicator.Hide(),this.stateController.Start(!1);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.StartStateController=function(){this.processIndicator.Hide(),this.stateController.Start(!0)},t.prototype.createBitmapByName=function(e){var t=new egret.Bitmap,n=RES.getRes(e);return t.texture=n,t},t.prototype.OnTransitionEnd=function(){this.stateController.Start()},t}(SceneHandler);__reflect(FreeSpinOfferGameSceneHandler.prototype,"FreeSpinOfferGameSceneHandler");var JackpotOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.hasExtraResource=!1,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[this.LoadJackpot()]},t.prototype.LoadJackpot=function(){switch(GameConfig.Locale){case Language.English:return RESGroupKey.JackpotEng;case Language.SimplifiedChinese:return RESGroupKey.JackpotCn;case Language.TraditionalChinese:return RESGroupKey.JackpotZh;case Language.Korean:return RESGroupKey.JackpotKr;case Language.Japanese:return RESGroupKey.JackpotJp;case Language.Thai:return RESGroupKey.JackpotTh;case Language.Vietnam:return RESGroupKey.JackpotVi;case Language.Indonesia:return RESGroupKey.JackpotId}},t.prototype.CreateSceneAndController=function(){var e=this.data,t=e.split(",");this.type=parseInt(t[0]),this.amount=parseInt(t[1]),null==this.jackpot&&(this.jackpot=new Jackpot),GameLayer.GetInstance().AddObjectToLayer(this.jackpot,Layer.Overlay),this.jackpot.InitJackpot(this.type,this.amount) },t}(OverlayComponentSceneHandler);__reflect(JackpotOverlayHandler.prototype,"JackpotOverlayHandler");var MiniLobbyOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.nLoadedIcon=0,n.hasExtraResource=!0,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[RESGroupKey.MiniLobby]},t.prototype.CreateSceneAndController=function(){GameConfig.platform==Platform.desktop?(null==this.miniLobby&&(this.miniLobby=new MiniLobby),GameLayer.GetInstance().AddObjectToLayer(this.miniLobby,Layer.UI)):(null==this.miniLobbyMobile&&(this.miniLobbyMobile=new MiniLobbyMobile),GameLayer.GetInstance().AddObjectToLayer(this.miniLobbyMobile,Layer.UI))},t.prototype.LoadExtraResource=function(){this.IsGameListArrayLoaded()&&this.IsGameListIconsLoaded()?this.CreateSceneAndController():this.LoadGameListDetail()},t.prototype.IsGameListArrayLoaded=function(){return null!=GameConfig.gameListDetail},t.prototype.IsGameListIconsLoaded=function(){return this.IsGameListArrayLoaded()&&GameConfig.gameIconArray.length==GameConfig.gameListDetail.gamelist.length},t.prototype.LoadGameListDetail=function(){var e=CommonFunc.getGameListURL(),t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.LoadGameListIcons=function(){for(var e="",t=0;t0},e.prototype.ContainAllDirections=function(e){return(this._value&e)==e},e.Left=1,e.Right=2,e.Top=4,e.Bottom=8,e}();__reflect(BetDirection.prototype,"BetDirection");var RankingOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.iconMaxCount=0,n.iconCount=0,n.hasExtraResource=!0,EventCentral.getInstance().addEventListener(SceneNotify.REQUESTING_RANKING_INFO,n.onRequestingRankingInfo,n),EventCentral.getInstance().addEventListener(SceneNotify.LOAD_RANKING_ICON,n.LoadIcon,n),n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[GameConfig.platform==Platform.desktop?RESGroupKey.Ranking:RESGroupKey.RankingMobile]},t.prototype.CreateSceneAndController=function(){GameConfig.isOverlayOpened=!0,GameConfig.platform==Platform.desktop?this.rankingPanel=new RankingPanel:this.rankingPanel=new RankingPanelMobile,this.popupLayer=new eui.UILayer,this.rankingPanel.addChild(this.popupLayer),this.popupLayer.touchThrough=!0,GameLayer.GetInstance().AddObjectToLayer(this.rankingPanel,Layer.Overlay)},t.prototype.LoadExtraResource=function(){this.IsGameListArrayLoaded()?this.LoadGameIconResJson():this.LoadGameListDetail()},t.prototype.LoadGameIconResJson=function(){if(GameConfig.isUseCDNVersion){var e;e=CDNPath2(),RES.loadConfig(e+GameConfig.gameIconPath+"resource/default.res.json",e+GameConfig.gameIconPath+"resource/")}else RES.loadConfig(GameConfig.gameIconPath+"resource/default.res.json",GameConfig.gameIconPath+"resource/");RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.addEventListener(RES.ResourceEvent.CONFIG_LOAD_ERROR,this.onConfigFailed,this)},t.prototype.onConfigCompleteHandle=function(e){console.log("onConfigCompleteHandle"),RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.removeEventListener(RES.ResourceEvent.CONFIG_LOAD_ERROR,this.onConfigFailed,this),this.processIndicator.Hide(),this.CreateSceneAndController()},t.prototype.onConfigFailed=function(e){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.removeEventListener(RES.ResourceEvent.CONFIG_LOAD_ERROR,this.onConfigFailed,this),console.log("onConfigFailed"),this.processIndicator.Hide()},t.prototype.onRequestingRankingInfo=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.RANKING_DATA_UPDATE,this.onRankingList,this),EventCentral.getInstance().removeEventListener(SceneNotify.RANKING_TIMEOUT,this.onTimeOut,this),GameConfig.platform==Platform.desktop?CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE.POPUP,this.popupLayer):CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE_MOBILE.POPUP,this.popupLayer),EventCentral.getInstance().addEventListener(SceneNotify.RANKING_TIMEOUT,this.onTimeOut,this),EventCentral.getInstance().addEventListener(SceneNotify.RANKING_DATA_UPDATE,this.onRankingList,this)},t.prototype.onRankingList=function(e){CommonFunc.clearPopUp(this.popupLayer),EventCentral.getInstance().removeEventListener(SceneNotify.RANKING_DATA_UPDATE,this.onRankingList,this)},t.prototype.LoadIcon=function(e){GameConfig.platform==Platform.desktop?CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE.POPUP,this.popupLayer):CommonFunc.showPopUp(Localization.Instance.getString("common.betlog.loading"),POPUP_TYPE_MOBILE.POPUP,this.popupLayer);var t=e.data;this.iconMaxCount=t.length,this.iconCount=0;for(var n,i=0;i=0&&(o.indexMap[e]=a),i?webaudio.playUrl(t,n):e==o.curBgm&&webaudio.playUrl(t,n)}),this.audioMap[e]=t,this.urlMap[t]=e)},t.prototype.getNameByUrl=function(e){return this.urlMap[e]?this.urlMap[e]:e},t.prototype.unloadWebAudio=function(){this.useWebAudio&&this.doSoundUnload&&(webaudio.unloadAll(),this.audioMap={},this.urlMap={},this.indexMap={})},t.prototype.loadWebAudioGroup=function(e){if(this.useWebAudio&&this.curSoundGroup!=e){this.unloadWebAudio();for(var t=RES.getGroupByName(e),n=0;n1&&(s.panel=new PaytablePanel,s.panel.addEventListener(egret.TouchEvent.TOUCH_TAP,function(e){switch(e.data){case"prev":s.curPage>0&&s.doPrev();break;case"next":s.curPage1&&(s.pageDot=new PagingDotPane(n.length,r.x,r.y),s.addChild(s.pageDot)),s.addEventListener(egret.Event.ADDED_TO_STAGE,s.init,s),s.addEventListener(egret.Event.REMOVED_FROM_STAGE,s.release,s),s}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),null!=this.foreground&&this.addChild(this.foreground)},Object.defineProperty(t.prototype,"page",{get:function(){return this.curPage},set:function(e){this.curPage=e,this.onPagingEnd()},enumerable:!0,configurable:!0}),t.prototype.init=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.init,this);for(var e=0;3>e;e++){var t=new eui.Group;t.x=(e-1)*this.width,t.y=0,t.width=this.width,t.height=this.height,this.content.addChild(t),1==e&&(t.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegan,this),t.addEventListener(egret.TouchEvent.TOUCH_END,this.onTouchEnded,this),t.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),t.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onTouchEnded,this))}this.onPagingEnd()},t.prototype.release=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.release,this)},t.prototype.onTouchBegan=function(e){this.touchX=e.stageX},t.prototype.onTouchEnded=function(e){var t=this.content.getChildAt(1);t.x<.3*-this.width?this.doNext():t.x>.3*this.width?this.doPrev():this.doCancel()},t.prototype.onTouchMove=function(e){var t=e.stageX-this.touchX;if(!this.isLoop){if(0==this.curPage&&t>0)return;if(this.curPage>=this.mPages.length-1&&0>t)return}for(var n=0;3>n;n++){var i=this.content.getChildAt(n);i.x=t+(n-1)*this.width}},t.prototype.doNext=function(){if(this.logPage==this.curPage){this.curPage++;for(var e=0;3>e;e++){var t=this.content.getChildAt(e);egret.Tween.removeTweens(t);var n=egret.Tween.get(t);0==e?n.to({x:(e-2)*this.width},500).call(this.onPagingEnd,this):n.to({x:(e-2)*this.width},500)}}},t.prototype.doPrev=function(){if(this.logPage==this.curPage){this.curPage--;for(var e=0;3>e;e++){var t=this.content.getChildAt(e);egret.Tween.removeTweens(t);var n=egret.Tween.get(t);0==e?n.to({x:this.width*e},500).call(this.onPagingEnd,this):n.to({x:this.width*e},500)}}},t.prototype.doCancel=function(){for(var e=0;3>e;e++){var t=this.content.getChildAt(e);egret.Tween.removeTweens(t);var n=egret.Tween.get(t);n.to({x:(e-1)*this.width,y:0},500,egret.Ease.sineIn)}},t.prototype.onPagingEnd=function(){if(0==this.mPages.length)return void CommonFunc.log("Pager stack is empty");null!=this.panel&&(this.curPage>=this.mPages.length-1?(this.panel.SetEnableNext(!1),this.panel.SetEnablePrev(!0)):this.curPage<=0?(this.panel.SetEnablePrev(!1),this.panel.SetEnableNext(!0)):(this.panel.SetEnablePrev(!0),this.panel.SetEnableNext(!0))),this.curPage>=this.mPages.length&&(this.isLoop?this.curPage-=this.mPages.length:this.curPage=this.mPages.length-1),this.curPage<0&&(this.isLoop?this.curPage+=this.mPages.length:this.curPage=0),this.logPage=this.curPage;for(var e=0;3>e;e++){var t=this.curPage+e-1;if(0>t?t+=this.mPages.length:t>=this.mPages.length&&(t-=this.mPages.length),t!=this.curPage||1==e){var n=this.content.getChildAt(e);n.x=(e-1)*this.width,n.removeChildren();var i=this.mPages[t];n.addChild(i)}}this.pageDot&&(this.pageDot.selected=this.curPage)},t}(eui.Component);__reflect(HorizontalPager.prototype,"HorizontalPager");var SpacebarState;!function(e){e[e.Spin=0]="Spin",e[e.Stop=1]="Stop",e[e.Disable=2]="Disable"}(SpacebarState||(SpacebarState={}));var KeyPressManager=function(){function e(){this.downKey={},document.addEventListener("keydown",function(t){CommonFunc.log(t.keyCode),e.Instance.downKey[t.keyCode]=1,e.Instance.CheckKeyPattern()},!1),document.addEventListener("keyup",function(t){e.Instance.downKey[t.keyCode]=0},!1),EventCentral.getInstance().addEventListener(SceneNotify.START_ENABLE,this.EnableSpin,this),EventCentral.getInstance().addEventListener(SysNotify.ENABLE_ALL_BUTTON,this.EnableSpin,this),EventCentral.getInstance().addEventListener(SceneNotify.STOP_ENABLE,this.EnableStop,this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_BOOKING_START,this.EnableStop,this),EventCentral.getInstance().addEventListener(SysNotify.DISABLE_ALL_BUTTON,this.DisableSpacebar,this)}return Object.defineProperty(e,"Instance",{get:function(){return this._instance||(this._instance=new e),this._instance},enumerable:!0,configurable:!0}),e.prototype.EnableSpin=function(e){SocketManager.getInstance().GetData().IsBalanceReady()?this.currentState=SpacebarState.Spin:this.currentState=SpacebarState.Disable},e.prototype.EnableStop=function(e){this.currentState=SpacebarState.Stop},e.prototype.DisableSpacebar=function(e){this.currentState=SpacebarState.Disable},e.prototype.CheckKeyPattern=function(){if(1==this.downKey[17]&&1==this.downKey[18]&&1==this.downKey[73]&&CommonFunc.ShowMessage("Game version: "+GameConfig.version+"\n \nServer version: \n"+SocketManager.getInstance().GetData().serverVersion+"\n\n"),GameConfig.platform==Platform.desktop&&1==this.downKey[32])switch(this.currentState){case SpacebarState.Spin:if(!SocketManager.getInstance().GetData().IsEnoughBalance()&&!(0!=SocketManager.getInstance().GetData().triggeredType||SocketManager.getInstance().GetData().nextAction>=3)&&!SocketManager.getInstance().GetData().fso)return CommonFunc.log("SPIN PRESSED BUT NOT ENOUGH BALANCE"),void(SocketManager.getInstance().GetData().balance<0?CommonFunc.ShowMessage(Localization.Instance.getString("common.system.unable_retrieve_balance")):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.insufficient_fund_beforeSpin")));EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Start)),this.currentState=SpacebarState.Disable;break;case SpacebarState.Stop:EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop)),SocketManager.getInstance().GetData().triggeredType==BonusType.None&&(this.currentState=SpacebarState.Disable);break;case SpacebarState.Disable:}},e}();__reflect(KeyPressManager.prototype,"KeyPressManager");var VideoManager=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.intervalID=-1,t.map={},t}return __extends(t,e),t.GetInstance=function(){return null==t._instance&&(t._instance=new t),t._instance},t.prototype.videoLoad=function(e,t,n){void 0===n&&(n=null),this.completeVideoCount=0,this.totalVideoCount=0,this.indicator=t,this.progressArray=[];for(var i=0;ia;a+=o)a+o>n&&(o=n-a),i+=String.fromCharCode.apply(null,t.subarray(a,a+o)); return"data:video/mp4;base64,"+btoa(i)},t.prototype.AddAsset=function(e,t){this.ContainKey(e)?CommonFunc.log("Key:"+e+" is already exist."):this.map[e]=t},t.prototype.RemoveAsset=function(e){this.ContainKey(e)&&(this.map[e]=null)},t.prototype.ContainKey=function(e){return null==this.map[e]?!1:!0},t.prototype.GetAsset=function(e){return this.ContainKey(e)?this.map[e]:void 0},t}(egret.EventDispatcher);__reflect(VideoManager.prototype,"VideoManager");var NewSlotActionManager=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype._setGameData=function(t){e.prototype._setGameData.call(this,t),void 0!==t[JSONTag.NextAction]?this.data.nextAction=t[JSONTag.NextAction]:this.data.nextAction=NGABonusType.None},t}(SlotActionManager);__reflect(NewSlotActionManager.prototype,"NewSlotActionManager");var GameScene=function(){function e(){}return e.MAIN_GAME="main_game",e.FEATURE_GAME="feature1",e.FEATURE_GAME_2="feature2",e.DOUBLE_UP="doubleup",e.SETTING_MENU="setting",e.views=[e.MAIN_GAME,e.FEATURE_GAME,e.FEATURE_GAME_2,e.DOUBLE_UP,e.SETTING_MENU],e}();__reflect(GameScene.prototype,"GameScene");var SocketClient=function(){function e(e){void 0===e&&(e=0),this._bufferPos=0,this._pckHead=!1,this._packetSize=0,this.target=null,this.remoteType=0,this.isHandshaked=!1,this.remoteType=e,this._initialize()}return e.prototype._initialize=function(){this.socket=new egret.WebSocket,this._buffer=new egret.ByteArray,this._buffer.endian=egret.Endian.LITTLE_ENDIAN,this._bbuffer=new egret.ByteArray,this._bbuffer.endian=egret.Endian.LITTLE_ENDIAN,this._subPacket=new egret.ByteArray,this._subPacket.endian=egret.Endian.LITTLE_ENDIAN,this.socket.type=egret.WebSocket.TYPE_BINARY,this.socket.addEventListener(egret.ProgressEvent.SOCKET_DATA,this.onReceiveMessage,this),this.socket.addEventListener(egret.Event.CONNECT,this.onSocketOpen,this),this.socket.addEventListener(egret.Event.CLOSE,this.onSocketClose,this),this.socket.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onSocketError,this)},e.prototype.connect=function(e,t,n){null==this.socket&&this._initialize(),this.target=n,this.socket.connect(e,t)},e.prototype.close=function(){this.socket.close(),this.socket.removeEventListener(egret.ProgressEvent.SOCKET_DATA,this.onReceiveMessage,this),this.socket.removeEventListener(egret.Event.CONNECT,this.onSocketOpen,this),this.socket.removeEventListener(egret.Event.CLOSE,this.onSocketClose,this),this.socket.removeEventListener(egret.IOErrorEvent.IO_ERROR,this.onSocketError,this),this.socket=null},e.prototype.onSocketOpen=function(){CommonFunc.log("SocketClient.onSocketOpen ("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScOpen():this.target.onSpOpen())},e.prototype.onSocketClose=function(e){CommonFunc.log("SocketClient.onSocketClose("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScClose(e):this.target.onSpClose(e))},e.prototype.onReceiveMessage=function(e){if(this._buffer.length>0?(this._bbuffer.clear(),this.socket.readBytes(this._bbuffer),this._bufferPos=this._buffer.position,this._buffer.position=this._buffer.length,this._buffer.writeBytes(this._bbuffer),this._buffer.position=this._bufferPos):this.socket.readBytes(this._buffer),!this._pckHead){if(170!=this._buffer.readUnsignedByte())return void console.warn("Invalid packet head");this._pckHead=!0}if(0==this._packetSize){if(!(this._buffer.bytesAvailable>=4))return void console.warn("Not enough bits("+this._buffer.bytesAvailable+") for packet size");this._packetSize=this._buffer.readUnsignedInt()}if(this._packetSize>0){if(this._buffer.bytesAvailable>=this._packetSize){var t=this._deserialize(this._buffer);this._packetSize=0,this._pckHead=!1,this._buffer.clear(),null!=this.target&&(null!=t?0==this.remoteType?this.target.onScCommand(t):this.target.onSpCommand(t):CommonFunc.log("null command received"))}}else console.warn("Invalid packet size "+this._packetSize)},e.prototype.onSocketError=function(){CommonFunc.log("onSocketError"),null!=this.target&&(0==this.remoteType?this.target.onScSocketError():this.target.onSpSocketError())},e.prototype.send=function(e){if(null!==this.socket&&this.socket.connected){var t=this._serialize(e);return this.socket.writeBytes(t,0,t.bytesAvailable),this.socket.flush(),0}return CommonFunc.log("socket not connected"),-1},e.prototype._serialize=function(e){var t=e.toBytes(),n=new egret.ByteArray;return n.endian=egret.Endian.LITTLE_ENDIAN,n.writeByte(170),n.writeUnsignedInt(6+t.length),BitwiseUtil.writeUint(n,e.getCmdID(),2),n.writeUnsignedInt(t.length),n.writeBytes(t),n.position=0,n},e.prototype.DebugPrintPacket=function(e){BitwiseUtil.__DebugPrintbyteArray__(this._serialize(e))},e.prototype._deserialize=function(e){for(;e.bytesAvailable>0;){var t=BitwiseUtil.readUint(e,2),n=BitwiseUtil.readUint(e);if(n>e.bytesAvailable){console.warn("Unexpected data size "+n+" command id "+t);break}e.readBytes(this._subPacket,0,n);var i=Command.getCommand(t);if(null!=i)return this._subPacket.position=0,i.fromBytes(this._subPacket),this._subPacket.clear(),i}},e}();__reflect(SocketClient.prototype,"SocketClient");var SocketManager=function(e){function t(){var t=e.call(this)||this;return t.isStarted=!1,t.isReconnecting=!1,t.isWaitingForResponse=!1,t.isBetLogReconnect=!1,t.isFSORedeemReconnect=!1,t.isRankingReconnect=!1,t.isActionPending=!1,t.isWaitingForBalanceUpdate=!1,t.isGameListRcvfromServer=!1,t}return __extends(t,e),t.getInstance=function(){return null==this.instance&&(this.instance=new t),this.instance},t.prototype.SetLoginManager=function(e){this._loginManager=e,this.AddEventListeners()},t.prototype.SetActionManager=function(e){this._actionManager=e},t.prototype.IsConnected=function(){return this._loginManager.IsConnected()},t.prototype.Reconnect=function(){this.isReconnecting=!0,this._loginManager.Reconnect()},t.prototype.ForceClose=function(){this._loginManager.ForceClose()},t.prototype.SetNetSocket=function(e,t){this._loginManager.SetNetSocket(e,t),this._actionManager.SetNetSocket(t)},t.prototype.GetData=function(){return this._actionManager.GetData()},t.prototype.SetLocation=function(e,t,n){void 0===n&&(n=null),this._loginManager.setLocation(e,t,n)},t.prototype.Login=function(e,t,n){this._betSource=n,this._loginManager.login(e,t,n)},t.prototype.Logout=function(){this._loginManager.close()},t.prototype.AddEventListeners=function(){this._loginManager.addEventListener(egret.Event.COMPLETE,this.onLoginComplete,this),this._loginManager.addEventListener(egret.Event.CLOSE,this.onLoginFailed,this)},t.prototype.RemoveEventListeners=function(){this._loginManager.removeEventListener(egret.Event.COMPLETE,this.onLoginComplete,this),this._loginManager.removeEventListener(egret.Event.CLOSE,this.onLoginFailed,this)},t.prototype.onLoginComplete=function(e){},t.prototype.onLoginFailed=function(e){},t.prototype.SendSpinAction=function(){this._actionManager.SendAction(SlotAction.Spin,this._betSource)},t.prototype.SendActionDone=function(){this._actionManager.SendActionDone()},t.prototype.SendFreeSpinAction=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Free,this._betSource,e)},t.prototype.SendFreeSpin2Action=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Free2,this._betSource,e)},t.prototype.SendFreeSpin3Action=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Free3,this._betSource,e)},t.prototype.SendFreeAction2Debug=function(e){this._actionManager.SendAction(SlotAction.DebugFree2,this._betSource,e)},t.prototype.SendFreeAction3Debug=function(e){this._actionManager.SendAction(SlotAction.DebugFree3,this._betSource,e)},t.prototype.SendFeature1Action=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.Feature1,this._betSource,e)},t.prototype.SendFeature1Debug=function(e){void 0===e&&(e=null),this._actionManager.SendAction(SlotAction.DebugFeature1,this._betSource,e)},t.prototype.SendSpinActionDebug=function(e){this._actionManager.SendAction(SlotAction.DebugSpin,this._betSource,e)},t.prototype.SendFreeActionDebug=function(e){this._actionManager.SendAction(SlotAction.DebugFree,this._betSource,e)},t.prototype.SendJackpotDebug=function(e){this._actionManager.SendDebugJackpot(e)},t.prototype.SendRequestEGameTokenAction=function(e){void 0===e&&(e=""),this._actionManager.SendRequestTokenAction(e)},t.prototype.SendBetLogAction=function(e,t){this._actionManager.SendBetQuery(e,t)},t.prototype.SendFsoRedeemAction=function(e){this._actionManager.SendFsoRedeemAction(e)},t.prototype.SendFsoEventDetailAction=function(e){this._actionManager.SendFsoEventDetailAction(e)},t.prototype.SendFsoNotificationReceived=function(){this._actionManager.SendFsoNotificationReceived()},t.prototype.SendRequestFSOEventListAction=function(){this._actionManager.SendRequestFSOEventListAction()},t.prototype.SendRequestRankingList=function(e,t){this._actionManager.SendRankingListRequest(e,t)},t.prototype.SendLaunchCompleteAction=function(){this._actionManager.SendLaunchCompleteAction()},t.prototype.SendRequestCampaignDetailAction=function(e){this._actionManager.SendRequestCampaignDetailAction(e)},t.prototype.SendRequestCampaignWinnerListAction=function(e){this._actionManager.SendRequestCampaignWinnerListAction(e)},t.ERR_COMMAND_FAIL=54,t.ERR_COMMAND_BUZY=94,t.ERR_COMMAND_LOST=95,t.ERR_SERVER_KICK=9001,t.ERR_SERVER_NOT_CONNECTED=9002,t.ERR_SOCKET_CLOSED=9003,t.ERR_SC_SOCKET_ERROR=9004,t.ERR_SP_SOCKET_ERROR=9005,t.instance=null,t}(egret.EventDispatcher);__reflect(SocketManager.prototype,"SocketManager");var CMDCampaign=function(){function e(){this.CampaignID=0,this.Popup=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.Popup=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.Popup,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="Popup(B)="+this.Popup+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Campaign"},e}();__reflect(CMDCampaign.prototype,"CMDCampaign",["ICommand"]);var CMDCampaignWinner=function(){function e(){this.AwardTime=0,this.PlayerID=0,this.MaskedName="",this.Prize=0}return e.prototype.fromBytes=function(e){this.AwardTime=BitwiseUtil.readInt53(e),this.PlayerID=BitwiseUtil.readUint(e,4),this.MaskedName=BitwiseUtil.readString(e),this.Prize=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.AwardTime),BitwiseUtil.writeUint(e,this.PlayerID,4),BitwiseUtil.writeString(e,this.MaskedName),BitwiseUtil.writeUint(e,this.Prize,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="AwardTime(Q)="+this.AwardTime+" ",e+="PlayerID(D)="+this.PlayerID+" ",e+="MaskedName(S)="+this.MaskedName+" ",e+="Prize(B)="+this.Prize+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"CampaignWinner"},e}();__reflect(CMDCampaignWinner.prototype,"CMDCampaignWinner",["ICommand"]);var CMDCsAck=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 35002},e.prototype.getCmdName=function(){return"CsAck"},e}();__reflect(CMDCsAck.prototype,"CMDCsAck",["ICommand"]);var CMDCsRequestServer=function(){function e(){this.ClientKey=0,this.ID=0,this.Token=""}return e.prototype.fromBytes=function(e){this.ClientKey=BitwiseUtil.readUint(e,4),this.ID=BitwiseUtil.readUint(e,4),this.Token=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.ClientKey,4),BitwiseUtil.writeUint(e,this.ID,4),BitwiseUtil.writeString(e,this.Token),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="ClientKey(D)="+this.ClientKey+" ",e+="ID(D)="+this.ID+" ",e+="Token[33](C)="+this.Token+" "},e.prototype.getCmdID=function(){return 35001},e.prototype.getCmdName=function(){return"CsRequestServer"},e}();__reflect(CMDCsRequestServer.prototype,"CMDCsRequestServer",["ICommand"]);var CMDCsSimplayRequestSlotServer=function(){function e(){this.PlayerLoginName="",this.GameCode="",this.Token=""}return e.prototype.fromBytes=function(e){this.PlayerLoginName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.Token=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.PlayerLoginName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeString(e,this.Token),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerLoginName(S)="+this.PlayerLoginName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="Token(S)="+this.Token+" "},e.prototype.getCmdID=function(){return 35007},e.prototype.getCmdName=function(){return"CsSimplayRequestSlotServer"},e}();__reflect(CMDCsSimplayRequestSlotServer.prototype,"CMDCsSimplayRequestSlotServer",["ICommand"]);var CMDField=function(){function e(){this.Index=0,this.Value=0}return e.prototype.fromBytes=function(e){this.Index=BitwiseUtil.readUint(e,2),this.Value=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Index,2),BitwiseUtil.writeUint(e,this.Value,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Index(W)="+this.Index+" ",e+="Value(D)="+this.Value+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Field"},e}();__reflect(CMDField.prototype,"CMDField",["ICommand"]);var CMDFsoEventDetail=function(){function e(){this.EventId=0,this.EventName="",this.EventNote="",this.ExpiryDate="",this.SpinOfferCount=0,this.SpinPlayed=0,this.CoinValue=0,this.LineBet=0,this.Line=0,this.Active=0,this.IsRedeemed=0,this.GameList=new Array}return e.prototype.fromBytes=function(e){this.EventId=BitwiseUtil.readUint(e,4),this.EventName=BitwiseUtil.readString(e),this.EventNote=BitwiseUtil.readString(e),this.ExpiryDate=BitwiseUtil.readString(e),this.SpinOfferCount=BitwiseUtil.readUint(e,2),this.SpinPlayed=BitwiseUtil.readUint(e,2),this.CoinValue=BitwiseUtil.readInt53(e),this.LineBet=BitwiseUtil.readUint(e,4),this.Line=BitwiseUtil.readUint(e,4),this.Active=BitwiseUtil.readUint(e,1),this.IsRedeemed=BitwiseUtil.readUint(e,1);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=BitwiseUtil.readString(e);this.GameList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.EventId,4),BitwiseUtil.writeString(e,this.EventName),BitwiseUtil.writeString(e,this.EventNote),BitwiseUtil.writeString(e,this.ExpiryDate),BitwiseUtil.writeUint(e,this.SpinOfferCount,2),BitwiseUtil.writeUint(e,this.SpinPlayed,2),BitwiseUtil.writeInt53(e,this.CoinValue),BitwiseUtil.writeUint(e,this.LineBet,4),BitwiseUtil.writeUint(e,this.Line,4),BitwiseUtil.writeUint(e,this.Active,1),BitwiseUtil.writeUint(e,this.IsRedeemed,1),BitwiseUtil.writeUint(e,this.GameList.length,2);for(var t in this.GameList)BitwiseUtil.writeString(e,this.GameList[t]);return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="EventId(D)="+this.EventId+" ",e+="EventName(S)="+this.EventName+" ",e+="EventNote(S)="+this.EventNote+" ",e+="ExpiryDate(S)="+this.ExpiryDate+" ",e+="SpinOfferCount(W)="+this.SpinOfferCount+" ",e+="SpinPlayed(W)="+this.SpinPlayed+" ",e+="CoinValue(Q)="+this.CoinValue+" ",e+="LineBet(D)="+this.LineBet+" ",e+="Line(D)="+this.Line+" ",e+="Active(B)="+this.Active+" ",e+="IsRedeemed(B)="+this.IsRedeemed+" ",e+="GameList_size(W)="+this.GameList.length+" ",e+="GameList(S)=[";for(var t in this.GameList)t>0&&(e+=", "),e+=this.GameList[t];return e+="] "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"FsoEventDetail"},e}();__reflect(CMDFsoEventDetail.prototype,"CMDFsoEventDetail",["ICommand"]);var CMDFsoEventList=function(){function e(){this.EventId=0,this.EventName="",this.EventNote="",this.ExpiryDate="",this.SpinOfferCount=0,this.SpinPlayed=0,this.DenominationValue=0,this.TotalOfferValue=0,this.EnabledRedeem=0,this.GameCount=0,this.GameList=""}return e.prototype.fromBytes=function(e){this.EventId=BitwiseUtil.readUint(e,4),this.EventName=BitwiseUtil.readString(e),this.EventNote=BitwiseUtil.readString(e),this.ExpiryDate=BitwiseUtil.readString(e),this.SpinOfferCount=BitwiseUtil.readUint(e,2),this.SpinPlayed=BitwiseUtil.readUint(e,2),this.DenominationValue=BitwiseUtil.readUint(e,4),this.TotalOfferValue=BitwiseUtil.readUint(e,4),this.EnabledRedeem=BitwiseUtil.readUint(e,1),this.GameCount=BitwiseUtil.readUint(e,2),this.GameList=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.EventId,4),BitwiseUtil.writeString(e,this.EventName),BitwiseUtil.writeString(e,this.EventNote),BitwiseUtil.writeString(e,this.ExpiryDate),BitwiseUtil.writeUint(e,this.SpinOfferCount,2),BitwiseUtil.writeUint(e,this.SpinPlayed,2),BitwiseUtil.writeUint(e,this.DenominationValue,4),BitwiseUtil.writeUint(e,this.TotalOfferValue,4),BitwiseUtil.writeUint(e,this.EnabledRedeem,1),BitwiseUtil.writeUint(e,this.GameCount,2),BitwiseUtil.writeString(e,this.GameList),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="EventId(D)="+this.EventId+" ",e+="EventName(S)="+this.EventName+" ",e+="EventNote(S)="+this.EventNote+" ",e+="ExpiryDate(S)="+this.ExpiryDate+" ",e+="SpinOfferCount(W)="+this.SpinOfferCount+" ",e+="SpinPlayed(W)="+this.SpinPlayed+" ",e+="DenominationValue(D)="+this.DenominationValue+" ",e+="TotalOfferValue(D)="+this.TotalOfferValue+" ",e+="EnabledRedeem(B)="+this.EnabledRedeem+" ",e+="GameCount(W)="+this.GameCount+" ",e+="GameList(S)="+this.GameList+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"FsoEventList"},e}();__reflect(CMDFsoEventList.prototype,"CMDFsoEventList",["ICommand"]);var CMDGameRankingInfo=function(){function e(){this.Rank=0,this.PlayerID=0,this.PlayerName="",this.GameCode="",this.GameTimeInUTCSecond=0,this.SingleBetPayoutAmount=0,this.BetAmount=0}return e.prototype.fromBytes=function(e){this.Rank=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readInt53(e),this.PlayerName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.GameTimeInUTCSecond=BitwiseUtil.readInt53(e),this.SingleBetPayoutAmount=BitwiseUtil.readInt53(e),this.BetAmount=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Rank,4),BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeInt53(e,this.GameTimeInUTCSecond),BitwiseUtil.writeInt53(e,this.SingleBetPayoutAmount),BitwiseUtil.writeInt53(e,this.BetAmount),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Rank(D)="+this.Rank+" ",e+="PlayerID(Q)="+this.PlayerID+" ",e+="PlayerName(S)="+this.PlayerName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="GameTimeInUTCSecond(Q)="+this.GameTimeInUTCSecond+" ",e+="SingleBetPayoutAmount(Q)="+this.SingleBetPayoutAmount+" ",e+="BetAmount(Q)="+this.BetAmount+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"GameRankingInfo"},e}();__reflect(CMDGameRankingInfo.prototype,"CMDGameRankingInfo",["ICommand"]);var CMDJackpot=function(){function e(){this.MajorJP=0,this.MinorJP=0,this.MiniJP=0}return e.prototype.fromBytes=function(e){this.MajorJP=BitwiseUtil.readInt53(e),this.MinorJP=BitwiseUtil.readInt53(e),this.MiniJP=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.MajorJP),BitwiseUtil.writeInt53(e,this.MinorJP),BitwiseUtil.writeInt53(e,this.MiniJP),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="MajorJP(Q)="+this.MajorJP+" ",e+="MinorJP(Q)="+this.MinorJP+" ",e+="MiniJP(Q)="+this.MiniJP+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Jackpot"},e}();__reflect(CMDJackpot.prototype,"CMDJackpot",["ICommand"]);var CMDJackpotDetail=function(){function e(e){void 0===e&&(e=null),this.PlayerID=0,this.PlayerName="",this.GameCode="",this.GameTime=0,this.JackpotType=0,this.JackpotAmount=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.PlayerID=BitwiseUtil.readInt53(e),this.PlayerName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.GameTime=BitwiseUtil.readInt53(e),this.JackpotType=BitwiseUtil.readUint(e,2),this.JackpotAmount=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeInt53(e,this.GameTime),BitwiseUtil.writeUint(e,this.JackpotType,2),BitwiseUtil.writeInt53(e,this.JackpotAmount),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerID(Q)="+this.PlayerID+" ",e+="PlayerName(S)="+this.PlayerName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="GameTime(Q)="+this.GameTime+" ",e+="JackpotType(W)="+this.JackpotType+" ",e+="JackpotAmount(Q)="+this.JackpotAmount+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"JackpotDetail"},e}();__reflect(CMDJackpotDetail.prototype,"CMDJackpotDetail",["ICommand"]);var CMDJackpotRankingInfo=function(){function e(){this.Rank=0,this.PlayerID=0,this.PlayerName="",this.GameCode="",this.GameTime=0,this.JackpotType=0,this.BetAmount=0,this.JackpotAmount=0}return e.prototype.fromBytes=function(e){this.Rank=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readInt53(e),this.PlayerName=BitwiseUtil.readString(e),this.GameCode=BitwiseUtil.readString(e),this.GameTime=BitwiseUtil.readInt53(e),this.JackpotType=BitwiseUtil.readUint(e,2),this.BetAmount=BitwiseUtil.readInt53(e),this.JackpotAmount=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Rank,4),BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeInt53(e,this.GameTime),BitwiseUtil.writeUint(e,this.JackpotType,2),BitwiseUtil.writeInt53(e,this.BetAmount),BitwiseUtil.writeInt53(e,this.JackpotAmount),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Rank(D)="+this.Rank+" ",e+="PlayerID(Q)="+this.PlayerID+" ",e+="PlayerName(S)="+this.PlayerName+" ",e+="GameCode(S)="+this.GameCode+" ",e+="GameTime(Q)="+this.GameTime+" ",e+="JackpotType(W)="+this.JackpotType+" ",e+="BetAmount(Q)="+this.BetAmount+" ",e+="JackpotAmount(Q)="+this.JackpotAmount+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"JackpotRankingInfo"},e}();__reflect(CMDJackpotRankingInfo.prototype,"CMDJackpotRankingInfo",["ICommand"]);var CMDPrize=function(){function e(){this.Prize=0,this.Type=0,this.Value=0,this.PrizeCount=0,this.PrizeValueInCurrency=0}return e.prototype.fromBytes=function(e){this.Prize=BitwiseUtil.readUint(e,1),this.Type=BitwiseUtil.readUint(e,1),this.Value=BitwiseUtil.readInt53(e),this.PrizeCount=BitwiseUtil.readUint(e,4),this.PrizeValueInCurrency=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Prize,1),BitwiseUtil.writeUint(e,this.Type,1),BitwiseUtil.writeInt53(e,this.Value),BitwiseUtil.writeUint(e,this.PrizeCount,4),BitwiseUtil.writeInt53(e,this.PrizeValueInCurrency),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Prize(B)="+this.Prize+" ",e+="Type(B)="+this.Type+" ",e+="Value(Q)="+this.Value+" ",e+="PrizeCount(D)="+this.PrizeCount+" ",e+="PrizeValueInCurrency(Q)="+this.PrizeValueInCurrency+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"Prize"},e}();__reflect(CMDPrize.prototype,"CMDPrize",["ICommand"]);var CMDPsCampaignDetail=function(){function e(){this.CampaignID=0,this.PlayerID=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PlayerID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="PlayerID(D)="+this.PlayerID+" "},e.prototype.getCmdID=function(){return 55082},e.prototype.getCmdName=function(){return"PsCampaignDetail"},e}();__reflect(CMDPsCampaignDetail.prototype,"CMDPsCampaignDetail",["ICommand"]);var CMDPsCampaignWinner=function(){function e(){this.CampaignID=0,this.PlayerID=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PlayerID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="PlayerID(D)="+this.PlayerID+" "},e.prototype.getCmdID=function(){return 55083},e.prototype.getCmdName=function(){return"PsCampaignWinner"},e}();__reflect(CMDPsCampaignWinner.prototype,"CMDPsCampaignWinner",["ICommand"]);var CMDPsEgameDebugJackpot=function(){function e(){this.JackpotType=0}return e.prototype.fromBytes=function(e){this.JackpotType=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.JackpotType,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="JackpotType(B)="+this.JackpotType+" "},e.prototype.getCmdID=function(){return 55027},e.prototype.getCmdName=function(){return"PsEgameDebugJackpot"},e}();__reflect(CMDPsEgameDebugJackpot.prototype,"CMDPsEgameDebugJackpot",["ICommand"]);var CMDPsEgameLogin=function(){function e(e){void 0===e&&(e=null),this.Token="",this.BetSource=0,this.GameCode="",this.AdditionalRequest="",this.Referer="",this.Socket=e}return e.prototype.fromBytes=function(e){this.Token=BitwiseUtil.readString(e),this.BetSource=BitwiseUtil.readUint(e,4),this.GameCode=BitwiseUtil.readString(e),this.AdditionalRequest=BitwiseUtil.readString(e),this.Referer=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Token),BitwiseUtil.writeUint(e,this.BetSource,4),BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeString(e,this.AdditionalRequest),BitwiseUtil.writeString(e,this.Referer),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Token[33](C)="+this.Token+" ",e+="BetSource(D)="+this.BetSource+" ",e+="GameCode(S)="+this.GameCode+" ",e+="AdditionalRequest(S)="+this.AdditionalRequest+" ",e+="Referer(S)="+this.Referer+" "},e.prototype.getCmdID=function(){return 55018},e.prototype.getCmdName=function(){return"PsEgameLogin"},e}();__reflect(CMDPsEgameLogin.prototype,"CMDPsEgameLogin",["ICommand"]);var CMDPsFsoEventDetail=function(){function e(){this.FSOEventID=0}return e.prototype.fromBytes=function(e){this.FSOEventID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.FSOEventID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="FSOEventID(D)="+this.FSOEventID+" "},e.prototype.getCmdID=function(){return 55075},e.prototype.getCmdName=function(){return"PsFsoEventDetail"},e}();__reflect(CMDPsFsoEventDetail.prototype,"CMDPsFsoEventDetail",["ICommand"]);var CMDPsFsoEventList=function(){function e(){this.Tag=0}return e.prototype.fromBytes=function(e){this.Tag=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Tag,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Tag(D)="+this.Tag+" "},e.prototype.getCmdID=function(){return 55076},e.prototype.getCmdName=function(){return"PsFsoEventList"},e}();__reflect(CMDPsFsoEventList.prototype,"CMDPsFsoEventList",["ICommand"]);var CMDPsFsoNotificationReceived=function(){function e(){this.PlayerId=0}return e.prototype.fromBytes=function(e){this.PlayerId=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerId),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerId(Q)="+this.PlayerId+" "},e.prototype.getCmdID=function(){return 55074},e.prototype.getCmdName=function(){return"PsFsoNotificationReceived"},e}();__reflect(CMDPsFsoNotificationReceived.prototype,"CMDPsFsoNotificationReceived",["ICommand"]);var CMDPsFsoRedeem=function(){function e(){this.FSOEventId=0}return e.prototype.fromBytes=function(e){this.FSOEventId=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.FSOEventId,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="FSOEventId(D)="+this.FSOEventId+" "},e.prototype.getCmdID=function(){return 55073},e.prototype.getCmdName=function(){return"PsFsoRedeem"},e}();__reflect(CMDPsFsoRedeem.prototype,"CMDPsFsoRedeem",["ICommand"]);var CMDPsLaunchComplete=function(){function e(){this.Token=""}return e.prototype.fromBytes=function(e){this.Token=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Token),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Token(S)="+this.Token+" "},e.prototype.getCmdID=function(){return 55078},e.prototype.getCmdName=function(){return"PsLaunchComplete"},e}();__reflect(CMDPsLaunchComplete.prototype,"CMDPsLaunchComplete",["ICommand"]);var CMDPsLogin=function(){function e(){this.Token="",this.BetSource=16,this.GameCode="" }return e.prototype.fromBytes=function(e){this.Token=BitwiseUtil.readString(e),this.BetSource=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Token),BitwiseUtil.writeUint(e,this.BetSource,4),BitwiseUtil.writeString(e,this.GameCode),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Token[33](C)="+this.Token+" ",e+="BetSource(D)="+this.BetSource+" "},e.prototype.getCmdID=function(){return 55018},e.prototype.getCmdName=function(){return"PsLogin"},e}();__reflect(CMDPsLogin.prototype,"CMDPsLogin",["ICommand"]);var CMDPsRankingList=function(){function e(e){void 0===e&&(e=null),this.RankingType=0,this.GameCategory=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.RankingType=BitwiseUtil.readUint(e,4),this.GameCategory=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.RankingType,4),BitwiseUtil.writeUint(e,this.GameCategory,4),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Type(D)="+this.RankingType+" ",e+="GameCategory(D)="+this.GameCategory+" "},e.prototype.getCmdID=function(){return 55077},e.prototype.getCmdName=function(){return"PsRankingList"},e}();__reflect(CMDPsRankingList.prototype,"CMDPsRankingList",["ICommand"]);var CMDPsRequestEgameToken=function(){function e(){this.GameCode=""}return e.prototype.fromBytes=function(e){this.GameCode=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.GameCode),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameCode(S)="+this.GameCode+" "},e.prototype.getCmdID=function(){return 55028},e.prototype.getCmdName=function(){return"PsRequestEgameToken"},e}();__reflect(CMDPsRequestEgameToken.prototype,"CMDPsRequestEgameToken",["ICommand"]);var CMDPsRequestLoginToken=function(){function e(){this.GameCode="",this.Language="",this.GenFor=0}return e.prototype.fromBytes=function(e){this.GameCode=BitwiseUtil.readString(e),this.Language=BitwiseUtil.readString(e),this.GenFor=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeString(e,this.Language),BitwiseUtil.writeUint(e,this.GenFor,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameCode(S)="+this.GameCode+" ",e+="Language(S)="+this.Language+" ",e+="GenFor(B)="+this.GenFor+" "},e.prototype.getCmdID=function(){return 55028},e.prototype.getCmdName=function(){return"PsRequestLoginToken"},e}();__reflect(CMDPsRequestLoginToken.prototype,"CMDPsRequestLoginToken",["ICommand"]);var CMDPsSlotAction=function(){function e(){this.BetSource=0,this.Action=0}return e.prototype.fromBytes=function(e){this.BetSource=BitwiseUtil.readUint(e,4),this.Action=BitwiseUtil.readUint(e,4),this.UnknownData=new egret.ByteArray,this.UnknownData.endian=egret.Endian.LITTLE_ENDIAN,this.UnknownData.readBytes(e,e.position,e.bytesAvailable)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.BetSource),BitwiseUtil.writeUint(e,this.Action),this.UnknownData.position=0;var t=this.UnknownData.bytesAvailable;return e.writeByte(t),e.writeBytes(this.UnknownData,0,this.UnknownData.bytesAvailable),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="BetSource: "+this.BetSource+", ",e+="Action: "+this.Action+", ",this.UnknownData.position=0,e+=this.UnknownData.bytesAvailable>0?"UnknownData: "+BitwiseUtil.readString(this.UnknownData):"UnknownData: null",this.UnknownData.position=0,e},e.prototype.getCmdID=function(){return 55019},e.prototype.getCmdName=function(){return"PsSlotAction"},e}();__reflect(CMDPsSlotAction.prototype,"CMDPsSlotAction",["ICommand"]);var CMDPsSlotActionDone=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 55020},e.prototype.getCmdName=function(){return"PsSlotActionDone"},e}();__reflect(CMDPsSlotActionDone.prototype,"CMDPsSlotActionDone",["ICommand"]);var CMDPsToggleCampaignPopup=function(){function e(){this.CampaignID=0,this.PlayerID=0,this.ENABLE=0}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4),this.PlayerID=BitwiseUtil.readUint(e,4),this.ENABLE=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PlayerID,4),BitwiseUtil.writeUint(e,this.ENABLE,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="CampaignID(D)="+this.CampaignID+" ",e+="PlayerID(D)="+this.PlayerID+" ",e+="ENABLE(B)="+this.ENABLE+" "},e.prototype.getCmdID=function(){return 55081},e.prototype.getCmdName=function(){return"PsToggleCampaignPopup"},e}();__reflect(CMDPsToggleCampaignPopup.prototype,"CMDPsToggleCampaignPopup",["ICommand"]);var CMDScAck=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 30024},e.prototype.getCmdName=function(){return"ScAck"},e}();__reflect(CMDScAck.prototype,"CMDScAck",["ICommand"]);var CMDScInitSync=function(){function e(){this.Name=""}return e.prototype.fromBytes=function(e){this.Name=BitwiseUtil.readString(e),this.Data=new CMDScSyncData,this.Data.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.Name);var t=this.Data.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Name(S)="+this.Name+" ",e+="Data(CMDScSyncData)="+this.Data+" "},e.prototype.getCmdID=function(){return 30007},e.prototype.getCmdName=function(){return"ScInitSync"},e}();__reflect(CMDScInitSync.prototype,"CMDScInitSync",["ICommand"]);var CMDScRemoveSync=function(){function e(){this.DBID=0}return e.prototype.fromBytes=function(e){this.DBID=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.DBID),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="DBID(Q)="+this.DBID+" "},e.prototype.getCmdID=function(){return 30009},e.prototype.getCmdName=function(){return"ScRemoveSync"},e}();__reflect(CMDScRemoveSync.prototype,"CMDScRemoveSync",["ICommand"]);var CMDScRequestFail=function(){function e(){this.Error=0}return e.prototype.fromBytes=function(e){this.Error=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Error,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Error(B)="+this.Error+" "},e.prototype.getCmdID=function(){return 30001},e.prototype.getCmdName=function(){return"ScRequestFail"},e}();__reflect(CMDScRequestFail.prototype,"CMDScRequestFail",["ICommand"]);var CMDScServer=function(){function e(){this.IP="",this.Port=0,this.UTCOffset=0,this.System=0}return e.prototype.fromBytes=function(e){this.IP=BitwiseUtil.readString(e),this.Port=BitwiseUtil.readUint(e,4),this.UTCOffset=BitwiseUtil.readInt53(e),this.System=BitwiseUtil.readInt53(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.IP),BitwiseUtil.writeUint(e,this.Port,4),BitwiseUtil.writeInt53(e,this.UTCOffset),BitwiseUtil.writeInt53(e,this.System),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="IP(S)="+this.IP+" ",e+="Port(D)="+this.Port+" ",e+="UTCOffset(Q)="+this.UTCOffset+" ",e+="System(Q)="+this.System+" "},e.prototype.getCmdID=function(){return 30002},e.prototype.getCmdName=function(){return"ScServer"},e}();__reflect(CMDScServer.prototype,"CMDScServer",["ICommand"]);var CMDScSyncData=function(){function e(){this.PlayerID=0,this.Field=new Array}return e.prototype.fromBytes=function(e){this.PlayerID=BitwiseUtil.readInt53(e);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDField;n.fromBytes(e),this.Field.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeUint(e,this.Field.length,2);for(var t in this.Field){var n=this.Field[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="PlayerID(Q)="+this.PlayerID+" ",e+="Field_size(W)="+this.Field.length+" ",e+="Field(CMDField)=[";for(var t in this.Field)t>0&&(e+=", "),e+=this.Field[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 30008},e.prototype.getCmdName=function(){return"ScSyncData"},e}();__reflect(CMDScSyncData.prototype,"CMDScSyncData",["ICommand"]);var CMDShGameProcessingFail=function(){function e(){this.GameID=0,this.errorCode=0}return e.prototype.fromBytes=function(e){this.GameID=BitwiseUtil.readInt53(e),this.errorCode=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.GameID),BitwiseUtil.writeUint(e,this.errorCode,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameID(Q)="+this.GameID+" ",e+="errorCode(B)="+this.errorCode+" "},e.prototype.getCmdID=function(){return 40002},e.prototype.getCmdName=function(){return"ShGameProcessingFail"},e}();__reflect(CMDShGameProcessingFail.prototype,"CMDShGameProcessingFail",["ICommand"]);var CMDShGameServerKick=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 50026},e.prototype.getCmdName=function(){return"ShGameServerKick"},e}();__reflect(CMDShGameServerKick.prototype,"CMDShGameServerKick");var CMDSimplayGameList=function(){function e(){this.GameCode="",this.UnderMaintenance=0}return e.prototype.fromBytes=function(e){this.GameCode=BitwiseUtil.readString(e),this.UnderMaintenance=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.GameCode),BitwiseUtil.writeUint(e,this.UnderMaintenance,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="GameCode(S)="+this.GameCode+" ",e+="UnderMaintenance(B)="+this.UnderMaintenance+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"SimplayGameList"},e}();__reflect(CMDSimplayGameList.prototype,"CMDSimplayGameList",["ICommand"]);var CMDSpEgameError=function(){function e(){this.Error=0}return e.prototype.fromBytes=function(e){this.Error=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Error,1),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Error(B)="+this.Error+" "},e.prototype.getCmdID=function(){return 50037},e.prototype.getCmdName=function(){return"SpEgameError"},e}();__reflect(CMDSpEgameError.prototype,"CMDSpEgameError",["ICommand"]);var CMDSpEgameToken=function(){function e(){this.Result=0,this.Token="",this.URL=""}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,4),this.Token=BitwiseUtil.readString(e),this.URL=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,4),BitwiseUtil.writeString(e,this.Token),BitwiseUtil.writeString(e,this.URL),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Result(D)="+this.Result+" ",e+="Token(S)="+this.Token+" ",e+="URL(S)="+this.URL+" "},e.prototype.getCmdID=function(){return 50036},e.prototype.getCmdName=function(){return"SpEgameToken"},e}();__reflect(CMDSpEgameToken.prototype,"CMDSpEgameToken",["ICommand"]);var CMDSpInitEgame=function(){function e(){this.PlayerID=0,this.BetID=0,this.UnknownData="",this.NoChanceJackpot=0,this.LobbyCode="",this.ReconnectKey="",this.NotificationCount=0,this.IsCommonWallet=0,this.System=0,this.CurrencyName="",this.UnsettleEGameList=""}return e.prototype.fromBytes=function(e){this.PlayerID=BitwiseUtil.readInt53(e),this.BetID=BitwiseUtil.readInt53(e),this.Jackpot=new CMDJackpot,this.Jackpot.fromBytes(e),this.UnknownData=BitwiseUtil.readString(e),this.NoChanceJackpot=BitwiseUtil.readUint(e,1),this.LobbyCode=BitwiseUtil.readString(e),this.ReconnectKey=BitwiseUtil.readString(e),this.NotificationCount=BitwiseUtil.readUint(e,2),this.IsCommonWallet=BitwiseUtil.readUint(e,1),this.System=BitwiseUtil.readInt53(e),this.CurrencyName=BitwiseUtil.readString(e),this.UnsettleEGameList=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.PlayerID),BitwiseUtil.writeInt53(e,this.BetID);var t=this.Jackpot.toBytes();return BitwiseUtil.writeBytes(t,e),BitwiseUtil.writeString(e,this.UnknownData),BitwiseUtil.writeUint(e,this.NoChanceJackpot,1),BitwiseUtil.writeString(e,this.LobbyCode),BitwiseUtil.writeString(e,this.ReconnectKey),BitwiseUtil.writeUint(e,this.NotificationCount,2),BitwiseUtil.writeUint(e,this.IsCommonWallet,1),BitwiseUtil.writeInt53(e,this.System),BitwiseUtil.writeString(e,this.CurrencyName),BitwiseUtil.writeString(e,this.UnsettleEGameList),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerID(Q)="+this.PlayerID+" ",e+="BetID(Q)="+this.BetID+" ",e+="Jackpot(CMDJackpot)="+this.Jackpot+" ",e+="UnknownData(S)="+this.UnknownData+" ",e+="NoChanceJackpot(B)="+this.NoChanceJackpot+" ",e+="LobbyCode(S)="+this.LobbyCode+" ",e+="ReconnectKey(S)="+this.ReconnectKey+" ",e+="NotificationCount(W)="+this.NotificationCount+" ",e+="IsCommonWallet(B)="+this.IsCommonWallet+" ",e+="System(Q)="+this.System+" ",e+="CurrencyName(S)="+this.CurrencyName+" ",e+="UnsettleEGameList(S)="+this.UnsettleEGameList+" "},e.prototype.getProperties=function(){var e="";return e+="PlayerID="+this.PlayerID+"&",e+="BetID="+this.BetID},e.prototype.getCmdID=function(){return 50027},e.prototype.getCmdName=function(){return"SpInitEgame"},e}();__reflect(CMDSpInitEgame.prototype,"CMDSpInitEgame",["ICommand"]);var CMDSpLoginFail=function(){function e(){this.Reason=0,this.CountryCode="",this.IP=""}return e.prototype.fromBytes=function(e){this.Reason=BitwiseUtil.readUint(e,1),this.CountryCode=BitwiseUtil.readString(e),this.IP=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Reason,1),BitwiseUtil.writeString(e,this.CountryCode),BitwiseUtil.writeString(e,this.IP),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Reason(B)="+this.Reason+" ",e+="CountryCode(S)="+this.CountryCode+" ",e+="IP(S)="+this.IP+" "},e.prototype.getCmdID=function(){return 50002},e.prototype.getCmdName=function(){return"SpLoginFail"},e}();__reflect(CMDSpLoginFail.prototype,"CMDSpLoginFail",["ICommand"]);var CMDSpPlayerBeDisabled=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 50067},e.prototype.getCmdName=function(){return"SpPlayerBeDisabled"},e}();__reflect(CMDSpPlayerBeDisabled.prototype,"CMDSpPlayerBeDisabled",["ICommand"]);var CMDSpSimplayCampaignAward=function(){function e(){this.AwardID="",this.AwardTimeInUTC=0,this.Prize=0,this.Type=0,this.Value=0}return e.prototype.fromBytes=function(e){this.AwardID=BitwiseUtil.readString(e),this.AwardTimeInUTC=BitwiseUtil.readInt53(e),this.Prize=BitwiseUtil.readUint(e,1),this.Type=BitwiseUtil.readUint(e,1),this.Value=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.AwardID),BitwiseUtil.writeInt53(e,this.AwardTimeInUTC),BitwiseUtil.writeUint(e,this.Prize,1),BitwiseUtil.writeUint(e,this.Type,1),BitwiseUtil.writeUint(e,this.Value,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="AwardID(S)="+this.AwardID+" ",e+="AwardTimeInUTC(Q)="+this.AwardTimeInUTC+" ",e+="Prize(B)="+this.Prize+" ",e+="Type(B)="+this.Type+" ",e+="Value(D)="+this.Value+" "},e.prototype.getCmdID=function(){return 52113},e.prototype.getCmdName=function(){return"SpSimplayCampaignAward"},e}();__reflect(CMDSpSimplayCampaignAward.prototype,"CMDSpSimplayCampaignAward",["ICommand"]);var CMDSpSimplayCampaignDetail=function(){function e(){this.CampaignID=0,this.PrizeList=new Array,this.EGameList=new Array}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDPrize;n.fromBytes(e),this.PrizeList.push(n)}for(var i=BitwiseUtil.readUint(e,2);i-->0;){var o=BitwiseUtil.readString(e);this.EGameList.push(o)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.PrizeList.length,2);for(var t in this.PrizeList){var n=this.PrizeList[t].toBytes();BitwiseUtil.writeBytes(n,e)}BitwiseUtil.writeUint(e,this.EGameList.length,2);for(var i in this.EGameList)BitwiseUtil.writeString(e,this.EGameList[i]);return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="CampaignID(D)="+this.CampaignID+" ",e+="PrizeList_size(W)="+this.PrizeList.length+" ",e+="PrizeList(CMDPrize)=[";for(var t in this.PrizeList)t>0&&(e+=", "),e+=this.PrizeList[t].toString();e+="] ",e+="EGameList_size(W)="+this.EGameList.length+" ",e+="EGameList(S)=[";for(var n in this.EGameList)n>0&&(e+=", "),e+=this.EGameList[n];return e+="] "},e.prototype.getCmdID=function(){return 52116},e.prototype.getCmdName=function(){return"SpSimplayCampaignDetail"},e}();__reflect(CMDSpSimplayCampaignDetail.prototype,"CMDSpSimplayCampaignDetail",["ICommand"]);var CMDSpSimplayCampaignList=function(){function e(){this.CampaignList=new Array}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDCampaign;n.fromBytes(e),this.CampaignList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignList.length,2);for(var t in this.CampaignList){var n=this.CampaignList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="CampaignList_size(W)="+this.CampaignList.length+" ",e+="CampaignList(CMDCampaign)=[";for(var t in this.CampaignList)t>0&&(e+=", "),e+=this.CampaignList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52115},e.prototype.getCmdName=function(){return"SpSimplayCampaignList"},e}();__reflect(CMDSpSimplayCampaignList.prototype,"CMDSpSimplayCampaignList",["ICommand"]);var CMDSpSimplayCampaignNotice=function(){function e(){this.PlayerName="",this.Prize=0,this.Type=0,this.Value=0,this.PrizeID=0}return e.prototype.fromBytes=function(e){this.PlayerName=BitwiseUtil.readString(e),this.Prize=BitwiseUtil.readUint(e,1),this.Type=BitwiseUtil.readUint(e,1),this.Value=BitwiseUtil.readInt53(e),this.PrizeID=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.PlayerName),BitwiseUtil.writeUint(e,this.Prize,1),BitwiseUtil.writeUint(e,this.Type,1),BitwiseUtil.writeInt53(e,this.Value),BitwiseUtil.writeUint(e,this.PrizeID,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="PlayerName(S)="+this.PlayerName+" ",e+="Prize(B)="+this.Prize+" ",e+="Type(B)="+this.Type+" ",e+="Value(Q)="+this.Value+" ",e+="PrizeID(D)="+this.PrizeID+" "},e.prototype.getCmdID=function(){return 52114},e.prototype.getCmdName=function(){return"SpSimplayCampaignNotice"},e}();__reflect(CMDSpSimplayCampaignNotice.prototype,"CMDSpSimplayCampaignNotice",["ICommand"]);var CMDSpSimplayCampaignWinnerList=function(){function e(){this.CampaignID=0,this.WinnerList=new Array}return e.prototype.fromBytes=function(e){this.CampaignID=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDCampaignWinner;n.fromBytes(e),this.WinnerList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.CampaignID,4),BitwiseUtil.writeUint(e,this.WinnerList.length,2);for(var t in this.WinnerList){var n=this.WinnerList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="CampaignID(D)="+this.CampaignID+" ",e+="WinnerList_size(W)="+this.WinnerList.length+" ",e+="WinnerList(CMDCampaignWinner)=[";for(var t in this.WinnerList)t>0&&(e+=", "),e+=this.WinnerList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52117},e.prototype.getCmdName=function(){return"SpSimplayCampaignWinnerList"},e}();__reflect(CMDSpSimplayCampaignWinnerList.prototype,"CMDSpSimplayCampaignWinnerList",["ICommand"]);var CMDSpSimplayEgameFeature=function(){function e(e){void 0===e&&(e=null),this.SlotRankingEnable=0,this.FishRankingEnable=0,this.JackpotRankingEnable=0,this.RecentJackpotEnable=0,this.SpAppEnable=0,this.TableRankingEnable=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.SlotRankingEnable=BitwiseUtil.readUint(e,1),this.FishRankingEnable=BitwiseUtil.readUint(e,1),this.JackpotRankingEnable=BitwiseUtil.readUint(e,1),this.RecentJackpotEnable=BitwiseUtil.readUint(e,1),this.SpAppEnable=BitwiseUtil.readUint(e,1),this.TableRankingEnable=BitwiseUtil.readUint(e,1)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.SlotRankingEnable,1),BitwiseUtil.writeUint(e,this.FishRankingEnable,1),BitwiseUtil.writeUint(e,this.JackpotRankingEnable,1),BitwiseUtil.writeUint(e,this.RecentJackpotEnable,1),BitwiseUtil.writeUint(e,this.SpAppEnable,1),BitwiseUtil.writeUint(e,this.TableRankingEnable,1),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="SlotRankingEnable(B)="+this.SlotRankingEnable+" ",e+="FishRankingEnable(B)="+this.FishRankingEnable+" ",e+="JackpotRankingEnable(B)="+this.JackpotRankingEnable+" ",e+="RecentJackpotEnable(B)="+this.RecentJackpotEnable+" ",e+="SpAppEnable(B)="+this.SpAppEnable+" ",e+="TableRankingEnable(B)="+this.TableRankingEnable+" "},e.prototype.getCmdID=function(){return 52110},e.prototype.getCmdName=function(){return"SpSimplayEgameFeature"},e}();__reflect(CMDSpSimplayEgameFeature.prototype,"CMDSpSimplayEgameFeature",["ICommand"]);var CMDSpSimplayFsoEnded=function(){function e(){}return e.prototype.fromBytes=function(e){},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e},e.prototype.getCmdID=function(){return 52107},e.prototype.getCmdName=function(){return"SpSimplayFsoEnded"},e}();__reflect(CMDSpSimplayFsoEnded.prototype,"CMDSpSimplayFsoEnded",["ICommand"]);var CMDSpSimplayFsoEventDetail=function(){function e(){this.Result=0}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,1),this.EventDetail=new CMDFsoEventDetail,this.EventDetail.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,1);var t=this.EventDetail.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Result(B)="+this.Result+" ",e+="EventDetail(CMDFsoEventDetail)="+this.EventDetail+" "},e.prototype.getCmdID=function(){return 52108},e.prototype.getCmdName=function(){return"SpSimplayFsoEventDetail"},e}();__reflect(CMDSpSimplayFsoEventDetail.prototype,"CMDSpSimplayFsoEventDetail",["ICommand"]);var CMDSpSimplayFsoEventList=function(){function e(){this.Result=0,this.Tag=0,this.Popup=0,this.EventList=new Array}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,1),this.Tag=BitwiseUtil.readUint(e,4),this.Popup=BitwiseUtil.readUint(e,1);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=BitwiseUtil.readUint(e,4);this.EventList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,1),BitwiseUtil.writeUint(e,this.Tag,4),BitwiseUtil.writeUint(e,this.Popup,1),BitwiseUtil.writeUint(e,this.EventList.length,2);for(var t in this.EventList)BitwiseUtil.writeUint(e,this.EventList[t],4);return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="Result(B)="+this.Result+" ",e+="Tag(D)="+this.Tag+" ",e+="Popup(B)="+this.Popup+" ",e+="EventList_size(W)="+this.EventList.length+" ",e+="EventList(D)=[";for(var t in this.EventList)t>0&&(e+=", "),e+=this.EventList[t];return e+="] "},e.prototype.getCmdID=function(){return 52107},e.prototype.getCmdName=function(){return"SpSimplayFsoEventList"},e}();__reflect(CMDSpSimplayFsoEventList.prototype,"CMDSpSimplayFsoEventList",["ICommand"]);var CMDSpSimplayFsoRedeem=function(){function e(){this.Result=0,this.FSODetailJSON=""}return e.prototype.fromBytes=function(e){this.Result=BitwiseUtil.readUint(e,1),this.FSODetailJSON=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Result,1),BitwiseUtil.writeString(e,this.FSODetailJSON),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Result(B)="+this.Result+" ",e+="FSODetailJSON(S)="+this.FSODetailJSON+" "},e.prototype.getCmdID=function(){return 52106},e.prototype.getCmdName=function(){return"SpSimplayFsoRedeem"},e}();__reflect(CMDSpSimplayFsoRedeem.prototype,"CMDSpSimplayFsoRedeem",["ICommand"]);var CMDSpSimplayGameList=function(){function e(){this.GameList=new Array}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDSimplayGameList;n.fromBytes(e),this.GameList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.GameList.length,2);for(var t in this.GameList){var n=this.GameList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="GameList_Size(W)="+this.GameList.length+" ",e+="GameList(CMDSimplayGameList)=[";for(var t in this.GameList)t>0&&(e+=", "),e+=this.GameList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52103},e.prototype.getCmdName=function(){return"SpSimplayGameList"},e}();__reflect(CMDSpSimplayGameList.prototype,"CMDSpSimplayGameList",["ICommand"]);var CMDSpSimplayGameRanking=function(){function e(){this.LastUpdateTimeInUTCSecond=0,this.GameCategory=0,this.RankingList=new Array}return e.prototype.fromBytes=function(e){this.LastUpdateTimeInUTCSecond=BitwiseUtil.readInt53(e),this.GameCategory=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDGameRankingInfo;n.fromBytes(e),this.RankingList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.LastUpdateTimeInUTCSecond),BitwiseUtil.writeUint(e,this.GameCategory,4),BitwiseUtil.writeUint(e,this.RankingList.length,2);for(var t in this.RankingList){var n=this.RankingList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="LastUpdateTimeInUTCSecond(Q)="+this.LastUpdateTimeInUTCSecond+" ",e+="GameCategory(D)="+this.GameCategory+" ",e+="RankingList_size(W)="+this.RankingList.length+" ",e+="RankingList(CMDGameRankingInfo)=[";for(var t in this.RankingList)t>0&&(e+=", "),e+=this.RankingList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52109},e.prototype.getCmdName=function(){return"SpSimplayGameRanking"},e}();__reflect(CMDSpSimplayGameRanking.prototype,"CMDSpSimplayGameRanking",["ICommand"]);var CMDSpSimplayJackpotRanking=function(){function e(){this.JackpotID=0,this.RankingList=new Array}return e.prototype.fromBytes=function(e){this.JackpotID=BitwiseUtil.readUint(e,4);for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDJackpotRankingInfo;n.fromBytes(e),this.RankingList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.JackpotID,4),BitwiseUtil.writeUint(e,this.RankingList.length,2);for(var t in this.RankingList){var n=this.RankingList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="JackpotID(D)="+this.JackpotID+" ",e+="RankingList_size(W)="+this.RankingList.length+" ",e+="RankingList(CMDJackpotRankingInfo)=[";for(var t in this.RankingList)t>0&&(e+=", "),e+=this.RankingList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52111},e.prototype.getCmdName=function(){return"SpSimplayJackpotRanking"},e}();__reflect(CMDSpSimplayJackpotRanking.prototype,"CMDSpSimplayJackpotRanking",["ICommand"]);var CMDSpSimplayRecentJackpot=function(){function e(e){void 0===e&&(e=null),this.Socket=e,this.RecentJackpotList=new Array }return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,2);t-->0;){var n=new CMDJackpotDetail;n.fromBytes(e),this.RecentJackpotList.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.RecentJackpotList.length,2);for(var t in this.RecentJackpotList){var n=this.RecentJackpotList[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="RecentJackpotList_size(W)="+this.RecentJackpotList.length+" ",e+="RecentJackpotList(CMDJackpotDetail)=[";for(var t in this.RecentJackpotList)t>0&&(e+=", "),e+=this.RecentJackpotList[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52112},e.prototype.getCmdName=function(){return"SpSimplayRecentJackpot"},e}();__reflect(CMDSpSimplayRecentJackpot.prototype,"CMDSpSimplayRecentJackpot",["ICommand"]);var CMDSpSimplayWinJackpot=function(){function e(){this.UserName="",this.CurrencyName=""}return e.prototype.fromBytes=function(e){this.UserName=BitwiseUtil.readString(e),this.CurrencyName=BitwiseUtil.readString(e),this.JackpotData=new CMDJackpot,this.JackpotData.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.UserName),BitwiseUtil.writeString(e,this.CurrencyName);var t=this.JackpotData.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="UserName(S)="+this.UserName+" ",e+="CurrencyName(S)="+this.CurrencyName+" ",e+="JackpotData(CMDJackpot)="+this.JackpotData+" "},e.prototype.getCmdID=function(){return 50098},e.prototype.getCmdName=function(){return"SpSimplayWinJackpot"},e}();__reflect(CMDSpSimplayWinJackpot.prototype,"CMDSpSimplayWinJackpot",["ICommand"]);var CMDSpSlotAction=function(){function e(){this.BetID=0,this.Action=0,this.UnknownData=""}return e.prototype.fromBytes=function(e){this.BetID=BitwiseUtil.readInt53(e),this.Action=BitwiseUtil.readUint(e,4),this.UnknownData=BitwiseUtil.readString(e),this.Jackpot=new CMDJackpot,this.Jackpot.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.BetID),BitwiseUtil.writeUint(e,this.Action,4),BitwiseUtil.writeString(e,this.UnknownData);var t=this.Jackpot.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="BetID(Q)="+this.BetID+" ",e+="Action(D)="+this.Action+" ",e+="UnknownData(S)="+this.UnknownData+" ",e+="Jackpot(CMDJackpot)="+this.Jackpot+" "},e.prototype.getProperties=function(){var e="";return e+="BetID="+this.BetID+"&",e+="Action="+this.Action},e.prototype.getCmdID=function(){return 50028},e.prototype.getCmdName=function(){return"SpSlotAction"},e}();__reflect(CMDSpSlotAction.prototype,"CMDSpSlotAction",["ICommand"]);var CMDSpSlotJackpot=function(){function e(){}return e.prototype.fromBytes=function(e){this.Jackpot=new CMDJackpot,this.Jackpot.fromBytes(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN;var t=this.Jackpot.toBytes();return BitwiseUtil.writeBytes(t,e),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="Jackpot(CMDJackpot)="+this.Jackpot+" "},e.prototype.getCmdID=function(){return 50035},e.prototype.getCmdName=function(){return"SpSlotJackpot"},e}();__reflect(CMDSpSlotJackpot.prototype,"CMDSpSlotJackpot",["ICommand"]);var Command=function(){function e(){}return e.getCommand=function(e){switch(e){case 30001:return new CMDScRequestFail;case 30002:return new CMDScServer;case 30007:return new CMDScInitSync;case 30008:return new CMDScSyncData;case 30009:return new CMDScRemoveSync;case 30024:return new CMDScAck;case 35001:return new CMDCsRequestServer;case 35002:return new CMDCsAck;case 50026:return new CMDShGameServerKick;case 40002:return new CMDShGameProcessingFail;case 50002:return new CMDSpLoginFail;case 50027:return new CMDSpInitEgame;case 50028:return new CMDSpSlotAction;case 50035:return new CMDSpSlotJackpot;case 50037:return new CMDSpEgameError;case 55018:return new CMDPsEgameLogin;case 55019:return new CMDPsSlotAction;case 55020:return new CMDPsSlotActionDone;case 55027:return new CMDPsEgameDebugJackpot;case 55028:return new CMDPsRequestLoginToken;case 50036:return new CMDSpEgameToken;case 52102:return new CMDSpSimplayBetLogQuery;case 50010:return new CMDSpBetLogQuery;case 50025:return new CMDSpBetLogQueryTotal;case 50067:return new CMDSpPlayerBeDisabled;case 52103:return new CMDSpSimplayGameList;case 35007:return new CMDCsSimplayRequestSlotServer;case 50098:return new CMDSpSimplayWinJackpot;case 52106:return new CMDSpSimplayFsoRedeem;case 55073:return new CMDPsFsoRedeem;case 55075:return new CMDPsFsoEventDetail;case 52107:return new CMDSpSimplayFsoEventList;case 52108:return new CMDSpSimplayFsoEventDetail;case 55074:return new CMDPsFsoNotificationReceived;case 55076:return new CMDPsFsoEventList;case 52113:return new CMDSpSimplayCampaignAward;case 52114:return new CMDSpSimplayCampaignNotice;case 52115:return new CMDSpSimplayCampaignList;case 52116:return new CMDSpSimplayCampaignDetail;case 52117:return new CMDSpSimplayCampaignWinnerList;case 52109:return new CMDSpSimplayGameRanking;case 52110:return new CMDSpSimplayEgameFeature;case 52111:return new CMDSpSimplayJackpotRanking;case 52112:return new CMDSpSimplayRecentJackpot;case 55078:return new CMDPsLaunchComplete}return null},e}();__reflect(Command.prototype,"Command");var JSONTag=function(){function e(){}return e.version="0.0.4",e.GameCode="CGC",e.BetLineNum="CBLN",e.BetPerLine="CBPL",e.Symbol="CSB",e.WinLine="CWL",e.WinLineID="CWLI",e.WinLinePayout="CWLP",e.WinLineSoak="CWLS",e.WinLineMulti="CWLM",e.WinAmount="CWA",e.AccuAmount="CAA",e.FrRemainNum="FRF",e.FrGameTypeTrigger="FGT",e.FrPlayedNum="FSN",e.FrTriggerNum="FTF",e.FrDepth="FD",e.FrMultiplier="FM",e.FrTriggerAcc="FFC",e.WinLineScreen="SPR",e.FrRandomDetail="FRD",e.GmIsGamble="GIG",e.GmResult="GR",e.BnPickType="BT",e.JackpotType="JT",e.JackpotAmount="JA",e.screenMultiplier="CSM",e.GmGambleAct="GCS",e.BnSelectId="BS",e.ExpectedSymbol="DSB",e.ExpectedGmResult="DGR",e.ExpectedBnResult="DBR",e.ServerVersion="SV",e.Status="ST",e.DenominationType="DT",e.DenominationValue="DV",e.DenominationList="DL",e.DenominationId="CDI",e.LineBet="CLB",e.LineBetList="CLBL",e.Language="LN",e.UserName="UN",e.WaitClient="WC",e.GambleHistory="GH",e.GambleHistoryResult="GHR",e.BonusHistory="BH",e.BonusHistorySelection="BHS",e.BonusHistoryResult="BHR",e.GameType="GT",e.BetDirection="CBD",e.GameTypeTrigger="CGT",e.Feature1Result="F1R",e.Feature2Result="F2R",e.featureMultiplier="FEM",e.AwardList="FAL",e.IsWildExt="FWE",e.Feature1SelectionId="MHS",e.Feature2SelectionId="WRA",e.ExpectedF1Result="DF1R",e.ExpectedF2Result="DF2R",e.Feature1History="F1H",e.Feature1HistorySelection="F1HS",e.Feature1HistoryResult="F1HR",e.Feature2History="F2H",e.Feature2HistorySelection="F2HS",e.Feature2HistoryResult="F2HR",e.Life="PL",e.EnemyLife="EL",e.Feature1Action="F1A",e.PreAccFreeAmount="FPA",e.WinPattern="CWP",e.SymbolExt="CSE",e.FrSpinNumber="FSN",e.FrAccuAmount="FAA",e.FrMeter="FMT",e.FrSpinCount="FSC",e.FixedWildExt="FFWE",e.FrSymbolSelected="FSS",e.ExtWild="DWE",e.NextAction="NGA",e.FrCurrentMode="FCM",e.FrNextMode="FCH",e.FrCountdownNumber="FCN",e.WinLineTriggerType="WLTT",e.ReelMultiplier="CRM",e.FullReelWildArray="FRW",e.FeAccuAmount="FEA",e.F1ResultSet="F1RS",e.CharacterSelectID="CSID",e.FeChance="FEC",e.Feature1HistorySet="F1HS",e.FeTriggerNum="FETF",e.ScreenPerRound="SPR",e.ReelHold="CRH",e.ReelSync="CRS",e.ReelStartIdx="DRS",e.ReelEndIdx="DRE",e.SpecialFeatureType="SFT",e.SpecialFeatureSymbolPosition="SFSP",e.FeatureType="DFT",e.FeatureSymbolPositions="DFS",e.FeatureReelPositions="DFR",e.FreeGameMode="FGM",e.BonusTriggerFreeSpinNum="BFS",e.FreeGameUnlockMeter="FUM",e.FreeGameTriggeredLevel="FUT",e.FreeGameCurrentLevel="FCT",e.FreeGameUnlockMeterMax="FPL",e.NextSpinFSO="FSO",e.FSOSpinCount="FSOC",e.FSOSpinPlayed="FSOP",e.FSOAccumulatedWin="FSOA",e.FSOEventName="FSON",e.FSODenominationValue="FSODV",e.FSOLineNimber="FSOLN",e.FSOLineBet="FSOLB",e.FSOID="FSOID",e}();__reflect(JSONTag.prototype,"JSONTag");var NewSlotData=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.IsFreeGameCompleted=function(){return 0==this.nFreeGame&&this.nFreeSpinCount==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0&&0==this.waitClient?!0:!1},t.prototype.IsLastFreeGameFinished=function(){return 0==this.nFreeGame&&this.nFreeSpinCount==this.nTriggeredAccFreeGame+this.nTriggeredFreeGame&&this.nFreeSpinCount>0?!0:!1},t}(SlotData);__reflect(NewSlotData.prototype,"NewSlotData");var ResultSet=function(){function e(){}return e}();__reflect(ResultSet.prototype,"ResultSet");var ScreenData=function(){function e(){this.slotSymbols=[],this.slotSymExts=[]}return e}();__reflect(ScreenData.prototype,"ScreenData");var RESGroupKey=function(){function e(){}return e.preload="preload",e.UIPanelCommon="UIPanelCommon",e.UIPanel="UIPanel",e.UIPanelMobile="UIPanelMobile",e.SlotSceneCommon="SlotSceneCommon",e.SlotSceneCommonMobile="SlotSceneCommonMobile",e.BaseGame="BaseGame",e.BaseGameMobile="BaseGameMobile",e.FreeGame="FreeGame",e.FreeGameMobile="FreeGameMobile",e.FeatureGame="FeatureGame",e.Paytable="Paytable",e.PaytableMobile="PaytableMobile",e.Jackpot="Jackpot",e.BigWin="BigWin",e.MiniLobby="MiniLobby",e.FeatureGameMobile="FeatureGameMobile",e.GameRules="GameRules",e.languageCn="languageCn",e.languageEng="languageEng",e.languageZh="languageZh",e.languageKr="languageKr",e.languageJp="languageJp",e.languageTh="languageTh",e.languageId="languageId",e.languageVi="languageVi",e.languageCommonCn="languageCommonCn",e.languageCommonEng="languageCommonEng",e.languageCommonZh="languageCommonZh",e.languageCommonKr="languageCommonKr",e.languageCommonJp="languageCommonJp",e.languageCommonTh="languageCommonTh",e.languageCommonId="languageCommonId",e.languageCommonVi="languageCommonVi",e.loadingCn="loadingCn",e.loadingEng="loadingEng",e.loadingZh="loadingZh",e.loadingKr="loadingKr",e.loadingJp="loadingJp",e.loadingTh="loadingTh",e.loadingId="loadingId",e.loadingVi="loadingVi",e.UIPanelCn="UIPanelCn",e.UIPanelEng="UIPanelEng",e.UIPanelZh="UIPanelZh",e.UIPanelKr="UIPanelKr",e.UIPanelJp="UIPanelJp",e.UIPanelTh="UIPanelTh",e.UIPanelId="UIPanelId",e.UIPanelVi="UIPanelVi",e.UIPanelMobileCn="UIPanelMobileCn",e.UIPanelMobileEng="UIPanelMobileEng",e.UIPanelMobileZh="UIPanelMobileZh",e.UIPanelMobileKr="UIPanelMobileKr",e.UIPanelMobileJp="UIPanelMobileJp",e.UIPanelMobileTh="UIPanelMobileTh",e.UIPanelMobileId="UIPanelMobileId",e.UIPanelMobileVi="UIPanelMobileVi",e.SlotSceneCommonCn="SlotSceneCommonCn",e.SlotSceneCommonEng="SlotSceneCommonEng",e.SlotSceneCommonZh="SlotSceneCommonZh",e.SlotSceneCommonKr="SlotSceneCommonKr",e.SlotSceneCommonJp="SlotSceneCommonJp",e.SlotSceneCommonTh="SlotSceneCommonTh",e.SlotSceneCommonId="SlotSceneCommonId",e.SlotSceneCommonVi="SlotSceneCommonVi",e.SlotSceneCommonMobileCn="SlotSceneCommonMobileCn",e.SlotSceneCommonMobileEng="SlotSceneCommonMobileEng",e.SlotSceneCommonMobileZh="SlotSceneCommonMobileZh",e.SlotSceneCommonMobileKr="SlotSceneCommonMobileKr",e.SlotSceneCommonMobileJp="SlotSceneCommonMobileJp",e.SlotSceneCommonMobileTh="SlotSceneCommonMobileTh",e.SlotSceneCommonMobileId="SlotSceneCommonMobileId",e.SlotSceneCommonMobileVi="SlotSceneCommonMobileVi",e.FreeGameCn="FreeGameCn",e.FreeGameEng="FreeGameEng",e.FreeGameZh="FreeGameZh",e.FreeGameKr="FreeGameKr",e.FreeGameJp="FreeGameJp",e.FreeGameTh="FreeGameTh",e.FreeGameId="FreeGameId",e.FreeGameVi="FreeGameVi",e.FreeGameMobileCn="FreeGameMobileCn",e.FreeGameMobileEng="FreeGameMobileEng",e.FreeGameMobileZh="FreeGameMobileZh",e.FreeGameMobileKr="FreeGameMobileKr",e.FreeGameMobileJp="FreeGameMobileJp",e.FreeGameMobileTh="FreeGameMobileTh",e.FreeGameMobileId="FreeGameMobileId",e.FreeGameMobileVi="FreeGameMobileVi",e.FeatureGameCn="FeatureGameCn",e.FeatureGameEng="FeatureGameEng",e.FeatureGameZh="FeatureGameZh",e.FeatureGameKr="FeatureGameKr",e.FeatureGameJp="FeatureGameJp",e.FeatureGameTh="FeatureGameTh",e.FeatureGameId="FeatureGameId",e.FeatureGameVi="FeatureGameVi",e.FeatureGameMobileCn="FeatureGameMobileCn",e.FeatureGameMobileEng="FeatureGameMobileEng",e.FeatureGameMobileZh="FeatureGameMobileZh",e.FeatureGameMobileKr="FeatureGameMobileKr",e.FeatureGameMobileJp="FeatureGameMobileJp",e.FeatureGameMobileTh="FeatureGameMobileTh",e.FeatureGameMobileId="FeatureGameMobileId",e.FeatureGameMobileVi="FeatureGameMobileVi",e.PaytableCn="PaytableCn",e.PaytableEng="PaytableEng",e.PaytableZh="PaytableZh",e.PaytableKr="PaytableKr",e.PaytableJp="PaytableJp",e.PaytableTh="PaytableTh",e.PaytableId="PaytableId",e.PaytableVi="PaytableVi",e.PaytableMobileCn="PaytableMobileCn",e.PaytableMobileEng="PaytableMobileEng",e.PaytableMobileZh="PaytableMobileZh",e.PaytableMobileKr="PaytableMobileKr",e.PaytableMobileJp="PaytableMobileJp",e.PaytableMobileTh="PaytableMobileTh",e.PaytableMobileId="PaytableMobileId",e.PaytableMobileVi="PaytableMobileVi",e.JackpotCn="JackpotCn",e.JackpotEng="JackpotEng",e.JackpotZh="JackpotZh",e.JackpotKr="JackpotKr",e.JackpotJp="JackpotJp",e.JackpotTh="JackpotTh",e.JackpotId="JackpotId",e.JackpotVi="JackpotVi",e.BigWinCn="BigWinCn",e.BigWinEng="BigWinEng",e.BigWinZh="BigWinZh",e.FesEventCn="FesEventCn",e.FesEventEng="FesEventEng",e.FesEventZh="FesEventZh",e.FesEventMobileCn="FesEventMobileCn",e.FesEventMobileEng="FesEventMobileEng",e.FesEventMobileZh="FesEventMobileZh",e.BetlogCommon="BetlogCommon",e.BetlogDesktop="BetlogDesktop",e.BetlogMobile="BetlogMobile",e.FreeGameMode1="FreeGameMode1",e.FreeGameMode2="FreeGameMode2",e.FreeGameMode3="FreeGameMode3",e.FreeGameModeMobile1="FreeGameModeMobile1",e.FreeGameModeMobile2="FreeGameModeMobile2",e.FreeGameModeMobile3="FreeGameModeMobile3",e.JackpotWinNoticeCn="JackpotWinNoticeCn",e.JackpotWinNoticeZh="JackpotWinNoticeZh",e.JackpotWinNoticeEng="JackpotWinNoticeEng",e.JackpotWinNoticeVi="JackpotWinNoticeVi",e.JackpotWinNoticeId="JackpotWinNoticeId",e.JackpotWinNoticeKr="JackpotWinNoticeKr",e.JackpotWinNoticeJp="JackpotWinNoticeJp",e.JackpotWinNoticeTh="JackpotWinNoticeTh",e.FreeSpinOffer="FreeSpinOffer",e.FreeSpinOfferEng="FreeSpinOfferEng",e.FreeSpinOfferCn="FreeSpinOfferCn",e.FreeSpinOfferZh="FreeSpinOfferZh",e.FreeSpinOfferKr="FreeSpinOfferKr",e.FreeSpinOfferJp="FreeSpinOfferJp",e.FreeSpinOfferTh="FreeSpinOfferTh",e.FreeSpinOfferId="FreeSpinOfferId",e.FreeSpinOfferVi="FreeSpinOfferVi",e.FSORedeemPageEng="FSORedeemPageEng",e.FSORedeemPageCn="FSORedeemPageCn",e.FSORedeemPageZh="FSORedeemPageZh",e.FSORedeemPageKr="FSORedeemPageKr",e.FSORedeemPageJp="FSORedeemPageJp",e.FSORedeemPageTh="FSORedeemPageTh",e.FSORedeemPageId="FSORedeemPageId",e.FSORedeemPageVi="FSORedeemPageVi",e.FSOPrizeWinNoticeCn="FSOPrizeWinNoticeCn",e.FSOPrizeWinNoticeZh="FSOPrizeWinNoticeZh",e.FSOPrizeWinNoticeEng="FSOPrizeWinNoticeEng",e.FSOPrizeWinNoticeVi="FSOPrizeWinNoticeVi",e.FSOPrizeWinNoticeId="FSOPrizeWinNoticeId",e.FSOPrizeWinNoticeKr="FSOPrizeWinNoticeKr",e.FSOPrizeWinNoticeJp="FSOPrizeWinNoticeJp",e.FSOPrizeWinNoticeTh="FSOPrizeWinNoticeTh",e.Ranking="Ranking",e.RankingMobile="RankingMobile",e.CampaignAwardCn="CampaignAwardCn",e.CampaignAwardEng="CampaignAwardEng",e.CampaignAwardZh="CampaignAwardZh",e.CampaignAwardKr="CampaignAwardKr",e.CampaignAwardJp="CampaignAwardJp",e.CampaignAwardTh="CampaignAwardTh",e.CampaignAwardVi="CampaignAwardVi",e.CampaignAwardId="CampaignAwardId",e.CampaignEvent="CampaignEvent",e}();__reflect(RESGroupKey.prototype,"RESGroupKey");var LocalDebug;!function(e){var t;!function(e){e[e.Base=0]="Base",e[e.Free=1]="Free"}(t=e.GameState||(e.GameState={}));var n=function(){function e(){this.currentSpinIndex=0,this.freeGameSpinCount=0,this.totalFreeSpinPlayed=0,this.state=t.Base,this.balance=1e7}return e.prototype.GetState=function(){return this.state},e.prototype.ToFree=function(){this.state=t.Free},e.prototype.ToNextGameStateFromBaseGame=function(){return Math.random()>1.9&&this.ToFree(),this.state},e.prototype.IsGameFinished=function(){var e=SocketManager.getInstance().GetData();return this.state==t.Free&&this.freeGameSpinCount>0&&this.currentSpinIndex==this.freeGameSpinCount&&0==e.freeMeter&&(this.state=t.Base),this.state==t.Base||this.state==t.Free&&this.freeGameSpinCount>0&&this.currentSpinIndex==this.freeGameSpinCount},e.prototype.GetFreeGameSpinCount=function(){return this.freeGameSpinCount},e.prototype.GetCurrentFreeSpinIndex=function(){return this.currentSpinIndex},e.prototype.GetTotalFreeSpinPlayed=function(){return this.totalFreeSpinPlayed},e.prototype.IncrementFreeSpinIndex=function(){this.currentSpinIndex++},e.prototype.AddFreeSpin=function(e){this.freeGameSpinCount+=e,this.totalFreeSpinPlayed+=e},e.prototype.ResetFreeGameData=function(e){void 0===e&&(e=!0),e&&(this.totalFreeSpinPlayed=0),this.freeGameSpinCount=0,this.currentSpinIndex=0},e}();e.DebugLocalGameStateController=n,__reflect(n.prototype,"LocalDebug.DebugLocalGameStateController")}(LocalDebug||(LocalDebug={}));var ConfigInitializer=function(){function e(){}return e.initGameConfig=function(){GameConfig.version="2.10.3",GameConfig.GameCode="EG-SLOT-A044",GameConfig.token="Robot14@";var e=!0;e?GameConfig.resourceDirectory="BomberSquad/html5web/resource/":(GameConfig.configPath="resource/config.xml",GameConfig.resourceDirectory="resource/",GameConfig.isUseCDNVersion=!1),GameConfig.bigwin={mega:40,"super":20,normal:10},GameConfig.platform=Platform.desktop,GameConfig.gameType=GameType.WayBase,GameConfig.maxNumOfLine=40,GameConfig.numOfWay=1024,GameConfig.isHttps="https:"==window.location.protocol,GameConfig.DebugSymbolMin=1,GameConfig.DebugSymbolMax=13,GameConfig.DebugRequireFreeSelction=!0,GameConfig.isTurboModeReady=!0,GameConfig.platform==Platform.desktop?(GameConfig.ResourceBaseWidth=1920,GameConfig.ResourceBaseHeight=1080,GameConfig.isDragonBoneBigWin=!0):GameConfig.platform==Platform.mobile&&(GameConfig.ResourceBaseWidth=1068,GameConfig.ResourceBaseHeight=600,GameConfig.isDragonBoneBigWin=!1),GameConfig.ContentWidth=1068,GameConfig.ContentHeight=600,GameConfig.langData=[{code:"cn",Image:"lang_sc",Text:"简体中文",disable:0},{code:"en",Image:"lang_eng",Text:"English",disable:0},{code:"zh-TW",Image:"lang_tc",Text:"繁體中文",disable:0},{code:"kr",Image:"lang_korea",Text:"한국의",disable:0},{code:"jp",Image:"lang_japan",Text:"日本語",disable:0},{code:"th",Image:"lang_thai",Text:"ไทย",disable:0},{code:"vi",Image:"lang_vietnam",Text:"Tiếng Việt",disable:0},{code:"id",Image:"lang_indonesia",Text:"Indonesia",disable:0},{code:"ph",Image:"lang_philip",Text:"Pilipino",disable:1}]},e.initSlotConfig=function(){SlotConfig.CNetSocket=Network.ArenaNetSocket,SlotConfig.CInitializer=BSTypeSlotGameInitializer,SlotConfig.CSlotActionManager=FLTypeSlotActionManager,SlotConfig.CBaseGameStateController=BaseGameStateController,SlotConfig.CFreeGameStateController=BSTypeFreeGameStateController,SlotConfig.CFreeSpinOfferGameStateController=FLTypeFreeSpinOfferGameStateController,SlotConfig.CWinInfoParser=WinPatternInfoParser,SlotConfig.ReelAnimationHandler=SimpleSpinningReelAnimationHandler,SlotConfig.isDragonBonesBorder=!0,SymbolType.H1=3,SymbolType.H2=4,SymbolType.H3=5,SymbolType.H4=6,SymbolType.H5=7,SymbolType.H6=-1,SymbolType.L1=8,SymbolType.L2=9,SymbolType.L3=10,SymbolType.L4=11,SymbolType.L5=12,SymbolType.L6=13,GameConfig.platform==Platform.desktop?(SlotConfig.CGameUI=SlotGameUI,SlotConfig.CUIController=AClassDesktopUIController,SlotConfig.SLOT_WIDTH=120,SlotConfig.SLOT_HEIGHT=96,SlotConfig.SLOT_TOPY=-96,SlotConfig.SLOT_BOTTOMY=480,SlotConfig.OffsetX=5,SlotConfig.BigSymbolScaleYOffset=0,SlotConfig.BetSource=BetSource.BSBrowser|BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSPC,liveUrl="",SlotConfig.Items={1:{body:"wild",sicon:"wild_sicon",idle:"wild_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},201:{body:"wild",sicon:"wild_sicon",idle:"201_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"201_2sec",overlay:""}}},202:{body:"wild",sicon:"wild_sicon",idle:"202_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"202_2sec",overlay:""}}},203:{body:"wild",sicon:"wild_sicon",idle:"203_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"203_2sec",overlay:""}}},204:{body:"wild",sicon:"wild_sicon",idle:"204_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"204_2sec",overlay:""}}},205:{body:"wild",sicon:"wild_sicon",idle:"205_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"205_2sec",overlay:""}}},206:{body:"wild",sicon:"wild_sicon",idle:"206_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"206_2sec",overlay:""}}},2:{body:"scatter",sicon:"scatter_sicon",idle:"scatter_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:"",repeat:0},"1s":{background:"",body:"1sec",overlay:"",repeat:0},"4s":{background:"",body:"4sec",overlay:"",repeat:0}}},3:{body:"H1",sicon:"H1_sicon",idle:"H1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},4:{body:"H2",sicon:"H2_sicon",idle:"H2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},5:{body:"H3",sicon:"H3_sicon",idle:"H3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},6:{body:"H4",sicon:"H4_sicon",idle:"H4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},7:{body:"H5",sicon:"H5_sicon",idle:"H5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},8:{body:"L1",sicon:"L1_sicon",idle:"L1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},9:{body:"L2",sicon:"L2_sicon",idle:"L2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},10:{body:"L3",sicon:"L3_sicon",idle:"L3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},11:{body:"L4",sicon:"L4_sicon",idle:"L4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},12:{body:"L5",sicon:"L5_sicon",idle:"L5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},13:{body:"L6",sicon:"L6_sicon",idle:"L6_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},border:{source:"symbol_effect",repeat:1}}):(SlotConfig.CGameUI=SlotGameUI,SlotConfig.CUIController=MobileUIController,SlotConfig.SLOT_WIDTH=120,SlotConfig.SLOT_HEIGHT=96,SlotConfig.SLOT_TOPY=-96,SlotConfig.SLOT_BOTTOMY=480,SlotConfig.SLOT_SCALE=1.25,SlotConfig.SLOT_IDLE_SCALE=.55625,SlotConfig.BORDER_SCALE=1.25,SlotConfig.OffsetX=5,SlotConfig.BetSource=BetSource.BSBrowser|BetSource.BSHTML5|BetSource.BSEgret|BetSource.BSMobile,liveUrl="",SlotConfig.Items={1:{body:"wild",sicon:"wild_sicon",idle:"wild_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},201:{body:"wild",sicon:"wild_sicon",idle:"201_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"201_2sec",overlay:""}}},202:{body:"wild",sicon:"wild_sicon",idle:"202_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"202_2sec",overlay:""}}},203:{body:"wild",sicon:"wild_sicon",idle:"203_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"203_2sec",overlay:""}}},204:{body:"wild",sicon:"wild_sicon",idle:"204_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"204_2sec",overlay:""}}},205:{body:"wild",sicon:"wild_sicon",idle:"205_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"205_2sec",overlay:""}}},206:{body:"wild",sicon:"wild_sicon",idle:"206_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"206_2sec",overlay:""}}},2:{body:"scatter",sicon:"scatter_sicon",idle:"scatter_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:"",repeat:0},"1s":{background:"",body:"1sec",overlay:"",repeat:0},"4s":{background:"",body:"4sec",overlay:"",repeat:0}}},3:{body:"H1",sicon:"H1_sicon",idle:"H1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},4:{body:"H2",sicon:"H2_sicon",idle:"H2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},5:{body:"H3",sicon:"H3_sicon",idle:"H3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},6:{body:"H4",sicon:"H4_sicon",idle:"H4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},7:{body:"H5",sicon:"H5_sicon",idle:"H5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},8:{body:"L1",sicon:"L1_sicon",idle:"L1_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},9:{body:"L2",sicon:"L2_sicon",idle:"L2_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},10:{body:"L3",sicon:"L3_sicon",idle:"L3_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},11:{body:"L4",sicon:"L4_sicon",idle:"L4_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},12:{body:"L5",sicon:"L5_sicon",idle:"L5_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},13:{body:"L6",sicon:"L6_sicon",idle:"L6_idle",background:"",overlay:"",animations:{"2s":{background:"",body:"2sec",overlay:""}}},border:{source:"symbol_effect_Mobile",repeat:1}}),SlotConfig.SLOT_COL=5,SlotConfig.SLOT_ROW=4,SlotConfig.SLOT_FRAME_RATE=12,SlotConfig.SLOT_MASK_WIDTH=SlotConfig.SLOT_WIDTH*SlotConfig.SLOT_COL+SlotConfig.OffsetX*(SlotConfig.SLOT_COL-1),SlotConfig.SLOT_MASK_HEIGHT=SlotConfig.SLOT_HEIGHT*SlotConfig.SLOT_ROW,SlotConfig.WINNING_MASK_BORDER_WIDTH=10,SlotConfig.BGMTimeOut=1e4,SlotConfig.SPIN_DUR=500,SlotConfig.SPIN_DUR_SP=3e3,SlotConfig.LineSize=4,SlotConfig.Wild=1,SlotConfig.Wild_Repeat=0,SlotConfig.Scatter=2,SlotConfig.Scatter_LINE=51,SlotConfig.Feature1=-1,SlotConfig.Feature1_LINE=-1,SlotConfig.Feature2=-1,SlotConfig.Feature2_LINE=-1,SlotConfig.ScatterWin=3,SlotConfig.FeatureSymbolIDs=[2],SlotConfig.SlotReelNormalSpeed=2,SlotConfig.SlotReelChargingSpeed=4,SlotConfig.HitSymbolAnimationFrameRate=30,SlotConfig.SignificantSymbolsOnReel=4,SlotConfig.SLOT_BORDER_FPS=12,SlotConfig.SymbolTypeInitString="{}",SymbolType.UpdateSymbolType(SlotConfig.SymbolTypeInitString),SlotConfig.LINES=[[1024,40],[0,4,8,12,16],[0,5,10,13,16],[0,5,8,13,16],[0,4,8,13,16],[0,4,9,13,16],[0,5,9,12,16],[0,5,8,12,16],[0,4,10,13,16],[0,5,10,12,16],[0,4,10,12,16],[0,4,9,12,16],[0,5,9,13,16],[1,5,9,13,17],[1,5,9,12,17],[1,6,9,13,17],[1,4,9,13,17],[1,6,8,14,17],[1,4,10,12,17],[1,5,10,13,17],[1,5,8,13,17],[1,6,10,14,17],[1,4,8,12,17],[1,6,9,14,17],[1,4,9,12,17],[1,5,9,14,17],[2,6,10,14,18],[2,6,11,14,18],[2,6,9,14,18],[2,7,11,15,18],[2,5,9,13,18],[2,7,10,15,18],[2,5,10,13,18],[2,6,10,15,18],[2,6,10,13,18],[2,7,10,14,18],[2,5,10,14,18],[2,7,9,15,18],[2,5,11,13,18],[3,7,11,15,19],[3,7,10,15,19],[3,6,10,14,19],[3,6,9,14,19],[3,6,11,14,19],[3,7,11,14,19],[3,6,11,15,19],[3,7,10,14,19],[3,6,10,15,19],[3,7,9,15,19],[3,7,9,14,19],[3,6,9,15,19]]},e}();__reflect(ConfigInitializer.prototype,"ConfigInitializer");var SceneType;!function(e){e[e.Base=0]="Base",e[e.Free=3]="Free",e[e.Free2=301]="Free2",e[e.Free3=302]="Free3",e[e.Feature1=4]="Feature1",e[e.Feature2=5]="Feature2",e[e.Feature3=6]="Feature3",e[e.Feature4=7]="Feature4",e[e.DoubleUp=2]="DoubleUp",e[e.LegacyFree=1]="LegacyFree",e[e.LegacyFeature1=2]="LegacyFeature1",e[e.LegacyFeature2=3]="LegacyFeature2",e[e.Unknown=100]="Unknown",e[e.Dummy=101]="Dummy",e[e.FSO=130]="FSO",e[e.OverlayComponent=131]="OverlayComponent"}(SceneType||(SceneType={}));var SysNotify=function(e){function t(t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=!1),e.call(this,t,n,i)||this}return __extends(t,e),t.SysError=function(e){var n=new t(t.SHOW_ERROR);return n.data=e,n},t.Notify=function(e,n){void 0===n&&(n=null);var i=new t(e);return i.data=n,i},t.LANGUAGE_CHANGED="LANGUAGE_CHANGED",t.ENABLE_ALL_BUTTON="ENABLE_ALL_BUTTON",t.DISABLE_ALL_BUTTON="DISABLE_ALL_BUTTON",t.SHOW_ERROR="SHOW_ERROR",t.CLOSE_POPUP_NOTIFY="CLOSE_POPUP_NOTIFY",t.SHOW_RESUME_JACKPOT_POPUP="SHOW_RESUME_JACKPOT_POPUP",t.LOGIN_STARTED="login_started",t.INIT_DATA_READY="init_data_ready",t.DATA_READY="data_ready",t.SYNC_DATA_READY="sync_data_ready",t.JACKPOT_DATA_READY="jackpot_data_ready",t.TOKEN_READY="token_ready",t.FSO_REDEEMED="FSO_REDEEMED",t.FSO_EVENTDETAIL_READY="FSO_EVENTDETAIL_READY",t.FSO_REDEEM_FAIL="FSO_REDEEM_FAIL",t.FSO_EVENTLIST_OUTDATED="FSO_EVENTLIST_OUTDATED",t.FSO_EVENTLIST_VALID="FSO_EVENTLIST_VALID",t.FSO_EVENTLIST_RECEIVED="FSO_EVENTLIST_RECEIVED",t.FSO_PRIZE_RECEIVED="FSO_PRIZE_RECEIVED",t.BUTTON_PRESSED="button_pressed",t.BET_INFO_UPDATE="bet_info_update",t.BET_DIRECTION_UPDATE="bet_direction_update",t.LINE_INFO_UPDATE="line_info_update",t.OPENING_VIDEO_COMPLETED="open_video_completed",t.DISCONNECTED="disconnected",t.RESUME_GAME_POPUP="resume_game_popup",t.ORIENTATION_CHANGED="ORIENTATION_CHANGED",t.GAME_LIST_DETAIL_LOADED="GAME_LIST_DETAIL_LOADED",t}(egret.Event);__reflect(SysNotify.prototype,"SysNotify");var Network;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e._failAmount=0,e._sockets=[],e}return __extends(n,t),n.prototype.connect=function(t,n){var i=[];if("object"==typeof t)if(this.hosts=t,this._host=t[0],"object"==typeof n){this.ports=n,this._port=n[0];for(var o=0;o"+t[n].host+":"+t[n].port)}},n.prototype.onComplete=function(t){var n=t.currentTarget;if(!this._winner){this._winner=n,this._winner.addSubscribers(this.getSubscribers());for(var i=0;i=this._sockets.length&&this.dispatchEvent(new egret.Event(e.NetEvent.IO_ERROR)))},n.prototype.onWinnerIOError=function(e){},n.prototype.onWinnerSecurityError=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.SECURITY_ERROR))},n.prototype.onWinnerDisconnect=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.DISCONNECT))},Object.defineProperty(n.prototype,"winner",{get:function(){return this._winner},enumerable:!0,configurable:!0}),n.prototype.subscribe=function(e,n,i){t.prototype.subscribe.call(this,e,n,i),null!=this.winner&&this.winner.subscribe(e,n,i)},n.prototype.subscribeAtFirst=function(e,n,i){t.prototype.subscribeAtFirst.call(this,e,n,i),null!=this.winner&&this.winner.subscribeAtFirst(e,n,i)},n.prototype.unsubscribe=function(e,n,i){t.prototype.unsubscribe.call(this,e,n,i),null!=this.winner&&this.winner.unsubscribe(e,n,i)},n.prototype.isConnected=function(){return null!=this.winner?this.winner.isConnected():!1},n}(e.ANetSocket);e.ArenaNetSocket=t,__reflect(t.prototype,"Network.ArenaNetSocket")}(Network||(Network={}));var Network;!function(e){var t=function(){function e(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.host="",this.port=0,this.host=e,this.port=t}return e}();e.Location=t,__reflect(t.prototype,"Network.Location")}(Network||(Network={}));var Network;!function(e){var t=function(t){function n(e,n){var i=t.call(this)||this;return i.CLIENT_KEY=985417532,i.CS_IP=["127.0.0.1"],i.CS_PORT=[5e4],i.SS_IP=["127.0.0.1"],i.SS_PORT=[5e4],i.SS_PORTByServer=5e4,i.ssList=[],i._gameCode="",i._token="",i.hasError=!1,i.isConnected=!1,i.loginRetryCount=0,i._net=n,i.isConnected=!1,i}return __extends(n,t),n.prototype.setLocation=function(e,t,n){void 0===n&&(n=null);var i=typeof n;if(null==n||0==n.length)this.SS_IP=null;else if("string"==typeof n)this.SS_IP=[n];else if("object"==typeof n){this.SS_IP.length=0;for(var o=0;o"+this.ssList[e].ip+":"+this.ssList[e].port)}},n.prototype.connectSlotServer=function(){if(CommonFunc.log("====================== connectSlotServer =========================="),this.ssList.length<=0)return void EventCentral.getInstance().dispatchEvent(SysNotify.SysError(SocketManager.ERR_SERVER_NOT_CONNECTED));var e=this.ssList.length,t=Math.floor(Math.random()*e);CommonFunc.log("Random selected:: "+this.ssList[t].ip+":"+this.ssList[t].port),this.SS_IP=[],this.SS_PORT=[],this.SS_IP.push(this.ssList[t].ip),void 0!=this.ssList[t].port?this.SS_PORT.push(parseInt(this.ssList[t].port)):this.SS_PORT.push(443),this._net.connect(this.SS_IP,this.SS_PORT)},n.prototype.onConnectSsComplete=function(e){CommonFunc.log("Connected to slot server"),this.psLogin()},n.prototype.onConnectSsFailed=function(e){CommonFunc.log("Connect to slot server fail."),SocketManager.getInstance().isStarted?setTimeout(this.Reconnect.bind(this),1e3):(console.log("re try - ****** "+this.loginRetryCount),this.loginRetryCount<4?(this.loginRetryCount++,setTimeout(this.Reconnect.bind(this),1e3)):CommonFunc.ShowMessage(Localization.Instance.getString("common.system.error.network_timeout"),!0))},n.prototype.Reconnect=function(){CommonFunc.log("-----------------------------------------Start Reconnect-----------------------------------------"),null!=this.timer&&this.timer.stop(),null!=this._net&&(this._net.close(),this._net.destroy());var e=new SlotConfig.CNetSocket,t=new SlotConfig.CNetSocket;SocketManager.getInstance().SetNetSocket(t,e),this.connectSlotServer()},n.prototype.SetNetSocket=function(e,t){this._net=t,this.addEventListeners()},n.prototype.psLogin=function(){var e=new CMDPsEgameLogin;if(e.GameCode=this._gameCode,e.Token=this._token,e.BetSource=this._betSource,StringUtil.getParameterByName("eventid")){var t='{"FSOId":'+StringUtil.getParameterByName("eventid")+"}";e.AdditionalRequest=t}if(1==GameConfig.isReconnect){console.log("is Reconnect ");var t='{"Reconnect":true}';e.AdditionalRequest=t}if(GameConfig.isFeatureTrial){console.log("is Feature Trial");var t='{"FT":1}';e.AdditionalRequest=t}e.Referer=GameConfig.referer,this._net.send(e)},n.prototype.onSpInitSlot=function(t){this._net.addEventListener(e.NetEvent.DISCONNECT,this.onDisconnect,this),this.isConnected=!0,SlotConfig.LoginTime=t.System-egret.getTimer(),this.loginRetryCount=0,GameConfig.isReconnect=!0,this.timer=new egret.Timer(GameConfig.KEEP_ALIVE_TIME),this.timer.addEventListener(egret.TimerEvent.TIMER,this.sendAck,this),this.timer.start()},n.prototype.onSpLoginFail=function(e){GameConfig.countryCode=e.CountryCode,GameConfig.ipAddress=e.IP,this.errorHandler(e.Reason)},n.prototype.sendAck=function(e){console.log(this._net.isConnected());var t=new CMDCsAck;this._net.send(t)},n.prototype.onScSyncData=function(e){},n.prototype.onDisconnect=function(e){if(void 0===e&&(e=null),CommonFunc.log(" Server disconnect."),this.isConnected=!1,EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.DISCONNECTED)),this.removeEventListeners(),SocketManager.getInstance().isStarted){if(SocketManager.getInstance().isWaitingForBalanceUpdate)return CommonFunc.log(" isWaitingForBalanceUpdate"),void SocketManager.getInstance().Reconnect();if(SocketManager.getInstance().isWaitingForResponse)return CommonFunc.log(" isWaitingForResponse"),void SocketManager.getInstance().Reconnect()}else this.hasError||(CommonFunc.log(" isStarted false"),SocketManager.getInstance().Reconnect())},n.prototype.IsConnected=function(){return this.isConnected},n.prototype.errorHandler=function(e){this.hasError=!0,EventCentral.getInstance().dispatchEvent(SysNotify.SysError(e))},n.SUCCESS_CODE=255,n}(egret.EventDispatcher);e.LoginManager=t,__reflect(t.prototype,"Network.LoginManager")}(Network||(Network={}));var Network;!function(e){var t=function(){function e(){}return e.IO_ERROR="NetEvent.IO_ERROR",e.SECURITY_ERROR="NetEvent.SECURITY_ERROR",e.RECIEVE="NetEvent.RECIEVE",e.CONNECT="NetEvent.CONNECT",e.DISCONNECT="NetEvent.DISCONNECT",e.UPDATE_STATUS="NetEvent.UPDATE_STATUS",e}();e.NetEvent=t,__reflect(t.prototype,"Network.NetEvent")}(Network||(Network={}));var Network;!function(e){var t=function(t){function n(){var e=t.call(this)||this;return e.CMD_HEAD=170,e.CMD_ID_SIZE=2,e.TIMEOUT=3e4,e.HEART_RATE=10,e._bufferPos=0,e._packetSize=0,e._pckHead=!1,e._lastConnected=!1,e._lastRecvTime=0,e._waitBytesAvailableTimoutID=0,e._timer=new egret.Timer(e.HEART_RATE),e._timer.start(),e._socket=new egret.WebSocket,e._socket.type=egret.WebSocket.TYPE_BINARY,e._buffer1=new egret.ByteArray,e._buffer1.endian=egret.Endian.LITTLE_ENDIAN,e._buffer2=new egret.ByteArray,e._buffer2.endian=egret.Endian.LITTLE_ENDIAN,e._subPacket=new egret.ByteArray,e._subPacket.endian=egret.Endian.LITTLE_ENDIAN,e.addEventListeners(),e}return __extends(n,t),n.prototype.connect=function(e,t){if("string"!=typeof e||"number"!=typeof t)throw new Error("This Socket only be implemented to support one host(string) and port(number)");this._host=e,this._port=t;var n=Number(this._port);"https:"==window.location.protocol?this._socket.connectByUrl("wss://"+this._host+":"+n.toString()):this._socket.connect(this._host,this._port)},n.prototype.send=function(e){this._socket.connected&&(this._socket.writeBytes(this.encode(e)),this._socket.flush())},n.prototype.close=function(){this._socket&&this._socket.connected&&this._socket.close()},n.prototype.destroy=function(){this.removeEventListeners(),this._timer.stop(),this.close(),this._socket=null,this._timer=null},n.prototype.encode=function(e){var t=e.toBytes(),n=new egret.ByteArray;return n.endian=egret.Endian.LITTLE_ENDIAN,n.writeByte(this.CMD_HEAD),n.writeUnsignedInt(this.CMD_ID_SIZE+4+t.length),BitwiseUtil.writeUint(n,e.getCmdID(),this.CMD_ID_SIZE),n.writeUnsignedInt(t.length),n.writeBytes(t),n.position=0,CommonFunc.log("Send "+e.getCmdName()+"("+e.getCmdID()+","+t.length+") "+e.toString()),n},n.prototype.decode=function(e){for(;e.bytesAvailable>0;){var t=BitwiseUtil.readUint(e,this.CMD_ID_SIZE),n=BitwiseUtil.readUint(e);if(n>e.bytesAvailable){console.warn("Unexpected data size "+n+" command id "+t);break}e.readBytes(this._subPacket,0,n);var i=Command.getCommand(t);null==i?console.warn("Recv undefined command "+t):(this._subPacket.position=0,i.fromBytes(this._subPacket),this._subPacket.clear(),this._lastRecvTime=egret.getTimer(),CommonFunc.log("Recv "+i.getCmdName()+"("+t+","+n+") "+i.toString()),this.notify(t,i))}},n.prototype.addEventListeners=function(){this._socket.addEventListener(egret.ProgressEvent.SOCKET_DATA,this.onSocketData,this),this._socket.addEventListener(egret.Event.CONNECT,this.onConnect,this),this._socket.addEventListener(egret.Event.CLOSE,this.onClose,this),this._socket.addEventListener(egret.IOErrorEvent.IO_ERROR,this.onIOError,this),this._timer.addEventListener(egret.TimerEvent.TIMER,this.tick,this)},n.prototype.removeEventListeners=function(){this._socket.removeEventListener(egret.ProgressEvent.SOCKET_DATA,this.onSocketData,this),this._socket.removeEventListener(egret.Event.CONNECT,this.onConnect,this),this._socket.removeEventListener(egret.Event.CLOSE,this.onClose,this),this._socket.removeEventListener(egret.IOErrorEvent.IO_ERROR,this.onIOError,this),this._timer.removeEventListener(egret.TimerEvent.TIMER,this.tick,this)},n.prototype.tick=function(t){this._socket.connected&&(this._lastConnected=!0),this._lastConnected&&!this._socket.connected&&(this._lastConnected=!1,this.dispatchEvent(new egret.Event(e.NetEvent.DISCONNECT)))},n.prototype.onSocketData=function(e){this._socket&&(this._buffer1.length>0?(this._buffer2.clear(),this._socket.readBytes(this._buffer2),this._bufferPos=this._buffer1.position,this._buffer1.position=this._buffer1.length,this._buffer1.writeBytes(this._buffer2),this._buffer1.position=this._bufferPos):this._socket.readBytes(this._buffer1),this.resolvePacket())},n.prototype.resolvePacket=function(){if(!this._pckHead){var e=this._buffer1.readUnsignedByte();if(e!=this.CMD_HEAD)return console.warn("Invalid packet head"),void close();this._pckHead=!0}if(0==this._packetSize){if(!(this._buffer1.bytesAvailable>=4))return void console.warn("Not enough bits("+this._buffer1.bytesAvailable+") for packet size");this._packetSize=this._buffer1.readUnsignedInt()}this._packetSize>0?this._buffer1.bytesAvailable>=this._packetSize&&(this.decode(this._buffer1),this._buffer1.clear(),this._packetSize=0,this._pckHead=!1):CommonFunc.log("packetSize="+this._packetSize)},n.prototype.onConnect=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.CONNECT))},n.prototype.onIOError=function(t){this.dispatchEvent(new egret.Event(e.NetEvent.IO_ERROR))},n.prototype.onSecurityError=function(t){this._socket&&this.dispatchEvent(new egret.Event(e.NetEvent.SECURITY_ERROR))},n.prototype.onClose=function(e){},n.prototype.isConnected=function(){return this._socket.connected},n}(e.ANetSocket);e.NetSocket=t,__reflect(t.prototype,"Network.NetSocket")}(Network||(Network={}));var AdvancedSpinningReelAnimationHandler=function(e){function t(){var t=e.call(this)||this;return t.nudgeCount=0,t.topY=SlotConfig.SLOT_TOPY,t.bottomY=SlotConfig.SLOT_BOTTOMY,t}return __extends(t,e),t.prototype.StartSpin=function(){this.isPrepareToStop=!1,this.isStopped=!1,this.previousTime=egret.getTimer(),this.speed=SlotConfig.SlotReelNormalSpeed,SlotSymbol.ScatterCount=0,this.spinningTimer=new egret.Timer(1e3/30,0),this.spinningTimer.addEventListener(egret.TimerEvent.TIMER,this.PositionUpdate,this),this.spinningTimer.start()},t.prototype.PositionUpdate=function(e){if(!this.isStopped){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;for(var i,o=Math.floor(this.speed*n),a=(Math.floor(o/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),r=a.length-1;r>=0;r--)i=this.slotReel.GetQueuedSymbol(r),i.y+=o;this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions())}},t.prototype.NudgeUpdate=function(e){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;for(var i,o=Math.floor(.2*n),a=(Math.floor(o/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),r=a.length-1;r>=0;r--)i=this.slotReel.GetQueuedSymbol(r),this.nudgeData.direction>1?i.y-=o:i.y+=o;this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions(),1),this.ValidateAllSymbolPositions()>0&&this.nudgeCount++},t.prototype.NudgeChecking=function(e){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;for(var i=(Math.floor(.2*n),[]),o=0;oi&&(t=i),n++);var o=4-n,a=new Object;a.wildMove=o,a.direction=t,a.callback=e.Callback,this.nudgeData=a,this.nudgeTimer=new egret.Timer(1e3/30),this.nudgeTimer.addEventListener(egret.TimerEvent.TIMER,this.NudgeUpdate,this),this.nudgeTimer.start(),this.nudgeCheckTimer=new egret.Timer(1e3/30),this.nudgeCheckTimer.addEventListener(egret.TimerEvent.TIMER,this.NudgeChecking,this),this.nudgeCheckTimer.start()},t.prototype.PrepareToStop=function(){this.isPrepareToStop=!0,this.displayRemain=5},t.prototype.StopSpin=function(e){void 0===e&&(e=!1);var t;this.isPrepareToStop=!1,this.isStopped=!0,this.spinningTimer.removeEventListener(egret.TimerEvent.TIMER,this.PositionUpdate,this),this.spinningTimer.stop();for(var n=0;nthis.bottomY)if(i.yt&&(t=e);i.y=this.bottomY)for(e=Math.floor((this.bottomY-i.y)/SlotConfig.SLOT_HEIGHT),t>e&&(t=e);i.y>=this.bottomY;)i.y-=this.bottomY-this.topY}return this.slotReel.UpdateQueueOrder(),t},t.prototype.UpdateAllSymbolResults=function(e,t){if(void 0===t&&(t=0),0!=e){var n,i=t>0;if(i||this.isPrepareToStop){if(this.isPrepareToStop&&e>this.displayRemain)return void this.slotReel.StopSpin(!0)}else this.OffsetReelStrip(e);if(e>0){var o=Math.max(0,this.slotReel.nSymbol-e);n=e;for(var a=o;a=0;s--){var r=this.slotReel.GetQueuedSymbol(s);this.UpdateSymbolResult(r,s,n,t)}}}},t.prototype.UpdateSymbolResult=function(e,t,n,i){void 0===i&&(i=0);var o=i>0;if(o)e.SetResult(i);else if(this.isPrepareToStop){if(!this.isUsingRealResult){var a=n>0?-1:1,r=this.GetReelStripIndexWithOffset(t+n),s=this.GetReelStripIndexWithOffset(t+n+a),l=this.reelStrip.At(r);this.reelStrip.At(s);if(l==i)return e.SetResult(l),void this.OffsetReelStrip(-a)}this.isUsingRealResult=!0;var h=--this.displayRemain;e.SetResult(this.slotReel.GetResultAt(h)),0==this.displayRemain&&(this.slotReel.StopSpin(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.ON_STARTSTOPPING,this.slotReel.id)))}else{var c=(this.currentReelStripIdx+t)%this.reelStrip.Length(),u=this.reelStrip.At(c);e.SetResult(u)}},t.prototype.GetReelStripIndexWithOffset=function(e){return(this.currentReelStripIdx+e+this.reelStrip.Length())%this.reelStrip.Length()},t.prototype.OffsetReelStrip=function(e){this.currentReelStripIdx=this.GetReelStripIndexWithOffset(e)},t}(ReelSpinAnimationHandler);__reflect(AdvancedSpinningReelAnimationHandler.prototype,"AdvancedSpinningReelAnimationHandler",["SpinningReelValidator"]);var LoMachine=function(){function LoMachine(){this.playmode=2,this.playdata={},this.playcursor=0,this.BetID=50123055}return LoMachine.prototype._setSpinData=function(e){e[JSONTag.Symbol]=[3,7,9,5,7,3,10,12,4,11,12,3,3,6,7]},LoMachine.getInstance=function(){return null==this.instance&&(this.instance=new LoMachine),this.instance},LoMachine.prototype.createSpinSlotData=function(){var e={};return this._setSpinData(e),JSON.stringify(e)},LoMachine.prototype.createInitSlotData=function(){var e={};return e[JSONTag.Status]=SlotAction.Spin,e[JSONTag.DenominationList]=[1,2,5,10,20,100],e[JSONTag.LineBetList]=[1,2,3,4,5,6,7,8,9,10],e[JSONTag.BetLineNum]=25,e[JSONTag.LineBet]=4,e[JSONTag.DenominationId]=3,e[JSONTag.WinAmount]=0,this._setSpinData(e),JSON.stringify(e)},LoMachine.prototype.initialize=function(_playmode,scClient,spClient){if(this.playmode=_playmode,this.ScClient=scClient,this.SpClient=spClient,3==this.playmode){var _data=LoRecorder.getInstance().data();void 0!==_data&&""!=_data?(this.playdata=eval("("+_data+")"),console.log("*** Playback (localStorage) Mode Activated ***")):(console.log("Playback Records (localStorage) Load Failed."),this.playmode=0)}else 4==this.playmode&&this.loadRecords("playrecord01.csv")},LoMachine.prototype.loadRecords=function(e){RES.getResByUrl(GameConfig.testfile,this.onParseCompleted,this,RES.ResourceItem.TYPE_TEXT)},LoMachine.prototype.onParseCompleted=function(e){if(void 0===e&&(e=void 0),void 0===e||""==e)return this.playmode=0,void console.log("Playback Records ("+GameConfig.testfile+") Load Failed.");console.log("*** Playback ("+GameConfig.testfile+") Mode Activated ***");var t=e.split("\n");this.playdata={};for(var n=0;n1){var i=t[n].split(" ");0==n?(this.playdata.datetime=[i[0]],this.playdata.cmdid=[i[1]],this.playdata.property=[i[2]],this.playdata.content=[i[3]]):(this.playdata.datetime[n]=i[0],this.playdata.cmdid[n]=i[1],this.playdata.property[n]=i[2],this.playdata.content[n]=i[3])}},LoMachine.prototype.ScSend=function(e){var t=e.getCmdID();console.log("ScCommand Send, cmdId : "+t),this.onCommand(e)},LoMachine.prototype.SpSend=function(e){var t=e.getCmdID();console.log("SpCommand Send, cmdId : "+t),this.onCommand(e)},LoMachine.prototype.onCommand=function(e){var t=e.getCmdID();switch(t){case 30002:this.onCMDScServer(e);break;case 35001:case 35007:this.onCMDCsRequestServer(e);break;case 55018:this.onCMDPsSlotLogin(e);break;case 55019:this.onCMDPsSlotAction(e)}},LoMachine.prototype.onCMDScServer=function(e){console.log("onCMDScServer")},LoMachine.prototype.onCMDCsRequestServer=function(e){var t=new CMDScServer;t.IP="127.0.0.1",t.Port=12345,this.ScClient.onReceiveCommand(t)},LoMachine.prototype.onCMDPsSlotLogin=function(e){var t=new CMDSpInitEgame;if(this.playmode>=3&&null!=this.playdata&&this.playdata.content.length>0){for(var n=this.playdata.property[0].split("&"),i=0;i=3&&null!=this.playdata)if(this.playcursor0?(i.datetime[o]=(new Date).toLocaleString(),i.cmdid[o]=a,i.content[o]=r,i.property[o]=s):(i.datetime=[(new Date).toLocaleString()],i.cmdid=[a],i.content=[r],i.property=[s]);var l=JSON.stringify(i);localStorage.setItem(t,l)},e.prototype.append=function(e){var t=this.m_Tag,n=localStorage.getItem(t);(null==n||""==n)&&(n="{}");var i=JSON.parse(n),o=0;void 0!==i.datetime&&(o=i.datetime.length),o>0?(i.datetime[o]=(new Date).toLocaleString(),i.content[o]=e):(i.datetime=[(new Date).toLocaleString()],i.content=[e]);var a=JSON.stringify(i);localStorage.setItem(t,a)},e.instance=null,e}();__reflect(LoRecorder.prototype,"LoRecorder");var LoSocket=function(){function e(e){void 0===e&&(e=0),this.target=null,this.remoteType=0,this.isHandshaked=!1,this.remoteType=e,this._initialize()}return e.prototype._initialize=function(){},e.prototype.connect=function(e,t,n){this.target=n,this.onSocketOpen()},e.prototype.close=function(){},e.prototype.onSocketOpen=function(){console.log("LoSocket.onSocketOpen ("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScOpen():this.target.onSpOpen())},e.prototype.onSocketClose=function(e){console.log("LoSocket.onSocketClose("+this.remoteType+")"),null!=this.target&&(0==this.remoteType?this.target.onScClose(e):this.target.onSpClose(e))},e.prototype.onReceiveCommand=function(e){null!=this.target&&null!=e&&(0==this.remoteType?this.target.onScCommand(e):this.target.onSpCommand(e))},e.prototype.onSocketError=function(){},e.prototype.send=function(e){return 0==this.remoteType?LoMachine.getInstance().ScSend(e):LoMachine.getInstance().SpSend(e),0},e}();__reflect(LoSocket.prototype,"LoSocket");var WinInfo=function(){function e(){this.multiplyer=1,this.direction=new BetDirection}return e.prototype.GetSymbolIDs=function(){return this.symbolIDs},e.prototype.GetPayout=function(){return this.payout},e.prototype.GetSymbolPosition=function(){return this.symbolPositions},e.prototype.GetTriggerType=function(){return this.triggerType},e.prototype.GetMultiplyer=function(){return this.multiplyer},e.prototype.GetDirection=function(){return this.direction.value},e}();__reflect(WinInfo.prototype,"WinInfo");var WinPatternInfo=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.GetWay=function(){return this.way},t.prototype.ParseWinPosition=function(e,t){var n,i=e,o=t,a=[];for(n=0;n0&&(h=!0);var u=1;if(null!=e[JSONTag.screenMultiplier]&&(u=parseInt(e[JSONTag.screenMultiplier][0])),null!=r)for(var p=0;pL));y++)T++;if(GameConfig.gameType==GameType.DirectionalWayBase){var I=SocketManager.getInstance().GetData().direction.GetDirection();null!=C&&(I=C),I==BetDirection.Right?i[_]==m[SlotConfig.SignificantSymbolsOnReel.length-T-1]&&S.push(_):i[_]==m[T]&&S.push(_)}else i[_]==m[T]&&S.push(_)}}else S=r[p].SP;CommonFunc.log("SymbolPosition: "+S),o[p]=new WinPatternInfo,o[p].SetInfo(parseInt(r[p].W),m,parseInt(r[p].P),S,g,l[p],f[p])}return o},t}(WinInfoParser);__reflect(WinPatternInfoParser.prototype,"WinPatternInfoParser");var FreeReelStrip=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),t.prototype.SetSpecialId=function(e){this.specialId=e},t.prototype.At=function(t){return-1==e.prototype.At.call(this,t)?this.specialId:e.prototype.At.call(this,t)},t}(ReelStrip);__reflect(FreeReelStrip.prototype,"FreeReelStrip");var BigDragonBonesOverlaySymbol=function(e){function t(){var t=e.call(this)||this;return t.speedRate=1,t.symbolArray=[],t.isLoop=!1,EventCentral.getInstance().addEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,t.StopLoop,t),t}return __extends(t,e),t.prototype.AddSymbol=function(e){this.symbolArray.push(e),e.addChild(this),this.UpdatePosition()},t.prototype.InitWithInfoArrayIndex=function(e){this.size=SlotConfig.BigSymbolInfoArray[e].size,this.result=SlotConfig.BigSymbolInfoArray[e].resultIdx,this.SetResult()},t.prototype.RemoveSymbol=function(e){null!=this.symbolArray&&this.symbolArray.splice(this.symbolArray.indexOf(e),1),0==this.symbolArray.length&&this.Destroy(),this.parent==e&&(this.symbolArray[0].addChild(this),this.UpdatePosition()) },t.prototype.SetResult=function(){this.SetBigDBSymbolSource("WildX2"),this.SetBigSymbolAnimation(!0)},t.prototype.SetBigDBSymbolSource=function(e,t){void 0===t&&(t=null),this.dbArmatureName=e,null!=t&&(this.imageIdleSource=t)},t.prototype.SetBigSymbolAnimation=function(e){null!=this.dragonBoneDisplay&&this.removeChild(this.dragonBoneDisplay),this.armature=DragonBonesManager.getInstance().CreateArmature(this.dbArmatureName),this.dragonBoneDisplay=this.armature.display,e?this.animationName=SlotConfig.Items[1].animations.opendoor.body:this.animationName=SlotConfig.Items[1].animations.loop.body,this.dragonBoneDisplay.animation.gotoAndStop(this.animationName),this.dragonBoneDisplay.y=0;for(var t=0,n=0,i=0;i=e.GetTotalBet()*GameConfig.bigwin.normal?this.speedRate=1:this.speedRate=2:this.speedRate=1},t}(egret.DisplayObjectContainer);__reflect(BigDragonBonesOverlaySymbol.prototype,"BigDragonBonesOverlaySymbol");var ReelStripSet=function(){function e(e,t){this.baseReelStrip=e,this.freeReelStrip=t}return e.prototype.GetBaseReelStrip=function(){return this.baseReelStrip},e.prototype.GetFreeReelStrip=function(){return this.freeReelStrip},e}();__reflect(ReelStripSet.prototype,"ReelStripSet");var SlotReelState=function(){function e(){}return e.IDLE=0,e.SPINSTARTING=1,e.SPINNING=2,e.SPINSTOPPING=3,e.REELFIXED=4,e.COUNT=5,e}();__reflect(SlotReelState.prototype,"SlotReelState");var SymbolBorder=function(e){function t(t){var n=e.call(this)||this;if(n.borderMask=t,SlotConfig.isDragonBonesBorder)n.dbBorder=null,n.dbArmatureDisplay=null,n.armatureName="symbol_effect";else{var i=SlotConfig.Items.border;n.movieClip=MovieClip.movieClipBySpriteSheet(i.source,SlotConfig.SLOT_BORDER_FPS),n.movieClip.visible=!1,n.movieClip.gotoAndStop(0),n.addChild(n.movieClip)}return EventCentral.getInstance().addEventListener(SceneNotify.STOP_ALL_WINNING_ANIMATION,n.StopAnimation,n),n}return __extends(t,e),t.prototype.InitMovieclip=function(e,t){this.slotSymbol=e,SlotConfig.isDragonBonesBorder?(this.x=e.x,this.y=e.y,this.posX=e.x,this.posY=e.y):(this.movieClip.scaleX=1*SlotConfig.BORDER_SCALE,this.movieClip.scaleY=1*SlotConfig.BORDER_SCALE,this.x=e.x,this.y=e.y,this.movieClip.x=e.x,this.movieClip.y=e.y,this.movieClip.anchorOffsetX=.5*this.movieClip.width,this.movieClip.anchorOffsetY=.5*this.movieClip.height,this.movieClip.gotoAndStop(0),this.movieClip.visible=!1,this.borderMask.addChild(this))},t.prototype.SetBorderPosition=function(e,t){this.movieClip.x=t.x,this.movieClip.y=t.y,this.x=e.x,this.y=e.y,this.movieClip.gotoAndStop(0)},t.prototype.PlayAnimation=function(){SlotConfig.isDragonBonesBorder?(this.dbBorder=DragonBonesManager.getInstance().CreateArmature("symbol_effect"),this.dbBorder.x=this.posX,this.dbBorder.y=this.posY,this.dbBorder.anchorOffsetX=.5*this.dbBorder.width,this.dbBorder.anchorOffsetY=.5*this.dbBorder.height,this.dbArmatureDisplay=this.dbBorder.getDisplay(),this.dbArmatureDisplay.scaleX=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.dbArmatureDisplay.scaleY=SlotConfig.SLOT_SCALE*GameConfig.ContentScale,this.dbArmatureDisplay.x=0,this.dbArmatureDisplay.y=0,this.dbArmatureDisplay.visible=!1,this.borderMask.addChild(this),this.addChild(this.dbArmatureDisplay),this.dbArmatureDisplay.visible=!0,this.dbBorder.animation.gotoAndPlay("loop")):(this.movieClip.visible=!0,isIOS14()?this.movieClip.gotoAndPlay(0,3):this.movieClip.gotoAndPlay(0))},t.prototype.StopAnimation=function(){SlotConfig.isDragonBonesBorder?(null!=this.dbArmatureDisplay&&(this.dbArmatureDisplay.visible=!1),null!=this.dbBorder&&this.dbBorder.animation.gotoAndStop("loop"),null!=this.dbArmatureDisplay&&(this.removeChild(this.dbArmatureDisplay),this.dbArmatureDisplay=null),null!=this.dbBorder&&(this.dbBorder.dispose(),this.dbBorder=null)):(this.movieClip.visible=!1,this.movieClip.gotoAndStop(0))},t}(egret.DisplayObjectContainer);__reflect(SymbolBorder.prototype,"SymbolBorder");var SymbolMask=function(e){function t(){var t=e.call(this)||this;t.symbolTypeCount=4,t.symbolTypeIndexArray=new Array;for(var n=0;n5&&this.childrenArray[t].currentId<14&&(this.setChildIndex(this.childrenArray[t],this.indexNum),this.indexNum++);for(t=0;t=0;i--)this.slotView.GetStopReelOrderedReel(n).GetQueuedSymbol(i).SetResult(this.slotView.GetStopReelOrderedReel(n).GetResultAt(i));this.slotView.GetStopReelOrderedReel(n).reelAnimHandler.StartRespin()},t.prototype.OnIdleToFeatureDropOut=function(e){for(var t=0;tn&&(this.timeBuffer=0,this.slotView.GetStopReelOrderedReel(this.respinReelIndex).reelAnimHandler.StartRespin(),this.respinReelIndex++,this.respinReelIndex==this.slotView.reelCount)?void clearInterval(this.respinTimer):void 0},t}(SlotController);__reflect(BombingTypeSlotController.prototype,"BombingTypeSlotController");var ObsoletedSlotSymbol=function(e){function t(t,n,i,o){var a=e.call(this,t,n,i,o)||this;return a.slotView=o,a.anchorOffsetX=.5*SlotConfig.SLOT_WIDTH,a.anchorOffsetY=.5*SlotConfig.SLOT_HEIGHT,a.width=SlotConfig.SLOT_WIDTH,a.height=SlotConfig.SLOT_HEIGHT,a.posX=a.x,a.posY=a.y,a.currentId=8,a.movieClipSource=SlotConfig.Items[a.currentId.toString()],a.content=MovieClip.movieClipBySpriteSheet(a.movieClipSource.source,SlotConfig.HitSymbolAnimationFrameRate),a.idleMask=t,a.winningMask=n,a.borderMask=i,a.symbolBorder=new SymbolBorder(i),a.symbolBorder.InitMovieclip(a,a.content),null==a.content?(console.error("cannot find slot "+a.currentId.toString()),a):(a.visible=!0,a.content.scaleX=SlotConfig.SLOT_SCALE,a.content.scaleY=SlotConfig.SLOT_SCALE,a.content.anchorOffsetX=.5*a.content.width,a.content.anchorOffsetY=.5*a.content.height,a.content.x=.5*a.width,a.content.y=.5*a.height,a.touchEnabled=!1,a.content.gotoAndStop(0),a.addChild(a.content),a)}return __extends(t,e),t.prototype.SetReelId=function(e){this.reelId=e},t.prototype.Fade=function(e,t){var n=egret.Tween.get(this.content);e?n.to({alpha:1},t):n.to({alpha:0},t)},t.prototype.StopReelTween=function(){TweenLite.to(this,.1,{y:this.posY+40,ease:Power1.easeOut,onComplete:this.BounceBack.bind(this)})},t.prototype.BounceBack=function(){this.y=this.posY+40,TweenLite.to(this,.233,{y:this.posY,onComplete:this.OnTweenFinished.bind(this)})},t.prototype.OnTweenFinished=function(){this.y=this.posY},t.prototype.SetResult=function(e){if(this.currentId=e,this.removeChild(this.content),this.movieClipSource=SlotConfig.Items[this.currentId.toString()],null!=this.movieClipSource){if(this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content)return void console.error("cannot find slot "+this.currentId.toString());this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=.5*this.content.width,this.content.anchorOffsetY=.5*this.content.height,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.addChild(this.content)}},t.prototype.GetResult=function(){return this.currentId},t.prototype.SetOriginPosition=function(e,t){this.x=e,this.y=t,this.posX=e,this.posY=t},t.prototype.PlayAnimation=function(e){e&&this.symbolBorder.PlayAnimation(),this.symbolBorder.x=this.x,this.symbolBorder.y=this.y,this.winningMask.addChild(this),this.content.gotoAndPlay(0)},t.prototype.HitSpecialAnimation=function(e){return this.removeChild(this.content),this.movieClipSource=SlotConfig.Items[e.toString()],this.content=MovieClip.movieClipBySpriteSheet(this.movieClipSource.source,12),null==this.content?void console.error("cannot find slot "+e.toString()):(this.content.scaleX=SlotConfig.SLOT_SCALE,this.content.scaleY=SlotConfig.SLOT_SCALE,this.content.anchorOffsetX=.5*this.content.width,this.content.anchorOffsetY=.5*this.content.height,this.content.x=.5*this.width,this.content.y=.5*this.height,this.content.gotoAndStop(0),this.addChildAt(this.content,0),this.winningMask.addChild(this),this.content.gotoAndPlay(0),void(this.newSpecialTimer=setInterval(this.CheckAnimationFinished(),1e3/30)))},t.prototype.CheckAnimationFinished=function(){this.content.currentFrame==this.content.totalFrames&&(this.content.gotoAndStop(0),clearInterval(this.newSpecialTimer),this.SetResult(this.currentId))},t.prototype.StopSymbolAnimation=function(){clearInterval(this.newSpecialTimer),this.idleMask.addChild(this),this.content.gotoAndStop(0),this.symbolBorder.StopAnimation()},t.prototype.SetValidSymbolIdxRange=function(e,t){this.minIdx=e,this.maxIdx=t},t.prototype.InitContent=function(){},t}(SlotSymbol);__reflect(ObsoletedSlotSymbol.prototype,"ObsoletedSlotSymbol");var CascadeReelAnimationHandler=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isDroppedOutFinished=!1,t.dropInDelay=new Array,t.dropOutDelay=new Array,t}return __extends(t,e),t.prototype.StartSpin=function(){if(t.ReelStopCount=0,this.dropOutDelay.length>0){for(var e=0;e0){for(var e=0;e0)for(var o=0;o=0;i--)n=this.slotReel.GetQueuedSymbol(i),n.y<=this.bottomY&&(n.y+=t);this.ValidateAllSymbolPositions()},t.prototype.InstantDropOut=function(){this.preparationQueue=new Array;for(var e,t=0;t=0;i--)t=this.slotReel.GetQueuedSymbol(i),egret.Tween.removeTweens(t);this.isPrepareToStop=!1,this.isStopped=!0,egret.stopTick(this.PositionUpdate,this);for(var i=n.length-1;i>=0;i--)t=this.slotReel.GetQueuedSymbol(i),this.slotReel.GetQueuedSymbol(i).SetResult(this.slotReel.GetResultAt(i));if(EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.ON_STARTSTOPPING,this.slotReel.id)),e){if(this.dropInDelay.length>0)for(var i=0;i0)for(var i=0;i=0;n--)if(t=this.slotReel.GetQueuedSymbol(n),i=SlotConfig.SLOT_TOPY+this.slotReel.symbolHeight*n,t.y!=i){var r=1;GameConfig.isTurboMode&&GameConfig.TurboModeState&&(r=4),o=egret.setTimeout(this.DropInDelay,this,e/r,[t,o,i,n]),this.dropInDelay.push(o),e+=this.symbolDropDelay,a--}else a--,this.dropInDelay.push(0),0==a&&this.slotReel.OnReelStop()},t.prototype.DropInDelay=function(e){var t=e[0],n=e[1],i=e[2],o=e[3],a=egret.Tween.get(t),r=this,s=1;GameConfig.isTurboMode&&GameConfig.TurboModeState&&(s=4),a.to({y:i},220/s).call(function(){r.OnHitScatter(t),t.ReelStopTween(),AudioManager.Instance.playSound(Sound.BombingSlotStop),0==o&&r.slotReel.OnReelStop()}),egret.clearTimeout(n)},t.prototype.DropOut=function(e){var t=e[0];null!=this.startSpinDelayID&&(egret.clearTimeout(this.startSpinDelayID),this.startSpinDelayID=null);var n,i,o=this.slotReel.nSymbol;this.dropInDelay=new Array;for(var a=this.slotReel.nSymbol-1;a>=0;a--){var r=this.slotReel.GetQueuedSymbol(a);i=SlotConfig.SLOT_BOTTOMY+SlotConfig.SLOT_HEIGHT,r.y!=i&&(o--,n=egret.setTimeout(this.DropOutDelay,this,t,[r,i,n]),this.dropOutDelay.push(n),t+=120)}},t.prototype.DropOutDelay=function(e){if(this.isStopped){var t=e[2]; return void egret.clearTimeout(t)}var n=e[0],i=e[1],o=egret.Tween.get(n),a=this;o.to({y:i},150).call(function(){a.preparationQueue.push(n)})},t.prototype.OnReelStop=function(){t.ReelStopCount++,console.log("reel stop count : "+t.ReelStopCount),t.ReelStopCount==this.slotReel.slotView.reelCount&&(SlotSymbol.ScatterCount=0,this.reelStopDelayTimer=new egret.Timer(500,1),this.reelStopDelayTimer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.OnReelStopDelay,this),this.reelStopDelayTimer.start())},t.prototype.OnReelStopDelay=function(){t.ReelStopCount=0,e.prototype.OnReelStopDelay.call(this)},t.prototype.CheckDropOutFinished=function(){return this.isDroppedOutFinished?(this.PrepareToStop(),egret.stopTick(this.CheckDropOutFinished,this),!0):void 0},t.prototype.ValidateAllSymbolPositions=function(){for(var e=0;eSlotConfig.SLOT_BOTTOMY&&this.preparationQueue.push(t)}return 0},t.prototype.OnHitScatter=function(e){if(!e.isScatterOneSecFinished&&e.currentId==SymbolType.Scatter){e.isScatterOneSecFinished=!0;var t=new Object;t.symbol=e,t.reelId=e.reelId,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SYMBOL_DROPIN_FINISHED,t))}},t.ReelStopCount=0,t}(SimpleSpinningReelAnimationHandler);__reflect(CascadeReelAnimationHandler.prototype,"CascadeReelAnimationHandler");var SlotReel=function(e){function t(t,n,i,o,a,r){void 0===r&&(r=null);var s=e.call(this)||this;return s.id=t,s.nSymbol=n,s.symbolHeight=o,s.nSignificantSymbol=a,s.slotView=r,s.reelState=SlotReelState.IDLE,s.reelAnimHandler=new SlotConfig.ReelAnimationHandler,s.reelAnimHandler.slotReel=s,s}return __extends(t,e),t.prototype.SetSymbolHeight=function(e){this.symbolHeight=e},t.prototype.SetSymbolMasks=function(e){this.idleMask=e[0],this.spinningMask=e[1],this.SetActiveMask(this.idleMask)},t.prototype.Fade=function(e,t){for(var n=0;n=0;t--){e=!1;for(var n=0;n0?(this.Free1SlowRolling(),this.free1StopCount--):(this.isFreeGroupStopped=!0,this.CheckResultEnded()):(this.Free1SlowRolling(),this.free1StopCount--):this.Free1LoopRolling()},t.prototype.Free2CallBack=function(){if(190==this.free2.x){switch(this.free2.x=650,this.free2Index){case 0:this.free2Img.source="mystery_json.15",this.free2Index=2;break;case 1:this.free2Img.source="mystery_json.10",this.free2Index=3;break;case 2:this.free2Img.source="mystery_json.8",this.free2Index=4;break;case 3:this.free2Img.source="mystery_json.25",this.free2Index=0;break;case 4:this.free2Img.source="mystery_json.20",this.free2Index=1}this.isDataReady?this.numOfFreeGame==this.freeArray[this.free1Index]?this.free2StopCount>0&&(this.Free2SlowRolling(),this.free2StopCount--):(this.Free2SlowRolling(),this.free2StopCount--):this.Free2LoopRolling()}else this.isDataReady?(this.Free2SlowRolling(),this.free2StopCount--):this.Free2LoopRolling()},t.prototype.Mul1CallBack=function(){if(660==this.mul1.x){switch(this.mul1.x=160,this.mul1Index){case 0:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option3"),this.mul1Index=2;break;case 1:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option4"),this.mul1Index=3;break;case 2:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option5"),this.mul1Index=4;break;case 3:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option1"),this.mul1Index=0;break;case 4:this.mul1Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option2"),this.mul1Index=1}this.isDataReady?(this.Mul1SlowRolling(),this.mul1StopCount--):this.Mul1LoopRolling()}else this.isDataReady?this.multiplierId==this.multiplierArray[this.mul1Index]?this.mul1StopCount>0?(this.Mul1SlowRolling(),this.mul1StopCount--):(this.isMultiplierGroupStopped=!0,this.CheckResultEnded()):(this.Mul1SlowRolling(),this.mul1StopCount--):this.Mul1LoopRolling()},t.prototype.Mul2CallBack=function(){if(660==this.mul2.x){switch(this.mul2.x=160,this.mul2Index){case 0:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option3"),this.mul2Index=2;break;case 1:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option4"),this.mul2Index=3;break;case 2:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option5"),this.mul2Index=4;break;case 3:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option1"),this.mul2Index=0;break;case 4:this.mul2Label.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option2"),this.mul2Index=1}this.isDataReady?this.multiplierId==this.multiplierArray[this.mul1Index]?this.mul2StopCount>0&&(this.Mul2SlowRolling(),this.mul2StopCount--):(this.Mul2SlowRolling(),this.mul2StopCount--):this.Mul2LoopRolling()}else this.isDataReady?(this.Mul2SlowRolling(),this.mul2StopCount--):this.Mul2LoopRolling()},t.prototype.StartRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free1),e=egret.Tween.get(this.free1),AudioManager.Instance.playSound(Sound.RandomOption),e.to({x:this.free1.x-230},500).call(this.Free1CallBack.bind(this));var e=null;egret.Tween.removeTweens(this.free2),e=egret.Tween.get(this.free2),e.to({x:this.free2.x-230},500).call(this.Free2CallBack.bind(this));var e=null;egret.Tween.removeTweens(this.mul1),e=egret.Tween.get(this.mul1),e.to({x:this.mul1.x+250},500).call(this.Mul1CallBack.bind(this));var e=null;egret.Tween.removeTweens(this.mul2),e=egret.Tween.get(this.mul2),e.to({x:this.mul2.x+250},500).call(this.Mul2CallBack.bind(this))},t.prototype.Free1LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free1),e=egret.Tween.get(this.free1),AudioManager.Instance.playSound(Sound.RandomOption),e.to({x:this.free1.x-230},200).call(this.Free1CallBack.bind(this))},t.prototype.Free2LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free2),e=egret.Tween.get(this.free2),e.to({x:this.free2.x-230},200).call(this.Free2CallBack.bind(this))},t.prototype.Free1SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free1),e=egret.Tween.get(this.free1),AudioManager.Instance.playSound(Sound.RandomOption),e.to({x:this.free1.x-230},500).call(this.Free1CallBack.bind(this))},t.prototype.Free2SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.free2),e=egret.Tween.get(this.free2),e.to({x:this.free2.x-230},500).call(this.Free2CallBack.bind(this))},t.prototype.ReadyToStop=function(e,t){this.numOfFreeGame=e,this.multiplierId=t,this.isDataReady=!0},t.prototype.Mul1LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul1),e=egret.Tween.get(this.mul1),e.to({x:this.mul1.x+250},200).call(this.Mul1CallBack.bind(this))},t.prototype.Mul2LoopRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul2),e=egret.Tween.get(this.mul2),e.to({x:this.mul2.x+250},200).call(this.Mul2CallBack.bind(this))},t.prototype.Mul1SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul1),e=egret.Tween.get(this.mul1),e.to({x:this.mul1.x+250},500).call(this.Mul1CallBack.bind(this))},t.prototype.Mul2SlowRolling=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1;var e=null;egret.Tween.removeTweens(this.mul2),e=egret.Tween.get(this.mul2),e.to({x:this.mul2.x+250},500).call(this.Mul2CallBack.bind(this))},t.prototype.CheckResultEnded=function(){this.isFreeGroupStopped&&this.isMultiplierGroupStopped&&EventCentral.getInstance().dispatchEvent(FLSceneNotify.Notify(FLSceneNotify.FEATURE_MYSTERY_REVEAL_FINISHED))},t}(HTMLUI.UIBase);__reflect(FeatureMysteryResult.prototype,"FeatureMysteryResult");var FES_ID;!function(e){e[e.NONE=0]="NONE",e[e.XMAS=1]="XMAS",e[e.WC=2]="WC"}(FES_ID||(FES_ID={}));var FesConstant=function(){function e(){}return e.FES_ENABLE=!1,e.URL="http://192.168.23.85/public/api/CheckPrize",e.FES_ID=FES_ID.WC,e.LOAD_TOKEN_TIMEOUT=1e4,e}();__reflect(FesConstant.prototype,"FesConstant");var FesEvent=function(e){function t(t){var n=e.call(this)||this;if(n._groupName="",n._closeWaitTime=3e3,n._text={2:["請用滑鼠刮去金色部份","一鍵即刮","確定"],0:["请用滑鼠刮去金色部份","一键即刮","确定"],1:["Please scrape the gold part with your mouse","One-click scratch","OK"],4:["皆様のマウスで金色の部分をスクラッチしてください。","ワンクリックスクラッチ","OK"],5:["โปรดขูดแถบสีทองด้วยเมาส์ของคุณ","ขูดเพียงคลิกเดียว","ตกลง"],7:["Silakan gesek bagian emas dengan mouse Anda","Gosok satu kali klik","OKE"],3:["마우스로금색부분을긁어주세요","원클릭스크래치","확인"],6:["Hãy cạo phần\nvàng bằng chuột","Một cú nhấp chuột","ĐƯỢC"]},0==t)switch(GameConfig.Locale){case Language.TraditionalChinese:n._prize="再接再厲!";break;case Language.SimplifiedChinese:n._prize="再接再厉!";break;case Language.Japanese:n._prize="再試行する!";break;case Language.Thai:n._prize="ลองอีกครั้ง!";break;case Language.Indonesia:n._prize="Coba lagi!";break;case Language.Korean:n._prize="다시\n시도하십시오!";break;case Language.Vietnam:n._prize="Thử lại!";break;default:n._prize="Try again!"}else n._prize=StringUtil.numberFormat(t,0);var i="";switch(Math.floor(3*Math.random())){case 1:i="2";break;case 2:i="3"}switch(GameConfig.Locale){case Language.TraditionalChinese:n._cardSheet="wc_card"+i+"_zh_json";break;case Language.SimplifiedChinese:n._cardSheet="wc_card"+i+"_cn_json";break;default:n._cardSheet="wc_card"+i+"_en_json"}return n._modelSheet="wc_sheet"+i+"_json",n.percentWidth=1300,n.percentHeight=670,n.verticalCenter=0,n.horizontalCenter=0,n}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this)},t.prototype.init=function(){var e=new eui.Rect;e.percentWidth=100,e.percentHeight=100,e.fillAlpha=.5,this.addChild(e),this._lowerLayer=new eui.Image(this._cardSheet+".card_2"),this._lowerLayer.verticalCenter=0,this._lowerLayer.horizontalCenter=0,this._lowerLayer.visible=!1,this.addChild(this._lowerLayer),this._upperLayer=new eui.Image(this._modelSheet+".model_1_2"),this._upperLayer.verticalCenter=0,this._upperLayer.horizontalCenter=0,this.addChild(this._upperLayer),this._playLayer=new eui.Group,this._playLayer.percentWidth=100,this._playLayer.percentHeight=100,this._playLayer.verticalCenter=0,this._playLayer.horizontalCenter=0,this._playLayer.visible=!1,this.addChild(this._playLayer);var t=new eui.Image("wc_common_json.darkgreen_mask");t.verticalCenter=18,t.horizontalCenter=144,t.scaleX=.94,t.scaleY=.94,this._playLayer.addChild(t);var n=new eui.Label;n.verticalCenter=18,n.horizontalCenter=144,GameConfig.Locale==Language.Korean&&(n.size-=4,n.textAlign=egret.HorizontalAlign.CENTER),n.text=this._prize,this._playLayer.addChild(n);var i=new eui.Image("wc_common_json.circle_frame");i.verticalCenter=18,i.horizontalCenter=144,i.scaleX=.94,i.scaleY=.94,this._playLayer.addChild(i),this.startRotateAnimation(i),this._card=new ScratchCard,this._card.verticalCenter=18,this._card.horizontalCenter=144,this._card.scaleX=.94,this._card.scaleY=.94,this._card.addEventListener(ScratchCard.NOTIFY_CARD_SCRAPE,this.onScraped,this),this._playLayer.addChild(this._card);var n=new eui.Label;n.verticalCenter=-90,n.horizontalCenter=144,n.textAlign=egret.HorizontalAlign.CENTER,n.size=16,n.wordWrap=!0,n.width=210,n.text=this._text[GameConfig.Locale][0],(0==GameConfig.Locale||2==GameConfig.Locale)&&(n.fontFamily="Microsoft JhengHei"),this._playLayer.addChild(n);var o=new eui.Group;o.verticalCenter=130,o.horizontalCenter=144,o.minWidth=100,this._playLayer.addChild(o);var n=new eui.Label;n.textAlign=egret.HorizontalAlign.CENTER,n.verticalCenter=0,n.horizontalCenter=0,n.size=16,n.wordWrap=!0,n.text=this._text[GameConfig.Locale][1],n.textWidth>100&&(o.width=150),n.textWidth>150&&(n.size=13),this._lblBtn=n,o.addChild(n),this.btn=new BaseButton,this.btn.percentWidth=100,this.btn.percentHeight=100,this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this);var a=new eui.Rect(this.btn.width,this.btn.height);a.fillAlpha=0,a.percentWidth=100,a.percentHeight=100,this.btn.addChild(a),o.addChild(this.btn),this.play()},t.prototype.startRotateAnimation=function(e){if(this.parent){var t=egret.Tween.get(e);t.to({rotation:e.rotation+120},300).call(this.startRotateAnimation,this,[e])}},t.prototype.startAlphaAnimation=function(e){if(this.parent){var t=egret.Tween.get(e),n=.5;.5==e.alpha&&(n=1),t.to({alpha:n},500).call(this.startAlphaAnimation,this,[e])}},t.prototype.onScraped=function(){this._lblBtn.text=this._text[GameConfig.Locale][2],this._closeWaitTime=0},t.prototype.play=function(){var e=egret.Tween.get(this._upperLayer);e.wait(600).call(this.changeImage,this,[2]).wait(400).call(this.changeImage,this,[3]).wait(400).call(this.changeImage,this,[4]).wait(400).call(this.changeImage,this,[5])},t.prototype.changeImage=function(e){switch(e){case 2:this._lowerLayer.visible=!0,this._upperLayer.source=this._cardSheet+".card_2",this._lowerLayer.source=this._modelSheet+".model_1_2";break;case 3:this._upperLayer.source=this._cardSheet+".card_3",this._lowerLayer.source=this._modelSheet+".model_3";break;case 4:this._upperLayer.source=this._cardSheet+".card_4",this._lowerLayer.source=this._modelSheet+".model_4";break;case 5:this._upperLayer.source=this._modelSheet+".model_5",this._lowerLayer.source=this._cardSheet+".card_5",this._playLayer.visible=!0;var t=new eui.Image("wc_common_json.rect_frame");t.verticalCenter=18,t.horizontalCenter=41,t.scaleX=.9,t.scaleY=.9,this.addChildAt(t,this.getChildIndex(this._lowerLayer)),this.startAlphaAnimation(t)}},t.prototype.close=function(){this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this),this._card.visible=!1;var e=egret.Tween.get(this);e.wait(this._closeWaitTime).to({alpha:0},200).call(this.destroy,this)},t.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this._upperLayer=null,this._lowerLayer=null,this._playLayer=null,FesInfo.FINISHED=!0,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED))},t}(eui.Component);__reflect(FesEvent.prototype,"FesEvent");var FesEventController=function(e){function t(){var n=e.call(this)||this;if(n._isInit=!1,n.delay=0,n.isLoadingReady=!1,t._instance)throw new Error("Error: Instantiation failed: Use SingletonClass.getInstance() instead of new.");return t._instance=n,n}return __extends(t,e),t.getInstance=function(){return t._instance},t.prototype.Init=function(){this._isInit?egret.log("FesEventController has already been inited"):(this._isInit=!0,EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_TRIGGERED,this.PlayFesEffect,this))},t.prototype.RemoveListeners=function(){EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_TRIGGERED,this.PlayFesEffect,this)},t.prototype.StartRequest=function(){console.log("send request for fes-event ",FesConstant.URL);var e=new FesInfoLoader;e.load(FesConstant.URL,FesConstant.FES_ID,SocketManager.getInstance().GetData().playerID)},t.prototype.IsFesEventTriggered=function(){return FesConstant.FES_ENABLE&&!FesInfo.APPEARED?(FesInfo.APPEARED=!0,!0):!1},t.prototype.CheckIsInfoReady=function(){FesInfo.INFO_LOADED?FesInfo.TO_SHOW?EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_TRIGGERED)):EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED)):EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_INFO_LOADED,this.WaitUntilInfoLoaded,this)},t.prototype.WaitUntilInfoLoaded=function(e){void 0===e&&(e=null),EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_INFO_LOADED,this.WaitUntilInfoLoaded,this),FesInfo.TO_SHOW?EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_TRIGGERED)):EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED))},t.prototype.PlayFesEffect=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_TRIGGERED,this.PlayFesEffect,this),EventCentral.getInstance().addEventListener(SceneNotify.FES_IS_FINISHED,this.OnFesEffectFinished,this),GameSceneManager.GetInstance().ShowOverlay("FesEvent")},t.prototype.OnFesEffectFinished=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.FES_IS_FINISHED,this.PlayFesEffect,this)},t._instance=new t,t}(egret.EventDispatcher);__reflect(FesEventController.prototype,"FesEventController");var FesEventMobile=function(e){function t(t){var n=e.call(this)||this;if(n._closeWaitTime=3e3,n._text={2:["請刮去金色部份","一鍵即刮","確定"],0:["请刮去金色部份","一键即刮","确定"],1:["Please scrape the gold part","One-click scratch","OK"],4:["金色の部分をスクラッチしてください。","ワンクリックスクラッチ","OK"],5:["โปรดขูดแถบสีทองด้วยนิ้วของคุณ","ขูดเพียงคลิกเดียว","ตกลง"],7:["Silakan gesek bagian emas","Gosok satu kali klik","OKE"],3:["금색부분을긁어주세요","원클릭스크래치","확인"],6:["Hãy cạo phần vàng","Một cú nhấp chuột","ĐƯỢC"]},0==t)switch(GameConfig.Locale){case Language.TraditionalChinese:n._prize="再接再厲!";break;case Language.SimplifiedChinese:n._prize="再接再厉!";break;case Language.Japanese:n._prize="再試行する!";break;case Language.Thai:n._prize="ลองอีกครั้ง!";break;case Language.Indonesia:n._prize="Coba lagi!";break;case Language.Korean:n._prize="다시\n시도하십시오!";break;case Language.Vietnam:n._prize="Thử lại!";break;default:n._prize="Try again!"}else n._prize=StringUtil.numberFormat(t,0);var i="",o="germany",a=3*Math.random(),r=Math.floor(a);switch(r){case 1:i="2",o="portugal";break;case 2:i="3",o="france"}var s=GameConfig.Locale;switch(s){case Language.TraditionalChinese:n._cardSheet="bg_"+o+"_zh_png";break;case Language.SimplifiedChinese:n._cardSheet="bg_"+o+"_cn_png";break;default:n._cardSheet="bg_"+o+"_en_png"}return n._modelSheet="wc_mob_sheet"+i+"_json",n.width=1068,n.height=600,n.verticalCenter=0,n.horizontalCenter=0,n}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this)},t.prototype.init=function(){var e=new eui.Rect;e.percentWidth=100,e.percentHeight=100,e.fillAlpha=.5,this.addChild(e),this._upperLayer=new eui.Image(this._modelSheet+".model_1"),this._upperLayer.verticalCenter=0,this._upperLayer.horizontalCenter=0,this.addChild(this._upperLayer),this._playLayer=new eui.Group,this._playLayer.percentWidth=100,this._playLayer.percentHeight=100,this._playLayer.verticalCenter=0,this._playLayer.horizontalCenter=0,this._playLayer.visible=!1,this.addChild(this._playLayer);var t=new eui.Image("wc_common_json.darkgreen_mask");t.verticalCenter=-34,t.horizontalCenter=132,t.scaleX=1.2,t.scaleY=1.2,this._playLayer.addChild(t);var n=new eui.Label;n.verticalCenter=-34,n.horizontalCenter=132,n.size=36,GameConfig.Locale==Language.Korean&&(n.size-=4,n.textAlign=egret.HorizontalAlign.CENTER),n.text=this._prize,this._playLayer.addChild(n);var i=new eui.Image("wc_common_json.circle_frame");i.verticalCenter=-34,i.horizontalCenter=132,i.scaleX=1.2,i.scaleY=1.2,this._playLayer.addChild(i),this.startRotateAnimation(i),this._card=new ScratchCard,this._card.verticalCenter=-34,this._card.horizontalCenter=132,this._card.scaleX=1.2,this._card.scaleY=1.2,this._card.addEventListener(ScratchCard.NOTIFY_CARD_SCRAPE,this.onScraped,this),this._playLayer.addChild(this._card);var n=new eui.Label;n.verticalCenter=-170,n.horizontalCenter=132,n.textAlign=egret.HorizontalAlign.CENTER,n.size=16,n.wordWrap=!0,n.width=220,n.text=this._text[GameConfig.Locale][0],(0==GameConfig.Locale||2==GameConfig.Locale)&&(n.fontFamily="Microsoft JhengHei"),this._playLayer.addChild(n);var o=new eui.Group;o.verticalCenter=110,o.horizontalCenter=131,o.minWidth=120,o.minHeight=30,this._playLayer.addChild(o);var n=new eui.Label;n.textAlign=egret.HorizontalAlign.CENTER,n.verticalCenter=0,n.horizontalCenter=0,n.size=16,n.wordWrap=!0,n.text=this._text[GameConfig.Locale][1],n.textWidth>120&&(o.width=190),o.addChild(n),this._lblBtn=n,this.btn=new BaseButton,this.btn.percentWidth=100,this.btn.percentHeight=100,this.btn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this);var a=new eui.Rect(this.btn.width,this.btn.height);a.fillAlpha=0,a.percentWidth=100,a.percentHeight=100,this.btn.addChild(a),o.addChild(this.btn),this.play()},t.prototype.startRotateAnimation=function(e){if(this.parent){var t=egret.Tween.get(e);t.to({rotation:e.rotation+120},300).call(this.startRotateAnimation,this,[e])}},t.prototype.startAlphaAnimation=function(e){if(this.parent){var t=egret.Tween.get(e),n=.5;.5==e.alpha&&(n=1),t.to({alpha:n},500).call(this.startAlphaAnimation,this,[e])}},t.prototype.onScraped=function(){this._lblBtn.text=this._text[Localization.Instance.currentLanguage][2],this._closeWaitTime=0},t.prototype.play=function(){var e=egret.Tween.get(this._upperLayer);e.wait(200).call(this.changeImage,this,[2]).wait(200).call(this.changeImage,this,[3]).wait(200).call(this.changeImage,this,[4])},t.prototype.changeImage=function(e){switch(e){case 2:this._upperLayer.source=this._modelSheet+".model_2";break;case 3:this._upperLayer.source=this._modelSheet+"model_3";break;case 4:this._upperLayer.source=this._cardSheet,this._playLayer.visible=!0;var t=new eui.Image("wc_common_json.rect_frame");t.verticalCenter=-33,t.horizontalCenter=-1,t.scaleX=1.16,t.scaleY=1.16,this.addChildAt(t,this.getChildIndex(this._upperLayer)),this.startAlphaAnimation(t)}},t.prototype.close=function(){this.btn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.close,this),this._card.visible=!1;var e=egret.Tween.get(this);e.wait(3e3).to({alpha:0},200).call(this.destroy,this)},t.prototype.destroy=function(){this.parent&&this.parent.removeChild(this),this._upperLayer=null,this._playLayer=null,FesInfo.FINISHED=!0,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FES_IS_FINISHED))},t}(eui.Component);__reflect(FesEventMobile.prototype,"FesEventMobile");var FesEventOverlayHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return[GameConfig.platform==Platform.desktop?this.LoadFesEventGroup():this.LoadFesEventGroupMobile()]},t.prototype.CheckAndLoadResources=function(){var e=this.GetRelatedgroupList();this.nWaitGroup=0,this.currentLoadingGroup=0;for(var t=0,n=0;n.5*(this.width-n)&&e.x<.5*(this.width-n)+n&&e.y>.5*(this.height-n)&&e.y<.5*(this.height-n)+n&&(this._scraped=!0,this.dispatchEventWith(t.NOTIFY_CARD_SCRAPE))},t.prototype.redraw=function(e){this._scraped||this.markScrape(e),this._shape.graphics.clear(),this._shape.graphics.lineStyle(80,16777215,1,!0,"","","round"),null==this._lastPoint&&(this._lastPoint=e),this._shape.graphics.moveTo(this._lastPoint.x,this._lastPoint.y),this._shape.graphics.lineTo(e.x,e.y),this._shape.graphics.endFill()},t.prototype.refreshToBitmap=function(){var e=new egret.RenderTexture;e.drawToTexture(this._drawGroup,new egret.Rectangle(0,0,this.width,this.height)),this._scratchMask.texture&&this._scratchMask.texture.dispose(),this._scratchMask.texture=e,this._scratchMask2.texture=e,e=new egret.RenderTexture,e.drawToTexture(this._scratchGroup,new egret.Rectangle(0,0,this.width,this.height)),this._display.texture&&this._display.texture.dispose(),this._display.texture=e,this._coverImg.visible=!1},t.NOTIFY_CARD_SCRAPE="NOTIFY_CARD_SCRAPE",t}(eui.Component);__reflect(ScratchCard.prototype,"ScratchCard");var BitwiseUtil=function(){function e(){}return e.getBits=function(t,n,i){var o=0,a=Math.pow(2,n)-1;return a=e.leftShift(a,i),o=e.and(t,a),o=e.rightShift(o,i)},e.activeBits=function(t,n,i){return e.or(t,e.leftShift(n,i))},e.leftShift=function(e,t){var n=0;return n=e*Math.pow(2,t)},e.rightShift=function(e,t){return e/Math.pow(2,t)},e.activeBit=function(t,n){return e.or(t,e.leftShift(1,n))},e.and=function(t,n){var i=t<<0,o=(t-i)/Math.pow(2,32),a=n<<0,r=(n-a)/Math.pow(2,32),s=i&a,l=o&r,h=new egret.ByteArray;h.endian=egret.Endian.LITTLE_ENDIAN,h.writeUnsignedInt(s),h.writeUnsignedInt(l),h.position=0;var c=e.readInt53(h);return c},e.or=function(t,n){var i=t<<0,o=(t-i)/Math.pow(2,32),a=n<<0,r=(n-a)/Math.pow(2,32),s=i|a,l=o|r,h=new egret.ByteArray;h.endian=egret.Endian.LITTLE_ENDIAN,h.writeUnsignedInt(s),h.writeUnsignedInt(l),h.position=0;var c=e.readInt53(h);return c},e.editLow=function(t,n){var i=new egret.ByteArray;return i.endian=egret.Endian.LITTLE_ENDIAN,e.writeInt53(i,t),i.position=0,i.writeUnsignedInt(n),i.position=0,e.readInt53(i)},e.editHigh=function(t,n){var i=new egret.ByteArray;return i.endian=egret.Endian.LITTLE_ENDIAN,e.writeInt53(i,t),i.position=4,i.writeUnsignedInt(n),i.position=0,e.readInt53(i)},e.isBitActive=function(e,t){var n=!1;if(32>t)n=0!=(1<0;)n+=e.readUnsignedByte().toString(t)+" ";return e.position=i,n.toUpperCase()},e.readBytes=function(e,t){var n=new egret.ByteArray;return n.endian=egret.Endian.LITTLE_ENDIAN,e.readBytes(n,0,t),n},e.writeBytes=function(e,t,n,i){void 0===n&&(n=0),void 0===i&&(i=0),t.writeBytes(e,n,i)},e.readUint=function(e,t){if(void 0===t&&(t=4),4==t)return e.readUnsignedInt();var n=new egret.ByteArray;n.endian=egret.Endian.LITTLE_ENDIAN,e.readBytes(n,0,t),n.position=n.length;for(var i=0;4-t>i;i++)n.writeByte(0);return n.position=0,n.readUnsignedInt()},e.writeUint=function(e,t,n){if(void 0===n&&(n=4),4==n)e.writeUnsignedInt(t);else{var i=new egret.ByteArray;i.endian=egret.Endian.LITTLE_ENDIAN,i.writeUnsignedInt(t),e.writeBytes(i,0,n)}},e.readInt53=function(e){var t=e.readUnsignedInt(),n=e.readUnsignedInt(),i=!1,o=1<<31;0!=(n&o)&&(i=!0,t=~t,n=~n);var a=4294967296*n+t;return i&&(a=-(a+1)),a},e.writeInt53=function(e,t){e.writeUnsignedInt(t),e.writeUnsignedInt(Math.floor(t/4294967296))},e.readString=function(e){for(var t=0,n=e.position,i=e.position;t0&&o%16==0&&(console.log(i),i="");var a=e.readByte();i=i+t[a>>4&15]+t[15&a]+" "}""!=i&&console.log(i),e.position=n},e}();__reflect(BitwiseUtil.prototype,"BitwiseUtil");var CommonFunc=function(){function e(){}return e.leaveGame=function(){if(apputil.exitFullScreen(),""==liveUrl)window.close();else if(e.log("sendRequestEGameTokenAction"),StringUtil.getParameterByName("inum")&&IFrameCloseGame(),!StringUtil.getParameterByName("inum"))if(GameConfig.isOperator&&!GameConfig.isUsingDefaultMobileURL){try{SocketManager.getInstance().SendRequestEGameTokenAction()}catch(t){e.leaveGameHandling()}EventCentral.getInstance().addEventListener(SysNotify.TOKEN_READY,function(t){e.LiveUrlTokenLogin(t)},this),egret.setTimeout(function(){e.leaveGameHandling()},this,5e3)}else e.leaveGameHandling()},e.encryptionName=function(e,t){void 0===t&&(t=3);var n;return e.length<=t&&(t=1),e.indexOf("@")>=0&&(e=e.split("@").shift()),n=new Array(5).join("*")+e.substr(e.length-t)},e.GetGameNameByCode=function(e){for(var t="",n=0;n0?"&platform="+StringUtil.getParameterByName("platform"):"?platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("language")&&(t+=t.length>0?"&language="+StringUtil.getParameterByName("language"):"?language="+StringUtil.getParameterByName("language")),StringUtil.getParameterByName("webview")&&(t+=t.length>0?"&webview="+StringUtil.getParameterByName("webview"):"?webview="+StringUtil.getParameterByName("webview"));var n=liveUrl+t;0!=n.indexOf("http://")&&0!=n.indexOf("https://")&&(t="",StringUtil.getParameterByName("native")&&(t+="?native="+StringUtil.getParameterByName("native")),StringUtil.getParameterByName("platform")&&(t+=t.length>0?"&platform="+StringUtil.getParameterByName("platform"):"?platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("language")&&(t+=t.length>0?"&language="+StringUtil.getParameterByName("language"):"?language="+StringUtil.getParameterByName("language")),StringUtil.getParameterByName("webview")&&(t+=t.length>0?"&webview="+StringUtil.getParameterByName("webview"):"?webview="+StringUtil.getParameterByName("webview")),n="http://"+liveUrl+t),GameConfig.isOperator&&(t="",StringUtil.getParameterByName("native")&&(t+="&native="+StringUtil.getParameterByName("native")),StringUtil.getParameterByName("platform")&&(t+="&platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("language")&&(t+="&language="+StringUtil.getParameterByName("language")),StringUtil.getParameterByName("mobile")&&(t+="&mobile="+StringUtil.getParameterByName("mobile")),StringUtil.getParameterByName("webview")&&(t+="&webview="+StringUtil.getParameterByName("webview")),n=0!=n.indexOf("http://")&&0!=n.indexOf("https://")?"http://"+liveUrl+"?token="+e.data.Token+"&username="+StringUtil.getParameterByName("name")+"&source=1"+t:liveUrl+"?token="+e.data.Token+"&username="+StringUtil.getParameterByName("name")+"&source=1"+t),window.open(decodeURIComponent(n),GameConfig.quitGameMethod)},e.ShowAlert=function(e,t,n){var i=AssetManager.GetInstance().GetAsset("MessageBox");null!=i&&i.ShowAlert(e,t,n)},e.ShowMessage=function(e,t){void 0===t&&(t=!1);var n=AssetManager.GetInstance().GetAsset("MessageBox");null!=n&&n.ShowMessage(e,t)},e.log=function(e){for(var t=[],n=1;n0?console.log.apply(console,[e].concat(t)):console.log(e))},e.error=function(e){for(var t=[],n=1;n0?console.error.apply(console,[e].concat(t)):console.error(e))},e.changeCursor=function(e){var t=document.getElementsByTagName("CANVAS")[0];t.style.cursor=e},e.assign=function(t,n){if(!(n instanceof Object))return n;if(Array.isArray(n)){t=[];for(var i=0;i=17?!0:!1},e.getRedirectURL=function(e){return StringUtil.getQueryParam("returnurl")&&(e+="&returnurl="+StringUtil.getQueryParam("returnurl")),StringUtil.getParameterByName("skipintro")&&(e+="&skipintro="+StringUtil.getParameterByName("skipintro")),StringUtil.getParameterByName("operator")&&(e+="&operator="+StringUtil.getParameterByName("operator")),StringUtil.getParameterByName("lobbycode")&&(e+="&lobbycode="+StringUtil.getParameterByName("lobbycode")),StringUtil.getParameterByName("native")&&(e+="&native="+StringUtil.getParameterByName("native")),StringUtil.getParameterByName("platform")&&(e+="&platform="+StringUtil.getParameterByName("platform")),StringUtil.getParameterByName("turboMode")&&(e+="&turboMode="+StringUtil.getParameterByName("turboMode")),StringUtil.getParameterByName("eventid")&&(e+="&eventid="+StringUtil.getParameterByName("eventid")),StringUtil.getParameterByName("mobile")?e+="&mobile="+StringUtil.getParameterByName("mobile"):GameConfig.platform==Platform.mobile&&(e+="&mobile=true"),StringUtil.getParameterByName("webview")&&(e+="&webview="+StringUtil.getParameterByName("webview")),StringUtil.getParameterByName("region_code")&&(e+="®ion_code="+StringUtil.getParameterByName("region_code").toUpperCase()),StringUtil.getParameterByName("FT")&&(e+="&FT="+StringUtil.getParameterByName("FT")),StringUtil.getParameterByName("feature")&&(e+="&feature="+StringUtil.getParameterByName("feature")),StringUtil.getParameterByName("referer")&&(e+="&referer="+StringUtil.getParameterByName("referer")),e},e.isLandscapeOnlyNoticeEnable=function(){if(GameConfig.isAllLobbyLandscapeOnlyNotice)return!0;for(var e=StringUtil.getParameterByName("lobbycode")?StringUtil.getParameterByName("lobbycode"):"",t=0;t=0:!1},e.prototype.add=function(e){return e?(this.contains(e)||this.callees.push(e),this):this},e.prototype.remove=function(e){if(!e)return this;var t=this.callees.indexOf(e);return t>=0&&this.callees.splice(t,1),this},e.prototype.toDelegate=function(){var e=this;return function(t){for(var n=[],i=1;is;s++)a=RES.getRes(e+"_tex_"+s+"_json"),r=RES.getRes(e+"_tex_"+s+"_png"),o.addTextureAtlas(new dragonBones.EgretTextureAtlas(r,a))},e.prototype.CreateArmature=function(e){var t=dragonBones.EgretFactory.factory,n=t.buildArmature(e);return null!=n?(n.animation.gotoAndStop(n.animation.animationNames[0]),dragonBones.WorldClock.clock.add(n),n):void 0},e._instance=new e,e}();__reflect(DragonBonesManager.prototype,"DragonBonesManager");var EffectUtils;!function(e){function t(e,t){function n(){e.alpha=1,e.touchEnabled=!0,e.touchChildren=!0}void 0===t&&(t=1e3),e.alpha=0,e.touchEnabled=!1,e.touchChildren=!1,egret.Tween.get(e).to({alpha:1},t).call(n,e)}function n(e,t){function n(){e.alpha=0,e.touchEnabled=!0,e.touchChildren=!0}void 0===t&&(t=1e3),e.alpha=1,e.touchEnabled=!1,e.touchChildren=!1,egret.Tween.get(e).to({alpha:0},t).call(n,e)}function i(e,t){void 0===t&&(t=1e3),e.alpha=0,e.scaleX=.5,e.scaleY=.5,e.x=e.x+e.width/4,e.y=e.y+e.height/4,egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1,x:e.x-e.width/4,y:e.y-e.height/4},t,egret.Ease.backOut)}function o(e,t){void 0===t&&(t=1e3),e.alpha=1,e.scaleX=1,e.scaleY=1,e.x=e.x+e.width/4,e.y=e.y+e.height/4,egret.Tween.get(e).to({alpha:0,scaleX:1.1,scaleY:1.1,x:e.x-e.width/4,y:e.y-e.height/4},t,egret.Ease.backOut)}function a(e,t){void 0===t&&(t=1e3),e.scaleX=.5,e.scaleY=.5,e.x=e.x+e.width/4,e.y=e.y+e.height/4,egret.Tween.get(e).to({alpha:1,scaleX:1,scaleY:1,x:e.x-e.width/4,y:e.y-e.height/4},t,egret.Ease.elasticOut)}function r(e,t){if(e.filter){var n=[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0],i=new egret.ColorMatrixFilter(n);e.filters=[i]}}e.fadeIn=t,e.fadeOut=n,e.backOut=i,e.backIn=o,e.elasticOut=a,e.brightnessFilter=r}(EffectUtils||(EffectUtils={}));var EventCentral=function(e){function t(t){var n=e.call(this)||this;if(null==t)throw new Error("Error: instantiation failed; Use EventCentral.getInstance()");return n}return __extends(t,e),t.getInstance=function(){return null==this.instance&&(this.instance=new t(new SingletonBlocker)),this.instance},t}(egret.EventDispatcher);__reflect(EventCentral.prototype,"EventCentral");var SingletonBlocker=function(){function e(){}return e}();__reflect(SingletonBlocker.prototype,"SingletonBlocker");var FireworkParticleManager=function(e){function t(){var t=e.call(this)||this;t.pss=[],t.intervalID=-1;for(var n,i=RES.getRes("firework_json"),o=0;4>o;o++)n=RES.getRes("firework"+o+"_png"),t.pss[o]=new particle.GravityParticleSystem(n,i),t.pss[o].x=0,t.pss[o].y=0,t.pss[o].emissionRate=2,t.pss[o].stop(),t.addChild(t.pss[o]);return t.maxScreenWidth=GameConfig.ContentWidth,t.maxScreenHeight=GameConfig.ContentHeight,t}return __extends(t,e),t.prototype.Start=function(){var e=this.pss[Math.floor(4*Math.random())];e.emitterX=Math.random()*this.maxScreenWidth,e.emitterY=Math.random()*this.maxScreenHeight,AudioManager.Instance.playSound(Sound.Fireworks),e.start(),egret.setTimeout(e.stop,e,200),this.intervalID=egret.setInterval(this.Update,this,500)},t.prototype.Update=function(){var e=this.pss[Math.floor(4*Math.random())];e.emitterX=Math.random()*this.maxScreenWidth,e.emitterY=Math.random()*this.maxScreenHeight,AudioManager.Instance.playSound(Sound.Fireworks),e.start(),egret.setTimeout(e.stop,e,200)},t.prototype.Stop=function(){-1!=this.intervalID&&(egret.clearInterval(this.intervalID),this.intervalID=-1);for(var e=0;4>e;e++)this.pss[e].stop()},t}(egret.Sprite);__reflect(FireworkParticleManager.prototype,"FireworkParticleManager");var H5Logger=function(){function e(e){void 0===e&&(e="h5default"),this.m_url="http://192.168.18.201/~alex/logger.php",this.m_store=1,this.m_tag=e}return e.getInstance=function(){return null==this.instance&&(this.instance=new e),this.instance},Object.defineProperty(e.prototype,"tag",{set:function(e){this.m_tag=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"url",{set:function(e){this.m_url=e},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"storage",{set:function(e){this.m_store=e},enumerable:!0,configurable:!0}),e.prototype.onHttp=function(e){CommonFunc.log(e)},e.prototype.log=function(e,t){void 0===t&&(t=""),0==this.m_store?this.log_http(e,t):1==this.m_store?this.log_local(e,t):this.log_console(e,t)},e.prototype.log_http=function(t,n){if(void 0===n&&(n=""),""==this.m_url)return void CommonFunc.log("server url is not set");var i=this.m_url+"?msg="+t+"&tag="+this.m_tag,o=new XMLHttpRequest;o.onreadystatechange=function(){4==o.readyState&&200==o.status&&e.getInstance().onHttp(o.responseText)},o.open("GET",i,!0),o.send(null)},e.prototype.log_local=function(e,t){void 0===t&&(t="");var n=t;""==n&&(n=this.m_tag);var i=localStorage.getItem(n);(null==i||""==i)&&(i="{}");var o=JSON.parse(i),a=0;void 0!==o.datetime&&(a=o.datetime.length),a>0?(o.datetime[a]=(new Date).toLocaleString(),o.content[a]=e):(o.datetime=[(new Date).toLocaleString()],o.content=[e]);var r=JSON.stringify(o);localStorage.setItem(this.m_tag,r)},e.prototype.log_console=function(e,t){void 0===t&&(t="");var n=this.m_tag;n+=" "+(new Date).toLocaleString(),n+=" "+e,CommonFunc.log(n)},e.prototype.clear=function(){localStorage.setItem(this.m_tag,"")},e.prototype.htmlTable=function(){var e=localStorage.getItem(this.m_tag);if(null==e)return"";var t=JSON.parse(e),n="";n+="";var i=0;void 0!==t.datetime&&(i=t.datetime.length);for(var o=0;i>o;++o)n+="",n+="",n+="",n+="";return n+="
"+t.datetime[o]+""+t.content[o]+"
"},e.prototype.json=function(){return JSON.stringify(localStorage.getItem(this.m_tag))},e}();__reflect(H5Logger.prototype,"H5Logger");var HTML5Video=function(e){function t(){var t=e.call(this)||this;return t.videoCtx=null,t.canvas=null,t.ctx=null,t.skipBtn=null,t.icon=null,t.bitmapData=null,t.isAutoPlay=!1,t.url="",t._loadingIndex=-1,t._loadingProgress=0,t.forceUseCanvas=!1,t.forceUseCanvas=0!=detectIE(),t.forceUseCanvas&&(t.elementParent||(t.elementParent=document.getElementById("game"))),t}return __extends(t,e),Object.defineProperty(t.prototype,"loadingIndex",{get:function(){return this._loadingIndex},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loadingProgress",{get:function(){return this._loadingProgress},enumerable:!0,configurable:!0}),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),null!=this.url&&""!=this.url&&this.load(0,this.url)},t.prototype.load=function(e,t){this.url=t,this._loadingIndex=e,this._loadingProgress=0,this.touchEnabled=!1,this.videoCtx=document.createElement("video"),0!=this.url.search("data")&&this.videoCtx.setAttribute("crossorigin","anonymous"),this.videoCtx.setAttribute("autoplay","autoplay"),this.videoCtx.setAttribute("webkit-playsinline","true"),this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%");var n=this;this.videoCtx.addEventListener("canplay",function(){n.dispatchEventWith("canplay")},!1),this.videoCtx.addEventListener("progress",function(e){this.buffered.length>0&&(n._loadingProgress=100*this.buffered.end(0)/this.duration),n.dispatchEventWith("progress")},!1),this.forceUseCanvas?this.videoCtx.onended=function(){n.onSourceEnded()}:this.videoCtx.onended=null,this.addEventListener("canplay",this.canplay,this),this.videoCtx.src=this.url,this.videoCtx.load(),this.icon=new egret.Bitmap,this.icon.width=1068,this.icon.height=600,this.forceUseCanvas||this.addChild(this.icon),this.icon.visible=!1,this.videoCtx.volume=0},t.prototype.canplay=function(e){if(this.videoCtx.width=this.videoCtx.videoWidth,this.videoCtx.height=this.videoCtx.videoHeight,this.forceUseCanvas&&(this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%")),this.bitmapData=new egret.BitmapData(this.videoCtx),this.bitmapData.$deleteSource=!1,this.icon.bitmapData=this.bitmapData,this.removeEventListener("canplay",this.canplay,this),this.isAutoPlay){this.play(!1);var t=this;this.forceUseCanvas||(this.videoCtx.onended=function(){t.onSourceEnded()})}CommonFunc.log(this.videoCtx.buffered.end(0)+"/ "+this.videoCtx.duration),this.LoadCompleted()},t.prototype.progressHaltChecking=function(e){var t=egret.getTimer(),n=t-this.previousTime;this.previousTime=t;var i=100*this.videoCtx.buffered.end(0)/this.videoCtx.duration;return this.previousProgress==i?(this.downloadHoldingTime+=n,this.downloadHoldingTime>1e3*GameConfig.videoLoadTimeout&&(this.removeEventListener("progress",this.progress,this),egret.stopTick(this.progressHaltChecking,this),this.LoadCompleted())):this.downloadHoldingTime=0,this.previousProgress=i,!0},t.prototype.progress=function(e){this.videoCtx.buffered.end(0)>=this.videoCtx.duration&&(this.removeEventListener("progress",this.progress,this),egret.stopTick(this.progressHaltChecking,this),this.LoadCompleted())},t.prototype.LoadCompleted=function(){CommonFunc.log("Video complete"),this._loadingProgress=100,null==this.videoCtx.parentElement&&this.forceUseCanvas&&this.videoCtx.pause(),this.dispatchEventWith(egret.Event.COMPLETE)},t.prototype.seekToTime=function(e){this.videoCtx.pause(),this.videoCtx.onended=null,this.videoCtx.currentTime=e;var t=this,n=this.videoCtx,i=setInterval(function(){CommonFunc.log("ReadyState: "+n.readyState),(n.paused&&4==n.readyState||!n.paused)&&(t.icon.visible=!0,this.forceUseCanvas||(n.onended=function(){t.onSourceEnded()}),CommonFunc.log("play"),n.play(),clearInterval(i))},50)},t.prototype.PlayFromBeginning=function(){this.removeEventListener("canplay",this.PlayFromBeginning,this),this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%"),this.seekToTime(0)},t.prototype.play=function(e){void 0===e&&(e=!0),this.videoCtx.volume=AudioManager.Instance.volume,e&&this.videoCtx.load(),this.forceUseCanvas?(this.elementParent.appendChild(this.videoCtx),this.videoCtx.setAttribute("width","100%"),this.videoCtx.setAttribute("height","100%"),this.icon.visible=!1,this.addEventListener("canplay",this.PlayFromBeginning,this),this.videoCtx.play()):(this.seekToTime(0),egret.startTick(this.UpdateBitmapData,this))},t.prototype.pause=function(e){void 0===e&&(e=!1),this.videoCtx.pause(),this.forceUseCanvas||(this.videoCtx.onended=null),this.videoCtx.volume=0,this.forceUseCanvas||egret.stopTick(this.UpdateBitmapData,this),e&&this.clear()},t.prototype.clear=function(){this.forceUseCanvas?this.elementParent==this.videoCtx.parentElement&&this.elementParent.removeChild(this.videoCtx):this.icon.visible=!1,this.parent&&this.parent.removeChild(this)},t.prototype.UpdateVideoElement=function(e){e.currentTarget.setAttribute("width","100%"),e.currentTarget.setAttribute("height","100%")},t.prototype.UpdateBitmapData=function(){return this.icon.bitmapData=null,this.icon.bitmapData=this.bitmapData,null!=this.bitmapData&&(this.videoCtx.volume=AudioManager.Instance.volume,egret.WebGLUtils.deleteWebGLTexture(this.bitmapData.webGLTexture),this.bitmapData.webGLTexture=null),!0},t.prototype.onSourceEnded=function(){this.pause(),this.dispatchEventWith(egret.Event.ENDED)},t.prototype.skip=function(){this.onSourceEnded()},t}(eui.Component);__reflect(HTML5Video.prototype,"HTML5Video");var JsonpReq=function(){function e(){}return e.process=function(t){e.completeCall["call_"+e._regID]=function(n){var i=e._regID;t.data=n,t.dispatchEvent(new egret.Event(egret.Event.COMPLETE)),delete e.completeCall["call_"+i]},e.startLoader(t,e._regID++)},e.startLoader=function(e,t){var n=document.createElement("script");n.src=e._request.url+"JsonpReq.completeCall.call_"+t,document.body.appendChild(n),document.body.removeChild(n)},e._regID=0,e.completeCall={},e}();__reflect(JsonpReq.prototype,"JsonpReq");var MathExt=function(){function e(){}return e.Lerp=function(e,t,n){var i=(t-e)*n;e%1===0&&(i=Math.floor(i));var o=e+i;return o},e}();__reflect(MathExt.prototype,"MathExt");var ResUtils=function(){function e(){this._configs=new Array}return e.getInstance=function(){return null==this.instance&&(this.instance=new e),this.instance},e.prototype.addConfig=function(e,t){this._configs.push([e,t])},e.prototype.loadConfig=function(e,t){this._onConfigComplete=e,this._onConfigCompleteTarget=t,this.loadNextConfig()},e.prototype.loadNextConfig=function(){if(0==this._configs.length)return this._onConfigComplete.call(this._onConfigCompleteTarget),this._onConfigComplete=null,void(this._onConfigCompleteTarget=null);var e=this._configs.shift();RES.addEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),RES.loadConfig(e[0],e[1])},e.prototype.onConfigCompleteHandle=function(e){RES.removeEventListener(RES.ResourceEvent.CONFIG_COMPLETE,this.onConfigCompleteHandle,this),this.loadNextConfig()},e}();__reflect(ResUtils.prototype,"ResUtils");var StringUtil=function(){function e(){}return e.numberFormat=function(e,t,n,i){void 0===t&&(t=2);var o=e,t=isNaN(t=Math.abs(t))?2:t,n=void 0==n?".":n,i=void 0==i?",":i,a=0>o?"-":"",r=parseInt(o=Math.abs(+o||0).toFixed(t))+"",s=(s=r.length)>3?s%3:0;return a+(s?r.substr(0,s)+i:"")+r.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+i)+(t?n+Math.abs(o-r).toFixed(t).slice(2):"")},e.getDeviceInfo=function(){for(var e=navigator.userAgent,t="Android;iPhone;SymbianOS;Windows Phone;iPad;iPod".split(";"),n=0;n0&&decodeURIComponent(a[0].toLowerCase())==e.toLowerCase()){var r=i[o].indexOf("=")+1;return decodeURIComponent(i[o].substr(r,i[o].length-r))}}},e.isMsgServerDisconnected=function(e){switch(e){case SocketManager.ERR_SERVER_NOT_CONNECTED:case SocketManager.ERR_SERVER_KICK:case GameError.SERVER_KICK:case SocketManager.ERR_SC_SOCKET_ERROR:case SocketManager.ERR_SP_SOCKET_ERROR:case GameError.NO_SLOT:case 50026:return!0}return!1},e.SearchErrorCodeInJson=function(e){for(var t=0;t=0;)t=t.replace(" ",Localization.Instance.getString("common.font.space_ch"));return t},e.isBase64=function(e){if(""===e||""===e.trim())return!1;try{return btoa(atob(e))==e}catch(t){return!1}},e.tryDecode64=function(e){if(0==e.indexOf("77u/")&&(e=e.replace("77u/","")),this.isBase64(e)){var t=atob(e);return decodeURIComponent(t)}return e},e.replaceS3Path=function(e,t){var n=e.indexOf(".com/");if(n>=0){var i=t+e.substr(n+5);return i}return e},e}();__reflect(StringUtil.prototype,"StringUtil");var SymbolResultConverter=function(){function e(){}return e.IntArrayToCharString=function(t){for(var n="",i=0;i=this.timeoutInterval&&(this.Stop(),this.callback()),this.previousTime=e}},e.prototype.Start=function(){this.Stop(),this.intervalID=egret.setInterval(this.Update,this,33),this.previousTime=egret.getTimer(),this.isRunning=!0},e.prototype.Stop=function(){this.intervalID>=0&&(egret.clearInterval(this.intervalID),this.intervalID=-1)},e.prototype.Reset=function(){this.currentInterval=0},e.prototype.Pause=function(){this.isRunning=!1},e.prototype.Resume=function(){this.isRunning=!0},e}();__reflect(TimeoutHelper.prototype,"TimeoutHelper");var BSFeatureSelection=function(e){function t(t){var n=e.call(this)||this;return n.isSelected=!1,5>t?n.skinName="FeatureSelectionSkin":n.skinName="FeatureSelectionMysterySkin",n.selectionId=t,n}return __extends(t,e),Object.defineProperty(t.prototype,"SelectionId",{get:function(){return this.selectionId},enumerable:!0,configurable:!0}),t.prototype.childrenCreated=function(){if(e.prototype.childrenCreated.call(this),this.imageLabel.source="feature_selection_json."+this.selectionId,this.selectionId<5)switch(this.topLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.free"),this.multiplierLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.multiplier"),this.selectionId){case 0:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option1");break;case 1:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option2");break;case 2:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option3");break;case 3:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option4");break;case 4:this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option5")}else 5==this.selectionId&&(this.topLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.mystery"),this.multiplierLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.random_free"),this.optionLabel.text=Localization.Instance.getString(GameConfig.GameCode+".feature.option6"));EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_DISABLE_ALLBUTTON,this.Disable,this)},t.prototype.SetFilter=function(e){var t=0;switch(e){case"up":t=0;break;case"down":t=-40;break;case"over":t=40;break;case"disabled":t=-80;break;case"selected":t=10}var n=[1,0,0,0,t,0,1,0,0,t,0,0,1,0,t,0,0,0,1,0];"disabled"==e&&(n=[.3,.6,0,0,0,.3,.6,0,0,0,.3,.6,0,0,0,0,0,0,1,0]);var i=new egret.ColorMatrixFilter(n);this.topLabel.filters=[i],this.multiplierLabel.filters=[i],this.optionLabel.filters=[i],this.imageLabel&&(this.imageLabel.filters=[i])},t.prototype.getCurrentState=function(){var t=e.prototype.getCurrentState.call(this);return this.SetFilter(t),t},t.prototype.Disable=function(){this.IsSelected||(this.enabled=!1)},Object.defineProperty(t.prototype,"IsSelected",{get:function(){return this.isSelected},set:function(e){this.isSelected=e},enumerable:!0,configurable:!0}),t}(BaseButton);__reflect(BSFeatureSelection.prototype,"BSFeatureSelection");var ConstantBookingSpeedCalculator=function(){function e(){this.amountPreSecond=100,this.duration=5}return e.prototype.ComputeSpeedByDuration=function(e,t){this.amountPreSecond=e/(t+.01),this.duration=t},e.prototype.ComputeSpeed=function(e){for(var t=[],n=1;nt;t++)this.ConstructFirework()},t.prototype.ConstructFirework=function(){var e=new Firework(this.fireworkPool);this.addChild(e),this.fireworkPool.push(e)},t.prototype.Start=function(){var e=1e3/this.rate;this.fireTimerID=egret.setInterval(this.ShowFirework,this,e)},t.prototype.Stop=function(){egret.clearInterval(this.fireTimerID)},t.prototype.ShowFirework=function(){0==this.fireworkPool.length&&this.ConstructFirework();var e=this.fireworkPool.pop(),t=GameConfig.DefaultContentWidth*(1/6+4*Math.random()/6),n=GameConfig.DefaultContentHeight*(1/6+4*Math.random()/6);e.ShowAtPosition(t,n),egret.clearInterval(this.fireTimerID);var i=1e3/this.rate+(-this.timeVar+2*Math.random()*this.timeVar);i=Math.max(1,i),this.fireTimerID=egret.setInterval(this.ShowFirework,this,i)},t}(egret.Sprite);__reflect(FireworkManager.prototype,"FireworkManager");var LineDetail=function(e){function t(){var t=e.call(this)||this;return t.AddListeners(),t}return __extends(t,e),t.prototype.AddListeners=function(){EventCentral.getInstance().addEventListener(SceneNotify.START_SPIN,this.OnHideLines,this),EventCentral.getInstance().addEventListener(SysNotify.LINE_INFO_UPDATE,this.OnShowLines,this)},t.prototype.OnShowLines=function(e){var t=SocketManager.getInstance().GetData().nBetLine;this.ShowLines(t)},t.prototype.OnHideLines=function(e){this.HideLinesWithDuration(0)},t.prototype.SetupPoints=function(e){for(var t=[],n=0;n=t;t++)this.ShowLine(t);this.graphics.lineStyle(SlotConfig.LineSize,SlotConfig.LineHighlightColor),this.ShowLine(e),this.graphics.endFill(),this.HideLinesWithDuration(2)},t.prototype.HideLinesWithDuration=function(e){0==e?this.alpha=0:(this.alpha=1,this.fadingAmount=0,this.fadingAmountIncSpeed=2/(e*(1+24*e)),this.previousTime=egret.getTimer(),this.addEventListener(egret.Event.ENTER_FRAME,this.FadingUpdate,this))},t.prototype.FadingUpdate=function(e){var t=egret.getTimer(),n=.001*(t-this.previousTime);this.previousTime=t,this.fadingAmount+=this.fadingAmountIncSpeed*n;var i=this.alpha-this.fadingAmount;0>i&&(i=0),this.alpha=i,0==this.alpha&&this.removeEventListener(egret.Event.ENTER_FRAME,this.FadingUpdate,this)},t}(egret.Sprite);__reflect(LineDetail.prototype,"LineDetail");var ParticleWinLineManager=function(e){function t(){var t=e.call(this)||this;t.displayFactor=0,t.previousTime=0,t.InitParticle(),t.points=[];for(var n=0;ni)n=new egret.Point(MathExt.Lerp(this.points[0].x,this.points[1].x,2*(i+.5)),this.points[0].y);else{if(i>=SlotConfig.SLOT_COL-.5)return void this.HideWinLine();if(i>=SlotConfig.SLOT_COL-1)n=new egret.Point(MathExt.Lerp(this.points[SlotConfig.SLOT_COL].x,this.points[SlotConfig.SLOT_COL+1].x,2*(i-(SlotConfig.SLOT_COL-1))),this.points[SlotConfig.SLOT_COL+1].y);else{var o=Math.floor(i),a=this.points[o+1],r=this.points[o+2];i-=Math.floor(i),n=new egret.Point(MathExt.Lerp(a.x,r.x,i),MathExt.Lerp(a.y,r.y,i))}}this.ps.emitterX=n.x,this.ps.emitterY=n.y},t.prototype.ShowWinLine=function(e,t){this.SetupPoints(e),this.timer.start(),this.ps.start(),this.addChild(this.ps),this.speed=1/t,this.displayFactor=0,this.previousTime=egret.getTimer()},t.prototype.HideWinLine=function(e){void 0===e&&(e=0),this.timer.stop(),this.ps.stop()},t}(WinLineManager);__reflect(ParticleWinLineManager.prototype,"ParticleWinLineManager");var ShapeWinLineManager=function(e){function t(){var t=e.call(this)||this;t.line=new egret.Shape,t.points=[];for(var n=0;n=0&&egret.clearTimeout(this.timeoutID),this.timeoutID=-1},e.prototype.DisableMessage=function(e){var t=e.data.type;switch(t){case MessageType.PressToFeature:case MessageType.FreeGameCompleted:this.isShowMessage=!1}},e.prototype.GetNextDisplayIdx=function(){for(this.IncrementDisplayIndex();!SocketManager.getInstance().GetData().IsWinInfoHasPayout(this.currentDisplayIdx);)this.IncrementDisplayIndex()},e.prototype.IncrementDisplayIndex=function(){this.currentDisplayIdx++,this.currentDisplayIdx>=this.currentWinInfos.length&&(this.isFirstLoop&&(this.isFirstLoop=!1,EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.LOOP_COMPLETE))),this.currentDisplayIdx=0)},e}();__reflect(WinningAnimationController.prototype,"WinningAnimationController");var BSTypeFeatureGameSceneHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.CreateFeatureGameUI=function(){if(!AssetManager.GetInstance().ContainKey("FeatureGameUI")){var e=void 0;e=new BSFeatureView,AssetManager.GetInstance().AddAsset("FeatureGameUI",e),GameLayer.GetInstance().AddObjectToLayer(e,Layer.Feature),e.visible=!1}},t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:AssetManager.GetInstance().GetAsset("FeatureGameUI").visible=!0;var e=this;SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.Free:GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).StartTransition(SceneType.Feature1,this.OnTransitionEnd,this);break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.sceneType]+"] to Mode:["+SceneType[this.fromType]+"]")}},t.prototype.OnTransitionEnd=function(){this.HideSlotGameUI(),AssetManager.GetInstance().GetAsset("FeatureGameUI").visible=!0,this.stateController.Start()},t}(FLTypeFeatureGameSceneHandler);__reflect(BSTypeFeatureGameSceneHandler.prototype,"BSTypeFeatureGameSceneHandler");var BSTypeFreeGameSceneHandler=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.StartTransitToScene=function(){switch(this.fromType){case SceneType.Unknown:var e=this;GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),SocketManager.getInstance().GetData().waitClient>0?EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.RESUME_GAME_POPUP,{callback:function(){e.StartStateController()}})):(this.processIndicator.Hide(),this.stateController.Start(!0));break;case SceneType.Base:case SceneType.FSO:this.stateController.Start();break;case SceneType.Feature1:AssetManager.GetInstance().RemoveAsset("FeatureGameUI"),GameLayer.GetInstance().ClearLayer(Layer.Feature),GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).SwitchToFreeGame(),this.stateController.Start();break;default:throw new Error("Cannot transit from Mode:["+SceneType[this.fromType]+"] to Mode:["+SceneType[this.sceneType]+"]")}},t}(FreeGameSceneHandler);__reflect(BSTypeFreeGameSceneHandler.prototype,"BSTypeFreeGameSceneHandler");var BSTypeFreeGameStateController=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isSpecialEventPlayed=!1,t}return __extends(t,e),t.prototype.StateSpecialEvent=function(){EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.DISABLE_ALL_BUTTON)),this.isSpecialEventPlayed=!0;for(var e=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multiplierMeter"),t=this.GetSelectedMysteryType()-1,n=[],i=0;i1&&a[t].push(e[i]);break;case 3:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&r[i]>1&&a[t].push(e[i]);break;case 4:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&1==this.chargedReelArray[3]&&r[i]>1&&a[t].push(e[i])}for(n=0;n0)for(var i=0;i1&&a[t].push(e[i]);break;case 3:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&r[i]>1&&a[t].push(e[i]);break;case 4:1==this.chargedReelArray[0]&&1==this.chargedReelArray[1]&&1==this.chargedReelArray[2]&&1==this.chargedReelArray[3]&&r[i]>1&&a[t].push(e[i])}for(n=0;n0},t.prototype.GetFeatureResultID=function(){return this.featureResultID},t}(SlotData);__reflect(FLTypeSlotData.prototype,"FLTypeSlotData");var FLLoadingScene=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.Show=function(){e.prototype.Show.call(this),this.loadingBar.value=0,this.currentPercent=0},t.prototype.SetProcess=function(e){this.progressLabel.text=Math.floor(e)+"%",this.loadingBar.value=Math.floor(e),Math.floor(e)>this.currentPercent&&(this.currentPercent=Math.floor(e))},t}(LoadingScene);__reflect(FLLoadingScene.prototype,"FLLoadingScene");var FLTypeSlotView=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.GetSignificantSymbol=function(e){for(var t,n=0;ni;i++)if(i==e)return t=i-4*n+1,this.GetReel(n).GetQueuedSymbol(t)},t.prototype.GetSymbolCenterPosition=function(e){var t=this.GetSignificantSymbol(e),n=new egret.Point(t.x,t.y);return n},t.prototype.GetReelCenterPosition=function(e){var t=new egret.Point(this.GetReel(e).GetQueuedSymbol(2).x,this.GetReel(e).GetQueuedSymbol(2).y);return t},t.prototype.SetReelResults=function(){this.topBot=SocketManager.getInstance().GetData().slotSymExts,this.slotResults=SocketManager.getInstance().GetData().slotSymbols,e.prototype.SetReelResults.call(this)},t.prototype.InitReelResults=function(){e.prototype.InitReelResults.call(this),this.topBot=SocketManager.getInstance().GetData().slotSymExts,this.slotResults=SocketManager.getInstance().GetData().slotSymbols,this.SetReelResults();for(var t=new Array,n=0;no;o++)t.push(this.slotResults[e*i+o]);t.push(this.topBot[0][e]),n.SetResult(t)},t.prototype.CreateSlotReelsAndSymbols=function(e,t,n){this.numOfSymbols=[6,6,6,6,6],this.numOfSignificantSymbols=[4,4,4,4,4],this.totalNumOfSymbols=0;for(var i,o=SlotConfig.SLOT_POSITION_X,a=-SlotConfig.SLOT_HEIGHT,r=0;r=0;n--){var i=this.slotReel.GetQueuedSymbol(n);egret.Tween.removeTweens(i),t=egret.Tween.get(i),t.to({y:i.y+.9*SlotConfig.SLOT_HEIGHT},50)}t.call(this.StartPositionUpdate.bind(this))},t.prototype.StartPositionUpdate=function(){for(var e=this.slotReel.GetQueueOrder(),t=e.length-1;t>=0;t--){var n=this.slotReel.GetQueuedSymbol(t),i=this.GetReelStripIndexWithOffset(t),o=this.reelStrip.At(i);n.SetResult(o)}this.slotReel.addEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this)},t.prototype.PositionUpdate=function(){if(this.isStopped)return!0;var e=egret.getTimer(),t=e-this.previousTime;this.previousTime=e,t=1e3/30;for(var n,i=Math.floor(this.speed*t),o=(Math.floor(i/(this.bottomY-this.topY)),this.slotReel.GetQueueOrder()),a=o.length-1;a>=0;a--)n=this.slotReel.GetQueuedSymbol(a),n.y+=i;return this.slotReel.UpdateQueueOrder(),this.UpdateAllSymbolResults(this.ValidateAllSymbolPositions()),!0},t.prototype.PrepareToStop=function(){this.slotReel.StopSpin(!0)},t.prototype.StopSpin=function(e){void 0===e&&(e=!1);for(var t,n=this.slotReel.GetQueueOrder(),i=n.length-1;i>=0;i--)t=this.slotReel.GetQueuedSymbol(i),egret.Tween.removeTweens(t);this.isPrepareToStop=!1,this.isStopped=!0,this.slotReel.removeEventListener(egret.Event.ENTER_FRAME,this.PositionUpdate,this);for(var i=0;i=this.bottomY)if(i.yt&&(t=e);i.y=this.bottomY)for(e=Math.floor((this.bottomY-i.y)/SlotConfig.SLOT_HEIGHT),t>e&&(t=e);i.y>=this.bottomY;)i.y-=this.bottomY-this.topY}return this.slotReel.UpdateQueueOrder(),t},t.prototype.UpdateAllSymbolResults=function(e,t){if(void 0===t&&(t=0),0!=e){var n;if(this.OffsetReelStrip(e),e>0){var i=Math.max(0,this.slotReel.nSymbol-e);n=e;for(var o=i;o=0;r--){var a=this.slotReel.GetQueuedSymbol(r);this.UpdateSymbolResult(a,r,n,t)}}}},t.prototype.UpdateSymbolResult=function(e,t,n,i){void 0===i&&(i=0);var o=i>0;if(o)e.SetResult(i);else{var a=(this.currentReelStripIdx+t)%this.reelStrip.Length(),r=this.reelStrip.At(a);e.SetResult(r)}},t.prototype.GetReelStripIndexWithOffset=function(e){return e%=this.reelStrip.Length(),(this.currentReelStripIdx+e+this.reelStrip.Length())%this.reelStrip.Length()},t.prototype.OffsetReelStrip=function(e){this.currentReelStripIdx=this.GetReelStripIndexWithOffset(e)},t}(ReelSpinAnimationHandler);__reflect(FLTypeSpinningReelAnimationHandler.prototype,"FLTypeSpinningReelAnimationHandler",["SpinningReelValidator"]);var FreeMultiplierWinAnimationEffect=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Execute=function(e,t){var n=this,i=t.MulitplierArray;console.log("Execute!!!");var o=GameLayer.GetInstance().GetLayer(Layer.Slot).getChildAt(0).GetFreeGameMeterManager(),a=o.GetMultiplierMeter(),r=a.GetRetriggerLabel(),s=0;PTPotTween.Rolling(r,.5,function(){},function(){EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.SET_FREE_MULTIPLIER,i[s])),AudioManager.Instance.playSound("Multiplier_mp3")},{scaleX:1.8,scaleY:1.8,alpha:0},{scaleX:2.4,scaleY:2.4,alpha:1},{scaleX:2,scaleY:2,alpha:1},function(){s++,s==i.length&&(PTPotTween.CancelTween(r),n.OnFinished(null))},null,egret.Ease.quadIn,egret.Ease.elasticOut).wait(1e3)},t.prototype.OnFinished=function(e){this.Clear(-1),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.SPECIAL_EVENT_FINISHED))},t}(Effect);__reflect(FreeMultiplierWinAnimationEffect.prototype,"FreeMultiplierWinAnimationEffect");var SlotStatus=function(){function e(){}return e.SlotStatusFeature1=2,e.SlotStatusFeature2=3,e.SlotStatusFree=1,e.SlotStatusGamble=4,e.SlotStatusNormal=0,e.SlotStatusWildFeature=3,e.SlotStatusWildFreeGame=2,e}();__reflect(SlotStatus.prototype,"SlotStatus");var FLFeatureView=function(e){function t(){var t=e.call(this)||this;return t.isFreeSpinStopped=!1,t.RegisterEventToButtons=function(e){e.onTabCallback=function(e){t.OnButtonTab(e)}},t.OnPotOpenEnd=function(e){console.log("!!!!!!!!!!!!!!!!! OnPotOpenEnd"),EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.FEATURE_ENABLE_ALLBUTTON)),EventCentral.getInstance().dispatchEvent(new SceneNotify(FLSceneNotify.FEATURE_SCENE_REVEAL_FINISHED))},GameConfig.platform==Platform.mobile?t.skinName=FeatureUISkin_Mobile:t.skinName=FeatureUISkin,t.openedPot=0,t.openingPot=0,t.changelanguageHandler=new UIChangeLanguage(t.OnLanguageChanged,t),console.log("FLFeatureView constructor"),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.RegisterSceneEvent(),this.ApplyToAllButtonsPrototype(this.RegisterEventToButtons),this.OnLanguageChanged(),this.Reset(),this.ApplyToAllButtonsPrototype(function(e){var t=Localization.Instance.getString(GameConfig.GameCode+".featuregame.selectionBackground");e.SetBackground(t[e.potID])})},t.prototype.RegisterSceneEvent=function(){EventCentral.getInstance().addEventListener(FLSceneNotify.FEATURE_SCENE_INIT,this.InitScene,this),EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_ENABLE_ALLBUTTON,this.EnableAllButtons,this),EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_DISABLE_ALLBUTTON,this.DisableAllButtons,this),EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_BONUS_RESULT,this.DisplayResult,this),EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_RESET,this.Reset,this),EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_EXIT,this.End,this),EventCentral.getInstance().addEventListener(FLSceneNotify.FEATURE_MYSTERY_ROULETTE_START,this.MysteryRandomRoulette,this),EventCentral.getInstance().addEventListener(FLSceneNotify.FEATURE_MYSTERY_REVEAL,this.RevealMystery,this)},t.prototype.UnregisterSceneEvent=function(){EventCentral.getInstance().removeEventListener(FLSceneNotify.FEATURE_SCENE_INIT,this.InitScene,this),EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_ENABLE_ALLBUTTON,this.EnableAllButtons,this),EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_DISABLE_ALLBUTTON,this.DisableAllButtons,this),EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_BONUS_RESULT,this.DisplayResult,this),EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_RESET,this.Reset,this),EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_EXIT,this.End,this),EventCentral.getInstance().removeEventListener(FLSceneNotify.FEATURE_MYSTERY_ROULETTE_START,this.MysteryRandomRoulette,this),EventCentral.getInstance().removeEventListener(FLSceneNotify.FEATURE_MYSTERY_REVEAL,this.RevealMystery,this)},t.prototype.InitScene=function(e){var t=e.data;for(var n in t)if(t.hasOwnProperty(n)){var i=t[n],o=this.GetButtonByID(i.positionId),a=Localization.Instance.getString(GameConfig.GameCode+".feature."+FLTypeFeatureReward.GetString(i.resultId));o.isOpened||(this.openedPot++,o.DirectOpen(a,""))}},t.prototype.ApplyToAllButtons=function(e){for(var t=0;ts;s++){for(;;){var l=Math.round(Math.random()*(o.length-1));if(l!=r&&o[l]!=this.prizeDetail.mysterySpinCount){r=l;break}}a.push(o[r])}a.push(this.prizeDetail.mysterySpinCount),console.log(a),n.StopingFreeSpinLabel(a,function(){t.isFreeSpinStopped=!0})}},t.prototype.multiplierStoppedCallback=function(e){if(void 0!=this.prizeDetail&&this.isFreeSpinStopped){var t,n=e;void 0!=this.openingPotObj&&this.openingPotObj.potID==this.prizeDetail.mysteryPotID&&(t=this.openingPotObj);var i=Localization.Instance.getString(GameConfig.GameCode+".featuregame.selectionMultiplier");i=i.slice(0,i.length-1);for(var o=[],a=n,r=0;4>r;r++){for(;;){var s=Math.round(Math.random()*(i.length-1));if(s!=a&&s!=this.prizeDetail.mysteryMultiplierID-1){a=s;break}}o.push(i[a])}o.push(i[this.prizeDetail.mysteryMultiplierID-1]),console.log(o),t.StopingMultiplierLabel(o,function(){t.Open(function(){EventCentral.getInstance().dispatchEvent(FLSceneNotify.Notify(FLSceneNotify.FEATURE_MYSTERY_REVEAL_FINISHED))})})}},t.prototype.CheckIsAllPrizeRevealed=function(){this.openedPot>=this.grpButtons.numChildren&&EventCentral.getInstance().dispatchEvent(FLSceneNotify.Notify(FLSceneNotify.FEATURE_SCENE_REVEAL_ALL_FINISHED))},t.prototype.Reset=function(){this.ApplyToAllButtons(function(e){e.Reset()}),this.ApplyToAllButtons(this.RegisterEventToButtons),this.openedPot=0,this.prizeDetail=void 0,this.isFreeSpinStopped=!1,this.SetAllLabels()},t.prototype.End=function(e){this.Hide()},t.prototype.GetButtonAt=function(e){return this.grpButtons.getChildAt(e)},t.prototype.OnLanguageChanged=function(e){void 0===e&&(e=""),this.SetAllLabels()},t.prototype.SetAllLabels=function(){for(var e=parseInt(Localization.Instance.getString(GameConfig.GameCode+".featuregame.mysteryPrizeID")),t=Localization.Instance.getString(GameConfig.GameCode+".featuregame.selectionFreeGameLabel"),n=Localization.Instance.getString(GameConfig.GameCode+".featuregame.selectionMultipierLabel"),i=Localization.Instance.getString(GameConfig.GameCode+".featuregame.selectionMultiplier"),o=0;o6||e.data<1)){var t=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.mysteryTypeBG")[e.data-1];console.log(t),this.multiplierMeter.GetBackground().source=RES.getRes(t)}},t}(UIFreeGameMetersManager);__reflect(FLFreeGameMetersManager.prototype,"FLFreeGameMetersManager");var FLPrizeMessage=function(e){function t(){return e.call(this)||this}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.lblPrizeAmount.anchorOffsetY=20},t.prototype.SetWholeMessage=function(t,n){e.prototype.SetWholeMessage.call(this,t,n)},t.prototype.SetMultiplierTitle=function(e){this.lblMultiplierTitle.visible=!0,this.lblMultiplierTitle.text=e},t.prototype.SetPrizeAmount=function(e){this.lblPrizeAmount.visible=!0,this.lblPrizeAmount.text=e.toString()},t.prototype.SetMysteryLabel=function(e){this.lblMysteryPot.text=e},t.prototype.SetPrizeTypeFont=function(t){e.prototype.SetPrizeTypeFont.call(this,t),this.lblMultiplierTitle.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multipierLabelFont"),this.lblPrizeAmount.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.freeGameMissedLabelFont"),this.lblMysteryPot.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.freeGameMissedLabelFont")},t.prototype.OnLanguageChanged=function(e){void 0===e&&(e=""),this.lblPrizeType.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.freeGameLabelFont"),this.lblMultiplier.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multipierLabelFont"),this.lblMultiplierTitle.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.multipierLabelFont"),this.lblPrizeAmount.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.freeGameLabelFont"),this.lblMysteryPot.font=Localization.Instance.getString(GameConfig.GameCode+".featuregame.freeGameMissedLabelFont")},t.prototype.GetPrizeAmountLabel=function(){return this.lblPrizeAmount},t}(PTPrizeMessage);__reflect(FLPrizeMessage.prototype,"FLPrizeMessage");var FLPrizePot=function(e){function t(){var t=e.call(this)||this;t.bgString="",t.isMysteryPot=!1,t.endCount=3,GameConfig.platform==Platform.mobile?t.skinName="PTPrizePot_MobileSkin":t.skinName="PTPrizePotSkin",t.isHighlighting=!1;var n=[.3,.6,0,0,0,.3,.6,0,0,0,.3,.6,0,0,0,0,0,0,1,0];return t.dimFilter=new egret.ColorMatrixFilter(n),t.Enable(),t}return __extends(t,e),t.prototype.partAdded=function(t,n){e.prototype.partAdded.call(this,t,n)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.RegisterEvent(),this.RegisterTouchEvent(),this.fixedScale=!0},t.prototype.RegisterEvent=function(){EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_ENABLE_ALLBUTTON,this.RegisterTouchEvent,this),EventCentral.getInstance().addEventListener(SceneNotify.FEATURE_DISABLE_ALLBUTTON,this.UnregisterTouchEvent,this)},t.prototype.UnregisterEvent=function(){EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_ENABLE_ALLBUTTON,this.RegisterTouchEvent,this),EventCentral.getInstance().removeEventListener(SceneNotify.FEATURE_DISABLE_ALLBUTTON,this.UnregisterTouchEvent,this)},t.prototype.SetBackground=function(e){this.imgBG.source=e},t.prototype.Open=function(e){var t=this;if(!this.isOpened){AudioManager.Instance.playSound(Sound.FeatureGamePickSound),this.thePot.ChangeActingStyle("Spin");var n=function(){t.OnPotOpened(e),t.thePot.removeEventListener(UIActingClip.ACTING_END,n,t)};this.thePot.addEventListener(UIActingClip.ACTING_END,n,this),this.m_IsOpened=!0}},t.prototype.OnPotOpened=function(e){var t=this;if(null!=e){var n=function(){e(t)};this.ShowPrizeMessage(n)}else this.ShowPrizeMessage()},t.prototype.SetPrizeMessage=function(e,t,n,i,o,a){void 0===o&&(o=""),void 0===a&&(a=""),this.SetMultiplierTitle(void 0==i?"Multiliper":i),this.SetMultiliperType(e),this.SetFreeSpinLabel(t),this.thePrize.SetMysteryLabel(a),void 0==o?this.thePrize.GetPrizeAmountLabel().visible=!1:this.SetFreeSpinAmount(o),this.ShowPrizeMessage()},t.prototype.SetMultiliperType=function(e){this.thePrize.SetAmount(e)},t.prototype.SetMultiplierTitle=function(e){this.thePrize.SetMultiplierTitle(e)},t.prototype.SetFreeSpinLabel=function(e){this.thePrize.SetPrizeType(e)},t.prototype.SetFreeSpinAmount=function(e){this.thePrize.SetPrizeAmount(e)},t.prototype.SetPrizeType=function(e){this.thePrize.SetPrizeTypeFont(e)},t.prototype.ShowPrizeMessage=function(e){console.log("!!!!!!!!!!!!! ShowPrizeMessage"),this.thePrize.Show(),this.thePrize.SetScale(3,3),null!=e&&e()},t.prototype.HidePrizeMessage=function(){this.thePrize.Hide()},t.prototype.StartRandomPrize=function(e,t,n){this.thePrize.SetMysteryLabel(""),this.SetFreeSpinLabel(e[2]),void 0!=e?(this.RollingFreeSpinLabel(e[0],t),this.RollingMultiplierLabel(e[1],n)):(this.RollingFreeSpinLabel(),this.RollingMultiplierLabel())},t.prototype.RollingFreeSpinLabel=function(e,t){var n=this,i=Math.round(Math.random()*(e.length-1)),o=0;PTPotTween.Rolling(this.thePrize.GetPrizeAmountLabel(),.18,function(){},function(){for(o=i;;){var t=Math.round(Math.random()*(e.length-1));if(t!=i){i=t;break}}n.SetFreeSpinAmount(e[i]),AudioManager.Instance.playSound(Sound.freeGameSelectionLoopingSound)},{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:0},function(){t(i)})},t.prototype.StopingFreeSpinLabel=function(e,t){var n=this,i=0;PTPotTween.CancelTween(this.thePrize.GetPrizeAmountLabel());var o=.18,a=function(){n.SetFreeSpinAmount(e[i]),i+=1,AudioManager.Instance.playSound(Sound.freeGameSelectionLoopingSound)},r=function(){PTPotTween.CancelTween(n.thePrize.GetPrizeAmountLabel()),PTPotTween.StopRolling(n.thePrize.GetPrizeAmountLabel(),.8,function(){},function(){n.SetFreeSpinAmount(e[i]),AudioManager.Instance.playSound(Sound.freeGameSelectionLoopingSound)},{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:1},function(){t()})},s=function(){n.SetFreeSpinAmount(e[i]),PTPotTween.CancelTween(n.thePrize.GetPrizeAmountLabel()),PTPotTween.StopRolling(n.thePrize.GetPrizeAmountLabel(),o+.3/e.length,function(){},a,{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:0},function(){e.length-1==i?r():e.length-i<4&&s()})};PTPotTween.Rolling(this.thePrize.GetPrizeAmountLabel(),o,function(){},a,{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:0},function(){e.length-1==i?(PTPotTween.CancelTween(n.thePrize.GetPrizeAmountLabel()),r()):e.length-i<4&&(PTPotTween.CancelTween(n.thePrize.GetPrizeAmountLabel()),s())})},t.prototype.RollingMultiplierLabel=function(e,t){var n=this,i=Math.round(Math.random()*(e.length-1)),o=0;PTPotTween.Rolling(this.thePrize.GetMultiplierLabel(),.18,function(){},function(){for(o=i;;){var t=Math.round(Math.random()*(e.length-1));if(t!=i){i=t;break}}n.SetMultiliperType(e[i]),AudioManager.Instance.playSound(Sound.freeGameSelectionLoopingSound)},{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:0},function(){t(i)})},t.prototype.StopingMultiplierLabel=function(e,t){var n=this,i=0;PTPotTween.CancelTween(this.thePrize.GetMultiplierLabel());var o=.18,a=function(){n.SetMultiliperType(e[i]),i+=1,AudioManager.Instance.playSound(Sound.freeGameSelectionLoopingSound)},r=function(){PTPotTween.CancelTween(n.thePrize.GetMultiplierLabel()),PTPotTween.StopRolling(n.thePrize.GetMultiplierLabel(),.8,function(){},function(){n.SetMultiliperType(e[i]),AudioManager.Instance.playSound(Sound.freeGameSelectionLoopingSound)},{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:1},function(){t()})},s=function(){PTPotTween.CancelTween(n.thePrize.GetMultiplierLabel()),PTPotTween.StopRolling(n.thePrize.GetMultiplierLabel(),o+.3/e.length,function(){},a,{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:0},function(){e.length-1==i?r():e.length-i<4&&s()})};PTPotTween.Rolling(this.thePrize.GetMultiplierLabel(),o,function(){},a,{scaleX:1.2,scaleY:1.2,alpha:0},{scaleX:1.5,scaleY:1.5,alpha:1},{scaleX:1.8,scaleY:1.8,alpha:0},function(){e.length-1==i?r():e.length-i<4&&s()})},t.prototype.DirectOpen=function(e,t){this.thePot.Hide(),this.SetPrizeMessage(e,t),this.ShowPrizeMessage(),this.m_IsOpened=!0},t.prototype.MissedReveal=function(e,t){this.thePrize.Missed(),this.m_IsOpened=!0},t.prototype.Enable=function(){this.isEnabled=!0,this.filters=[]},t.prototype.Disable=function(){this.isEnabled=!1,this.m_IsOpened||(this.filters=[this.dimFilter])},t.prototype.TurnOnColor=function(){this.filters=[]},t.prototype.TurnOffColor=function(){this.filters=[this.dimFilter]},t.prototype.SetIsMysteryPot=function(e){this.isMysteryPot=e},t.prototype.Reset=function(){console.log("************* Pot Reset!!!!!!!!!!"),this.Enable(),this.m_IsOpened=!1,this.thePot.Show(),this.thePot.alpha=1,this.thePot.ChangeActingStyle("Idle",-1),this.fixedScale=!1,this.SetScale(1,1),this.fixedScale=!0,this.thePrize.GetPrizeTypeLabel().textAlign="left",PTPotTween.CancelTween(this.thePrize.GetPrizeAmountLabel()),PTPotTween.CancelTween(this.thePrize.GetMultiplierLabel()),this.thePrize.Show(),this.thePrize.SetScale(3,3),this.thePrize.GetPrizeAmountLabel().scaleX=1,this.thePrize.GetPrizeAmountLabel().scaleY=1,this.thePrize.GetMultiplierLabel().scaleX=1,this.thePrize.GetMultiplierLabel().scaleY=1,this.m_OnOverCallback=null,this.m_OnOutCallback=null,this.m_OnTabCallback=null},t.prototype.GetMultiplierLabel=function(){return this.thePrize.GetMultiplierLabel()},t.prototype.GetFreeSpinLabel=function(){return this.thePrize.GetPrizeTypeLabel()},Object.defineProperty(t.prototype,"isOpened",{get:function(){return this.m_IsOpened},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onOutCallback",{set:function(e){this.m_OnOutCallback=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onOverCallback",{set:function(e){this.m_OnOverCallback=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"onTabCallback",{set:function(e){this.m_OnTabCallback=e},enumerable:!0,configurable:!0}),t}(PTPrizePot);__reflect(FLPrizePot.prototype,"FLPrizePot");var PTBackground=function(e){function t(t){var n=e.call(this)||this;return n.imgName_In_Editor="",n.hideFromStart_In_Editor=!1,n.fadeTime=1,n.SetBackground(t),n}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),""!=this.imgName_In_Editor&&this.SetBackground(this.imgName_In_Editor),this.hideFromStart_In_Editor&&this.Hide()},t.prototype.SetBackground=function(e){var t=RES.getRes(e);this.imgBG.texture=t},t.prototype.FadeOut=function(){var e=egret.Tween.get(this.imgBG);e.to({alpha:0},this.fadeTime_ms).call(function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(UIBGTranscation.FADEOUT_END))})},t.prototype.FadeIn=function(){var e=egret.Tween.get(this.imgBG);e.to({alpha:1},this.fadeTime_ms).call(function(){EventCentral.getInstance().dispatchEvent(new SceneNotify(UIBGTranscation.FADEIN_END))})},Object.defineProperty(t.prototype,"fadeTime_ms",{get:function(){return 1e3*this.fadeTime},enumerable:!0,configurable:!0}),t}(HTMLUI.UIBase);__reflect(PTBackground.prototype,"PTBackground");var PTBackgroundManager=function(e){function t(t){var n=e.call(this)||this;return n.background=null,n.background=t,n}return __extends(t,e),t}(UIBackgroundManager);__reflect(PTBackgroundManager.prototype,"PTBackgroundManager");var PTBackgroundTween=function(){function e(){}return e.FadeSwap=function(e,t,n,i,o,a,r){void 0===r&&(r=!0),e.alpha=0;var s=egret.Tween.get(e);return s.to({alpha:1},1e3*t).call(n).wait(1e3*i).call(o).to({alpha:0},1e3*t).call(a),r?(s.call(function(){e.parent.removeChild(e)}),null):s},e.CustomTween=function(e,t,n,i,o){void 0===o&&(o=!0);var a=egret.Tween.get(t);return a.to(e,1e3*n).call(i),o?(a.call(function(){t.parent.removeChild(t)}),null):a},e}();__reflect(PTBackgroundTween.prototype,"PTBackgroundTween");var PTDragonBonesBGAnimation=function(e){function t(){var t=e.call(this)||this;return t.SetLeaf(),t.SetGrass(),t.SetStar(),t.touchEnabled=!1,t}return __extends(t,e),t.prototype.SetLeaf=function(){this.leaf=DragonBonesManager.getInstance().CreateArmature("Leaf");var e=this.leaf.getDisplay();e.scaleX=GameConfig.ContentScale,e.scaleY=GameConfig.ContentScale,e.x=534,e.y=320,this.addChild(e)},t.prototype.SetGrass=function(){this.grass=DragonBonesManager.getInstance().CreateArmature("Grass");var e=this.grass.getDisplay();e.scaleX=GameConfig.ContentScale,e.scaleY=GameConfig.ContentScale,e.x=534,e.y=320,this.addChild(e)},t.prototype.SetStar=function(){this.starPosition=new Array,this.starPosition.push(new egret.Point(40,250)),this.starPosition.push(new egret.Point(150,140)),this.starPosition.push(new egret.Point(50,110)),this.starPosition.push(new egret.Point(140,220)),this.star=new Array(4);for(var e=0;e=e.GetTotalBet()*GameConfig.bigwin.normal?this.speedRate=1:this.speedRate=2:this.speedRate=1},t}(HTMLUI.UIBase);__reflect(BSDragonBonesActor.prototype,"BSDragonBonesActor");var BSTypeUIWinSummary=function(e){function t(){var t=e.call(this)||this;return t.winSummaryContent=[],t.winSummaryDisplay=[],t.timeoutId=-1,t.skinName="UIWinSummarySkin",t.anchorOffsetX=t.width/2,t.anchorOffsetY=t.height/2,t.fixedScale=!0,t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.lblWinAmountTitle.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won");Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won");this.lblWinAmountTitle.font=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won_font"),this.lblPlayCountTitle.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played");Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.played");this.lblPlayCountTitle.font=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.you_won_font"),this.lblPlayCountTitle.addEventListener(egret.Event.RESIZE,this.OnTitleResize,this),this.CreateAnimation()},t.prototype.CreateAnimation=function(){GameConfig.platform==Platform.desktop?DragonBonesManager.getInstance().LoadAnimationData("win_summary"):DragonBonesManager.getInstance().LoadAnimationData("win_summary_mobile"),this.winSummaryContent.push(DragonBonesManager.getInstance().CreateArmature("win_summary")),this.winSummaryDisplay.push(this.winSummaryContent[0].getDisplay()),this.winSummaryDisplay[0].scaleX=SlotConfig.BORDER_SCALE*GameConfig.ContentScale,this.winSummaryDisplay[0].scaleY=SlotConfig.BORDER_SCALE*GameConfig.ContentScale,this.winSummaryDisplay[0].x=533,this.winSummaryDisplay[0].y=300,this.addChildAt(this.winSummaryDisplay[0],1),this.PlayAnimation()},t.prototype.PlayAnimation=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1,void 0!=this.winSummaryDisplay[0]&&(this.winSummaryContent[0].animation.gotoAndPlay("ani"),this.timeoutId=egret.setTimeout(this.FadeInFinished,this,798,!1))},t.prototype.Init=function(e,t,n){void 0===n&&(n=0),this.lblWinAmount.text=n.toString(),this.lblPlayCount.text=e.toString()},t.prototype.Start=function(e,t,n){void 0===e&&(e=0),void 0===t&&(t=0),void 0===n&&(n=0),this.Init(e,t,n)},t.prototype.FadeIn=function(){this.SetScale(.001,.001);var e=egret.Tween.get(this);e.to({scaleX:1,scaleY:1},500,egret.Ease.backOut).call(this.FadeInFinished),this.backdrop.alpha=.1;var t=egret.Tween.get(this.backdrop);t.to({alpha:1},500)},t.prototype.FadeInFinished=function(){this.content.visible=!0,this.dispatchEvent(new egret.Event(UIWinSummary.FADE_IN_COMPLETE))},t.prototype.SetPlayCount=function(e){this.lblPlayCount.text=e.toString()},t.prototype.SetWinAmount=function(e){this.lblWinAmount.text=StringUtil.numberFormat(Number(e)/100,2)},t.prototype.Close=function(){this.FadeOut()},t.prototype.FadeOut=function(){this.SetScale(1,1);var e=egret.Tween.get(this);e.to({scaleX:.001,scaleY:.001},500,egret.Ease.backIn).call(this.FadeOutFinished);var t=egret.Tween.get(this.backdrop);t.to({alpha:.1},500)},t.prototype.FadeOutFinished=function(){this.dispatchEvent(new egret.Event(UIWinSummary.FADE_OUT_COMPLETE))},t.prototype.WinSummaryFinished=function(e){this.dispatchEvent(new egret.Event(egret.Event.COMPLETE)),EventCentral.getInstance().dispatchEvent(new SceneNotify(UIWinSummary.WINSUMMARY_FINISH))},t.prototype.OnTitleResize=function(){var e=this.lblPlayCountTitle,t=this.lblPlayCountTitle.textWidth;if(null!=e.$textLinesWidth){t=0;for(var n=0;n0?(a.addEventListener(egret.Event.LOOP_COMPLETE,this.LoopActingFinished,this),this.loopCompleteCallback=o,a.gotoAndPlay(e,t)):a.gotoAndStop(e)):console.log('Animation "'+e+'" not found!! ')},t.prototype.ActingFinished=function(e){this.animations[0].removeEventListener(egret.Event.LOOP_COMPLETE,this.LoopActingFinished,this),this.animations[0].removeEventListener(egret.Event.COMPLETE,this.ActingFinished,this),null!=this.callbackTarget&&null!=this.completeCallback&&this.completeCallback.call(this.callbackTarget),this.callbackTarget=null,this.completeCallback=null,this.loopCompleteCallback=null,this.currentStyle!=this.rootStyle&&this.PlayRootClip();var t=new SceneNotify(UIActingClip.ACTING_END,!0);t.data=this.currentStyle,this.dispatchEvent(t)},t.prototype.PlayRootClip=function(){this.Action(this.rootStyle,-1)},t.prototype.StopAndHideAllClip=function(){var e=this.animations[0];e.stop(),e.visible=!1},t.prototype.GetCurrentClip=function(){return this.animations[0]},t.prototype.GetCurrentClipTotalFrames=function(){for(var e in this.animations[0].frameLabels)if(this.animations[0].frameLabels.hasOwnProperty(e)){var t=this.animations[0].frameLabels[e];if(t.name==this.currentStyle)return t.end-t.frame+1}return this.GetCurrentClip().totalFrames+1},t.prototype.SwitchToClip=function(e){this.StopAndHideAllClip(),this.currentStyle=e;var t=this.animations[0];t.gotoAndStop(e),t.visible=!0},t}(UIActingClip);__reflect(UIActingClipAll.prototype,"UIActingClipAll");var UIActor=function(e){function t(t,n,i){void 0===t&&(t=""),void 0===i&&(i=!1);var o=e.call(this)||this;return o.Actor_Name_In_Editor="",o.Actor_Clips_In_Editor="",o.Actor_Clip_Type_In_Editor="",o.Actor_Clips_AllInOne=!1,o.gameMode="",o.image=new eui.Image,o.animations={},o.actorName="",o.actorType="",o.actorName=t,o.aniClipNames=n,o.fixedScale=!0,o.Actor_Clips_AllInOne=i,o.touchEnabled=!1,o}return __extends(t,e),t.CreateActor=function(e,n,i){return void 0===i&&(i=!1),new t(e,n,i)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),(""!=this.actorName||""!=this.Actor_Name_In_Editor)&&(""==this.actorName&&(this.actorName=this.Actor_Name_In_Editor),(null!=this.aniClipNames||""!=this.Actor_Clips_In_Editor)&&(null==this.aniClipNames&&(this.aniClipNames=this.Actor_Clips_In_Editor.split(",")),(null!=this.actorType||""!=this.Actor_Clip_Type_In_Editor)&&(""==this.actorType&&(this.actorType=this.Actor_Clip_Type_In_Editor),this.SetUp(this.actorName,this.aniClipNames),this.actingStyle.PlayRootClip())))},t.prototype.SetUp=function(e,t){this.actorName=e,"DragonBones"==this.actorType?this.actingStyle=new DragonBonesActorClip:this.Actor_Clips_AllInOne?this.actingStyle=new UIActingClipAll:this.actingStyle=new UIActingClip,this.actingStyle.CreateActingClips(this.actorName,t),this.addChild(this.actingStyle)},t.prototype.GetActionClipNames=function(){for(var e=["Idle","Win"],t=new Array,n=0;n0?void 0!=this.animateionDisplay&&(this.animateionContent.animation.timeScale=this.speedRate,EventCentral.getInstance().dispatchEvent(new SceneNotify(SceneNotify.PLAY_MULTIPLIER_METER_ANIMATION)),this.animateionDisplay.animation.gotoAndPlay("meter_fx"),AudioManager.Instance.playSound(Sound.FreeGameBomb),this.timeoutId=egret.setTimeout(this.ShowLabel,this,1300/this.speedRate)):EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.SPECIAL_EVENT_FINISHED))},t.prototype.GetRetriggerCount=function(){return parseInt(this.lblMultiplier.text)},t.prototype.GetRetriggerLabel=function(){return this.lblMultiplier},t.prototype.GetBackground=function(){return this.background},t.prototype.OnLanguageChanged=function(e){void 0===e&&(e="")},t.prototype.HideLabel=function(){this.lblMultiplier.visible=!1},t.prototype.ShowLabel=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1,this.lblMultiplier.text="x"+this.multiplierList[0].toString(),this.multiplierList.splice(0,1),this.timeoutId=egret.setTimeout(this.PlayMultiplierAnimation,this,300/this.speedRate),this.lblMultiplier.visible=!0},t.prototype.updateSpeedRate=function(){var e=SocketManager.getInstance().GetData();GameConfig.isTurboMode&&GameConfig.TurboModeState?e.winAmount>=e.GetTotalBet()*GameConfig.bigwin.normal?this.speedRate=1:this.speedRate=2:this.speedRate=1},t}(HTMLUI.UIBase);__reflect(UIFreeGameMultiplierMeter.prototype,"UIFreeGameMultiplierMeter");var UIFreeGameRemainMeter=function(e){function t(){var t=e.call(this)||this;return t.skinName="UIFreeGameRemainMeterSkin",t.changelanguageHandler=new UIChangeLanguage(t.OnLanguageChanged,t),t.OnLanguageChanged(),t}return __extends(t,e),t.prototype.partAdded=function(t,n){e.prototype.partAdded.call(this,t,n)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this)},t.prototype.SetSpinLeft=function(e){this.lblSpinLeft.text=e.toString()},t.prototype.SetSpinMax=function(e){this.lblSpinMax.text=e.toString()},t.prototype.SetDivider=function(e){this.lblDivider.text=e},t.prototype.OnLanguageChanged=function(e){void 0===e&&(e=""),this.lblMeterLabel.text=Localization.Instance.getString(GameConfig.GameCode+".freegame_scene.meter"),this.lblMeterLabel.font=Localization.Instance.getString("common.font.freegame"),Localization.Instance.currentLanguage==Language.English?(this.lblMeterLabel.verticalCenter=7,this.lblMeterLabel.scaleX=1,this.lblMeterLabel.scaleY=1):this.lblMeterLabel.verticalCenter=2},t}(HTMLUI.UIBase);__reflect(UIFreeGameRemainMeter.prototype,"UIFreeGameRemainMeter");var UIFreeGameRetriggerMeter=function(e){function t(){var t=e.call(this)||this;return t.skinName="UIFreeGameRetriggerMeterSkin",t}return __extends(t,e),t.prototype.partAdded=function(t,n){e.prototype.partAdded.call(this,t,n)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.changelanguageHandler=new UIChangeLanguage(this.OnLanguageChanged,this),this.OnLanguageChanged()},t.prototype.SetRetriggerCount=function(e){this.lblRetriggerCount.text="x"+e.toString()},t.prototype.GetRetriggerCount=function(){return parseInt(this.lblRetriggerCount.text)},t.prototype.OnLanguageChanged=function(e){void 0===e&&(e="")},t.prototype.HideLabel=function(){this.lblRetriggerCount.visible=!1},t.prototype.ShowLabel=function(){this.lblRetriggerCount.visible=!0},t}(HTMLUI.UIBase);__reflect(UIFreeGameRetriggerMeter.prototype,"UIFreeGameRetriggerMeter");var UILoadingBar=function(e){function t(){var t=e.call(this)||this;return t.loadingBar=new UIActingClip,t.loadingBar.CreateActingClips("Loading",["Progress"]),t.addChild(t.loadingBar),t.loadingBar.SwitchToClip("Progress"),t.barMaxAmount=t.loadingBar.GetCurrentClipTotalFrames(),t.percentScale=0,t.curAmount=0,t.SetMaxAmount(100),t}return __extends(t,e),t.prototype.SetMaxAmount=function(e){this.maxAmount=e,this.percentScale=this.barMaxAmount/this.maxAmount},t.prototype.SetProgress=function(e){this.curAmount=e,this.loadingBar.CurrentClipGoToStop(Math.ceil(this.curAmount*this.percentScale))},t.prototype.GetCurrentAmount=function(){return this.curAmount},t.prototype.Play=function(){this.loadingBar.PlayRootClip()},t.prototype.Reset=function(){this.curAmount=0,this.loadingBar.CurrentClipGoToStop(1)},t}(HTMLUI.UIBase);__reflect(UILoadingBar.prototype,"UILoadingBar");var UILoadingBarManager=function(){function e(){this.loadingScreen=new UILoadingScreen,this.HideLoading()}return e.GetInstance=function(){return null==this._instance&&(this._instance=new e),this._instance},e.prototype.SetStage=function(){},e.prototype.ShowLoading=function(){this.loadingScreen.visible=!0},e.prototype.HideLoading=function(){this.loadingScreen.visible=!1},e.prototype.GetLoadingProcess=function(){return this.loadingScreen.GetLoadingBar().GetCurrentAmount()},e.prototype.UpdateLoadingProcess=function(e){this.loadingScreen.GetLoadingBar().SetProgress(e)},e}();__reflect(UILoadingBarManager.prototype,"UILoadingBarManager");var UILoadingScreen=function(e){function t(){var t=e.call(this)||this;return t.skinName="resource/HTMLUI/UILoadingSkin.exml",t}return __extends(t,e),t.prototype.GetLoadingBar=function(){return this.loadingBar},t}(HTMLUI.UIBase);__reflect(UILoadingScreen.prototype,"UILoadingScreen");var UIReelboard=function(e){function t(){var t=e.call(this)||this;return t.skinName="UIReelboardSkin",t}return __extends(t,e),t}(HTMLUI.UIBase);__reflect(UIReelboard.prototype,"UIReelboard");var BigWin=function(e){function t(){var t=e.call(this)||this;return t.target=0,t.displayAmount=0,t.totalWin=0,t.countStart=!1,t.windowWidth=window.innerWidth,t.windowHeight=window.innerHeight,t._t=egret.getTimer(),t.width=1067,t.height=600,t.fireworkManager=new FireworkManager,t}return __extends(t,e),t.prototype.InitBigWin=function(e,n,i,o){var a=this;void 0===o&&(o=-1),0>o&&(o=n),this.visible=!0,this.alpha=1,3==e?AudioManager.Instance.playSound(Sound.BW_MegaBigWin):2==e?AudioManager.Instance.playSound(Sound.BW_SuperBigWin):AudioManager.Instance.playSound(Sound.BW_BigWin),this.addEventListener(t.BIGWIN_NUMBER_ANIMATE_END,this.countEnded,this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_BOOKING_START,this.OnStartBooking,this),this.totalWin=n,this.alphaImage=new eui.Rect(this.width,this.height,0),this.alphaImage.fillAlpha=.5,this.addChild(this.alphaImage);var r="";3==e?r="bigwin.mega":2==e?r="bigwin.super":1==e?r="bigwin.normal":CommonFunc.log("Error no big win type"),this.bwImage=new eui.Image(Localization.Instance.getString("common."+r)),this.bwImage.anchorOffsetX=.5*this.bwImage.width,this.bwImage.anchorOffsetY=.5*this.bwImage.height,this.bwImage.horizontalCenter=0,this.bwImage.verticalCenter=0,this.addChild(this.bwImage),this.winLabel=new eui.BitmapLabel,this.winLabel.horizontalCenter=0,this.winLabel.y=50,this.winLabel.visible=!0,this.addChild(this.winLabel);var s=1e3;EffectUtils.elasticOut(this.bwImage,s),egret.Tween.get(this).wait(2*s).call(function(){egret.Tween.get(a.bwImage).to({scaleX:0,scaleY:0,verticalCenter:-200},300),egret.Tween.get(a).wait(200).call(function(){a.parent&&(a._t=egret.getTimer(),a.addEventListener(egret.Event.ENTER_FRAME,a.OnCount,a),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,o)),a.countStart=!0)})}),this.loadFont(),3==e&&(this.addChild(this.fireworkManager),this.fireworkManager.Start()),GameConfig.isDragonBoneBigWin||e>=2&&(this.coin=new CharacterAnimation2(["coin_loop","coin_start"],!1),this.coin.fixedScale=!0,this.addChild(this.coin),this.coin.playAnimation("coin_start"),this.coinSoundChannel=AudioManager.Instance.playSound(Sound.CollectCoin,-1)),GameConfig.platform==Platform.desktop?(this.skipButton=new BetActionButton,this.skipButton.labelKey="desktop.spinaction.stopbtn",SlotConfig.overlayStopButtonPosition?(this.skipButton.x=SlotConfig.overlayStopButtonPosition.x,this.skipButton.y=SlotConfig.overlayStopButtonPosition.y):(this.skipButton.bottom=27,this.skipButton.right=113)):(this.skipButton=new BaseButton,this.skipButton.skinName=SpinBtnSkin,this.skipButton.labelKey="common.stop",this.skipButton.imageKey="stop_btn_mobile_png",this.skipButton.bottom=233,this.skipButton.right=18),this.skipButton.anchorOffsetX=0,this.skipButton.anchorOffsetY=0,this.skipButton.scaleX=1,this.skipButton.scaleY=1,this.skipButton.visible=!1,this.addChild(this.skipButton),this.skipButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnSkipPressed,this),EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this)},t.prototype.OnButtonPressed=function(e){switch(e.data){case ButtonType.Stop:this.OnSkipBigWin(e)}},t.prototype.OnStartBooking=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.WIN_BOOKING_START,this.OnStartBooking,this),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE)),this.skipButton.visible=!0},t.prototype.OnSkipPressed=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop))},t.prototype.OnSkipBigWin=function(e){this.skipButton.visible=!1,this.ResetBigWin()},t.prototype.loadFont=function(){var e=RES.getRes("winb_num_fnt");this.winLabel&&(this.winLabel.font=e)},t.prototype.ResetBigWin=function(){EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),this.skipButton.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.OnSkipPressed,this),this.fireworkManager.Stop(),this.removeEventListener(egret.Event.ENTER_FRAME,this.OnCount,this),this.displayAmount=this.totalWin,this.winLabel.text=StringUtil.numberFormat(this.totalWin/100),this.endTimer=new egret.Timer(1e3,1),this.endTimer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.OnBigWinFinished,this),this.endTimer.start()},t.prototype.countEnded=function(e){this.ResetBigWin(),this.winLabel.text=StringUtil.numberFormat(this.totalWin/100),this.endTimer=new egret.Timer(1e3,1),this.endTimer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.OnBigWinFinished,this),this.endTimer.start()},t.prototype.OnBigWinFinished=function(e){this.fireworkManager.Stop(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.BIG_WIN_FINISHED)),null!=this.endTimer&&(this.endTimer.stop(),this.endTimer.removeEventListener(egret.TimerEvent.TIMER_COMPLETE,this.OnBigWinFinished,this),this.endTimer=null),this.countStart=!1,null!=this.coinSoundChannel&&(this.coinSoundChannel.stop(),this.coinSoundChannel=null),GameConfig.isDragonBoneBigWin||(null!=this.coin&&(this.removeChild(this.coin),this.coin=null),null!=this.coin2&&(this.removeChild(this.coin2),this.coin2=null)),null!=this.alphaImage&&(this.removeChild(this.alphaImage),this.alphaImage=null),null!=this.winLabel&&(this.removeChild(this.winLabel),this.winLabel=null),null!=this.skipButton&&(this.removeChild(this.skipButton),this.skipButton=null),null!=this.bwImage&&(this.removeChild(this.bwImage),this.bwImage=null),this.displayAmount=0,this.removeEventListener(t.BIGWIN_NUMBER_ANIMATE_END,this.countEnded,this),EventCentral.getInstance().removeEventListener(SceneNotify.WIN_BOOKING_START,this.OnStartBooking,this),this.parent&&this.parent.removeChild(this)},t.prototype.OnCount=function(e){if(this.countStart){var n=egret.getTimer(),i=.001*(n-e.target._t);e.target._t=n;var o=SocketManager.getInstance().GetData(),a=this.totalWin,r=(o.denominationList[o.denominationId]*o.lineBet,new BookingSpeedCalculator),s=r.ComputeSpeed(e.target.displayAmount);GameConfig.isTurboMode&&GameConfig.TurboModeState&&(s=2*r.ComputeSpeed(e.target.displayAmount)),e.target.displayAmount+=s*i,e.target.displayAmountthis.stageW)if(this.xBounce){var e=this.bounceDamping+Math.random()*this.bounceVariance-this.bounceVariance/2;this.xVelocity*=-e,this.xPosition+=this.xVelocity,this.bounces+=1,this.bounces>this.maxBounce&&(this.dead=!0)}else this.dead=!0;if(this.yPosition<0||this.yPosition>this.stageH)if(this.yBounce){var e=this.bounceDamping+Math.random()*this.bounceVariance-this.bounceVariance/2;this.yVelocity*=-e,this.yPosition+=this.yVelocity,this.zVelocity*=.02,this.zPosition+=this.zVelocity,this.bounces+=1,this.bounces>this.maxBounce&&(this.dead=!0)}else this.dead=!0},e.prototype.addVelocity=function(e,t,n){this.xVelocity+=e,this.yVelocity+=t,this.zVelocity+=n},e.prototype.isDead=function(){return this.dead},e}();__reflect(CoinEffectParticle.prototype,"CoinEffectParticle");var Jackpot=function(e){function t(){var t=e.call(this)||this;return t.totalWin=0,t.count=0,t.type=0,t.isCount=!1,t.width=1067,t.height=600,t.fireworkManager=new FireworkManager,t}return __extends(t,e),t.prototype.InitJackpot=function(e,t){var n=this;this.visible=!0,this.alpha=1,this.type=e,this.totalWin=t,AudioManager.Instance.playSound(Sound.Jackpot);var i="";1==e?i="major":2==e?i="minor":3==e&&(i="mini"),this.rect=new eui.Rect(this.width,this.height,0),this.rect.fillAlpha=.5,this.addChild(this.rect),this.sprite=new egret.Sprite,this.sprite.width=this.width,this.sprite.height=this.height,this.addChild(this.sprite),this.sprite.alpha=1,this.sprite.visible=!0;var o=new egret.Bitmap(RES.getRes("common.jackpot_"+i+"_star"));o.anchorOffsetX=.5*o.width,o.anchorOffsetY=.5*o.height,o.x=.5*this.width,o.y=.5*this.height,this.sprite.addChild(o);var o=new egret.Bitmap(RES.getRes(Localization.Instance.getString("common.jackpot."+i+"_title")));o.anchorOffsetX=.5*o.width,o.anchorOffsetY=.5*o.height,o.x=.5*this.width,o.y=165,this.sprite.addChild(o);var o=new egret.Bitmap(RES.getRes("board_"+i+"_bg"));o.anchorOffsetX=.5*o.width,o.anchorOffsetY=.5*o.height,o.x=.5*this.width,o.y=.5*this.height,this.sprite.addChild(o);var o=new egret.Bitmap(RES.getRes(Localization.Instance.getString("common.jackpot."+i+"_subtitle")));o.anchorOffsetX=.5*o.width,o.anchorOffsetY=.5*o.height,o.x=.5*this.width,o.y=220,this.sprite.addChild(o);for(var a=10,r=0;10>r;r++){var o=new egret.Bitmap(RES.getRes("num_bg_"+i));o.x=.5*this.width+50*(r-.5*a),o.y=256,this.sprite.addChild(o)}this.jackpotWinLabel=new eui.BitmapLabel,this.jackpotWinLabel.text="0000000000",this.jackpotWinLabel.x=276,this.jackpotWinLabel.y=256,this.jackpotWinLabel.scaleX=.65,this.jackpotWinLabel.scaleY=.65,this.jackpotWinLabel.letterSpacing=-13,this.jackpotWinLabel.font=RES.getRes("winb_num_fnt"),this.sprite.addChild(this.jackpotWinLabel),this.confirmBtn=new BaseButton,this.confirmBtn.skinName="JackpotConfirmButtonSkin",this.confirmBtn.label=Localization.Instance.getString("common.jackpot.confirm"),this.confirmBtn.anchorOffsetX=.5*this.confirmBtn.width,this.confirmBtn.anchorOffsetY=.5*this.confirmBtn.height,this.confirmBtn.x=.5*this.width,this.confirmBtn.y=380,this.confirmBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnConfirmPressed,this),this.confirmBtn.visible=!1,this.sprite.addChild(this.confirmBtn),this.isCount=!0,this.addChild(this.fireworkManager),this.fireworkManager.Start();var s=1e3;EffectUtils.elasticOut(this.sprite,s),this.count=0,egret.Tween.get(this,{onChange:this.onCount,onChangeObj:this}).wait(s).to({count:this.totalWin/100},4e3).call(function(){n.OnCountFinished()},this)},t.prototype.OnConfirmPressed=function(e){var t=this;this.confirmBtn.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.OnConfirmPressed,this),egret.Tween.get(this).wait(500).call(function(){var e=500;egret.Tween.get(t).wait(e).call(function(){t.OnJackpotFinished(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.JACKPOT_FINISHED))})})},t.prototype.onCount=function(){this.jackpotWinLabel&&(this.jackpotWinLabel.text=MovieClip.fillZore(Math.floor(this.count),10))},t.prototype.OnCountFinished=function(){this.confirmBtn&&(this.confirmBtn.visible=!0)},t.prototype.OnJackpotFinished=function(){this.sprite.parent&&this.sprite.parent.removeChild(this.sprite),this.sprite=null,this.jackpotWinLabel.parent&&this.jackpotWinLabel.parent.removeChild(this.jackpotWinLabel),this.jackpotWinLabel=null,this.confirmBtn.parent&&this.confirmBtn.parent.removeChild(this.confirmBtn),this.confirmBtn=null,this.rect.parent&&this.rect.parent.removeChild(this.rect),this.rect=null,this.fireworkManager.Stop(),this.parent&&this.parent.removeChild(this)},t}(eui.Component);__reflect(Jackpot.prototype,"Jackpot");var JackpotMeter=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Init=function(){this.jackpotHelpBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnJackpotHelpButtonPressed,this),this.jackpotMeterInfo.visible=!1,GameConfig.platform==Platform.desktop&&(this.jackpotMeterInfo.x=700,this.jackpotMeterInfo.y=50,GameLayer.GetInstance().AddObjectToLayer(this.jackpotMeterInfo,Layer.Overlay));var e=new ConstantBookingSpeedCalculator;this.majorValue.SetSpeedCalculator(e),e=new ConstantBookingSpeedCalculator,this.minorValue.SetSpeedCalculator(e),e=new ConstantBookingSpeedCalculator,this.miniValue.SetSpeedCalculator(e)},t.prototype.childrenCreated=function(){this.stage.addEventListener(mouse.MouseEvent.MOUSE_OVER,this.HideJackpotInfo,this),e.prototype.childrenCreated.call(this),this.languageChanged(this),SocketManager.getInstance().GetData().majorJackpot&&this.majorValue.SetBaseValue(SocketManager.getInstance().GetData().majorJackpot),SocketManager.getInstance().GetData().minorJackpot&&this.minorValue.SetBaseValue(SocketManager.getInstance().GetData().minorJackpot),SocketManager.getInstance().GetData().miniJackpot&&this.miniValue.SetBaseValue(SocketManager.getInstance().GetData().miniJackpot)},t.prototype.languageChanged=function(e){for(var t=[],n=1;n=GameConfig.MaxRetryTimes?this.ShowMessage(n,!0):this._retryTimes++:this.ShowMessage(n,!0)},t.prototype.ShowResumeJackpot=function(e){this.isJackpot=!0;var t=e.data.split(","),n=parseInt(t[0]),i=parseInt(t[1]),o=StringUtil.numberFormat(i,0),a="";switch(n){case 1:a=Localization.Instance.getString("common.jackpot.major");break;case 2:a=Localization.Instance.getString("common.jackpot.minor");break;case 3:a=Localization.Instance.getString("common.jackpot.mini")}var r=Localization.Instance.getString("common.jackpot.resume_jackpot",o,a);this.ShowMessage(r)},t.prototype.ShowResumingGame=function(e){EventCentral.getInstance().removeEventListener(SysNotify.GAME_LIST_DETAIL_LOADED,this.ShowResumingGame,this),SocketManager.getInstance().SendLaunchCompleteAction(),this.isResumeGame=!0,GameConfig.platform==Platform.desktop?(this.skinName=Desktop.MessageBoxSkin,this.label.size=14):(this.skinName=Mobile.MessageBoxSkin,this.label.size=22);var t=Localization.Instance.getString("common.system.unsettledGamesMessage"),n="",i=SocketManager.getInstance().GetData().unsettledEGamesList,o=GameConfig.gameListDetail.gamelist,a=new Array(9);1==SocketManager.getInstance().GetData().waitClient&&i.length<5&&-1==i.indexOf(GameConfig.GameCode)&&i.push(GameConfig.GameCode);for(var r=0;r=this.viewport.scrollH-287*o&&n*i<=this.viewport.scrollH+287*(1-o);this.drag&&(a||(this.viewport.scrollH=n*i),this.startSH=this.viewport.scrollH,this.startStageX=e.stageX)},t.prototype.onThumbDrag=function(e){if(this.drag){var t=this.horizontalScrollBar.width-this.horizontalScrollBar.thumb.width,n=this.viewport.contentWidth-this.width,i=n/t,o=e.stageX-this.startStageX;this.viewport.scrollH=this.startSH+o*i,this.viewport.scrollH<0&&(this.viewport.scrollH=0),this.viewport.scrollH>this.viewport.contentWidth-this.width&&(this.viewport.scrollH=this.viewport.contentWidth-this.width),this.startSH=this.viewport.scrollH,this.startStageX=e.stageX}},t.prototype.updateDisplayList=function(t,n){e.prototype.updateDisplayList.call(this,t,n),this.validateNow()},t.prototype.onMouseOver=function(e){CommonFunc.log("onMouseOver"),CommonFunc.changeCursor("pointer")},t.prototype.onMouseOut=function(e){CommonFunc.log("onMouseOut"),CommonFunc.changeCursor("auto")},t}(eui.Scroller);__reflect(MiniLobbyScroller.prototype,"MiniLobbyScroller");var MiniLobby=function(e){function t(){var t=e.call(this)||this;return t.language=0,t.isCurrentGameCheck=!1,t.supportedGameList=[],t.isTableGameSelected=!1,t.skinName=Desktop.MiniLobbySkin,t}return __extends(t,e),t.prototype.doClose=function(){this.parent&&this.parent.removeChild(this)},t.prototype.onMenuTap=function(e){this.doClose()},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.blank.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doClose,this),this.prevBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.moveLobby,this),this.prevBtn.addEventListener(mouse.MouseEvent.MOUSE_OVER,this.onMouseOver,this),this.prevBtn.addEventListener(mouse.MouseEvent.MOUSE_OUT,this.onMouseOut,this),this.nextBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.moveLobby,this),this.nextBtn.addEventListener(mouse.MouseEvent.MOUSE_OVER,this.onMouseOver,this),this.nextBtn.addEventListener(mouse.MouseEvent.MOUSE_OUT,this.onMouseOut,this),this.init()},t.prototype.moveLobby=function(e){var t="";if(null!=e&&(e.currentTarget==this.prevBtn?t="prev":e.currentTarget==this.nextBtn&&(t="next")),"prev"==t&&this.scroller.viewport.scrollH>0)this.scroller.viewport.scrollH0)for(var a=0;a0)for(var a=0;ar;r++){s=this.slotController.slotView.numOfSymbols[r],l=new Array;for(var i=0;i0&&a[i]>=r*s&&a[i]<(r+1)*s&&l.push(a[i]%s);c.push(l)}for(var u=new Array,p=0;p0&&this.data.ExplodeReelTotalCount++;this.data.ExplodeReelSymbolCount=u,this.data.ExplodeReelCount=0,this.data.symbolDelay=300,EventCentral.getInstance().addEventListener(SceneNotify.SYMBOL_EXPLODE_FINISHED,this.ExplodeFinished,this)}},t.prototype.IsNeed=function(e){return void 0===e&&(e=-1),this.data.ReelSymbolExplosionPositionArray.length>0?!0:!1},t.prototype.Execute=function(e,t){for(var n,i=new Array,o=0;o=10?0:o,n._playerTotalPoint+=o;for(i=2+n._resultPlayer.length;i=10?0:a,n._bankerTotalPoint+=a;return n._playerTotalPoint=n._playerTotalPoint%10,n._bankerTotalPoint=n._bankerTotalPoint%10,n}return __extends(t,e),t.prototype.destroy=function(){e.prototype.destroy.call(this),this._resultPlayer=null,this._resultBanker=null,this._playerTotalPoint=null,this._bankerTotalPoint=null},t.prototype.resultPlayer=function(){return this._resultPlayer},t.prototype.resultBanker=function(){return this._resultBanker},Object.defineProperty(t.prototype,"playerTotalPoint",{get:function(){return this._playerTotalPoint},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bankerTotalPoint",{get:function(){return this._bankerTotalPoint },enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"gameCode",{get:function(){return this._cmd.Remark},enumerable:!0,configurable:!0}),t}(AbstractBetLog);__reflect(BetLogBacc.prototype,"BetLogBacc");var BetlogColumnCell=function(e){function t(t){var n=e.call(this)||this;return n._field="",n._data=[],n._field=t,n.skinName="BetlogColumnCellSkin",n}return __extends(t,e),Object.defineProperty(t.prototype,"data",{set:function(e){this._data=e,this.refreshView()},enumerable:!0,configurable:!0}),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this);var t=new BetlogRowCell("BetlogRowTextSkin");this.cellList.addChild(t);for(var n=0;17>n;n++)t=new BetlogRowCell("result"==this._field?"BetlogRowResultSkin":"BetlogRowTextSkin"),this.cellList.addChild(t);switch(this.refreshView(),this._field){case"result":case"content":break;default:this.reduceDraw()}},t.prototype.reduceDraw=function(){GameLayer.GetInstance().scaleX>1||(this._sprite=new egret.Sprite,this._sprite.cacheAsBitmap=!0,this.cellList.parent.addChild(this._sprite),this._sprite.addChild(this.cellList))},t.prototype.refreshView=function(){if(this._data){var e=this.cellList.layout;e.clearVirtualLayoutCache();for(var t=0;t1)){var e=this.getChildByName("sprite");if(e)for(this._sprite=new egret.Sprite,this._sprite.cacheAsBitmap=!0,this.addChildAt(this._sprite,0);e;)this._sprite.addChild(e),e=this.getChildByName("sprite")}},t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.slot&&this.slot.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this)},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.slot&&this.slot.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this)},t.prototype.onBtnTap=function(e){if(e.currentTarget==this.slot)if(this._data.Slot){var t=this._data.Slot;window.open(t.GetSlotDetailUrl(),"BetLogDetail","width=900,height=500")}else this._data.Detail_URL&&window.open(this._data.Detail_URL.Url,this._data.Detail_URL.Title,"width="+this._data.Detail_URL.Width+",height=500")},Object.defineProperty(t.prototype,"data",{set:function(e){this._data=e,this.refreshView()},enumerable:!0,configurable:!0}),t.prototype.createImage=function(e){var t=new eui.Image(e);return t.scaleX=.4,t.scaleY=.4,t},t.prototype.refreshView=function(){if(this.textLabel&&(this._data.Text?(this.textLabel.text=this._data.Text,this._data.Color?this.textLabel.textColor=this._data.Color:this.textLabel.textColor=16777215,this._data.MaxLength&&(this.textLabel.maxLength=this._data.MaxLength)):this.textLabel.text=""),this.imageList){this.imageList.removeChildren();var e=this._data.Images;if(e)for(var t=0;tthis.viewport.contentWidth-this.width&&(this.viewport.scrollH=this.viewport.contentWidth-this.width),this.startSH=this.viewport.scrollH,this.startStageX=e.stageX}},t.prototype.updateDisplayList=function(t,n){e.prototype.updateDisplayList.call(this,t,n),this.validateNow(),this.viewport.contentWidth1)requestAnimationFrame(this.doTruncation.bind(this));else for(;this.textLabel.textWidth*this.textLabel.scaleX>this.width&&this.textLabel.text.length>4;)this.isTruncated=!0,this.textLabel.text=this.textLabel.text.substr(0,this.textLabel.text.length-4)+"...",this.textLabel.validateNow()},t.prototype.onMouseOver=function(e){if(this.isTruncated){var t=GameLayer.GetInstance().getChildByName("lbl_full");t&&GameLayer.GetInstance().removeChild(t);var n=new egret.Point(e.stageX/GameLayer.GetInstance().scaleX-e.localX+.5*this.width,e.stageY/GameLayer.GetInstance().scaleY-e.localY+.5*this.height),i=new egret.Point(.5*this.width+20,.5*(.5*this.height+30));t=new MouseHintPanel,t.setContent({Arrow:"bottom",Key:this.getHintStr(),Center:n,Offset:i}),t.name="lbl_full",GameLayer.GetInstance().AddObjectToLayer(t,Layer.UI)}},t.prototype.getHintStr=function(){if(0==this.maxLength)return this._text;for(var e=[],t=0;t11&&(this.curMonth-=12,this.curYear++),this.lblYear.text=this.curYear.toString(),this.lblMonth.text=Localization.Instance.getString("common.betlog.month")[this.curMonth],this.updateMonthPlan()},t.prototype.updateMonthPlan=function(){this.dateSelection.removeChildren();var e=this.curYear+"/"+(this.curMonth+1)+"/1",t=new Date(e);t.setDate(t.getDate()-t.getDay());for(var n=0;2>n;)for(var i=0;7>i;i++){if(1==t.getDate()&&n++,0==i&&n>1)return;var o=new DatePickerCell,e=t.getFullYear()+"/"+(t.getMonth()+1)+"/"+t.getDate();o.date=new Date(e),this.dateSelection.addChild(o),o.enabled=t.getMonth()==this.curMonth,o.enabled&&this._maxDate&&(o.enabled=t.getTime()<=this._maxDate.getTime()),o.enabled&&this._minDate&&(o.enabled=t.getTime()>=this._minDate.getTime()),o.start=this.isStart(o.date),o.end=this.isEnd(o.date),o.between=this.isBetween(o.date),o.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onDateSelect,this),t.setDate(t.getDate()+1)}},t.prototype.isStart=function(e){if(this._startDate){if(this.isSameDate(this._startDate,e))return!0}else if(this._endDate&&this._date&&this.isSameDate(this._date,e))return!0;return!1},t.prototype.isBetween=function(e){if(GameConfig.platform==Platform.desktop){if(this._startDate&&this._date){if(this._startDate.getTime()e.getTime())return!0}else if(this._endDate&&this._date&&this._date.getTime()e.getTime())return!0;return this._endDate||this._startDate||!this.isSameDate(this._date,e)?!1:!0}return this._startDate&&this._endDate&&this._startDate.getTime()t.getTime()&&(this.mPicker.maxDate=t),e.getTime()>this._date.getTime()?this._date=t:this._date.getTime()>t.getTime()&&(this._date=t),this._date.getTime()>this._maxDate.getTime()&&(this._date=this._maxDate),this.refreshView()}else this._toButton&&(this.mPicker.endDate=this._toButton.getDateTime());this.mPicker.date=this._date,this.pickerGroup?this.pickerGroup.addChild(this.mPicker):GameLayer.GetInstance().AddObjectToLayer(this.mPicker,Layer.UI),GameLayer.GetInstance().dispatchEventWith(DatePicker.EVENT_PICKER_SHOW,!1,this.mPicker)}},t.prototype.onDateSelected=function(e){this.mPicker&&(this.mPicker.removeEventListener(egret.Event.CHANGE,this.onDateSelected,this),this.mPicker=null),this._date=e.data,this.refreshView(),this._toButton&&this._toButton.doOpenPicker()},t.prototype.refreshView=function(){switch(this._dateFormatType){case 0:this.lblDate.text=CommonFunc.DateToString(this._date,!0,"-").toString()+" "+this._time;break;case 1:this.lblDate.text=CommonFunc.DateToString_DDMM(this._date,!0,"/").toString()}},t}(eui.Component);__reflect(DatePickerButton.prototype,"DatePickerButton");var DatePickerCell=function(e){function t(){var t=e.call(this)||this;return t._isStart=!1,t._isEnd=!1,t._isBetween=!1,t.skinName="DatePickerCellSkin",t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t}return __extends(t,e),t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.addEventListener(mouse.MouseEvent.MOUSE_OVER,this.onMouseOver,this),this.addEventListener(mouse.MouseEvent.MOUSE_OUT,this.onMouseOut,this)},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.removeEventListener(mouse.MouseEvent.MOUSE_OVER,this.onMouseOver,this),this.removeEventListener(mouse.MouseEvent.MOUSE_OUT,this.onMouseOut,this)},t.prototype.onMouseOver=function(e){CommonFunc.changeCursor("pointer")},t.prototype.onMouseOut=function(e){CommonFunc.changeCursor("auto")},Object.defineProperty(t.prototype,"date",{get:function(){return this._date},set:function(e){this._date=e,this.refreshView()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"start",{set:function(e){this._isStart=e,this.invalidateState()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"end",{set:function(e){this._isEnd=e,this.invalidateState()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"between",{set:function(e){this._isBetween=e,this.invalidateState()},enumerable:!0,configurable:!0}),t.prototype.refreshView=function(){this._date&&(this.textLabel.text=CommonFunc.FillZero(this._date.getDate(),2)),this.invalidateState()},t.prototype.getCurrentState=function(){var e=CommonFunc.TodayCalendarDate(),t=this._date.getFullYear()==e.getFullYear()&&this._date.getMonth()==e.getMonth()&&this._date.getDate()==e.getDate();return this.enabled?t?this._isStart?"start_today":this._isEnd?"end_today":this._isBetween?"selected":"today":this._isStart?"start":this._isEnd?"end":this._isBetween?"between":"up":this._isStart?t?"disabled_start_today":"disabled_start":this._isEnd?t?"disabled_end_today":"disabled_end":this._isBetween?"disabled_between":t?"disabled_today":"disabled"},t}(eui.Component);__reflect(DatePickerCell.prototype,"DatePickerCell");var BombingTypeScatterOneSecondEffect=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Evaluate=function(){this.data.FeatureSymbolArray=new Array,this.data.FeatureSymbolArray=SlotConfig.FeatureSymbolIDs,this.data.ScatterSymbolPosition=new Array,this.data.SoundCount=-1,EventCentral.getInstance().addEventListener(SceneNotify.SYMBOL_DROPIN_FINISHED,this.OnSymbolStopExecute,this)},t.prototype.IsNeed=function(e){void 0===e&&(e=-1),this.CheckFeatureAndCharging(this.data.FeatureSymbolArray);var t=this.CheckFeatureSymbols(e);return null!=t&&t.length>0?(this.data.ScatterSymbolPosition=t,!0):!1},t.prototype.Execute=function(e,t){void 0===t&&(t=null),this.data.symbol=t[0],this.slotController.slotView.GetStopReelOrderedReel(e).effectHandler.ExecuteEffect(SlotEffectCollection.bombingScatterOneSecond,this.data)},t.prototype.OnSymbolStopExecute=function(e){var t=e.data.reelId,n=e.data.symbol;n.currentId==SymbolType.Scatter&&this.Execute(t,[n])},t.prototype.CheckFeatureAndCharging=function(e){var t,n,i,o;this.data.ChargingArray=new Array(5);this.data.ChargingArray;for(t=0;t=this._totalRows)break;this._betLogs.push(BetLogFactory.createBetLog(e.Bet[t]))}this._betLogs.length>=this._totalRows&&(this._queryProcessing=!1,this.dispatchEvent(new egret.Event(egret.Event.COMPLETE)))}},Object.defineProperty(t.prototype,"betLogs",{get:function(){return this._betLogs},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"getFromDate",{get:function(){return this._fromStr},enumerable:!0,configurable:!0}),t}(egret.EventDispatcher);__reflect(BetLogModel.prototype,"BetLogModel");var BetLogSlot=function(e){function t(t){return e.call(this,t)||this}return __extends(t,e),Object.defineProperty(t.prototype,"gameCode",{get:function(){return this._cmd.Remark},enumerable:!0,configurable:!0}),t}(AbstractBetLog);__reflect(BetLogSlot.prototype,"BetLogSlot");var GlobalData;!function(e){e.chips=[{text:"1",value:1,icon:"chip_red_png"},{text:"2",value:2,icon:"chip_blue_png"},{text:"5",value:5,icon:"chip_light_green_png"},{text:"10",value:10,icon:"chip_green_png"},{text:"20",value:20,icon:"chip_magenta_png"},{text:"50",value:50,icon:"chip_violet_png"},{text:"100",value:100,icon:"chip_purple_png"},{text:"200",value:200,icon:"chip_orange_png"},{text:"500",value:500,icon:"chip_tiffany_png"},{text:"1000",value:1e3,icon:"chip_black_png"}],e.selectedChips=[{text:"1",value:1,icon:"chip_red_png"},{text:"2",value:2,icon:"chip_blue_png"},{text:"10",value:10,icon:"chip_green_png"},{text:"20",value:20,icon:"chip_magenta_png"},{text:"200",value:200,icon:"chip_orange_png"}],e.availableChips=[1e3,500,150,50,10,5,1],e.currentChips=0,e.lobbyViewMode=0,e.multiViewMode=0,e.isPlayerChipInput=!1,e.bets=new eui.ArrayCollection,e.colors={red:13041664,blue:2961585,lightblue:3760871,green:37635,darkgreen:1663584,golden:12821621,yellow:16776960,black:7566195,simpleplay:16069439},e.langauge=[{name:"简体中文",code:"cn",voice:0},{name:"繁體中文",code:"zh",voice:0},{name:"ENGLISH",code:"en",voice:4},{name:"日本語",code:"jp",voice:4},{name:"ไทย",code:"th",voice:4},{name:"tiếng việt",code:"vn",voice:4},{name:"Bahasa Indonesia",code:"id",voice:4},{name:"한국어",code:"kr",voice:6}]}(GlobalData||(GlobalData={})); var HistItem=function(){function e(){this.row_index=0,this.typename="",this.typeid=0,this.gametype=0,this.bet_id="",this.round=0,this.bet_type=0,this.txt_bet_type="",this.shoes=0,this.host_id=0,this.start_bal=0,this.bet_amount=0,this.bet_result=0,this.win_lose=0,this.balance=0,this.state=-1,this.on_going=0,this.gameCode="",this.gameTypeInRemark="",this.playerTotalPoint=0,this.bankerTotalPoint=0,this.ft_result_no=0}return e.rank=function(e){return(e-1)%13},e.suit=function(e){return(e-1)/13},e.prototype.reset=function(){this.typename="",this.host_id=0,this.gametype=0,this.bet_id="",this.date=null,this.game="",this.shoes=0,this.round=0,this.txt_bet_type="",this.bet_type=-1,this.start_bal=0,this.balance=0,this.bet_amount=0,this.win_lose=0,this.state=-1,this.on_going=0,this.gameTypeInRemark=""},e.prototype.find_partner_game_name=function(e){var t="",n="partnergame."+e;return t=Localization.Instance.getString(n),t==n?e:t},e.prototype.find_pvp_game_name=function(e){var t="",n="partnergame."+e;return t=Localization.Instance.getString(n),t==n?e:Localization.Instance.getString("common.betlog.pvp")+t},e.prototype.find_game_name=function(e){var t="",n="slotgame."+e;return t=Localization.Instance.getString(n),t==n?e:t},e.prototype.find_mini_game=function(e){var t="",n="minigame."+e;return t=Localization.Instance.getString(n),t==n?e:t},e.find_table_index=function(e){var t=[1,2,3,0,5,6,7,8,9,10,11,0,0,0,1,2,6,7];return 318>=e&&e>=301?t[e-301]:e-600},e.prototype.load=function(t){if(t){var n=Localization.Instance.getString("betlog");this.bet_id=t.betID.toString(),this.gametype=t.gameType,this.date=t.date,this.bet_type=t.betType,this.bet_result=t.resultAmount,this.bet_amount=t.betAmount,this.win_lose=this.bet_result,this.balance=t.balance,this.state=t.state,this.start_bal=t.balance-this.win_lose,this.gameCode=this.getGameCode(t,n),this.gameName=this.getGameName(t,n),3==this.state&&this.gametype!=e.TID_PARTNER_GAME?this.on_going=1:this.on_going=0;var i=0;switch(t.gameType){case 1:case 4096:i=this.typeBacc(t,n);break;case GameType.LineBase:i=this.typeSlot(t,n);break;default:i=e.TID_SLOT,this.typename="UNC"}this.typeid=i}},e.prototype.typeBacc=function(t,n){var i=t,o=e.TID_BACC;return this.typename=e.TYP_BACC,this.result_banker=i.resultBanker().slice(),this.result_player=i.resultPlayer().slice(),this.playerTotalPoint=Number(i.playerTotalPoint),this.bankerTotalPoint=Number(i.bankerTotalPoint),this.gameName=Localization.Instance.getString("common.betlog.gametype")[0]+" - "+i.gameCode,this.gameTypeInRemark="BACC",o},e.prototype.composeSicboBetText=function(e,t){return t.bet_sicbo[e]},e.prototype.composeFantanBetText=function(e,t){if(2>e)return t.bet_fantan[e];if(6>e)return e+=-1,e.toString()+t.bet_fantan[2];if(10>e)return e+=-5,e.toString()+t.bet_fantan[3];if(22>e){e-=10;var n=[2,3,4,1,3,4,1,2,4,1,2,3];return Math.floor(e/3).toString()+t.bet_fantan[4]+n[e]}if(26>e){e-=22;var n=[12,41,23,34];return t.bet_fantan[5]+n[e]}if(29>e){e-=26;var n=[23,24,34];return t.bet_fantan[6]+n[e]}if(32>e){e-=29;var n=[13,14,34];return t.bet_fantan[7]+n[e]}if(35>e){e-=32;var n=[12,14,24];return t.bet_fantan[8]+n[e]}if(38>e){e-=35;var n=[12,13,23];return t.bet_fantan[9]+n[e]}if(42>e){e-=38;var n=[123,124,134,234];return t.bet_fantan[10]+n[e]}return"undefined"},e.prototype.typeSlot=function(t,n){var i=t,o=e.TID_SLOT;return this.typename=e.TYP_SLOT,this.txt_bet_type="-",this.game=n.gametype[o]+" - "+this.find_game_name(i.gameCode),o},e.prototype.getGameCode=function(e,t){var n=e;return n.gameCode},e.prototype.typeSlotName=function(e,t){var n=e;this.txt_bet_type="-";var i=Localization.Instance.getString("common.betlog.gametype")[5]+" - ",o="";if(null!=GameConfig.gameListDetail.gamelist){for(var a=0;a0?Localization.Instance.getString("common.betlog.bet_lottery")[0]:this.bet_result>0?Localization.Instance.getString("common.betlog.bet_lottery")[1]:Localization.Instance.getString("common.betlog.bet_lottery")[2];if(0!=this.on_going);else if(this.typeid==e.TID_BLACKJACK)switch(this.bj_stateResult){case BetLogState.WIN:return Localization.Instance.getString("common.betlog.win");case BetLogState.LOSE:return Localization.Instance.getString("common.betlog.lose");case BetLogState.TIE:return Localization.Instance.getString("common.betlog.push");case BetLogState.REFUND:return Localization.Instance.getString("common.betlog.refund")}else{if(this.typeid!=e.TID_PARTNER_GAME)return this.win_lose<0?Localization.Instance.getString("common.betlog.lose"):0==this.win_lose?Localization.Instance.getString("common.betlog.tie"):Localization.Instance.getString("common.betlog.win");var t=15035328e5;if(this.date.getTime()=0?Localization.Instance.getString("common.betlog.bet_partner")[this.bet_type]:"";switch(this.state){case BetLogState.WIN:return Localization.Instance.getString("common.betlog.win");case BetLogState.LOSE:return Localization.Instance.getString("common.betlog.lose");case BetLogState.TIE:return Localization.Instance.getString("common.betlog.tie")}}return""},e.prototype.getResultDetail=function(){var t={};if(""==this.bet_id)return t;if(this.on_going)this.typeid==e.TID_LOTTERY||(t.Text=Localization.Instance.getString("common.betlog.on_going"));else if(this.typeid==e.TID_BACC){for(var n=[],i=[],o=Math.max(this.result_player.length,this.result_banker.length),a=0;o>a;a++)this.pushCardImgs(this.result_player[a],n),this.pushCardImgs(this.result_banker[a],i);t.Player=n,t.Banker=i,t.Bacc=this}else t.Slot=this;return t},e.prototype.GetSlotDetailUrl=function(){var t;return this.typeid==e.TID_LIARDICE||(t=GameConfig.BL_SLOT_DETAIL_URL+this.GetBetLogDetailInput()),t},e.prototype.GetBetLogDetailInput=function(){var e=new Date(Date.now()),t=CommonFunc.DateToString(e,!0,"-")+"T"+CommonFunc.TimeToString(e,!0,":");console.log(t);var n;switch(Localization.Instance.currentLanguage){case 0:n="zh_CN";break;case 1:n="en";break;case 2:n="zh_TW";break;case 3:n="kr";break;case 4:n="jp";break;case 5:n="th";break;case 6:n="vn";break;case 7:n="id"}var i="time="+t+"&betid="+this.bet_id+"&lang="+n+"&gameCd="+this.gameCode,o=DESEncrypt.encrypt(i,GameConfig.BL_SLOT_DETAIL_KEY);return o=encodeURIComponent(o)},e.prototype.getContent=function(){if(this.typeid==e.TID_LOTTERY){if(this.lot_bet_rounds>1){var t=Localization.Instance.getString("common.betlog.lot_bet_content",this.lot_bet_remain,this.lot_bet_rounds);return t+="\n"+this.lot_bet_content}return this.lot_bet_content}if(this.typeid==e.TID_LOT_SIDEBET)return this.lot_bet_content;if(this.typeid==e.TID_BLACKJACK)switch(this.bj_contentResult){default:return"-"}return this.txt_bet_type},e.prototype.pushCardImgs=function(e,t){e>=0&&t.push("blcard_"+CommonFunc.FillZero(e+1,3))},e.prototype.getWinLose=function(){var t={};return""==this.bet_id?t:(this.typeid==e.TID_BACC||this.typeid==e.TID_FANTAN||this.typeid==e.TID_ROULETTE||this.typeid==e.TID_SICBO||this.typeid==e.TID_DT||this.typeid==e.TID_LOTTERY||this.typeid==e.TID_LOT_SIDEBET,this.on_going||(t.Text=StringUtil.numberFormat(this.win_lose/100).toString(),this.win_lose<0?t.Color=GlobalData.colors.red:0==this.win_lose?t.Color=GlobalData.colors.yellow:t.Color=16777215),t)},e.prototype.getBalanceStr=function(){return this.on_going?"":StringUtil.numberFormat(this.balance/100).toString()},e.prototype.getStartBalance=function(){return this.on_going?"":StringUtil.numberFormat(this.start_bal/100).toString()},e.TYP_BACC="BACC",e.TYP_DT="DT",e.TYP_LOTTERY="LOT",e.TYP_SLOT="SLOT",e.TYP_SICBO="SICBO",e.TYP_FANTAN="FANTAN",e.TYP_ROULETTE="ROUL",e.TYP_MINIGAME="MINIGAME",e.TYP_LOT_SIDEBET="SIDEBET",e.TYP_BLACKJACK="BLACKJACK",e.TYP_PARTNER_GAME="PARTNER_GAME",e.TYP_LIARDICE="LIARDICE",e.TID_BACC=0,e.TID_DT=1,e.TID_SICBO=2,e.TID_FANTAN=3,e.TID_ROULETTE=4,e.TID_SLOT=5,e.TID_LOTTERY=6,e.TID_MINIGAME=7,e.TID_LOT_SIDEBET=8,e.TID_BLACKJACK=9,e.TID_PARTNER_GAME=10,e.TID_LIARDICE=11,e}();__reflect(HistItem.prototype,"HistItem");var GlobalEvent=function(e){function t(t,n,i){return void 0===n&&(n=!1),void 0===i&&(i=!1),e.call(this,t,n,i)||this}return __extends(t,e),t.LANGUAGE_CHANGED="languageChanged",t.TABLE_CHANGED="tableChanged",t.SCENE_LOAD="SCENE_LOAD",t.SCENE_RES_LOADED="SCENE_RES_LOADED",t.BET_RESUTL_MSG="BET_RESUTL_MSG",t.SERVER_ALREADY_DISCONNECT="SERVER_ALREADY_DISCONNECT",t.USER_TOUCH_BET="USER_TOUCH_BET",t.USER_TOUCH_ACTION="USER_TOUCH_ACTION",t}(egret.Event);__reflect(GlobalEvent.prototype,"GlobalEvent");var CMDBetLog=function(){function e(){this.BetID=0,this.UTCSecond=0,this.HostID=0,this.GameType=0,this.GameCount=0,this.Result="",this.WinSlot=0,this.BetType=0,this.BetAmount=0,this.ResultAmount=0,this.Balance=0,this.State=0,this.Remark=""}return e.prototype.fromBytes=function(e){this.BetID=BitwiseUtil.readInt53(e),this.UTCSecond=BitwiseUtil.readInt53(e),this.HostID=BitwiseUtil.readUint(e,2),this.GameType=BitwiseUtil.readInt53(e),this.GameCount=BitwiseUtil.readUint(e,4),this.Result=BitwiseUtil.readString(e),this.WinSlot=BitwiseUtil.readInt53(e),this.BetType=BitwiseUtil.readUint(e,1),this.BetAmount=BitwiseUtil.readInt53(e),this.ResultAmount=BitwiseUtil.readInt53(e),this.Balance=BitwiseUtil.readInt53(e),this.State=BitwiseUtil.readUint(e,1),this.Remark=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.BetID),BitwiseUtil.writeInt53(e,this.UTCSecond),BitwiseUtil.writeUint(e,this.HostID,2),BitwiseUtil.writeInt53(e,this.GameType),BitwiseUtil.writeUint(e,this.GameCount,4),BitwiseUtil.writeString(e,this.Result),BitwiseUtil.writeInt53(e,this.WinSlot),BitwiseUtil.writeUint(e,this.BetType,1),BitwiseUtil.writeInt53(e,this.BetAmount),BitwiseUtil.writeInt53(e,this.ResultAmount),BitwiseUtil.writeInt53(e,this.Balance),BitwiseUtil.writeUint(e,this.State,1),BitwiseUtil.writeString(e,this.Remark),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="BetID(Q)="+this.BetID+" ",e+="UTCSecond(Q)="+this.UTCSecond+" ",e+="HostID(W)="+this.HostID+" ",e+="GameType(Q)="+this.GameType+" ",e+="GameCount(D)="+this.GameCount+" ",e+="Result(S)="+this.Result+" ",e+="WinSlot(Q)="+this.WinSlot+" ",e+="BetType(B)="+this.BetType+" ",e+="BetAmount(Q)="+this.BetAmount+" ",e+="ResultAmount(Q)="+this.ResultAmount+" ",e+="Balance(Q)="+this.Balance+" ",e+="State(B)="+this.State+" ",e+="Remark(S)="+this.Remark+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"BetLog"},e}();__reflect(CMDBetLog.prototype,"CMDBetLog",["ICommand"]);var CMDPsBetLogQuery=function(){function e(){this.FromDate="",this.ToDate=""}return e.prototype.fromBytes=function(e){this.FromDate=BitwiseUtil.readString(e),this.ToDate=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeString(e,this.FromDate),BitwiseUtil.writeString(e,this.ToDate),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="FromDate(S)="+this.FromDate+" ",e+="ToDate(S)="+this.ToDate+" "},e.prototype.getCmdID=function(){return 55007},e.prototype.getCmdName=function(){return"PsBetLogQuery"},e}();__reflect(CMDPsBetLogQuery.prototype,"CMDPsBetLogQuery",["ICommand"]);var CMDSimplayBetLog=function(){function e(e){void 0===e&&(e=null),this.BetID=0,this.UTCSecond=0,this.GameType=0,this.BetType=0,this.BetAmount=0,this.ResultAmount=0,this.Balance=0,this.State=0,this.Remark="",this.Result="",this.HostID=0,this.GameCount=0,this.GameID=0,this.IsAutoBet=0,this.WinSlot=0,this.Socket=e}return e.prototype.fromBytes=function(e){this.BetID=BitwiseUtil.readInt53(e),this.UTCSecond=BitwiseUtil.readInt53(e),this.GameType=BitwiseUtil.readInt53(e),this.BetType=BitwiseUtil.readUint(e,1),this.BetAmount=BitwiseUtil.readInt53(e),this.ResultAmount=BitwiseUtil.readInt53(e),this.Balance=BitwiseUtil.readInt53(e),this.State=BitwiseUtil.readUint(e,1),this.Remark=BitwiseUtil.readString(e),this.Result=BitwiseUtil.readString(e)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeInt53(e,this.BetID),BitwiseUtil.writeInt53(e,this.UTCSecond),BitwiseUtil.writeInt53(e,this.GameType),BitwiseUtil.writeUint(e,this.BetType,1),BitwiseUtil.writeInt53(e,this.BetAmount),BitwiseUtil.writeInt53(e,this.ResultAmount),BitwiseUtil.writeInt53(e,this.Balance),BitwiseUtil.writeUint(e,this.State,1),BitwiseUtil.writeString(e,this.Remark),BitwiseUtil.writeString(e,this.Result),e},e.prototype.clone=function(){var t=new e(this.Socket);return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="BetID(Q)="+this.BetID+" ",e+="UTCSecond(Q)="+this.UTCSecond+" ",e+="GameType(Q)="+this.GameType+" ",e+="BetType(B)="+this.BetType+" ",e+="BetAmount(Q)="+this.BetAmount+" ",e+="ResultAmount(Q)="+this.ResultAmount+" ",e+="Balance(Q)="+this.Balance+" ",e+="State(B)="+this.State+" ",e+="Remark(S)="+this.Remark+" ",e+="Result(S)="+this.Result+" "},e.prototype.getCmdID=function(){return 0},e.prototype.getCmdName=function(){return"SimplayBetLog"},e}();__reflect(CMDSimplayBetLog.prototype,"CMDSimplayBetLog",["ICommand"]);var CMDSpBetLogQuery=function(){function e(){this.Bet=new Array}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,4);t-->0;){var n=new CMDBetLog;n.fromBytes(e),this.Bet.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Bet.length,4);for(var t in this.Bet){var n=this.Bet[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="Bet_size(D)="+this.Bet.length+" ",e+="Bet(CMDBetLog)=[";for(var t in this.Bet)t>0&&(e+=", "),e+=this.Bet[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 50010},e.prototype.getCmdName=function(){return"SpBetLogQuery"},e}();__reflect(CMDSpBetLogQuery.prototype,"CMDSpBetLogQuery",["ICommand"]);var CMDSpBetLogQueryTotal=function(){function e(){this.TotalRow=0}return e.prototype.fromBytes=function(e){this.TotalRow=BitwiseUtil.readUint(e,4)},e.prototype.toBytes=function(){var e=new egret.ByteArray;return e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.TotalRow,4),e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";return e+="TotalRow(D)="+this.TotalRow+" "},e.prototype.getCmdID=function(){return 50025},e.prototype.getCmdName=function(){return"SpBetLogQueryTotal"},e}();__reflect(CMDSpBetLogQueryTotal.prototype,"CMDSpBetLogQueryTotal",["ICommand"]);var CMDSpSimplayBetLogQuery=function(){function e(){this.Bet=new Array}return e.prototype.fromBytes=function(e){for(var t=BitwiseUtil.readUint(e,4);t-->0;){var n=new CMDSimplayBetLog;n.fromBytes(e),this.Bet.push(n)}},e.prototype.toBytes=function(){var e=new egret.ByteArray;e.endian=egret.Endian.LITTLE_ENDIAN,BitwiseUtil.writeUint(e,this.Bet.length,4);for(var t in this.Bet){var n=this.Bet[t].toBytes();BitwiseUtil.writeBytes(n,e)}return e},e.prototype.clone=function(){var t=new e;return t.fromBytes(this.toBytes()),t},e.prototype.toString=function(){var e="";e+="Bet_size(D)="+this.Bet.length+" ",e+="Bet(CMDSimplayBetLog)=[";for(var t in this.Bet)t>0&&(e+=", "),e+=this.Bet[t].toString();return e+="] "},e.prototype.getCmdID=function(){return 52102},e.prototype.getCmdName=function(){return"SpSimplayBetLogQuery"},e}();__reflect(CMDSpSimplayBetLogQuery.prototype,"CMDSpSimplayBetLogQuery",["ICommand"]);var PopupDetail=function(){function e(e,t){this.msgKey=e,this.balance=t}return e}();__reflect(PopupDetail.prototype,"PopupDetail");var POPUP_TYPE;!function(e){e[e.ALERT=0]="ALERT",e[e.CONFIRM=1]="CONFIRM",e[e.POPUP=2]="POPUP"}(POPUP_TYPE||(POPUP_TYPE={}));var PopUpPanel=function(e){function t(t,n){var i=e.call(this)||this;return n==POPUP_TYPE.ALERT?i.skinName="AlertSkin":n==POPUP_TYPE.CONFIRM?i.skinName="ConfirmSkin":n==POPUP_TYPE.POPUP&&(i.skinName="PopUpPanelSkin"),i._text=t,i}return __extends(t,e),Object.defineProperty(t.prototype,"textAlign",{get:function(){return this.textLabel?this.textLabel.textAlign:""},set:function(e){this.textLabel&&(this.textLabel.textAlign=e)},enumerable:!0,configurable:!0}),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.textLabel&&(this.textLabel.text=this._text),this.confirmBtn&&this.confirmBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnClick,this),this.cancelBtn&&this.cancelBtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnClick,this),this.dialogContent&&EffectUtils.backOut(this.dialogContent,300)},t.prototype.onBtnClick=function(e){e.currentTarget==this.confirmBtn?this.dispatchEvent(new egret.Event(t.POPUP_CONFIRM_BUTTON_CLICK)):e.currentTarget==this.cancelBtn&&this.dispatchEvent(new egret.Event(t.POPUP_CANCEL_BUTTON_CLICK)),this.parent&&this.parent.removeChild(this)},t.POPUP_CONFIRM_BUTTON_CLICK="POPUP_CONFIRM_BUTTON_CLICK",t.POPUP_CANCEL_BUTTON_CLICK="POPUP_CANCEL_BUTTON_CLICK",t}(eui.Component);__reflect(PopUpPanel.prototype,"PopUpPanel");var LoadingUI=function(e){function t(){var t=e.call(this)||this;return t.createView(),t}return __extends(t,e),t.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"},t.prototype.setProgress=function(e,t){this.textField.text="Loading..."+e+"/"+t},t}(egret.Sprite);__reflect(LoadingUI.prototype,"LoadingUI");var CClassSpinActionPanel=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Init=function(){if(this.skinName=Desktop.SpinActionPanelSkin,this.spinbtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onSpinPressed,this),this.stopbtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onStopPressed,this),this.maxbetbtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onMaxBetPressed,this),this.autoplaybtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.setAutoMenu,this),this.stopautobtn.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onStopAutoPressed,this),this.autoPopupMenu)for(var e=0;e=4&&(a=4),a=CommonFunc.getPrizeNumToStr(a),this.prizeImg.source=a+"_"+this.lang+"_png",1==r?t=Localization.Instance.getString("common.campaign.awradFreeSpins").replace("$v",s):2==r&&(t=Localization.Instance.getString("common.campaign.awradCredits").replace("$v",s)),this.lblValue.text=t,this.awardLbl1.text=Localization.Instance.getString("common.campaign.awardLbl1"),this.awardLbl2.text=Localization.Instance.getString("common.campaign.awardLbl2"),this.awardLbl3.text=Localization.Instance.getString("common.campaign.awardLbl3"),this.prizeID.text=Localization.Instance.getString("common.campaign.awardPrizeID")+i,this.time.text=Localization.Instance.getString("common.campaign.awardTime")+CommonFunc.getDateByTimestamp(1e3*o,"(UTC+8)")}this.startAnimation()},t.prototype.enterFrame=function(e){this.animation&&(this.animation.isPlaying||this.animation.gotoAndPlay(0,3))},t.prototype.startAnimation=function(){GameConfig.platform==Platform.mobile?egret.Tween.get(this.popupGroup).to({scaleX:1.4,scaleY:1.4},200,egret.Ease.quintOut).to({scaleX:1.3,scaleY:1.3},200,egret.Ease.quintOut):egret.Tween.get(this.popupGroup).to({scaleX:1.1,scaleY:1.1},200,egret.Ease.quintOut).to({scaleX:1,scaleY:1},200,egret.Ease.quintOut)},t.prototype.getLangCode=function(){switch(Localization.Instance.currentLanguage){case Language.SimplifiedChinese:return"cn";case Language.English:return"en";case Language.TraditionalChinese:return"zh";case Language.Korean:return"kr";case Language.Japanese:return"jp";case Language.Thai:return"th";case Language.Vietnam:return"vn";case Language.Indonesia:return"id";default:return"en"}},t}(eui.Component);__reflect(CampaignAward.prototype,"CampaignAward");var CampaignDetailsPanel=function(e){function t(){var t=e.call(this)||this;return t.lang="",t.name="CampaignDetailsPanel",t.skinName="CampaignDetailsPanelSkin",t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t}return __extends(t,e),t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.btnLeft.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnRight.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.controlLeftRight("left")},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.btnLeft.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnRight.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.onLanguageChanged(),this.setData()},t.prototype.onBtnTap=function(e){var t=e.currentTarget;if("disabled"!=t.currentState)switch(t){case this.btnLeft:this.controlLeftRight("left");break;case this.btnRight:this.controlLeftRight("right")}},t.prototype.setData=function(){if(SocketManager.getInstance().GetData().campaignDetailsData)for(var e,t,n,i,o,a,r,s,l,h=SocketManager.getInstance().GetData().campaignDetailsData,c=0;c=i){var l=new eui.HorizontalLayout;l.horizontalAlign="center",this.tableList.layout=l}}else this.noRecordGroup.visible=!0},t.prototype.onBtnTap=function(e){CommonFunc.log(e.currentTarget);var t=e.currentTarget;if(t.lobbyCode)if(CommonFunc.log("Game Code "+t.lobbyCode),t.lobbyCode==GameConfig.GameCode)CommonFunc.log("same Game");else{EventCentral.getInstance().addEventListener(SysNotify.TOKEN_READY,this.onTokenReceived,this),this.switchGameWithGameCode(t.lobbyCode),CommonFunc.log("OTHER GAME!!!!!!!!!!!!!!!!!!!!!!!!!"),EventCentral.getInstance().dispatchEventWith(MiniLobby.SWITCH_GAME,!0);SocketManager.getInstance().SendRequestEGameTokenAction(t.lobbyCode)}},t.prototype.GetCMSGamelistOrder=function(e){for(var t=[],n=GameConfig.cmsDataJson.game_list,i=0;i=this.scroller.viewport.contentHeight?1==this.gradient.visible&&(this.gradient.visible=!1):0==this.gradient.visible&&(this.gradient.visible=!0)},t.prototype.onLanguageChanged=function(){this.lblNoRecord.text=Localization.Instance.getString("common.campaign.no_record_found")},t}(eui.Component);__reflect(CampaignInvolvedGamesPanel.prototype,"CampaignInvolvedGamesPanel");var CampaignPanel=function(e){function t(t,n){void 0===t&&(t=0),void 0===n&&(n=0);var i=e.call(this)||this;return i.lang="",i.allLabel=null,i.eventID=0,i.popup=0,i.newPopup=0,i.name="CampaignPanel",i.skinName="CampaignPanelSkin",i.eventID=t,i.popup=i.newPopup=n,i.addEventListener(egret.Event.ADDED_TO_STAGE,i.doInit,i),i.addEventListener(egret.Event.REMOVED_FROM_STAGE,i.doRelease,i),i}return __extends(t,e),t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),RES.addEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),Localization.Instance.addEventListener(GlobalEvent.LANGUAGE_CHANGED,this.onLanguageChanged,this),this.btnClose.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnClose2.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnbackMain.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnDetails.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnWinnerList.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnInvolvedGames.addEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),EventCentral.getInstance().addEventListener(SceneNotify.CAMPAIGN_WINNERLIST_RECEIVED,this.createWinnerList,this)},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),RES.removeEventListener(RES.ResourceEvent.GROUP_COMPLETE,this.onResourceLoadComplete,this),Localization.Instance.addEventListener(GlobalEvent.LANGUAGE_CHANGED,this.onLanguageChanged,this),this.btnClose.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnClose2.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnbackMain.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnDetails.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnWinnerList.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this),this.btnInvolvedGames.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.onBtnTap,this)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.allGroup=[this.mainGroup,this.detailsGroup,this.winnerListGroup,this.involvedGamesGroup],this.allLabel={1:"details",2:"winnerList",3:"involvedGames"},this.onLanguageChanged()},t.prototype.onLanguageChanged=function(){this.lang=this.getLangCode(),RES.hasRes("campaign_christmas_title_"+this.lang+"_png")?this.eventTitle.source="campaign_christmas_title_"+this.lang+"_png":this.eventTitle.source="campaign_christmas_title_en_png",RES.hasRes("campaign_event_image_"+this.lang+"_jpg")?this.eventImg.source="campaign_event_image_"+this.lang+"_jpg":this.eventImg.source="campaign_event_image_en_jpg",RES.isGroupLoaded("CampaignEvent")?this.createMain():RES.loadGroup("CampaignEvent"),this.eventSubTitle.text=Localization.Instance.getString("common.campaign.subTitle"),this.lblTotal.text=Localization.Instance.getString("common.campaign.total"),this.lblDontShow.text=Localization.Instance.getString("common.campaign.dontShowAgain")},t.prototype.onResourceLoadComplete=function(e){"CampaignEvent"==e.groupName&&this.createMain()},t.prototype.onBtnTap=function(e){var t=e.currentTarget;switch(t){case this.btnClose:case this.btnClose2:this.doClose();break;case this.btnbackMain:this.controlGroupVisible(0);break;case this.btnDetails:this.createDetails();break;case this.btnWinnerList:SocketManager.getInstance().SendRequestCampaignWinnerListAction(SocketManager.getInstance().GetData().campaignList[SocketManager.getInstance().GetData().campaignList.length-1].CampaignID);break;case this.btnInvolvedGames:this.createInvolvedGames();break;case this.btnDontShowAgain:this.newPopup=1==this.newPopup?0:1}},t.prototype.doClose=function(){this.parent&&(this.popup!=this.newPopup,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.ENABLE_ALL_BUTTON)),this.parent.removeChild(this))},t.prototype.createMain=function(){if(this.controlGroupVisible(0),this.prizeGroup.removeChildren(),SocketManager.getInstance().GetData().campaignDetailsData){for(var e,t,n,i,o,a=SocketManager.getInstance().GetData().campaignDetailsData,r=0;r=2));r++);o=new Label,o.size=40,o.scaleX=.5,o.scaleY=.5,o.text=Localization.Instance.getString("common.campaign.andMore"),this.prizeGroup.addChild(o)}},t.prototype.createDetails=function(){if(this.controlGroupVisible(1),this.detailsGroup.removeChildren(),SocketManager.getInstance().GetData().campaignDetailsData){var e=new CampaignDetailsPanel;this.detailsGroup.addChild(e)}},t.prototype.createWinnerList=function(){if(this.controlGroupVisible(2),this.winnerListGroup.removeChildren(),SocketManager.getInstance().GetData().campaignWinnerListData){var e=new CampaignWinnerListPanel;this.winnerListGroup.addChild(e)}},t.prototype.createInvolvedGames=function(){if(this.controlGroupVisible(3),this.involvedGamesGroup.removeChildren(),SocketManager.getInstance().GetData().campaignInvolvedGamesData){var e=new CampaignInvolvedGamesPanel;this.involvedGamesGroup.addChild(e)}},t.prototype.controlGroupVisible=function(e){void 0===e&&(e=0),0==e?this.titleGroup.visible=!1:(this.titleGroup.visible=!0,this.allLabel[e]?this.lblTitle.text=Localization.Instance.getString("common.campaign."+this.allLabel[e]):this.lblTitle.text="",this.lblTitle.bold=!0);for(var t=0;t0,r=this._isImg&&this._isImg.length>0,s=0;n>s;s++){e=this._data[s];var l=new eui.Group;if(a&&this._childWidth[s]?l.width=this._childWidth[s]:(s==n-1?t=100-o:(o+=i,t=i),l.percentWidth=t),l.percentHeight=100,r&&this._isImg[s]&&1==this._isImg[s]){var h=new eui.Image;h.horizontalCenter=0,h.verticalCenter=0,h.scaleX=.5,h.scaleY=.5,h.source=e+"_png",l.addChild(h)}else{var c=new Label;c.text=e,c.horizontalCenter=0,c.verticalCenter=0,c.scaleX=.5,c.scaleY=.5,c.size=this._lblSize,l.addChild(c)}this.colGroup.addChild(l)}},Object.defineProperty(t.prototype,"childWidth",{set:function(e){this._childWidth=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"lblSize",{set:function(e){this._lblSize=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isImg",{set:function(e){this._isImg=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"data",{set:function(e){this._data=e,this.setData()},enumerable:!0,configurable:!0}),t}(eui.Component);__reflect(CampaignWinnerListColumn.prototype,"CampaignWinnerListColumn");var CampaignWinnerListPanel=function(e){function t(){var t=e.call(this)||this;return t.name="CampaignWinnerListPanel",t.skinName="CampaignWinnerListPanelSkin",t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t}return __extends(t,e),t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.scroller.addEventListener(egret.Event.CHANGE,this.onScrollerChange,this),this.scroller.addEventListener(mouse.MouseEvent.WHEEL,this.onScrollerChange,this),Localization.Instance.addEventListener(GlobalEvent.LANGUAGE_CHANGED,this.onLanguageChanged,this)},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.scroller.removeEventListener(egret.Event.CHANGE,this.onScrollerChange,this),this.scroller.removeEventListener(mouse.MouseEvent.WHEEL,this.onScrollerChange,this),Localization.Instance.addEventListener(GlobalEvent.LANGUAGE_CHANGED,this.onLanguageChanged,this)},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.onLanguageChanged(),this.createList()},t.prototype.createList=function(){if(this.tableList.removeChildren(),this.noRecordGroup.visible=!1,SocketManager.getInstance().GetData().campaignWinnerListData)for(var e,t,n,i,o,a,r=SocketManager.getInstance().GetData().campaignWinnerListData,s=r.length,l=SocketManager.getInstance().GetData().playerID,h=this.titleGroup.width,c=62,u=0;s>u;u++)e=r[u],o=CommonFunc.getPrizeNumToStr(e.Prize),a=e.PlayerID,i=CommonFunc.changePlayerName(e.MaskedName,a),n=new CampaignWinnerListColumn,t=[o,i],n.isImg=[1,0],n.childWidth=[300,600],n.lblSize=40,n.data=t,n.width=h,n.height=c,a==l?n.currentState="highLight":n.currentState="state"+u%2,this.tableList.addChild(n);else this.noRecordGroup.visible=!0},t.prototype.onScrollerChange=function(){this.scroller.viewport.scrollV+this.scroller.height>=this.scroller.viewport.contentHeight?1==this.gradient.visible&&(this.gradient.visible=!1):0==this.gradient.visible&&(this.gradient.visible=!0)},t.prototype.onLanguageChanged=function(){this.lblPrize.text=Localization.Instance.getString("common.campaign.prize"),this.lblPlayerName.text=Localization.Instance.getString("common.campaign.wlPlayerName"),this.lblNoRecord.text=Localization.Instance.getString("common.campaign.no_record_found"),this.lblSubTitle.text=Localization.Instance.getString("common.campaign.winnerListSubTitle")},t}(eui.Component);__reflect(CampaignWinnerListPanel.prototype,"CampaignWinnerListPanel");var FixedReelEffect=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Execute=function(e,t){var n=new Array,i=(SlotConfig.FixedReelSymbolID,t.ReelHold);if(null!=i||i.length>0){for(var o=0;o0&&n.push(o);if(n.length>0){for(var o=0;o1&&(this._progress=1),this._progress<0&&(this._progress=0);var t=this.startAngle*Math.PI/180,n=this.effectiveAngle*this._progress*Math.PI/180,i=this.getChildByName("Image"),o=.8*i.width,a=i.mask;a.x=-35,a.graphics.clear(),a.graphics.beginFill(0),1==this._progress?a.graphics.drawCircle(o,o,o):(a.graphics.moveTo(o,o),a.graphics.lineTo(2*o,o),a.graphics.drawArc(o,o,o,t,(t+n)%(360*Math.PI/180),!1),a.graphics.lineTo(o,o)),a.graphics.endFill()},enumerable:!0,configurable:!0}),t}(eui.Component);__reflect(RadianProgressImage.prototype,"RadianProgressImage");var BetSettingSlider=function(e){function t(t){void 0===t&&(t=[]);var n=e.call(this)||this;return n.curSelect=0,n.isFocus=!1,n._value=1,n.listLength=0,n.mSelections=t,n.listLength=n.mSelections.length,n.addEventListener(egret.Event.ADDED_TO_STAGE,n.init,n),n.addEventListener(egret.Event.REMOVED_FROM_STAGE,n.release,n),n}return __extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value!=e&&(this._value=e,this._value<=.01&&(this._value=.01),this.refreshProgress(),this.dispatchEvent(new egret.Event(egret.Event.CHANGE)))},enumerable:!0,configurable:!0}),t.prototype.refreshProgress=function(){this.curSelect=Math.round(this._value*this.listLength)-1,this._value=(this.curSelect+1)/this.listLength,this.dbProgress&&(this.dbProgress.progress=this._value),this._value<1?this.pin.x=11+112*this._value:1==this._value?this.pin.x=123:0==this._value&&(this.pin.x=11),this.pin.x<60?this.pin.y=18-this._value/.5*18:60==this.pin.x?this.pin.y=2:this.pin.y=18-(1-this._value)/.5*18,this.pin.y+=3,this.refreshSelection()},t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),GameConfig.IsDragonBonesBetSettingSlider&&(this.dbProgress=new DragonBonesRadianProgressBar,this.addChildAt(this.dbProgress,0)),this.refreshProgress(),this.btnPrev&&this.btnPrev.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doPrev,this),this.btnNext&&this.btnNext.addEventListener(egret.TouchEvent.TOUCH_TAP,this.doNext,this)},t.prototype.onTouchBegin=function(e){this.isFocus=!0},t.prototype.onTouchEnd=function(e){this.isFocus=!1,e.stopImmediatePropagation();var t=e.localX/this.touchArea.width;0>t&&(t=0),t>1&&(t=1),this.value=t,console.log(t)},t.prototype.onTouchMove=function(e){if(this.isFocus){e.stopImmediatePropagation();var t=e.localX/this.touchArea.width;0>t&&(t=0),t>1&&(t=1),this.value=t,console.log(t)}},t.prototype.onTouchCancel=function(){this.isFocus=!1},t.prototype.init=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.init,this),this.touchArea&&(this.touchArea.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegin,this),this.touchArea.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.touchArea.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onTouchEnd,this))},t.prototype.release=function(){this.touchArea.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchBegin,this),this.touchArea.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.touchArea.removeEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onTouchEnd,this),this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.release,this)},t.prototype.setSelection=function(e){this.mSelections=e,this.listLength=this.mSelections.length,this.refreshSelection()},Object.defineProperty(t.prototype,"enable",{set:function(e){this.btnPrev&&(0==this.curSelect?this.btnPrev.enabled=!1:this.btnPrev.enabled=e),this.btnNext&&(this.curSelect==this.listLength-1?this.btnNext.enabled=!1:this.btnNext.enabled=e),this.pin.enabled=e,this.cover.touchEnabled=!e,this.touchArea.touchEnabled=e},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectIdx",{get:function(){return this.curSelect},set:function(e){this.curSelect=e,this.value=(this.curSelect+1)/this.listLength,this.refreshProgress()},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"selectVal",{get:function(){return 0==this.mSelections.length?null:this.mSelections[this.curSelect].value},set:function(e){for(var t=0;t=this.mSelections.length&&(this.curSelect=this.mSelections.length-1),this.curSelect<0&&(this.curSelect=0),this.textLabel&&this.curSelect1&&(this._progress=1),this._progress<0&&(this._progress=0),this.display.animation.gotoAndStopByProgress("progress",this._progress),1==this._progress&&this.display.animation.gotoAndStop("progress_end",0)},enumerable:!0,configurable:!0}),t}(egret.DisplayObjectContainer);__reflect(DragonBonesRadianProgressBar.prototype,"DragonBonesRadianProgressBar");var HorizontalSlider=function(e){function t(){var t=e.call(this)||this;return t._value=.5,t.addEventListener(egret.Event.ADDED_TO_STAGE,t.init,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.release,t),t}return __extends(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this._value},set:function(e){this._value!=e&&(this._value=e,this.refreshProgress(),this.dispatchEvent(new egret.Event(egret.Event.CHANGE)))},enumerable:!0,configurable:!0}),t.prototype.refreshProgress=function(){var e=this.progress.mask;e.scaleX=this._value,this.pin.x=this.width*this._value-.5*this.pin.width},t.prototype.childrenCreated=function(){if(e.prototype.childrenCreated.call(this),this.progress){var t=new egret.Shape;this.progress.parent.addChild(t),t.x=0,t.y=0,t.graphics.beginFill(16777215),t.graphics.drawRect(0,0,this.width,this.height),t.graphics.endFill(),t.scaleX=this._value,t.scaleY=1,this.progress.mask=t}this.refreshProgress()},t.prototype.onTouchMove=function(e){e.stopImmediatePropagation();var t=e.localX/this.touchArea.width;0>t&&(t=0),t>1&&(t=1),this.value=t},t.prototype.init=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.init,this),this.touchArea&&(this.touchArea.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchMove,this),this.touchArea.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.touchArea.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onTouchMove,this))},t.prototype.release=function(){this.touchArea.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onTouchMove,this),this.touchArea.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onTouchMove,this),this.touchArea.removeEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onTouchMove,this),this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.release,this)},t}(eui.Component);__reflect(HorizontalSlider.prototype,"HorizontalSlider");var Label=function(e){function t(){var t=e.call(this)||this;return t.adjWidth=void 0,t._adjWidth=void 0,t.baseFontSize=void 0,t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.wordWrap=!0,t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.onLanguageChanged()},t.prototype.resetSize=function(){if(this.scaleX=.5,this.scaleY=.5,this._adjWidth<1){var e=this.parent;e&&(e.validateNow(),this._adjWidth=this.parent.width*this.adjWidth*2)}this.size=this.baseFontSize},t.prototype.setBaseFontSize=function(e){this.baseFontSize=e,this.resetSize(),this.adjWidth&&this.adjSize()},t.prototype.adjSize=function(){if(this.validateNow(),0==this.textWidth){if(this._adjWidth>0&&this.width>this._adjWidth){var e=this._adjWidth/this.width*.5; this.scaleX=e,this.scaleY=e}}else if(this._adjWidth>0&&this.textWidth>this._adjWidth){var e=this._adjWidth/this.textWidth*.5;this.scaleX=e,this.scaleY=e}this.scaleX>.5&&(this.scaleX=.5,this.scaleY=.5)},t.prototype.doInit=function(){"reuse"!=this.name&&this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.baseFontSize=this.size,this.adjWidth&&(this._adjWidth=this.adjWidth,this.addEventListener(eui.PropertyEvent.PROPERTY_CHANGE,this.onLabelChanged,this),this.resetSize(),this.adjSize()),Localization.Instance.addEventListener(SysNotify.LANGUAGE_CHANGED,this.onLanguageChanged,this),this.onLanguageChanged()},t.prototype.doRelease=function(){"reuse"!=this.name&&this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.adjWidth&&(this._adjWidth=this.adjWidth,this.removeEventListener(eui.PropertyEvent.PROPERTY_CHANGE,this.onLabelChanged,this)),Localization.Instance.removeEventListener(SysNotify.LANGUAGE_CHANGED,this.onLanguageChanged,this)},t.prototype.onLabelChanged=function(e){"text"==e.property&&this.adjWidth&&(this.resetSize(),this.adjWidth&&this.adjSize())},t.prototype.onLanguageChanged=function(){switch(this.fontFamily=t.getFontFamily(),Localization.Instance.currentLanguage){case Language.SimplifiedChinese:this.bold=!0;break;default:this.bold=!1}},t.getFontFamily=function(){switch(Localization.Instance.currentLanguage){case Language.SimplifiedChinese:return"Microsoft JhengHei";case Language.TraditionalChinese:return"Microsoft YaHei";case Language.Japanese:return"Hiragino Kaku Gothic Pro"}return"Arial"},t}(eui.Label);__reflect(Label.prototype,"Label");var MovieClipGroup=function(e){function t(){var t=e.call(this)||this;return t.source="",t.isFromSpriteSheet=!1,t.frameRate=24,t.playOnAwake=0,t}return __extends(t,e),t.prototype.createChildren=function(){e.prototype.createChildren.call(this),null!=this.source&&""!=this.source&&this.UpdateMovieClip()},t.prototype.UpdateMovieClip=function(){null!=this.mc&&(this.removeChild(this.mc),this.mc.removeEventListener(egret.Event.COMPLETE,this.onCompleted,this),this.mc=null),this.isFromSpriteSheet?this.mc=MovieClip.movieClipBySpriteSheet(this.source,this.frameRate):this.mc=MovieClip.movieClipByName(this.source),0==this.playOnAwake?this.gotoAndStop(1):this.play(this.playOnAwake),this.addChild(this.mc),this.mc.addEventListener(egret.Event.COMPLETE,this.onCompleted,this),this.mc.addEventListener(egret.Event.LOOP_COMPLETE,this.onCompletedLoop,this)},t.prototype.SetMovieClip=function(e){this.source=e,this.UpdateMovieClip()},t.prototype.onCompleted=function(){this.dispatchEvent(new egret.Event(egret.Event.COMPLETE))},t.prototype.onCompletedLoop=function(){this.dispatchEvent(new egret.Event(egret.Event.LOOP_COMPLETE))},t.prototype.play=function(e){void 0===e&&(e=-1),this.mc.play(e)},t.prototype.stop=function(){this.mc.stop()},t.prototype.gotoAndPlay=function(e,t){this.mc.gotoAndPlay(e,t)},t.prototype.gotoAndStop=function(e){this.mc.gotoAndStop(e)},t}(eui.Group);__reflect(MovieClipGroup.prototype,"MovieClipGroup");var MultiResolutionBitmapLabel=function(e){function t(){var t=e.call(this)||this;return t.fixedScale=!1,t}return __extends(t,e),Object.defineProperty(t.prototype,"scaleX",{get:function(){return e.prototype.$getScaleX.call(this)},set:function(t){this.fixedScale||!SlotConfig.IsMultiResolution?e.prototype.$setScaleX.call(this,t):e.prototype.$setScaleX.call(this,t*GameConfig.ContentScale)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleY",{get:function(){return e.prototype.$getScaleY.call(this)},set:function(t){this.fixedScale||!SlotConfig.IsMultiResolution?e.prototype.$setScaleY.call(this,t):e.prototype.$setScaleY.call(this,t*GameConfig.ContentScale)},enumerable:!0,configurable:!0}),t}(eui.BitmapLabel);__reflect(MultiResolutionBitmapLabel.prototype,"MultiResolutionBitmapLabel");var MultiResolutionMovieClip=function(e){function t(t){var n=e.call(this,t)||this;return n.fixedScale=!1,n}return __extends(t,e),Object.defineProperty(t.prototype,"scaleX",{get:function(){return e.prototype.$getScaleX.call(this)},set:function(t){this.fixedScale||!SlotConfig.IsMultiResolution?e.prototype.$setScaleX.call(this,t):e.prototype.$setScaleX.call(this,t*GameConfig.ContentScale)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"scaleY",{get:function(){return e.prototype.$getScaleY.call(this)},set:function(t){this.fixedScale||!SlotConfig.IsMultiResolution?e.prototype.$setScaleY.call(this,t):e.prototype.$setScaleY.call(this,t*GameConfig.ContentScale)},enumerable:!0,configurable:!0}),t}(egret.MovieClip);__reflect(MultiResolutionMovieClip.prototype,"MultiResolutionMovieClip");var PagingDot=function(e){function t(t,n,i){var o=e.call(this)||this;return o._on=!1,o.dotOn=new egret.Shape,o.dotOn.graphics.beginFill(t),o.dotOn.graphics.drawCircle(0,0,i),o.dotOn.graphics.endFill(),o.addChild(o.dotOn),o.dotOff=new egret.Shape,o.dotOff.graphics.beginFill(n),o.dotOff.graphics.drawCircle(0,0,i),o.dotOff.graphics.endFill(),o.addChild(o.dotOff),o.refreshView(),o}return __extends(t,e),Object.defineProperty(t.prototype,"on",{get:function(){return this._on},set:function(e){this._on=e,this.refreshView()},enumerable:!0,configurable:!0}),t.prototype.refreshView=function(){this.dotOn.visible=this._on,this.dotOff.visible=!this._on},t}(egret.Sprite);__reflect(PagingDot.prototype,"PagingDot");var PagingDotPane=function(e){function t(t,n,i,o,a,r,s){void 0===o&&(o=16777215),void 0===a&&(a=11579568),void 0===r&&(r=10),void 0===s&&(s=10);var l=e.call(this)||this;l.pageDot=[],l.curPage=0;for(var h=0;t>h;h++){var c=new PagingDot(o,a,r);c.x=(-(t-1)/2+h)*(2*r+s),c.on=!0,l.addChild(c),l.pageDot.push(c)}return l.x=n,l.y=i,l}return __extends(t,e),Object.defineProperty(t.prototype,"selected",{get:function(){return this.curPage},set:function(e){this.curPage=e,this.refreshView()},enumerable:!0,configurable:!0}),t.prototype.refreshView=function(){for(var e=0;e=this.mSelections.length&&(this.curSelect=this.mSelections.length-1),this.curSelect<0&&(this.curSelect=0),this.textLabel&&this.curSelect0&&(this.animationCount++,this.fullReelWildIndexArray.push(o));this.totalAnimationCount=this.animationCount;var a=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount],r=this.fullReelWildIndexArray[this.totalAnimationCount-this.animationCount]+1;if(GameConfig.platform==Platform.desktop)switch(this.reelMultiArray[a]){case 2:n="WildX2",i="WildX2_Idle",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:n="WildX3",i="WildX3_Idle",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}else switch(this.reelMultiArray[a]){case 2:n="WildX2",i="WildX2_Idle",AudioManager.Instance.playSound(Sound.WildMultiplierX2Open);break;case 3:n="WildX3",i="WildX3_Idle",AudioManager.Instance.playSound(Sound.WildMultiplierX3Open)}var s=new Object;s.Multiplier=this.reelMultiArray[a];for(var l=this.slotController.slotView.GetStopReelOrderedReel(r),o=1;o=0?(this.SetSpeedCalculator(new ConstantBookingSpeedCalculator),this.bookingSpeedCalculator.ComputeSpeedByDuration(this.targetValue-this.displayValue,t)):this.SetSpeedCalculator(this.defaultSpeedCalculator),this.targetValue=e,this.StartBooking()},t.prototype.Skip=function(){this.isBooking&&this.finalizeValue()},t.prototype.UpdateText=function(){this.text=StringUtil.numberFormat(this.displayValue/100,this.nDecimalPlaces)},t.prototype.StartBooking=function(){if(this.isBooking=!0,this.previousTime=egret.getTimer(),this.withBookingSound){var e=this.bookingSpeedCalculator.ComputeTime(this.targetValue-this.value);AudioManager.Instance.playSound(Sound.WinningSound),e>3&&(this.loopBookingTimeoutID=egret.setTimeout(function(){this.bookingLoopChannel=AudioManager.Instance.playSound(Sound.BookingLoop,-1)},this,1e3))}this.addEventListener(egret.Event.ENTER_FRAME,this.Booking,this)},t.prototype.StopBooking=function(){this.isBooking=!1,this.withBookingSound&&(null!=this.bookingLoopChannel?this.bookingLoopChannel.stop():AudioManager.Instance.stopSound(Sound.WinningSound),egret.clearTimeout(this.loopBookingTimeoutID)),this.removeEventListener(egret.Event.ENTER_FRAME,this.Booking,this)},t.prototype.Booking=function(){var e=egret.getTimer(),t=.001*(e-this.previousTime);this.previousTime=e;var n=this.bookingSpeedCalculator.ComputeSpeed(this.displayValue);GameConfig.isTurboMode&&GameConfig.TurboModeState&&(n=2*this.bookingSpeedCalculator.ComputeSpeed(this.displayValue));var i=n*t;this.value=this.targetValue?this.finalizeValue():this.UpdateText()):(this.value+=i,this.displayValue=Math.floor(this.value),this.value<=this.targetValue?this.finalizeValue():this.UpdateText())},t.prototype.finalizeValue=function(){this.value=this.targetValue,this.displayValue=this.targetValue,this.UpdateText(),this.StopBooking(),this.dispatchEvent(new egret.Event(egret.Event.COMPLETE))},t}(eui.BitmapLabel);__reflect(ValueBitmapLabel.prototype,"ValueBitmapLabel");var ValueLabel=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBooking=!1,t.nDecimalPlaces=2,t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.text="0",this.value=0},t.prototype.GetCurrentValue=function(){return this.value},t.prototype.SetBaseValue=function(e){this.value=e,this.displayValue=e,this.baseValue=e,this.UpdateText()},t.prototype.GetSpeedCalculator=function(){return this.bookingSpeedCalculator},t.prototype.SetSpeedCalculator=function(e){this.bookingSpeedCalculator=e,this.defaultSpeedCalculator=e},t.prototype.SetTargetValue=function(e,t){void 0===t&&(t=-1),t>=0?(this.bookingSpeedCalculator=new ConstantBookingSpeedCalculator,this.bookingSpeedCalculator.ComputeSpeedByDuration(e-this.baseValue,t)):this.bookingSpeedCalculator=this.defaultSpeedCalculator,this.baseValue=this.displayValue,this.targetValue=e,this.StartBooking()},t.prototype.Skip=function(){this.isBooking&&this.finalizeValue()},t.prototype.UpdateText=function(){this.text=StringUtil.numberFormat(this.displayValue/100,this.nDecimalPlaces)},t.prototype.StartBooking=function(){this.isBooking=!0,this.previousTime=egret.getTimer();var e=this.bookingSpeedCalculator.ComputeTime(this.targetValue-this.value);AudioManager.Instance.playSound(Sound.WinningSound),e>3&&(this.loopBookingTimeoutID=egret.setTimeout(function(){this.bookingLoopChannel=AudioManager.Instance.playSound(Sound.BookingLoop,-1)},this,1e3)),this.addEventListener(egret.Event.ENTER_FRAME,this.Booking,this)},t.prototype.StopBooking=function(){this.isBooking=!1,null!=this.bookingLoopChannel?this.bookingLoopChannel.stop():AudioManager.Instance.stopSound(Sound.WinningSound),egret.clearTimeout(this.loopBookingTimeoutID),this.removeEventListener(egret.Event.ENTER_FRAME,this.Booking,this)},t.prototype.Booking=function(){var e=egret.getTimer(),t=.001*(e-this.previousTime);this.previousTime=e;var n=this.bookingSpeedCalculator.ComputeSpeed(this.displayValue,this.baseValue);GameConfig.isTurboMode&&GameConfig.TurboModeState&&(n=2*this.bookingSpeedCalculator.ComputeSpeed(this.displayValue,this.baseValue));var i=n*t;this.value=this.targetValue?this.finalizeValue():this.UpdateText()):(this.value-=i,this.displayValue=Math.floor(this.value),this.value<=this.targetValue?this.finalizeValue():this.UpdateText())},t.prototype.finalizeValue=function(){this.value=this.targetValue,this.displayValue=this.targetValue,this.UpdateText(),this.StopBooking(),this.dispatchEvent(new egret.Event(egret.Event.COMPLETE))},t}(eui.Label);__reflect(ValueLabel.prototype,"ValueLabel");var WheelScroller=function(e){function t(){var t=e.call(this)||this;return t.drag=!1,t.startSV=-1,t.startStageY=0,t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.verticalScrollBar.autoVisibility=!1,this.verticalScrollBar.visible=!0},t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.addEventListener(mouse.MouseEvent.WHEEL,this.onMouseWheel,this),this.verticalScrollBar.touchEnabled=!0,this.verticalScrollBar.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onThumbEvent,this),this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.verticalScrollBar.addEventListener(egret.TouchEvent.TOUCH_END,this.onThumbEvent,this),this.verticalScrollBar.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onThumbEvent,this)},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.removeEventListener(mouse.MouseEvent.WHEEL,this.onMouseWheel,this),this.verticalScrollBar.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onThumbEvent,this),this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.verticalScrollBar.removeEventListener(egret.TouchEvent.TOUCH_END,this.onThumbEvent,this),this.verticalScrollBar.removeEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onThumbEvent,this)},t.prototype.onThumbEvent=function(e){this.drag=e.type==egret.TouchEvent.TOUCH_BEGIN;var t=this.verticalScrollBar.height,n=this.viewport.contentHeight-this.height,i=e.localY/t;this.drag&&(console.log("!!!!!!!!!!!!!! onThumbEvent drag"),this.viewport.scrollV=n*i,this.startSV=this.viewport.scrollV,this.startStageY=e.stageY)},t.prototype.onThumbDrag=function(e){if(this.drag){var t=this.verticalScrollBar.height-this.verticalScrollBar.thumb.height,n=this.viewport.contentHeight-this.height,i=n/t,o=e.stageY-this.startStageY;this.viewport.scrollV=this.startSV+o*i,this.viewport.scrollV<0&&(this.viewport.scrollV=0),this.viewport.scrollV>this.viewport.contentHeight-this.height&&(this.viewport.scrollV=this.viewport.contentHeight-this.height),this.startSV=this.viewport.scrollV,this.startStageY=e.stageY}},t.prototype.onMouseWheel=function(e){this.viewport.contentHeightthis.viewport.contentHeight-this.height&&(this.viewport.scrollV=this.viewport.contentHeight-this.height))},t.prototype.updateDisplayList=function(t,n){e.prototype.updateDisplayList.call(this,t,n),this.validateNow(),this.viewport.contentHeightthis.maxValue&&(this.value=this.minValue)},t.prototype.Decrement=function(){this.value--,this.valuethis.maxValue&&(this.value=this.minValue)},t.prototype.Decrement=function(){this.value--,this.valuei;i++)t=new DebugSymbolButton,t.width=60,t.height=60,t.SetMinMax(GameConfig.DebugSymbolMin,GameConfig.DebugSymbolMax),this.symbolButtonGroup.addChild(t);if(this.width=SlotConfig.SLOT_COL*(t.width+e.horizontalGap)-e.horizontalGap+this.startBtn.width,this.height=SlotConfig.SLOT_ROW*(t.height+e.verticalGap)-e.verticalGap,this.symbolButtonGroup.width=SlotConfig.SLOT_COL*(t.width+e.horizontalGap)-e.horizontalGap,this.symbolButtonGroup.height=SlotConfig.SLOT_ROW*(t.height+e.verticalGap)-e.verticalGap,"object"==typeof SlotConfig.SignificantSymbolsOnReel)for(var i=0;io-1&&(this.symbolButtonGroup.getChildAt(this.GetButtonIndex(a,i)).visible=!1)},t.prototype.OnStartPressed=function(){var e,t=[],n=SlotConfig.SLOT_COL*SlotConfig.SLOT_ROW;if("object"==typeof SlotConfig.SignificantSymbolsOnReel)for(var i=0,o=0;or;r++)e=this.symbolButtonGroup.getChildAt(this.GetButtonIndex(r,o)),t[i++]=e.value;else for(var o=0;n>o;o++){e=this.symbolButtonGroup.getChildAt(o);var s=e.value,l=Math.floor(o/SlotConfig.SLOT_COL),h=o%SlotConfig.SLOT_COL,c=h*SlotConfig.SLOT_ROW+l;t[c]=s}this.dispatchEvent(new egret.Event(egret.Event.CHANGE,!1,!1,t))},t}(eui.Component);__reflect(DebugSymbolButtonPane.prototype,"DebugSymbolButtonPane");var ThemeAdapter=function(){function e(){}return e.prototype.getTheme=function(e,t,n,i){function o(e){t.call(i,e)}function a(t){t.resItem.url==e&&(RES.removeEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,a,null),n.call(i))}RES.addEventListener(RES.ResourceEvent.ITEM_LOAD_ERROR,a,null),RES.getResByUrl(e,o,this,RES.ResourceItem.TYPE_TEXT)},e}();__reflect(ThemeAdapter.prototype,"ThemeAdapter",["eui.IThemeAdapter"]);var SymbolTransformEffect=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return __extends(t,e),t.prototype.Execute=function(e,t){var n=t.ReelMultiplier;this.symbolArray=[],this.animationIdArray=[],this.transformCount=0;for(var i=0;i0)for(var o=1;o=2&&(a=Math.ceil(Math.random()*this.particleFiles.length)-1),o=this.initDragonBoneCoin(this.particleFiles[a]),this.particleContainer.addChildAt(o,0),this.particlesDBList.push(o)}else o=this.particlesPool[0],this.particleContainer.addChildAt(o,0),this.particlesDBList.push(o),this.particlesPool.splice(0,1);o.alpha=0,o.animation.gotoAndPlayByFrame("ani",Math.ceil(10*Math.random()),0),o.rotation=Math.ceil(90*Math.random()),console.log(o.rotation),egret.Tween.get(o).to({alpha:1},1e3*this.PARTICLE_FADEIN,egret.Ease.quartInOut)}},t.prototype.advanceLoop=function(){for(var e=this.particlesList.length-1;e>=0;e--){var t=this.particlesList[e];if(t.advance(),t.addVelocity(this.GRAVITY_X,this.GRAVITY_Y,this.GRAVITY_Z),t.isDead()){this.particlesList.splice(e,1);var n=this.particlesDBList[e];this.particleContainer.removeChild(n),this.particlesPool.push(n),this.particlesDBList.splice(e,1)}}},t.prototype.renderLoop=function(){for(var e=0;en&&(n=t),this.CreateDragonBones(),3==e?AudioManager.Instance.playSound(Sound.BW_MegaBigWin):2==e?AudioManager.Instance.playSound(Sound.BW_SuperBigWin):AudioManager.Instance.playSound(Sound.BW_BigWin),this.addEventListener(BigWin.BIGWIN_NUMBER_ANIMATE_END,this.countEnded,this),EventCentral.getInstance().addEventListener(SceneNotify.WIN_BOOKING_START,this.OnStartBooking,this),this.totalWin=t,this.alphaImage=new eui.Rect(this.width,this.height,0),this.alphaImage.fillAlpha=.5,this.addChildAt(this.alphaImage,0),e>1&&(this.coinEffect=new BigWinCoinEffect,this.addChildAt(this.coinEffect,2),this.coinEffect.PlayCoinEffect(e),this.coinSoundChannel=AudioManager.Instance.playSound(Sound.CollectCoin,-1)),this.winLabel=new eui.BitmapLabel,this.winLabel.letterSpacing=-10,this.winLabel.horizontalCenter=0,this.winLabel.y=346,this.winLabel.scaleX=.55625,this.winLabel.scaleY=.55625,this.winLabel.visible=!0,this.addChildAt(this.winLabel,12),this.loadFont(),3==e&&(this.addChildAt(this.fireworkManager,6),this.fireworkManager.Start()),this.StartBigWin(n)},t.prototype.AddSkipButton=function(){GameConfig.platform==Platform.desktop?(this.skipButton=new BetActionButton,this.skipButton.labelKey="desktop.spinaction.stopbtn",SlotConfig.overlayStopButtonPosition?(this.skipButton.x=SlotConfig.overlayStopButtonPosition.x,this.skipButton.y=SlotConfig.overlayStopButtonPosition.y):(this.skipButton.bottom=4,this.skipButton.right=113)):(this.skipButton=new BaseButton,this.skipButton.skinName=SpinBtnSkin,this.skipButton.labelKey="common.stop",this.skipButton.bottom=233,this.skipButton.right=18),this.skipButton.anchorOffsetX=0,this.skipButton.anchorOffsetY=0,this.skipButton.scaleX=1,this.skipButton.scaleY=1,this.skipButton.visible=!1,this.addChild(this.skipButton),this.skipButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnSkipPressed,this),EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this)},t.prototype.AddCClassSkipButton=function(){GameConfig.platform==Platform.desktop?(this.skipButton=new BetActionButton,this.skipButton.skinName="Desktop.SpStopBtnSkin",SlotConfig.overlayStopButtonPosition?(this.skipButton.x=SlotConfig.overlayStopButtonPosition.x,this.skipButton.y=SlotConfig.overlayStopButtonPosition.y):(this.skipButton.bottom=4,this.skipButton.right=113),this.skipButton.scaleX=.55625,this.skipButton.scaleY=.55625,this.skipButton.anchorOffsetX=0,this.skipButton.anchorOffsetY=0):(this.skipButton=new BaseButton,this.skipButton.skinName=SpinBtnSkin,this.skipButton.labelKey="common.stop",this.skipButton.bottom=233,this.skipButton.right=18,this.skipButton.anchorOffsetX=0,this.skipButton.anchorOffsetY=0,this.skipButton.scaleX=1,this.skipButton.scaleY=1),this.skipButton.visible=!1,this.addChild(this.skipButton),this.skipButton.addEventListener(egret.TouchEvent.TOUCH_TAP,this.OnSkipPressed,this),EventCentral.getInstance().addEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this)},t.prototype.StartBigWin=function(e){var t=this;this.winLabel.scaleX=.55625,this.winLabel.scaleY=.55625,egret.Tween.get(this.whiteMat).wait(50).to({alpha:1},50,egret.Ease.quartOut).to({alpha:0},500,egret.Ease.quartOut),egret.Tween.get(this.blackMat).to({alpha:.5},1e3,egret.Ease.quartOut),1==this.type?(this.dbTitle.animation.gotoAndPlay("start_Big"),Localization.Instance.currentLanguage!=Language.SimplifiedChinese&&Localization.Instance.currentLanguage!=Language.TraditionalChinese&&(this.dbBoardDisplay.y-=10,this.winLabel.y-=10)):2==this.type?(this.dbTitle.animation.gotoAndPlay("start_Super"),Localization.Instance.currentLanguage!=Language.SimplifiedChinese&&Localization.Instance.currentLanguage!=Language.TraditionalChinese&&(this.dbBoardDisplay.y+=40,this.winLabel.y+=40)):3==this.type&&(this.dbTitle.animation.gotoAndPlay("start_Mega"),Localization.Instance.currentLanguage!=Language.SimplifiedChinese&&Localization.Instance.currentLanguage!=Language.TraditionalChinese&&(this.dbBoardDisplay.y+=40,this.winLabel.y+=40)),this.dbBoard.animation.gotoAndPlay("start"),this.dbLight.animation.gotoAndPlay("loop"),egret.Tween.get(this).wait(500).call(function(){egret.Tween.get(t).wait(200).call(function(){t.parent&&(t.dbBoard.animation.gotoAndPlay("loop"),1==t.type?t.dbTitle.animation.gotoAndPlay("loop_Big"):2==t.type?t.dbTitle.animation.gotoAndPlay("loop_Super"):3==t.type&&t.dbTitle.animation.gotoAndPlay("loop_Mega"),t._t=egret.getTimer(),t.addEventListener(egret.Event.ENTER_FRAME,t.OnCount,t),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.WIN_BOOKING_START,e)),t.countStart=!0)})}),egret.Tween.get(this.dbLightDisplay).wait(50).to({scaleX:.8,scaleY:.8,alpha:1},500,egret.Ease.quartOut),this.type>1&&egret.Tween.get(this.dbLightDisplay,{loop:!0}).to({rotation:360},5e4),this.timeoutId=egret.setTimeout(this.Progress2,this,2500)},t.prototype.Progress2=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1,egret.Tween.removeTweens(this),egret.Tween.get(this.whiteMat).wait(50).to({alpha:1},50,egret.Ease.quartOut).wait(50).to({alpha:0},500,egret.Ease.quartOut),1==this.type?this.dbTitle.animation.gotoAndPlay("exit_Big"):2==this.type?this.dbTitle.animation.gotoAndPlay("exit_Super"):3==this.type&&this.dbTitle.animation.gotoAndPlay("exit_Mega"),egret.Tween.get(this.winLabel).to({y:52,scaleX:.6675,scaleY:.6675},400,egret.Ease.quartInOut),egret.Tween.get(this.dbLightDisplay,{loop:!0}).to({rotation:360},5e4),egret.Tween.get(this.dbLightDisplay).to({y:89,scaleX:.33375,scaleY:.33375},400,egret.Ease.quartInOut),egret.Tween.get(this.dbBoardDisplay).to({y:89,scaleX:.6675,scaleY:.6675},400,egret.Ease.quartInOut).to(this.animationEnd=!0),this.countEnd&&(this.timeoutId=egret.setTimeout(this.EndBigWin,this,1e3))},t.prototype.EndBigWin=function(){egret.clearTimeout(this.timeoutId),this.timeoutId=-1,egret.Tween.removeAllTweens(),this.dbBoard.animation.play("exit",1),egret.Tween.get(this.winLabel).wait(50).to({alpha:0}),egret.Tween.get(this.whiteMat).wait(50).to({alpha:1},50,egret.Ease.quartOut).to({alpha:0},500,egret.Ease.quartOut),egret.Tween.get(this.dbLightDisplay).to({scaleX:0,scaleY:0,alpha:0},500,egret.Ease.quartOut),egret.Tween.get(this.dbLightDisplay).wait(500).to({y:0,scaleX:0,scaleY:0},50),egret.Tween.get(this.dbBoardDisplay).wait(500).to({y:0,scaleX:.55625,scaleY:.55625},100),egret.Tween.get(this.blackMat).to({alpha:0},1e3,egret.Ease.quartOut),egret.Tween.get(this).wait(1100).call(function(){this.onFx=!1}).call(egret.Tween.removeAllTweens),this.dbLight.animation.gotoAndPlay("idle",1),this.timeoutId=egret.setTimeout(this.OnBigWinFinished,this,1500)},t.prototype.SkipBigWin=function(){this.animationEnd=!0,egret.clearTimeout(this.timeoutId),this.timeoutId=-1,egret.Tween.removeAllTweens(),this.dbBoard.animation.gotoAndPlay("loop"),this.dbBoardDisplay.y=89,this.dbTitle.animation.gotoAndPlay("idle"),this.dbLight.animation.gotoAndPlay("loop"),this.dbLightDisplay.scaleX=.33375,this.dbLightDisplay.scaleY=.33375,this.dbLightDisplay.y=89,this.winLabel.y=52,this.winLabel.scaleX=.6675,this.winLabel.scaleY=.6675,this.totalWin.toString().length>12&&(this.winLabel.scaleX=.55)},t.prototype.OnButtonPressed=function(e){switch(e.data){case ButtonType.Stop:this.SkipBigWin(),this.OnSkipBigWin(e)}},t.prototype.OnStartBooking=function(e){EventCentral.getInstance().removeEventListener(SceneNotify.WIN_BOOKING_START,this.OnStartBooking,this),GameConfig.GameClass==GameClass.CClass?this.AddCClassSkipButton():this.AddSkipButton(),EventCentral.getInstance().dispatchEvent(new SysNotify(SceneNotify.STOP_ENABLE)),this.skipButton.visible=!0},t.prototype.OnSkipPressed=function(e){EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Stop))},t.prototype.OnSkipBigWin=function(e){this.skipButton.visible=!1,this.ResetBigWin()},t.prototype.loadFont=function(){var e=RES.getRes("bigWinNum_fnt");this.winLabel&&(this.winLabel.font=e)},t.prototype.ResetBigWin=function(){EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),this.skipButton.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.OnSkipPressed,this),this.fireworkManager.Stop(),this.displayAmount=this.totalWin,void 0!=this.coinEffect&&this.coinEffect.StopCoinEffect(),this.winLabel.text=StringUtil.numberFormat(this.totalWin/100),this.endTimer=new egret.Timer(1e3,1),this.endTimer.addEventListener(egret.TimerEvent.TIMER_COMPLETE,this.EndBigWin,this),this.endTimer.start()},t.prototype.countEnded=function(e){this.countEnd=!0,this.removeEventListener(egret.Event.ENTER_FRAME,this.OnCount,this),this.winLabel.text=StringUtil.numberFormat(this.totalWin/100),this.countEnd&&this.animationEnd&&this.ResetBigWin()},t.prototype.OnBigWinFinished=function(e){this.fireworkManager.Stop(),EventCentral.getInstance().dispatchEvent(SceneNotify.Notify(SceneNotify.BIG_WIN_FINISHED)),EventCentral.getInstance().removeEventListener(SysNotify.BUTTON_PRESSED,this.OnButtonPressed,this),this.skipButton.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.OnSkipPressed,this),null!=this.endTimer&&(this.endTimer.stop(),this.endTimer.removeEventListener(egret.TimerEvent.TIMER_COMPLETE,this.OnBigWinFinished,this),this.endTimer=null),this.countStart=!1,null!=this.coinSoundChannel&&(this.coinSoundChannel.stop(),this.coinSoundChannel=null),null!=this.coinEffect&&(this.removeChild(this.coinEffect),this.coinEffect=null),null!=this.alphaImage&&(this.removeChild(this.alphaImage),this.alphaImage=null),null!=this.winLabel&&(this.removeChild(this.winLabel),this.winLabel=null),null!=this.skipButton&&(this.removeChild(this.skipButton),this.skipButton=null),this.displayAmount=0,null!=this.dbBoard&&null!=this.dbBoardDisplay&&(this.dbBoardDisplay.parent.removeChild(this.dbBoardDisplay),this.dbBoardDisplay=null,this.dbBoard.dispose(),this.dbBoard=null),null!=this.dbTitle&&null!=this.dbTitleDisplay&&(this.dbTitleDisplay.parent.removeChild(this.dbTitleDisplay),this.dbTitleDisplay=null,this.dbTitle.dispose(),this.dbTitle=null),null!=this.dbLight&&null!=this.dbLightDisplay&&(this.dbLightDisplay.parent.removeChild(this.dbLightDisplay),this.dbLightDisplay=null,this.dbLight.dispose(),this.dbLight=null),this.removeEventListener(BigWin.BIGWIN_NUMBER_ANIMATE_END,this.countEnded,this),EventCentral.getInstance().removeEventListener(SceneNotify.WIN_BOOKING_START,this.OnStartBooking,this),this.parent&&this.parent.removeChild(this)},t.prototype.OnCount=function(e){if(this.countStart){(e.target.displayAmount/100).toString().length>12&&(e.target.winLabel.scaleX=.55);var t=egret.getTimer(),n=.001*(t-e.target._t);e.target._t=t;var i=SocketManager.getInstance().GetData(),o=this.totalWin,a=(i.denominationList[i.denominationId]*i.lineBet,new BookingSpeedCalculator),r=a.ComputeSpeed(e.target.displayAmount);GameConfig.isTurboMode&&GameConfig.TurboModeState&&(r=2*a.ComputeSpeed(e.target.displayAmount)),e.target.displayAmount+=r*n,e.target.displayAmounti;i++)t=e.CreateArmature("bigWinNum"),this.sepArray.push(t),n=t.getDisplay(),this.sepDisplayArray.push(n),this.sepDisplayArray[i].scaleX=.55625,this.sepDisplayArray[i].scaleY=.55625,this.addChild(this.sepDisplayArray[i]);this.sepDisplayArray[0].x=-this.digiWidth+-this.sepWidth,this.sepDisplayArray[1].x=4*-this.digiWidth+-this.sepWidth/2-this.sepWidth,this.sepDisplayArray[2].x=7*-this.digiWidth+2*-this.sepWidth/2-this.sepWidth,this.sepDisplayArray[3].x=10*-this.digiWidth+3*-this.sepWidth/2-this.sepWidth;for(var o=0;12>o;o++)t=e.CreateArmature("bigWinNum"),this.digiArray.push(t),n=t.getDisplay(),this.digiDisplayArray.push(n),this.digiDisplayArray[o].scaleX=.55625,this.digiDisplayArray[o].scaleY=.55625,this.addChild(this.digiDisplayArray[o]);this.digiDisplayArray[1].x=-this.digiWidth,this.digiDisplayArray[2].x=2*-this.digiWidth+-this.sepWidth/2,this.digiDisplayArray[3].x=3*-this.digiWidth+-this.sepWidth/2,this.digiDisplayArray[4].x=4*-this.digiWidth+-this.sepWidth/2,this.digiDisplayArray[5].x=5*-this.digiWidth+2*-this.sepWidth/2,this.digiDisplayArray[6].x=6*-this.digiWidth+2*-this.sepWidth/2,this.digiDisplayArray[7].x=7*-this.digiWidth+2*-this.sepWidth/2,this.digiDisplayArray[8].x=8*-this.digiWidth+3*-this.sepWidth/2,this.digiDisplayArray[9].x=9*-this.digiWidth+3*-this.sepWidth/2,this.digiDisplayArray[10].x=10*-this.digiWidth+3*-this.sepWidth/2,this.digiDisplayArray[11].x=11*-this.digiWidth+4*-this.sepWidth/2},t.prototype.setNumber=function(e){var t,n=e.toString().length;this.sepArray[0].animation.gotoAndPlay("fullstop"),n>=12?(this.sepArray[1].animation.gotoAndPlay("comma"),this.sepArray[2].animation.gotoAndPlay("comma"),this.sepArray[3].animation.gotoAndPlay("comma"),t=4):n>=9?(this.sepArray[1].animation.gotoAndPlay("comma"),this.sepArray[2].animation.gotoAndPlay("comma"),this.sepArray[3].animation.gotoAndPlay("idle"),t=3):n>=6?(this.sepArray[1].animation.gotoAndPlay("comma"),this.sepArray[2].animation.gotoAndPlay("idle"),this.sepArray[3].animation.gotoAndPlay("idle"),t=2):(this.sepArray[1].animation.gotoAndPlay("idle"),this.sepArray[2].animation.gotoAndPlay("idle"),this.sepArray[3].animation.gotoAndPlay("idle"),t=1);for(var i=0;ii;i++){var o=e.toString().length-i;this.digiArray[o].animation.gotoAndPlay("d"+e.toString().charAt(i))}n>=12?(this.scaleX=.9,this.x=.9*((n*this.digiWidth+t*this.sepWidth/2)/2-40)):n>=8?(this.scaleX=1,this.x=1*((n*this.digiWidth+t*this.sepWidth/2)/2-40)):(this.scaleX=1.1,this.x=1.1*((n*this.digiWidth+t*this.sepWidth/2)/2-40))},t}(egret.DisplayObjectContainer);__reflect(DragonBonesBigWinNum.prototype,"DragonBonesBigWinNum");var FSOCongratulationPanel=function(e){function t(){var t=e.call(this)||this;return t.skinName="FSOCongratulationPanelSkin",t.SetScale(.001,.001),t.anchorOffsetX=t.width/2,t.anchorOffsetY=t.height/2,t.fixedScale=!0,t.InitSkin("FSOCongratulationPanelSkin"),t.RegisterEvent(),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.FSOWinMsg.source=Localization.Instance.getString("common.freeSpinOffer.fso_win_msg"),this.FSOGoodluck.source=Localization.Instance.getString("common.freeSpinOffer.fso_goodluck"),this.FSOStart.source=Localization.Instance.getString("common.freeSpinOffer.fso_start_btn");var t=SocketManager.getInstance().GetData();t.fsoDenominationValue*t.fsoLineBet*t.fsoLineNumber},t.prototype.RegisterEvent=function(){EventCentral.getInstance().addEventListener(SceneNotify.SHOW_FSO_CONGRATULATIONPANEL,this.OnShow,this)},t.prototype.UnregisterEvent=function(){EventCentral.getInstance().removeEventListener(SceneNotify.SHOW_FSO_CONGRATULATIONPANEL,this.OnShow,this)},t.prototype.FadeIn=function(){this.SetScale(.001,.001);var e=egret.Tween.get(this);e.to({scaleX:1,scaleY:1},500,egret.Ease.backOut).call(this.FadeInFinished),this.backdrop.alpha=.1;var t=egret.Tween.get(this.backdrop);t.to({alpha:1},500)},t.prototype.FadeInFinished=function(){this.dispatchEvent(new egret.Event(FSOWinSummary.FADE_IN_COMPLETE))},t.prototype.SetPlayCount=function(e){this.lblFSOcount.text=e.toString()},t.prototype.Close=function(){this.FadeOut()},t.prototype.FadeOut=function(){this.SetScale(1,1);var e=egret.Tween.get(this);e.to({scaleX:.001,scaleY:.001},500,egret.Ease.backIn).call(this.FadeOutFinished);var t=egret.Tween.get(this.backdrop);t.to({alpha:.1},500)},t.prototype.FadeOutFinished=function(){this.dispatchEvent(new egret.Event(FSOWinSummary.FADE_OUT_COMPLETE))},t.prototype.on_fsoStart_pressed=function(e){this.btnFSOStart.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.on_fsoStart_pressed,this),this.Dismiss(),console.log("FSO START PRESSED")},t.prototype.OnShow=function(e){this.visible=!0,this.btnFSOStart.addEventListener(egret.TouchEvent.TOUCH_TAP,this.on_fsoStart_pressed,this),this.SetPosition(this.width/2,this.height/2),GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.addEventListener(UIWinSummary.FADE_IN_COMPLETE,this.OnFadeInComplete,this);var t=SocketManager.getInstance().GetData();this.FadeIn(),this.SetPlayCount(t.fsoCount-t.fsoPlayed)},t.prototype.OnFadeInComplete=function(e){this.removeEventListener(UIWinSummary.FADE_IN_COMPLETE,this.OnFadeInComplete,this);SocketManager.getInstance().GetData()},t.prototype.Dismiss=function(){this.addEventListener(UIWinSummary.FADE_OUT_COMPLETE,this.OnFadeOutComplete,this),this.Close()},t.prototype.OnFadeOutComplete=function(){this.removeEventListener(UIWinSummary.FADE_OUT_COMPLETE,this.OnFadeOutComplete,this),this.visible=!1,this.UnregisterEvent()},t.prototype.InitSkin=function(e){},t.prototype.ChangeSkin=function(e){void 0===e&&(e=null)},t.FADE_IN_COMPLETE="fadeInComplete",t.FADE_OUT_COMPLETE="fadeOutComplete",t.WINSUMMARY_FINISH="winsummaryFinish",t}(HTMLUI.UIBase);__reflect(FSOCongratulationPanel.prototype,"FSOCongratulationPanel");var FSODetailPanel=function(e){function t(){var t=e.call(this)||this;return t.language=0,t.skinName="FSODetailPanelSkin",t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this)},t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),Localization.Instance.addEventListener(GlobalEvent.LANGUAGE_CHANGED,this.onLanguageChanged,this),this.selectedGame=null},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),Localization.Instance.removeEventListener(GlobalEvent.LANGUAGE_CHANGED,this.onLanguageChanged,this),EventCentral.getInstance().removeEventListener(SysNotify.TOKEN_READY,this.onTokenReceived,this),EventCentral.getInstance().removeEventListener(SysNotify.FSO_EVENTLIST_VALID,this.EventDetailValid,this),this.selectedGame=null},t.prototype.onTokenReceived=function(e){var t=e.data.Token;this.RedirectPage(t)},t.prototype.onLanguageChanged=function(){this.data&&this.refreshData()},t.prototype.DisableAllButton=function(){this.enabled=!1},t.prototype.refreshData=function(){if(this.lblTitle1&&this.setLblTitle(),this.lblCoin&&void 0!=this._data.SpinOfferCount&&(this.lblCoin.text=StringUtil.numberFormat(this._data.SpinOfferCount,0).toString()),this.lblTotalAmount&&void 0!=this._data.CoinValue){this.lblTotalAmount.text=Localization.Instance.getString("common.freeSpinOffer.fso_total_amount")+" "+StringUtil.numberFormat(this._data.CoinValue,0).toString();var e=this._data.CoinValue,t=this._data.LineBet,n=e*t*this._data.Line;this.lblTotalAmount.text=Localization.Instance.getString("common.freeSpinOffer.fso_coin")+StringUtil.numberFormat(e/100).toString()+" "+Localization.Instance.getString("common.freeSpinOffer.fso_bet")+t.toString()+" "+Localization.Instance.getString("common.freeSpinOffer.fso_totalBet")+StringUtil.numberFormat(n/100).toString()}if(this.lblEvent&&void 0!=this._data.EventName&&(this.lblEvent.text=Localization.Instance.getString("common.freeSpinOffer.fso_event")+" "+this._data.EventName),this.lblExpiryTime&&void 0!=this._data.ExpiryDate&&(this.lblExpiryTime.text=Localization.Instance.getString("common.freeSpinOffer.fso_expiry_time")+" "+this._data.ExpiryDate),this.lbl&&(this.lbl.text=Localization.Instance.getString("common.freeSpinOffer.fso_remind")),this.lblRemind2&&(this.lblRemind2.text=Localization.Instance.getString("common.freeSpinOffer.fso_remind2")),this.tableList&&this._data.GameList){if(this.CheckGameListSupportedGame(this._data.GameList).length<=2){var i=new eui.HorizontalLayout; i.horizontalAlign="center",this.tableList.layout=i}this.createFSOGameList(this.CheckGameListSupportedGame(this._data.GameList))}0==this._data.Active&&this.setUnableRemind(),this.selectedGame=null},t.prototype.ChangeRemainingStyle=function(){if(this.lblTitle1&&this.setLblTitle(!0),this.lblCoin&&void 0!=this._data.SpinOfferCount&&(this.lblCoin.text=StringUtil.numberFormat(this._data.SpinOfferCount-this._data.SpinPlayed,0).toString()),this.lblTotalAmount&&void 0!=this._data.CoinValue){var e=this._data.CoinValue,t=this._data.LineBet,n=e*t*this._data.Line;this.lblTotalAmount.text=Localization.Instance.getString("common.freeSpinOffer.fso_coin")+StringUtil.numberFormat(e/100).toString()+" "+Localization.Instance.getString("common.freeSpinOffer.fso_bet")+t.toString()+" "+Localization.Instance.getString("common.freeSpinOffer.fso_totalBet")+StringUtil.numberFormat(n/100).toString()}this.lblEvent&&void 0!=this._data.EventName&&(this.lblEvent.text=Localization.Instance.getString("common.freeSpinOffer.fso_event")+" "+this._data.EventName),this.lblExpiryTime&&void 0!=this._data.ExpiryDate&&(this.lblExpiryTime.text=Localization.Instance.getString("common.freeSpinOffer.fso_expiry_time")+" "+this._data.ExpiryDate),this.lbl&&(this.lbl.text=Localization.Instance.getString("common.freeSpinOffer.fso_remaining_remind"))},t.prototype.CheckGameListSupportedGame=function(e){for(var t=[],n=0;n0?i=n>this.selIndex?n:n-1:0!=t&&t!=this.selIndex?i=ni?i=0:i>this.listLength-1&&(i=this.listLength-1),this.selIndex=i,this.setPageByIndex()},t.prototype.setPageByIndex=function(){this.btnPrev.visible=!0,this.btnNext.visible=!0,this.selIndex<=0&&(this.btnPrev.visible=!1),this.selIndex>=this.listLength-1&&(this.btnNext.visible=!1),egret.Tween.removeTweens(this.scroller.viewport),egret.Tween.get(this.scroller.viewport).to({scrollH:this.scroller.width*this.selIndex},200),this.setLblTotalAmount()},t.prototype.doClose=function(){this.parent&&this.parent.removeChild(this),this.processIndicator.Hide(),GameConfig.checkingFSOEventValid=!1,GameConfig.isOverlayOpened=!1,GameConfig.isFSOOverlayOpened=!1,EventCentral.getInstance().dispatchEvent(new SysNotify(SysNotify.ENABLE_ALL_BUTTON))},t.prototype.removeFSOPanel=function(){GameConfig.isOverlayOpened=!1,GameConfig.isFSOOverlayOpened=!1,this.parent&&this.parent.removeChild(this)},t.prototype.setLblTotalAmount=function(){var e=SocketManager.getInstance().GetData().fsoEventDetail,t=(SocketManager.getInstance().GetData().GetFSOEventList(),e[this.selIndex]);if(this.lblTotalAmount&&t){var n=t.LineBet*t.Line*t.CoinValue*t.SpinOfferCount;this.lblTotalAmount.text=StringUtil.numberFormat(n/100).toString()}},t.prototype.setLblTitle=function(){this.getLangCode();this.lblTitle.source=Localization.Instance.getString("common.freeSpinOffer.fso_cong")},t.prototype.getLangCode=function(){return Localization.Instance.currentLanguage},t.prototype.IsGameListArrayLoaded=function(){return null!=GameConfig.gameListDetail},t.prototype.LoadGameListDetail=function(){var e=CommonFunc.getGameListURL(),t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t.prototype.OnGameListDetailLoaded=function(e){var t=e.target,n=t.data;null==n?this.LoadGameListDetailTemplate():GameConfig.gameListDetail=JSON.parse(StringUtil.tryDecode64(n))},t.prototype.GameListDetailLoadedFailed=function(e){alert("Fail to load GameListDetail"),GameConfig.debugPanelOn||GameConfig.demoPanelOn?this.LoadGameListDetailTemplate():this.LoadGameListDetailTemplate()},t.prototype.LoadGameListDetailTemplate=function(){var e="resource/UI/commonUI/images/MiniLobby/GameList_Template.dat",t=new egret.URLLoader;t.dataFormat=egret.URLLoaderDataFormat.TEXT;var n=new egret.URLRequest;n.url=e,t.addEventListener(egret.Event.COMPLETE,this.OnGameListDetailLoaded,this),t.addEventListener(egret.IOErrorEvent.IO_ERROR,this.GameListDetailLoadedFailed,this),t.load(n)},t}(eui.Component);__reflect(FSOPanel.prototype,"FSOPanel");var FSOStartMenu=function(e){function t(){var t=e.call(this)||this;return t.skinName="FSOStartMenuSkin",t.SetScale(.001,.001),t.anchorOffsetX=t.width/2,t.anchorOffsetY=t.height/2,t.fixedScale=!0,t.width=1068,t.height=600,t.backdrop.width=1068,t.backdrop.height=600,t.RegisterEvent(),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.FSOWinMsg.source=Localization.Instance.getString("common.freeSpinOffer.fso_win_msg"),this.FSOGoodluck.source=Localization.Instance.getString("common.freeSpinOffer.fso_goodluck"),this.FSOStart.source=Localization.Instance.getString("common.freeSpinOffer.fso_start_btn");var t=SocketManager.getInstance().GetData();this.lblEventName.text=Localization.Instance.getString("common.freeSpinOffer.fso_event")+" "+t.fsoName;t.fsoDenominationValue*t.fsoLineBet*t.fsoLineNumber},t.prototype.RegisterEvent=function(){EventCentral.getInstance().addEventListener(SceneNotify.SHOW_STARTMENU_FSO,this.OnShow,this)},t.prototype.UnregisterEvent=function(){EventCentral.getInstance().removeEventListener(SceneNotify.SHOW_STARTMENU_FSO,this.OnShow,this)},t.prototype.FadeIn=function(){this.SetScale(.001,.001);var e=egret.Tween.get(this);e.to({scaleX:1,scaleY:1},500,egret.Ease.backOut).call(this.FadeInFinished),this.backdrop.alpha=.1;var t=egret.Tween.get(this.backdrop);t.to({alpha:1},500)},t.prototype.FadeInFinished=function(){this.dispatchEvent(new egret.Event(FSOWinSummary.FADE_IN_COMPLETE))},t.prototype.SetPlayCount=function(e){this.lblFSOcount.text=e.toString()},t.prototype.Close=function(){this.FadeOut()},t.prototype.FadeOut=function(){this.SetScale(1,1);var e=egret.Tween.get(this);e.to({scaleX:.001,scaleY:.001},500,egret.Ease.backIn).call(this.FadeOutFinished);var t=egret.Tween.get(this.backdrop);t.to({alpha:.1},500)},t.prototype.FadeOutFinished=function(){this.dispatchEvent(new egret.Event(FSOWinSummary.FADE_OUT_COMPLETE))},t.prototype.on_fsoStart_pressed=function(e){this.btnFSOStart.removeEventListener(egret.TouchEvent.TOUCH_TAP,this.on_fsoStart_pressed,this),this.Dismiss(),console.log("FSO START PRESSED")},t.prototype.OnShow=function(e){this.visible=!0,this.btnFSOStart.addEventListener(egret.TouchEvent.TOUCH_TAP,this.on_fsoStart_pressed,this),this.SetPosition(this.width/2,this.height/2),GameLayer.GetInstance().AddObjectToLayer(this,Layer.Translation),this.addEventListener(UIWinSummary.FADE_IN_COMPLETE,this.OnFadeInComplete,this);var t=SocketManager.getInstance().GetData();this.FadeIn(),this.SetPlayCount(t.fsoCount-t.fsoPlayed)},t.prototype.OnFadeInComplete=function(e){this.removeEventListener(UIWinSummary.FADE_IN_COMPLETE,this.OnFadeInComplete,this);SocketManager.getInstance().GetData()},t.prototype.WinSummaryFinished=function(e){egret.setTimeout(this.Dismiss,this,2e3)},t.prototype.Dismiss=function(){this.addEventListener(UIWinSummary.FADE_OUT_COMPLETE,this.OnFadeOutComplete,this),this.Close()},t.prototype.OnFadeOutComplete=function(){this.removeEventListener(UIWinSummary.FADE_OUT_COMPLETE,this.OnFadeOutComplete,this),this.visible=!1,EventCentral.getInstance().dispatchEvent(new egret.Event(SceneNotify.START_PRESSED_FSO)),EventCentral.getInstance().dispatchEvent(SysNotify.Notify(SysNotify.BUTTON_PRESSED,ButtonType.Start))},t.FADE_IN_COMPLETE="fadeInComplete",t.FADE_OUT_COMPLETE="fadeOutComplete",t.WINSUMMARY_FINISH="winsummaryFinish",t}(HTMLUI.UIBase);__reflect(FSOStartMenu.prototype,"FSOStartMenu");var FSOWheelScroller=function(e){function t(){var t=e.call(this)||this;return t.drag=!1,t.startSV=-1,t.startStageY=0,t.isLobby=!1,t.addEventListener(egret.Event.ADDED_TO_STAGE,t.doInit,t),t.addEventListener(egret.Event.REMOVED_FROM_STAGE,t.doRelease,t),t}return __extends(t,e),t.prototype.childrenCreated=function(){e.prototype.childrenCreated.call(this),this.verticalScrollBar.autoVisibility=!1,this.verticalScrollBar.visible=!0},t.prototype.doInit=function(){this.removeEventListener(egret.Event.ADDED_TO_STAGE,this.doInit,this),this.addEventListener(mouse.MouseEvent.WHEEL,this.onMouseWheel,this),this.verticalScrollBar.touchEnabled=!0,this.verticalScrollBar.addEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onThumbEvent,this),this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.stage.addEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.verticalScrollBar.addEventListener(egret.TouchEvent.TOUCH_END,this.onThumbEvent,this),this.verticalScrollBar.addEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onThumbEvent,this)},t.prototype.doRelease=function(){this.removeEventListener(egret.Event.REMOVED_FROM_STAGE,this.doRelease,this),this.addEventListener(mouse.MouseEvent.WHEEL,this.onMouseWheel,this),this.verticalScrollBar.removeEventListener(egret.TouchEvent.TOUCH_BEGIN,this.onThumbEvent,this),this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.stage.removeEventListener(egret.TouchEvent.TOUCH_MOVE,this.onThumbDrag,this),this.verticalScrollBar.removeEventListener(egret.TouchEvent.TOUCH_END,this.onThumbEvent,this),this.verticalScrollBar.removeEventListener(egret.TouchEvent.TOUCH_RELEASE_OUTSIDE,this.onThumbEvent,this),this.removeChildren()},t.prototype.onThumbEvent=function(e){this.drag=e.type==egret.TouchEvent.TOUCH_BEGIN;var t=this.verticalScrollBar.height,n=this.viewport.contentHeight-this.height,i=e.localY/t;this.drag&&(this.viewport.scrollV=n*i,this.startSV=this.viewport.scrollV,this.startStageY=e.stageY)},t.prototype.onThumbDrag=function(e){if(this.drag){var t=this.verticalScrollBar.height-this.verticalScrollBar.thumb.height*this.verticalScrollBar.thumb.scaleY,n=this.viewport.contentHeight-this.height,i=n/t,o=(e.stageY-this.startStageY)/GameLayer.GetInstance().scaleY;this.viewport.scrollV=this.startSV+o*i,this.viewport.scrollV<0&&(this.viewport.scrollV=0),this.viewport.scrollV>this.viewport.contentHeight-this.height&&(this.viewport.scrollV=this.viewport.contentHeight-this.height),this.startSV=this.viewport.scrollV,this.startStageY=e.stageY}},t.prototype.onMouseWheel=function(e){this.viewport.contentHeightthis.viewport.contentHeight-this.height&&(this.viewport.scrollV=this.viewport.contentHeight-this.height))},t.prototype.updateDisplayList=function(t,n){e.prototype.updateDisplayList.call(this,t,n),this.validateNow(),this.viewport.contentHeighte;e++)this.smallIcon[e]=new eui.Image("jp_info_btn_png"),this.smallIcon[e].width=32,this.smallIcon[e].height=32;this.frontLabel.size=20,this.endLabel.size=20,this.frontLabel.fontFamily="Trebuchet MS",this.endLabel.fontFamily="Trebuchet MS";for(var e=0;e0?t.GetMultiplyer()>1?(this.showingMessageKey="common.system.win_pattern_pay_with_multiplier",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,StringUtil.numberFormat(t.GetPayout()/100),t.GetMultiplyer()),this.sIconNumber)):(this.showingMessageKey="common.system.win_pattern_pay",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,StringUtil.numberFormat(t.GetPayout()/100)),this.sIconNumber)):t.GetMultiplyer()>1?(this.showingMessageKey="common.system.win_line_pay_with_multiplier",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,this.winLineData[0],StringUtil.numberFormat(t.GetPayout()/100),t.GetMultiplyer()),this.sIconNumber)):(this.showingMessageKey="common.system.win_line_pay",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,this.winLineData[0],StringUtil.numberFormat(t.GetPayout()/100)),this.sIconNumber))},t.prototype.ShowWinPattern=function(e){var t=e.data;this.showingMessageKey="common.system.win_pattern_pay";for(var n=0;n1?t.GetWay()>1?(this.winLineData[1]=t.GetMultiplyer(),this.winLineData[2]=t.GetWay(),this.showingMessageKey="common.system.win_pattern_pay_with_multiplier_and_way",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,StringUtil.numberFormat(t.GetPayout()/100),t.GetMultiplyer(),t.GetWay()),this.sIconNumber)):(this.winLineData[1]=t.GetMultiplyer(),this.showingMessageKey="common.system.win_pattern_pay_with_multiplier",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,StringUtil.numberFormat(t.GetPayout()/100),t.GetMultiplyer()),this.sIconNumber)):t.GetWay()>1?(this.winLineData[1]=t.GetWay(),this.showingMessageKey="common.system.win_pattern_pay_with_way",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,StringUtil.numberFormat(t.GetPayout()/100),t.GetWay()),this.sIconNumber)):(this.showingMessageKey="common.system.win_pattern_pay",this.displayMsg(Localization.Instance.getString(this.showingMessageKey,this.winLineData[0],StringUtil.numberFormat(t.GetPayout()/100)),this.sIconNumber))},t.prototype.displayMsg=function(e,t){void 0===t&&(t=0);var n=e.split("$i");n.length>1?(this.frontLabel.text=n[0],this.endLabel.text=n[1]):this.frontLabel.text=e},t.prototype.ShowTotalWin=function(e){var t=e.data;this.winLineData[0]=StringUtil.numberFormat(t/100),this.showingMessageKey="common.system.you_won",this.displayMsg(Localization.Instance.getString(this.showingMessageKey.toString(),StringUtil.numberFormat(t/100)))},t.prototype.ShowPressToStart=function(e){CommonFunc.log("ShowPressToStart"),this.showingMessageKey="common.system.enter_base_game",this.displayMsg(Localization.Instance.getString(this.showingMessageKey.toString()))},t.prototype.ShowPressToFreeGame=function(e){this.showingMessageKey="common.system.enter_free_game",this.frontLabel.size=18,this.endLabel.size=18,this.displayMsg(Localization.Instance.getString(this.showingMessageKey.toString()))},t.prototype.ShowPressToFeature=function(e){this.showingMessageKey="common.system.enter_feature_game",this.frontLabel.size=18,this.endLabel.size=18,this.displayMsg(Localization.Instance.getString(this.showingMessageKey.toString()))},t.prototype.ShowGameOver=function(e){this.showingMessageKey="common.system.game_over",this.displayMsg(Localization.Instance.getString(this.showingMessageKey.toString()))},t.prototype.ShowGoodLuck=function(e){this.showingMessageKey="common.system.good_luck",this.displayMsg(Localization.Instance.getString(this.showingMessageKey.toString()))},t.prototype.ShowWinFreeGame=function(e){var t=e.data;GameConfig.customFeatureTriggerMessage?this.showingMessageKey=GameConfig.GameCode+".system.won_free_spins":this.showingMessageKey="common.system.won_free_spins";for(var n=0;ni?this.scroller.viewport.scrollV=0:i>this.scrollDiff?this.scroller.viewport.scrollV=this.scrollDiff:this.scroller.viewport.scrollV=i},t.prototype.CreateHeaderLabel=function(e){var t=new eui.Label,n=this.tagStyleList.h;return t.text=e,t.size=n.size,"true"==n.bold&&(t.bold=!0),"true"==n.italic&&(t.italic=!0),t.textColor=parseInt(n.color,16),t.width=this.scroller.width-30,t.wordWrap=!0,t},t.prototype.CreateTitleLabel=function(e){var t=new eui.Label,n=this.tagStyleList.t;return t.text=e,t.size=n.size,"true"==n.bold&&(t.bold=!0),"true"==n.italic&&(t.italic=!0),t.textColor=parseInt(n.color,16),t.width=this.scroller.width-30,t.wordWrap=!0,t},t.prototype.CreateDescriptionLabel=function(e){var t=new eui.Label,n=this.tagStyleList.d;return t.text=e,t.size=n.size,"true"==n.bold&&(t.bold=!0),"true"==n.italic&&(t.italic=!0),t.textColor=parseInt(n.color,16),t.width=this.scroller.width-30,t.wordWrap=!0,t},t.prototype.CreateStatementLabel=function(e){var t=new eui.Label,n=this.tagStyleList.s;return t.text=e,t.size=n.size,"true"==n.bold&&(t.bold=!0),"true"==n.italic&&(t.italic=!0),t.textColor=parseInt(n.color,16),t.width=this.scroller.width-30,t.wordWrap=!0,t},t.prototype.CreateBlankLabel=function(e){var t=new eui.Label,n=this.tagStyleList.b;return t.text=e,t.size=n.size,t.textColor=parseInt(n.color,16),t},Object.defineProperty(t.prototype,"scrollSpeed",{get:function(){return this.m_ScrollSpeed},set:function(e){this.m_ScrollSpeed=e},enumerable:!0,configurable:!0}),t.prototype.updateDisplayList=function(t,n){e.prototype.updateDisplayList.call(this,t,n),isIOS13Safari()&&(this.GameRuleGroup.top=50,this.GameRuleGroup.height=550,this.scroller.height=500,this.grpContent.height=500,this.GameBG.visible=!1)},t}(eui.Component);__reflect(GameRules.prototype,"GameRules");var GameRulesOverlayHandler=function(e){function t(t){void 0===t&&(t=SceneType.Unknown);var n=e.call(this)||this;return n.hasExtraResource=!0,n}return __extends(t,e),t.prototype.GetRelatedgroupList=function(){return RES.isGroupLoaded(RESGroupKey.RankingMobile)?[]:RES.isGroupLoaded(RESGroupKey.BetlogCommon)?[]:[RESGroupKey.GameRules]},t.prototype.CreateSceneAndController=function(){this.processIndicator.Hide();var e=new GameRules;e.name="GameRules",GameLayer.GetInstance().AddObjectToLayer(e,Layer.Overlay)},t.prototype.LoadExtraResource=function(){this.IsRuleContentAndStyleLoaded()?this.CreateSceneAndController():this.LoadRuleContent()},t.prototype.IsRuleContentAndStyleLoaded=function(){return!1},t.prototype.LoadRuleContent=function(){var e=0==GameConfig.GetGeneralRuleURL().indexOf("//"),t=(e?window.location.protocol:"")+GameConfig.GetGeneralRuleURL()+"?t="+(new Date).getTime(),n=new egret.HttpRequest;n.responseType=egret.HttpResponseType.TEXT,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),n.addEventListener(egret.IOErrorEvent.IO_ERROR,this.LoadRuleContentFailed,this),n.addEventListener(egret.Event.COMPLETE,function(e){var t=n.response;this.OnRuleContentLoaded(t)},this),n.open(t,egret.HttpMethod.GET),n.send()},t.prototype.LoadRuleContentFailed=function(e){GameConfig.isGeneralRuleEnabled=!1,this.processIndicator.Hide()},t.prototype.OnRuleContentLoaded=function(e){GameConfig.ruleContent=e,this.LoadRuleStyle()},t.prototype.LoadRuleStyle=function(){var e=0==GameConfig.GetGeneralRuleSettingURL().indexOf("//"),t=(e?window.location.protocol:"")+GameConfig.GetGeneralRuleSettingURL()+"?t="+(new Date).getTime(),n=new egret.HttpRequest;n.responseType=egret.HttpResponseType.TEXT,n.setRequestHeader("Content-Type","application/x-www-form-urlencoded;charset=UTF-8"),n.addEventListener(egret.IOErrorEvent.IO_ERROR,this.LoadRuleStyleFailed,this),n.addEventListener(egret.Event.COMPLETE,function(e){var t=n.response;this.OnRuleStyleLoaded(t)},this),n.open(t,egret.HttpMethod.GET),n.send()},t.prototype.LoadRuleStyleFailed=function(){GameConfig.ruleStyle='\n\n