trtc-cloud-js-sdk
Version:
Tencent Cloud RTC SDK for Web And Electron
1 lines • 168 kB
JavaScript
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("trtc-sdk-v5"),require("trtc-sdk-v5/plugins/lebplayer"),require("trtc-sdk-v5/plugins/video-effect/virtual-background"),require("trtc-sdk-v5/plugins/video-effect/basic-beauty"),require("trtc-sdk-v5/plugins/realtime-transcriber"),require("trtc-sdk-v5/plugins/video-effect/video-mixer")):"function"==typeof define&&define.amd?define(["exports","trtc-sdk-v5","trtc-sdk-v5/plugins/lebplayer","trtc-sdk-v5/plugins/video-effect/virtual-background","trtc-sdk-v5/plugins/video-effect/basic-beauty","trtc-sdk-v5/plugins/realtime-transcriber","trtc-sdk-v5/plugins/video-effect/video-mixer"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).TRTCCloud={},e.TRTC,e.LEBPlayer,e.VirtualBackground,e.BasicBeauty,e.realtimeTranscriber,e.VideoMixer)}(this,(function(e,t,i,o,r,n,s){function a(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=a(t),u=a(s),l=function(e,t){return l=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},l(e,t)};var d=function(){return d=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},d.apply(this,arguments)};function h(e,t,i,o){var r,n=arguments.length,s=n<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,i):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,i,o);else for(var a=e.length-1;a>=0;a--)(r=e[a])&&(s=(n<3?r(s):n>3?r(t,i,s):r(t,i))||s);return n>3&&s&&Object.defineProperty(t,i,s),s}function p(e,t,i,o){return new(i||(i=Promise))((function(r,n){function s(e){try{c(o.next(e))}catch(t){n(t)}}function a(e){try{c(o.throw(e))}catch(t){n(t)}}function c(e){var t;e.done?r(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}c((o=o.apply(e,t||[])).next())}))}function T(e,t){var i,o,r,n,s={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return n={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(n[Symbol.iterator]=function(){return this}),n;function a(a){return function(c){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;n&&(n=0,a[0]&&(s=0)),s;)try{if(i=1,o&&(r=2&a[0]?o.return:a[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,a[1])).done)return r;switch(o=0,r&&(a=[2&a[0],r.value]),a[0]){case 0:case 1:r=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,o=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(r=s.trys,(r=r.length>0&&r[r.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!r||a[1]>r[0]&&a[1]<r[3])){s.label=a[1];break}if(6===a[0]&&s.label<r[1]){s.label=r[1],r=a;break}if(r&&s.label<r[2]){s.label=r[2],s.ops.push(a);break}r[2]&&s.ops.pop(),s.trys.pop();continue}a=t.call(e,s)}catch(c){a=[6,c],o=0}finally{i=r=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,c])}}}function f(e){var t="function"==typeof Symbol&&Symbol.iterator,i=t&&e[t],o=0;if(i)return i.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t,i){if(i||2===arguments.length)for(var o,r=0,n=t.length;r<n;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=f(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(i){t[i]=e[i]&&function(t){return new Promise((function(o,r){(function(e,t,i,o){Promise.resolve(o).then((function(t){e({value:t,done:i})}),t)})(o,r,(t=e[i](t)).done,t.value)}))}}}var m="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function R(e,t){return e(t={exports:{}},t.exports),t.exports}var y,C,_,b,S,M,w,E,V=R((function(e){var t=Object.prototype.hasOwnProperty,i="~";function o(){}function r(e,t,i){this.fn=e,this.context=t,this.once=i||!1}function n(e,t,o,n,s){if("function"!=typeof o)throw new TypeError("The listener must be a function");var a=new r(o,n||e,s),c=i?i+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],a]:e._events[c].push(a):(e._events[c]=a,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new o:delete e._events[t]}function a(){this._events=new o,this._eventsCount=0}Object.create&&(o.prototype=Object.create(null),(new o).__proto__||(i=!1)),a.prototype.eventNames=function(){var e,o,r=[];if(0===this._eventsCount)return r;for(o in e=this._events)t.call(e,o)&&r.push(i?o.slice(1):o);return Object.getOwnPropertySymbols?r.concat(Object.getOwnPropertySymbols(e)):r},a.prototype.listeners=function(e){var t=i?i+e:e,o=this._events[t];if(!o)return[];if(o.fn)return[o.fn];for(var r=0,n=o.length,s=new Array(n);r<n;r++)s[r]=o[r].fn;return s},a.prototype.listenerCount=function(e){var t=i?i+e:e,o=this._events[t];return o?o.fn?1:o.length:0},a.prototype.emit=function(e,t,o,r,n,s){var a=i?i+e:e;if(!this._events[a])return!1;var c,u,l=this._events[a],d=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),d){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,o),!0;case 4:return l.fn.call(l.context,t,o,r),!0;case 5:return l.fn.call(l.context,t,o,r,n),!0;case 6:return l.fn.call(l.context,t,o,r,n,s),!0}for(u=1,c=new Array(d-1);u<d;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var h,p=l.length;for(u=0;u<p;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),d){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,o);break;case 4:l[u].fn.call(l[u].context,t,o,r);break;default:if(!c)for(h=1,c=new Array(d-1);h<d;h++)c[h-1]=arguments[h];l[u].fn.apply(l[u].context,c)}}return!0},a.prototype.on=function(e,t,i){return n(this,e,t,i,!1)},a.prototype.once=function(e,t,i){return n(this,e,t,i,!0)},a.prototype.removeListener=function(e,t,o,r){var n=i?i+e:e;if(!this._events[n])return this;if(!t)return s(this,n),this;var a=this._events[n];if(a.fn)a.fn!==t||r&&!a.once||o&&a.context!==o||s(this,n);else{for(var c=0,u=[],l=a.length;c<l;c++)(a[c].fn!==t||r&&!a[c].once||o&&a[c].context!==o)&&u.push(a[c]);u.length?this._events[n]=1===u.length?u[0]:u:s(this,n)}return this},a.prototype.removeAllListeners=function(e){var t;return e?(t=i?i+e:e,this._events[t]&&s(this,t)):(this._events=new o,this._eventsCount=0),this},a.prototype.off=a.prototype.removeListener,a.prototype.addListener=a.prototype.on,a.prefixed=i,a.EventEmitter=a,e.exports=a}));e.TRTCVideoResolution=void 0,(y=e.TRTCVideoResolution||(e.TRTCVideoResolution={}))[y.TRTCVideoResolution_120_120=1]="TRTCVideoResolution_120_120",y[y.TRTCVideoResolution_160_160=3]="TRTCVideoResolution_160_160",y[y.TRTCVideoResolution_270_270=5]="TRTCVideoResolution_270_270",y[y.TRTCVideoResolution_480_480=7]="TRTCVideoResolution_480_480",y[y.TRTCVideoResolution_160_120=50]="TRTCVideoResolution_160_120",y[y.TRTCVideoResolution_240_180=52]="TRTCVideoResolution_240_180",y[y.TRTCVideoResolution_280_210=54]="TRTCVideoResolution_280_210",y[y.TRTCVideoResolution_320_240=56]="TRTCVideoResolution_320_240",y[y.TRTCVideoResolution_400_300=58]="TRTCVideoResolution_400_300",y[y.TRTCVideoResolution_480_360=60]="TRTCVideoResolution_480_360",y[y.TRTCVideoResolution_640_480=62]="TRTCVideoResolution_640_480",y[y.TRTCVideoResolution_960_720=64]="TRTCVideoResolution_960_720",y[y.TRTCVideoResolution_160_90=100]="TRTCVideoResolution_160_90",y[y.TRTCVideoResolution_256_144=102]="TRTCVideoResolution_256_144",y[y.TRTCVideoResolution_320_180=104]="TRTCVideoResolution_320_180",y[y.TRTCVideoResolution_480_270=106]="TRTCVideoResolution_480_270",y[y.TRTCVideoResolution_640_360=108]="TRTCVideoResolution_640_360",y[y.TRTCVideoResolution_960_540=110]="TRTCVideoResolution_960_540",y[y.TRTCVideoResolution_1280_720=112]="TRTCVideoResolution_1280_720",y[y.TRTCVideoResolution_1920_1080=114]="TRTCVideoResolution_1920_1080",e.TRTCVideoStreamType=void 0,(C=e.TRTCVideoStreamType||(e.TRTCVideoStreamType={}))[C.TRTCVideoStreamTypeBig=0]="TRTCVideoStreamTypeBig",C[C.TRTCVideoStreamTypeSmall=1]="TRTCVideoStreamTypeSmall",C[C.TRTCVideoStreamTypeSub=2]="TRTCVideoStreamTypeSub",e.TRTCVideoFillMode=void 0,(_=e.TRTCVideoFillMode||(e.TRTCVideoFillMode={}))[_.TRTCVideoFillMode_Fill=0]="TRTCVideoFillMode_Fill",_[_.TRTCVideoFillMode_Fit=1]="TRTCVideoFillMode_Fit",e.TRTCVideoMirrorType=void 0,(b=e.TRTCVideoMirrorType||(e.TRTCVideoMirrorType={}))[b.TRTCVideoMirrorType_Auto=0]="TRTCVideoMirrorType_Auto",b[b.TRTCVideoMirrorType_Enable=1]="TRTCVideoMirrorType_Enable",b[b.TRTCVideoMirrorType_Disable=2]="TRTCVideoMirrorType_Disable",e.TRTCBeautyStyle=void 0,(S=e.TRTCBeautyStyle||(e.TRTCBeautyStyle={}))[S.TRTCBeautyStyleSmooth=0]="TRTCBeautyStyleSmooth",S[S.TRTCBeautyStyleNature=1]="TRTCBeautyStyleNature",e.TRTCAppScene=void 0,(M=e.TRTCAppScene||(e.TRTCAppScene={}))[M.TRTCAppSceneVideoCall=0]="TRTCAppSceneVideoCall",M[M.TRTCAppSceneLIVE=1]="TRTCAppSceneLIVE",M[M.TRTCAppSceneAudioCall=2]="TRTCAppSceneAudioCall",M[M.TRTCAppSceneVoiceChatRoom=3]="TRTCAppSceneVoiceChatRoom",e.TRTCRoleType=void 0,(w=e.TRTCRoleType||(e.TRTCRoleType={}))[w.TRTCRoleAnchor=20]="TRTCRoleAnchor",w[w.TRTCRoleAudience=21]="TRTCRoleAudience",e.TRTCAudioQuality=void 0,(E=e.TRTCAudioQuality||(e.TRTCAudioQuality={}))[E.TRTCAudioQualitySpeech=1]="TRTCAudioQualitySpeech",E[E.TRTCAudioQualityDefault=2]="TRTCAudioQualityDefault",E[E.TRTCAudioQualityMusic=3]="TRTCAudioQualityMusic";var A,P,L=function(e,t,i,o,r){void 0===e&&(e=""),void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=""),this.deviceId=e,this.deviceName=t,this.kind=i,this.label=o,this.groupId=r};e.TRTCDeviceState=void 0,(A=e.TRTCDeviceState||(e.TRTCDeviceState={}))[A.TRTCDeviceStateAdd=0]="TRTCDeviceStateAdd",A[A.TRTCDeviceStateRemove=1]="TRTCDeviceStateRemove",A[A.TRTCDeviceStateActive=2]="TRTCDeviceStateActive",e.TRTCDeviceType=void 0,(P=e.TRTCDeviceType||(e.TRTCDeviceType={}))[P.TRTCDeviceTypeUnknow=-1]="TRTCDeviceTypeUnknow",P[P.TRTCDeviceTypeMic=0]="TRTCDeviceTypeMic",P[P.TRTCDeviceTypeSpeaker=1]="TRTCDeviceTypeSpeaker",P[P.TRTCDeviceTypeCamera=2]="TRTCDeviceTypeCamera";var I,x=function(t,i,o,r,n,s,a,c,u,l,d){void 0===t&&(t=0),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=0),void 0===n&&(n=""),void 0===s&&(s=e.TRTCRoleType.TRTCRoleAnchor),void 0===a&&(a=null),void 0===u&&(u=null),void 0===l&&(l=null),void 0===d&&(d=30),this.sdkAppId=t,this.userId=i,this.userSig=o,this.roomId=r,this.strRoomId=n,this.role=s,this.privateMapKey=a,this.streamId=u,this.userDefineRecordId=l,this.frameWorkType=d},O=function(t,i,o,r){void 0===t&&(t=e.TRTCVideoResolution.TRTCVideoResolution_640_360),void 0===i&&(i=e.TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape),void 0===o&&(o=15),void 0===r&&(r=550),this.videoResolution=t,this.resMode=i,this.videoFps=o,this.videoBitrate=r};e.TRTCVideoRotation=void 0,(I=e.TRTCVideoRotation||(e.TRTCVideoRotation={}))[I.TRTCVideoRotation0=0]="TRTCVideoRotation0",I[I.TRTCVideoRotation90=1]="TRTCVideoRotation90",I[I.TRTCVideoRotation180=2]="TRTCVideoRotation180",I[I.TRTCVideoRotation270=3]="TRTCVideoRotation270";var k,D=function(t,i,o){void 0===t&&(t=e.TRTCVideoRotation.TRTCVideoRotation0),void 0===i&&(i=e.TRTCVideoFillMode.TRTCVideoFillMode_Fit),void 0===o&&(o=e.TRTCVideoMirrorType.TRTCVideoMirrorType_Disable),this.rotation=t,this.fillMode=i,this.mirrorType=o};e.TRTCQuality=void 0,(k=e.TRTCQuality||(e.TRTCQuality={}))[k.TRTCQuality_Unknown=0]="TRTCQuality_Unknown",k[k.TRTCQuality_Excellent=1]="TRTCQuality_Excellent",k[k.TRTCQuality_Good=2]="TRTCQuality_Good",k[k.TRTCQuality_Poor=3]="TRTCQuality_Poor",k[k.TRTCQuality_Bad=4]="TRTCQuality_Bad",k[k.TRTCQuality_Vbad=5]="TRTCQuality_Vbad",k[k.TRTCQuality_Down=6]="TRTCQuality_Down";var B,z,F,N=function(t,i){void 0===t&&(t=""),void 0===i&&(i=e.TRTCQuality.TRTCQuality_Unknown),this.userId=t,this.quality=i},Q=function(e,t){void 0===e&&(e=""),void 0===t&&(t=0),this.userId=e,this.volume=t},H=function(e,t,i){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=null),this.appId=e,this.bizId=t,this.url=i},W=function(t,i,o,r,n,s,a){void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===s&&(s=0),void 0===a&&(a=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.width=t,this.height=i,this.frameRate=o,this.videoBitrate=r,this.audioBitrate=s,this.streamType=a},j=function(t,i,o,r,n,s,a,c,u,l,d,h,p,T){void 0===t&&(t=""),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===c&&(c=0),void 0===T&&(T=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),this.userId=t,this.width=o,this.height=r,this.frameRate=n,this.videoBitrate=s,this.audioBitrate=c,this.streamType=T},U=function(e,t,i,o,r,n,s,a,c,u,l){void 0===e&&(e=0),void 0===t&&(t=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=[]),void 0===c&&(c=0),void 0===u&&(u=[]),void 0===l&&(l=0),this.upLoss=e,this.downLoss=t,this.rtt=r,this.receivedBytes=n,this.sentBytes=s,this.localStatisticsArray=a,this.localStatisticsArraySize=c,this.remoteStatisticsArray=u,this.remoteStatisticsArraySize=l};e.TRTCVideoResolutionMode=void 0,(B=e.TRTCVideoResolutionMode||(e.TRTCVideoResolutionMode={}))[B.TRTCVideoResolutionModeLandscape=0]="TRTCVideoResolutionModeLandscape",B[B.TRTCVideoResolutionModePortrait=1]="TRTCVideoResolutionModePortrait",e.TRTCVideoQosPreference=void 0,(z=e.TRTCVideoQosPreference||(e.TRTCVideoQosPreference={}))[z.TRTCVideoQosPreferenceSmooth=1]="TRTCVideoQosPreferenceSmooth",z[z.TRTCVideoQosPreferenceClear=2]="TRTCVideoQosPreferenceClear",e.TRTCQosControlMode=void 0,(F=e.TRTCQosControlMode||(e.TRTCQosControlMode={}))[F.TRTCQosControlModeClient=0]="TRTCQosControlModeClient",F[F.TRTCQosControlModeServer=1]="TRTCQosControlModeServer";var q,G,Y=function(t,i){void 0===t&&(t=e.TRTCVideoQosPreference.TRTCVideoQosPreferenceClear),void 0===i&&(i=e.TRTCQosControlMode.TRTCQosControlModeServer),this.preference=t,this.controlMode=i},K=function(e,t,i,o){void 0===e&&(e=new ArrayBuffer(0)),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),this.buffer=e,this.length=t,this.width=i,this.height=o};e.TRTCLogLevel=void 0,(q=e.TRTCLogLevel||(e.TRTCLogLevel={}))[q.TRTCLogLevelVerbose=0]="TRTCLogLevelVerbose",q[q.TRTCLogLevelDebug=1]="TRTCLogLevelDebug",q[q.TRTCLogLevelInfo=2]="TRTCLogLevelInfo",q[q.TRTCLogLevelWarn=3]="TRTCLogLevelWarn",q[q.TRTCLogLevelError=4]="TRTCLogLevelError",q[q.TRTCLogLevelFatal=5]="TRTCLogLevelFatal",q[q.TRTCLogLevelNone=6]="TRTCLogLevelNone",e.TRTCScreenCaptureSourceType=void 0,(G=e.TRTCScreenCaptureSourceType||(e.TRTCScreenCaptureSourceType={}))[G.TRTCScreenCaptureSourceTypeUnknown=-1]="TRTCScreenCaptureSourceTypeUnknown",G[G.TRTCScreenCaptureSourceTypeWindow=0]="TRTCScreenCaptureSourceTypeWindow",G[G.TRTCScreenCaptureSourceTypeScreen=1]="TRTCScreenCaptureSourceTypeScreen",G[G.TRTCScreenCaptureSourceTypeCustom=2]="TRTCScreenCaptureSourceTypeCustom";var J,X=function(t,i,o,r,n,s){void 0===t&&(t=e.TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown),void 0===i&&(i=""),void 0===o&&(o=""),void 0===r&&(r=new K),void 0===n&&(n=new K),void 0===s&&(s=!1),this.type=t,this.sourceId=i,this.sourceName=o,this.thumbBGRA=r,this.iconBGRA=n,this.isMinimizeWindow=s},$=function(e,t,i,o){void 0===e&&(e=0),void 0===t&&(t=0),void 0===i&&(i=0),void 0===o&&(o=0),this.left=e,this.top=t,this.right=i,this.bottom=o},Z=function(t,i,o,r,n,s,a,c,u,l,d,h,p,T,f){void 0===t&&(t=e.TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown),void 0===i&&(i=0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=0),void 0===s&&(s=0),void 0===a&&(a=15),void 0===c&&(c=2),void 0===u&&(u=0),void 0===l&&(l=""),void 0===d&&(d=64),void 0===h&&(h=48e3),void 0===p&&(p=1),void 0===T&&(T=[]),void 0===f&&(f=""),this.mode=t,this.appId=i,this.bizId=o,this.videoWidth=r,this.videoHeight=n,this.videoBitrate=s,this.videoFramerate=a,this.videoGOP=c,this.backgroundColor=u,this.backgroundImage=l,this.audioSampleRate=d,this.audioBitrate=h,this.audioChannels=p,this.mixUsersArray=T,this.mixUsersArraySize=T.length,this.streamId=f};e.TRTCTranscodingConfigMode=void 0,(J=e.TRTCTranscodingConfigMode||(e.TRTCTranscodingConfigMode={}))[J.TRTCTranscodingConfigMode_Unknown=0]="TRTCTranscodingConfigMode_Unknown",J[J.TRTCTranscodingConfigMode_Manual=1]="TRTCTranscodingConfigMode_Manual",J[J.TRTCTranscodingConfigMode_Template_PureAudio=2]="TRTCTranscodingConfigMode_Template_PureAudio",J[J.TRTCTranscodingConfigMode_Template_PresetLayout=3]="TRTCTranscodingConfigMode_Template_PresetLayout",J[J.TRTCTranscodingConfigMode_Template_ScreenSharing=4]="TRTCTranscodingConfigMode_Template_ScreenSharing",J[J.TRTC_TranscodingConfigMode_Unknown=5]="TRTC_TranscodingConfigMode_Unknown",J[J.TRTC_TranscodingConfigMode_Manual=6]="TRTC_TranscodingConfigMode_Manual",J[J.TRTC_TranscodingConfigMode_Template_PureAudio=7]="TRTC_TranscodingConfigMode_Template_PureAudio",J[J.TRTC_TranscodingConfigMode_Template_PresetLayout=8]="TRTC_TranscodingConfigMode_Template_PresetLayout",J[J.TRTC_TranscodingConfigMode_Template_ScreenSharing=9]="TRTC_TranscodingConfigMode_Template_ScreenSharing";var ee,te,ie=function(t,i,o,r,n,s,a,c){void 0===t&&(t=""),void 0===i&&(i=""),void 0===o&&(o=null),void 0===r&&(r=0),void 0===n&&(n=!1),void 0===s&&(s=e.TRTCVideoStreamType.TRTCVideoStreamTypeBig),void 0===a&&(a=e.TRTCMixInputType.TRTCMixInputTypeUndefined),void 0===c&&(c=0),this.userId=t,this.roomId=i,this.rect=o,this.zOrder=r,this.pureAudio=n,this.streamType=s,this.inputType=a,this.renderMode=c};e.TRTCMixInputType=void 0,(ee=e.TRTCMixInputType||(e.TRTCMixInputType={}))[ee.TRTCMixInputTypeUndefined=0]="TRTCMixInputTypeUndefined",ee[ee.TRTCMixInputTypeAudioVideo=1]="TRTCMixInputTypeAudioVideo",ee[ee.TRTCMixInputTypePureVideo=2]="TRTCMixInputTypePureVideo",ee[ee.TRTCMixInputTypePureAudio=3]="TRTCMixInputTypePureAudio",e.TRTCCameraCaptureMode=void 0,(te=e.TRTCCameraCaptureMode||(e.TRTCCameraCaptureMode={}))[te.TRTCCameraResolutionStrategyAuto=0]="TRTCCameraResolutionStrategyAuto",te[te.TRTCCameraResolutionStrategyPerformance=1]="TRTCCameraResolutionStrategyPerformance",te[te.TRTCCameraResolutionStrategyHighQuality=2]="TRTCCameraResolutionStrategyHighQuality",te[te.TRTCCameraCaptureManual=3]="TRTCCameraCaptureManual";var oe,re=function(e,t,i,o,r,n){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===i&&(i=!0),void 0===o&&(o=0),void 0===r&&(r=0),void 0===n&&(n=!1),this.enableCaptureMouse=e,this.enableHighLight=t,this.enableHighPerformance=i,this.highLightColor=o,this.highLightWidth=r,this.enableCaptureChildWindow=n},ne="onError",se="onWarning",ae="rtc",ce="live",ue="VirtualBackground",le="BasicBeauty",de="blur",he="image",pe={20:"anchor",21:"audience"},Te={0:ae,1:ce,2:ae,3:ce};!function(e){e[e.ActiveExitRoom=0]="ActiveExitRoom",e[e.KickedExitRoom=1]="KickedExitRoom"}(oe||(oe={}));var fe="enum";function ve(){return Math.floor(performance.now())}var ge=function(e){return void 0===e},me=function(e){return"number"==typeof e},Re=function(e){return"boolean"==typeof e};function ye(e){if("string"!=typeof e)return e;var t;try{var i=JSON.parse(e);t="object"==typeof i&&i?i:e}catch(o){t=e}return t}function Ce(e){return null==e}function _e(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.reduce((function(e,t){return Object.keys(t).forEach((function(i){e[i]&&"object"==typeof e[i]?e[i]=_e(e[i],t[i]):e[i]=t[i]})),e}),{})}function be(e){var t=null;return e instanceof MediaStream||e instanceof MediaStreamTrack||e instanceof HTMLElement?e:([Date,RegExp,Set,WeakSet,Map,WeakMap,Error].includes(null==e?void 0:e.constructor)?t=new e.constructor(e):Array.isArray(e)?(t=[],e.forEach((function(e,i){t[i]=be(e)}))):"object"==typeof e&&null!==e?(t={},Object.keys(e).forEach((function(i){Object.hasOwnProperty.call(e,i)&&(t[i]=be(e[i]))}))):t=e,t)}var Se,Me,we=function(e){return e&&e.Math===Math&&e},Ee=we("object"==typeof globalThis&&globalThis)||we("object"==typeof window&&window)||we("object"==typeof self&&self)||we("object"==typeof m&&m)||function(){return this}()||m||Function("return this")(),Ve=function(e){try{return!!e()}catch(t){return!0}},Ae=!Ve((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]})),Pe=!Ve((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Le=Function.prototype.call,Ie=Pe?Le.bind(Le):function(){return Le.apply(Le,arguments)},xe={}.propertyIsEnumerable,Oe=Object.getOwnPropertyDescriptor,ke={f:Oe&&!xe.call({1:2},1)?function(e){var t=Oe(this,e);return!!t&&t.enumerable}:xe},De=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Be=Function.prototype,ze=Be.call,Fe=Pe&&Be.bind.bind(ze,ze),Ne=Pe?Fe:function(e){return function(){return ze.apply(e,arguments)}},Qe=Ne({}.toString),He=Ne("".slice),We=function(e){return He(Qe(e),8,-1)},je=Object,Ue=Ne("".split),qe=Ve((function(){return!je("z").propertyIsEnumerable(0)}))?function(e){return"String"===We(e)?Ue(e,""):je(e)}:je,Ge=function(e){return null==e},Ye=TypeError,Ke=function(e){if(Ge(e))throw Ye("Can't call method on "+e);return e},Je=function(e){return qe(Ke(e))},Xe="object"==typeof document&&document.all,$e={all:Xe,IS_HTMLDDA:void 0===Xe&&void 0!==Xe},Ze=$e.all,et=$e.IS_HTMLDDA?function(e){return"function"==typeof e||e===Ze}:function(e){return"function"==typeof e},tt=$e.all,it=$e.IS_HTMLDDA?function(e){return"object"==typeof e?null!==e:et(e)||e===tt}:function(e){return"object"==typeof e?null!==e:et(e)},ot=function(e,t){return arguments.length<2?(i=Ee[e],et(i)?i:void 0):Ee[e]&&Ee[e][t];var i},rt=Ne({}.isPrototypeOf),nt="undefined"!=typeof navigator&&String(navigator.userAgent)||"",st=Ee.process,at=Ee.Deno,ct=st&&st.versions||at&&at.version,ut=ct&&ct.v8;ut&&(Me=(Se=ut.split("."))[0]>0&&Se[0]<4?1:+(Se[0]+Se[1])),!Me&&nt&&(!(Se=nt.match(/Edge\/(\d+)/))||Se[1]>=74)&&(Se=nt.match(/Chrome\/(\d+)/))&&(Me=+Se[1]);var lt=Me,dt=Ee.String,ht=!!Object.getOwnPropertySymbols&&!Ve((function(){var e=Symbol("symbol detection");return!dt(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&<&<<41})),pt=ht&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Tt=Object,ft=pt?function(e){return"symbol"==typeof e}:function(e){var t=ot("Symbol");return et(t)&&rt(t.prototype,Tt(e))},vt=String,gt=TypeError,mt=function(e){if(et(e))return e;throw gt(function(e){try{return vt(e)}catch(t){return"Object"}}(e)+" is not a function")},Rt=function(e,t){var i=e[t];return Ge(i)?void 0:mt(i)},yt=TypeError,Ct=Object.defineProperty,_t=function(e,t){try{Ct(Ee,e,{value:t,configurable:!0,writable:!0})}catch(i){Ee[e]=t}return t},bt="__core-js_shared__",St=Ee[bt]||_t(bt,{}),Mt=R((function(e){(e.exports=function(e,t){return St[e]||(St[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.32.1",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.32.1/LICENSE",source:"https://github.com/zloirock/core-js"})})),wt=Object,Et=function(e){return wt(Ke(e))},Vt=Ne({}.hasOwnProperty),At=Object.hasOwn||function(e,t){return Vt(Et(e),t)},Pt=0,Lt=Math.random(),It=Ne(1..toString),xt=function(e){return"Symbol("+(void 0===e?"":e)+")_"+It(++Pt+Lt,36)},Ot=Ee.Symbol,kt=Mt("wks"),Dt=pt?Ot.for||Ot:Ot&&Ot.withoutSetter||xt,Bt=function(e){return At(kt,e)||(kt[e]=ht&&At(Ot,e)?Ot[e]:Dt("Symbol."+e)),kt[e]},zt=TypeError,Ft=Bt("toPrimitive"),Nt=function(e,t){if(!it(e)||ft(e))return e;var i,o=Rt(e,Ft);if(o){if(void 0===t&&(t="default"),i=Ie(o,e,t),!it(i)||ft(i))return i;throw zt("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var i,o;if("string"===t&&et(i=e.toString)&&!it(o=Ie(i,e)))return o;if(et(i=e.valueOf)&&!it(o=Ie(i,e)))return o;if("string"!==t&&et(i=e.toString)&&!it(o=Ie(i,e)))return o;throw yt("Can't convert object to primitive value")}(e,t)},Qt=function(e){var t=Nt(e,"string");return ft(t)?t:t+""},Ht=Ee.document,Wt=it(Ht)&&it(Ht.createElement),jt=function(e){return Wt?Ht.createElement(e):{}},Ut=!Ae&&!Ve((function(){return 7!==Object.defineProperty(jt("div"),"a",{get:function(){return 7}}).a})),qt=Object.getOwnPropertyDescriptor,Gt={f:Ae?qt:function(e,t){if(e=Je(e),t=Qt(t),Ut)try{return qt(e,t)}catch(i){}if(At(e,t))return De(!Ie(ke.f,e,t),e[t])}},Yt=Ae&&Ve((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Kt=String,Jt=TypeError,Xt=function(e){if(it(e))return e;throw Jt(Kt(e)+" is not an object")},$t=TypeError,Zt=Object.defineProperty,ei=Object.getOwnPropertyDescriptor,ti="enumerable",ii="configurable",oi="writable",ri={f:Ae?Yt?function(e,t,i){if(Xt(e),t=Qt(t),Xt(i),"function"==typeof e&&"prototype"===t&&"value"in i&&oi in i&&!i[oi]){var o=ei(e,t);o&&o[oi]&&(e[t]=i.value,i={configurable:ii in i?i[ii]:o[ii],enumerable:ti in i?i[ti]:o[ti],writable:!1})}return Zt(e,t,i)}:Zt:function(e,t,i){if(Xt(e),t=Qt(t),Xt(i),Ut)try{return Zt(e,t,i)}catch(o){}if("get"in i||"set"in i)throw $t("Accessors not supported");return"value"in i&&(e[t]=i.value),e}},ni=Ae?function(e,t,i){return ri.f(e,t,De(1,i))}:function(e,t,i){return e[t]=i,e},si=Function.prototype,ai=Ae&&Object.getOwnPropertyDescriptor,ci=At(si,"name"),ui={EXISTS:ci,PROPER:ci&&"something"===function(){}.name,CONFIGURABLE:ci&&(!Ae||Ae&&ai(si,"name").configurable)},li=Ne(Function.toString);et(St.inspectSource)||(St.inspectSource=function(e){return li(e)});var di,hi,pi,Ti=St.inspectSource,fi=Ee.WeakMap,vi=et(fi)&&/native code/.test(String(fi)),gi=Mt("keys"),mi=function(e){return gi[e]||(gi[e]=xt(e))},Ri={},yi="Object already initialized",Ci=Ee.TypeError,_i=Ee.WeakMap;if(vi||St.state){var bi=St.state||(St.state=new _i);bi.get=bi.get,bi.has=bi.has,bi.set=bi.set,di=function(e,t){if(bi.has(e))throw Ci(yi);return t.facade=e,bi.set(e,t),t},hi=function(e){return bi.get(e)||{}},pi=function(e){return bi.has(e)}}else{var Si=mi("state");Ri[Si]=!0,di=function(e,t){if(At(e,Si))throw Ci(yi);return t.facade=e,ni(e,Si,t),t},hi=function(e){return At(e,Si)?e[Si]:{}},pi=function(e){return At(e,Si)}}var Mi={set:di,get:hi,has:pi,enforce:function(e){return pi(e)?hi(e):di(e,{})},getterFor:function(e){return function(t){var i;if(!it(t)||(i=hi(t)).type!==e)throw Ci("Incompatible receiver, "+e+" required");return i}}},wi=R((function(e){var t=ui.CONFIGURABLE,i=Mi.enforce,o=Mi.get,r=String,n=Object.defineProperty,s=Ne("".slice),a=Ne("".replace),c=Ne([].join),u=Ae&&!Ve((function(){return 8!==n((function(){}),"length",{value:8}).length})),l=String(String).split("String"),d=e.exports=function(e,o,d){"Symbol("===s(r(o),0,7)&&(o="["+a(r(o),/^Symbol\(([^)]*)\)/,"$1")+"]"),d&&d.getter&&(o="get "+o),d&&d.setter&&(o="set "+o),(!At(e,"name")||t&&e.name!==o)&&(Ae?n(e,"name",{value:o,configurable:!0}):e.name=o),u&&d&&At(d,"arity")&&e.length!==d.arity&&n(e,"length",{value:d.arity});try{d&&At(d,"constructor")&&d.constructor?Ae&&n(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(p){}var h=i(e);return At(h,"source")||(h.source=c(l,"string"==typeof o?o:"")),e};Function.prototype.toString=d((function(){return et(this)&&o(this).source||Ti(this)}),"toString")})),Ei=function(e,t,i,o){o||(o={});var r=o.enumerable,n=void 0!==o.name?o.name:t;if(et(i)&&wi(i,n,o),o.global)r?e[t]=i:_t(t,i);else{try{o.unsafe?e[t]&&(r=!0):delete e[t]}catch(s){}r?e[t]=i:ri.f(e,t,{value:i,enumerable:!1,configurable:!o.nonConfigurable,writable:!o.nonWritable})}return e},Vi=Math.ceil,Ai=Math.floor,Pi=Math.trunc||function(e){var t=+e;return(t>0?Ai:Vi)(t)},Li=function(e){var t=+e;return t!=t||0===t?0:Pi(t)},Ii=Math.max,xi=Math.min,Oi=Math.min,ki=function(e){return e>0?Oi(Li(e),9007199254740991):0},Di=function(e){return ki(e.length)},Bi=function(e){return function(t,i,o){var r,n=Je(t),s=Di(n),a=function(e,t){var i=Li(e);return i<0?Ii(i+t,0):xi(i,t)}(o,s);if(e&&i!=i){for(;s>a;)if((r=n[a++])!=r)return!0}else for(;s>a;a++)if((e||a in n)&&n[a]===i)return e||a||0;return!e&&-1}},zi={includes:Bi(!0),indexOf:Bi(!1)}.indexOf,Fi=Ne([].push),Ni=function(e,t){var i,o=Je(e),r=0,n=[];for(i in o)!At(Ri,i)&&At(o,i)&&Fi(n,i);for(;t.length>r;)At(o,i=t[r++])&&(~zi(n,i)||Fi(n,i));return n},Qi=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Hi=Qi.concat("length","prototype"),Wi={f:Object.getOwnPropertyNames||function(e){return Ni(e,Hi)}},ji={f:Object.getOwnPropertySymbols},Ui=Ne([].concat),qi=ot("Reflect","ownKeys")||function(e){var t=Wi.f(Xt(e)),i=ji.f;return i?Ui(t,i(e)):t},Gi=function(e,t,i){for(var o=qi(t),r=ri.f,n=Gt.f,s=0;s<o.length;s++){var a=o[s];At(e,a)||i&&At(i,a)||r(e,a,n(t,a))}},Yi=/#|\.prototype\./,Ki=function(e,t){var i=Xi[Ji(e)];return i===Zi||i!==$i&&(et(t)?Ve(t):!!t)},Ji=Ki.normalize=function(e){return String(e).replace(Yi,".").toLowerCase()},Xi=Ki.data={},$i=Ki.NATIVE="N",Zi=Ki.POLYFILL="P",eo=Ki,to=Gt.f,io=function(e,t){var i,o,r,n,s,a=e.target,c=e.global,u=e.stat;if(i=c?Ee:u?Ee[a]||_t(a,{}):(Ee[a]||{}).prototype)for(o in t){if(n=t[o],r=e.dontCallGetSet?(s=to(i,o))&&s.value:i[o],!eo(c?o:a+(u?".":"#")+o,e.forced)&&void 0!==r){if(typeof n==typeof r)continue;Gi(n,r)}(e.sham||r&&r.sham)&&ni(n,"sham",!0),Ei(i,o,n,e)}},oo={};oo[Bt("toStringTag")]="z";var ro,no="[object z]"===String(oo),so=Bt("toStringTag"),ao=Object,co="Arguments"===We(function(){return arguments}()),uo=no?We:function(e){var t,i,o;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(i=function(e,t){try{return e[t]}catch(i){}}(t=ao(e),so))?i:co?We(t):"Object"===(o=We(t))&&et(t.callee)?"Arguments":o},lo=String,ho=function(e){if("Symbol"===uo(e))throw TypeError("Cannot convert a Symbol value to a string");return lo(e)},po=function(){var e=Xt(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},To=Ee.RegExp,fo=Ve((function(){var e=To("a","y");return e.lastIndex=2,null!==e.exec("abcd")})),vo=fo||Ve((function(){return!To("a","y").sticky})),go={BROKEN_CARET:fo||Ve((function(){var e=To("^r","gy");return e.lastIndex=2,null!==e.exec("str")})),MISSED_STICKY:vo,UNSUPPORTED_Y:fo},mo=Object.keys||function(e){return Ni(e,Qi)},Ro=Ae&&!Yt?Object.defineProperties:function(e,t){Xt(e);for(var i,o=Je(t),r=mo(t),n=r.length,s=0;n>s;)ri.f(e,i=r[s++],o[i]);return e},yo={f:Ro},Co=ot("document","documentElement"),_o="prototype",bo="script",So=mi("IE_PROTO"),Mo=function(){},wo=function(e){return"<"+bo+">"+e+"</"+bo+">"},Eo=function(e){e.write(wo("")),e.close();var t=e.parentWindow.Object;return e=null,t},Vo=function(){try{ro=new ActiveXObject("htmlfile")}catch(r){}var e,t,i;Vo="undefined"!=typeof document?document.domain&&ro?Eo(ro):(t=jt("iframe"),i="java"+bo+":",t.style.display="none",Co.appendChild(t),t.src=String(i),(e=t.contentWindow.document).open(),e.write(wo("document.F=Object")),e.close(),e.F):Eo(ro);for(var o=Qi.length;o--;)delete Vo[_o][Qi[o]];return Vo()};Ri[So]=!0;var Ao,Po,Lo=Object.create||function(e,t){var i;return null!==e?(Mo[_o]=Xt(e),i=new Mo,Mo[_o]=null,i[So]=e):i=Vo(),void 0===t?i:yo.f(i,t)},Io=Ee.RegExp,xo=Ve((function(){var e=Io(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Oo=Ee.RegExp,ko=Ve((function(){var e=Oo("(?<a>b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$<a>c")})),Do=Mi.get,Bo=Mt("native-string-replace",String.prototype.replace),zo=RegExp.prototype.exec,Fo=zo,No=Ne("".charAt),Qo=Ne("".indexOf),Ho=Ne("".replace),Wo=Ne("".slice),jo=(Po=/b*/g,Ie(zo,Ao=/a/,"a"),Ie(zo,Po,"a"),0!==Ao.lastIndex||0!==Po.lastIndex),Uo=go.BROKEN_CARET,qo=void 0!==/()??/.exec("")[1];(jo||qo||Uo||xo||ko)&&(Fo=function(e){var t,i,o,r,n,s,a,c=this,u=Do(c),l=ho(e),d=u.raw;if(d)return d.lastIndex=c.lastIndex,t=Ie(Fo,d,l),c.lastIndex=d.lastIndex,t;var h=u.groups,p=Uo&&c.sticky,T=Ie(po,c),f=c.source,v=0,g=l;if(p&&(T=Ho(T,"y",""),-1===Qo(T,"g")&&(T+="g"),g=Wo(l,c.lastIndex),c.lastIndex>0&&(!c.multiline||c.multiline&&"\n"!==No(l,c.lastIndex-1))&&(f="(?: "+f+")",g=" "+g,v++),i=new RegExp("^(?:"+f+")",T)),qo&&(i=new RegExp("^"+f+"$(?!\\s)",T)),jo&&(o=c.lastIndex),r=Ie(zo,p?i:c,g),p?r?(r.input=Wo(r.input,v),r[0]=Wo(r[0],v),r.index=c.lastIndex,c.lastIndex+=r[0].length):c.lastIndex=0:jo&&r&&(c.lastIndex=c.global?r.index+r[0].length:o),qo&&r&&r.length>1&&Ie(Bo,r[0],i,(function(){for(n=1;n<arguments.length-2;n++)void 0===arguments[n]&&(r[n]=void 0)})),r&&h)for(r.groups=s=Lo(null),n=0;n<h.length;n++)s[(a=h[n])[0]]=r[a[1]];return r});var Go=Fo;io({target:"RegExp",proto:!0,forced:/./.exec!==Go},{exec:Go});var Yo="\t\n\v\f\r \u2028\u2029\ufeff",Ko=Ne("".replace),Jo=RegExp("^["+Yo+"]+"),Xo=RegExp("(^|[^"+Yo+"])["+Yo+"]+$"),$o=function(e){return function(t){var i=ho(Ke(t));return 1&e&&(i=Ko(i,Jo,"")),2&e&&(i=Ko(i,Xo,"$1")),i}},Zo={start:$o(1),end:$o(2),trim:$o(3)}.trim,er=Ne("".charAt),tr=Ee.parseFloat,ir=Ee.Symbol,or=ir&&ir.iterator,rr=1/tr(Yo+"-0")!=-Infinity||or&&!Ve((function(){tr(Object(or))}))?function(e){var t=Zo(ho(e)),i=tr(t);return 0===i&&"-"===er(t,0)?-0:i}:tr;io({global:!0,forced:parseFloat!==rr},{parseFloat:rr});var nr=function(e){if("Function"===We(e))return Ne(e)},sr=Bt("species"),ar=RegExp.prototype,cr=Ne("".charAt),ur=Ne("".charCodeAt),lr=Ne("".slice),dr=function(e){return function(t,i){var o,r,n=ho(Ke(t)),s=Li(i),a=n.length;return s<0||s>=a?e?"":void 0:(o=ur(n,s))<55296||o>56319||s+1===a||(r=ur(n,s+1))<56320||r>57343?e?cr(n,s):o:e?lr(n,s,s+2):r-56320+(o-55296<<10)+65536}},hr={codeAt:dr(!1),charAt:dr(!0)}.charAt,pr=function(e,t,i){return t+(i?hr(e,t).length:1)},Tr=TypeError,fr=function(e,t){var i=e.exec;if(et(i)){var o=Ie(i,e,t);return null!==o&&Xt(o),o}if("RegExp"===We(e))return Ie(Go,e,t);throw Tr("RegExp#exec called on incompatible receiver")};!function(e,t,i,o){var r=Bt(e),n=!Ve((function(){var t={};return t[r]=function(){return 7},7!==""[e](t)})),s=n&&!Ve((function(){var t=!1,i=/a/;return"split"===e&&((i={}).constructor={},i.constructor[sr]=function(){return i},i.flags="",i[r]=/./[r]),i.exec=function(){return t=!0,null},i[r](""),!t}));if(!n||!s||i){var a=nr(/./[r]),c=t(r,""[e],(function(e,t,i,o,r){var s=nr(e),c=t.exec;return c===Go||c===ar.exec?n&&!r?{done:!0,value:a(t,i,o)}:{done:!0,value:s(i,t,o)}:{done:!1}}));Ei(String.prototype,e,c[0]),Ei(ar,r,c[1])}o&&ni(ar[r],"sham",!0)}("match",(function(e,t,i){return[function(t){var i=Ke(this),o=Ge(t)?void 0:Rt(t,e);return o?Ie(o,t,i):new RegExp(t)[e](ho(i))},function(e){var o=Xt(this),r=ho(e),n=i(t,o,r);if(n.done)return n.value;if(!o.global)return fr(o,r);var s=o.unicode;o.lastIndex=0;for(var a,c=[],u=0;null!==(a=fr(o,r));){var l=ho(a[0]);c[u]=l,""===l&&(o.lastIndex=pr(r,ki(o.lastIndex),s)),u++}return 0===u?null:c}]}));var vr=Array.isArray||function(e){return"Array"===We(e)},gr=TypeError,mr=function(e){if(e>9007199254740991)throw gr("Maximum allowed index exceeded");return e},Rr=function(e,t,i){var o=Qt(t);o in e?ri.f(e,o,De(0,i)):e[o]=i},yr=function(){},Cr=[],_r=ot("Reflect","construct"),br=/^\s*(?:class|function)\b/,Sr=Ne(br.exec),Mr=!br.exec(yr),wr=function(e){if(!et(e))return!1;try{return _r(yr,Cr,e),!0}catch(t){return!1}},Er=function(e){if(!et(e))return!1;switch(uo(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Mr||!!Sr(br,Ti(e))}catch(t){return!0}};Er.sham=!0;var Vr,Ar=!_r||Ve((function(){var e;return wr(wr.call)||!wr(Object)||!wr((function(){e=!0}))||e}))?Er:wr,Pr=Bt("species"),Lr=Array,Ir=function(e,t){return new(function(e){var t;return vr(e)&&(t=e.constructor,(Ar(t)&&(t===Lr||vr(t.prototype))||it(t)&&null===(t=t[Pr]))&&(t=void 0)),void 0===t?Lr:t}(e))(0===t?0:t)},xr=Bt("species"),Or=Bt("isConcatSpreadable"),kr=lt>=51||!Ve((function(){var e=[];return e[Or]=!1,e.concat()[0]!==e})),Dr=function(e){if(!it(e))return!1;var t=e[Or];return void 0!==t?!!t:vr(e)};io({target:"Array",proto:!0,arity:1,forced:!(kr&&(Vr="concat",lt>=51||!Ve((function(){var e=[];return(e.constructor={})[xr]=function(){return{foo:1}},1!==e[Vr](Boolean).foo}))))},{concat:function(e){var t,i,o,r,n,s=Et(this),a=Ir(s,0),c=0;for(t=-1,o=arguments.length;t<o;t++)if(Dr(n=-1===t?s:arguments[t]))for(r=Di(n),mr(c+r),i=0;i<r;i++,c++)i in n&&Rr(a,c,n[i]);else mr(c+1),Rr(a,c++,n);return a.length=c,a}});var Br=window.navigator&&window.navigator.userAgent||"",zr=/AppleWebKit\/([\d.]+)/i.exec(Br);zr&&parseFloat(zr.pop());var Fr=/iPad/i.test(Br),Nr=/iPhone/i.test(Br)&&!Fr,Qr=/iPod/i.test(Br),Hr=Nr||Fr||Qr,Wr=/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i.test(Br);Hr&&function(){var e=Br.match(/OS (\d+)_/i);e&&e[1]&&e[1]}();var jr=/Android/i.test(Br);jr&&function(){var e=Br.match(/Android (\d+)(?:\.(\d+))?(?:\.(\d+))*/i);if(!e)return null;var t=e[1]&&parseFloat(e[1]),i=e[2]&&parseFloat(e[2]);t&&i&&parseFloat("".concat(e[1],".").concat(e[2]))}();jr&&/webkit/i.test(Br),/Firefox/i.test(Br)&&function(){var e=Br.match(/Firefox\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Ur=/Edge\//i.test(Br);Ur&&function(){var e=Br.match(/Edge\/(\d+)/i);if(e&&e[1])e[1]}();var qr=/Edg\//i.test(Br);qr&&function(){var e=Br.match(/Edg\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Gr=/SogouMobileBrowser\//i.test(Br);Gr&&function(){var e=Br.match(/SogouMobileBrowser\/(\d+)/);e&&e[1]&&parseFloat(e[1])}();var Yr=/MetaSr\s/i.test(Br);Yr&&function(){var e=Br.match(/MetaSr(\s\d+(\.\d+)+)/);e&&e[1]&&parseFloat(e[1])}();var Kr=/TBS\/\d+/i.test(Br);Kr&&function(){var e=Br.match(/TBS\/(\d+)/i);if(e&&e[1])e[1]}();var Jr=/XWEB\/\d+/i.test(Br);Jr&&function(){var e=Br.match(/XWEB\/(\d+)/i);if(e&&e[1])e[1]}(),/MSIE\s8\.0/.test(Br),/MSIE\/\d+/i.test(Br)&&function(){var e=/MSIE\s(\d+)\.\d/.exec(Br),t=e&&parseFloat(e[1]);!t&&/Trident\/7.0/i.test(Br)&&/rv:11.0/.test(Br)&&(t=11)}(),/(micromessenger|webbrowser)/i.test(Br)&&function(){var e=Br.match(/MicroMessenger\/(\d+)/i);if(e&&e[1])e[1]}();var Xr=!Kr&&/MQQBrowser\/\d+/i.test(Br)&&/COVC\/\d+/i.test(Br),$r=!Kr&&/MQQBrowser\/\d+/i.test(Br)&&!/COVC\/\d+/i.test(Br);($r||Xr)&&function(){var e=Br.match(/ MQQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var Zr=!Kr&&/ QQBrowser\/\d+/i.test(Br);Zr&&function(){var e=Br.match(/ QQBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var en=!Kr&&/QQBrowserLite\/\d+/i.test(Br);en&&function(){var e=Br.match(/QQBrowserLite\/([\d.]+)/);e&&e[1]&&e[1]}();var tn=!Kr&&/MQBHD\/\d+/i.test(Br);tn&&function(){var e=Br.match(/MQBHD\/([\d.]+)/);e&&e[1]&&e[1]}(),/Windows/i.test(Br),!Hr&&/MAC OS X/i.test(Br),!jr&&/Linux/i.test(Br),/MicroMessenger/i.test(Br),/UCBrowser/i.test(Br),/Electron/i.test(Br);var on=/MiuiBrowser/i.test(Br);on&&function(){var e=Br.match(/MiuiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var rn=/HuaweiBrowser/i.test(Br);/Huawei/i.test(Br),rn&&function(){var e=Br.match(/HuaweiBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var nn=/SamsungBrowser/i.test(Br);nn&&function(){var e=Br.match(/SamsungBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var sn=/HeyTapBrowser/i.test(Br);sn&&function(){var e=Br.match(/HeyTapBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var an=/VivoBrowser/i.test(Br);an&&function(){var e=Br.match(/VivoBrowser\/([\d.]+)/);e&&e[1]&&e[1]}();var cn,un,ln,dn=/Chrome/i.test(Br),hn=!Ur&&!Yr&&!Gr&&!Kr&&!Jr&&!qr&&!Zr&&!on&&!rn&&!nn&&!sn&&!an&&/Chrome/i.test(Br);hn&&function(){var e=Br.match(/Chrome\/(\d+)/);e&&e[1]&&parseFloat(e[1])}(),hn&&function(){var e=Br.match(/Chrome\/([\d.]+)/);e&&e[1]&&e[1]}(),!dn&&!$r&&!Xr&&!en&&!tn&&/Safari/i.test(Br)&&function(){var e=Br.match(/Version\/([\d.]+)/);e&&e[1]&&e[1]}(),"file:"===location.protocol||"localhost"===location.hostname||/^\d+\.\d+\.\d+\.\d+$/.test(location.hostname),function(e){e.LIVE="live",e.RTC="rtc"}(cn||(cn={})),function(e){e.CONTAIN="contain",e.COVER="cover",e.FILL="fill"}(un||(un={})),function(e){e[e.exitRoom=0]="exitRoom",e[e.banned=1]="banned",e[e.roomDisband=2]="roomDisband"}(ln||(ln={}));var pn,Tn,fn,vn=-3340,gn=-1301,mn=-1314,Rn=-1315,yn=-1316,Cn=-1302,_n=-1317,bn=-1318,Sn=-1319,Mn=-1308,wn=-102015,En=-70252,Vn={code:-1001,message:"参数错误, 请检查参数格式、是否非空等"},An={code:-1005,message:"not supported"},Pn="2.12.1";e.TRTCMediaMixingErrorCode=void 0,(pn=e.TRTCMediaMixingErrorCode||(e.TRTCMediaMixingErrorCode={}))[pn.Success=0]="Success",pn[pn.Error=-1]="Error",pn[pn.InvalidParams=-2]="InvalidParams",pn[pn.NotFoundSource=-3]="NotFoundSource",pn[pn.ImageSourceLoadFailed=-4]="ImageSourceLoadFailed",pn[pn.CameraNotAuthorized=-5]="CameraNotAuthorized",pn[pn.CameraIsOccupied=-6]="CameraIsOccupied",pn[pn.CameraDisconnected=-7]="CameraDisconnected",e.TRTCMediaSourceType=void 0,(Tn=e.TRTCMediaSourceType||(e.TRTCMediaSourceType={}))[Tn.kCamera=0]="kCamera",Tn[Tn.kScreen=1]="kScreen",Tn[Tn.kImage=2]="kImage",Tn[Tn.kPhoneMirror=4]="kPhoneMirror",Tn[Tn.kText=5]="kText",Tn[Tn.kVideo=6]="kVideo",e.TRTCMediaMixingEvent=void 0,(fn=e.TRTCMediaMixingEvent||(e.TRTCMediaMixingEvent={})).onSourceSelected="onSourceSelected",fn.onSourceMoved="onSourceMoved",fn.onSourceResized="onSourceResized",fn.onRightButtonClicked="onRightButtonClicked",fn.onError="onError",fn.onSourcePlugged="onSourcePlugged",fn.onSourceConnected="onSourceConnected",fn.onSourceDisconnected="onSourceDisconnected",fn.onSourceUnplugged="onSourceUnplugged",fn.onMediaSourceSizeChanged="onMediaSourceSizeChanged";var Ln,In=function(){function e(e,t){if(this.logRegion="tc",this.loggerManager=e,t){var i=t.sdkAppId,o=t.userId,r=t.seq;this.seq=r,e&&(this.logger=e.createLogger({id:"".concat(this.logRegion).concat(r),userId:o,sdkAppId:i}))}else this.logger=e;this.logger||(this.logger={debug:function(e){console.debug(e)},info:function(e){console.info(e)},warn:function(e){console.warn(e)},error:function(e){console.error(e)}})}return e.prototype.getLogMessage=function(e){var t=this;return e.map((function(e){return t.getStringifyMessage(e)})).join(" ")},e.prototype.getStringifyMessage=function(e){var t=this;if("object"!=typeof e)return e;if(e instanceof HTMLElement)return"".concat(e.tagName.toLocaleLowerCase(),"#").concat(e.id);if(e instanceof Array){var i=[];return Object.keys(e).forEach((function(o){return i[o]=t.getStringifyMessage(e[o])})),JSON.stringify(i)}if(e instanceof Object){var o={};return Object.keys(e).forEach((function(i){return o[i]=t.getStringifyMessage(e[i])})),JSON.stringify(o)}return e},e.prototype.update=function(e){var t=e.userId,i=e.sdkAppId;this.loggerManager&&this.loggerManager.createLogger&&(this.logger=this.loggerManager.createLogger({id:"".concat(this.logRegion).concat(this.seq),userId:t,sdkAppId:i}))},e.prototype.log=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(i)},e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger.debug(i)},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.info&&this.logger.info(i)},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.warn&&this.logger.warn(i)},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var i=this.getLogMessage(e);this.logger&&this.logger.error&&this.logger.error(i)},e}(),xn=new In(null),On=function(){function e(e,t,i){void 0===i&&(i={calcPositionOnly:!1,canExceedContainer:!1}),this.logPrefix="[Movable]",this.movable=null,this.container=null,this.options={calcPositionOnly:!1,canExceedContainer:!1},this.callbacksMap=new Map,this.enabled=!0,this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0,this.movable=e,this.container=t||document.body,this.options={calcPositionOnly:!!i.calcPositionOnly||!1,canExceedContainer:!!i.canExceedContainer||!1},this.setStyle(),this.onMouseDown=this.onMouseDown.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.onMouseUp=this.onMouseUp.bind(this),this.onMouseMove5px=this.onMouseMove5px.bind(this),this.onMouseUp5px=this.onMouseUp5px.bind(this),this.movable.addEventListener("mousedown",this.onMouseDown,!1)}return e.prototype.setStyle=function(){this.movable?(this.movable.style.position="absolute",this.movable.style.cursor="move"):xn.debug("".concat(this.logPrefix,"setStyle 'movable' is null"))},e.prototype.onMouseDown=function(e){if(this.enabled&&0===e.button){if(e.preventDefault(),document.defaultView&&this.movable){var t=document.defaultView.getComputedStyle(this.movable);this.originLeft=window.parseInt(t.left),this.originTop=window.parseInt(t.top)}else xn.debug("".concat(this.logPrefix,"onMouseDown 'movable' is null"));this.moveStartOfLeft=e.screenX,this.moveStartOfTop=e.screenY,document.addEventListener("mousemove",this.onMouseMove5px,!1),document.addEventListener("mouseup",this.onMouseUp5px,!1)}},e.prototype.onMouseMove5px=function(e){var t=e.screenX-(this.moveStartOfLeft||0),i=e.screenY-(this.moveStartOfTop||0);Math.abs(t)>=5||Math.abs(i)>=5?(document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1),document.addEventListener("mousemove",this.onMouseMove,!1),document.addEventListener("mouseup",this.onMouseUp,!1)):xn.debug("".concat(this.logPrefix,"on Movable mouse move less than 5px"))},e.prototype.onMouseUp5px=function(){document.removeEventListener("mousemove",this.onMouseMove5px,!1),document.removeEventListener("mouseup",this.onMouseUp5px,!1)},e.prototype.onMouseMove=function(e){if(this.movable&&this.container){var t=e.screenX-this.moveStartOfLeft,i=e.screenY-this.moveStartOfTop,o=this.originLeft+t,r=this.originTop+i,n=this.movable.offsetWidth,s=this.movable.offsetHeight,a=this.container.offsetWidth,c=this.container.offsetHeight;this.options.canExceedContainer||(o<0?o=0:o>a-n&&(o=a-n),r<0?r=0:r>c-s&&(r=c-s)),!this.options.calcPositionOnly&&this.movable&&(this.movable.style.left="".concat(o,"px"),this.movable.style.top="".concat(r,"px")),this.emit("move",o,r)}else xn.debug("".concat(this.logPrefix,"onMouseMove error:No 'movable' and 'container'."))},e.prototype.onMouseUp=function(){document.removeEventListener("mousemove",this.onMouseMove,!1),document.removeEventListener("mouseup",this.onMouseUp,!1),this.originLeft=0,this.originTop=0,this.moveStartOfLeft=0,this.moveStartOfTop=0},e.prototype.on=function(e,t){var i=this.callbacksMap.get(e);i?i.push(t):this.callbacksMap.set(e,[t])},e.prototype.off=function(e,t){var i=this.callbacksMap.get(e);i&&(i=i.filter((function(e){return e!=t})),this.callbacksMap.set(e,i))},e.prototype.emit=function(e){for(var t=[],i=1;i<arguments.length;i++)t[i-1]=arguments[i];var o=this.callbacksMap.get(e);o&&o.forEach((function(e){try{e.apply(null,t)}catch(i){console.error("[Movable]emit error:",e,i)}}))},e.prototype.destroy=function(){var e;null===(e=this.movable)||void 0===e||e.removeEventListener("mousedown",this.onMouseDown,!1),this.callbacksMap.clear(),this.movable=null,this.container=null},e.prototype.setEnabled=function(e){xn.debug("".concat(this.logPrefix,"setEnabled: ").concat(this.enabled," -> ").concat(e)),this.enabled=e,this.movable&&(this.movable.style.cursor=e?"move":"default",xn.debug("".concat(this.logPrefix,"setEnabled: cursor updated to '").concat(e?"move":"default","'")))},e.prototype.isEnabled=function(){return this.enabled},e}();!function(e){e[e.Both=0]="Both",e[e.Corner=1]="Corner",e[e.Edge=2]="Edge"}(Ln||(Ln={}));var kn="trtc-resizable-top-left-anchor",Dn="trtc-resizable-top-anchor",Bn="trtc-resizable-top-right-anchor",zn="trtc-resizable-left-anchor",Fn="trtc-resizable-right-anchor",Nn="trtc-resizable-bottom-left-anchor",Qn="trtc-resizable-bottom-anchor",Hn="trtc-resizable-bottom-right-anchor",Wn={resizeAnchor:{position:"absolute",width:"".concat(8,"px"),height:"".concat(8,"px"),border:"1px solid #3D7EFD",backgroundColor:"#FFFFFF"},topLeftAnchor:{top:"-".concat(4,"px"),left:"-".concat(4,"px"),cursor:"nw-resize"},topAnchor:{top:"-".concat(4,"px"),left:"calc(50% - ".concat(4,"px)"),cursor:"n-resize"},topRightAnchor:{top:"-".concat(4,"px"),right:"-".concat(4,"px"),cursor:"ne-resize"},leftAnchor:{top:"calc(50% - ".concat(4,"px)"),left:"-".concat(4,"px"),cursor:"w-resize"},rightAnchor:{top:"calc(50% - ".concat(4,"px)"),right:"-".concat(4,"px"),cursor:"e-resize"},bottomLeftAnchor:{bottom:"-".concat(4,"px"),left:"-".concat(4,"px"),cursor:"sw-resize"},bottomAnchor:{bottom:"-".concat(4,"px"),left:"calc(50% - ".concat(4,"px)"),cursor:"s-resize"},bottomRightAnchor:{bottom:"-".concat(4,"px"),right:"-".concat(4,"px"),cursor:"se-resize"}};function jn(e,t){for(var i in t)e.style[i]=t[i]}var Un=function(){function e(e,t,i){void 0===i&&(i={keepRatio:!1,stopPropagation:!1,anchorMode:Ln.Both,canExceedContainer:!1}),this.logPrefix="[Resizable]",this.container=null,this.options={keepRatio:!1,stopPropagation:!1,anchorMode:Ln.Both,canExceedContainer:!1},this.callbacksMap=new Map,this.topLeftAnchor=null,this.topAnchor=null,this.topRightAnchor=null,this.leftAnchor=null,this.rightAnchor=null,this.bottomLeftAnchor=null,this.bottomAnchor=null,this.bottomRightAnchor=null,this.currentAnchor=null,this.resizeStartLeft=0,this.resizeStartTop=0,this.originLeft=0,this.originTop=0,this.originWidth=0,this.originHeight=0,this.resizeTarget=e,this.container=t||document.body,this.options={keepRatio:!!i.keepRatio||!1,stopPropagation:!!i.stopPropagation||!1,anchorMode:i.anchorMode||Ln.Both,canExceedContainer:!!i.canExceedContainer||!1},this.mousedown=this.mousedown.bind(this),this.mousemove=this.mousemove.bind(this),this.mouseup=this.mouseup.bind(this),this.currentAnchor=null,this.createResizeAnchor(),this.resizeTarget.classList.add("trtc-resizable"),this.resizeTarget.style.position="absolute",this.resizeTarget.style.border="1px solid #3D7EFD",this.resizeTarget.style.boxSizing="border-box",this.initResizeEvent()}return e.prototype.createRes