c.AnimationManager.prototype={loadFrameData:function(a,b){if(void0===a)return!1;if(this.isLoaded)for(varcinthis._anims)this._anims[c].updateFrameData(a);returnthis._frameData=a,void0===b||null===b?this.frame=0:"string"==typeofb?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},copyFrameData:function(a,b){if(this._frameData=a.clone(),this.isLoaded)for(varcinthis._anims)this._anims[c].updateFrameData(this._frameData);returnvoid0===b||null===b?this.frame=0:"string"==typeofb?this.frameName=b:this.frame=b,this.isLoaded=!0,!0},add:function(a,b,d,e,f){returnb=b||[],d=d||60,void0===e&&(e=!1),void0===f&&(f=!(!b||"number"!=typeofb[0])),this._outputFrames=[],this._frameData.getFrameIndexes(b,f,this._outputFrames),this._anims[a]=newc.Animation(this.game,this.sprite,a,this._frameData,this._outputFrames,d,e),this.currentAnim=this._anims[a],this.sprite.tilingTexture&&(this.sprite.refreshTexture=!0),this._anims[a]},validateFrames:function(a,b){void0===b&&(b=!0);for(varc=0;c<a.length;c++)if(b===!0){if(a[c]>this._frameData.total)return!1}elseif(this._frameData.checkFrameName(a[c])===!1)return!1;return!0},play:function(a,b,c,d){if(this._anims[a])returnthis.currentAnim===this._anims[a]?this.currentAnim.isPlaying===!1?(this.currentAnim.paused=!1,this.currentAnim.play(b,c,d)):this.currentAnim:(this.currentAnim&&this.currentAnim.isPlaying&&this.currentAnim.stop(),this.currentAnim=this._anims[a],this.currentAnim.paused=!1,this.currentFrame=this.currentAnim.currentFrame,this.currentAnim.play(b,c,d))},stop:function(a,b){void0===b&&(b=!1),!this.currentAnim||"string"==typeofa&&a!==this.currentAnim.name||this.currentAnim.stop(b)},update:function(){return!(this.updateIfVisible&&!this.sprite.visible)&&(!(!this.currentAnim||!this.currentAnim.update())&&(this.currentFrame=this.currentAnim.currentFrame,!0))},next:function(a){this.currentAnim&&(this.currentAnim.next(a),this.currentFrame=this.currentAnim.currentFrame)},previous:function(a){this.currentAnim&&(this.currentAnim.previous(a),this.currentFrame=this.currentAnim.currentFrame)},getAnimation:function(a){return"string"==typeofa&&this._anims[a]?this._anims[a]:null},refreshFrame:function(){},destroy:function(){vara=null;for(varainthis._anims)this._anims.hasOwnProperty(a)&&this._anims[a].destroy();this._anims={},this._outputFrames=[],this._frameData=null,this.currentAnim=null,this.currentFrame=null,this.sprite=null,this.game=null}},c.AnimationManager.prototype.constructor=c.AnimationManager,Object.defineProperty(c.AnimationManager.prototype,"frameData",{get:function(){returnthis._frameData}}),Object.defineProperty(c.AnimationManager.prototype,"frameTotal",{get:function(){returnthis._frameData.total}}),Object.defineProperty(c.AnimationManager.prototype,"paused",{get:function(){returnthis.currentAnim.isPaused},set:function(a){this.currentAnim.paused=a}}),Object.defineProperty(c.AnimationManager.prototype,"name",{get:function(){if(this.currentAnim)returnthis.currentAnim.name}}),Object.defineProperty(c.AnimationManager.prototype,"frame",{get:function(){if(this.currentFrame)returnthis.currentFrame.index},set:function(a){"number"==typeofa&&this._frameData&&null!==this._frameData.getFrame(a)&&(this.currentFrame=this._frameData.getFrame(a),this.currentFrame&&this.sprite.setFrame(this.currentFrame))}}),Object.defineProperty(c.AnimationManager.prototype,"frameName",{get:function(){if(this.currentFrame)returnthis.currentFrame.name},set:function(a){"string"==typeofa&&this._frameData&&null!==this._frameData.getFrameByName(a)?(this.currentFrame=this._frameData.getFrameByName(a),this.currentFrame&&(this._frameIndex=this.currentFrame.index,this.sprite.setFrame(this.currentFrame))):console.warn("Cannot set frameName: "+a)}}),c.Animation=function(a,b,d,e,f,g,h){void0===h&&(h=!1),this.game=a,this._parent=b,this._frameData=e,this.name=d,this._frames=[],this._frames=this._frames.concat(f),this.delay=1e3/g,this.loop=h,this.loopCount=0,this.killOnComplete=!1,this.isFinished=!1,this.isPlaying=!1,this.isPaused=!1,this._pauseStartTime=0,this._frameIndex=0,this._frameDiff=0,this._frameSkip=
this;vare={type:"packfile",key:a,url:b,path:this.path,syncPoint:!0,data:null,loading:!1,loaded:!1,error:!1,callbackContext:d};c&&("string"==typeofc&&(c=JSON.parse(c)),e.data=c||{},e.loaded=!0);for(varf=0;f<this._fileList.length+1;f++){varg=this._fileList[f];if(!g||!g.loaded&&!g.loading&&"packfile"!==g.type){this._fileList.splice(f,0,e),this._totalPackCount++;break}}returnthis},image:function(a,b,c){return"object"==typeofb?this.texture(a,b,c):this.addToFileList("image",a,b,void0,c,".png")},texture:function(a,b,d){if(this.game.renderType===c.WEBGL){vare,f=this.game.renderer.extensions.compression;for(einb)if(e.toUpperCase()inf)returnthis.addToFileList("texture",a,b[e],void0,d,".pvr")}returnb.truecolor&&this.addToFileList("image",a,b.truecolor,void0,d,".png"),this},images:function(a,b){if(Array.isArray(b))for(varc=0;c<a.length;c++)this.image(a[c],b[c]);elsefor(varc=0;c<a.length;c++)this.image(a[c]);returnthis},text:function(a,b,c){returnthis.addToFileList("text",a,b,void0,c,".txt")},json:function(a,b,c){returnthis.addToFileList("json",a,b,void0,c,".json")},shader:function(a,b,c){returnthis.addToFileList("shader",a,b,void0,c,".frag")},xml:function(a,b,c){returnthis.addToFileList("xml",a,b,void0,c,".xml")},script:function(a,b,c,d){returnvoid0===c&&(c=!1),c!==!1&&void0===d&&(d=this),this.addToFileList("script",a,b,{syncPoint:!0,callback:c,callbackContext:d},!1,".js")},binary:function(a,b,c,d){returnvoid0===c&&(c=!1),c!==!1&&void0===d&&(d=c),this.addToFileList("binary",a,b,{callback:c,callbackContext:d},!1,".bin")},spritesheet:function(a,b,c,d,e,f,g){returnvoid0===e&&(e=-1),void0===f&&(f=0),void0===g&&(g=0),this.addToFileList("spritesheet",a,b,{frameWidth:c,frameHeight:d,frameMax:e,margin:f,spacing:g},!1,".png")},audio:function(a,b,c){returnthis.game.sound.noAudio?this:(void0===c&&(c=!0),"string"==typeofb&&(b=[b]),this.addToFileList("audio",a,b,{buffer:null,autoDecode:c}))},audioSprite:function(a,b,c,d,e){returnthis.game.sound.noAudio?this:(void0===c&&(c=null),void0===d&&(d=null),void0===e&&(e=!0),this.audio(a,b,e),c?this.json(a+"-audioatlas",c):d?("string"==typeofd&&(d=JSON.parse(d)),this.cache.addJSON(a+"-audioatlas","",d)):console.warn("Phaser.Loader.audiosprite - You must specify either a jsonURL or provide a jsonData object"),this)},audiosprite:function(a,b,c,d,e){returnthis.audioSprite(a,b,c,d,e)},video:function(a,b,c,d){returnvoid0===c&&(c=this.game.device.firefox?"loadeddata":"canplaythrough"),void0===d&&(d=!1),"string"==typeofb&&(b=[b]),this.addToFileList("video",a,b,{buffer:null,asBlob:d,loadEvent:c})},tilemap:function(a,b,d,e){if(void0===b&&(b=null),void0===d&&(d=null),void0===e&&(e=c.Tilemap.CSV),b||d||(b=e===c.Tilemap.CSV?a+".csv":a+".json"),d){switch(e){casec.Tilemap.CSV:break;casec.Tilemap.TILED_JSON:"string"==typeofd&&(d=JSON.parse(d))}this.cache.addTilemap(a,null,d,e)}elsethis.addToFileList("tilemap",a,b,{format:e});returnthis},physics:function(a,b,d,e){returnvoid0===b&&(b=null),void0===d&&(d=null),void0===e&&(e=c.Physics.LIME_CORONA_JSON),b||d||(b=a+".json"),d?("string"==typeofd&&(d=JSON.parse(d)),this.cache.addPhysicsData(a,null,d,e)):this.addToFileList("physics",a,b,{format:e}),this},bitmapFont:function(a,b,c,d,e,f){if(void0!==b&&null!==b||(b=a+".png"),void0===c&&(c=null),void0===d&&(d=null),null===c&&null===d&&(c=a+".xml"),void0===e&&(e=0),void0===f&&(f=0),c)this.addToFileList("bitmapfont",a,b,{atlasURL:c,xSpacing:e,ySpacing:f});elseif("string"==typeofd){varg,h;try{g=JSON.parse(d)}catch(a){h=this.parseXml(d)}if(!h&&!g)thrownewError("Phaser.Loader. Invalid Bitmap Font atlas given");this.addToFileList("bitmapfont",a,b,{atlasURL:null,atlasData:g||h,atlasType:g?"json":"xml",xSpacing:e,ySpacing:f})}returnthis},atlasJSONArray:function(a,b,d,e){returnthis.atlas(a,b,d,e,c.Loader.TEXTURE_ATLAS_JSON_ARRAY)},atlasJSONHash:function(a,b,d,e){returnthis.atlas(a,b,d,e,c.Loader.TEXTURE_ATLAS_JSON_HASH)},atlasXML:function(a,b,d,e){returnvoid0===d&&(d=null),void0===e&&(e=null),d||e||(d=a+".xml"),this.atlas(a,b,d,e,c.Loader.TEXTURE_ATLAS_XML_STARL
}elsethis._sound.currentTime=this._tempPause,this._sound.play();this.isPlaying=!0,this.paused=!1,this.startTime+=this.game.time.time-this.pausedTime,this.onResume.dispatch(this)}},stop:function(){if(this.isPlaying&&this._sound)if(this.usingWebAudio){if(void0===this._sound.stop)this._sound.noteOff(0);elsetry{this._sound.stop(0)}catch(a){}this.externalNode?this._sound.disconnect(this.externalNode):this.gainNode&&this._sound.disconnect(this.gainNode)}elsethis.usingAudioTag&&(this._sound.pause(),this._sound.currentTime=0);if(this.pendingPlayback=!1,this.isPlaying=!1,!this.paused){vara=this.currentMarker;""!==this.currentMarker&&this.onMarkerComplete.dispatch(this.currentMarker,this),this.currentMarker="",null!==this.fadeTween&&this.fadeTween.stop(),this.onStop.dispatch(this,a)}},fadeIn:function(a,b,c){void0===b&&(b=!1),void0===c&&(c=this.currentMarker),this.paused||(this.play(c,0,0,b),this.fadeTo(a,1))},fadeOut:function(a){this.fadeTo(a,0)},fadeTo:function(a,b){if(this.isPlaying&&!this.paused&&b!==this.volume){if(void0===a&&(a=1e3),void0===b)returnvoidconsole.warn("Phaser.Sound.fadeTo: No Volume Specified.");this.fadeTween=this.game.add.tween(this).to({volume:b},a,c.Easing.Linear.None,!0),this.fadeTween.onComplete.add(this.fadeComplete,this)}},fadeComplete:function(){this.onFadeComplete.dispatch(this,this.volume),0===this.volume&&this.stop()},updateGlobalVolume:function(a){this.usingAudioTag&&this._sound&&(this._sound.volume=a*this._volume)},destroy:function(a){void0===a&&(a=!0),this.stop(),a?this.game.sound.remove(this):(this.markers={},this.context=null,this._buffer=null,this.externalNode=null,this.onDecoded.dispose(),this.onPlay.dispose(),this.onPause.dispose(),this.onResume.dispose(),this.onLoop.dispose(),this.onStop.dispose(),this.onMute.dispose(),this.onMarkerComplete.dispose())}},c.Sound.prototype.constructor=c.Sound,Object.defineProperty(c.Sound.prototype,"isDecoding",{get:function(){returnthis.game.cache.getSound(this.key).isDecoding}}),Object.defineProperty(c.Sound.prototype,"isDecoded",{get:function(){returnthis.game.cache.isSoundDecoded(this.key)}}),Object.defineProperty(c.Sound.prototype,"mute",{get:function(){returnthis._muted||this.game.sound.mute},set:function(a){a=a||!1,a!==this._muted&&(a?(this._muted=!0,this._muteVolume=this._tempVolume,this.usingWebAudio?this.gainNode.gain.value=0:this.usingAudioTag&&this._sound&&(this._sound.volume=0)):(this._muted=!1,this.usingWebAudio?this.gainNode.gain.value=this._muteVolume:this.usingAudioTag&&this._sound&&(this._sound.volume=this._muteVolume)),this.onMute.dispatch(this))}}),Object.defineProperty(c.Sound.prototype,"volume",{get:function(){returnthis._volume},set:function(a){returnthis.game.device.firefox&&this.usingAudioTag&&(a=this.game.math.clamp(a,0,1)),this._muted?void(this._muteVolume=a):(this._tempVolume=a,this._volume=a,void(this.usingWebAudio?this.gainNode.gain.value=a:this.usingAudioTag&&this._sound&&(this._sound.volume=a)))}}),c.SoundManager=function(a){this.game=a,this.onSoundDecode=newc.Signal,this.onVolumeChange=newc.Signal,this.onMute=newc.Signal,this.onUnMute=newc.Signal,this.context=null,this.usingWebAudio=!1,this.usingAudioTag=!1,this.noAudio=!1,this.connectToMaster=!0,this.touchLocked=!1,this.channels=32,this.muteOnPause=!0,this._codeMuted=!1,this._muted=!1,this._unlockSource=null,this._volume=1,this._sounds=[],this._watchList=newc.ArraySet,this._watching=!1,this._watchCallback=null,this._watchContext=null},c.SoundManager.prototype={boot:function(){if(this.game.device.iOS&&this.game.device.webAudio===!1&&(this.channels=1),window.PhaserGlobal){if(window.PhaserGlobal.disableAudio===!0)returnthis.noAudio=!0,void(this.touchLocked=!1);if(window.PhaserGlobal.disableWebAudio===!0)returnthis.usingAudioTag=!0,void(this.touchLocked=!1)}if(window.PhaserGlobal&&window.PhaserGlobal.audioContext)this.context=window.PhaserGlobal.audioContext;elseif(window.AudioContext)try{this.context=newwindow.AudioContext}catch(a){this.context=null,this.usingWebAudio=!1,this.touchLocked=!1}elseif(window.webkitAudioContext)try{this.context=newwindow.w
this.collisionCallbackContext=this},c.Tile.prototype={containsPoint:function(a,b){return!(a<this.worldX||b<this.worldY||a>this.right||b>this.bottom)},intersects:function(a,b,c,d){return!(c<=this.worldX)&&(!(d<=this.worldY)&&(!(a>=this.worldX+this.width)&&!(b>=this.worldY+this.height)))},setCollisionCallback:function(a,b){this.collisionCallback=a,this.collisionCallbackContext=b},destroy:function(){this.collisionCallback=null,this.collisionCallbackContext=null,this.properties=null},setCollision:function(a,b,c,d){this.collideLeft=a,this.collideRight=b,this.collideUp=c,this.collideDown=d,this.faceLeft=a,this.faceRight=b,this.faceTop=c,this.faceBottom=d},resetCollision:function(){this.collideLeft=!1,this.collideRight=!1,this.collideUp=!1,this.collideDown=!1,this.faceTop=!1,this.faceBottom=!1,this.faceLeft=!1,this.faceRight=!1},isInteresting:function(a,b){returna&&b?this.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.faceTop||this.faceBottom||this.faceLeft||this.faceRight||this.collisionCallback:a?this.collideLeft||this.collideRight||this.collideUp||this.collideDown:!!b&&(this.faceTop||this.faceBottom||this.faceLeft||this.faceRight)},copy:function(a){this.index=a.index,this.alpha=a.alpha,this.properties=a.properties,this.collideUp=a.collideUp,this.collideDown=a.collideDown,this.collideLeft=a.collideLeft,this.collideRight=a.collideRight,this.collisionCallback=a.collisionCallback,this.collisionCallbackContext=a.collisionCallbackContext}},c.Tile.prototype.constructor=c.Tile,Object.defineProperty(c.Tile.prototype,"collides",{get:function(){returnthis.collideLeft||this.collideRight||this.collideUp||this.collideDown}}),Object.defineProperty(c.Tile.prototype,"canCollide",{get:function(){returnthis.collideLeft||this.collideRight||this.collideUp||this.collideDown||this.collisionCallback}}),Object.defineProperty(c.Tile.prototype,"left",{get:function(){returnthis.worldX}}),Object.defineProperty(c.Tile.prototype,"right",{get:function(){returnthis.worldX+this.width}}),Object.defineProperty(c.Tile.prototype,"top",{get:function(){returnthis.worldY}}),Object.defineProperty(c.Tile.prototype,"bottom",{get:function(){returnthis.worldY+this.height}}),c.Tilemap=function(a,b,d,e,f,g){this.game=a,this.key=b;varh=c.TilemapParser.parse(this.game,b,d,e,f,g);null!==h&&(this.width=h.width,this.height=h.height,this.tileWidth=h.tileWidth,this.tileHeight=h.tileHeight,this.orientation=h.orientation,this.format=h.format,this.version=h.version,this.properties=h.properties,this.widthInPixels=h.widthInPixels,this.heightInPixels=h.heightInPixels,this.layers=h.layers,this.tilesets=h.tilesets,this.imagecollections=h.imagecollections,this.tiles=h.tiles,this.objects=h.objects,this.collideIndexes=[],this.collision=h.collision,this.images=h.images,this.enableDebug=!1,this.currentLayer=0,this.debugMap=[],this._results=[],this._tempA=0,this._tempB=0)},c.Tilemap.CSV=0,c.Tilemap.TILED_JSON=1,c.Tilemap.NORTH=0,c.Tilemap.EAST=1,c.Tilemap.SOUTH=2,c.Tilemap.WEST=3,c.Tilemap.prototype={create:function(a,b,c,d,e,f){returnvoid0===f&&(f=this.game.world),this.width=b,this.height=c,this.setTileSize(d,e),this.layers.length=0,this.createBlankLayer(a,b,c,d,e,f)},setTileSize:function(a,b){this.tileWidth=a,this.tileHeight=b,this.widthInPixels=this.width*a,this.heightInPixels=this.height*b},addTilesetImage:function(a,b,d,e,f,g,h){if(void0===a)returnnull;void0===d&&(d=this.tileWidth),void0===e&&(e=this.tileHeight),void0===f&&(f=0),void0===g&&(g=0),void0===h&&(h=0),0===d&&(d=32),0===e&&(e=32);vari=null;if(void0!==b&&null!==b||(b=a),binstanceofc.BitmapData)i=b.canvas;else{if(!this.game.cache.checkImageKey(b))returnconsole.warn('Phaser.Tilemap.addTilesetImage: Invalid image key given: "'+b+'"'),null;i=this.game.cache.getImage(b)}varj=this.getTilesetIndex(a);if(null===j&&this.format===c.Tilemap.TILED_JSON)returnconsole.warn('Phaser.Tilemap.addTilesetImage: No data found in the JSON matching the tileset name: "'+a+'"'),null;if(this.tilesets[j])returnthis.tilesets[j].setImage(i),this.tilesets[j];vark=newc.Tileset(a,h,d,e,f,g,{});k.setImage(i),t
F[H.name].push(J)}elseif(H.objects[I].polyline){varJ={name:H.objects[I].name,type:H.objects[I].type,x:H.objects[I].x,y:H.objects[I].y,width:H.objects[I].width,height:H.objects[I].height,visible:H.objects[I].visible,properties:H.objects[I].properties};H.objects[I].rotation&&(J.rotation=H.objects[I].rotation),J.polyline=[];for(varK=0;K<H.objects[I].polyline.length;K++)J.polyline.push([H.objects[I].polyline[K].x,H.objects[I].polyline[K].y]);G[H.name].push(J),F[H.name].push(J)}elseif(H.objects[I].polygon){varJ=b(H.objects[I],["name","type","x","y","visible","rotation","properties"]);J.polygon=[];for(varK=0;K<H.objects[I].polygon.length;K++)J.polygon.push([H.objects[I].polygon[K].x,H.objects[I].polygon[K].y]);F[H.name].push(J)}elseif(H.objects[I].ellipse){varJ=b(H.objects[I],["name","type","ellipse","x","y","width","height","visible","rotation","properties"]);F[H.name].push(J)}else{varJ=b(H.objects[I],["name","type","x","y","width","height","visible","rotation","properties"]);J.rectangle=!0,F[H.name].push(J)}}d.objects=F,d.collision=G,d.tiles=[];for(varf=0;f<d.tilesets.length;f++)for(varB=d.tilesets[f],q=B.tileMargin,L=B.tileMargin,M=0,N=0,O=0,t=B.firstgid;t<B.firstgid+B.total&&(d.tiles[t]=[q,L,f],q+=B.tileWidth+B.tileSpacing,M++,M!==B.total)&&(N++,N!==B.columns||(q=B.tileMargin,L+=B.tileHeight+B.tileSpacing,N=0,O++,O!==B.rows));t++);for(varl,u,P,B,f=0;f<d.layers.length;f++){l=d.layers[f],B=null;for(vark=0;k<l.data.length;k++){r=l.data[k];for(varQ=0;Q<r.length;Q++)u=r[Q],null===u||u.index<0||(P=d.tiles[u.index][2],B=d.tilesets[P],B.tileProperties&&B.tileProperties[u.index-B.firstgid]&&(u.properties=c.Utils.mixin(B.tileProperties[u.index-B.firstgid],u.properties)))}}returnd}},c.Tileset=function(a,b,c,d,e,f,g){(void0===c||c<=0)&&(c=32),(void0===d||d<=0)&&(d=32),void0===e&&(e=0),void0===f&&(f=0),this.name=a,this.firstgid=0|b,this.tileWidth=0|c,this.tileHeight=0|d,this.tileMargin=0|e,this.tileSpacing=0|f,this.properties=g||{},this.image=null,this.rows=0,this.columns=0,this.total=0,this.drawCoords=[]},c.Tileset.prototype={draw:function(a,b,c,d){vare=d-this.firstgid<<1;e>=0&&e+1<this.drawCoords.length&&a.drawImage(this.image,this.drawCoords[e],this.drawCoords[e+1],this.tileWidth,this.tileHeight,b,c,this.tileWidth,this.tileHeight)},containsTileIndex:function(a){returna>=this.firstgid&&a<this.firstgid+this.total},setImage:function(a){this.image=a,this.updateTileData(a.width,a.height)},setSpacing:function(a,b){this.tileMargin=0|a,this.tileSpacing=0|b,this.image&&this.updateTileData(this.image.width,this.image.height)},updateTileData:function(a,b){varc=(b-2*this.tileMargin+this.tileSpacing)/(this.tileHeight+this.tileSpacing),d=(a-2*this.tileMargin+this.tileSpacing)/(this.tileWidth+this.tileSpacing);c%1===0&&d%1===0||console.warn("Phaser.Tileset - "+this.name+" image tile area is not an even multiple of tile size"),c=Math.floor(c),d=Math.floor(d),(this.rows&&this.rows!==c||this.columns&&this.columns!==d)&&console.warn("Phaser.Tileset - actual and expected number of tile rows and columns differ"),this.rows=c,this.columns=d,this.total=c*d,this.drawCoords.length=0;for(vare=this.tileMargin,f=this.tileMargin,g=0;g<this.rows;g++){for(varh=0;h<this.columns;h++)this.drawCoords.push(e),this.drawCoords.push(f),e+=this.tileWidth+this.tileSpacing;e=this.tileMargin,f+=this.tileHeight+this.tileSpacing}}},c.Tileset.prototype.constructor=c.Tileset,c.Particle=function(a,b,d,e,f){c.Sprite.call(this,a,b,d,e,f),this.autoScale=!1,this.scaleData=null,this._s=0,this.autoAlpha=!1,this.alphaData=null,this._a=0},c.Particle.prototype=Object.create(c.Sprite.prototype),c.Particle.prototype.constructor=c.Particle,c.Particle.prototype.update=function(){this.autoScale&&(this._s--,this._s?this.scale.set(this.scaleData[this._s].x,this.scaleData[this._s].y):this.autoScale=!1),this.autoAlpha&&(this._a--,this._a?this.alpha=this.alphaData[this._a].v:this.autoAlpha=!1)},c.Particle.prototype.onEmit=function(){},c.Particle.prototype.setAlphaData=function(a){this.alphaData=a,this._a=a.length-1,this.alpha=this.alphaData[this._a].v,this.autoAlpha=!0},c.Pa
this.game.input.touch.addTouchLockCallback(this.unlock,this),this.touchLocked=!0},unlock:function(){if(this.touchLocked=!1,this.video.play(),this.onPlay.dispatch(this,this.loop,this.playbackRate),this.key){vara=this.game.cache.getVideo(this.key);a&&!a.isBlob&&(a.locked=!1)}return!0},grab:function(a,b,c){returnvoid0===a&&(a=!1),void0===b&&(b=1),void0===c&&(c=null),null===this.snapshot?voidconsole.warn("Video.grab cannot run because Phaser.BitmapData is unavailable"):(a&&this.snapshot.cls(),this.snapshot.copy(this.video,0,0,this.width,this.height,0,0,this.width,this.height,0,0,0,1,1,b,c),this.snapshot)},removeVideoElement:function(){if(this.video){for(this.video.parentNode&&this.video.parentNode.removeChild(this.video);this.video.hasChildNodes();)this.video.removeChild(this.video.firstChild);this.video.removeAttribute("autoplay"),this.video.removeAttribute("src"),this.video=null}},destroy:function(){this.stop(),this.removeVideoElement(),this.touchLocked&&this.game.input.touch.removeTouchLockCallback(this.unlock,this),this._retryID&&window.clearTimeout(this._retryID)}},Object.defineProperty(c.Video.prototype,"currentTime",{get:function(){returnthis.video?this.video.currentTime:0},set:function(a){this.video.currentTime=a}}),Object.defineProperty(c.Video.prototype,"duration",{get:function(){returnthis.video?this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"progress",{get:function(){returnthis.video?this.video.currentTime/this.video.duration:0}}),Object.defineProperty(c.Video.prototype,"mute",{get:function(){returnthis._muted},set:function(a){if(a=a||null){if(this._muted)return;this._codeMuted=!0,this.setMute()}else{if(!this._muted)return;this._codeMuted=!1,this.unsetMute()}}}),Object.defineProperty(c.Video.prototype,"paused",{get:function(){returnthis._paused},set:function(a){if(a=a||null,!this.touchLocked)if(a){if(this._paused)return;this._codePaused=!0,this.setPause()}else{if(!this._paused)return;this._codePaused=!1,this.setResume()}}}),Object.defineProperty(c.Video.prototype,"volume",{get:function(){returnthis.video?this.video.volume:1},set:function(a){a<0?a=0:a>1&&(a=1),this.video&&(this.video.volume=a)}}),Object.defineProperty(c.Video.prototype,"playbackRate",{get:function(){returnthis.video?this.video.playbackRate:1},set:function(a){this.video&&(this.video.playbackRate=a)}}),Object.defineProperty(c.Video.prototype,"loop",{get:function(){return!!this.video&&this.video.loop},set:function(a){a&&this.video?this.video.loop="loop":this.video&&(this.video.loop="")}}),Object.defineProperty(c.Video.prototype,"playing",{get:function(){return!(this.video.paused&&this.video.ended)}}),c.Video.prototype.constructor=c.Video,void0===PIXI.blendModes&&(PIXI.blendModes=c.blendModes),void0===PIXI.scaleModes&&(PIXI.scaleModes=c.scaleModes),void0===PIXI.Texture.emptyTexture&&(PIXI.Texture.emptyTexture=newPIXI.Texture(newPIXI.BaseTexture)),void0===PIXI.DisplayObject._tempMatrix&&(PIXI.DisplayObject._tempMatrix=newPIXI.Matrix),void0===PIXI.RenderTexture.tempMatrix&&(PIXI.RenderTexture.tempMatrix=newPIXI.Matrix),PIXI.Graphics&&void0===PIXI.Graphics.POLY&&(PIXI.Graphics.POLY=c.POLYGON,PIXI.Graphics.RECT=c.RECTANGLE,PIXI.Graphics.CIRC=c.CIRCLE,PIXI.Graphics.ELIP=c.ELLIPSE,PIXI.Graphics.RREC=c.ROUNDEDRECTANGLE),PIXI.TextureSilentFail=!0,"undefined"!=typeofexports?("undefined"!=typeofmodule&&module.exports&&(exports=module.exports=c),exports.Phaser=c):"undefined"!=typeofdefine&&define.amd?define("Phaser",function(){returnb.Phaser=c}()):b.Phaser=c,c}.call(this);