var qqPlayCoreBuildInfo = { buildPath:'master',version:'3fd501f',creator:'northka',buildTime:'Thu Dec 20 2018 19:45:21 GMT+0800 (GMT+08:00)'};var hasBK=!("object"!=typeof BK),isBrowser=!hasBK;if(isBrowser)"undefined"!=typeof BK==0&&(BK={isBrowser:!0}),function(i){BK.buildInfo={debug:!1,branch:"master",version:"3fd501f",creater:"northka",buildTime:"Thu Dec 20 2018 19:45:07 GMT+0800 (GMT+08:00)"};var r={};function n(t){if(r[t])return r[t].exports;var e=r[t]={i:t,l:!1,exports:{}};return i[t].call(e.exports,e,e.exports,n),e.l=!0,e.exports}n.m=i,n.c=r,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(i,r,function(t){return e[t]}.bind(null,r));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=49)}({1:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(3),n=function(){function i(){}return i.ssoRequestCallBack=function(t,e,i){r.default.log(0,0,"ssoRequestCallBack cmd:"+e+" errCode:"+t+" data:"+JSON.stringify(i)),__dispatchEvent(t,i.cmd,JSON.stringify(i.data))},i.sendSSO=function(t,e){__browserMsgHdl.addListener("cs.ssoMessage.local",i,i.ssoRequestCallBack),i.send({cmd:e,data:JSON.stringify(t)},"cs.ssoMessage.local")},i.send=function(t,e){-1!=e.indexOf("cs.")&&-1!=e.indexOf(".local")?"undefined"!=typeof __browserMsg?__browserMsg.send(JSON.stringify(t),e):void 0!==window.webkit.messageHandlers&&window.webkit.messageHandlers.cmWebGameSend.postMessage({data:JSON.stringify(t),cmd:e}):i.sendSSO(t,e)},i.sendWebMessage=function(t,e){i.send({cmd:e,data:JSON.stringify(t)},"sc.web_callback_game.local")},i.addListener=function(t,e,i){__browserMsgHdl.addListener(t,e,i)},i.removeListener=function(t,e){__browserMsgHdl.removeListener(t,e)},i}();e.default=n},10:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(1),n=i(11),o=function(){function o(){}return o.base64ToUint8Array=function(t){var e,i,r,n,o,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=.75*t.length,h=t.length,l=0;"="===t[t.length-1]&&(s--,"="===t[t.length-2]&&s--);var c=new ArrayBuffer(s),u=new Uint8Array(c);for(e=0;e>4,u[l++]=(15&r)<<4|n>>2,u[l++]=(3&n)<<6|63&o;return u},o.upload=function(t,e,i){for(var r=1024>1&1&&310!==GameStatusInfo.src;return BK.Script.log(1,1,"redPackage isUserInRedPackageActivity: "+t),t},o.isOpenActivityPage=function(){var t=GameStatusInfo.commFlagBits>>2&1&&310!==GameStatusInfo.src;return BK.Script.log(1,1,"redPackage isOpenActivityPage: "+t),t},o.showRedPackageActivityPage=function(){if(o.isOpenActivityPage()&&0===c){var t="http://cmshow.qq.com/act_apollo/h5_act/gameRedPacket/html/popup.html?game_id="+GameStatusInfo.gameId+"&page=ad&_cwv=1&wv=3&adtag=engine";BK.Script.log(1,0,"redPackage \u6253\u5f00\u6e38\u620f\u6d6e\u5c42 :"+t),h.default.openTransparent(t),c++}},o.checkNewRedPackage=function(){if(o.isUserInRedPackageActivity()){var t={cmd:"apollo_router_light.apollo_activity_linkcmd_query_new_redpacket",gameId:GameStatusInfo.gameId.toString()};BK.MQQ.SsoRequest.send(t,"apollo_router_light.apollo_activity_linkcmd_query_new_redpacket")}},o.onNewRedPackage=function(t,e,i){if(BK.Script.log(1,0,"BK.QQ.onNewRedPackage redPackage errCode = "+t+" cmd = "+e+" data = "+JSON.stringify(i)),0===t)if(i.data&&i.data.redPacket&&i.data.redPacket.actId&&i.data.redPacket.taskId){var r=i.data.redPacket,n="http://cmshow.qq.com/act_apollo/h5_act/gameRedPacket/html/popup.html?game_id="+GameStatusInfo.gameId+"&page=task&task_id="+r.taskId+"&_cwv=1&wv=3&adtag=engine";h.default.openTransparent(n)}else BK.Script.log(1,0,"request new red package redPackage ,\u6ca1\u6709\u65b0\u7ea2\u5305\u4efb\u52a1\u89e6\u53d1");else BK.Script.log(1,0,"request new red package Failed! redPackage ErrCode:"+t)},o.skipGame=function(t,e){var i={xyId:t,extendInfo:e,src:302};l.default.send(i,"cs.create_xy.local");var r=new Date,n=""+r.getFullYear()+(r.getMonth()+1)+r.getDate()+r.getHours();o.uploadData("gameAtoB","302","1",t,n,"")},o.CMSHOW_SRV_GET_RANK_LIST="apollo_router_game.game_rank_linkcmd_get_fri_rank_for_engine",o}();e.default=o},12:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=i(1),r=function(){function n(){}return n.open=function(t){o.default.send({url:t},"cs.openWebView.local")},n.closeTransparent=function(t){o.default.send({taskId:t},"cs.closeWebview.local")},n.onMessageHandle=function(){},n.openTransparent=function(t,e,i){void 0===e&&(e=1);var r="cs.openWebViewWithoutUrl.local";i&&(__browserMsgHdl.removeListener(r,n),__browserMsgHdl.addListener(r,n,i)),o.default.send({url:t},r)},n}();e.default=r},3:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function o(){}return o.log=function(t,e,i){"undefined"!=typeof GameStatusInfo&&o.compareVersion(GameStatusInfo.QQVer,"7.6.0")&&("undefined"!=typeof __browserMsg?__browserMsg.log(t,e,"webGame_log",i,""):void 0!==window.webkit.messageHandlers&&window.webkit.messageHandlers.cmWebGameLog.postMessage({level:t,errcode:e,info1:"webGame_log",info2:i,info3:""}))},o.compareVersion=function(t,e){var i=t.split("."),r=e.split("."),n=Number(i[0])-Number(r[0]);return 0==n&&t!=e?o.compareVersion(i.splice(1).join("."),r.splice(1).join(".")):n},o.setErrorObserver=function(){},o}();e.default=r},49:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(50),n=i(10),o=i(51),a=i(11),s=i(3),h=i(1),l=i(12),c=i(52),u=i(53);BK.MQQ={},BK.MQQ.Webview=l.default,BK.MQQ.SsoRequest=h.default,BK.MQQ.Account=r.default,BK.FileUtil=n.default,BK.Script=s.default,BK.Game=o.default,BK.QQ=a.default,BK.Misc=c.default,BK.Room=u.default,window._globalErrorCallback_=function(){}},50:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(1),n=function(){function o(){}return o.accountCallBack=function(t,e,i){var r="0";1===i.nickname?r="1":1===i.avatar&&(r="2");var n=e+"_"+r;o.accountCallBackArr[n]&&(0,o.accountCallBackArr[n])(i.openId,i.data)},o.getNick=function(t,e){o.accountCallBackArr["cs.get_userInfo.local_1"]=e,r.default.addListener("cs.get_userInfo.local",this,this.accountCallBack),r.default.send({openId:t,nickname:1},"cs.get_userInfo.local")},o.getHead=function(t,e){o.accountCallBackArr["cs.get_userInfo.local_2"]=e,r.default.addListener("cs.get_userInfo.local",this,this.accountCallBack),r.default.send({openId:t,avatar:1},"cs.get_userInfo.local")},o.accountCallBackArr={},o}();e.default=n},51:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=i(1),n=function(){function t(){}return t.close=function(){r.default.sendWebMessage({},"cs.close_room.local")},t.packUp=function(){r.default.sendWebMessage({},"cs.make_room_min.local")},t.getGameStatusInfo=function(r){var t="cs.get_state_info.local";r&&(BK.MQQ.SsoRequest.removeListener(t,this),BK.MQQ.SsoRequest.addListener(t,this,function(t,e,i){r(t,i)})),BK.MQQ.SsoRequest.send({},t)},t}();e.default=n},52:function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){function t(){}return t.compQQVersion=function(t,e){for(var i=t.split("."),r=e.split("."),n=Math.min(3,Math.min(i.length,r.length)),o=0;or[o])return!1}return!1},t}();e.default=r},53:function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(){function t(){}return t.showOneMorePage=function(t,e){var r=[],n=0;if(e&&2===e.length){for(var o=0;o>1&1,e=t&&310!==GameStatusInfo.src;return BK.Script.log(1,1,"redPackage isUserInRedPackageActivity: "+e),e},this.isOpenActivityPage=function(){var t=GameStatusInfo.commFlagBits>>2&1,e=t&&310!==GameStatusInfo.src;return BK.Script.log(1,1,"redPackage isOpenActivityPage: "+e),e},this.showRedPackageActivityPage=function(){BK.Director.ticker.setTimeout(function(){var t="http://cmshow.qq.com/act_apollo/h5_act/gameRedPacket/html/popup.html?game_id="+GameStatusInfo.gameId+"&page=ad&_cwv=1&wv=3&adtag=engine";BK.MQQ.Webview.openTransparent(t)}.bind(this),100,this)},this.checkNewRedPackage=function(){if(this.isUserInRedPackageActivity()){var t={cmd:CMSHOW_SRV_CHECK_NEW_RED_PACKAGE,gameId:GameStatusInfo.gameId.toString()};BK.Script.log(1,1,"redPackage \u53d1\u9001\u65b0\u7ea2\u5305\u68c0\u67e5:"+JSON.stringify(t)),BK.MQQ.SsoRequest.send(t,CMSHOW_SRV_CHECK_NEW_RED_PACKAGE)}},this.onNewRedPackage=function(t,e,i){if(BK.Script.log(0,0,"BK.QQ.onNewRedPackage redPackage errCode = "+t+" cmd = "+e+" data = "+JSON.stringify(i)),0==t)if(i.data&&i.data.redPacket&&i.data.redPacket.actId&&i.data.redPacket.taskId){var r=i.data.redPacket,n="http://cmshow.qq.com/act_apollo/h5_act/gameRedPacket/html/popup.html?game_id="+GameStatusInfo.gameId+"&page=task&task_id="+r.taskId+"&_cwv=1&wv=3&adtag=engine";BK.MQQ.Webview.openTransparent(n)}else BK.Script.log(1,1,"request new red package redPackage ,\u6ca1\u6709\u65b0\u7ea2\u5305\u4efb\u52a1\u89e6\u53d1");else BK.Script.log(1,1,"request new red package Failed! redPackage ErrCode:"+t)}},void(0==currentRenderMode&&(BK.Script.renderMode=1,currentRenderMode=1))),BK.Room=function(){this.roomId,this.gameId,this.mId,this.ownerId,this.createTs,this.status,this.playerNum,this.ip0,this.ip1,this.msgSeq=1,this.ackSeq,this.lastFrame=0,this.startGameTs=0,this.createRoomCallBack,this.queryRoomInfoCallBack,this.joinRoomCallBack,this.leaveRoomCallBack,this.startGameCallBack,this.broadcastDataCallBack,this.sensitiveWordCallBack,this.setUserDataCallBack,this.getUserDataCallBack,this.sendSyncOptCallBack,this.forceStopGameCallBack,this.frameSyncListener,this.queryFrameDataCallBack,this.matchGameCallBack,this.queryMatchGameCallBack,this.quitMatchGameCallBack,this.disconnectNetCallBack,this.reJoinRoomCallBack,this.socket=new BK.Socket,this.reqArray=new Array,this.newJoinPlayers=[],this.currentPlayers=[],this.isCreator=1==GameStatusInfo.isMaster,this.gameStatusInfo=GameStatusInfo,this.serverConnected,this._environment=GameStatusInfo.isWhiteUser,this.headerVersion=769,this.recommandRoomSvrHost=NormalRecommandRoomSvrHost,this.recommandRoomSvrPort=NormalRecommandRoomSvrPort,this.netTimeOutTs=0,this.options=null,this.setArkData=function(t){BK.QQ.setArkData(t)},this.setRoomVol=function(t){BK.QQ.roomVol=t},this.read32BytesToString=function(t){for(var e="",i=0;i<32;i++){var r=t.readUint8Buffer();e+=String.fromCharCode(r)}return e},this.writeOpenIdIntoBuffer=function(t,e){var i=new BK.Buffer(32);if(e&&32==e.length)for(var r=0;r<32;r++){var n=e.charCodeAt(r);i.writeUint8Buffer(n)}else{for(r=0;r<32;r++)i.writeUint8Buffer(0);BK.Script.log(0,0,"writeOpenIdIntoBuffer.length is not 32 bytes,Write empty data")}t.writeBuffer(i)},this.addHeader=function(t,e,i){t.writeUint16Buffer(4660),t.writeUint16Buffer(this.headerVersion),t.writeUint16Buffer(0),t.writeUint16Buffer(i),t.writeUint32Buffer(e)},this.addFixedHeader=function(t,e,i,r,n,o,a,s,h){null==o&&(o=""),null==a&&(a=0),null==s&&(s=0),null==h&&(h=0),t.writeUint16Buffer(72),t.writeUint16Buffer(e),t.writeUint32Buffer(0),t.writeUint64Buffer(1111),t.writeUint64Buffer(i),t.writeUint64Buffer(r),this.writeOpenIdIntoBuffer(t,n),this.writeOpenIdIntoBuffer(t,o),t.writeUint64Buffer(a),t.writeUint64Buffer(s),t.writeUint64Buffer(h)},this.getHeader=function(t){var e=t.readUint16Buffer(),i=t.readUint16Buffer(),r=t.readUint16Buffer(),n=t.readUint16Buffer(),o=t.readUint32Buffer(),a=new Object;return a.magic=e,a.ver=i,a.stlen=n,a.bodyLen=o,a.seq=r,a},this.getFixedHeader=function(t){var e,i,r=t.readUint16Buffer(),n=t.readUint16Buffer(),o=t.readUint32Buffer(),a=t.readUint64Buffer(),s=t.readUint64Buffer(),h=t.readUint64Buffer();e=this.read32BytesToString(t),i=this.read32BytesToString(t);var l=t.readUint64Buffer(),c=t.readUint64Buffer(),u=t.readUint64Buffer(),_=new Object;return _.fixLen=r,_.cmd=n,_.ret=o,_.date=a,_.gameId=s,_.roomId=h,_.fromId=e,_.toId=i,_.token=l,_.appId=c,_.accessToken=u,_},this.getRequestCommonBuffer=function(t,e,i,r,n,o,a){var s,h,l=0;if(a&&(a.rewind(),l=a.length),h=new BK.Stream(BK.Security.getST()),s=new BK.Stream(fixedHeaderLen+l+n,1),this.addFixedHeader(s,t,e,i,r),0=this.curConnTimeout&&(this.curConnRetrys=this.curConnRetrys+1,this.curConnRetrys>4)+this.toHex(15&i)+" ")}return e},u.prototype.startPhaseTimeout=function(t){if(6==t)this.phaseTimeout=t,this.prevPhaseTickCount=0;else switch(this.state){case 2:1==t&&(this.phaseTimeout=t,this.prevPhaseTickCount=BK.Time.clock);break;case 3:2==t&&(this.phaseTimeout=t,this.prevPhaseTickCount=BK.Time.clock);break;case 1:3==t&&(this.phaseTimeout=t,this.prevPhaseTickCount=BK.Time.clock);break;case 4:switch(t){case 4:this.options.PingPongTimeout=Math.min(this.options.PingPongTimeout,this.options.PingPongInterval)}this.phaseTimeout=t,this.prevPhaseTickCount=BK.Time.clock}},u.prototype.handlePhaseTimeout=function(){if(6!=this.phaseTimeout){var t=BK.Time.diffTime(this.prevPhaseTickCount,BK.Time.clock);switch(this.phaseTimeout){case 1:1e3*t>this.options.HandleShakeRequestTimeout&&(BK.Script.log(1,0,"BK.WebSocket.handlePhaseTimeout!handshake request timeout"),this.prevPhaseTickCount=BK.Time.clock,this.state=-1,this.errcode=4096,this.message="handshake request timeout",c.prototype.close.call(this),this.delegate.onError&&this.delegate.onError(this));break;case 2:1e3*t>this.options.HandleShakeResponseTimeout&&(BK.Script.log(1,0,"BK.WebSocket.handlePhaseTimeout!handshake response timeout"),this.prevPhaseTickCount=BK.Time.clock,this.state=-1,this.errcode=4097,this.message="handshake response timeout",c.prototype.close.call(this),this.delegate.onError&&this.delegate.onError(this));break;case 3:1e3*t>this.options.CloseAckTimeout&&(BK.Script.log(1,0,"BK.WebSocket.handlePhaseTimeout!close ack timeout"),this.prevPhaseTickCount=BK.Time.clock,c.prototype.close.call(this),1==this.state?this.peerClosed?this.delegate.onClose&&this.delegate.onClose(this):(this.errcode=1006,this.message="abnormal close",this.delegate.onError&&this.delegate.onError(this),this.startPhaseTimeout(6)):this.delegate.onError&&this.delegate.onError(this));break;case 4:1e3*t>this.options.PingPongTimeout&&(BK.Script.log(1,0,"BK.WebSocket.handlePhaseTimeout!receive pong timeout"),this.prevPhaseTickCount=BK.Time.clock)}}},u.prototype.restartPingPongTimer=function(){4==this.state&&0this.options.PingPongInterval&&(this.inPingFrame=!1,this.txPingData=this.randomN(16),this.sendPingFrame(this.txPingData),this.restartPingPongTimer()))},u.prototype.doHttpTunnelRequstPhase=function(){var t=this.proxyDetail.dstHost,e=this.proxyDetail.dstPort,i="";i=i.concat(t+":"+e);var r="";r=(r=(r=(r=r.concat("CONNECT "+i+" HTTP/"+this.httpVer+"\r\n")).concat("Host: "+i+"\r\n")).concat("Connection: close\r\n")).concat("\r\n");var n=new BK.Buffer(r.length,!1);n.writeAsString(r,!1),0>8),o.writeUint8Buffer(255&n)):(o.writeUint8Buffer(255&n),o.writeUint8Buffer((65280&n)>>8))):BK.Script.log(1,0,"BK.WebSocket.doFrameDataPhase!js don't support 64bit data type"),s){var l=this.randomN(4);BK.Misc.encodeBufferXorMask4(t,l),o.writeBuffer(l)}return o.writeBuffer(t),o},u.prototype.doSvrFrameDataPhase=function(t){if(!t)return!0;for(;!t.eof;){switch(this.parseState){case 0:this.mask4.rewind(),this.rxbuf=new BK.Buffer(this.options.DefaultSegmentSize,!0),this.maskBit=0,this.rxbuflen=0,this.isFinalSeg=!1,this.parseState=1;case 1:var e=t.readUint8Buffer();switch(this.isFinalSeg=!!(128&e),this.opcode=15&e,this.version){case 13:switch(this.opcode){case 3:case 4:case 5:case 6:case 7:case 11:case 12:case 13:case 14:case 15:return this.errcode=1002,this.message="protocol error",BK.Script.log(1,0,"BK.WebSocket.doSvrFrameDataPhase!unknown opcode = "+this.opcode),!1}}switch(this.opcode){case 8:case 9:case 10:case 0:break;default:if(!this.isFinalSeg&&1!=this.opcode&&2!=this.opcode)return this.errcode=1003,this.message="unsupported data",BK.Script.log(1,0,"BK.WebSocket.doSvrFrameDataPhase!illegal opcode = "+this.opcode),!1;if(-1==this.rxFrameType)this.rxFrameType=this.opcode;else if(this.rxFrameType!=this.opcode)return this.errcode=1002,this.message="protocol error",BK.Script.log(1,0,"BK.WebSocket.doSvrFrameDataPhase!rxFrameType = "+this.rxFrameType+", illegal opcode = "+this.opcode),!1}if(this.parseState=2,t.eof)return!0;case 2:var i=t.readUint8Buffer();switch(this.maskBit=(128&i)>>7,127&i){case 126:if(this.parseState=3,t.eof)return!0;break;case 127:if(this.parseState=5,t.eof)return!0;break;default:if(this.rxbuflen=127&i,1==this.maskBit?this.parseState=13:this.parseState=17,0this.textureInfoArr.length-1&&(this.tmpPlayingIdx=0),this.displayFrame(this.tmpPlayingIdx),this.tmpPlayingIdx++,this.currDisplaySum++,this.updateCallback()},t.prototype.update=function(t,e){0==this.paused&&(this.previousTs<0?(this.previousTs=t,this.render()):t-this.previousTs>1e3*this.delayUnits&&(this.previousTs=t,this.render()))},t.prototype.play=function(t,e){void 0===t&&(t=0),void 0===e&&(e=-1),t>this.textureInfoArr.length-1?this.tmpPlayingIdx=0:this.tmpPlayingIdx=t,this.paused=!1,this.repeatCount=e,this.currDisplaySum=0,this.playedCount=0},t.prototype.stop=function(t){void 0===t&&(t=-1),this.paused=!0,-1r[o])return!1}return!1}),function(t,e){var i,r,n;"object"==typeof t&&(t.TouchEventDispatch=(i=BK.TouchEvent.getAllTouchEvent,r=BK.TouchEvent.getTouchEvent,n=BK.TouchEvent.updateTouchStatus,{TouchEventDispatch:function(){function t(){}return t.listenAllTouch=function(t,e){void 0===this.listenerInfos&&(this.listenerInfos=[]);var i={obj:t,callback:e};this.listenerInfos.push(i)},t.remove=function(t){for(var e=-1,i=this.listenerInfos.length,r=0;r=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_1FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform2fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_2FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform3fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_3FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform4fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_4FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform1ivOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_1IV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform2ivOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_2IV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform3ivOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_3IV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniform4ivOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_4IV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function uniformMatrix2fvOpt(t,e,i){next_index+4+i.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_MATRIX_2FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i.length,buffer_data.set(i,next_index+4),next_index+=4+i.length}function uniformMatrix3fvOpt(t,e,i){next_index+4+i.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_MATRIX_3FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i.length,buffer_data.set(i,next_index+4),next_index+=4+i.length}function uniformMatrix4fvOpt(t,e,i){next_index+4+i.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_UNIFORM_MATRIX_4FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i.length,buffer_data.set(i,next_index+4),next_index+=4+i.length}function useProgramOpt(t){total_size<=next_index+2&&flushCommand(),buffer_data[next_index]=GL_COMMAND_USE_PROGRAM,buffer_data[next_index+1]=t,next_index+=2}function validateProgramOpt(t){total_size<=next_index+2&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VALIDATE_PROGRAM,buffer_data[next_index+1]=t,next_index+=2}function vertexAttrib1fOpt(t,e){total_size<=next_index+3&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_1F,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,next_index+=3}function vertexAttrib2fOpt(t,e,i){total_size<=next_index+4&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_2F,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i,next_index+=4}function vertexAttrib3fOpt(t,e,i,r){total_size<=next_index+5&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_3F,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i,buffer_data[next_index+4]=r,next_index+=5}function vertexAttrib4fOpt(t,e,i,r,n){total_size<=next_index+6&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_4F,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i,buffer_data[next_index+4]=r,buffer_data[next_index+5]=n,next_index+=6}function vertexAttrib1fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_1FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function vertexAttrib2fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_2FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function vertexAttrib3fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_3FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function vertexAttrib4fvOpt(t,e){next_index+3+e.length>=total_size&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_4FV,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e.length,buffer_data.set(e,next_index+3),next_index+=3+e.length}function vertexAttribPointerOpt(t,e,i,r,n,o){total_size<=next_index+7&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VERTEX_ATTRIB_POINTER,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i,buffer_data[next_index+4]=r?1:0,buffer_data[next_index+5]=n,buffer_data[next_index+6]=o,next_index+=7}function viewportOpt(t,e,i,r){total_size<=next_index+5&&flushCommand(),buffer_data[next_index]=GL_COMMAND_VIEW_PORT,buffer_data[next_index+1]=t,buffer_data[next_index+2]=e,buffer_data[next_index+3]=i,buffer_data[next_index+4]=r,next_index+=5}function isSupportTypeArray(){if("android"==GameStatusInfo.platform)return!0;var t=BK.Director.queryDeviceInfo(),e=t.version.split(".");return"ios"==t.platform&&10<=Number(e[0])}function attachMethodOpt(){gl.activeTexture=activeTextureOpt,gl.attachShader=attachShaderOpt,gl.bindAttribLocation=bindAttribLocationOpt,gl.bindBuffer=bindBufferOpt,gl.bindFramebuffer=bindFramebufferOpt,gl.bindRenderbuffer=bindRenderbufferOpt,gl.bindTexture=bindTextureOpt,gl.blendColor=blendColorOpt,gl.blendEquation=blendEquationOpt,gl.blendEquationSeparate=blendEquationSeparateOpt,gl.blendFunc=blendFuncOpt,gl.blendFuncSeparate=blendFuncSeparateOpt,gl.bufferData=bufferDataOpt,gl.bufferData=bufferDataOpt,gl.bufferSubData=bufferSubDataOpt,gl.checkFramebufferStatus=checkFramebufferStatusOpt,gl.clear=clearOpt,gl.clearColor=clearColorOpt,gl.clearDepth=clearDepthOpt,gl.clearStencil=clearStencilOpt,gl.colorMask=colorMaskOpt,gl.compileShader=compileShaderOpt,gl.compressedTexImage2D=compressedTexImage2DOpt,gl.compressedTexSubImage2D=compressedTexSubImage2DOpt,gl.copyTexImage2D=copyTexImage2DOpt,gl.copyTexSubImage2D=copyTexSubImage2DOpt,gl.createBuffer=createBufferOpt,gl.createFramebuffer=createFramebufferOpt,gl.createProgram=createProgramOpt,gl.createRenderbuffer=createRenderbufferOpt,gl.createShader=createShaderOpt,gl.createTexture=createTextureOpt,gl.cullFace=cullFaceOpt,gl.deleteBuffer=deleteBufferOpt,gl.deleteFramebuffer=deleteFramebufferOpt,gl.deleteProgram=deleteProgramOpt,gl.deleteRenderbuffer=deleteRenderbufferOpt,gl.deleteShader=deleteShaderOpt,gl.deleteTexture=deleteTextureOpt,gl.depthFunc=depthFuncOpt,gl.depthMask=depthMaskOpt,gl.depthRange=depthRangeOpt,gl.detachShader=detachShaderOpt,gl.disable=disableOpt,gl.disableVertexAttribArray=disableVertexAttribArrayOpt,gl.drawArrays=drawArraysOpt,gl.drawElements=drawElementsOpt,gl.enable=enableOpt,gl.enableVertexAttribArray=enableVertexAttribArrayOpt,gl.finish=finishOpt,gl.flush=flushOpt,gl.framebufferRenderbuffer=framebufferRenderbufferOpt,gl.framebufferTexture2D=framebufferTexture2DOpt,gl.frontFace=frontFaceOpt,gl.generateMipmap=generateMipmapOpt,gl.getActiveAttrib=getActiveAttribOpt,gl.getActiveUniform=getActiveUniformOpt,gl.getAttachedShaders=getAttachedShadersOpt,gl.getAttribLocation=getAttribLocationOpt,gl.getBufferParameter=getBufferParameterOpt,gl.getParameter=getParameterOpt,gl.getError=getErrorOpt,gl.getFramebufferAttachmentParameter=getFramebufferAttachmentParameterOpt,gl.getProgramParameter=getProgramParameterOpt,gl.getProgramInfoLog=getProgramInfoLogOpt,gl.getRenderbufferParameter=getRenderbufferParameterOpt,gl.getShaderParameter=getShaderParameterOpt,gl.getShaderPrecisionFormat=getShaderPrecisionFormatOpt,gl.getShaderInfoLog=getShaderInfoLogOpt,gl.getShaderSource=getShaderSourceOpt,gl.getTexParameter=getTexParameterOpt,gl.getUniform=getUniformOpt,gl.getUniformLocation=getUniformLocationOpt,gl.getVertexAttrib=getVertexAttribOpt,gl.getVertexAttribOffset=getVertexAttribOffsetOpt,gl.hint=hintOpt,gl.isBuffer=isBufferOpt,gl.isEnabled=isEnabledOpt,gl.isFramebuffer=isFramebufferOpt,gl.isProgram=isProgramOpt,gl.isRenderbuffer=isRenderbufferOpt,gl.isShader=isShaderOpt,gl.isTexture=isTextureOpt,gl.lineWidth=lineWidthOpt,gl.linkProgram=linkProgramOpt,gl.pixelStorei=pixelStoreiOpt,gl.polygonOffset=polygonOffsetOpt,gl.readPixels=readPixelsOpt,gl.renderbufferStorage=renderbufferStorageOpt,gl.sampleCoverage=sampleCoverageOpt,gl.scissor=scissorOpt,gl.shaderSource=shaderSourceOpt,gl.stencilFunc=stencilFuncOpt,gl.stencilFuncSeparate=stencilFuncSeparateOpt,gl.stencilMask=stencilMaskOpt,gl.stencilMaskSeparate=stencilMaskSeparateOpt,gl.stencilOp=stencilOpOpt,gl.stencilOpSeparate=stencilOpSeparateOpt,gl.texImage2D=texImage2DOpt,gl.texImage2D=texImage2DOpt,gl.texParameterf=texParameterfOpt,gl.texParameteri=texParameteriOpt,gl.texSubImage2D=texSubImage2DOpt,gl.texSubImage2D=texSubImage2DOpt,gl.uniform1f=uniform1fOpt,gl.uniform2f=uniform2fOpt,gl.uniform3f=uniform3fOpt,gl.uniform4f=uniform4fOpt,gl.uniform1i=uniform1iOpt,gl.uniform2i=uniform2iOpt,gl.uniform3i=uniform3iOpt,gl.uniform4i=uniform4iOpt,gl.uniform1fv=uniform1fvOpt,gl.uniform2fv=uniform2fvOpt,gl.uniform3fv=uniform3fvOpt,gl.uniform4fv=uniform4fvOpt,gl.uniform1iv=uniform1ivOpt,gl.uniform2iv=uniform2ivOpt,gl.uniform3iv=uniform3ivOpt,gl.uniform4iv=uniform4ivOpt,gl.uniformMatrix2fv=uniformMatrix2fvOpt,gl.uniformMatrix3fv=uniformMatrix3fvOpt,gl.uniformMatrix4fv=uniformMatrix4fvOpt,gl.useProgram=useProgramOpt,gl.validateProgram=validateProgramOpt,gl.vertexAttrib1f=vertexAttrib1fOpt,gl.vertexAttrib2f=vertexAttrib2fOpt,gl.vertexAttrib3f=vertexAttrib3fOpt,gl.vertexAttrib4f=vertexAttrib4fOpt,gl.vertexAttrib1fv=vertexAttrib1fvOpt,gl.vertexAttrib2fv=vertexAttrib2fvOpt,gl.vertexAttrib3fv=vertexAttrib3fvOpt,gl.vertexAttrib4fv=vertexAttrib4fvOpt,gl.vertexAttribPointer=vertexAttribPointerOpt,gl.viewport=viewportOpt,gl.glCommit=glCommitOpt}!function(t,e){if("object"==typeof t){var i=function(){function f(t){return.01745329251994*t}return{Matrix:function(){function d(){for(var t=[],e=0;e=n.x&&t.x<=o.x&&t.y>=n.y&&t.y<=o.y},t}(),GLRenderContext:r});t.GLRenderNode=i.GLRenderNode,t.GLRenderContext=i.GLRenderContext}var r}(BK),function(t,e){"object"==typeof t&&("object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.GLRenderButton=e())}(BK,function(){return function(n){function t(t,e,i){var r=n.call(this,t)||this;return r.updateTexture=function(t){},r.__nativeObj=new BK.GLRenderNode(t),r.contentSize={width:e,height:i},r.isCancelClick=void 0,r.touchStatus=0,r.canUserInteract=!0,r.enable=!0,r.canClick=!0,r.addTouchListener(),r}return __extends(t,n),t.prototype.addTouchListener=function(){"undefined"!=typeof UIEventHandler?(UIEventHandler.addNodeEvent(this,1,function(t,e,i,r){t.isCancelClick=!1,t.enable?t.changeStatus(1):t.changeStatus(2)}.bind(this)),UIEventHandler.addNodeEvent(this,2,function(t,e,i,r){var n={x:i,y:r};0==t.hittest(n)&&(t.isCancelClick=!0)}.bind(this)),UIEventHandler.addNodeEvent(this,3,function(t,e,i,r){t.enable?t.changeStatus(0):t.changeStatus(2),0==t.isCancelClick&&t.touchInsideCallback&&1==this.canClick&&t.touchInsideCallback(t)}.bind(this))):BK.Script.log(1,1,"UIEventHandler is undefined")},t.prototype.dispose=function(){UIEventHandler.removeNodeEvent(this,1),UIEventHandler.removeNodeEvent(this,2),UIEventHandler.removeNodeEvent(this,3),n.prototype.dispose.call(this)},t.prototype.changeStatus=function(t){this.touchStatus=t,this.updateTexture(t)},t.prototype.setTouchInsideCallback=function(t){this.touchInsideCallback=t},t}(BK.GLRenderNode)}),function(t,e){if("object"==typeof t){var i=(r="attribute vec3 Position; attribute vec2 TexCoordIn; attribute vec4 SourceColor; uniform mat4 ModelView; uniform mat4 Projection; varying vec4 DestColor; varying vec2 TexCoordOut; void main() { mat4 gWVP = Projection * ModelView; gl_Position = gWVP * vec4(Position, 1); DestColor = SourceColor; TexCoordOut = TexCoordIn; }",n="varying lowp vec2 TexCoordOut; uniform int formatYUV; uniform sampler2D samplerY; uniform sampler2D samplerU; uniform sampler2D samplerV; uniform sampler2D samplerUV; const lowp vec3 defyuv = vec3(-0.0/255.0, -128.0/255.0, -128.0/255.0); void main(void) { lowp vec3 yuv = vec3(0.0); if (formatYUV == 0) { yuv.x = texture2D(samplerY, TexCoordOut).r; yuv.y = texture2D(samplerU, TexCoordOut).r; yuv.z = texture2D(samplerV, TexCoordOut).r; yuv += defyuv; } else if (formatYUV == 1) { yuv.x = texture2D(samplerY, TexCoordOut).r; yuv.y = texture2D(samplerUV, TexCoordOut).a; yuv.z = texture2D(samplerUV, TexCoordOut).r; yuv += defyuv; } else if (formatYUV == 3) { yuv.x = texture2D(samplerY, TexCoordOut).r; yuv.y = texture2D(samplerUV, TexCoordOut).r; yuv.z = texture2D(samplerUV, TexCoordOut).a; yuv += defyuv; } lowp vec3 rgb = mat3(1.0, 1.0, 1.0, 0.0, -.34414, 1.772, 1.402, -.71414, 0.0) * yuv; gl_FragColor = vec4(rgb, 1.0); }",s=function(){function t(){this.videoViews=new Array,void 0!==BK.Director.setQAVDelegate&&BK.Director.setQAVDelegate(this)}return t.prototype.addView=function(e){var t=this.videoViews.filter(function(t){return e==t});return t.length||this.videoViews.push(e),0==t.length},t.prototype.delView=function(e){var t=this.videoViews.length;return this.videoViews=this.videoViews.filter(function(t){return e!=t}),t!=this.videoViews.length},t.prototype.onRemoveVideoPreview=function(e){this.videoViews.forEach(function(t){t.identifier==e.identifier&&t.render(e)})},t.prototype.onLocalVideoPreview=function(r){this.videoViews.forEach(function(t){if(t.identifier==r.identifier){var e=r,i=t;i.onPrePreview&&(e=i.onPrePreview.call(i,r)),t.render(e)}})},t.prototype.onLocalVideoPreProcess=function(i){this.videoViews.forEach(function(t){if(t.identifier==i.identifier){var e=t;e.onPreProcess&&e.onPreProcess.call(e,i)}})},t.Instance=new t,t}(),o=function(){function t(t,e,i,r,n,o,a){this.identifier=t,this.__nativeObj=new BK.Sprite(e,i,null,0,0,1,1),this._innerBindMethods4NativeObj(),null!=r&&null!=r||(r=!0),o&&(this.position=o),n?n.addChild(this):BK.Director.root.addChild(this),a&&(this.zOrder=a),1==r&&s.Instance.addView(this)}return t.prototype._innerBindMethods4NativeObj=function(n){var o=this,t=Object.getOwnPropertyNames(this.__nativeObj);t.forEach(function(t,e,i){var r=t;n&&-1!=n.indexOf(r)||Object.defineProperty(o,r,{get:function(){return this.__nativeObj[r]},set:function(t){this.__nativeObj[r]=t},enumerable:!0,configurable:!0})})},t.prototype.addChild=function(t){this.__nativeObj&&this.__nativeObj.addChild(t)},t.prototype._restartRenderTimer=function(){this.__renderTimeoutCallback&&0this.options.skipFaceTrackerNum||this.skipNum==this.options.skipFaceTrackerNum)&&(e.faceFeatures=this.detector.detectForBitmapSync(i),this.skipNum=0,e.faceFeatures&&(this.hasFace=!0))):this.hasFace=!0}this.options.onPrePreview.call(this,e)}return 0==this.isStart&&(this.configCamera(this.options),this.isStart=!0),t},t.prototype.onPreProcess=function(t){return this.options.onPreProcess?this.options.onPreProcess.call(this,t):t},t.prototype.render=function(t){this.view&&this.view.render(t)},t.prototype.renderAsTexture=function(){return this.view?this.view.renderAsTexture():null},t.prototype._innerExtractBitmap=function(t){var e={};switch(e.width=t.frameDesc.width,e.height=t.frameDesc.height,e.format=t.frameDesc.colorFormat,t.frameDesc.colorFormat){case 7:e.format=3;break;case 10:e.buffer=t.extraData.buffer,e.format=6;break;default:BK.Script.log(1,-1,"BK.QAVCamera.extractBitmap!unknown format = "+t.frameDesc.colorFormat)}switch(t.frameDesc.rotate){case 0:e.oreintation=0;break;case 1:e.oreintation=1;break;case 2:e.oreintation=5;break;case 3:e.oreintation=6}return e},t.Instance=new t,t}(),{QAVView:o,QAVCamera:new a});t.QAVView=i.QAVView,t.AVCamera=i.QAVCamera}var r,n,s,o,a}(BK),"object"==typeof BK&&(BK.QQAVManager=new(function(){function t(){this._hasInitFlag=!1,this._hasSuccEnter=!1,this._iosHasInitFlag=!1,this._isFrontCamera=!1,this._hasStartQAVRoomFlag=!1,this._callbackQueue=[],BK.MQQ.SsoRequest.addListener("cs.audioRoom_disconnect.local",this,this.__handleRoomDisconnect.bind(this)),BK.MQQ.SsoRequest.addListener("cs.audioRoom_update_userinfo.local",this,this.__handleUserUpdate.bind(this))}return t.prototype.log=function(t){BK.Script.log(0,0,"QQAVManager:"+t)},t.prototype.errorLog=function(t){BK.Script.log(1,1,"QQAVManager Error:"+t)},t.prototype.setQAVCfg=function(t){this.qavCfg=t},t.prototype.setUpdateUserInfoCallback=function(t){var e="cs.audioRoom_update_userinfo.local";BK.MQQ.SsoRequest.removeListener(e,this),BK.MQQ.SsoRequest.addListener(e,this,t)},t.prototype.setEventCallbackConfig=function(t){this.eventCallbackConfig=t},t.prototype.initQAV=function(t,e){this.setQAVCfg(t),this.__startQAVRoom(e)},t.prototype.setMic=function(r,n){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={switch:r},i="cs.audioRoom_set_mic.local";BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,n),BK.MQQ.SsoRequest.send(e,i)}else this.errorLog("setMic failed!start qav room failed")}.bind(this))},t.prototype.setSpeaker=function(r,n){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={switch:r},i="cs.audioRoom_set_speaker.local";BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,n),BK.MQQ.SsoRequest.send(e,i)}else this.errorLog("setSpeaker failed!start qav room failed")}.bind(this))},t.prototype.switchCamera=function(r,n){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={cameraPos:r},i="cs.audioRoom_camera_switch.local";BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,function(t,e,i){0==t&&(this._isFrontCamera=0==r),n(t,e,i)}.bind(this)),BK.MQQ.SsoRequest.send(e,i)}else this.errorLog("switchCamera failed!start qav room failed")}.bind(this))},t.prototype.enableCamera=function(r,n){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={switch:r},i="cs.audioRoom_camera_enable.local";this._isFrontCamera=!0,BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,n),BK.MQQ.SsoRequest.send(e,i)}else this.errorLog("enableCamera failed!start qav room failed")}.bind(this))},t.prototype.setBeauty=function(i){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={beauty:i};BK.MQQ.SsoRequest.send(e,"cs.audioRoom_set_beauty.local")}else this.errorLog("setBeauty failed!start qav room failed")}.bind(this))},t.prototype.setLocalVideo=function(i){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={switch:i};BK.MQQ.SsoRequest.send(e,"cs.audioRoom_set_local_video.local")}else this.errorLog("setLocalVideo failed!start qav room failed")}.bind(this))},t.prototype.watchRemoteVideo=function(i){this.__enterQAVRoomIfNeed(function(t){if(0==t){this.log("watchRemoteVideo ok1");var e={openIdList:i};BK.MQQ.SsoRequest.send(e,"cs.audioRoom_watch_remote_video.local"),this.log("watchRemoteVideo ok2")}else this.errorLog("watchRemoteVideo failed!start qav room failed")}.bind(this))},t.prototype.setRemoteVideo=function(i){this.__enterQAVRoomIfNeed(function(t){if(0==t){var e={switch:i};BK.MQQ.SsoRequest.send(e,"cs.audioRoom_set_remote_video.local")}else this.errorLog("setMic failed!start qav room failed")}.bind(this))},t.prototype.exitRoom=function(r){this._hasInitFlag=!1,this.__exitQAVRoom(function(t,e,i){this.log("exit qav room errCode:"+t),r(t,e,i)}.bind(this))},t.prototype.getEndpointList=function(t){var e="cs.audioRoom_get_endpointList.local";t&&(BK.MQQ.SsoRequest.removeListener(e,this),BK.MQQ.SsoRequest.addListener(e,this,t)),BK.MQQ.SsoRequest.send({},e)},t.prototype.isFrontCamera=function(){return this._isFrontCamera},t.prototype.getFluidCtrlCfg=function(t,e){var i="cs.audioRoom_get_fluid_ctrl_cfg.local";e&&(BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,e)),BK.MQQ.SsoRequest.send(t,i)},t.prototype.changeAudioCategory=function(t,e){var i="cs.audioRoom_change_audio_category.local",r={category:t};e&&(BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,e)),BK.MQQ.SsoRequest.send(r,i)},t.prototype.changeQAVRole=function(t,e){var i="cs.audioRoom_change_qav_role.local",r={role:t};e&&(BK.MQQ.SsoRequest.removeListener(i,this),BK.MQQ.SsoRequest.addListener(i,this,e)),BK.MQQ.SsoRequest.send(r,i)},t.prototype.__enterQAVRoomIfNeed=function(t){this._hasSuccEnter?t(0):(this.log("__enterQAVRoomIfNeed entering qav room."),this._callbackQueue.push(t),0==this._hasStartQAVRoomFlag&&(this._hasStartQAVRoomFlag=!0,this.__startQAVRoom(function(t,e,i){for(var r=0;rBK.Director.screenPixelSize.width?.015*BK.Director.screenPixelSize.height:.035*BK.Director.screenPixelSize.height:0}function _(t,e,i,r,n,o,a,s,h,l,c,u,_,d,f,p){this._data=void 0!==t?[t,e,i,r,n,o,a,s,h,l,c,u,_,d,f,p]:[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}function d(t){return.01745329251994*t}function i(t,e){var i=(this._gl=t).createShader(t.VERTEX_SHADER);t.shaderSource(i,e.vs_source),t.compileShader(i);var r=t.createShader(t.FRAGMENT_SHADER);t.shaderSource(r,e.fs_source),t.compileShader(r),this._shader_program=t.createProgram(),t.attachShader(this._shader_program,i),t.attachShader(this._shader_program,r),t.linkProgram(this._shader_program),this._attributes=[];for(var n=0;n>>0}function e(t){this._ad_final_size=[],this._clickInsideCallback=void 0;for(var e=0;eBK.Director.screenPixelSize.width?.1*BK.Director.screenPixelSize.height:.2*BK.Director.screenPixelSize.height:BK.Director.screenPixelSize.height*(BK.Director.screenPixelSize.height>BK.Director.screenPixelSize.width?.12:.22),STANDARD_SCALE=STANDARD_HEIGHT/AD_DESIGN_SIZE[AD_BANNER_TYPE_RESERVED_1_1].height,NODE_TWEEN_ATTR_TYPE_NONE=0,NODE_TWEEN_ATTR_TYPE_SCALE=1,NODE_TWEEN_ATTR_TYPE_SCALE_X=2,NODE_TWEEN_ATTR_TYPE_SCALE_Y=3,NODE_TWEEN_ATTR_TYPE_POSITION_X=4,NODE_TWEEN_ATTR_TYPE_POSITION_Y=5,NODE_TWEEN_ATTR_TYPE_OPACITY=6,NODE_TWEEN_ATTR_TYPE_ROTATION_X=7,NODE_TWEEN_ATTR_TYPE_ROTATION_Y=8,NODE_TWEEN_ATTR_TYPE_ROTATION_Z=9,_.prototype={constructor:_,is_identity:function(){return 1===this._data[0]&&0===this._data[1]&&0===this._data[2]&&0===this._data[3]&&0===this._data[4]&&1===this._data[5]&&0===this._data[6]&&0===this._data[7]&&0===this._data[8]&&0===this._data[9]&&1===this._data[10]&&0===this._data[11]&&0===this._data[12]&&0===this._data[13]&&0===this._data[14]&&1===this._data[15]},set_translation:function(t,e,i){this._data[12]=t,this._data[13]=e,this._data[14]=i},set_scale:function(t,e,i){this._data[0]=t,this._data[5]=e,this._data[10]=i},set:function(t,e,i,r,n,o,a,s,h,l,c,u,_,d,f,p){this._data[0]=t,this._data[1]=e,this._data[2]=i,this._data[3]=r,this._data[4]=n,this._data[5]=o,this._data[6]=a,this._data[7]=s,this._data[8]=h,this._data[9]=l,this._data[10]=c,this._data[11]=u,this._data[12]=_,this._data[13]=d,this._data[14]=f,this._data[15]=p},setTo:function(t){return this._data=t._data.slice(0),this},multiply:function(t){if(this.is_identity())return this.setTo(t);if(t.is_identity())return this;var e=this._data[0]*t._data[0]+this._data[4]*t._data[1]+this._data[8]*t._data[2]+this._data[12]*t._data[3],i=this._data[1]*t._data[0]+this._data[5]*t._data[1]+this._data[9]*t._data[2]+this._data[13]*t._data[3],r=this._data[2]*t._data[0]+this._data[6]*t._data[1]+this._data[10]*t._data[2]+this._data[14]*t._data[3],n=this._data[3]*t._data[0]+this._data[7]*t._data[1]+this._data[11]*t._data[2]+this._data[15]*t._data[3],o=this._data[0]*t._data[4]+this._data[4]*t._data[5]+this._data[8]*t._data[6]+this._data[12]*t._data[7],a=this._data[1]*t._data[4]+this._data[5]*t._data[5]+this._data[9]*t._data[6]+this._data[13]*t._data[7],s=this._data[2]*t._data[4]+this._data[6]*t._data[5]+this._data[10]*t._data[6]+this._data[14]*t._data[7],h=this._data[3]*t._data[4]+this._data[7]*t._data[5]+this._data[11]*t._data[6]+this._data[15]*t._data[7],l=this._data[0]*t._data[8]+this._data[4]*t._data[9]+this._data[8]*t._data[10]+this._data[12]*t._data[11],c=this._data[1]*t._data[8]+this._data[5]*t._data[9]+this._data[9]*t._data[10]+this._data[13]*t._data[11],u=this._data[2]*t._data[8]+this._data[6]*t._data[9]+this._data[10]*t._data[10]+this._data[14]*t._data[11],_=this._data[3]*t._data[8]+this._data[7]*t._data[9]+this._data[11]*t._data[10]+this._data[15]*t._data[11],d=this._data[0]*t._data[12]+this._data[4]*t._data[13]+this._data[8]*t._data[14]+this._data[12]*t._data[15],f=this._data[1]*t._data[12]+this._data[5]*t._data[13]+this._data[9]*t._data[14]+this._data[13]*t._data[15],p=this._data[2]*t._data[12]+this._data[6]*t._data[13]+this._data[10]*t._data[14]+this._data[14]*t._data[15],g=this._data[3]*t._data[12]+this._data[7]*t._data[13]+this._data[11]*t._data[14]+this._data[15]*t._data[15];return this.set(e,i,r,n,o,a,s,h,l,c,u,_,d,f,p,g),this},multiplyXY:function(t){return{x:t.x*this._data[0]+t.y*this._data[4]+this._data[12],y:t.x*this._data[1]+t.y*this._data[5]+this._data[13]}}},SHADER_UNIFORM_TYPE_FLOAT1=1,SHADER_UNIFORM_TYPE_FLOAT2=2,SHADER_UNIFORM_TYPE_FLOAT3=3,SHADER_UNIFORM_TYPE_FLOAT4=4,SHADER_UNIFORM_TYPE_INT1=5,SHADER_UNIFORM_TYPE_INT2=6,SHADER_UNIFORM_TYPE_INT3=7,SHADER_UNIFORM_TYPE_INT4=8,SHADER_UNIFORM_TYPE_FLOATV1=9,SHADER_UNIFORM_TYPE_FLOATV2=10,SHADER_UNIFORM_TYPE_FLOATV3=11,SHADER_UNIFORM_TYPE_FLOATV4=12,SHADER_UNIFORM_TYPE_INTV1=13,SHADER_UNIFORM_TYPE_INTV2=14,SHADER_UNIFORM_TYPE_INTV3=15,SHADER_UNIFORM_TYPE_INTV4=16,SHADER_UNIFORM_TYPE_MATRIX2=17,SHADER_UNIFORM_TYPE_MATRIX3=18,SHADER_UNIFORM_TYPE_MATRIX4=19,SHADER_UNIFORM_TYPE_TEXTURE0=20,SHADER_UNIFORM_TYPE_TEXTURE1=21,SHADER_UNIFORM_TYPE_TEXTURE2=22,SHADER_UNIFORM_TYPE_TEXTURE3=23,SHADER_UNIFORM_TYPE_TEXTURE4=24,SHADER_UNIFORM_TYPE_TEXTURE5=25,SHADER_UNIFORM_TYPE_TEXTURE6=26,SHADER_UNIFORM_TYPE_TEXTURE7=27,i.prototype={set_uniform:function(t,e,i){for(var r=0;r=i.x&&t.x<=r.x&&t.y>=i.y&&t.y<=r.y},((o.prototype=Object.create(f.prototype)).constructor=o).prototype.addTouchListener=function(){"undefined"!=typeof UIEventHandler?(UIEventHandler.addNodeEvent(this,1,function(t,e,i,r){t.isCancelClick=!1,t.enable?t.changeStatus(1):t.changeStatus(2)}.bind(this)),UIEventHandler.addNodeEvent(this,2,function(t,e,i,r){var n={x:i,y:r};0==t.hittest(n)&&(t.isCancelClick=!0)}.bind(this)),UIEventHandler.addNodeEvent(this,3,function(t,e,i,r){t.enable?t.changeStatus(0):t.changeStatus(2),0==t.isCancelClick&&t.touchInsideCallback&&1==this.canClick&&t.touchInsideCallback(t)}.bind(this))):BK.Script.log(1,1,"UIEventHandler is undefined")},o.prototype.setTouchInsideCallback=function(t){this.touchInsideCallback=t},o.prototype.dispose=function(){UIEventHandler.removeNodeEvent(this,1),UIEventHandler.removeNodeEvent(this,2),UIEventHandler.removeNodeEvent(this,3),f.prototype.dispose.call(this)},o.prototype.changeStatus=function(t){this.touchStatus=t,this.updateTexture(t)},o.prototype.updateTexture=function(t){},e.prototype={constructor:e,setHidden:function(t){this._root_node?this._root_node.hidden=t:BK.Script.log(1,1,"set hidden error.root_node is null")},dispose:function(){this._is_webgl?(this._root_node.dispose(),this._root_node=void 0,this.webGL_exit()):this._root_node.removeFromParent()},_onTouchInside:function(){BK.Script.log(1,1,"_onTouchInside"),this._clickInsideCallback&&this._clickInsideCallback()},setClickContentCallback:function(t){this._clickInsideCallback=t},create_texture:function(t,e){if(this._is_webgl){var i=this._gl,r=i.RGBA,n=i.RGBA,o=i.UNSIGNED_BYTE,a=BK.Image.loadImage(t,6),s=i.createTexture();return i.bindTexture(i.TEXTURE_2D,s),i.texImage2D(i.TEXTURE_2D,0,r,n,o,a),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_S,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_WRAP_T,i.CLAMP_TO_EDGE),i.texParameteri(i.TEXTURE_2D,i.TEXTURE_MIN_FILTER,i.LINEAR),{width:a.width,height:a.height,texture:s,tex_file:t,need_delete:e}}return new BK.Texture(t)},create_clip_node:function(t,e){if(this._is_webgl){g()&&(e.x+=.5*BK.Director.screenPixelSize.width,e.y=c());var i=new m;return this._clip_rect=e,t.addChild(i),i}return(i=new BK.ClipRectNode(e.x,e.y,e.width,e.height)).enableClip=!0,t.addChild(i),i},create_node:function(t){if(this._is_webgl){var e=new m;return void 0!==t?t.addChild(e):this._gl_root_node.addChild(e),e}return e=new BK.Node,void 0!==t?t.addChild(e):BK.Director.root.addChild(e),e},create_sprite:function(t,e,i,r){var n=this.create_texture(e,r);return this.create_sprite_with_texture(t,n,i)},create_button:function(t,e,i,r){if(this._is_webgl){var n=new o(i.width,i.height,e,0,1,1,1);return r&&n.setTouchInsideCallback(r),void 0!==t?t.addChild(n):this._gl_root_node.addChild(n),n}return(n=new BK.Button(i.width,i.height)).setNormalTexture(e),n.updateTexture=function(){},r&&n.setTouchInsideCallback(r),void 0!==t?t.addChild(n):BK.Director.root.addChild(n),n},create_sprite_with_texture:function(t,e,i){if(this._is_webgl){var r=new f(i.width,i.height,e,0,1,1,1);return void 0!==t?t.addChild(r):this._gl_root_node.addChild(r),r}return r=new BK.Sprite(i.width,i.height,e,0,1,1,1),void 0!==t?t.addChild(r):BK.Director.root.addChild(r),r},create_text:function(t,e){if(this._is_webgl){var i=new BK.CanvasNode(t.maxWidth,t.maxHeight);i.fillColor=t.textColor,i.strokeColor=t.strokeColor,i.setTextAlign(t.textAlign),i.setTextSize(t.fontSize),i.setTextItalic(t.italic),i.setTextBold(t.bold),i.setTextShadow(t.shadowDx,t.shadowDy,t.shadowRadius,t.shadowColor);var r=i.measureText(e,t.maxWidth,t.maxHeight);i.drawText(e,0,0,r.width,r.height);var n=i.getBitmap(),o=this._gl,a=o.RGBA,s=o.RGBA,h=o.UNSIGNED_BYTE,l=o.createTexture();o.bindTexture(o.TEXTURE_2D,l),o.texImage2D(o.TEXTURE_2D,0,a,s,h,n),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_S,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_WRAP_T,o.CLAMP_TO_EDGE),o.texParameteri(o.TEXTURE_2D,o.TEXTURE_MIN_FILTER,o.LINEAR);var c={width:n.width,height:n.height,texture:l,tex_file:e,need_delete:!0},u=new f(n.width,n.height,c,0,1,1,1);return u.anchor={x:0,y:0},u.width=r.width,u.height=r.height,u}return t.textColor=p(t.textColor),t.strokeColor=p(t.strokeColor),t.shadowColor=p(t.shadowColor),new BK.TextNode(t,e)},show:function(t){if(!this._is_webgl){var e=BK.Director.root.scale;this._root_node.scale={x:1/e.x,y:1/e.y,z:1/e.z},this._root_node.enableClip=g()}void 0!==this._real_content_node&&this._content_node.removeChild(this._real_content_node),this._real_content_node=this.create_node(this._content_node),void 0!==t.content&&20=AD_BANNER_TYPE_DYNAMIC_193_582_166&&t.ad_type<=AD_BANNER_TYPE_DYNAMIC_65_1000_560;this.anim_node_1(p),this.anim_node_2(p,t.ad_type===AD_BANNER_TYPE_STATIC_285_240_180_3?11*STANDARD_SCALE:0,t.ad_type===AD_BANNER_TYPE_STATIC_285_240_180_3?25*STANDARD_SCALE:0),this.anim_node_3(p)},update:function(t){this._node_1.update_tweens(t),this._node_2.update_tweens(t),this._node_3.update_tweens(t)},node_extend:function(t){return t._next_tween_handler=0,t._all_tween_data=[],t.tween_from_to=function(t,e,i,r,n,o,a){var s=this._next_tween_handler;return this._next_tween_handler+=1,this._all_tween_data.push({attr_type:t,duration:e,delay:i,interval:r,from:n,to:o,loop_count:a,pass_time:-i,handler:s,is_stop:!1}),s},t.remove_tween=function(t){for(;0=i.duration)i.pass_time-=i.duration,-1===i.loop_count?(i.pass_time-=i.interval,this.update_tween_value(i,i.to)):(i.loop_count-=1,0<=i.loop_count?(i.pass_time-=i.interval,this.update_tween_value(i,i.to)):(this.update_tween_value(i,i.to),i.is_stop=!0));else if(0