@zoom/meetingsdk
Version:
Zoom MeetingSDK-Web Client
1 lines • 866 kB
JavaScript
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("disk-file-writer")):"function"==typeof define&&define.amd?define("JsMediaSDK_Instance",["disk-file-writer"],t):"object"==typeof exports?exports.JsMediaSDK_Instance=t(require("disk-file-writer")):e.JsMediaSDK_Instance=t(e["disk-file-writer"])}(window,(function(e){return function(e){function t(t){for(var i,a,s=t[0],o=t[1],n=0,u=[];n<s.length;n++)a=s[n],r[a]&&u.push(r[a][0]),r[a]=0;for(i in o)Object.prototype.hasOwnProperty.call(o,i)&&(e[i]=o[i]);for(d&&d(t);u.length;)u.shift()()}var i={},r={1:0};function a(t){if(i[t])return i[t].exports;var r=i[t]={i:t,l:!1,exports:{}};return e[t].call(r.exports,r,r.exports,a),r.l=!0,r.exports}a.e=function(e){var t=[],i=r[e];if(0!==i)if(i)t.push(i[2]);else{var s=new Promise((function(t,a){i=r[e]=[t,a]}));t.push(i[2]=s);var o,n=document.createElement("script");n.charset="utf-8",n.timeout=120,a.nc&&n.setAttribute("nonce",a.nc),n.src=function(e){return a.p+""+({0:"annoter",2:"pako",3:"wmsc"}[e]||e)+".min.js"}(e);var d=new Error;o=function(t){n.onerror=n.onload=null,clearTimeout(u);var i=r[e];if(0!==i){if(i){var a=t&&("load"===t.type?"missing":t.type),s=t&&t.target&&t.target.src;d.message="Loading chunk "+e+" failed.\n("+a+": "+s+")",d.type=a,d.request=s,i[1](d)}r[e]=void 0}};var u=setTimeout((function(){o({type:"timeout",target:n})}),12e4);n.onerror=n.onload=o,document.head.appendChild(n)}return Promise.all(t)},a.m=e,a.c=i,a.d=function(e,t,i){a.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,t){if(1&t&&(e=a(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(a.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)a.d(i,r,function(t){return e[t]}.bind(null,r));return i},a.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(t,"a",t),t},a.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},a.p="",a.oe=function(e){throw console.error(e),e};var s=window.webpackJsonpJsMediaSDK_Instance=window.webpackJsonpJsMediaSDK_Instance||[],o=s.push.bind(s);s.push=t,s=s.slice();for(var n=0;n<s.length;n++)t(s[n]);var d=o;return a(a.s=57)}([function(e,t,i){"use strict";i.r(t);var r=i(18),a=i(7),s=i(3),o=i(19);const n=Object(o.a)("sdk.init");class d{constructor(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.name=e,this.handler=null,this.wasm=null,this.socket=null,this.defered=new s.Deferred,this.initSuccessPromise=this.defered.promise,this.wasmDefered=new s.Deferred,this.wasmSuccessPromise=this.wasmDefered.promise,this.handlerDefered=new s.Deferred,this.handlerSuccessPromise=this.handlerDefered.promise,this.socketDefered=new s.Deferred,this.socketSuccessPromise=this.socketDefered.promise,Promise.all([this.wasmSuccessPromise,this.handlerSuccessPromise,this.socketSuccessPromise]).then(e=>{let t=e.every(e=>!0===e);this.defered.resolve(t),t||n.error(this.name,{handler:this.handler,wasm:this.wasm,socket:this.socket})})}setHanderSuccess(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.handler=e,this.handlerDefered.resolve(e)}setWasmSuccess(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.wasm=e,this.wasmDefered.resolve(e)}setSocketSuccess(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];this.socket=e,this.socketDefered.resolve(e)}checkInitSuccess(){let e=this.handler&&this.wasm&&this.socket;return e&&this.defered.resolve(!0),e}isSocketInitSuccess(){return this.socket}waitforInitSuccess(){return this.initSuccessPromise}resetHandleDeferred(){this.setHanderSuccess(!0),this.handlerDefered=new s.Deferred,this.handlerSuccessPromise=this.handlerDefered.promise}}class u extends d{constructor(e){super(e)}}class l extends d{constructor(e){super(e)}}class c extends d{constructor(e){super(e)}}var h=i(5),f=i(4);const p=Object(o.a)("sdk.variables");function _(){this.crashCount=0,this.crashLastTime=0,this.AEW=null,this.ADW=null,this.AEWF=null,this.ADWF=null,this.VE=null,this.VD=null,this.SE=null,this.SD=null,this.VEMTimes=0,this.VDMTimes=0,this.SEMTimes=0,this.SDMTimes=0,this.extVBPort=null,this.frameSent=0,this.frameReceived=0,this.peerConnectionCannotConnectTimes=0}_.prototype.initDB=function(){let e,t={},i=this;t.init=function(r){if(this.db_name=r.db_name,this.db_version=r.db_version,this.db_store_name=r.db_store_name,indexedDB){try{e=indexedDB.open(this.db_name,this.db_version)}catch(e){return a.default.error("Error opening IndexedDB",e),void(i.indexDbObject=null)}e.onerror=function(e){i.indexDbObject=null},e.onupgradeneeded=function(e){this.db=e.target.result,this.db.createObjectStore(t.db_store_name)},e.onsuccess=function(e){t.db=e.target.result,i.openIndexFlag=!0,i.indexDbObject.select("delay")}}else i.indexDbObject=null},t.put=function(e,i){try{var r=t.db.transaction(t.db_store_name,"readwrite").objectStore(t.db_store_name).put(e,i);r.onsuccess=function(){},r.onerror=function(e){a.default.error("Set Delay failed!",e)}}catch(e){a.default.error("IndexDb put Failed!",e)}},t.delete=function(i){e=t.db.transaction(t.db_store_name,"readwrite").objectStore(t.db_store_name).delete(i),e.onsuccess=function(){p("Delete the key:"+i)}},t.select=function(e){try{var r=t.db.transaction(t.db_store_name,"readwrite").objectStore(t.db_store_name);if(e)var s=r.get(e);else s=r.getAll();s.onsuccess=function(){i.audioDelay=s.result},s.onerror=function(){i.audioDelay=0}}catch(e){a.default.error("IndexDb Select Failed",e)}},t.clear=function(){t.db.transaction(t.db_store_name,"readwrite").objectStore(t.db_store_name).clear().onsuccess=function(){p("Clear the IndexDb Successfully")}},t.close=function(){t.db&&t.db.close()},this.indexDbObject=t,this.indexDbObject.init({db_name:"AEC",db_version:1,db_store_name:"delay"})},_.prototype.Notify_APPUI_SAFE=function(e){for(var t=arguments.length,i=new Array(t>1?t-1:0),r=1;r<t;r++)i[r-1]=arguments[r];if("number"==typeof e||"string"==typeof e)i=arguments;else if(e!==this.instance)return;this._Notify_APPUI&&(p("Notify_APPUI_SAFE",i),this._Notify_APPUI.apply(this,i),this._callbackList.forEach(e=>e.apply(this,i)))},_.prototype.Notify_APPUI=_.prototype.Notify_APPUI_SAFE,_.prototype.queueMessageToRwg=function(e,t){this.rwgMessageList.push({jsEvent:e,message:t})},_.prototype.clearMessageToRwg=function(){f.default.startSend(),this.rwgConnectSuccess=!0,this.rwgMessageList.length>0&&(this.rwgAgent||this._Notify_APPUI)&&(this.rwgMessageList.forEach(e=>{let{jsEvent:t,message:i}=e;this.sendMessageToRwg(t,i,!1,!1)}),this.rwgMessageList=[])},_.prototype.destroyQueueMessageToRwg=function(){this.rwgConnectSuccess=!1,this.rwgMessageList=[]},_.prototype.sendMessageToRwg=function(e,t){let i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];if(this.rwgConnectSuccess&&(this.rwgAgent||this._Notify_APPUI)||!i){this.rwgConnectSuccess&&r&&this.clearMessageToRwg();try{this.rwgAgent?this.rwgAgent.sendMessageToRwg(t):this.Notify_APPUI_SAFE(e,t)}catch(e){a.default.error("Error sending message to RWG",e)}}else this.queueMessageToRwg(e,t)},_.prototype.reinit=function(e){this.instance=e,this.SPECIAL_ID=0,this._callbackList=[],this._Notify_APPUI=null,this.localAudioDecMGR=null,this.localVideoDecMGR=null,this.localAudioEncMGR=null,this.localVideoEncMGR=null,this.localSharingDecMGR=null,this.localMouseDecMGR=null,this.localSharingEncMGR=null,this.localAudioPara=null,this.localVideoPara={},this.localSharingPara=null,this.Audio_WebSocket_Ip_Address=null,this.Audio_Web_Transport_Ip_Address=null,this.Video_WebSocket_Ip_Address=null,this.Video_Web_Transport_Ip_Address=null,this.Sharing_WebSocket_Ip_Address=null,this.mediaSDKHandle=null,this.audio_pcm_queue=new r.a,this.int16Array=null,this.isInitialFailed=!1,this.isAudioEncodeWASMOK=!1,this.isAudioDecodeWASMOK=!1,this.isVideoEncodeWASMOK=!1,this.isVideoDecodeWASMOK=!1,this.isSharingDecodeWASMOK=!1,this.isSharingEncodeWASMOK=!1,this.audioEncWorkerPath="",this.audioDecWorkerPath="",this.videoDecWorkerPath="",this.videoEncWorkerPath="",this.sharingDecWorkerPath="",this.sharingEncWorkerPath="",this.audioEncodeSession=null,this.audioDecodeSession=null,this.videoDecodeSession=null,this.videoEncodeSession=null,this.sharingDecodeSession=null,this.sharingEncodeSession=null,this.isAudioEncodeThreadStart=!1,this.isAudioDecodeThreadStart=!1,this.isVideoDecodeThreadStart=!1,this.isSharingDecodeThreadStart=!1,this.isVideoEncodeThreadStart=!1,this.isSharingEncodeThreadStart=!1,this.isAudioPlayWork=!1,this.isVideoPlayWork=!1,this.isSharingPlayWork=!1,this.shareBufferSampleNumb=30,this.audioWasmInfo=null,this.initialSuccessNumb=0,this.TotalWaitEvent=0,this.audioPostInterval=null,this.sharedBuffer=null,this.decoderinworklet=null,this.decoderinworkletOP=null,this.chromeWideAEC=null,this.shareSystemAudio=!1,this.indexDbObject=null,this.audioDelay=0,this.openIndexFlag=!1,this.audioBufferSize=s.default.browser.isFirefox?30:15,this.monitorIntervalHandle=null,this.e2eencrypt=!1,this.AudioNode=null,this.SharingAudioNode=null,this.CurrentSSRC=0,this.CurrentSSRCTime=0,this.audioPlayTime=0,this.videoDecResponseText=null,this.videoEncResponseText=null,this.sharingDecodeResponse=null,this.sharingEncodeResponse=null,this.sharingDecInitInstance=new u(h.f.SHARING_DECODE),this.sharingEncInitInstance=new u(h.f.SHARING_ENCODE),this.videoDecInitInstance=new l(h.f.VIDEO_DECODE),this.videoInitInstance=new l(h.f.VIDEO_ENCODE),this.audioDecInitInstance=new c(h.f.AUDIO_DECODE),this.audioEncodeInitInstance=new c(h.f.AUDIO_ENCODE),this.audioDecodeResponse=null,this.audioEncodeResponse=null,this.ivObj={},this.userNodeList=[],this.rwgAgent=null,this.ComputerAudioStatus=h.a.ComputerAudio_Null,this.DesktopAudioStatus=h.a.DesktopAudio_Null,this.initDB(),this.resourceManager=null,this.vbarraybuffer=null,this.vbbin=null,this.vbjson=null,this.tfjsurl=null,this.afnbin=null,this.afnjson=null,this.basebin=null,this.basejson=null,this.workletMessageQueue=new r.a,this.workletWasmInitSuccess=!1,this.videoEncodeInitSuccess=null,this.vbPreloadSuccess=null,this.enableAduioBridge=!1,this.audioMode=-1,this.enableEchoDetection=0,this.enableHADecOpt=0,this.enableSafariHWCodec=0,this.enable360pHWDec=0,this.enable360pHWEnc=0,this.enableAndroidHWCodec=0,this.disableHWCodec=0,this.enableOptCopyFrame=0,this.enableTransferDataChannel=0,this.enableCanvasAlphaChannel=!0,this.enableWebrtcTurnServer=!1,this.VEMTimes=0,this.VDMTimes=0,this.SEMTimes=0,this.SDMTimes=0,this.isPreviewMode={audioEncode:!1,audioDecode:!1,videoEncode:!1,videoDecode:!1},this.rwgConnectSuccess=!1,this.rwgMessageList=[],this.localSsrc=0,this.frameSent=0,this.frameReceived=0};let m=new _;t.default=m},function(e,t,i){var r=i(90),a=i(49);e.exports=function(e,t){var i=a(e,t,"get");return r(e,i)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,i){"use strict";i.r(t),i.d(t,"START_MEDIA",(function(){return r})),i.d(t,"ADD_RENDER_VIDEO",(function(){return a})),i.d(t,"STOP_RENDER_VIDEO",(function(){return s})),i.d(t,"START_CAPTURE_VIDEO",(function(){return o})),i.d(t,"STOP_CAPTURE_VIDEO",(function(){return n})),i.d(t,"ADD_RENDER_AUDIO",(function(){return d})),i.d(t,"STOP_RENDER_AUDIO",(function(){return u})),i.d(t,"UNMUTE_AUDIO",(function(){return l})),i.d(t,"MUTE_AUDIO",(function(){return c})),i.d(t,"CHANGE_FRAME_RATE",(function(){return h})),i.d(t,"CHANGE_VIDEO_RESOLUTION",(function(){return f})),i.d(t,"CHANGE_AUDIO_SPEAKER",(function(){return p})),i.d(t,"CHANGE_VIDEO_CAPTURE_DEVICE",(function(){return _})),i.d(t,"CHANGE_CURRENT_ACTIVE_SSRC",(function(){return m})),i.d(t,"REMOVE_AUDIO_CAPTURE",(function(){return E})),i.d(t,"LEAVE_MEETING",(function(){return g})),i.d(t,"MEETING_FAIL_OVER",(function(){return S})),i.d(t,"END_MEDIA",(function(){return v})),i.d(t,"CHANGE_AUDIO_MIC",(function(){return C})),i.d(t,"WEBRTC_RESTART",(function(){return A})),i.d(t,"REMOVE_RENDER_AUDIO",(function(){return R})),i.d(t,"LEAVE_COMPUTER_AUDIO",(function(){return T})),i.d(t,"JOIN_COMPUTER_AUDIO",(function(){return I})),i.d(t,"START_SHARING",(function(){return b})),i.d(t,"STOP_SHARING",(function(){return O})),i.d(t,"SWITCH_CANVAS_FOR_VIDEO_CAPTURE",(function(){return D})),i.d(t,"START_REMOTE_CONTROL",(function(){return w})),i.d(t,"UPDATE_REMOTE_CONTROL_PROPERTIES",(function(){return y})),i.d(t,"CANCEL_REMOTE_CONTROL",(function(){return M})),i.d(t,"UPDATE_SUBSCRIBE_VIDEO",(function(){return P})),i.d(t,"START_DESKTOP_SHARING",(function(){return N})),i.d(t,"START_SHARING_WHITEBOARD",(function(){return V})),i.d(t,"STOP_DESKTOP_SHARING",(function(){return k})),i.d(t,"STOP_SHARING_WHITEBOARD",(function(){return U})),i.d(t,"PAUSE_DESKTOP_SHARING",(function(){return L})),i.d(t,"RESUME_DESKTOP_SHARING",(function(){return x})),i.d(t,"CHECK_CHROME_SHARING_EXTENSION",(function(){return W})),i.d(t,"SWITCH_CANVAS_FOR_SHARING_CAPTURE",(function(){return B})),i.d(t,"CHANGE_CURRENT_SHARING_ACTIVE_SSRC",(function(){return G})),i.d(t,"COMMAND_SOCKET_MESSAGE_NOTIFY",(function(){return F})),i.d(t,"RESEND_REMOTE_CONTROL_POSITION_PDU",(function(){return H})),i.d(t,"AES_GCM_IV_VALUE",(function(){return K})),i.d(t,"USER_NODE_LIST",(function(){return j})),i.d(t,"UPDATE_SHARING_DECODE_PARAM",(function(){return Y})),i.d(t,"PAUSE_OR_RESUME_AUDIO_DECODE",(function(){return q})),i.d(t,"UPDATE_CANVAS_SIZE",(function(){return X})),i.d(t,"CLEAR_CANVAS",(function(){return Q})),i.d(t,"ZOOM_RENDER",(function(){return z})),i.d(t,"CHANGE_SHARING_2ND_VIDEO_CAPTUREVIDEO_DEVICE",(function(){return J})),i.d(t,"SET_OTHER_AUDIO_VOLUME_LEVEL",(function(){return Z})),i.d(t,"USER_NODE_AUDIO_STATUS_LIST",(function(){return $})),i.d(t,"UPDATE_MASK_CANVAS_SIZE",(function(){return ee})),i.d(t,"MOVE_PTZ_CAMERA",(function(){return te})),i.d(t,"START_STOP_REMOTE_CONTROL_CHECK",(function(){return ie})),i.d(t,"SEND_REMOTE_CONTROL_QR_CODE",(function(){return re})),i.d(t,"AUDIO_CC_SELECT_LANGUAGE",(function(){return ae})),i.d(t,"AUIOD_INTERPRETATION_MUTE",(function(){return se})),i.d(t,"AUDIO_INTERPRETATION_SELECT_LANGUAGE",(function(){return oe})),i.d(t,"AUDIO_INTERPRETATION_LIST_INFO",(function(){return ne})),i.d(t,"AUDIO_INTERPRETATION_ENABLE",(function(){return de})),i.d(t,"VIDEO_MASK_SETTING",(function(){return ue})),i.d(t,"UPDATE_BG_IMAGE",(function(){return le})),i.d(t,"UPDATE_MASK_INFO",(function(){return ce})),i.d(t,"FINISH_MASK_SETTING",(function(){return he})),i.d(t,"START_VIDEO_STREAM_IN_MASK_SETTING_SUCCESS",(function(){return fe})),i.d(t,"VIDEO_ENABLE_DECODE_HW",(function(){return pe})),i.d(t,"VIDEO_ENABLE_ENCODE_HW",(function(){return _e})),i.d(t,"JOIN_DESKTOP_AUDIO",(function(){return me})),i.d(t,"LEAVE_DESKTOP_AUDIO",(function(){return Ee})),i.d(t,"SET_DESKTOP_VOLUME",(function(){return ge})),i.d(t,"MIRROR_MY_VIDEO",(function(){return Se})),i.d(t,"REMOVE_EXPIRED_CANVAS",(function(){return ve})),i.d(t,"WEBGL_LOST_REPLACE_CANVAS",(function(){return Ce})),i.d(t,"UPDATE_VIDEO_QUALITY",(function(){return Ae})),i.d(t,"SEND_RENDER_LOG",(function(){return Re})),i.d(t,"USER_NODE_LIST_IN_MAIN_SESSION",(function(){return Te})),i.d(t,"UPDATE_MEDIA_PARAMS",(function(){return Ie})),i.d(t,"SHARING_ADD_REV_CHANNEL_TYPE",(function(){return be})),i.d(t,"SHARING_REMOVE_REV_CHANNEL_TYPE",(function(){return Oe})),i.d(t,"BUILD_MS_CHANNEL_IN_BO",(function(){return De})),i.d(t,"BUILD_MA_CHANNEL_IN_BO",(function(){return we})),i.d(t,"ENABLE_SHARE_TO_BO",(function(){return ye})),i.d(t,"ENABLE_BROADCAST_TO_BO",(function(){return Me})),i.d(t,"SWITCH_WATER_MARK_FLAG",(function(){return Pe})),i.d(t,"START_VIDEO_VB_SETTING",(function(){return Ne})),i.d(t,"UPDATE_VIDEO_VB_BG_IMAGE",(function(){return Ve})),i.d(t,"STOP_VIDEO_VB_SETTING",(function(){return ke})),i.d(t,"START_VIDEO_STREAM_IN_VB_SETTING_SUCCESS",(function(){return Ue})),i.d(t,"SWITCH_MASK_AND_VB",(function(){return Le})),i.d(t,"VB_MODEL_PRELOADING_3S",(function(){return xe})),i.d(t,"VB_MODEL_PRELOADING_10S",(function(){return We})),i.d(t,"VB_MODEL_PRELOADING_OK",(function(){return Be})),i.d(t,"ENABLE_VIDEO_OBSERVER",(function(){return Ge})),i.d(t,"SWITCH_SHARING_TYPE",(function(){return Fe})),i.d(t,"CHANGE_HID_ENABLE",(function(){return He})),i.d(t,"ADD_VIDEO_VB_SETTING_DOM",(function(){return Ke})),i.d(t,"REMOVE_VIDEO_VB_SETTING_DOM",(function(){return je})),i.d(t,"NEW_ACTIVE_SPEAKER_SSRC",(function(){return Ye})),i.d(t,"NEW_ACTIVE_SPEAKER_FIRST_FRAME_CALLBACK",(function(){return qe})),i.d(t,"CANCEL_NEW_ACTIVE_SPEAKER_BEFORE_CALL_BACK",(function(){return Xe})),i.d(t,"NOTIFY_SDK_JOIN_RWG_SUCCESS",(function(){return Qe})),i.d(t,"AUDIO_BRIDGE_FIRST_RECV_DATA",(function(){return ze})),i.d(t,"AUDIO_BRIDGE_CAN_SEND_DATA",(function(){return Je})),i.d(t,"FIRST_VIDEO_FRAME",(function(){return Ze})),i.d(t,"PREVIEW_INIT_VIDEO_DECODE_SUCCESS",(function(){return $e})),i.d(t,"PREVIEW_INIT_AUDIO_DECODE_SUCCESS",(function(){return et})),i.d(t,"WHITEBOARD_JOIN_MESSAGE",(function(){return tt})),i.d(t,"AUDIO_DENOISE_SWITCH",(function(){return it})),i.d(t,"SET_CODEC_MODE",(function(){return rt})),i.d(t,"STOP_AUDIO_INCOMING",(function(){return at})),i.d(t,"MOBILE_ROTATE",(function(){return st})),i.d(t,"SAVE_LOCAL_LOG",(function(){return ot})),i.d(t,"CHANGE_AUDIO_PROFILE",(function(){return nt})),i.d(t,"AUDIO_JOIN_SUCCESS",(function(){return dt})),i.d(t,"RWG_COMMAND_BYPASS_TO_WCL",(function(){return ut})),i.d(t,"SHARE_2ND_AUDIO_CAPTURE_DEVICE",(function(){return lt})),i.d(t,"SUBSCRIBE_VIDEO",(function(){return ct})),i.d(t,"UNSUBSCRIBE_VIDEO",(function(){return ht})),i.d(t,"UI_SUBSCRIBE_VIDEO",(function(){return ft})),i.d(t,"UI_UNSUBSCRIBE_VIDEO",(function(){return pt})),i.d(t,"MOBILE_CAPTURE_DEVICE_CHANGE",(function(){return _t})),i.d(t,"ON_HOLD",(function(){return mt})),i.d(t,"SET_ALL_SPEECH_VOLUME",(function(){return Et})),i.d(t,"ENABLE_FILE_AUDIO_PLAYBACK_LOCALLY",(function(){return gt})),i.d(t,"START_ANNOTATION_A",(function(){return St})),i.d(t,"ANNOTATION_ACTIONS",(function(){return vt})),i.d(t,"STOP_ANNOTATION_A",(function(){return Ct})),i.d(t,"START_ANNOTATION_SUCCESS",(function(){return At})),i.d(t,"DEVICE_CHANGE_EVENT",(function(){return Rt})),i.d(t,"RECAPTURE_AUDIO",(function(){return Tt})),i.d(t,"REQUEST_PERMISSION",(function(){return It})),i.d(t,"REQUEST_PERMISSION_RESULT",(function(){return bt})),i.d(t,"REQUEST_PERMISSIOM_POP_REMINDER",(function(){return Ot})),i.d(t,"INIT_SUCCESS",(function(){return Dt})),i.d(t,"INIT_SUCCESS_VIDEO",(function(){return wt})),i.d(t,"INIT_SUCCESS_AUDIO",(function(){return yt})),i.d(t,"INIT_SUCCESS_SHARING",(function(){return Mt})),i.d(t,"USER_GRANT_CAPTURE_AUDIO",(function(){return Pt})),i.d(t,"CURRENT_VIDEO_RESOLUTION",(function(){return Nt})),i.d(t,"SHARING_DEC_THREAD_OK",(function(){return Vt})),i.d(t,"SHARING_DATA",(function(){return kt})),i.d(t,"SHARING_PARA",(function(){return Ut})),i.d(t,"SHARING_MORE_INFO",(function(){return Lt})),i.d(t,"VIDEO_DECODE_MAX_SIZE",(function(){return xt})),i.d(t,"CURRENT_CAPTURE_VIDEO_WIDTH_HEIGHT",(function(){return Wt})),i.d(t,"START_VIDEO_CAPTURE_SUCCESS",(function(){return Bt})),i.d(t,"STOP_VIDEO_CAPTURE_SUCCESS",(function(){return Gt})),i.d(t,"START_REMOTE_CONTROL_SUCCESS",(function(){return Ft})),i.d(t,"CANCEL_REMOTE_CONTROL_SUCCESS",(function(){return Ht})),i.d(t,"REMOTE_CONTROL_COPIED_TEXT_NOTIFY",(function(){return Kt})),i.d(t,"MONITOR_LOG",(function(){return jt})),i.d(t,"CURRENT_DESKTOP_SHARING_WIDTH_HEIGHT",(function(){return Yt})),i.d(t,"DESKTOP_SHARING_CAPTURE_SUCCESS",(function(){return qt})),i.d(t,"CHECK_CHROME_SHARING_EXTENSION_RESPONSE",(function(){return Xt})),i.d(t,"SHARING_DECODE_MAX_SIZE",(function(){return Qt})),i.d(t,"REQUEST_AUDIO_BRIDGE_TOKEN",(function(){return zt})),i.d(t,"SEND_MESSAGE_TO_RWG",(function(){return Jt})),i.d(t,"AES_GCM_IV_RESPONSE",(function(){return Zt})),i.d(t,"SHARING_DESKTOP_STREAM_HAVE_AUDIO",(function(){return $t})),i.d(t,"JOIN_COMPUTER_AUDIO_COMPLETE",(function(){return ei})),i.d(t,"JOIN_DESKTOP_AUDIO_COMPLETE",(function(){return ti})),i.d(t,"LEAVE_COMPUTER_AUDIO_COMPLETE",(function(){return ii})),i.d(t,"LEAVE_DESKTOP_AUDIO_COMPLETE",(function(){return ri})),i.d(t,"HID_STATUS_MUTE",(function(){return ai})),i.d(t,"HID_STATUS_OFF_HOOK",(function(){return si})),i.d(t,"WB_MESSAGE",(function(){return oi})),i.d(t,"AUDIO_STREAM_FAILED",(function(){return ni})),i.d(t,"VIDEO_STREAM_FAILED",(function(){return di})),i.d(t,"AUDIO_SPEAKER_SET_SUCCESS",(function(){return ui})),i.d(t,"FIRST_IOS_FRAME",(function(){return li})),i.d(t,"AUDIOBRIDGE_EBABLE_SHARE_TO_BO_SUCCESS",(function(){return ci})),i.d(t,"AUDIOBRIDGE_SET_CC_LANG_SUCCESS",(function(){return hi})),i.d(t,"AUDIOBRIDGE_ENABLE_BROADCAST_TO_BO_SUCCESS",(function(){return fi})),i.d(t,"AUDIO_LEVEL_INDICATOR",(function(){return pi})),i.d(t,"SYNC_RENDERER_TYPE_RESPONSE",(function(){return _i})),i.d(t,"INIT_FAILED",(function(){return mi})),i.d(t,"INIT_FAILED_VIDEO",(function(){return Ei})),i.d(t,"INIT_FAILED_AUDIO",(function(){return gi})),i.d(t,"INIT_FAILED_SHARING",(function(){return Si})),i.d(t,"AUDIO_CAPTURE_FAILED",(function(){return vi})),i.d(t,"AUDIO_WEBSOCKET_BROKEN",(function(){return Ci})),i.d(t,"VIDEO_WEBSOCKET_BROKEN",(function(){return Ai})),i.d(t,"SHARING_DEC_THREAD_FAILED",(function(){return Ri})),i.d(t,"AUDIO_ZERO_DATA",(function(){return Ti})),i.d(t,"AUDIO_CTX_SAMPLERATE",(function(){return Ii})),i.d(t,"USER_FORBIDDED_CAPTURE_VIDEO",(function(){return bi})),i.d(t,"USER_CAMERA_IS_TAKEN_BY_OTHER_PROGRAMS",(function(){return Oi})),i.d(t,"STOP_VIDEO_CAPTURE_FAILED",(function(){return Di})),i.d(t,"START_REMOTE_CONTROL_FAILED",(function(){return wi})),i.d(t,"CANCEL_REMOTE_CONTROL_FAILED",(function(){return yi})),i.d(t,"REMOTE_CONTROL_PASTE_TEXT_LENGTH_OVERFLOW",(function(){return Mi})),i.d(t,"USER_STOP_DESKTOP_SHARING",(function(){return Pi})),i.d(t,"USER_CANCEL_PERMISSION_REQUEST",(function(){return Ni})),i.d(t,"DESKTOP_SHARING_CHROME_EXTENSION_UNINSTALLED",(function(){return Vi})),i.d(t,"DESKTOP_SHARING_PERMISSION_DENIED",(function(){return ki})),i.d(t,"DESKTOP_SHARING_TIME_OUT",(function(){return Ui})),i.d(t,"DESKTOP_SHARING_ERROR",(function(){return Li})),i.d(t,"AUDIO_SPEAKER_SET_ERROR",(function(){return xi})),i.d(t,"DESKTOP_SHARING_SYSTEM_ERROR",(function(){return Wi})),i.d(t,"AUDIO_CLIPPING",(function(){return Bi})),i.d(t,"AUDIO_AUTO_PLAY_FAILED",(function(){return Gi})),i.d(t,"WCL_SIP_WEBSOCKET_CONNECT_ERROR",(function(){return Fi})),i.d(t,"SHARING_DESKTOP_STREAM_HAVE_NO_AUDIO",(function(){return Hi})),i.d(t,"WCL_AUDIO_BRIDGE_RECONNECT_START",(function(){return Ki})),i.d(t,"WCL_AUDIO_BRIDGE_RECONNECT_END",(function(){return ji})),i.d(t,"WEBGL_LOST_IN_MULTI_VIEW",(function(){return Yi})),i.d(t,"MASK_SETTING_PARA_ERROR",(function(){return qi})),i.d(t,"VIDEO_VB_SETTING_PARA_ERROR",(function(){return Xi})),i.d(t,"NOTIFY_UI_FAILOVER",(function(){return Qi})),i.d(t,"AUDIO_CONNECT_HID_JOIN_FAILED",(function(){return zi})),i.d(t,"JOIN_COMPUTER_AUDIO_FAILURE",(function(){return Ji})),i.d(t,"AUDIOBRIDGE_EBABLE_BROADCAST_TO_BO_FAILURE",(function(){return Zi})),i.d(t,"AUDIOBRIDGE_SET_CC_LANG_FAILURE",(function(){return $i})),i.d(t,"AUDIOBRIDGE_EBABLE_SHARE_TO_BO_FAILURE",(function(){return er})),i.d(t,"AUDIO_MIC_SET_ERROR",(function(){return tr})),i.d(t,"NOTIFY_UI_WMSC_FAILOVER",(function(){return ir})),i.d(t,"NOTIFY_UI_WMSC_WSS_DISCONNECTED",(function(){return rr})),i.d(t,"RECOVER_WEBRTC_AUDIO",(function(){return ar})),i.d(t,"MEDIA_RECONNECT",(function(){return sr})),i.d(t,"WEBGL_CONTEXT_INVALID",(function(){return or})),i.d(t,"WASM_MEMORY_FAIL",(function(){return nr})),i.d(t,"LOST_CAMERA_ACCESS",(function(){return dr})),i.d(t,"WORKLET_PROCESS_EXCEPTIONS",(function(){return ur})),i.d(t,"VB_PROCESS_IMAGE_FAIL",(function(){return lr})),i.d(t,"MEDIA_HEALTH_CHECK_FAILED",(function(){return cr})),i.d(t,"START_ANNOTATION_FAILED",(function(){return hr})),i.d(t,"AUDIO_SENT_BYTES_ZERO",(function(){return fr})),i.d(t,"EVENT_PARMS_ERROR",(function(){return pr})),i.d(t,"AUDIO_STOP",(function(){return _r})),i.d(t,"AUDIO_START",(function(){return mr})),i.d(t,"AUDIO_REMOVE",(function(){return Er})),i.d(t,"AUDIO_ILLEGAL",(function(){return gr})),i.d(t,"SHARING_PARAM_INFO_FROM_SOCKET",(function(){return Sr})),i.d(t,"ZOOM_CONNECTION_VIDEO_OFFER_EVT",(function(){return vr})),i.d(t,"ZOOM_CONNECTION_VIDEO_OFFER_RESPONSE_EVT",(function(){return Cr})),i.d(t,"ZOOM_CONNECTION_AUDIO_OFFER_RESPONSE_EVT",(function(){return Ar})),i.d(t,"ZOOM_CONNECTION_REMOVE_UDP_EVT",(function(){return Rr})),i.d(t,"EVT_TYPE_WS_VIDEO_DATACHANNEL_ANSWER",(function(){return Tr})),i.d(t,"WS_CONF_AB_TOKEN_REQ",(function(){return Ir})),i.d(t,"WS_CONF_AB_TOKEN_RES",(function(){return br})),i.d(t,"WS_CONF_END_INDICATION",(function(){return Or})),i.d(t,"WS_VIDEO_MULTI_SUBSCRIBE_REQ",(function(){return Dr})),i.d(t,"WS_VIDEO_MULTI_UNSUBSCRIBE_REQ",(function(){return wr})),i.d(t,"RWG_MONITOR_LOG_EVENT",(function(){return yr})),i.d(t,"WS_CONF_WCL_SET_FULL_HD_REQ",(function(){return Mr})),i.d(t,"PUBSUB_EVT",(function(){return Pr})),i.d(t,"SHARING_FIRST_DECODE_FRAME_RECEIVED_SSRC",(function(){return Nr})),i.d(t,"MEDIA_CONNECTED",(function(){return Vr})),i.d(t,"HAVE_NO_WATERMARK",(function(){return kr})),i.d(t,"HAVE_WATERMARK",(function(){return Ur})),i.d(t,"SPEAKING_WHEN_MUTE",(function(){return Lr})),i.d(t,"AUDIO_QOS_DATA",(function(){return xr})),i.d(t,"VIDEO_QOS_DATA",(function(){return Wr})),i.d(t,"VIDEOSHARE_QOS_DATA",(function(){return Br})),i.d(t,"NETWORK_QUALITY_CHANGE",(function(){return Gr})),i.d(t,"NETWORK_QUALITY_CHANGE_AUDIO",(function(){return Fr})),i.d(t,"sdkIvTypeKeyEnum",(function(){return Hr})),i.d(t,"CURRENT_DECODE_VIDEO_QUALITY",(function(){return Kr})),i.d(t,"CURRENT_DECODE_VIDEO_FPS",(function(){return jr})),i.d(t,"ENABLE_REUSE_STREAM",(function(){return Yr})),i.d(t,"PRESET_MEDIA_CONSTRAINTS",(function(){return qr})),i.d(t,"DESTORY_REUSE_STREAM",(function(){return Xr})),i.d(t,"VB_SETTING_PARA_ERROR_TYPE",(function(){return Qr})),i.d(t,"AUDIO_STREAM_MUTED",(function(){return zr})),i.d(t,"AUDIO_STREAM_UNMUTED",(function(){return Jr})),i.d(t,"VIDEO_STREAM_MUTED",(function(){return Zr})),i.d(t,"VIDEO_STREAM_UNMUTED",(function(){return $r})),i.d(t,"EXPOSE_VB_FRAME",(function(){return ea})),i.d(t,"UNIFIED_VB_FRAME",(function(){return ta})),i.d(t,"UNIFIED_VB_STOP",(function(){return ia})),i.d(t,"UNIFIED_VB_PAUSE",(function(){return ra})),i.d(t,"UNIFIED_VB_ACK",(function(){return aa})),i.d(t,"ANNO_UNDO_STATUS",(function(){return sa})),i.d(t,"ANNO_REDO_STATUS",(function(){return oa})),i.d(t,"CAPTURE_FAILED_REASON",(function(){return na})),i.d(t,"REQUEST_PERMISSION_STATUS",(function(){return da}));const r=0,a=1,s=2,o=3,n=4,d=5,u=6,l=7,c=8,h=9,f=10,p=11,_=12,m=13,E=14,g=15,S=16,v=17,C=18,A=19,R=20,T=21,I=22,b=23,O=24,D=25,w=26,y=27,M=28,P=29,N=30,V=30.1,k=31,U=31.1,L=32,x=33,W=34,B=35,G=36,F=40,H=41,K=42,j=43,Y=44,q=45,X=46,Q=47,z=48,J=49,Z=50,$=51,ee=52,te=53,ie=54,re=55,ae=57,se=58,oe=59,ne=60,de=61,ue=62,le=63,ce=64,he=65,fe=66,pe=70,_e=71,me=72,Ee=73,ge=74,Se=75,ve=76,Ce=77,Ae=78,Re=79,Te=80,Ie=81,be=82,Oe=83,De=84,we=85,ye=86,Me=87,Pe=90,Ne=91,Ve=92,ke=93,Ue=94,Le=95,xe=96,We=97,Be=98,Ge=99,Fe=101,He=100,Ke=102,je=103,Ye=110,qe=111,Xe=112,Qe=113,ze=114,Je=115,Ze=116,$e=117,et=118,tt=120,it=121,rt=122,at=123,st=124,ot=125,nt=126,dt=127,ut=128,lt=129,ct=130,ht=131,ft=132,pt=133,_t=135,mt=136,Et=137,gt=138,St=150,vt=152,Ct=156,At=158,Rt=159,Tt=160,It=161,bt=162,Ot=163,Dt=1,wt=1.1,yt=1.2,Mt=1.3,Pt=2,Nt=3,Vt=4,kt=5,Ut=6,Lt=6.1,xt=7,Wt=8,Bt=9,Gt=10,Ft=11,Ht=12,Kt=13,jt=14,Yt=15,qt=16,Xt=17,Qt=18,zt=19,Jt=20,Zt=21,$t=23,ei=24,ti=25,ii=26,ri=27,ai=28,si=29,oi=30,ni=31,di=32,ui=33,li=34,ci=35,hi=36,fi=37,pi=38,_i=39,mi=-1,Ei=-1.1,gi=-1.2,Si=-1.3,vi=-2,Ci=-3,Ai=-4,Ri=-5,Ti=-6,Ii=-7,bi=-8,Oi=-9,Di=-10,wi=-11,yi=-12,Mi=-14,Pi=-15,Ni=-16,Vi=-17,ki=-18,Ui=-19,Li=-20,xi=-21,Wi=-22,Bi=-23,Gi=-24,Fi=-28,Hi=-27,Ki=-29,ji=-31,Yi=-32,qi=-33,Xi=-34,Qi=-35,zi=-36,Ji=-37,Zi=-38,$i=-39,er=-40,tr=-41,ir=-42,rr=-43,ar=-44,sr=-45,or=-51,nr=-52,dr=-60,ur=-53,lr=-70,cr=-129,hr=-130,fr=-136,pr=-137,_r=0,mr=1,Er=2,gr=-1,Sr="SHARING_PARAM_INFO_FROM_SOCKET",vr=24321,Cr=24322,Ar=24322,Rr=24323,Tr=24322,Ir=4300,br=4299,Or=7939,Dr=12303,wr=12305,yr=4167,Mr=4355,Pr={ZOOM_CONNECTION_VIDEO_OFFER_RESPONSE_EVT:"ZOOM_CONNECTION_VIDEO_OFFER_RESPONSE_EVT",ZOOM_CONNECTION_AUDIO_OFFER_RESPONSE_EVT:"ZOOM_CONNECTION_AUDIO_OFFER_RESPONSE_EVT",END_MEDIA:"END_MEDIA",DESTROY:"DESTROY",DC_COMING_MESSAGE:"DC_COMING_MESSAGE",AUDIO_BRIDGE_WS_TOKEN:"AUDIO_BRIDGE_WS_TOKEN"},Nr=70,Vr=170,kr=!1,Ur=!0,Lr=121,xr="AUDIO_QOS_DATA",Wr="VIDEO_QOS_DATA",Br="VIDEOSHARE_QOS_DATA",Gr="NETWORK_QUALITY_CHANGE",Fr="NETWORK_QUALITY_CHANGE_AUDIO",Hr={VIDEO_ENCODE:"0",VIDEO_DECODE:"1",AUDIO_ENCODE:"2",AUDIO_DECODE:"3",SHARING_ENCODE:"4",SHARING_DECODE:"5"},Kr=66.5,jr=66.6,Yr="ENABLE_REUSE_STREAM",qr="PRESET_MEDIA_CONSTRAINTS",Xr="DESTORY_REUSE_STREAM",Qr={FAIL:4},zr="AUDIO_STREAM_MUTED",Jr="AUDIO_STREAM_UNMUTED",Zr="VIDEO_STREAM_MUTED",$r="VIDEO_STREAM_UNMUTED",ea="EXPOSE_VB_FRAME",ta="UNIFIED_VB_FRAME",ia="UNIFIED_VB_STOP",ra="UNIFIED_VB_PAUSE",aa="UNIFIED_VB_ACK",sa="ANNO_UNDO_STATUS",oa="ANNO_REDO_STATUS",na={USER_DENIED:1,SYSTEM_DENIED:2,DEVICE_IN_USE:3,NO_DEVICE:4,UNKNOWN_REASON:5,OVERCONSTRAINED:6,USER_DISMISS:7},da={GRANTED_AUDIO_VIDEO:1,GRANTED_AUDIO:2,DENIED:3,EXCEPTION_FAILS:4,DISMISS:5}},function(e,t,i){"use strict";i.r(t),i.d(t,"apiSupportUtility",(function(){return b})),i.d(t,"IsSupportWebGLOffscreenCanvas",(function(){return U})),i.d(t,"DetectIsMTRAndroidWithSAB",(function(){return L})),i.d(t,"Get_Logical_SSrc",(function(){return W})),i.d(t,"createMainAudioContext",(function(){return B})),i.d(t,"createAudioContext",(function(){return G})),i.d(t,"Deferred",(function(){return H})),i.d(t,"getFilename",(function(){return K})),i.d(t,"IntegrityHelper",(function(){return j})),i.d(t,"getGcd",(function(){return Y})),i.d(t,"getLcm",(function(){return q})),i.d(t,"AdjustRegion_AspectRatio",(function(){return X})),i.d(t,"deepEqual",(function(){return Q})),i.d(t,"getWMSCModule",(function(){return z})),i.d(t,"getAnnoterModule",(function(){return J})),i.d(t,"addSelfViewDebugInfoForWebRTC",(function(){return Z})),i.d(t,"addUserEventListener",(function(){return $})),i.d(t,"VideoStreamCanCapture",(function(){return ee})),i.d(t,"RecordVideoState",(function(){return te})),i.d(t,"CheckCanvasSize",(function(){return ie})),i.d(t,"isHtmlElement",(function(){return re})),i.d(t,"parseDOMParams",(function(){return ae})),i.d(t,"checkBrowserVersion",(function(){return se})),i.d(t,"replaceComma",(function(){return oe})),i.d(t,"isChromeOS",(function(){return ne})),i.d(t,"isMobileDevice",(function(){return de})),i.d(t,"isTablet",(function(){return ue})),i.d(t,"isWebGLAvailable",(function(){return le})),i.d(t,"createRlbSocket",(function(){return ce})),i.d(t,"setIsWebRTCMode",(function(){return he})),i.d(t,"updateAudioProbResult",(function(){return pe})),i.d(t,"isMacIntel",(function(){return _e})),i.d(t,"IsSupportTransferableDataChannel",(function(){return me}));var r=i(35),a=i(30),s=i(7),o=i(0),n=i(6),d=i(4),u=i(50),l=i.n(u),c=i(40),h=i(24),f=i(36),p=i(22),_=i(11);const m={};let E=!1,g=!1;const S=function(){let e=(i={},r=navigator.userAgent.toLowerCase(),(t=r.match(/rv:([\d.]+)\) like gecko/))||(t=r.match(/msie ([\d\.]+)/))?(i.ie=t[1],i.name="ie"):(t=r.match(/(?:edge|edg)\/([\d\.]+)/))?(i.edge=t[1],i.name="edge"):(t=r.match(/(?:firefox|iceweasel)\/([\d\.]+)/))?(i.firefox=t[1],i.name="firefox"):(t=r.match(/(?:opera|opr).([\d\.]+)/))?(i.opera=t[1],i.name="opera"):(t=r.match(/chrome\/([\d\.]+)/))?(i.chrome=t[1],i.name="chrome"):(t=r.match(/version\/([\d\.]+).*safari/))&&(i.safari=t[1],i.name="safari"),i);var t,i,r;return function(){return e}}(),v=function(){let e={};return function(){try{var t,i,r,a,s,o;let n=l()(navigator.userAgent),d="tablet"==(null==n||null===(t=n.device)||void 0===t?void 0:t.type)||ue(),u="mobile"==(null==n||null===(i=n.device)||void 0===i?void 0:i.type)||de(),c=null==n||null===(r=n.os)||void 0===r?void 0:r.name,h=null==n||null===(a=n.os)||void 0===a?void 0:a.version,f=0;if(d?f=4:u&&(f=1),!c){const e=navigator.userAgent.match(/\(([^;]+); OpenHarmony ([\d.]+)\)/);e&&e.length>2&&(c="OpenHarmony",h=e[2],"Tablet"===e[1]?f=4:"Phone"===e[1]&&(f=1))}e.osType=f,e.os=c,e.osVersion=h,e.browser=Object.assign({},n.browser),null!==(s=c)&&void 0!==s&&s.toLowerCase().includes("mac")&&(d||u)&&(e.os="ios"),null!==(o=c)&&void 0!==o&&o.toLowerCase().includes("linux")&&(d||u)&&(e.os="android");let p=(h||"").split(".")[0];c&&navigator.userAgentData&&(c.toLowerCase().includes("win")&&"10"==p||c.toLowerCase().includes("android")||c.toLowerCase().includes("mac"))&&navigator.userAgentData.getHighEntropyValues(["platform","platformVersion"]).then(t=>{c=null==t?void 0:t.platform;const i=(c||"").toLowerCase(),r=parseInt((t.platformVersion||"").split(".")[0]);i.includes("win")?(h=r>=13?"11":r>0?"10":"7",e.os=c,e.osVersion=h):(i.includes("android")||i.includes("mac"))&&(h=t.platformVersion,e.osVersion=h)})}catch(e){}}(),function(){return e}}(),C=(e,t)=>{const i=t.toString().split("."),r=e.toString().split("."),a=i.length,s=r.length,o=Math.min(a,s);for(let e=0;e<o;e++){const t=parseInt(i[e],10),a=parseInt(r[e],10);if(t!==a)return a>t}return s>=a},A=(e,t)=>{var i=S();if("chrome"===e||"chromium"===e){if(i.chrome||i.edge||i.opera){var r=i.chrome||i.edge||i.opera;return C(r,t)}}else if(i[e])return C(i[e],t);return!1},R=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90;return A("chrome",e)},T=e=>A("firefox",e),I=e=>A("safari",e);const b=new class{constructor(){this._isSupportMultiThread=!1,this._isSupportSIMD=!1,this.inProgressPromise={checkSupportMultiThread:null,checkSupportSIMD:null},this._isSupportWebtransport=!1,this._isSupportVirtualBackground=!1}async checkIsSupportMultiThread(){if(!this.getIsSupportMultiThread())try{this.inProgressPromise.checkSupportMultiThread?await this.inProgressPromise.checkSupportMultiThread:(this.inProgressPromise.checkSupportMultiThread=r.default.threads(),this._setIsSupportMultiThread(await this.inProgressPromise.checkSupportMultiThread))}catch(e){this._setIsSupportMultiThread(!1)}}_setIsSupportMultiThread(e){this._isSupportMultiThread=e}getIsSupportMultiThread(){return this._isSupportMultiThread}async checkIsSupportSIMD(){if(!this.getIsSupportSIMD())try{this.inProgressPromise.checkSupportSIMD?await this.inProgressPromise.checkSupportSIMD:(this.inProgressPromise.checkSupportSIMD=r.default.simd(),this._setIsSupportSIMD(await this.inProgressPromise.checkSupportSIMD))}catch(e){this._setIsSupportSIMD(!1)}}_setIsSupportSIMD(e){this._isSupportSIMD=e}getIsSupportSIMD(){return this._isSupportSIMD}getIsSupportWebtransport(){return R(97)&&"function"==typeof WebTransport&&this._isSupportWebtransport}setIsSupportWebtransport(e){this._isSupportWebtransport=!!e}getIsSupportVirtualBackground(){const e=R(91)||T(89)||I(17.4);return navigator.hardwareConcurrency&&navigator.hardwareConcurrency>2&&e&&"function"==typeof OffscreenCanvas&&this._isSupportVirtualBackground}setIsSupportVirtualBackground(e){this._isSupportVirtualBackground=!!e}getIsRenderSelfVideoInEncodeWorker(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return!o.default.enableMultiDecodeVideoWithoutSAB&&e&&!this.getIsSupportMultiThread()&&this.getIsSupportVirtualBackground()}};var O={capacity:void 0,capacity1080:!0,get capacityfor720(){return void 0!==this.capacity&&this.capacity},set capacityfor720(e){this.capacity=e},get capacityfor1080(){return void 0!==this.capacity1080&&this.capacity1080},set capacityfor1080(e){this.capacity1080=e}},D={capacitydeco:void 0,get capacitydecofor1080(){return void 0!==this.capacitydeco&&this.capacitydeco},set capacitydecofor1080(e){this.capacitydeco=e}};function w(e,t,i){const r=e.match(t);return r&&r.length>=i&&parseInt(r[i],10)}function y(){const{navigator:e}=window,t={browser:null,version:null};if("undefined"==typeof window||!window.navigator)return t.browser="Not a browser.",t;if(e.mozGetUserMedia)t.browser="firefox",t.version=w(e.userAgent,/Firefox\/(\d+)\./,1);else if(e.webkitGetUserMedia)t.browser="chrome",t.version=w(e.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else if(e.mediaDevices&&e.userAgent.match(/Edge\/(\d+).(\d+)$/))t.browser="edge",t.version=w(e.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!window.RTCPeerConnection||!e.userAgent.match(/AppleWebKit\/(\d+)\./))return t.browser="Not a supported browser.",t;t.browser="safari",t.version=w(e.userAgent,/AppleWebKit\/(\d+)\./,1)}return t}const M=y();function P(){try{var e=navigator.userAgent||navigator.vendor||window.opera;return!!/android/i.test(e)}catch(e){return!1}}const N=function(){let e={vendor:"",renderInfo:"",isAstcSupported:!1,isWebGLContextInvalid:!0};try{const r=document.createElement("canvas");if(!r){const e="Error: document.createElement return a null canvas!";s.default.error(e)}let a=r.getContext("webgl")||r.getContext("moz-webgl")||r.getContext("webkit-3d")||r.getContext("experimental-webgl");if(!a||a.isContextLost()){const e="Error: canvas.getContext fail, context:".concat(a,", lost:").concat(null==a?void 0:a.isContextLost(),", size:(").concat(r.width,",").concat(r.height,")");s.default.error(e)}if(a){var t,i;if(e.isWebGLContextInvalid=!1,a.isContextLost()){const e="Error: webgl context is lost, canvas(".concat(r.width,",").concat(r.height,")!");s.default.error(e)}let o,n;if("firefox"===M.browser)o=a.getParameter(a.RENDERER),n=a.getParameter(a.VENDOR);else{let e=a.getExtension("WEBGL_debug_renderer_info");o=a.getParameter(e.UNMASKED_RENDERER_WEBGL),n=a.getParameter(e.UNMASKED_VENDOR_WEBGL)}if(e.renderInfo=null===(t=o)||void 0===t?void 0:t.toLowerCase(),e.vendor=null===(i=n)||void 0===i?void 0:i.toLowerCase(),e.isAstcSupported=-1!==a.getSupportedExtensions().indexOf("WEBGL_compressed_texture_astc"),""==n){const e="Error: vendor is null, debug:".concat(debugInfo,", render:").concat(debugInfo.UNMASKED_RENDERER_WEBGL,", vendor:").concat(debugInfo.UNMASKED_VENDOR_WEBGL,", contextLost:").concat(a.isContextLost(),"!");s.default.error(e)}}}catch(e){s.default.error("Error while get webgl context:",e)}return e}(),V=function(){if("function"!=typeof OffscreenCanvas)return!1;let e={isSupportWebgl:!1,isSupportWebgl2:!1};try{const t=new OffscreenCanvas(1,1);(t.getContext("webgl")||t.getContext("experimental-webgl")||t.getContext("moz-webgl")||t.getContext("webkit-3d"))&&(e.isSupportWebgl=!0)}catch(e){s.default.error("Error while get webglcontext:",e)}try{if(e.isSupportWebgl){new OffscreenCanvas(1,1).getContext("webgl2")&&(e.isSupportWebgl2=!0)}}catch(e){s.default.error("Error while get webglcontext2:",e)}return e}();var k=function(){let e=Object.assign({},V,N);return e.cpu=navigator.hardwareConcurrency?navigator.hardwareConcurrency:0,e.VE=0,e.SE=0,e.VD=0,e.SD=0,e.SAB=null!=typeof SharedArrayBuffer,e.errorMessage=null,e.visibility=!0,e.unvisibilitycount=0,e.time=0,e}();function U(){return V.isSupportWebgl}function L(){return-1!==navigator.userAgent.indexOf("MSFT Teams Android Room")&&"undefined"!=typeof SharedArrayBuffer}function x(){return"function"==typeof VideoTrackReader&&"function"==typeof VideoFrame}function W(e){return e?e>>10<<10:-1}function B(){return G("Main",F.getAudioContextConfigure())}function G(e){let t,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return"function"!=typeof AudioContext?(s.default.error("Not Support AudioContext"),null):(s.default.log("Creating ".concat(e," AudioContext")),t=i?new AudioContext(i):new AudioContext,t.onstatechange=()=>{s.default.log("".concat(e," AudioContext state changed to ").concat(t.state)),d.default.add_monitor("ACSC:".concat(e,":").concat(t.state))},t.onsinkchange=()=>{"object"==typeof t.sinkId&&"none"===t.sinkId.type?s.default.log("".concat(e," AudioContext - Audio changed to not play on any device")):s.default.log("".concat(e," AudioContext - Audio output device changed to ").concat(t.sinkId))},t)}const F={getOSInfo:()=>v(),getGpuInfo:()=>N,isMTRAndroidWithSAB:()=>L(),isSupport2DCanvasDrawFrame:()=>("function"==typeof MediaStreamTrackProcessor||x())&&"chrome"==M.browser&&M.version>=104&&-1==navigator.appVersion.indexOf("Mac"),checkLocalP2PConnection:()=>new Promise(async(e,t)=>{function i(e){return new Promise((t,i)=>{e.onconnectionstatechange=i=>{"connected"===e.connectionState&&t(!0)}})}function r(e){e&&e.close()}let a,o,n=null,d=null,u=document.createElement("canvas");try{u.width=200,u.height=200,u.getContext("2d");let t=u.captureStream();if("function"!=typeof RTCPeerConnection)return void e(!1);if(n=new RTCPeerConnection,d=new RTCPeerConnection,n.onicecandidate=e=>{e.candidate&&d.addIceCandidate(new RTCIceCandidate(e.candidate))},d.onicecandidate=e=>{e.candidate&&n.addIceCandidate(new RTCIceCandidate(e.candidate))},Promise.all([i(n),i(d)]).then(()=>{e(!0),r(n),r(d)}),"function"!=typeof n.addStream)return void e(!1);await n.addStream(t),a=await n.createOffer(),await n.setLocalDescription(a),await d.setRemoteDescription(a),o=await d.createAnswer(),await d.setLocalDescription(o),await n.setRemoteDescription(o),setTimeout(()=>{e(!1),r(n),r(d)},200)}catch(t){s.default.error("Error when trying to check for local RTC peer connection",t),e(!1)}}),getDocumentHandle:e=>document.getElementById(e),browserType:M,browser:{isFirefox:"firefox"===M.browser,isChrome:"chrome"===M.browser,isSafari:"safari"===M.browser},isIphoneOrIpadSafari(){return this.isIphoneOrIpadBrowser()||this.isIpadOS()},isOpera65:()=>function(){try{var e=navigator.userAgent.match(/OPR\/(\d+)\./);return!!(e&&Number(e[1])<66)}catch(e){return!1}}(),isOpera:()=>/opera|opr\/[\d]+/i.test(navigator.userAgent),isOperaVersionHigherThan(e){try{var t=navigator.userAgent.match(/OPR\/(\d+)\./);return!!(t&&Number(t[1])>=e)}catch(e){return!1}},isAndroidBrowser:()=>P(),isAndroidVersionLessEqual(e){const t=v();if(!t.os||"android"!==t.os.toLowerCase()||!t.osVersion)return!1;const i=t.osVersion.toString().split(".");return parseInt(i[0])<=e},isSupportVideoFrame:()=>"undefined"!=typeof VideoFrame,isQuestBrowser:()=>function(){try{return/oculusbrowser/i.test(navigator.userAgent)}catch(e){return!1}}(),isMobileSafariSupportVideoFrame(){return(this.isIphoneOrIpadBrowser()||this.isIpadOS()&&o.default.rwgAgent)&&this.isSupportVideoFrame()},isSelfPreviewRenderWithVideo(){return!!this.isMobileSafariSupportVideoFrame()||(!b.getIsSupportMultiThread()&&!b.getIsSupportVirtualBackground()&&this.isSupportVideoFrameOrBitmapCapture()||this.isAndroidBrowser()&&!this.isMTRAndroidWithSAB()&&!o.default.rwgAgent)},isSupportNewWaitRoomFlow:()=>!0,isMacIntelSafari(){try{return!(!this.browser.isSafari||navigator.maxTouchPoints&&!(navigator.maxTouchPoints<=2)||N.isAstcSupported||!this.isMac())}catch(e){return!1}},isMacIntelChrome(){try{var e;return!!(this.browser.isChrome&&(!navigator.maxTouchPoints||navigator.maxTouchPoints<=2)&&(null===(e=N.vendor)||void 0===e?void 0:e.indexOf("intel"))>-1&&this.isMac())}catch(e){return!1}},isIphoneOrIpadBrowser(){try{return!!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)}catch(e){return!1}},isIpadOS:()=>navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&(/iPad/.test(navigator.platform)||/MacIntel/.test(navigator.platform)),isChromeOS:()=>function(){try{return!!/\bCrOS\b/.test(navigator.userAgent)}catch(e){return!1}}(),isWindowsChrome(){const{userAgent:e}=navigator;return/windows/i.test(e)},isTeslaMode:()=>/TESLA/.test(navigator.userAgent),isMac:()=>navigator.platform.indexOf("Mac")>-1,isWindows:()=>navigator.platform.indexOf("Win")>-1,isLinux(){return navigator.platform.indexOf("Linux")>-1&&!this.isChromeOS()},isMTRAndroid:()=>/MSFT Teams Android Room/i.test(navigator.userAgent),isMTRWindows(){const e=window.meetingHost;if(!e)return!1;return"MSFT"===e.getHostState().vendorId&&!this.isMTRAndroid()},isSupportChromeWideAEC(){const e=o.default.chromeWideAEC&&this.isChromeOS()&&R(116);return(this.isMac()||this.isWindows()||this.isLinux())&&R(111)||e||o.default.isGoogleMeetMode},isSupportOpenMicWhenShareAudio(){return this.isSupportChromeWideAEC()&&!o.default.shareSystemAudio},getAudioFeatureFlags:()=>o.default.enableAudioBridge?4:12,isSupportShareMultiStream:()=>!0,isSupportVideoLTR:()=>!0,isSupportAudioBridgeAvsync:()=>!0,getAudioContextConfigure(){let e={};return function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:90;return A("chromium",e)}(74)&&(e={sampleRate:48e3,latencyHint:.02}),e},download(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(m[e])return m[e];let i=new Promise(async(i,r)=>{let a={};t&&(a.integrity=t);for(let t=0;t<3;t++)try{let o=await fetch(e,a);if(null!=o&&o.ok){i(o.text()),t>0&&s.default.error("after ".concat(t," retry download js ").concat(e," successed "));break}2==t&&r("download failed ".concat(e," ").concat(null==o?void 0:o.status))}catch(e){2==t&&r(e)}});return m[e]=i,i},async downloadAndCompileWebAssembly(e,t,i){let r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];const a="".concat(e).concat(r);if(m[a])return m[a];let o=new Promise(async(a,o)=>{let n=null;i.add_monitor("CS".concat(t));for(let o=0;o<3;o++){try{if(r)n=await WebAssembly.compileStreaming(fetch(e,{priority:"high"}));else{const t=await fetch(e,{priority:"high"});n=await t.arrayBuffer()}i.add_monitor("CE".concat(t))}catch(a){if("TypeError"===a.name)try{const t=await fetch(e,{priority:"high"}),i=await t.arrayBuffer();n=await WebAssembly.compile(i)}catch(a){2==o&&(i.add_monitor("".concat(r?"CF":"FF").concat(t)),s.default.error("Failed to download WASM file using compile: ".concat(e," for worker type: ").concat(t),a))}else 2==o&&s.default.error("Failed to download WASM file using ".concat(r?"compileStreaming":"fetch",": ").concat(e," for worker type: ").concat(t),a)}if(n)return a(n),void(o>0&&s.default.error("after ".concat(o," retry download wasm ").concat(e," successed ")))}o(new Error("Unable to download and compile WASM file: ".concat(e," for worker type: ").concat(t)))});return m[a]=o,o},readBlob:e=>new Promise((t,i)=>{var r=new FileReader;r.onload=function(){t(r.result)},r.readAsText(e)}),readBlobAsBuffer:e=>new Promise((t,i)=>{var r=new FileReader;r.onload=function(e){t(e.target.result)},r.readAsArrayBuffer(e)}),lengthInUtf8Bytes(e){var t=encodeURIComponent(e).match(/%[89ABab]/g);return e.length+(t?t.length:0)},isLittleEndian(){let e=new ArrayBuffer(2),t=new Uint8Array(e),i=new Uint16Array(e);return t[0]=170,t[1]=187,48042===i[0]},sleep:e=>new Promise((t,i)=>{setTimeout(()=>{t(!0)},e)}),isSDKSupportMultiThread:async()=>(await b.checkIsSupportMultiThread(),b.getIsSupportMultiThread()),is32bitChrome:async()=>{if(-1!=navigator.userAgent.indexOf("WOW64"))return!0;if(navigator.userAgentData&&navigator.userAgentData.getHighEntropyValues){return(await navigator.userAgentData.getHighEntropyValues(["wow64"])).wow64}return!1},isAMDGraphic(){try{return this.graphicName.includes("amd")}catch(e){return!1}},graphicName:N.renderInfo,graphicvendorname:N.vendor,isGraphicShouldUseHardwareAccelerationDecode(){return!(!this.isAMDGraphic()||!this.isChromeOS())||!(this.isAMDGraphic()&&!this.isChromeOS())},VP9MachineDetect(){const e=navigator.mediaCapabilities.decodingInfo({type:"webrtc",video:{contentType:"video/vp9",bitrate:1e7,framerate:25,height:1920,width:1080}});return new Promise((t,i)=>{e.then(e=>{e.supported||(s.default.log("video/vp9 codec isn't supported in software or hardware"),t(!1)),t(e.powerEfficient)}).catch(e=>{s.default.warn("Error when trying to determine support for VP9 codec",e),t(!1)})})},async IsSupportVideoDecodeHardwareAcceleration(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if("function"!=typeof VideoDecoder||this.browser.isSafari&&!I("17.5"))return!1;var t={codec:"avc1.640028",description:new Uint8Array([1,100,0,31,255,225,0,14,103,100,0,51,172,27,26,17,129,64,22,201,160,16,7,0,5,104,200,66,60,48,0,5,104,82,16,207,12,0,25,104,114,16,143,24,67,17,132,56,140,84,81,8,18,22,41,3,194,98,3,5,32,122,9,140,0,5,104,36,132,51,203,0,5,104,46,132,51,195,0,25,104,54,132,35,198,16,196,97,14,35,21,20,66,4,133,138,64,240,152,128,193,72,30,130,99,0,5,104,62,132,51,203]),codedWidth:1280,codedHeight:720,optimizeForLatency:!0,hardwareAcceleration:e?"no-preference":"prefer-hardware"};try{return!!(await VideoDecoder.isConfigSupported(t)).supported}catch(e){return!1}},async IsSupportVideoEncodeHardwareAcceleration(){if("function"!=typeof VideoEncoder||this.browser.isSafari&&!I("17.5"))return!1;var e={codec:"avc1.640028",bitrate:15e5,width:1280,height:720,avc:{format:"annexb"},framerate:25,hardwareAcceleration:"no-preference",latencyMode:"realtime",bitrateMode:"constant",scalabilityMode:"L1T2"};return!!(await VideoEncoder.isConfigSupported(e)).supported},AdapterWhiteListCheckForEncoder(){if(!U())return-1;try{var e=N.renderInfo,t=N.vendor,i=e.toLowerCase(),r=t.includes("ARM"),a=(i.includes("amd"),i.includes("intel"));i.includes("hd graphics"),i.includes("nvidia"),i.includes("geforce");return a?0:r?-1:0}catch(e){return 0}},isChromeVersionHigherThan:R,isFirefoxVersionHigherThan:T,isSafariVersionHigherThan:I,async isSDKSupportSIMD(){if("object"!=typeof WebAssembly)return!1;if("chrome"==M.browser){if(!(M.version>=84))return!1;await b.checkIsSupportSIMD()}else await b.checkIsSupportSIMD();return b.getIsSupportSIMD()},buffer2stringSplitByComma:e=>new Uint8Array(e).join(","),stringSplitByComma2Buffer(e){try{let t=e.split(",").map(e=>parseInt(e)),i=new ArrayBuffer(t.length),r=new Uint8Array(i);for(let e=0;e<t.length;e++)r[e]=t[e];return i}catch(e){return null}},removeDuplicates(e,t){let i=[];return e.forEach(e=>{let r=!1;for(let a=0;a<i.length;a++)if(!t.call(null,i[a],e)){r=!0;break}r||i.push(e)}),i},getBrowserVersion(){let e=function(){var e=navigator.userAgent.toLowerCase();if(e.indexOf("firefox")>0)return e.match(/firefox\/[\d.]+/gi);if(e.indexOf("safari")>0&&e.indexOf("chrome")<0){var t,i="safari/unknow";return i=e.match(/safari\/[\d.]+/gi),t=e.match(/safari\/[\d.]+/gi),i&&(i=[i.toString().replace("version","safari")]),t&&(i=[t.toString().replace("version","safari")]),i}return e