From 2a61aa6e465c47fda61bd9034f9c92b2b2eb1e3e Mon Sep 17 00:00:00 2001 From: mayk-zoom <78444092+mayk-zoom@users.noreply.github.com> Date: Tue, 25 Jul 2023 12:05:26 -0700 Subject: [PATCH] 1.8.2 update (#31) --- CHANGELOG.md | 4 + dist/index.esm.js | 2 +- dist/index.js | 2 +- dist/index.umd.js | 2 +- oss_attribution.txt | 2243 ++++++++++++++----------------------------- 5 files changed, 734 insertions(+), 1519 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75b30df..9f15d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ ## CHANGELOG +## v1.8.2 +### Fixed +* Fixed an issue with `fps` option in `startVideo` method. + ## v1.8.0 ### Enhanced * Added `leaveOnPageUnload` option to the `client.init` method to support quickly leaving the session when refreshing or closing the page, instead of experiencing session failover. diff --git a/dist/index.esm.js b/dist/index.esm.js index fe96828..95d481d 100644 --- a/dist/index.esm.js +++ b/dist/index.esm.js @@ -1 +1 @@ -function e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,o)}return r}function t(t){for(var r=1;r=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function u(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,t||"default");if("object"!=typeof o)return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:String(t)}var d=function(e,t){return d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},d(e,t)};function c(e,t){function r(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}function l(e){return"function"==typeof e}var p=!1,h={Promise:void 0,set useDeprecatedSynchronousErrorHandling(e){if(e){var t=new Error;console.warn("DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \n"+t.stack)}else p&&console.log("RxJS: Back to a better error behavior. Thank you. <3");p=e},get useDeprecatedSynchronousErrorHandling(){return p}};function f(e){setTimeout((function(){throw e}),0)}var m={closed:!0,next:function(e){},error:function(e){if(h.useDeprecatedSynchronousErrorHandling)throw e;f(e)},complete:function(){}},g=Array.isArray||function(e){return e&&"number"==typeof e.length};function v(e){return null!==e&&"object"==typeof e}var y=function(){function e(e){return Error.call(this),this.message=e?e.length+" errors occurred during unsubscription:\n"+e.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=e,this}return e.prototype=Object.create(Error.prototype),e}(),b=y,S=function(){function e(e){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,e&&(this._ctorUnsubscribe=!0,this._unsubscribe=e)}return e.prototype.unsubscribe=function(){var t;if(!this.closed){var r=this,o=r._parentOrParents,n=r._ctorUnsubscribe,i=r._unsubscribe,s=r._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,o instanceof e)o.remove(this);else if(null!==o)for(var a=0;a0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,o){return void 0===o&&(o=0),null!==o&&o>0||null===o&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,o):t.flush(this)},t}(U),x=function(){function e(t,r){void 0===r&&(r=e.now),this.SchedulerAction=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.SchedulerAction(this,e).schedule(r,t)},e.now=function(){return Date.now()},e}(),B=function(e){function t(r,o){void 0===o&&(o=x.now);var n=e.call(this,r,(function(){return t.delegate&&t.delegate!==n?t.delegate.now():o()}))||this;return n.actions=[],n.active=!1,n.scheduled=void 0,n}return c(t,e),t.prototype.schedule=function(r,o,n){return void 0===o&&(o=0),t.delegate&&t.delegate!==this?t.delegate.schedule(r,o,n):e.prototype.schedule.call(this,r,o,n)},t.prototype.flush=function(e){var t=this.actions;if(this.active)t.push(e);else{var r;this.active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this.active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(x),F=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t}(B))(j),H=F,W=new R((function(e){return e.complete()}));function $(e){return e?function(e){return new R((function(t){return e.schedule((function(){return t.complete()}))}))}(e):W}function G(e){return e&&"function"==typeof e.schedule}var z,K=function(e){return function(t){for(var r=0,o=e.length;rthis._bufferSize&&r.shift()}e.prototype.next.call(this,t)},t.prototype.nextTimeWindow=function(t){this.isStopped||(this._events.push(new ie(this._getNow(),t)),this._trimBufferThenGetEvents()),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){var t,r=this._infiniteTimeWindow,o=r?this._events:this._trimBufferThenGetEvents(),n=this.scheduler,i=o.length;if(this.closed)throw new D;if(this.isStopped||this.hasError?t=S.EMPTY:(this.observers.push(e),t=new P(this,e)),n&&e.add(e=new re(e,n)),r)for(var s=0;st&&(i=Math.max(i,n-t)),i>0&&o.splice(0,i),o},t}(N),ie=function(e,t){this.time=e,this.value=t},se=1,ae=Promise.resolve(),ue={};function de(e){return e in ue&&(delete ue[e],!0)}var ce=function(e){function t(t,r){var o=e.call(this,t,r)||this;return o.scheduler=t,o.work=r,o}return c(t,e),t.prototype.requestAsyncId=function(t,r,o){return void 0===o&&(o=0),null!==o&&o>0?e.prototype.requestAsyncId.call(this,t,r,o):(t.actions.push(this),t.scheduled||(t.scheduled=function(e){var t=se++;return ue[t]=!0,ae.then((function(){return de(t)&&e()})),t}(t.flush.bind(t,null))))},t.prototype.recycleAsyncId=function(t,r,o){if(void 0===o&&(o=0),null!==o&&o>0||null===o&&this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,o);0===t.actions.length&&(function(e){de(e)}(r),t.scheduled=void 0)},t}(U),le=new(function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return c(t,e),t.prototype.flush=function(e){this.active=!0,this.scheduled=void 0;var t,r=this.actions,o=-1,n=r.length;e=e||r.shift();do{if(t=e.execute(e.state,e.delay))break}while(++o0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},t}(ke);function Le(e){return void 0===e&&(e=Number.POSITIVE_INFINITY),Pe(C,e)}function Ve(){for(var e=[],t=0;t1?o.next(Array.prototype.slice.call(arguments)):o.next(e)}),o,r)}))}function Be(e,t,r,o,n){var i;if(function(e){return e&&"function"==typeof e.addEventListener&&"function"==typeof e.removeEventListener}(e)){var s=e;e.addEventListener(t,r,n),i=function(){return s.removeEventListener(t,r,n)}}else if(function(e){return e&&"function"==typeof e.on&&"function"==typeof e.off}(e)){var a=e;e.on(t,r),i=function(){return a.off(t,r)}}else if(function(e){return e&&"function"==typeof e.addListener&&"function"==typeof e.removeListener}(e)){var u=e;e.addListener(t,r),i=function(){return u.removeListener(t,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var d=0,c=e.length;d=0}function We(e,t){return void 0===e&&(e=0),void 0===t&&(t=fe),(!He(e)||e<0)&&(e=0),t&&"function"==typeof t.schedule||(t=fe),new R((function(r){return r.add(t.schedule($e,e,{subscriber:r,counter:0,period:e})),r}))}function $e(e){var t=e.subscriber,r=e.counter,o=e.period;t.next(r),this.schedule({subscriber:t,counter:r+1,period:o},o)}function Ge(){for(var e=[],t=0;t1&&"number"==typeof e[e.length-1]&&(r=e.pop())):"number"==typeof n&&(r=e.pop()),null===o&&1===e.length&&e[0]instanceof R?e[0]:Le(r)(J(e,o))}function ze(e,t){function r(){return!r.pred.apply(r.thisArg,arguments)}return r.pred=e,r.thisArg=t,r}function Ke(e,t){return function(r){return r.lift(new qe(e,t))}}var qe=function(){function e(e,t){this.predicate=e,this.thisArg=t}return e.prototype.call=function(e,t){return t.subscribe(new Je(e,this.predicate,this.thisArg))},e}(),Je=function(e){function t(t,r,o){var n=e.call(this,t)||this;return n.predicate=r,n.thisArg=o,n.count=0,n}return c(t,e),t.prototype._next=function(e){var t;try{t=this.predicate.call(this.thisArg,e,this.count++)}catch(e){return void this.destination.error(e)}t&&this.destination.next(e)},t}(I);function Qe(){for(var e=[],t=0;t0&&r[0].time-o.now()<=0;)r.shift().notification.observe(n);if(r.length>0){var i=Math.max(0,r[0].time-o.now());this.schedule(e,i)}else this.unsubscribe(),t.active=!1},t.prototype._schedule=function(e){this.active=!0,this.destination.add(e.schedule(t.dispatch,this.delay,{source:this,destination:this.destination,scheduler:e}))},t.prototype.scheduleNotification=function(e){if(!0!==this.errored){var t=this.scheduler,r=new yt(t.now()+this.delay,e);this.queue.push(r),!1===this.active&&this._schedule(t)}},t.prototype._next=function(e){this.scheduleNotification(X.createNext(e))},t.prototype._error=function(e){this.errored=!0,this.queue=[],this.destination.error(e),this.unsubscribe()},t.prototype._complete=function(){this.scheduleNotification(X.createComplete()),this.unsubscribe()},t}(I),yt=function(e,t){this.time=e,this.notification=t};function bt(e){return function(t){return 0===e?$():t.lift(new St(e))}}var St=function(){function e(e){if(this.total=e,this.total<0)throw new ge}return e.prototype.call=function(e,t){return t.subscribe(new _t(e,this.total))},e}(),_t=function(e){function t(t,r){var o=e.call(this,t)||this;return o.total=r,o.count=0,o}return c(t,e),t.prototype._next=function(e){var t=this.total,r=++this.count;r<=t&&(this.destination.next(e),r===t&&(this.destination.complete(),this.unsubscribe()))},t}(I),Et=function(){function e(e){if(this.total=e,this.total<0)throw new ge}return e.prototype.call=function(e,t){return t.subscribe(new It(e,this.total))},e}(),It=function(e){function t(t,r){var o=e.call(this,t)||this;return o.total=r,o.ring=new Array,o.count=0,o}return c(t,e),t.prototype._next=function(e){var t=this.ring,r=this.total,o=this.count++;t.length0)for(var r=this.count>=this.total?this.total:this.count,o=this.ring,n=0;n=2&&(r=!0),function(o){return o.lift(new Ot(e,t,r))}}var Ot=function(){function e(e,t,r){void 0===r&&(r=!1),this.accumulator=e,this.seed=t,this.hasSeed=r}return e.prototype.call=function(e,t){return t.subscribe(new Rt(e,this.accumulator,this.seed,this.hasSeed))},e}(),Rt=function(e){function t(t,r,o,n){var i=e.call(this,t)||this;return i.accumulator=r,i._seed=o,i.hasSeed=n,i.index=0,i}return c(t,e),Object.defineProperty(t.prototype,"seed",{get:function(){return this._seed},set:function(e){this.hasSeed=!0,this._seed=e},enumerable:!0,configurable:!0}),t.prototype._next=function(e){if(this.hasSeed)return this._tryNext(e);this.seed=e,this.destination.next(e)},t.prototype._tryNext=function(e){var t,r=this.index++;try{t=this.accumulator(this.seed,e,r)}catch(e){this.destination.error(e)}this.seed=t,this.destination.next(t)},t}(I);function kt(e,t,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof t?Pe((function(){return e}),t,r):("number"==typeof t&&(r=t),Pe((function(){return e}),r))}function Dt(e){return function(t){return t.lift(new Pt(e))}}var Pt=function(){function e(e){this.predicate=e}return e.prototype.call=function(e,t){return t.subscribe(new Mt(e,this.predicate))},e}(),Mt=function(e){function t(t,r){var o=e.call(this,t)||this;return o.predicate=r,o.skipping=!0,o.index=0,o}return c(t,e),t.prototype._next=function(e){var t=this.destination;this.skipping&&this.tryCallPredicate(e),this.skipping||t.next(e)},t.prototype.tryCallPredicate=function(e){try{var t=this.predicate(e,this.index++);this.skipping=Boolean(t)}catch(e){this.destination.error(e)}},t}(I);function Nt(){for(var e=[],t=0;t0){var n=o.indexOf(r);-1!==n&&o.splice(n,1)}},t.prototype.notifyComplete=function(){},t.prototype._next=function(e){if(0===this.toRespond.length){var t=[e].concat(this.values);this.project?this._tryProject(t):this.destination.next(t)}},t.prototype._tryProject=function(e){var t;try{t=this.project.apply(this,e)}catch(e){return void this.destination.error(e)}this.destination.next(t)},t}(_e),er=function(e,t){return e===t||"function"==typeof t&&e===t.toString()},tr=function(){for(var e=arguments.length,t=Array(e),r=0;r1?r-1:0),n=1;n1?t-1:0),o=1;o2?r-2:0),s=2;s2?r-2:0),n=2;n{const t=e(...r);if(!t)throw new TypeError(`combineEpics: one of the provided Epics "${e.name||""}" does not return a stream. Double check you're not missing a return statement!`);return t.pipe(lt(((e,t)=>(setTimeout((()=>{throw e}),0),t))))})))};try{Object.defineProperty(o,"name",{value:`combineEpics(${t.map((e=>e.name||"")).join(", ")})`})}catch(e){}return o}function Ao(){for(var e=arguments.length,t=new Array(e),r=0;rObject.values(e))))}function wo(e,t){return e.pipe(tr(`${Zr}`),Ke((e=>e.payload.evt===t)))}function Co(e,t){return e.pipe(tr(`${ro}`),Ke((e=>e.payload.evt===t)))}function To(e,t){return e.pipe(tr(`${Xr}`),Ke((e=>e.payload.evt===t)))}function Oo(e,t){return e.pipe(tr(`${Zr}`,`${ro}`),Ke((e=>e.payload.evt===t)))}function Ro(e,t){return e.pipe(tr(`${lo}`),Ke((e=>Array.isArray(t)?t.indexOf(e.payload.type)>-1:e.payload.type===t)))}const ko="3.7.5",Do=ko,Po="function"==typeof atob,Mo="function"==typeof btoa,No="function"==typeof Buffer,Lo="function"==typeof TextDecoder?new TextDecoder:void 0,Vo="function"==typeof TextEncoder?new TextEncoder:void 0,Uo=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),jo=(e=>{let t={};return Uo.forEach(((e,r)=>t[e]=r)),t})(),xo=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,Bo=String.fromCharCode.bind(String),Fo="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Ho=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),Wo=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),$o=e=>{let t,r,o,n,i="";const s=e.length%3;for(let s=0;s255||(o=e.charCodeAt(s++))>255||(n=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");t=r<<16|o<<8|n,i+=Uo[t>>18&63]+Uo[t>>12&63]+Uo[t>>6&63]+Uo[63&t]}return s?i.slice(0,s-3)+"===".substring(s):i},Go=Mo?e=>btoa(e):No?e=>Buffer.from(e,"binary").toString("base64"):$o,zo=No?e=>Buffer.from(e).toString("base64"):e=>{let t=[];for(let r=0,o=e.length;rt?Ho(zo(e)):zo(e),qo=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?Bo(192|t>>>6)+Bo(128|63&t):Bo(224|t>>>12&15)+Bo(128|t>>>6&63)+Bo(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return Bo(240|t>>>18&7)+Bo(128|t>>>12&63)+Bo(128|t>>>6&63)+Bo(128|63&t)},Jo=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Qo=e=>e.replace(Jo,qo),Zo=No?e=>Buffer.from(e,"utf8").toString("base64"):Vo?e=>zo(Vo.encode(e)):e=>Go(Qo(e)),Yo=(e,t=!1)=>t?Ho(Zo(e)):Zo(e),Xo=e=>Yo(e,!0),en=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,tn=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return Bo(55296+(t>>>10))+Bo(56320+(1023&t));case 3:return Bo((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return Bo((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},rn=e=>e.replace(en,tn),on=e=>{if(e=e.replace(/\s+/g,""),!xo.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,o,n="";for(let i=0;i>16&255):64===o?Bo(t>>16&255,t>>8&255):Bo(t>>16&255,t>>8&255,255&t);return n},nn=Po?e=>atob(Wo(e)):No?e=>Buffer.from(e,"base64").toString("binary"):on,sn=No?e=>Fo(Buffer.from(e,"base64")):e=>Fo(nn(e).split("").map((e=>e.charCodeAt(0)))),an=e=>sn(dn(e)),un=No?e=>Buffer.from(e,"base64").toString("utf8"):Lo?e=>Lo.decode(sn(e)):e=>rn(nn(e)),dn=e=>Wo(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),cn=e=>un(dn(e)),ln=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),pn=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,ln(t));e("fromBase64",(function(){return cn(this)})),e("toBase64",(function(e){return Yo(this,e)})),e("toBase64URI",(function(){return Yo(this,!0)})),e("toBase64URL",(function(){return Yo(this,!0)})),e("toUint8Array",(function(){return an(this)}))},hn=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,ln(t));e("toBase64",(function(e){return Ko(this,e)})),e("toBase64URI",(function(){return Ko(this,!0)})),e("toBase64URL",(function(){return Ko(this,!0)}))},fn={version:ko,VERSION:Do,atob:nn,atobPolyfill:on,btoa:Go,btoaPolyfill:$o,fromBase64:cn,toBase64:Yo,encode:Yo,encodeURI:Xo,encodeURL:Xo,utob:Qo,btou:rn,decode:cn,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:Ko,toUint8Array:an,extendString:pn,extendUint8Array:hn,extendBuiltins:()=>{pn(),hn()}};function mn(e){return fn.encode(e,!0)}function gn(e){return fn.decode(e)}function vn(e){return fn.encode(e,!1)}const yn={"-":"+",_:"/",".":"="};function bn(e){const t=e.replace(/[-_.]/g,(e=>yn[e]));return Uint8Array.from(window.atob(t),(e=>e.charCodeAt(0)))}const Sn=e=>{const t=e.charCodeAt(0);return t<=parseInt("0x7F",16)?1:t<=parseInt("0x7FF",16)?2:t<=parseInt("0xFFFF",16)?3:t<=parseInt("0x1FFFFF",16)?4:t<=parseInt("0x3FFFFFF",16)?5:6};function _n(e,t){return Object.keys(e).find((r=>e[r]===t))}const En=(e,t)=>{const r=e.split(".").map((e=>Number(e))).slice(0,3),o=t.split(".").map((e=>Number(e))).slice(0,3);let n=0;for(let e=0;e<3;e++){const t=ei){n=1;break}}return n},In=e=>{var t;let r=(new Date).getTime(),o=1e3*(null===(t=performance)||void 0===t?void 0:t.now())||0;const n="xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(e=>{let t=16*Math.random();return r>0?(t=(r+t)%16|0,r=Math.floor(r/16)):(t=(o+t)%16|0,o=Math.floor(o/16)),("x"===e?t:3&t|8).toString(16)}));return"string"==typeof e||"number"==typeof e?n+":"+e:n+""};function An(e,t){if(e===t)return!0;if(!e||!t)return!1;const r=Object.keys(e),o=Object.keys(t),n=r.length;if(o.length!==n)return!1;for(let o=0;oe>>10==t>>10,Cn=(e,t)=>new Promise((r=>{setTimeout((()=>{r(e())}),t)})),Tn=e=>{const t=`${Math.floor(1e4*Math.random())}`;return e.indexOf("@")>-1?e.replace("@",t):`${e}${t}`},On=e=>{try{const t=new URL(e);return!("data:"===t.protocol&&"null"===t.origin)&&t.origin!==location.origin}catch(e){return!0}},Rn={default:{"apac.errorcodes_success":"Successfully joined the meeting.","apac.errorcodes_fail":"Fail to join the meeting.","apac.errorcodes_not_init":"Meeting not initialized.","apac.errorcodes_register":"This webinar requires registration.","apac.errorcodes_email_require":"Email is missing to attend webinar.","apac.errorcodes_not_exist":"Meeting does not exist.","apac.errorcodes_not_host":"You are not the meeting host.","apac.errorcodes_wrong_pass":"Meeting Passcode wrong.","apac.errorcodes_role_type":"Role type is required.","apac.errorcodes_not_start":"Meeting has not started","apac.errorcodes_host_email_as_attendee":"Host email as attendee","apac.errorcodes_re_connect":"Meeting is reconnecting.","apac.errorcodes_be_removed":"Be removed.","apac.errorcodes_disconnect":"Meeting has been disconnected.","apac.errorcodes_denied_register_with_panelist":"Denied register use panelist email.","apac.errorcodes_web_has_in_progress":"Already has other meetings in progress.","apac.errorcodes_web_require_email":"User email is required.","apac.errorcodes_web_not_support_webinar_pac":"Not support webinar and personal audio conference","apac.errorcodes_web_host_not_exit":"The meeting host does not exist.","apac.errorcodes_web_not_support_webclient":"Not support start or join meeting from web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"The current sdk version doesn't support webinar, please upgrade to the latest version.","apac.errorcodes_web_invalid_id":"Invalid meeting ID.","apac.errorcodes_web_not_support_registration_webinar":"Not support registration webinar","apac.errorcodes_web_not_support_tsp":"Not support start or join meeting from web, when you chose TSP as his audio in a meeting.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Not allow to start webinar from web.","apac.errorcodes_pac_api_wrong":"The accounts API Key is not valid.","apac.errorcodes_pac_signature_expired":"The signature has expired.","apac.errorcodes_pac_mn_wrong":"The meeting number is wrong.","apac.errorcodes_pac_mn_not_fount":"The meeting number is not found.","apac.errorcodes_pac_role_error":"Incorrect role.","apac.errorcodes_pac_host_not_found":"The meeting host is not found.","apac.errorcodes_pac_api_disabled":"The accounts API Key is deactivated.","apac.errorcodes_pac_cant_host_other_mn":"Cannot not host another meeting concurrently.","apac.errorcodes_pac_invalid_signature":"Signature is invalid.","apac.errorcodes_pac_no_permission":"No permission.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Unable join from browser, please join using the Zoom desktop client or mobile app.","apac.errorcodes_rwc_empty":"Could not get a response from the web server.","apac.errorcodes_rwc_error":"Could not connect to Web Server error.","apac.errorcodes_frequent_call":"You have reached the API limit for this call.","apac.errorcodes_frequent_join":"You be limit by zoom, need to check recaptcha.","apac.errorcodes_offline":"The service is temporarily offline.","apac.errorcodes_wasm_fail":"Download wasm files error, please check your network and firewall.","apac.errorcodes_denied_email":"Email is blocked by Administrator.","apac.errorcodes_host_inactive":"Meeting host is inactive.","apac.errorcodes_tk_expired":"Token has expired.","apac.invalid_parameter":"Invalid Parameter","apac.errorcodes_login_required":"Require login","apac.errorcodes_upgrade":"Your sdk version needs to be {0} or higher to join the meeting","apac.errorcodes_no_response_from_web":"No response from web, try again later.","apac.errorcodes_host_email":"Please use host/alternative host to start the webinar.","apac.errorcodes_meeting_websdk_version_need_update":"The current sdk version is no longer supported, please upgrade to the latest version."},"de-DE":{"apac.errorcodes_web_has_in_progress":"Hat bereits andere laufende Meetings.","apac.errorcodes_web_require_email":"E-Mail-Adresse von Benutzer erforderlich.","apac.errorcodes_web_not_support_webinar_pac":"Unterstützen Webinar und persönliche Audiokonferenz nicht","apac.errorcodes_web_host_not_exit":"Der Meeting-Host ist nicht vorhanden.","apac.errorcodes_web_not_support_webclient":"Start nicht unterstützt bzw. starten Sie das Meeting aus dem Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Ihre aktuelle SDK-Version unterstützt keine Webinare. Aktualisieren Sie bitte auf die neueste Version.","apac.errorcodes_web_invalid_id":"Ungültige Meeting-ID.","apac.errorcodes_web_not_support_registration_webinar":"Registrierung für Webinar wird nicht unterstützt","apac.errorcodes_web_not_support_tsp":"Sie unterstützen nicht den Start oder die Teilnahme an einem Meeting aus dem Web, wenn Sie den Telefonieanbieter als seinen Audiobeitrag in einem Meeting gewählt haben.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Das Starten eines Webinars vom Internet aus ist nicht zulässig.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Unfähig beitreten aus Browser, verbinden Sie bitte den Zoom-Desktop-Client oder mobile App.","apac.errorcodes_meeting_websdk_version_need_update":"Ihre aktuelle SDK-Version wird nicht mehr unterstützt. Aktualisieren Sie bitte auf die neueste Version."},"es-ES":{"apac.errorcodes_web_has_in_progress":"Ya posee otras reuniones en curso.","apac.errorcodes_web_require_email":"Se requiere correo electrónico del usuario.","apac.errorcodes_web_not_support_webinar_pac":"No soporta seminario web o conferencia de audio personal","apac.errorcodes_web_host_not_exit":"El anfitrión de la reunión no existe.","apac.errorcodes_web_not_support_webclient":"No se puede iniciar ni entrar a una reunión desde la web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La versión actual de sdk no es compatible con el seminario web, actualice a la última versión.","apac.errorcodes_web_invalid_id":"ID de reunión no válida.","apac.errorcodes_web_not_support_registration_webinar":"Seminario web que no es compatible con la inscripción","apac.errorcodes_web_not_support_tsp":"Cuando eligió el proveedor de servicios telefónicos como audio en una reunión, no se puede iniciar o unirse una reunión desde el sitio web.","apac.errorcodes_web_not_allow_start_webinar_from_web":"No se permite comenzar un seminario web desde la web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"No puede unirse desde el navegador, por favor unirse usando el cliente de escritorio Zoom o aplicación móvil.","apac.errorcodes_meeting_websdk_version_need_update":"La versión actual de sdk ya no es compatible actualice a la versión más reciente."},"fr-FR":{"apac.errorcodes_web_has_in_progress":"Il a déjà d’autres réunions en cours.","apac.errorcodes_web_require_email":"Le courriel de l’utilisateur est requis.","apac.errorcodes_web_not_support_webinar_pac":"Ne prend pas en charge le webinaire ni la conférence audio personnelle","apac.errorcodes_web_host_not_exit":"L’animateur de la réunion n’existe pas.","apac.errorcodes_web_not_support_webclient":"Ne supporte pas démarrer ou rejoindre une réunion à partir du web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La version actuelle du SDK ne prend pas en charge le webinaire, veuillez passer à la dernière version.","apac.errorcodes_web_invalid_id":"Nº de réunion non valide.","apac.errorcodes_web_not_support_registration_webinar":"Ne prend pas en charge le webinaire d’inscription","apac.errorcodes_web_not_support_tsp":"Ne peut pas démarrer ou rejoindre la réunion depuis Internet, lorsque vous sélectionnez le fournisseur de service en téléphonie comma sa sortie audio dans une réunion.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Ne pas permettre de démarrer des webinaires à partir du Web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Impossible de rejoindre le navigateur, s'il vous plaît rejoindre en utilisant le client de bureau Zoom ou une application mobile.","apac.errorcodes_meeting_websdk_version_need_update":"La version actuelle du SDK n’est plus prise en charge, veuillez passer à la dernière version."},"jp-JP":{"apac.errorcodes_web_has_in_progress":"すでに他のミーティングが始まっています。","apac.errorcodes_web_require_email":"ユーザーメールは必要です。","apac.errorcodes_web_not_support_webinar_pac":"ウェビナーとパーソナル音声会議がサポートされていません","apac.errorcodes_web_host_not_exit":"このミーティングのホストは存在しません。","apac.errorcodes_web_not_support_webclient":"ウェブからのミーティング開始/参加はサポートされません。","apac.errorcodes_web_should_support_webinar_with_latest_version":"現在のSDKバージョンはウェビナーをサポートしていません。最新バージョンにアップグレードしてください。","apac.errorcodes_web_invalid_id":"無効なミーティングIDです。","apac.errorcodes_web_not_support_registration_webinar":"登録ウェビナー非対応","apac.errorcodes_web_not_support_tsp":"ミーティングのオーディオにテレフォニーサービスプロバイダを選択した場合、ウェブからミーティングを開始したり、ミーティングに参加したりできません。","apac.errorcodes_web_not_allow_start_webinar_from_web":"ウェビナーをウェブから開始できません。","apac.errorcodes_need_use_zoom_desktop_or_mobile":"できませんが、ブラウザから参加し、ズームデスクトップクライアントやモバイルアプリを使用して参加してください。","apac.errorcodes_meeting_websdk_version_need_update":"現在の SDK バージョンはサポートされていません。最新バージョンにアップグレードしてください。"},"pt-PT":{"apac.errorcodes_web_has_in_progress":"Já há outras reuniões em andamento.","apac.errorcodes_web_require_email":"O e-mail do usuário é obrigatório.","apac.errorcodes_web_not_support_webinar_pac":"Não há suporte para webinar e audioconferência pessoal","apac.errorcodes_web_host_not_exit":"O anfitrião da reunião não existe.","apac.errorcodes_web_not_support_webclient":"Não há suporte para iniciar ou entrar na reunião pela web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"A versão sdk atual não oferece suporte para webinar. Atualize para a versão mais recente.","apac.errorcodes_web_invalid_id":"ID da reunião inválido.","apac.errorcodes_web_not_support_registration_webinar":"O registro do webinar não é compatível","apac.errorcodes_web_not_support_tsp":"Não é compatível iniciar ou ingressar na reunião pela web ao escolher o áudio do provedor de serviços de telefonia em uma reunião.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Não é permitido iniciar o webinar na web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Incapaz juntar-se a partir do navegador, por favor, junte-se usando o cliente de desktop Zoom ou aplicativo móvel.","apac.errorcodes_meeting_websdk_version_need_update":"O serviço de validação de número ABN está temporariamente indisponível."},"ru-RU":{"apac.errorcodes_web_has_in_progress":"Уже участвует в других конференциях.","apac.errorcodes_web_require_email":"Требуется почта пользователя.","apac.errorcodes_web_not_support_webinar_pac":"Не поддерживает веб-семинар и персональную аудиоконференцию","apac.errorcodes_web_host_not_exit":"Организатор конференции не существует.","apac.errorcodes_web_not_support_webclient":"Запуск или вход в конференцию через сеть не поддерживается.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Текущая версия пакета SDK не поддерживает вебинары. Выполните обновление до последней версии.","apac.errorcodes_web_invalid_id":"Неверный идентификатор конференции.","apac.errorcodes_web_not_support_registration_webinar":"Регистрация на вебинар не поддерживается","apac.errorcodes_web_not_support_tsp":"Если для аудиоконференции используется поставщик службы телефонии, такую конференцию невозможно начать или подключиться к ней через браузер.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Запуск веб-семинара через Интернет запрещен.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Невозможно присоединиться из браузера, пожалуйста, присоединяйтесь с помощью настольного клиента Увеличить или мобильное приложение.","apac.errorcodes_meeting_websdk_version_need_update":"Текущая версия пакета SDK больше не поддерживается. Выполните обновление до последней версии."},"zh-CN":{"apac.errorcodes_web_has_in_progress":"已经有另一场会议正在进行。","apac.errorcodes_web_require_email":"必须提供用户电子邮件地址。","apac.errorcodes_web_not_support_webinar_pac":"非支持的网络研讨会和个人音频会议","apac.errorcodes_web_host_not_exit":"会议主持人不存在。","apac.errorcodes_web_not_support_webclient":"不支持从 Web 开始或加入会议。","apac.errorcodes_web_should_support_webinar_with_latest_version":"当前 sdk 版本不支持网络研讨会,请升级到最新版本。","apac.errorcodes_web_invalid_id":"无效的会议ID。","apac.errorcodes_web_not_support_registration_webinar":"不支持注册网络研讨会","apac.errorcodes_web_not_support_tsp":"如果选择电话语音服务提供商作为会议音频,则不支持通过网络开始或加入会议。","apac.errorcodes_web_not_allow_start_webinar_from_web":"不允许通过网络开始网络研讨会","apac.errorcodes_need_use_zoom_desktop_or_mobile":"从浏览器无法加入,请加入使用缩放桌面客户端或移动应用程序。","apac.errorcodes_meeting_websdk_version_need_update":"当前SDK版本不再受到支持,请升级到最新版本。"},"zh-TW":{"apac.errorcodes_web_has_in_progress":"已有其他會議正在進行中。","apac.errorcodes_web_require_email":"必須提供使用者電子郵件地址。","apac.errorcodes_web_not_support_webinar_pac":"不支援網路研討會和個人音訊會議","apac.errorcodes_web_host_not_exit":"會議主持人不存在。","apac.errorcodes_web_not_support_webclient":"不支援從 Web 開始或加入會議。","apac.errorcodes_web_should_support_webinar_with_latest_version":"目前的 SDK 版本不支援網路研討會,請升級至最新版本。","apac.errorcodes_web_invalid_id":"無效的會議 ID 。","apac.errorcodes_web_not_support_registration_webinar":"不支援註冊網路研討會","apac.errorcodes_web_not_support_tsp":"當您選擇電話語音服務供應商做為會議語音使用時,不支援經由網頁召開或加入會議。","apac.errorcodes_web_not_allow_start_webinar_from_web":"不允許從 Web 開始網路研討會。","apac.errorcodes_need_use_zoom_desktop_or_mobile":"從瀏覽器無法加入,請加入使用縮放桌面客戶端或移動應用程序。","apac.errorcodes_meeting_websdk_version_need_update":"目前的SDK版本已不再受到支援,請升級至最新版本。"},"ko-KO":{"apac.errorcodes_web_has_in_progress":"이미 다른 회의가 진행 중입니다.","apac.errorcodes_web_require_email":"사용자 이메일이 필요합니다.","apac.errorcodes_web_not_support_webinar_pac":"웨비나 및 개인 오디오 전화 회의를 지원하지 않음","apac.errorcodes_web_host_not_exit":"회의 호스트가 없습니다.","apac.errorcodes_web_not_support_webclient":"웹에서 회의를 시작하거나 참여하는 것은 지원하지 않습니다.","apac.errorcodes_web_should_support_webinar_with_latest_version":"현재 SDK 버전은 웨비나를 지원하지 않습니다. 최신 버전으로 업그레이드하십시오.","apac.errorcodes_web_invalid_id":"회의 ID가 잘못되었습니다.","apac.errorcodes_web_not_support_registration_webinar":"등록 웨비나를 지원하지 않음","apac.errorcodes_web_not_support_tsp":"회의에서 Telephony Service Provider를 오디오로 선택한 경우 웹에서 회의를 시작하거나 회의에 참가할 수 없습니다.","apac.errorcodes_web_not_allow_start_webinar_from_web":"웹에서 웨비나를 시작할 수 없습니다.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"수 없습니다 브라우저에서 조인 줌 데스크톱 클라이언트 또는 모바일 앱을 사용하여 가입하시기 바랍니다.","apac.errorcodes_meeting_websdk_version_need_update":"현재 SDK 버전은 더 이상 지원되지 않습니다. 최신 버전으로 업그레이드하십시오."},"vi-VN":{"apac.errorcodes_web_has_in_progress":"Đã có cuộc họp khác đang diễn ra.","apac.errorcodes_web_require_email":"Email người dùng là bắt buộc.","apac.errorcodes_web_not_support_webinar_pac":"Không hỗ trợ hội thảovideo và hội nghị âm thanh cá nhân","apac.errorcodes_web_host_not_exit":"Người chủ trì cuộc họp không tồn tại.","apac.errorcodes_web_not_support_webclient":"Không hỗ trợ bắt đầu hoặc vào cuộc họp từ web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Phiên bản sdk hiện tại không hỗ trợ hội thảo trực tuyến, hãy nâng cấp lên phiên bản mới nhất.","apac.errorcodes_web_invalid_id":"ID cuộc họp không hợp lệ.","apac.errorcodes_web_not_support_registration_webinar":"Không hỗ trợ đăng ký hội thảo trực tuyến","apac.errorcodes_web_not_support_tsp":"Không hỗ trợ bắt đầu hoặc vào cuộc họp từ web, khi bạn chọn Nhà cung cấp dịch vụ điện thoại làm nguồn âm thanh trong cuộc họp.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Không cho phép bắt đầu hội thảo trực tuyến từ web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Không thể tham gia từ trình duyệt, hãy tham gia bằng cách sử dụng client desktop Phóng to hoặc ứng dụng di động.","apac.errorcodes_meeting_websdk_version_need_update":"Phiên bản sdk hiện tại không còn được hỗ trợ, vui lòng nâng cấp lên phiên bản mới nhất."},"it-IT":{"apac.errorcodes_web_has_in_progress":"Sta partecipando a un’altra riunione in corso.","apac.errorcodes_web_require_email":"È richiesta l’email dell’utente.","apac.errorcodes_web_not_support_webinar_pac":"Non supporta webinar e conferenza audio personale","apac.errorcodes_web_host_not_exit":"L’ospite della riunione non esiste.","apac.errorcodes_web_not_support_webclient":"Non supporta l’avvio o la partecipazione alla riunione dal Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"La versione sdk corrente non supporta i webinar. Effettua l’aggiornamento alla versione più recente.","apac.errorcodes_web_invalid_id":"ID riunione non valido.","apac.errorcodes_web_not_support_registration_webinar":"Non supporta webinar con iscrizione","apac.errorcodes_web_not_support_tsp":"In caso che hai selezionato il fornitore di servizio telefonico come l’audio in riunione, non supporta l’avvio o la partecipazione alla riunione dal Web.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Non è consentito avviare il webinar dal Web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Impossibile unirsi dal browser, si prega di unirsi con il client desktop Zoom o app mobile.","apac.errorcodes_meeting_websdk_version_need_update":"La versione sdk corrente non è più supportata. Aggiorna alla versione più recente."},"id-ID":{"apac.errorcodes_web_has_in_progress":"Sudah mengadakan pertemuan lain.","apac.errorcodes_web_require_email":"Email pengguna diperlukan.","apac.errorcodes_web_not_support_webinar_pac":"Tidak mendukung konferensi webinar dan audio pribadi","apac.errorcodes_web_host_not_exit":"Tuan rumah pertemuan tidak ada.","apac.errorcodes_web_not_support_webclient":"Tidak mendukung mulai atau bergabung dengan rapat dari web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Versi SDK saat ini tidak mendukung webinar, silakan tingkatkan ke versi terbaru.","apac.errorcodes_web_invalid_id":"ID pertemuan tidak valid.","apac.errorcodes_web_not_support_registration_webinar":"Tidak mendukung webinar pendaftaran","apac.errorcodes_web_not_support_tsp":"Tidak mendukung mulai atau bergabung dengan rapat dari web, saat Anda memilih TSP sebagai audionya dalam rapat.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Tidak mengizinkan untuk memulai webinar dari web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Tidak dapat bergabung dari browser, silakan bergabung menggunakan klien zoom desktop atau aplikasi seluler.","apac.errorcodes_meeting_websdk_version_need_update":"Versi sdk saat ini tidak lagi didukung. Tingkatkan ke versi terbaru."},"nl-NL":{"apac.errorcodes_web_has_in_progress":"Heeft al andere vergaderingen in uitvoering.","apac.errorcodes_web_require_email":"E -mail van gebruikers is vereist.","apac.errorcodes_web_not_support_webinar_pac":"Ondersteun niet webinar en persoonlijke audioconferentie","apac.errorcodes_web_host_not_exit":"De vergadergastheer bestaat niet.","apac.errorcodes_web_not_support_webclient":"Ondersteuning niet starten of deelnemen aan de vergadering van Web.","apac.errorcodes_web_should_support_webinar_with_latest_version":"De huidige SDK -versie ondersteunt Webinar niet, upgrade naar de nieuwste versie.","apac.errorcodes_web_invalid_id":"Ongeldige vergadering -ID.","apac.errorcodes_web_not_support_registration_webinar":"Ondersteun geen registratie -webinar","apac.errorcodes_web_not_support_tsp":"Start niet of deel aan de vergadering van Web, wanneer u TSP koos als zijn audio tijdens een vergadering.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Niet toestaan ​​om webinar te starten vanaf het web.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Niet in staat om mee te doen vanuit de browser, doe mee met behulp van de Zoom Desktop -client of mobiele app.","apac.errorcodes_meeting_websdk_version_need_update":"De huidige SDK-versie wordt niet langer ondersteund. Voer een upgrade uit naar de nieuwste versie."},"tr-TR":{"apac.errorcodes_web_has_in_progress":"Zaten devam eden başka toplantılara sahip.","apac.errorcodes_web_require_email":"Kullanıcı e-postası gereklidir.","apac.errorcodes_web_not_support_webinar_pac":"Web'in ve kişisel ses konferansını desteklememek","apac.errorcodes_web_host_not_exit":"Toplantı ana bilgisayar mevcut değil.","apac.errorcodes_web_not_support_webclient":"Desteklemeyi denememek veya web'den toplantıya katılın.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Mevcut SDK sürümü WebInar'ı desteklemiyor, lütfen en son sürüme yükseltin.","apac.errorcodes_web_invalid_id":"Geçersiz Toplantı Kimliği.","apac.errorcodes_web_not_support_registration_webinar":"Kayıt web seminerini desteklememek","apac.errorcodes_web_not_support_tsp":"TSP'yi bir toplantıda ses olarak seçtiğinizde, web'den toplantıyı başlatmayın veya katılmayın.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Web'in web'den başlamasına izin vermeyin.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Tarayıcıdan katılamıyorsanız, lütfen Zoom Masaüstü İstemcisi veya Mobil Uygulamayı kullanarak katılın.","apac.errorcodes_meeting_websdk_version_need_update":"Mevcut sdk sürümü artık desteklenmiyor, lütfen en son sürüme yükseltin."},"pl-PL":{"apac.errorcodes_web_has_in_progress":"Ma już inne spotkania.","apac.errorcodes_web_require_email":"Wymagany jest e-mail użytkownika.","apac.errorcodes_web_not_support_webinar_pac":"Nie obsługuje seminarium i osobistej konferencji audio","apac.errorcodes_web_host_not_exit":"Gospodarz spotkania nie istnieje.","apac.errorcodes_web_not_support_webclient":"Nie obsługuje uruchomienia ani dołączania do spotkania z sieci.","apac.errorcodes_web_should_support_webinar_with_latest_version":"Aktualna wersja SDK nie obsługuje webinarium, proszę uaktualnić do najnowszej wersji.","apac.errorcodes_web_invalid_id":"Nieprawidłowy identyfikator spotkania.","apac.errorcodes_web_not_support_registration_webinar":"Nie wspieraj rejestracji webinarium internetowego","apac.errorcodes_web_not_support_tsp":"Nie obsługuje uruchomienia ani dołączania do spotkania z Internetu, gdy wybrałeś TSP jako jego audio na spotkaniu.","apac.errorcodes_web_not_allow_start_webinar_from_web":"Nie pozwól, aby rozpocząć sieć webinarną od sieci.","apac.errorcodes_need_use_zoom_desktop_or_mobile":"Nie można dołączyć z przeglądarki, dołącz do Klienta Klient Desktop lub Mobile App.","apac.errorcodes_meeting_websdk_version_need_update":"Bieżąca wersja sdk nie jest już obsługiwana; uaktualnij do najnowszej wersji."}},kn=Rn.default,Dn=-3e3,Pn=200;let Mn=function(e){return e[e.CONF_SUCCESS=0]="CONF_SUCCESS",e[e.CONF_FAIL_MEETING_OVER=6]="CONF_FAIL_MEETING_OVER",e[e.CONF_FAIL_CONF_USER_FULL=9]="CONF_FAIL_CONF_USER_FULL",e[e.CONF_FAIL_CONFLOCKED=12]="CONF_FAIL_CONFLOCKED",e[e.CONF_FAIL_WEBINAR_DENIED_EMAIL=3033]="CONF_FAIL_WEBINAR_DENIED_EMAIL",e[e.CONF_FAIL_MEETING_HAS_CLOSED=103003]="CONF_FAIL_MEETING_HAS_CLOSED",e[e.CONF_FAIL_HAS_BEEN_REMOVED=103039]="CONF_FAIL_HAS_BEEN_REMOVED",e[e.CONF_RESULT_MMR_IB_REJECT=103043]="CONF_RESULT_MMR_IB_REJECT",e[e.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS=103044]="CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS",e}({}),Nn=function(e){return e[e.Unknown=0]="Unknown",e[e.Normal=1]="Normal",e[e.Userrequest=2]="Userrequest",e[e.SdkConnection=3]="SdkConnection",e[e.Reconnect=5]="Reconnect",e[e.PtRequest=6]="PtRequest",e[e.KickedByHost=7]="KickedByHost",e[e.EndByHost=8]="EndByHost",e[e.EndByHostStartAnotherMeeting=9]="EndByHostStartAnotherMeeting",e[e.FreeMeetingTimeout=10]="FreeMeetingTimeout",e[e.JBHTimeout=11]="JBHTimeout",e[e.EndBySingleStatus=12]="EndBySingleStatus",e[e.WebinarNeedRegister=13]="WebinarNeedRegister",e[e.ArchiveFail=14]="ArchiveFail",e[e.EndByNone=15]="EndByNone",e[e.EndByAdmin=16]="EndByAdmin",e[e.DuplicateSession=17]="DuplicateSession",e[e.MeetingTransfer=18]="MeetingTransfer",e}({}),Ln=function(e){return e[e.WaitingRoomFailover=1]="WaitingRoomFailover",e[e.WebEndAndRejoin=2]="WebEndAndRejoin",e}({});function Vn(e,t){return t in kn?kn[t]:e}const Un=Pn,jn={ANOTHER_MEETING_RUNNING:3e3,ERROR_NOT_EXIST:3001,ERROR_NOT_HOST:3003,WRONG_MEETING_PASSWORD:3004,ROLE_TYPE_IS_REQUIRE:3010,EMAIL_REQUIRED:3005,MEETING_NOT_START:3008,BE_REMOVED:3009,ERROR_WEBINAR_ENFORCE_LOGIN:3034,NEED_REAL_NAME:3082,REGISTER_REQUIRED:3099,SSO_LOGIN_WINDOW:6024,ZOOM_LOGIN_WINDOW:3051,ZOOM_SPECIFIC_LOGIN_WINDOW:3052,LOGIN_REQUIRED:3100,RE_CONNECTING:4e3,DISCONNECT:4001,INVALID_PARAMETER:4003,DENIED_REGISTER_WITH_PANELIST:3032,SERVICE_OFFLINE:403,RWC_EMPTY:3621,RWC_ERROR:3622,FREQUENT_CALL:3633,FREQUENT_JOIN:3634,WASM_FAIL:3635,COMMON_ERROR:Pn,COMMON_SUCCESS:0,UPGRADE:1e4},xn={SUCCESS:"apac.errorcodes_success",FAIL:"apac.errorcodes_fail",MEETING_NOT_INIT:"apac.errorcodes_not_init",REGISTER_REQUIRED:"apac.errorcodes_register",LOGIN_REQUIRED:"apac.errorcodes_login_required",SSO_LOGIN_WINDOW:"apac.errorcodes_login_required",ZOOM_LOGIN_WINDOW:"apac.errorcodes_login_required",ZOOM_SPECIFIC_LOGIN_WINDOW:"apac.errorcodes_login_required",EMAIL_REQUIRED:"apac.errorcodes_email_require",ERROR_NOT_EXIST:"apac.errorcodes_not_exist",ERROR_NOT_HOST:"apac.errorcodes_not_host",WRONG_MEETING_PASSWORD:"apac.errorcodes_wrong_pass",ROLE_TYPE_IS_REQUIRE:"apac.errorcodes_role_type",ANOTHER_MEETING_RUNNING:"apac.errorcodes_meeting_has_in_progress",MEETING_NOT_START:"apac.errorcodes_not_start",INVALID_PARAMETER:"apac.invalid_parameter",RE_CONNECTING:"apac.errorcodes_re_connect",BE_REMOVED:"apac.errorcodes_be_removed",ERROR_WEBINAR_ENFORCE_LOGIN:"apac.errorcodes_webinar_enforce_login",DISCONNECT:"apac.errorcodes_disconnect",DENIED_REGISTER_WITH_PANELIST:"apac.errorcodes_denied_register_with_panelist",RWC_EMPTY:"apac.errorcodes_rwc_empty",RWC_ERROR:"apac.errorcodes_rwc_error",FREQUENT_CALL:"apac.errorcodes_frequent_call",FREQUENT_JOIN:"apac.errorcodes_frequent_join",WASM_FAIL:"apac.errorcodes_wasm_fail",UPGRADE:"apac.errorcodes_meeting_websdk_version_need_update"},Bn={3e3:{"apac.errorcodes_web_has_in_progress":3e3,"apac.errorcodes_web_require_email":3005,"apac.errorcodes_web_not_support_webinar_pac":3701,"apac.errorcodes_web_host_not_exit":3702,"apac.errorcodes_web_not_support_webclient":3603,"apac.errorcodes_web_should_support_webinar_with_latest_version":3604,"apac.errorcodes_web_invalid_id":3703,"apac.errorcodes_web_not_support_registration_webinar":3606,"apac.errorcodes_web_not_support_tsp":3608,"apac.errorcodes_web_not_allow_start_webinar_from_web":3609,"apac.errorcodes_need_use_zoom_desktop_or_mobile":3611,"apac.errorcodes_meeting_websdk_version_need_update":1e4},3001:{"apac.errorcodes_not_exist":3610},200:{"apac.errorcodes_pac_api_wrong":3704,"apac.errorcodes_pac_signature_expired":3705,"apac.errorcodes_pac_mn_wrong":3706,"apac.errorcodes_pac_mn_not_fount":3707,"apac.errorcodes_pac_role_error":3708,"apac.errorcodes_pac_host_not_found":3709,"apac.errorcodes_pac_api_disabled":3710,"apac.errorcodes_pac_cant_host_other_mn":3711,"apac.errorcodes_pac_invalid_signature":3712,"apac.errorcodes_pac_no_permission":3713},3099:{"apac.errorcodes_register":3099},3100:{"apac.errorcodes_login_required":3100},3003:{"apac.errorcodes_not_host":3003},3004:{"apac.errorcodes_wrong_pass":3004},3008:{"apac.errorcodes_not_start":3008},3129:{"apac.errorcodes_not_start":3008},3009:{"apac.errorcodes_be_removed":3009},3501:{"apac.errorcodes_login_required":3082},3502:{"apac.errorcodes_login_required":3082},3032:{"apac.errorcodes_denied_register_with_panelist":3100},3033:{"apac.errorcodes_denied_email":3620},3059:{"apac.errorcodes_not_support_simulive":3630},1001:{"apac.errorcodes_host_inactive":3625},3136:{"apac.errorcodes_zak":3623,"apac.errorcodes_host_email":3624,"apac.errorcodes_zak2":3265,"apac.errorcodes_require_host":3709},3082:{"apac.errorcodes_real_name":3082},403:{"apac.errorcodes_offline":403},404:{"apac.errorcodes_offline":403},4003:{"apac.invalid_parameter":4003},124:{"apac.errorcodes_tk_expired":3610}},Fn={3004:{"apac.errorcodes_pac_mn_wrong":3714},3005:{"apac.errorcodes_web_has_in_progress":3e3},3008:{"apac.errorcodes_not_start":3008},3027:{"apac.errorcodes_host_email_as_attendee":3627},3033:{"apac.errorcodes_denied_email":3620},1005:{"apac.errorcodes_no_response_from_web":3621},131005:{"apac.errorcodes_no_response_from_web":3621},1001:{"apac.errorcodes_host_inactive":3625},131001:{"apac.errorcodes_host_inactive":3625},131013:{"meeting ended":4004},103039:{"apac.errorcodes_be_removed":3009},6:{"meeting ended":4004},9:{"meeting is at capacity":4005},12:{"meeting locked":4006},103043:{"reject for information barriers":4007},103044:{"participant exist":4008}};let Hn;function Wn(e,t){const{key:r,value:o}=function(e,t){let r=!1;if(-1===e)return{key:"apac.errorcodes_offline",value:403};if(3e3===e){const o=["en-US","de-DE","es-ES","fr-FR","jp-JP","pt-PT","ru-RU","zh-CN","zh-TW","ko_KO","vi-VN","it-IT","id-ID","nl-NL","tr-TR","pl-PL"];let n={};if(Hn)n=Hn;else{const e=Object.keys(Bn[3e3]);o.forEach((t=>{const r=function(e){return"en-US"===e&&(e="default"),Rn[e]||Rn.default}(t);n[t]={},e.forEach((e=>{n[t][e]=r[e]}))})),Hn=n}return o.forEach((o=>{if(r)return;const i=_n(n[o],t);i&&(r={key:i,value:Bn[e][i]})})),r||(r={key:"apac.errorcodes_fail",value:Pn}),r}if(200===e){const o=_n({"apac.errorcodes_pac_api_wrong":"The api key is wrong.","apac.errorcodes_pac_signature_expired":"The signature has expired.","apac.errorcodes_pac_mn_wrong":"The meeting number is wrong.","apac.errorcodes_pac_mn_not_fount":"The meeting number is not found.","apac.errorcodes_pac_role_error":"The role is not applicable.","apac.errorcodes_pac_host_not_found":"The meeting host is not found.","apac.errorcodes_pac_api_disabled":"The account don't enable API.","apac.errorcodes_pac_cant_host_other_mn":"Can not be host in other account's meeting.","apac.errorcodes_pac_invalid_signature":"Invalid signature.","apac.errorcodes_pac_no_permission":"No permission"},t);return r=o?{key:o,value:Bn[e][o]}:{key:"apac.errorcodes_fail",value:Pn},r}if(void 0!==Bn[e]){const t=Bn[e],o=Object.keys(t)[0];r={key:o,value:t[o]}}if(r)return r;const o=_n(jn,e),n=xn[o];return n?{key:n,value:e}:{key:"apac.errorcodes_fail",value:Pn}}(e,t),n=Vn(r,r);return r!==n?{reason:n,errorCode:o}:{reason:kn[r],errorCode:o}}function $n(e){let t=!1;const r="number"==typeof e?e:e.body.res;if(void 0!==Fn[r]){const e=Fn[r],o=Object.keys(e)[0];t={key:o,value:e[o]}}if(t){const{key:r,value:o}=t,n=Vn(r,r);return r!==n?Object.assign({},e,{reason:n,errorCode:o}):Object.assign({},e,{reason:kn[r],errorCode:o})}const o=Wn(r);return Object.assign({},e,{reason:o.reason,errorCode:o.errorCode})}const Gn=["bLock","bHoldUponEntry","viewOnly","listenOnlyPhone","bAllowRaiseHand","bAllowAttendeeRename","bBroadcast","bAllowPlayChimeForEnterOrExit","bIbDisableShare","bIbDisableChat","encryptKey","bNoHostTimeOut","bAllowShowCount","bHasAST","bHasRMC","gatewayKey","encryptKey"],zn={bChime:"bAllowPlayChimeForEnterOrExit",bHasAST:"hasAst",bHasRMC:"hasRmc",topic:e=>({meetingTopic:gn(e)}),gatewayKey:e=>{const[,t,r]=e.split(".");return t&&r?{gatewayUser:{userId:Number(t),sn:r}}:{}},encryptKey:e=>({gcmSessinKey:bn(e)})},Kn=_r("GET_MEETING_INFO"),qn=_r("GET_INSTANT_MEETING_INFO");_r("LOGON_ZOOM_DOMAIN"),_r("VERIFY_ZOOM_RECAPTCHA"),_r("LOGON_THIRD_PARTY_DOMAIN");const Jn=_r("PING_RWC_SERVER"),Qn=_r("MEETING_FAILOVER"),Zn=_r("LEAVE_MEETING"),Yn=_r("END_MEETING");_r("REGISTER_WEBINAR");const Xn=_r("TRIGGER_IDLE_CHECK"),{setMeetingInfo:ei,setWindownOpen:ti,setAppidSignature:ri,setZtk:oi,setZsk:ni,setTkMtkguid:ii,setPingRwcTimestamp:si,setInMeetingInfo:ai,setMeetingAttribute:ui,resetMeeting:di,setIsHost:ci,setIsCohost:li,setMeetingIsOnHold:pi,setIsMeetingReset:hi,setAudioVideoBeforeOnHold:fi,setCurrentUserAudioBeforeReset:mi,setIsCurrentUserMutedBeforeReset:gi,setMeetingStatus:vi,setMeetingRegion:yi,setIsCurrentUserStartVideoBeforeReset:bi,setJoinMeetingTimeStamp:Si,setIsEnableQos:_i,setActiveAppInfo:Ei,setMeetingIdleStartTime:Ii,setSessionIdleTimeoutMinutes:Ai,setIsAudioBridgeEnabled:wi,addDiscardedRwcHost:Ci,setSharePronounType:Ti,setIsStayAwakeDuringTheSession:Oi,setMeetingJoinSuccessTimestamp:Ri,resetFailoverRecord:ki,setFailoverReason:Di,setIsQuicklyLeaveMeetingAfterRefresh:Pi}=Fr({SET_MEETING_INFO:e=>e,SET_WINDOWN_OPEN:e=>e,SET_APPID_SIGNATURE:e=>e,SET_ZTK:e=>e,SET_ZSK:e=>e,SET_TK_MTKGUID:e=>e,SET_PING_RWC_TIMESTAMP:e=>e,SET_IN_MEETING_INFO:e=>e,SET_MEETING_ATTRIBUTE:e=>{if(Gn.some((t=>e&&void 0!==e[t]))){let t=e;return Object.keys(zn).some((t=>void 0!==e[t]))&&(t=Object.keys(e).reduce(((t,r)=>{const o=zn[r];return"function"==typeof o?Object.assign(t,o(e[r])):"string"==typeof o?t[o]=e[r]:(t[r],e[r]),t}),{})),t}return{}},SET_IS_HOST:e=>e&&e.bHost,SET_IS_COHOST:e=>e&&e.bCoHost,RESET_MEETING:e=>e,SET_MEETING_IS_ON_HOLD:e=>e,SET_IS_MEETING_RESET:e=>e,SET_AUDIO_VIDEO_BEFORE_ON_HOLD:e=>e,SET_CURRENT_USER_AUDIO_BEFORE_RESET:e=>e,SET_IS_CURRENT_USER_MUTED_BEFORE_RESET:e=>e,SET_MEETING_STATUS:e=>e,SET_MEETING_REGION:e=>e,SET_IS_CURRENT_USER_START_VIDEO_BEFORE_RESET:e=>e,SET_JOIN_MEETING_TIME_STAMP:e=>e,SET_IS_ENABLE_QOS:e=>e,SET_ACTIVE_APP_INFO:e=>e,SET_MEETING_IDLE_START_TIME:e=>e,SET_SESSION_IDLE_TIMEOUT_MINUTES:e=>e,SET_IS_AUDIO_BRIDGE_ENABLED:e=>e,ADD_DISCARDED_RWC_HOST:e=>e,SET_SHARE_PRONOUN_TYPE:e=>e,SET_IS_STAY_AWAKE_DURING_THE_SESSION:e=>e,SET_MEETING_JOIN_SUCCESS_TIMESTAMP:e=>e,RESET_FAILOVER_RECORD:e=>e,SET_FAILOVER_REASON:e=>e,SET_IS_QUICKLY_LEAVE_MEETING_AFTER_REFRESH:e=>e});let Mi=function(e){return e.Failover="failover",e.OnHold="on hold",e.Promote="promote",e.Depromote="depromote",e.JoinBreakoutRoom="join breakout room",e.MoveToBreakoutRoom="move to breakout room",e.BackToMainSession="back to main session",e}({});const Ni="js_media.min.js",Li="1503_js_media.min.js";let Vi=function(e){return e.CDN="CDN",e.Global="Global",e.CN="CN",e}({}),Ui=function(e){return e.Connected="Connected",e.Reconnecting="Reconnecting",e.Closed="Closed",e.Fail="Fail",e}({}),ji=function(e){return e.Initial="initial",e.Joined="joined",e.Closed="closed",e}({}),xi=function(e){return e.AudioBridgeEnable="M:1,2;V:1,2",e.AudioDecodeInWorklet="M:6;V:3",e}({}),Bi=function(e){return e[e.NormalCase=-1]="NormalCase",e[e.NoHeartbeat=0]="NoHeartbeat",e[e.NoHeartbeatMChannel=1]="NoHeartbeatMChannel",e[e.NetworkChange=2]="NetworkChange",e[e.NotifyUiFailover=3]="NotifyUiFailover",e[e.InvalidParameters=4]="InvalidParameters",e[e.OnError=5]="OnError",e[e.OnErrorMChannel=6]="OnErrorMChannel",e[e.Disconnect=7]="Disconnect",e[e.DisconnectMChannel=8]="DisconnectMChannel",e[e.DisconnectXmpp=9]="DisconnectXmpp",e[e.RefreshPage=10]="RefreshPage",e}({}),Fi=function(e){return e.LocalStorage="LocalStorage",e.SessionStorage="SessionStorage",e.Memory="Memory",e}({});const Hi=mn("{}");class Wi{constructor(e){this.sessionStorageKey=void 0,this.localStorageKey=void 0,this.sessionCache=void 0,this.localCache=void 0,this.memoryCache=void 0,this.sessionStorageKey=mn(`zoom-storage-${e}`),this.localStorageKey=mn("zoom-local-storage"),this.memoryCache={};try{this.sessionCache=JSON.parse(gn(sessionStorage.getItem(this.sessionStorageKey)||Hi)),this.localCache=JSON.parse(gn(localStorage.getItem(this.localStorageKey)||Hi))}catch(e){console.error(e),this.sessionCache={},this.localCache={}}}static init(e){this.instance=new Wi(e)}static get(e){if(void 0===this.instance)throw new Error("read before initial");return this.instance.getValue(e).value}static set(e,t,r){if(void 0===this.instance)throw new Error("set before initial");return this.instance.setValue(e,t,r)}static remove(e){if(void 0===this.instance)throw new Error("remove before initial");return this.instance.removeValue(e)}static clearSession(){if(void 0===this.instance)throw new Error("clear before initial");return this.instance.memoryCache={},this.instance.sessionCache={},this.instance.localCache={},sessionStorage.removeItem(this.instance.sessionStorageKey)}getValue(e){return this.sessionCache.hasOwnProperty(e)?{value:this.sessionCache[e],type:Fi.SessionStorage}:this.localCache.hasOwnProperty(e)?{value:this.localCache[e],type:Fi.LocalStorage}:{value:this.memoryCache[e],type:Fi.Memory}}setValue(e,t,r){if(!e)throw new Error("key is null");switch(r){case Fi.SessionStorage:{const r=this.sessionCache[e];let o=t;return"function"==typeof t&&(o=t(r)),r!==o&&(this.sessionCache[e]=o,this.flushValue(Fi.SessionStorage)),o}case Fi.LocalStorage:{const r=this.localCache[e];let o=t;return"function"==typeof t&&(o=t(r)),r!==o&&(this.localCache[e]=o,this.flushValue(Fi.LocalStorage)),o}case Fi.Memory:{const r=this.memoryCache[e];let o=t;return"function"==typeof t&&(o=t(r)),this.memoryCache[e]=o,o}default:return null}}removeValue(e){const{type:t}=this.getValue(e);switch(t){case Fi.SessionStorage:delete this.sessionCache[e],this.flushValue(Fi.SessionStorage);break;case Fi.LocalStorage:delete this.localCache[e],this.flushValue(Fi.LocalStorage);break;case Fi.Memory:delete this.memoryCache[e]}}flushValue(e){e===Fi.SessionStorage?sessionStorage.setItem(this.sessionStorageKey,mn(JSON.stringify(this.sessionCache))):e===Fi.LocalStorage&&localStorage.setItem(this.localStorageKey,mn(JSON.stringify(this.localCache)))}}function $i(){const e=navigator.userAgent;let t,r=e.match(/(opera|chrome|safari|firefox|msie|trident(?=\/))\/?\s*(\d+)/i)||[];return/trident/i.test(r[1])?(t=/\brv[ :]+(\d+)/g.exec(e)||[],`IE ${t[1]||""}`):"Chrome"===r[1]&&(t=e.match(/\b(OPR|Edge)\/(\d+)/),t&&t.length)?t.slice(1).join(" ").replace("OPR","Opera"):(r=r[2]?[r[1],r[2]]:[navigator.appName,navigator.appVersion,"-?"],(t=e.match(/version\/(\d+)/i))&&r.splice(1,1,t[1]),Zi()&&(r[0]="ios-safari"),r.join(""))}function Gi(){return Zi()?"iOS/iPadOS"+function(){var e,t;const r=null===(e=navigator.userAgent.toLowerCase().match(/os (.*?) like mac os/))||void 0===e?void 0:e[1];return(null==r||null===(t=r.match(/^\d+/))||void 0===t?void 0:t[0])||"0"}():es()?"Android"+function(){var e,t;const r=null===(e=navigator.userAgent.toLowerCase().match(/android (.*?);/))||void 0===e?void 0:e[1];return(null==r||null===(t=r.match(/^\d+/))||void 0===t?void 0:t[0])||"0"}():null}function zi(){const e=navigator.userAgent.toLowerCase();return!/opera|opr\/[\d]+/.test(e)&&/(msie|trident)/.test(e)}Wi.instance=void 0;const Ki=()=>/edge\/(\d+)/i.test(navigator.userAgent),qi=()=>/firefox/i.test(navigator.userAgent),Ji=()=>/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Qi=()=>{const{userAgent:e}=navigator;return!/opera|opr\/[\d]+/i.test(navigator.userAgent)&&!Ki()&&/chrome/i.test(e)&&/webkit/i.test(e)},Zi=()=>{const{userAgent:e}=navigator;return/iPad|iPhone|iPod/i.test(e)||/MacIntel/i.test(navigator.platform)&&(null===(t=navigator)||void 0===t?void 0:t.maxTouchPoints)>2;var t},Yi=()=>/arm/i.test(navigator.userAgent),Xi=()=>/\bCrOS\b/.test(navigator.userAgent);function es(){return/android/i.test(navigator.userAgent)}function ts(){return es()||Zi()}const rs=new class{constructor(){this.value=void 0}get isSupported(){if(void 0===this.value)if("function"==typeof window.OffscreenCanvas){const e=new OffscreenCanvas(1,1);e.addEventListener("webglcontextlost",(e=>{e.preventDefault()})),this.value=!!e.getContext("webgl")}else this.value=!1;return this.value}};function os(){return rs.isSupported}function ns(){return"object"==typeof WebAssembly&&"function"==typeof Worker}const is=()=>"function"==typeof AudioWorklet,ss=()=>zi(),as=()=>{var e;return os()&&(null===(e=navigator)||void 0===e?void 0:e.hardwareConcurrency)>=4&&"function"==typeof requestAnimationFrame&&"function"==typeof SharedArrayBuffer};function us(){return"function"==typeof window.MediaStreamTrackProcessor}const ds=e=>{var t;if(!as()){const t=Ji()||Zi(),r="function"!=typeof window.SharedArrayBuffer&&(!!t||us()&&os());return e&&r?4:1}return ts()?4:Xi()&&Yi()||Xi()&&!Yi()?navigator.hardwareConcurrency>=4?9:4:(null===(t=navigator)||void 0===t?void 0:t.hardwareConcurrency)<4?9:25};function cs(){var e;return"webkit"in window&&!("chrome"in window)&&!(null===(e=window.webkit.messageHandlers)||void 0===e||!e.jsOCHelper)}function ls(){var e;let t;var r,o,n,i;return Zi()?(t=Number(null===(r=Gi())||void 0===r||null===(o=r.match(/\d+$/))||void 0===o?void 0:o[0]),t>=15):es()?(t=Number(null===(n=Gi())||void 0===n||null===(i=n.match(/\d+$/))||void 0===i?void 0:i[0]),t>=10):(t=Number(null===(e=$i().match(/\d+$/))||void 0===e?void 0:e[0]),!!(Qi()&&t>=69||Ji()&&t>14||qi()&&t>=76||Ki()&&t>=79))}let ps=function(e){return e.VIDEO_ENCODE="0",e.VIDEO_DECODE="1",e.AUDIO_ENCODE="2",e.AUDIO_DECODE="3",e.SHARING_ENCODE="4",e.SHARING_DECODE="5",e}({}),hs=function(e){return e[e.NONE=0]="NONE",e[e.AES_256=1]="AES_256",e[e.AES_GCM=2]="AES_GCM",e}({});const fs=Object.freeze({RWG_CHAT:{gcmType:1,sessionType:"RWG_CHAT"},XMPP_CHAT:{gcmType:1,sessionType:"XMPP_CHAT"},CC_MESSAGE:{gcmType:3,sessionType:"CC_MESSAGE"},BO_BROADCAST:{gcmType:1,sessionType:"BO_BROADCAST"}});let ms=function(e){return e.WebclientOpt="WEB_CLIENT_OPT",e.WebclientWebinarToken="WEB_CLIENT_WEBINAR_TOKEN",e.WebclientMeetingToken="WEB_CLIENT_MEETING_TOKEN",e.WebclientZtk="WEB_CLIENT_ZTK",e.WebclientZsk="WEB_CLIENT_ZSK",e.WebclientTk="WEB_CLIENT_TK",e.WebclientIVState="WEB_CLIENT_IV_STATE",e.WebclientIsOnHold="WEB_CLIENT_IS_ON_HOLD",e.WebclientParticipantId="WEB_CLIENT_PARTICIPANT_ID",e.WebclientZoomId="WEB_CLIENT_ZOOM_ID",e.WebclientUserName="WEB_CLIENT_USER_NAME",e.WebclientUserEmail="WEB_CLIENT_USER_EMAIL",e.WebclientBreakoutRoomAttendeeStatus="WEB_CLIENT_BO_ATTENDEE_STATUS",e.WebclientBreakoutRoomCommand="WEB_CLIENT_BO_COMMAND",e.WebclientAudioEncryptKey="WEB_CLIENT_AUDIO_ENCRYPT_KEY",e.WebclientVideoEncryptKey="WEB_CLIENT_VIDEO_ENCRYPT_KEY",e.WebclientSharingEncryptKey="WEB_CLIENT_SHARING_ENCRYPT_KEY",e.WebclientFailoverCount="WEB_CLIENT_FAILOVER_COUNT",e}({}),gs=function(e){return e.WebclientDeviceId="WEBCLIENT_DEVICE_ID",e.VSDKLogTrackingId="ZM_VSDK_LOG_TRACKING_IDS",e}({});const vs=(window.crypto||window.msCrypto).subtle,ys=ms.WebclientIVState,bs=Object.keys(fs).map((e=>fs[e].sessionType));class Ss{constructor(e,t,r){this.isGCMEnabled=void 0,this.gcmSessionKey=void 0,this.gcmMainSessionKey=void 0,this.zoomId=void 0,this.resetParameters(e,t,r),Wi.set(ys,{},Fi.SessionStorage)}static init(e,t,r){this.instance?this.instance.resetParameters(e,t,r):this.instance=new Ss(e,t,r)}static destroy(){this.instance&&(this.instance=void 0)}resetParameters(e,t,r){this.isGCMEnabled=!(zi()||!ns())&&r===hs.AES_GCM,this.gcmSessionKey=bn(t),this.gcmMainSessionKey||(this.gcmMainSessionKey=this.gcmSessionKey),this.zoomId=String(e)}beginCrypto(e,t,r){const o=new Uint32Array(1);o[0]=9,o[0]+=Number(r);const n=new Uint8Array(o.buffer);let i=new Uint8Array(132);const s=bn(t);return i.set(s,0),i.set(n,s.length),i=i.subarray(0,s.length+4),vs.importKey("raw",e,{name:"HMAC",hash:"SHA-256"},!0,["sign"]).then((e=>vs.sign({name:"HMAC"},e,i))).then((e=>vs.importKey("raw",e,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"])))}getNextIV(e){const t=Wi.get(ys);return void 0===t[e]?(t[e]=0,Wi.set(ys,t,Fi.SessionStorage)):Wi.set(ys,(t=>({...t,[e]:t[e]+1})),Fi.SessionStorage)}resetIVState(){const e=Wi.get(ys);if(void 0===e);else{const t=Object.keys(e).filter((e=>bs.indexOf(e)>-1));t.length>0&&(t.forEach((t=>{e[t]+=1e6})),Wi.set(ys,e,Fi.SessionStorage))}}static resetIV(){if(void 0===this.instance)throw new Error("reset before intialize");this.instance.resetIVState()}static beginEncrypt(e){let{text:t,type:r}=e;const o=new Uint8Array(0);if(this.instance&&this.instance.isGCMEnabled){const e=16,n=this.instance.getNextIV(r.sessionType),i=new ArrayBuffer(16),s=new Uint8Array(i);new DataView(i).setUint32(0,n,!0);let a=null;return a="BO_BROADCAST"===r.sessionType||"XMPP_CHAT"===r.sessionType?this.instance.gcmMainSessionKey:this.instance.gcmSessionKey,this.instance.beginCrypto(a,this.instance.zoomId,r.gcmType).then((r=>{const n=(new TextEncoder).encode(t);return vs.encrypt({name:"AES-GCM",iv:s,additionalData:o,tagLength:8*e},r,n)})).then((t=>{const r=1+s.byteLength+2+o.byteLength+4+t.byteLength,n=new ArrayBuffer(r);new Uint8Array(n)[0]=s.length,new Uint8Array(n,1,s.byteLength).set(s),new DataView(n).setUint16(1+s.byteLength,o.length,!0),new Uint8Array(n,3+s.byteLength).set(o),new DataView(n).setUint32(1+s.byteLength+2+o.byteLength,t.byteLength-e,!0),new Uint8Array(n,1+s.byteLength+2+o.byteLength+4).set(new Uint8Array(t));const i=new Uint8Array(n).reduce(((e,t)=>e+String.fromCharCode(t)),"");return window.btoa(i).replace(/_/g,"/").replace(/-/g,"+").replace(/\=/g,"")}))}return Promise.resolve(mn(t))}static beginDecrypt(e){let{decryptedText:t,type:r,zoomId:o}=e;if(this.instance&&this.instance.isGCMEnabled){const e=function(e){let t;const r=e.length,o=new Array(r);for(t=0;t{const t=function(e,t){e=new Uint8Array(e),t=new Uint8Array(t);const r=new Uint8Array(e.length+t.length);return r.set(e),r.set(t,e.length),r}(l,p);return vs.decrypt({name:"AES-GCM",iv:i,additionalData:u,tagLength:8*p.length},e,t.buffer)})).then((e=>({message:(new TextDecoder).decode(e),iv:i,aad:u}))).catch((e=>({message:"[This is an encrypted message]",iv:i,aad:u})))}{const e=new TextDecoder("utf-8");return Promise.resolve({message:e.decode(bn(t))})}}}Ss.instance=void 0;const _s=20225,Es=20234,Is=7937,As=7938,ws=12039,Cs=16138,Ts=4098,Os=4305;let Rs=function(e){return e[e.NoAttendee=0]="NoAttendee",e[e.All=1]="All",e[e.AllPanelist=2]="AllPanelist",e[e.Host=3]="Host",e[e.NoOne=4]="NoOne",e[e.EveryonePublicly=5]="EveryonePublicly",e}({}),ks=function(e){return e[e.AllPanelist=1]="AllPanelist",e[e.Everyone=2]="Everyone",e[e.Invalid=0]="Invalid",e}({}),Ds=function(e){return e[e.All=0]="All",e[e.Panelist=1]="Panelist",e[e.IndividualCcPanelist=2]="IndividualCcPanelist",e[e.Individual=3]="Individual",e[e.SilentModeUsers=4]="SilentModeUsers",e}({}),Ps=function(e){return e[e.None=0]="None",e[e.Delete=1]="Delete",e[e.Modify=2]="Modify",e}({}),Ms=function(e){return e[e.Success=0]="Success",e[e.Delete=1]="Delete",e[e.Block=3]="Block",e}({});const Ns=[Rs.All,Rs.Host,Rs.NoOne,Rs.EveryonePublicly],Ls=[Rs.NoOne,Rs.All,Rs.AllPanelist],Vs={AllPanelist:11,Everyone:12},Us={[Vs.AllPanelist]:ks.AllPanelist,[Vs.Everyone]:ks.Everyone},js={userId:Ds.All,displayName:"Everyone",isHost:!1,isCoHost:!1},xs={userId:Ds.Panelist,displayName:"All panelists"},Bs={userId:Ds.SilentModeUsers,displayName:"Everyone (in Waiting Room)",isHost:!1,isCoHost:!1};let Fs=function(e){return e.Open="open",e.Message="message",e.Error="error",e.Close="close",e}({});class Hs{constructor(){this.eventHandlers=void 0,this.websocket=void 0,this.seq=void 0,this.intervalsToBeCleardWhenSocketClose=[],this.heartBeatInterval=6e4,this.eventHandlers=new Map,this.websocket=null,this.seq=1}on(e,t){let r=this.eventHandlers.get(e);r||(r=[]),r.push(t),this.eventHandlers.set(e,r)}off(e,t){const r=this.eventHandlers.get(e);if(r){const o=r.filter((e=>e!==t));this.eventHandlers.set(e,o)}}emit(e,t){const r=this.eventHandlers.get(e);r&&r instanceof Array&&r.slice(0).forEach((e=>{try{e(t)}catch(e){console.error(e)}}))}sendMessageToRwg(e){this.seq+=1;const t=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify(Object.assign(e,{seq:t}))),t}connect(e){this.websocket=new WebSocket(e),this.websocket.binaryType="arraybuffer",this.addWebSocketEventListeners()}close(){var e;null===(e=this.websocket)||void 0===e||e.close()}addHeartBeat(){const e=setInterval((()=>{this.sendMessageToRwg({evt:0})}),this.heartBeatInterval);this.intervalsToBeCleardWhenSocketClose.push(e)}clearIntervals(){this.intervalsToBeCleardWhenSocketClose.forEach((e=>clearInterval(e)))}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",(e=>{this.addHeartBeat(),this.emit("open",e)})),this.websocket.addEventListener("message",(e=>{this.emit("message",e)})),this.websocket.addEventListener("close",(e=>{this.clearIntervals(),this.emit("close",e)})),this.websocket.addEventListener("error",(e=>{this.emit("error",e)})))}joinMeeting(e){return{seq:this.sendMessageToRwg({evt:4097,body:{meetingtoken:e}})}}lockMeeting(e){return{seq:this.sendMessageToRwg({evt:4099,body:{bLock:e}})}}endMeeting(){return{seq:this.sendMessageToRwg({evt:4101,body:{}})}}leaveMeeting(){return{seq:this.sendMessageToRwg({evt:4103,body:{}})}}recordMeeting(e,t){return{seq:this.sendMessageToRwg({evt:4105,body:{bRecord:e,bPause:t}})}}summaryMeeting(e){return{seq:this.sendMessageToRwg({evt:8009,body:{type:e?"start":"stop"}})}}allowSelfRecord(e){return{seq:this.sendMessageToRwg({evt:4325,body:{bAllowISORecord:e}})}}enableZoomIQRecord(e){return{seq:this.sendMessageToRwg({evt:4318,body:{check:e}})}}expel(e){return{seq:this.sendMessageToRwg({evt:4107,body:{id:e}})}}expelAttendee(e){return{seq:this.sendMessageToRwg({evt:4205,body:{jid:e}})}}rename(e,t,r){return{seq:this.sendMessageToRwg({evt:4109,body:{id:e,dn2:t,olddn2:r}})}}assignHost(e,t){return{seq:this.sendMessageToRwg({evt:4111,body:{id:e,bCoHost:t}})}}reclaimHost(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return{seq:this.sendMessageToRwg({evt:4133,body:{id:e,bCoHost:t}})}}revokeCoHost(e){return{seq:this.sendMessageToRwg({evt:4195,body:{id:e}})}}putOnHold(e,t){return{seq:this.sendMessageToRwg({evt:4113,body:{id:e,bHold:t}})}}setMuteOnEntry(e){return{seq:this.sendMessageToRwg({evt:4115,body:{bOn:e}})}}setHoldOnEntry(e){return{seq:this.sendMessageToRwg({evt:4117,body:{bOn:e}})}}inviteCRCDevice(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2;return{seq:this.sendMessageToRwg({evt:4119,body:{ip:e,type:t,encrypt:r}})}}cancelInviteCRCDevice(e){return{seq:this.sendMessageToRwg({evt:4121,body:{transID:e}})}}sendCloseCaption(e){return{seq:this.sendMessageToRwg({evt:4125,body:{...e}})}}allowViewParticipantNumber(e){return{seq:this.sendMessageToRwg({evt:4127,body:{bOn:e}})}}lowerAllHands(){return{seq:this.sendMessageToRwg({evt:4129,body:{}})}}raiseLowerHand(e,t){return{seq:this.sendMessageToRwg({evt:4131,body:{id:e,bOn:t}})}}chat(e,t,r,o){const n={text:e,destNodeID:t};return r&&Object.assign(n,{sn:r}),o&&Object.assign(n,{attendeeNodeID:o}),{seq:this.sendMessageToRwg({evt:4135,body:n})}}assignCC(e,t){return{seq:this.sendMessageToRwg({evt:4137,body:{id:e,bCCEditor:t}})}}enableLT(e){return{seq:this.sendMessageToRwg({evt:4227,body:{op:e?2:4}})}}enableNewLLT(){return{seq:this.sendMessageToRwg({evt:4285})}}disableCaptions(e){return{seq:this.sendMessageToRwg({evt:Os,body:{type:4,disableNewLtt:e}})}}enableManualCaption(e){return{seq:this.sendMessageToRwg({evt:4291,body:{op:e?1:0}})}}setTranslationLanguage(e){return void 0!==e?{seq:this.sendMessageToRwg({evt:Os,body:{type:1,lang:e}})}:{seq:this.sendMessageToRwg({evt:Os,body:{type:3}})}}setSpokenLanguage(e){return{seq:this.sendMessageToRwg({evt:4287,body:{lang:e}})}}allowAskLT(e){return{seq:this.sendMessageToRwg({evt:4263,body:{bAnonymous:e}})}}approveLT(){return{seq:this.sendMessageToRwg({evt:4262,body:{bApproved:!0}})}}askLT(e){return{seq:this.sendMessageToRwg({evt:4261,body:{bAnonymous:e}})}}setChatPriviledge(e){return{seq:this.sendMessageToRwg({evt:4141,body:{chatPriviledge:e}})}}setPanelistChatPrivilege(e){if(!Object.values(Vs).includes(e))throw Error("Invalid panelist chat privilege req value");return{seq:this.sendMessageToRwg({evt:4141,body:{chatPriviledge:e}})}}sendFeedback(e){return{seq:this.sendMessageToRwg({evt:4143,body:{feedback:e}})}}clearFeedback(){return{seq:this.sendMessageToRwg({evt:4145,body:{}})}}allowUnmuteVideo(e){return{seq:this.sendMessageToRwg({evt:4147,body:{bOn:e}})}}allowUnmuteAudio(e){return{seq:this.sendMessageToRwg({evt:4149,body:{bOn:e}})}}allowRaiseHand(e){return{seq:this.sendMessageToRwg({evt:4151,body:{bOn:e}})}}boToken(e){return{seq:this.sendMessageToRwg({evt:4173,body:{topic:e}})}}startBO(e){return{seq:this.sendMessageToRwg({evt:4175,body:{proto:e}})}}stopBO(e){return{seq:this.sendMessageToRwg({evt:4177,body:{status:e}})}}assignToBO(e,t){return{seq:this.sendMessageToRwg({evt:4179,body:{targetID:e,targetBID:t}})}}switchBO(e,t){return{seq:this.sendMessageToRwg({evt:4181,body:{targetID:e,targetBID:t}})}}wantJoinBO(e,t){return{seq:this.sendMessageToRwg({evt:4183,body:{targetID:e,targetBID:t}})}}joinBO(e){return{seq:this.sendMessageToRwg({evt:4193,body:{targetBID:e}})}}leaveBO(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{seq:this.sendMessageToRwg({evt:4185,body:{reason:e}})}}broadcastBO(e){return{seq:this.sendMessageToRwg({evt:4187,body:{textContent:e}})}}askForHelpBO(e){return{seq:this.sendMessageToRwg({evt:4189,body:{targetID:e}})}}askForHelpResultBO(e,t){return{seq:this.sendMessageToRwg({evt:4191,body:{targetID:e,helpResult:t}})}}allowParticipantRename(e){return{seq:this.sendMessageToRwg({evt:4163,body:{bOn:e}})}}allowMessageFeedbackNotify(e,t){return{seq:this.sendMessageToRwg({evt:4171,body:{bOn:e,id:t}})}}setPlayChime(e,t){return{seq:this.sendMessageToRwg({evt:4197,body:{bOn:e,id:t}})}}admitAllSilentUsers(){return{seq:this.sendMessageToRwg({evt:4199,body:{}})}}bindTeleUser(e,t,r){return{seq:this.sendMessageToRwg({evt:4201,body:{teleUserID:e,targetUserID:t,bBind:r}})}}practiceSession(){return{seq:this.sendMessageToRwg({evt:4207,body:null})}}roleChangeWebinar(e,t,r,o){return{seq:this.sendMessageToRwg({evt:4209,body:{jid:t,userID:r,clientCap:o,bPromote:e}})}}sendPromoteConsent(e,t){return{seq:this.sendMessageToRwg({evt:4254,body:{agreed:e,req_id:t}})}}batchCreateBOToken(e){const t=e.map(((e,t)=>({topic:e,index:t})));return{seq:this.sendMessageToRwg({evt:4211,body:t})}}mute(e,t){return{seq:this.sendMessageToRwg({evt:8193,body:{bMute:t,id:e}})}}audioDrop(e){return{seq:this.sendMessageToRwg({evt:8195,body:{id:e}})}}audioDialout(e,t,r,o,n){return{seq:this.sendMessageToRwg({evt:8197,body:{pn:e,dn2:mn(t),bCallme:r,bPressOne:o,bGreeting:n}})}}audioCancelDialout(e,t){return{seq:this.sendMessageToRwg({evt:8199,body:{pn:e,bCallme:t}})}}audioMuteAll(e){return{seq:this.sendMessageToRwg({evt:8201,body:{bMute:e}})}}allowToTalk(e,t){return{seq:this.sendMessageToRwg({evt:8204,body:{id:e,bAllowTalk:t}})}}subscribeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;return{seq:this.sendMessageToRwg({evt:12289,body:{id:e,size:t,bOn:r}})}}unsubscribeVideo(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{seq:this.sendMessageToRwg({evt:12291,body:{id:e}})}}muteAttendeeVideo(e,t){return{seq:this.sendMessageToRwg({evt:12297,body:{id:e,bOn:t}})}}notifyRwgIsMuteVideo(e,t){return this.muteAttendeeVideo(e,t)}pauseSharing(){return{seq:this.sendMessageToRwg({evt:16385,body:{}})}}resumeSharing(){return{seq:this.sendMessageToRwg({evt:16387,body:{}})}}allowAnonymousQuestion(e,t){return{seq:this.sendMessageToRwg({evt:4155,body:{userId:e,bOn:t}})}}allowViewAll(e,t){return{seq:this.sendMessageToRwg({evt:4157,body:{userId:e,bOn:t}})}}allowVote(e,t){return{seq:this.sendMessageToRwg({evt:4159,body:{userId:e,bOn:t}})}}allowComment(e,t){return{seq:this.sendMessageToRwg({evt:4161,body:{userId:e,bOn:t}})}}sharingRequestRemoteControl(e,t){return{seq:this.sendMessageToRwg({evt:16389,body:{id:e,bOn:t}})}}subscribeGrabRemoteControl(e,t){return{seq:this.sendMessageToRwg({evt:16393,body:{id:e,bOn:t}})}}subscribeSharing(e,t,r,o){const n={id:e,size:t};return r&&Object.assign(n,{bShareToBO:!0}),void 0!==o&&Object.assign(n,{bVideoShare:o}),{seq:this.sendMessageToRwg({evt:16415,body:n})}}unsubscribeSharing(e,t){const r={id:e};return t&&Object.assign(r,{bShareToBO:!0}),{seq:this.sendMessageToRwg({evt:16417,body:r})}}sendRWGConnectionPerformance(e){return{seq:this.sendMessageToRwg({evt:4167,body:{data:e}})}}sendSdkKeyToMonitor(e,t,r){return{seq:this.sendMessageToRwg({evt:4167,body:{data:`ZoomConferenceClient,videoapp_HTML5_sdk_web_join,${r},2,${t},${e}`}})}}sendDatachannelOffer(e){return{seq:this.sendMessageToRwg({evt:24321,offer:e})}}joinOrLeaveVoip(e){return{seq:this.sendMessageToRwg({evt:8203,body:{bOn:e}})}}startSharing(e,t){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,boOn:!1,...null!=t?t:{}}})}}stopSharing(e){return{seq:this.sendMessageToRwg({evt:16409,body:{id:e,bOn:!0}})}}lockSharing(e){return{seq:this.sendMessageToRwg({evt:4169,body:{lockShare:e}})}}startShareToBreakoutRoom(e){return{seq:this.sendMessageToRwg({evt:16425,body:{id:e,bShareToBO:!0}})}}stopShareToBreakoutRoom(e){return{seq:this.sendMessageToRwg({evt:16425,body:{id:e,bShareToBO:!1}})}}preAssignBreakoutRoom(){return{seq:this.sendMessageToRwg({evt:4213,body:{}})}}claimHost(e){return{seq:this.sendMessageToRwg({evt:4215,body:{hostKey:e}})}}allowMultiplePin(e,t){return{seq:this.sendMessageToRwg({evt:4217,body:{userID:e,bOn:t}})}}spotlightVideo(e,t){return{seq:this.sendMessageToRwg({evt:4219,body:{id:e,...t}})}}connectCamera(e,t){const r={evt:12307,body:{id:e,bOn:t}};return{seq:this.sendMessageToRwg(r)}}followHostLayout(e){return{seq:this.sendMessageToRwg({evt:4223,body:{bFollowHostVideo:e}})}}setVideoDragLayout(e){return{seq:this.sendMessageToRwg({evt:4218,body:{drag_list:e}})}}chatCmdReq(e,t){return{seq:this.sendMessageToRwg({evt:4237,body:{msgID:e,cmd:t}})}}activeAppLinkReq(e){return{seq:this.sendMessageToRwg({evt:4257,body:{appId:e}})}}activeAppInfoReq(){return{seq:this.sendMessageToRwg({evt:4255,body:{}})}}muteShareAudio(e){return{seq:this.sendMessageToRwg({evt:16423,body:{bOn:!0,bShareAudio:!e}})}}localMuteAudio(e,t){return{seq:this.sendMessageToRwg({evt:8209,body:{id:e,bMute:t}})}}changeSharePronoun(e,t){return{seq:this.sendMessageToRwg({evt:4264,body:{bPronoun:e,strPronoun:t}})}}sendReceivingSharingReady(e){return{seq:this.sendMessageToRwg({evt:16421,body:{ssrc:e}})}}sendManualCaption(e){return{seq:this.sendMessageToRwg({evt:4289,body:{...e}})}}sendPollingAction(e,t,r){return{seq:this.sendMessageToRwg({evt:4224,body:{action:e,PollingId:t,...r}})}}broadcastUserNetworkQuality(e){const t={type:e.isUplink,level:e.level,bwLevel:e.bwLevel};return{seq:this.sendMessageToRwg({evt:4331,body:t})}}sendFarEndCameraControl(e,t,r){return{seq:this.sendMessageToRwg({evt:4329,body:{cmd:e,userID:t,buttonID:r}})}}sendCameraAblity(e){return{seq:this.sendMessageToRwg({evt:4330,body:{...e,focus:!1}})}}sendReaction(e){return{seq:this.sendMessageToRwg({evt:4259,body:{...e}})}}}class Ws extends Hs{static createAgent(){return this.rwgInstance||(this.rwgInstance=new Ws),this.rwgInstance}}Ws.rwgInstance=null;class $s extends Hs{static getInstance(){return this.instance||(this.instance=new $s),this.instance}}$s.instance=null;const Gs=[{name:"audio_simd.min.js",category:"audio",type:"worker",tag:"simd",alias:"audioSIMDWorkletPath"},{name:"audio.simd.wasm",category:"audio",type:"wasm",tag:"simd",alias:"audioSIMDWasm"},{name:"js_audio_process.min.js",category:"audio",type:"worker",tag:"",alias:"audioWorkerPath"},{name:"audio.encode.wasm",category:"audio",type:"wasm",tag:"",alias:"audioWasm"},{name:"js_audio_worklet.min.js",category:"audio",type:"worklet",tag:"",alias:"audioWorkletPath"},{name:"js_audio_worklet_simd.min.js",category:"audio",type:"worklet",tag:"simd",alias:"audioWorkletSIMDPath"},{name:"js_audio_worklet_process.min.js",category:"audio",type:"worklet",tag:"",alias:"audioWorkletProcessPath"},{name:"js_sharing_audio_worklet.min.js",category:"audio",type:"worklet",tag:"",alias:"sharingAudioWorkletPath"},{name:"video_mtsimd.min.js",category:"video",type:"worker",tag:"simd,thread",alias:"videoMSIMDWorkerPath"},{name:"video.mtsimd.wasm",category:"video",type:"wasm",tag:"simd,thread",alias:"videoMSIMDWasm"},{name:"video_m.min.js",category:"video",type:"worker",tag:"thread",alias:"videoMtWorkerPath"},{name:"video.mt.wasm",category:"video",type:"wasm",tag:"thread",alias:"videoMtWasm"},{name:"video_simd.min.js",category:"video",type:"worker",tag:"simd",alias:"videoSIMDWorkerPath"},{name:"video.simd.wasm",category:"video",type:"wasm",tag:"simd",alias:"videoSIMDWasm"},{name:"video_s.min.js",category:"video",type:"worker",tag:"",alias:"videoWorkerPath"},{name:"video.decode.wasm",category:"video",type:"wasm",tag:"",alias:"videoWasm"},{name:"video_share_mtsimd.min.js",category:"video",type:"worker",tag:"simd,thread",alias:"vsmiworkerpath"},{name:"sharing_mtsimd.min.js",category:"sharing",type:"worker",tag:"simd,thread",alias:"sharingMSIMDWorkerPath"},{name:"sharing_m.min.js",category:"sharing",type:"worker",tag:"thread",alias:"sharingMtWorkerPath"},{name:"sharing_simd.min.js",category:"sharing",type:"worker",tag:"simd",alias:"sharingSIMDWorkerPath"},{name:"sharing_s.min.js",category:"sharing",type:"worker",tag:"",alias:"sharingWorkerPath"}],zs="1503";let Ks=function(e){return e.VideoEncode="0",e.VideoDecode="1",e.AudioEncode="2",e.AudioDecode="3",e.SharingEncode="4",e.SharingDecode="5",e}({});const qs=ms.WebclientIVState;class Js{static getInstance(){return void 0===this.agentInstance&&(this.agentInstance=new Js),this.agentInstance}constructor(){this.assetsPath=void 0,this.instance=void 0,this.callbackList=void 0,this.mediaWorkersPath=void 0,this.constraints=void 0,this.svcUrl=void 0,this.meetingNumber=void 0,this.confId=void 0,this.mediaSocketAddress=void 0,this.currentUserId=void 0,this.receivedSharingCanvas=void 0,this.sharingCanvas=void 0,this.mediaOptions=void 0,this.callbackList=[]}init(){if(!this.instance){const e={ivObj:{[ps.AUDIO_ENCODE]:Wi.get(qs)&&Wi.get(qs)[ps.AUDIO_ENCODE],[ps.VIDEO_ENCODE]:Wi.get(qs)&&Wi.get(qs)[ps.VIDEO_ENCODE],[ps.SHARING_ENCODE]:Wi.get(qs)&&Wi.get(qs)[ps.SHARING_ENCODE]}};this.instance=new JsMediaSDK_Instance(e),this.instance.setRWGAgent(Ws.createAgent())}}setAssetsAndConstraint(e,t,r,o){var n;this.assetsPath=e,this.constraints=t,this.mediaWorkersPath=((e,t)=>Gs.reduce(((r,o)=>{const{name:n,alias:i}=o;return Object.assign(r,{[`${i}`]:`${e}/${t&&zs?`${zs}_`:""}${n}`}),r}),{}))(this.assetsPath,!!r),this.onMediaSDKCallback=this.onMediaSDKCallback.bind(this),this.mediaOptions=o,null===(n=this.instance)||void 0===n||n.JsMediaSDK_PreLoad(this.mediaWorkersPath,this.onMediaSDKCallback,o)}onMediaSDKCallback(e,t){this.callbackList.length>0&&this.callbackList.forEach((r=>r(e,t)))}registerCallback(e){this.callbackList.push(e)}unregisterCallback(e){this.callbackList=this.callbackList.filter((t=>t!==e))}static isSupportVideoEncodeHardwareAcceleration(){return JsMediaSDK_Instance.util.IsSupportVideoEncodeHardwareAcceleration()}static isSupportVideoDecodeHardwareAcceleration(){return JsMediaSDK_Instance.util.IsSupportVideoDecodeHardwareAcceleration()}static isCompatibleHardwareForEncode(){return os()&&0==JsMediaSDK_Instance.util.AdapterWhiteListCheckForEncoder()}static getPTZCapability(){var e,t,r,o,n,i;return{pan:!(null===(e=JsMediaSDK_Instance.util)||void 0===e||null===(t=e.isSupportCameraPan)||void 0===t||!t.call(e)),tilt:!(null===(r=JsMediaSDK_Instance.util)||void 0===r||null===(o=r.isSupportCameraTilt)||void 0===o||!o.call(r)),zoom:!(null===(n=JsMediaSDK_Instance.util)||void 0===n||null===(i=n.isSupportCameraZoom)||void 0===i||!i.call(n))}}static isSupportVideoShare(){var e,t;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||null===(t=e.isSupportVideoShareReceive)||void 0===t||!t.call(e))}static isSupportVideoShareSend(){var e,t;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||null===(t=e.isSupportVideoShareSend)||void 0===t||!t.call(e))}static isSupportSending720P(){var e;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||!e.get720pcapacity())}static isSupportSubscribing1080P(){var e;return!(null===(e=JsMediaSDK_Instance.util)||void 0===e||!e.getsub1080pcapacity())}static isSupportOpenMicWhenShareAudio(){return!!JsMediaSDK_Instance.util.isSupportOpenMicWhenShareAudio()}static isSupportMediaPlaybackAsVideoInput(){var e;return!(null===(e=JsMediaSDK_Instance.util.videoToMediaStreamManager)||void 0===e||!e.isSupported())}static isSupportMediaPlaybackAsAudioInput(){var e;return!(null===(e=JsMediaSDK_Instance.util.audioToMediaStreamMananger)||void 0===e||!e.isSupported())}static isSupportAudioDenoise(){return!!JsMediaSDK_Instance.util.isSupportAudioDenoise()}connect(e){var t,r,o,n,i,s;let{svcUrl:a,meetingNumber:u,conId:d,e2eEncrypt:c,isViewOnly:l,currentUserId:p,isWebinar:h,enableAudioQos:f,enableVideoQos:m=!1,enableWebtransport:g=!1,webtransportPort:v}=e;this.svcUrl=a,this.meetingNumber=u,this.confId=d;const y=((e,t,r)=>({videoSocketAddress:`wss://${e}/wc/media/${t}?type=v&cid=${r}`,audioSocketAddress:`wss://${e}/wc/media/${t}?type=a&cid=${r}`,sharingSocketAddress:`wss://${e}/wc/media/${t}?type=${ss()?"j":"s"}&cid=${r}`}))(a,u,d);this.mediaSocketAddress=y,this.currentUserId=p;const b=ds(null===(t=this.mediaOptions)||void 0===t?void 0:t.enableMultiDecodeVideoWithoutSAB);var S,_,E,I,A,w,C,T,O;(null===(r=this.instance)||void 0===r||r.setPropsBeforeInit({callback:this.onMediaSDKCallback,audioWorkerPath:ns()?null===(o=this.mediaWorkersPath)||void 0===o?void 0:o.audioWorkletPath:void 0,e2eEncrypt:c,isEnableListenInitEvent:!0,enableWebtransport:g,webtransportPort:v}),!0===(null===(n=this.constraints)||void 0===n?void 0:n.audio)&&ns()&&!ts())&&((h||is())&&(null===(S=this.instance)||void 0===S||S.initAudioDecode(this.mediaWorkersPath,y.audioSocketAddress,p,ur,d,u,b,f)),!is()||h&&l||null===(_=this.instance)||void 0===_||_.initAudioEncode(this.mediaWorkersPath,y.audioSocketAddress,p,ur,d,u,b,f));!0===(null===(i=this.constraints)||void 0===i?void 0:i.video)&&ns()&&(null===(E=this.instance)||void 0===E||E.initVideoDecode(this.mediaWorkersPath,y.videoSocketAddress,p,ur,d,u,b,null===(I=null===(A=JsMediaSDK_Instance.util)||void 0===A?void 0:A.isGraphicShouldUseHardwareAccelerationDecode())||void 0===I||I,m),h&&l||null===(w=this.instance)||void 0===w||w.initVideoEncode(this.mediaWorkersPath,y.videoSocketAddress,p,ur,d,u,b,!1,m,!0,!0)),!0===(null===(s=this.constraints)||void 0===s?void 0:s.screen)&&(ns()?(null===(C=this.instance)||void 0===C||C.initSharingDecode(this.mediaWorkersPath,y.sharingSocketAddress,p,ur,d,u,b),h&&l||null===(T=this.instance)||void 0===T||T.initSharingEncode(this.mediaWorkersPath,y.sharingSocketAddress,p,ur,d,u,b)):null===(O=this.instance)||void 0===O||O.initSharingDecode(y.sharingSocketAddress))}destroy(){var e;null===(e=this.instance)||void 0===e||e.destroy(),this.instance=null,this.callbackList=[],[Ks.AudioDecode,Ks.AudioEncode,Ks.VideoDecode,Ks.VideoEncode].forEach((e=>{var t;null===(t=this.instance)||void 0===t||t.updateQosSubscription(!1,e)}))}disconnect(){var e,t;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(17,{}),null===(t=this.instance)||void 0===t||t.JsMediaSDK_UnInit()}muteAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(8,{ssrc:0})}unmuteAudio(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(7,{ssrc:0,AudioSelectValue:0})}joinComputerAudio(e,t,r,o,n,i,s){var a;const u=s?{...s,enableHID:!0}:{enableHID:!1};return null===(a=this.instance)||void 0===a?void 0:a.Notify_MeidaSDK(22,{CaptureAudio:o,CaptureAudioInfo:{ssrc:e,AudioSelectValue:"default"===t?null:t,...u},speakerInfo:{defaultDeviceId:r},denoiseSwitch:!!i,...n?{useAudioBridge:!0,audioBridge:n}:{}})}leaveComputerAudio(){var e;return null===(e=this.instance)||void 0===e?void 0:e.Notify_MeidaSDK(21,null)}joinSharingAudio(e){var t;let{ssrc:r,microphoneDeviceId:o,speakerDeviceId:n,isCaptureAudio:i}=e;return null===(t=this.instance)||void 0===t?void 0:t.Notify_MeidaSDK(72,{CaptureAudio:i,CaptureAudioInfo:{ssrc:r,AudioSelectValue:"default"===o?null:o},speakerInfo:{defaultDeviceId:n},checkAutoplay:!1})}leaveSharingAudio(e){var t;return null===(t=this.instance)||void 0===t?void 0:t.Notify_MeidaSDK(73,{isPause:e?1:0})}changeSpeaker(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(11,{ssrc:0,AudioSelectValue:e})}changeMicrophone(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(18,{ssrc:0,AudioSelectValue:"default"===e?null:e,microphoneLabel:null!=t?t:"default",defaultMuted:r})}restoreWebRTC(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(19,{ssrc:0,AudioSelectValue:"default"===e?null:e})}renderVideo(e,t,r,o,n,i,s,a,u,d,c){var l;null===(l=this.instance)||void 0===l||l.Notify_MeidaSDK(1,{userId:t,width:o,height:n,x:i,y:s,quality:a,isMyself:u,canvas:e,enableWaterMark:c,waterMarkText:d,zone:r})}stopRenderVideo(e,t,r,o){var n;let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(2,{canvas:e,userId:t,RGBA:o,doNotClean:i,zone:r})}startCaptureVideo(e,t,r,o,n,i){var s;let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6],u=arguments.length>8?arguments[8]:void 0;const d=(arguments.length>7?arguments[7]:void 0)?Js.getPTZCapability():void 0;null===(s=this.instance)||void 0===s||s.Notify_MeidaSDK(3,{ssid:e,width:r,height:o,fps:u,video:n,usingFacingMode:i,VideoSelectValue:"default"===t?null:t,disableOriginalRatio:a,...d})}stopCaptureVideo(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(4,{ssrc:0})}changeCamera(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(12,{VideoSelectValue:"default"===e?null:e,...t||{}})}switchCanvasForVideoCapture(e){var t;let r=e;Array.isArray(e)||(r=[e]),null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(25,r)}renderSharing(e,t){var r;let o=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"",i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];this.receivedSharingCanvas=t,null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(23,{width:0,height:0,ssrc:e,canvas:t,enableWaterMark:o,waterMarkText:n,isFromMainSession:i})}stopRenderSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(24,{})}switchSharingSource(e){var t;let r=arguments.length>1&&void 0!==arguments[1]&&arguments[1];null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(36,{ssrc:e,isFromMainSession:Number(r)})}ajustmentReceivedSharingCanvas(e,t){if(this.receivedSharingCanvas)try{this.receivedSharingCanvas.width=e,this.receivedSharingCanvas.height=t}catch(e){}}startRemoteControl(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(26,{socketURL:`wss://${this.svcUrl}`,meetingID:this.meetingNumber,condID:this.confId,os:t,dom:e,...r})}stopRemoteControl(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(28)}resendRemoteControlPositionPDU(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(41)}updateRemoteControlProperties(e){var t;const{dimension:r,...o}=e;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(27,{...r,...o})}startDesktopSharing(e,t,r,o){var n;let i=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],s=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0;this.sharingCanvas=document.querySelector(`#${t}`);let u={};o&&(u={share2ndCamera:!0,share2ndCameraParams:{VideoSelectValue:"default"===o.cameraId?null:o.cameraId,width:o.width,height:o.height}}),void 0!==s&&(u={...u,videoParams:{displaySurface:s}}),null===(n=this.instance)||void 0===n||n.Notify_MeidaSDK(30,{ssid:e,canvas:t,video:r,...u,showShareAudioOption:i,sourceId:a})}stopDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(31,{})}pauseDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(32,{})}resumeDesktopSharing(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(33,{})}selectLanguageChannelForNewLTT(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(57,{lang:e})}changeSharingSecondCamera(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(49,{VideoSelectValue:e})}ajustmentSharingCanvas(e,t){if(this.sharingCanvas)try{this.sharingCanvas.width=e,this.sharingCanvas.height=t}catch(e){}}checkChromeSharingExtension(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(34,{})}enableAudioEncode(){var e,t;null===(e=this.instance)||void 0===e||e.initAudioEncode(this.mediaWorkersPath,this.mediaSocketAddress.audioSocketAddress,this.currentUserId,ur,this.confId,this.meetingNumber,ds(null===(t=this.mediaOptions)||void 0===t?void 0:t.enableMultiDecodeVideoWithoutSAB))}sendUserNodeList(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(43,{userList:e,encryptKey:t})}updateRenderedSharingDimension(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(44,{width:e,height:t})}pauseOrResumeAudio(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(45,{bPause:e})}updateRenderedVideoCanvasDimension(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(46,{canvas:e,width:t,height:r})}clearVideoCanvas(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(47,{id:e,RGBA:t})}adjustRenderedVideoPosition(e,t,r,o,n,i,s,a){var u;null===(u=this.instance)||void 0===u||u.Notify_MeidaSDK(48,{userId:t,x:o,y:n,width:i,height:s,canvas:e,zone:r,RGBA:a})}mirrorVideo(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(75,{isMirrorMyVideo:e})}updateUserMediaSN(e){var t,r,o;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(80,{isFromMainSession:Number(e.isFromMainSession),mediaActionType:e.iVType,body:{add:null!==(r=e.added)&&void 0!==r?r:[],remove:null!==(o=e.removed)&&void 0!==o?o:[]}})}updateMediaParams(e){var t;const{iVType:r,isFromMainSession:o,updateParams:n}=e;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(81,{mediaActionType:r,isFromMainSession:Number(o),updateParams:n})}createMainSessionChannel(e,t){var r,o;"sharing"===e?null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(84,t):null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(85,t)}addReceivedSharingChannelType(e){var t;const{isFromMainSession:r,...o}=e;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(82,{isFromMainSession:Number(r),...o})}removeReceivedSharingChannelType(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(83,{isFromMainSession:Number(e.isFromMainSession),ssrc:e.ssrc})}enableHardwareAccelerationForVideoDecode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(70,{enable:e})}enableHardwareAccelerationForVideoEncode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(71,{enable:e})}setSharingAudioVolume(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(74,{userid:e>>10,shareVolume:t?0:100,isFromMainSession:r})}subscribeToQos(e,t){e.forEach((e=>{var r;null===(r=this.instance)||void 0===r||r.updateQosSubscription(!0,e,t)}))}unsubscribeFromQos(e){e.forEach((e=>{var t;null===(t=this.instance)||void 0===t||t.updateQosSubscription(!1,e)}))}passThroughRWGMessage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(40,e)}startVirtualBackgroundSetting(e,t,r,o,n,i){var s;let a=arguments.length>6&&void 0!==arguments[6]&&arguments[6];null===(s=this.instance)||void 0===s||s.Notify_MeidaSDK(91,{canvas:e,bgdom:t,width:n,height:i,ssid:r,VideoSelectValue:"default"===o?null:o,disableOriginalRatio:a})}updateVirtualBackgroundImage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(92,{bgdom:e})}stopVirtualBackgroundSetting(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(93,{isSwitch:t})}startMaskSetting(e,t,r,o,n,i,s,a,u){var d;null===(d=this.instance)||void 0===d||d.Notify_MeidaSDK(62,{canvas:e,maskdom:r,bgdom:t,dx:0,dy:0,dWidth:i,dHeight:s,width:a,height:u,ssid:o,VideoSelectValue:"default"===n?null:n})}updateMaskBackgroundImage(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(63,{bgdom:e})}updateMaskClip(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(64,{maskdom:e,dx:0,dy:0,dWidth:t,dHeight:r})}stopMaskSetting(){var e;let t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(65,{isSwitch:t})}enableVideoObserver(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(99,{enable:e})}enableShareAudioToBreakoutRoom(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(86,{enable:e})}sendUserAudioStatus(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(51,e)}muteOrUnmuteOtherAudio(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(50,{userId:e,volume:t?0:100})}adjustOtherAudioVolume(e,t){var r;null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(50,{userId:e,volume:t})}notifySDKMeetingReady(){var e;null===(e=this.instance)||void 0===e||e.Notify_MeidaSDK(113)}movePTZCamera(e){var t;return null===(t=JsMediaSDK_Instance.util)||void 0===t?void 0:t.queryPTZPermisson().then((t=>{var r;return t?(null===(r=this.instance)||void 0===r||r.Notify_MeidaSDK(53,e),Promise.resolve("")):Promise.reject("Cannot move camera without permission granted")}))}switchSharingMode(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(101,{mode:e})}updateVideoHDValue(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK("update_videohd_value",{videohd:e})}enableAudioDenoise(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(121,{switch:e})}enableSyncButtonsOnHeadset(e,t,r){var o;null===(o=this.instance)||void 0===o||o.Notify_MeidaSDK(100,{enable:e,microphoneLabel:t,defaultMuted:r})}stopAllIncomingAudio(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(123,e)}preInitAudioBridge(e){var t;null===(t=this.instance)||void 0===t||t.previewInit({audioBridge:{...e}})}prefetchVideoSsrc(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(110,{ssrc:e})}cancelPrefetchVideoSsrc(e){var t;null===(t=this.instance)||void 0===t||t.Notify_MeidaSDK(112,{ssrc:e,haddata:!1})}}Js.agentInstance=void 0;const Qs="ADD_CURRENT_USER_PARTICIPANT_ATTRIBUTE",Zs="UPDATE_CURRENT_USER_PARTICIPANT_ATTRIBUTE",Ys="ADD_USER_PARTICIPANT_ATTRIBUTE",Xs="UPDATE_USER_PARTICIPANT_ATTRIBUTE",ea="REMOVE_USER_PARTICIPANT_ATTRIBUTE",ta="UPDATE_WEBINAR_PARTICIPANT_ATTRIBUTE",ra="REMOVE_WEBINAR_ATTENDEE_ATTRIBUTE",oa="JOIN_MEETING_SUCCESS",na="JOIN_MEETING_FAILED",ia="RECONNECTING_MEETING",sa="LEAVING_MEETING",aa="MEETING_IN_WAITING_ROOM",ua="UPDATE_MEETING_ATTRIBUTE",da="SHARE_PRONOUN_TYPE_UPDATE";var ca=function(e){return e.ConnectionChange="connection-change",e.OnHoldChange="on-hold-change",e.UserAdd="user-added",e.UserUpdate="user-updated",e.UserRemove="user-removed",e.AttendeeUpdate="attendee-updated",e.MeetingAttributeUpdate="meeting-attribute-updated",e.PromoteAttendeeConsent="promote-attendee-consent",e.ActiveAppsUpdate="active-apps-updated",e.SharePronounTypeUpdate="share-pronoun-type-update",e}(ca||{});const la={JoinMeeting:{success:Qs,fail:[na]}},pa={[ca.ConnectionChange]:[{event:oa,payload:()=>({state:Ui.Connected})},{event:na,payload:e=>({state:Ui.Fail,...e})},{event:ia,payload:e=>({state:Ui.Reconnecting,...e})},{event:sa,payload:e=>({state:Ui.Closed,...e})}],[ca.OnHoldChange]:[{event:aa,payload:e=>({isOnHold:e})}],[ca.UserAdd]:[{event:Qs,payload:e=>[e]},{event:Ys,payload:e=>e}],[ca.UserUpdate]:[{event:Zs,payload:e=>[e]},{event:Xs,payload:e=>e}],[ca.UserRemove]:[{event:ea,payload:e=>e}],[ca.AttendeeUpdate]:[{event:ta,payload:e=>e},{event:ra,payload:e=>e}],[ca.MeetingAttributeUpdate]:[{event:ua,payload:e=>"bNoHostTimeOut"in e?{isHostLost:e.bNoHostTimeOut}:null}],[ca.PromoteAttendeeConsent]:[{event:"MEETING_WEBINAR_PROMOTE_CONSENT_REQ",payload:e=>{let{req_id:t,sender_id:r}=e;return{reqId:t,senderId:r}}}],[ca.ActiveAppsUpdate]:[{event:"ACTIVE_APPS_UPDATE",payload:()=>{}}],[ca.SharePronounTypeUpdate]:[{event:da,payload:e=>e}]},ha="LIVE_TRANSCRIPTION_RECEIVE_MESSAGE",fa="LIVE_TRANSCRIPTION_CAPTION_STATUS_CHANGE_RESPONSE",ma="LIVE_TRANSCRIPTION_STATUS_CHANGE",ga="LIVE_TRANSCRIPTION_HOST_DISABLE_CHANGE",va={"caption-message":[{event:ha,payload:e=>e}],"caption-status":[{event:fa,payload:e=>e}],"caption-enable":[{event:ma,payload:e=>e}],"caption-host-disable":[{event:ga,payload:e=>e}]},ya="CHAT_RECEIVE_MESSAGE_EVENTS",ba="CHAT_PRIVILEGE_CHANGE",Sa="CHAT_MESSAGE_RESPONSE",_a="CHAT_DELETE_MESSAGE_REPONSE";let Ea=function(e){return e.ChatOnMessage="chat-on-message",e.ChatPrivilegeChange="chat-privilege-change",e.ChatDeleteMessage="chat-delete-message",e}({});const Ia={[Ea.ChatOnMessage]:[{event:ya,payload:e=>e}],[Ea.ChatPrivilegeChange]:[{event:ba,payload:e=>e}],[Ea.ChatDeleteMessage]:[{event:_a,payload:e=>e}]},Aa="COMMAND_RECEIVE_MESSAGE_EVENTS",wa="COMMAND_STATUS_EVENTS";let Ca=function(e){return e.CommandChannelStatus="command-channel-status",e.CommandChannelMessage="command-channel-message",e}({});const Ta={[Ca.CommandChannelStatus]:[{event:wa,payload:e=>e}],[Ca.CommandChannelMessage]:[{event:Aa,payload:e=>e}]};let Oa=function(e){return e.Recording="Recording",e.Paused="Paused",e.Stopped="Stopped",e.Ask="Ask",e.Accept="Accept",e.Decline="Decline",e}({}),Ra=function(e){return e[e.None=0]="None",e[e.Init=1]="Init",e[e.Start=2]="Start",e[e.Pause=3]="Pause",e[e.Stop=4]="Stop",e}({});const ka="CLOUD_RECORDING_STATUS_CHANGE",Da="CLOUD_RECORDING_ISO_STATUS_CHANGE",Pa="LOCAL_RECORDING_CHANGE",Ma="RECORDING_FOR_IQ_STATUS_CHANGE",Na="RECORDING_FOR_IQ_OPERATION_CHANGE";let La=function(e){return e.RecordingChange="recording-change",e.IndividualRecordingChange="individual-recording-change",e.LocalRecordingChange="local-recording-change",e.RecordingIqChange="recording-iq-change",e}({});const Va={[La.RecordingChange]:[{event:ka,payload:e=>{const{cmrServerStatus:t}=e;return t===Ra.Start?Oa.Recording:t===Ra.Pause?Oa.Paused:Oa.Stopped}}],[La.IndividualRecordingChange]:[{event:Da,payload:e=>e}],[La.LocalRecordingChange]:[{event:Pa,payload:e=>e}],[La.RecordingIqChange]:[{event:Ma,payload:e=>e}]};let Ua=function(e){return e[e.InitSuccess=1]="InitSuccess",e[e.InitSuccessVideo=1.1]="InitSuccessVideo",e[e.InitSuccessAudio=1.2]="InitSuccessAudio",e[e.InitSuccessSharing=1.3]="InitSuccessSharing",e[e.UserGrantCaptureAudio=2]="UserGrantCaptureAudio",e[e.CurrentVideoResolution=3]="CurrentVideoResolution",e[e.JpegDecThreadOk=4]="JpegDecThreadOk",e[e.JpegData=5]="JpegData",e[e.SharingPara=6]="SharingPara",e[e.VideoDecodeMaxSize=7]="VideoDecodeMaxSize",e[e.CurrentCaptureVideoWidthHeight=8]="CurrentCaptureVideoWidthHeight",e[e.StartVideoCaptureSuccess=9]="StartVideoCaptureSuccess",e[e.StopVideoCaptureSuccess=10]="StopVideoCaptureSuccess",e[e.StartRemoteControlSuccess=11]="StartRemoteControlSuccess",e[e.CancelRemoteControlSuccess=12]="CancelRemoteControlSuccess",e[e.RemoteControlCopiedTextNotify=13]="RemoteControlCopiedTextNotify",e[e.MonitorLog=14]="MonitorLog",e[e.CurrentDesktopSharingWidthHeight=15]="CurrentDesktopSharingWidthHeight",e[e.DesktopSharingCaptureSuccess=16]="DesktopSharingCaptureSuccess",e[e.CheckChromeSharingExtensionResponse=17]="CheckChromeSharingExtensionResponse",e[e.SharingDecodeMaxSize=18]="SharingDecodeMaxSize",e[e.DataChannelOffer=19]="DataChannelOffer",e[e.AesGcmIvResponse=21]="AesGcmIvResponse",e[e.SharingDesktopStreamHaveAudio=23]="SharingDesktopStreamHaveAudio",e[e.JoinComputerAudioComplete=24]="JoinComputerAudioComplete",e[e.JoinSharingAudioComplete=25]="JoinSharingAudioComplete",e[e.LeaveComputerAudioComplete=26]="LeaveComputerAudioComplete",e[e.LeaveSharingAudioComplete=27]="LeaveSharingAudioComplete",e[e.HidStatusMute=28]="HidStatusMute",e[e.StartVideoStreamInMaskSettingSuccess=66]="StartVideoStreamInMaskSettingSuccess",e[e.SharingFirstDecodeFrameReceivedSsrc=70]="SharingFirstDecodeFrameReceivedSsrc",e[e.StartVideoStreamInVbSettingSuccess=94]="StartVideoStreamInVbSettingSuccess",e[e.VbModelPreloading_3S=96]="VbModelPreloading_3S",e[e.VbModelPreloading_10S=97]="VbModelPreloading_10S",e[e.VbModelPreloadingOk=98]="VbModelPreloadingOk",e[e.NewActiveSpeakerFirstFrameCallback=111]="NewActiveSpeakerFirstFrameCallback",e[e.InitFailed=-1]="InitFailed",e[e.InitFailedVideo=-1.1]="InitFailedVideo",e[e.InitFailedAudio=-1.2]="InitFailedAudio",e[e.InitFailedSharing=-1.3]="InitFailedSharing",e[e.UserForbiddedCaptureAudio=-2]="UserForbiddedCaptureAudio",e[e.AudioWebsocketBroken=-3]="AudioWebsocketBroken",e[e.VideoWebsocketBroken=-4]="VideoWebsocketBroken",e[e.SharingDecThreadFailed=-5]="SharingDecThreadFailed",e[e.AudioZeroData=-6]="AudioZeroData",e[e.AudioCtxSamplerate=-7]="AudioCtxSamplerate",e[e.UserForbiddedCaptureVideo=-8]="UserForbiddedCaptureVideo",e[e.UserCameraIsTakenByOtherPrograms=-9]="UserCameraIsTakenByOtherPrograms",e[e.StopVideoCaptureFailed=-10]="StopVideoCaptureFailed",e[e.StartRemoteControlFailed=-11]="StartRemoteControlFailed",e[e.CancelRemoteControlFailed=-12]="CancelRemoteControlFailed",e[e.RemoteControlPasteTextLengthOverflow=-14]="RemoteControlPasteTextLengthOverflow",e[e.UserStopDesktopSharing=-15]="UserStopDesktopSharing",e[e.UserCancelPermissionRequest=-16]="UserCancelPermissionRequest",e[e.DesktopSharingChromeExtensionUninstalled=-17]="DesktopSharingChromeExtensionUninstalled",e[e.DesktopSharingPermissionDenied=-18]="DesktopSharingPermissionDenied",e[e.DesktopSharingTimeOut=-19]="DesktopSharingTimeOut",e[e.DesktopSharingError=-20]="DesktopSharingError",e[e.AudioSpeakerSetError=-21]="AudioSpeakerSetError",e[e.DesktopSharingSystemError=-22]="DesktopSharingSystemError",e[e.SharingDesktopStreamHaveNoAudio=-27]="SharingDesktopStreamHaveNoAudio",e.AudioQosData="AUDIO_QOS_DATA",e.VideoQosData="VIDEO_QOS_DATA",e.ShareQosData="VIDEOSHARE_QOS_DATA",e.NetworkQualityChange="NETWORK_QUALITY_CHANGE",e[e.AudioBridgeReconnectStart=-29]="AudioBridgeReconnectStart",e[e.AudioBridgeReconnectEnd=-31]="AudioBridgeReconnectEnd",e[e.MaskSettingParaError=-33]="MaskSettingParaError",e[e.VbSettingParaError=-34]="VbSettingParaError",e[e.NotifyUIFailover=-35]="NotifyUIFailover",e}({}),ja=function(e){return e[e.EncodeSuccess=1]="EncodeSuccess",e[e.DecodeSuccess=2]="DecodeSuccess",e[e.EncodeFailed=-1]="EncodeFailed",e[e.DecodeFailed=-2]="DecodeFailed",e}({}),xa=function(e){return e.Spotlight="Spotlight",e.Unmute="Unmute",e.AllowToTalk="Allow to talk",e}({}),Ba=function(e){return e.Active="active",e.PassiveByMuteOne="passive(mute one)",e.PassiveByMuteAll="passive(mute all)",e.SharingAudio="sharing audio",e}({}),Fa=function(e){return e.Join="join",e.Leave="leave",e.Muted="muted",e.Unmuted="unmuted",e}({}),Ha=function(e){return e[e.Calling=1]="Calling",e[e.Ringing=2]="Ringing",e[e.Accepted=3]="Accepted",e[e.Busy=4]="Busy",e[e.NotAvailable=5]="NotAvailable",e[e.HangUp=6]="HangUp",e[e.Fail=7]="Fail",e[e.Success=8]="Success",e[e.Timeout=9]="Timeout",e[e.Canceling=10]="Canceling",e[e.Canceled=11]="Canceled",e[e.CancelFailed=12]="CancelFailed",e}({});const Wa=new Blob([new Uint8Array([255,227,24,196,0,0,0,3,72,1,64,0,0,4,132,16,31,227,192,225,76,255,67,12,255,221,27,255,228,97,73,63,255,195,131,69,192,232,223,255,255,207,102,239,255,255,255,101,158,206,70,20,59,255,254,95,70,149,66,4,16,128,0,2,2,32,240,138,255,36,106,183,255,227,24,196,59,11,34,62,80,49,135,40,0,253,29,191,209,200,141,71,7,255,252,152,74,15,130,33,185,6,63,255,252,195,70,203,86,53,15,255,255,247,103,76,121,64,32,47,255,34,227,194,209,138,76,65,77,69,51,46,57,55,170,170,170,170,170,170,170,170,170,170,255,227,24,196,73,13,153,210,100,81,135,56,0,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170,170])],{type:"audio/mpeg"}),$a=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]),Ga=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,10,9,1,7,0,65,0,253,15,26,11]);let za=function(e){return e[e.HostGrab=0]="HostGrab",e[e.OnlyHost=1]="OnlyHost",e[e.AnyoneGrab=2]="AnyoneGrab",e[e.MultipleShare=3]="MultipleShare",e}({}),Ka=function(e){return e.Sharing="sharing",e.Paused="paused",e.End="ended",e}({}),qa=function(e){return e[e.Video_90P=0]="Video_90P",e[e.Video_180P=1]="Video_180P",e[e.Video_360P=2]="Video_360P",e[e.Video_720P=3]="Video_720P",e[e.Video_1080P=4]="Video_1080P",e}({}),Ja=function(e){return e.Active="Active",e.Inactive="Inactive",e}({}),Qa=function(e){return e.Muted="Muted",e.Unmuted="Unmuted",e}({}),Za=function(e){return e.Started="Started",e.Stopped="Stopped",e.Failed="Failed",e}({}),Ya=function(e){return e.Approved="Approved",e.Rejected="Rejected",e}({}),Xa=function(e){return e.PrivilegeChange="PrivilegeChange",e.StopScreenCapture="StopScreenCapture",e.ShareFromMainSession="ShareFromMainSession",e}({}),eu=function(e){return e[e.ImageNotMatch=2]="ImageNotMatch",e[e.CanvasNotMatch=3]="CanvasNotMatch",e[e.VBModelNotMatch=4]="VBModelNotMatch",e}({});const tu="blur";let ru=function(e){return e.User="user",e.Environment="environment",e.Left="left",e.Right="right",e}({});const ou=1e3,nu="__ZOOM_SDK_SHARING_VIDEO__",iu="__ZOOM_SDK_VIDEO_ZONE__",su="__ZOOM_SDK_VIRTUAL_BACKGROUND_CANVAS_@__",au="__ZOOM_SDK_VIRTUAL_BACKGROUND_IMAGE_@__",uu="__ZOOM_SDK_MASK_CLIP_@__",du={data:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0}},cu={data:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}};let lu=function(e){return e[e.Request=11]="Request",e[e.Decline=12]="Decline",e[e.Approve=13]="Approve",e[e.GiveUp=14]="GiveUp",e[e.StartControl=15]="StartControl",e[e.ContinueControl=16]="ContinueControl",e[e.StopControl=17]="StopControl",e[e.SwitchCamera=20]="SwitchCamera",e}({}),pu=function(e){return e[e.Bk=0]="Bk",e[e.Center=1]="Center",e[e.ZoomIn=2]="ZoomIn",e[e.ZoomOut=3]="ZoomOut",e[e.Left=4]="Left",e[e.Right=5]="Right",e[e.Up=6]="Up",e[e.Down=7]="Down",e[e.SwitchCamera=8]="SwitchCamera",e}({}),hu=function(e){return e[e.Pan=192]="Pan",e[e.Tilt=48]="Tilt",e[e.Zoom=12]="Zoom",e[e.Focus=3]="Focus",e}({}),fu=function(e){return e[e.ZoomIn=2]="ZoomIn",e[e.ZoomOut=3]="ZoomOut",e[e.Left=4]="Left",e[e.Right=5]="Right",e[e.Up=6]="Up",e[e.Down=7]="Down",e[e.SwitchCamera=8]="SwitchCamera",e}({}),mu=function(e){return e[e.None=0]="None",e[e.ApproveAnother=3]="ApproveAnother",e[e.Stop=5]="Stop",e}({});let gu=function(e){return e[e.Null=0]="Null",e[e.Normal=1]="Normal",e[e.VideoMode=2]="VideoMode",e}({}),vu=function(e){return e[e.Null=0]="Null",e[e.VirtualBackground=1]="VirtualBackground",e[e.Mask=2]="Mask",e}({}),yu=function(e){return e.Computer="computer",e.Phone="phone",e}({}),bu=function(e){return e[e.Max=30]="Max",e[e.Min=10]="Min",e[e.Default=24]="Default",e}({});const Su="RECEIVE_VIDEO_ACTIVE_INDICATION",_u="RECEIVE_VIDEO_MUTE_INDICATION",Eu="ASK_FOR_START_VIDEO_CONSENT",Iu="RECEIVE_VIDEO_DIMENSION_CHANGE",Au="CAPTURED_VIDEO_DIMENSION_CHANGE",wu="CAN_NOT_DETECT_CAMERA",Cu="CAN_NOT_FIND_CAMERA",Tu="VIDEO_USER_FORBIDDEN_CAPTURE",Ou="VIDEO_CAMERA_IS_TAKEN",Ru="VIDEO_BACKGROUND_FAILED",ku="VIDEO_ESTABLISH_STREAM_ERROR",Du="VIDEO_CAPTURE_START_SUCCESS",Pu="VIDEO_CAPTURE_STOP_RESULT",Mu="VIDEO_SPOTLIGHT_CHANGE",Nu="VIDEO_FOLLOW_HOST_ORDER_CHANGE",Lu="VIDEO_HOST_DRAG_LAYOUT_CHANGE",Vu="VIDEO_NEW_USER_START",Uu="VIDEO_OLD_USER_STOP",ju="VIDEO_VIRTUAL_BACKGROUND_PRELOAD_READY",xu="VIDEO_VIRTUAL_BACKGROUND_SETTING_SUCCESS",Bu="VIDEO_STATISTIC_DATA",Fu="VIDEO_CELL_DETAILED_DATA",Hu="VIDEO_NETWORK_QUALITY_CHANGE",Wu="VIDEO_FAR_END_CAMERA_CONTROL_REQUEST",$u="VIDEO_FAR_END_CAMERA_CONTROL_RESPONSE",Gu="VIDEO_FAR_END_CAMERA_IN_CONTROL_CHANGE",zu="VIDEO_FAR_END_CAMERA_CAPABILITY_CHANGE",Ku="VIDEO_MASK_SETTING_SUCCESS",qu="VIDEO_CAPTURE_SDK_SUCCESS",Ju="VIDEO_PREFETCH_VIDEO_FRAME_CALLBACK",Qu={startCaptureVideo:{success:Du,fail:[wu,Cu,Tu,ku,Ou,Ru]},switchCameraVideo:{success:qu,fail:[wu,Cu,Tu,Ou]},stopCaptureVideo:{success:Pu}};let Zu=function(e){return e.VideoActiveChange="video-active-change",e.PeerVideoStateChange="peer-video-state-change",e.VideoSpotlightChange="video-spotlight-change",e.VideoMutedChange="video-muted-change",e.VideoCapturingChange="video-capturing-change",e.AskForStartVideoConsent="ask-for-start-video-consent",e.VideoDimensionChange="video-dimension-change",e.VideoFollowHostOrder="video-follow-host-order-change",e.VideoHostLayoutChange="video-host-layout-change",e.VideoVBPreloadChange="video-virtual-background-preload-change",e.VideoStatisticDataChange="video-statistic-data-change",e.VideoDetailedDataChange="video-detailed-data-change",e.NetworkQualityChange="network-quality-change",e.FarEndCameraRequestControl="far-end-camera-request-control",e.FarEndCameraResponseControl="far-end-camera-response-control",e.FarEndCameraInControlChange="far-end-camera-in-control-change",e.FarEndCameraCapabilityChange="far-end-camera-capability-change",e}({});const Yu={[Zu.VideoActiveChange]:[{event:Su,payload:e=>({state:e.bVideoOn?Ja.Active:Ja.Inactive,userId:e.userId})}],[Zu.VideoCapturingChange]:[{event:Du,payload:()=>({state:Za.Started})},{event:Pu,payload:e=>({state:null!=e&&e.failed?Za.Failed:Za.Stopped})}],[Zu.VideoMutedChange]:[{event:_u,payload:e=>({state:e.isVideoMuted?Qa.Muted:Qa.Unmuted,userId:e.id})}],[Zu.AskForStartVideoConsent]:[{event:Eu,payload:e=>({state:e.isVideoMuted?Qa.Muted:Qa.Unmuted,userId:e.id})}],[Zu.VideoSpotlightChange]:[{event:Mu,payload:e=>({spotlightList:e.spotlightList&&e.spotlightList.map((e=>({userId:e})))})}],[Zu.VideoDimensionChange]:[{event:Iu,payload:e=>({type:"received",width:e.width,height:e.height})},{event:Au,payload:e=>({type:"captured",width:e.width,height:e.height})}],[Zu.VideoFollowHostOrder]:[{event:Nu,payload:e=>({isFollowHostOrder:e.bOn})}],[Zu.VideoHostLayoutChange]:[{event:Lu,payload:e=>Array.isArray(e.layout)?e.layout.map((e=>({userId:e}))):[]}],[Zu.PeerVideoStateChange]:[{event:Vu,payload:e=>({action:"Start",...e})},{event:Uu,payload:e=>({action:"Stop",...e})}],[Zu.VideoVBPreloadChange]:[{event:ju,payload:e=>({isReady:e})}],[Zu.VideoStatisticDataChange]:[{event:Bu,payload:e=>e}],[Zu.VideoDetailedDataChange]:[{event:Fu,payload:e=>e}],[Zu.NetworkQualityChange]:[{event:Hu,payload:e=>e}],[Zu.FarEndCameraRequestControl]:[{event:Wu,payload:e=>e}],[Zu.FarEndCameraResponseControl]:[{event:$u,payload:e=>e}],[Zu.FarEndCameraInControlChange]:[{event:Gu,payload:e=>e}],[Zu.FarEndCameraCapabilityChange]:[{event:zu,payload:e=>e}]},Xu="AUDIO_ACTIVE_SPEAKER",ed="AUDIO_UNMUTE_CONSENT",td="AUDIO_CURRENT_USER_JOIN_BY_VOIP",rd="AUDIO_CURRENT_USER_JOIN_BY_PHONE",od="AUDIO_CURRENT_USER_LEAVE_AUDIO",nd="AUDIO_CURRENT_USER_MUTED",id="AUDIO_CURRENT_USER_UNMUTED",sd="AUDIO_PARTICIPANT_AUDIO_UPDATE",ad="AUDIO_DIALOUT_RESULT_CODE",ud="AUDIO_DIALOUT_RESULT_SUCCESS",dd="DIALOUT_FAIL",cd="AUDIO_DIALOUT_CANCEL_SUCCESS",ld="DIALOUT_CANCEL_FAIL",pd="AUDIO_MERGE_AUDIO_INDICATION",hd="USER_FORBIDDEN_MICROPHONE",fd="ESTABLISH_AUDIO_STREAM_ERROR",md="AUDIO_AUTO_PLAY_FAILED",gd="INVALID_DEVICE_ID",vd="AUDIO_ALLOW_TALK_CHANGE",yd="SHARE_AUDIO_STATE_CHANGE",bd="AUDIO_STATISTIC_DATA";let Sd=function(e){return e.ActiveSpeaker="active-speaker",e.UnmuteAudioConsent="unmute-audio-consent",e.CurrentAudioChange="current-audio-change",e.DialoutStateChange="dialout-state-change",e.MergeAudio="merged-audio",e.AutoPlayFailed="auto-play-audio-failed",e.AllowTalkChange="allow-talk-change",e.ShareAudioChange="share-audio-change",e.AudioStatisticDataChange="audio-statistic-data-change",e}({});const _d={JoinComputerAudio:{success:td,fail:[hd,fd]},LeaveComputerAudio:{success:od},JoinAudioByCallMe:{success:ud,fail:[dd]},cancelDialOut:{success:cd,fail:[ld]},hangup:{success:od}},Ed={[Sd.ActiveSpeaker]:[{event:Xu,payload:e=>e}],[Sd.UnmuteAudioConsent]:[{event:ed,payload:e=>({reason:e})}],[Sd.CurrentAudioChange]:[{event:rd,payload:()=>({action:Fa.Join,type:yu.Phone})},{event:td,payload:()=>({action:Fa.Join,type:yu.Computer})},{event:od,payload:()=>({action:Fa.Leave})},{event:nd,payload:e=>{let{source:t}=e;return{action:Fa.Muted,source:t}}},{event:id,payload:e=>{let{source:t}=e;return{action:Fa.Unmuted,source:t}}}],[Sd.DialoutStateChange]:[{event:ad,payload:e=>e}],[Sd.MergeAudio]:[{event:pd,payload:e=>e}],[Sd.AutoPlayFailed]:[{event:md,payload:()=>{}}],[Sd.AllowTalkChange]:[{event:vd,payload:e=>({enabled:e})}],[Sd.ShareAudioChange]:[{event:yd,payload:e=>e}],[Sd.AudioStatisticDataChange]:[{event:bd,payload:e=>e}]},Id="SHARE_ACTIVE_INDICATION",Ad="SHARE_CHECK_CHROME_SHARING_EXTENSION",wd="SHARE_START_DESKTOP_SHARE_FAILED",Cd="SHARE_DIMENSION_CHANGE",Td="SHARE_RECEIVED_DIMENSION_CHANGE",Od="SHARE_VIDEO_STREAMS_END",Rd="SHARE_PASSIVE_STOP_SHARE",kd="SHARE_PASSIVE_BO_STOP",Dd="SHARE_NEW_USER_ADD",Pd="SHARE_USER_REMOVE",Md="SHARE_USER_PAUSED",Nd="SHARE_USER_RESUMED",Ld="SHARE_AUTO_CHANGE_SOURCE",Vd="SHARE_PRIVILEGE_CHANGE",Ud="SHARE_READ_RECEIPT",jd="SHARE_STATISTIC_DATA";let xd=function(e){return e.ShareActiveChange="active-share-change",e.ShareDimensionChange="share-content-dimension-change",e.SharePassiveStop="passively-stop-share",e.SharePeerStateChange="peer-share-state-change",e.ShareContentChange="share-content-change",e.SharePrivilegeChange="share-privilege-change",e.ShareReadReceipt="share-can-see-screen",e.RemoteControlApprovedChange="remote-control-approved-change",e.RemoteControlInControlChange="remote-control-in-control-change",e.RemoteControlClipboardChange="remote-control-clipboard-change",e.ShareStatisticDataChange="share-statistic-data-change",e}({});const Bd={[xd.ShareActiveChange]:[{event:Id,payload:e=>{const{isActive:t,activeUserId:r,...o}=e;return{state:t?"Active":"Inactive",userId:r,...o}}}],[xd.ShareDimensionChange]:[{event:Cd,payload:e=>({type:"sended",width:e.width,height:e.height})},{event:Td,payload:e=>({type:"received",width:e.width,height:e.height})}],[xd.SharePassiveStop]:[{event:Od,payload:()=>({reason:Xa.StopScreenCapture})},{event:Rd,payload:()=>({reason:Xa.PrivilegeChange})},{event:kd,payload:()=>({reason:Xa.ShareFromMainSession})}],[xd.SharePeerStateChange]:[{event:Dd,payload:e=>({userId:e.id,action:"Start"})},{event:Pd,payload:e=>({userId:e.id,action:"Stop"})},{event:Md,payload:e=>({userId:e.id,action:"Pause"})},{event:Nd,payload:e=>({userId:e.id,action:"Resume"})}],[xd.ShareContentChange]:[{event:Ld,payload:e=>e}],[xd.RemoteControlApprovedChange]:[{event:"SHARE_REMOTE_CONTROL_APPROVE",payload:e=>({state:e?Ya.Approved:Ya.Rejected})}],[xd.RemoteControlInControlChange]:[{event:"SHARE_GRAB_REMOTE_CONTROL_CHANGE",payload:e=>({isControlling:e})}],[xd.RemoteControlClipboardChange]:[{event:"SHARE_REMOTE_CONTROL_CLIPBOARD_CHANGE",payload:e=>e}],[xd.SharePrivilegeChange]:[{event:Vd,payload:e=>({privilege:e})}],[xd.ShareReadReceipt]:[{event:Ud,payload:()=>{}}],[xd.ShareStatisticDataChange]:[{event:jd,payload:e=>e}]};let Fd=function(e){return e.Question="question",e.UpdateQuestion="updateQuestion",e.Answer="answer",e.DeleteComment="deleteComment",e.DeleteQuestion="deleteQuestion",e.Dismiss="dismiss",e.Reopen="reopen",e.Upvote="upvote",e.AnswerLive="answerLive",e}({}),Hd=function(e){return e.QaSettingChange="qa-setting-change",e.QaActionChange="qa-action-change",e}({});const Wd={[Hd.QaSettingChange]:[{event:"QA_SETTING_OPTION_CHANGE",payload:e=>e}],[Hd.QaActionChange]:[{event:"QA_NEW_ASK_QUESTION",payload:e=>({action:Fd.Question,data:e})},{event:"QA_UPDATE_ANONYMOUS_QUESTION",payload:e=>({action:Fd.UpdateQuestion,data:e})},{event:"QA_ANSWER_QUESTION",payload:e=>({action:Fd.Answer,data:e})},{event:"QA_ANSWER_REMOVE_COMMENT",payload:e=>({action:Fd.DeleteComment,data:e})},{event:"QA_ANSWER_REMOVE_QUESTION",payload:e=>({action:Fd.DeleteQuestion,data:e})},{event:"QA_ANSWER_DISMISS_QUESTION",payload:e=>({action:Fd.Dismiss,data:e})},{event:"QA_ANSWER_REOPEN_QUESTION",payload:e=>({action:Fd.Reopen,data:e})},{event:"QA_ANSWER_VOTE_QUESTION",payload:e=>({action:Fd.Upvote,data:e})},{event:"QA_ANSWER_QUESTION_LIVE",payload:e=>({action:Fd.AnswerLive,data:e})}]},$d="INVALID_OPERATION",Gd="INTERNAL_ERROR",zd="OPERATION_TIMEOUT",Kd="INSUFFICIENT_PRIVILEGES",qd="IMPROPER_MEETING_STATE",Jd="INVALID_PARAMETERS",Qd="AUDIO_ENCODE_SUCCESS",Zd="AUDIO_DECODE_SUCCESS",Yd="VIDEO_ENCODE_SUCCESS",Xd="VIDEO_DECODE_SUCCESS",ec="SHARING_ENCODE_SUCCESS",tc="SHARING_DECODE_SUCCESS",rc="AUDIO_ENCODE_FAIL",oc="AUDIO_DECODE_FAIL",nc="VIDEO_ENCODE_FAIL",ic="VIDEO_DECODE_FAIL",sc="SHARING_ENCODE_FAIL",ac="SHARING_DECODE_FAIL",uc="MEDIA_DEVICE_CHANGE";let dc=function(e){return e.DeviceChange="device-change",e.MediaSDKChange="media-sdk-change",e}({});const cc={[dc.DeviceChange]:[{event:uc,payload:()=>({})}],[dc.MediaSDKChange]:[{event:Qd,payload:()=>({type:"audio",action:"encode",result:"success"})},{event:rc,payload:()=>({type:"audio",action:"encode",result:"fail"})},{event:Zd,payload:()=>({type:"audio",action:"decode",result:"success"})},{event:oc,payload:()=>({type:"audio",action:"decode",result:"fail"})},{event:Yd,payload:()=>({type:"video",action:"encode",result:"success"})},{event:nc,payload:()=>({type:"video",action:"encode",result:"fail"})},{event:Xd,payload:()=>({type:"video",action:"decode",result:"success"})},{event:ic,payload:()=>({type:"video",action:"decode",result:"fail"})},{event:ec,payload:()=>({type:"share",action:"encode",result:"success"})},{event:sc,payload:()=>({type:"share",action:"encode",result:"fail"})},{event:tc,payload:()=>({type:"share",action:"decode",result:"success"})},{event:ac,payload:()=>({type:"share",action:"decode",result:"fail"})}]},lc="BREAKOUT_ROOM_ADD_TOKEN",pc="BREAKOUT_ROOM_INVITE_TO_JOIN_NOTIFICATION",hc="BREAKOUT_ROOM_ROOM_CLOSING_COUNTDOWN",fc="BREAKOUT_ROOM_ROOM_COUTDOWN",mc="BREAKOUT_ROOM_BROADCAST_MESSAGE",gc="BREAKOUT_ROOM_ASK_HELP_REQUEST",vc="BREAKOUT_ROOM_ASK_HELP_RESPONSE",yc="BREAKOUT_ROOM_ATTRIBUTE_INDICATION",bc="BREAKOUT_ROOM_JOIN_BO_RESPONSE",Sc="BREAKOUT_ROOM_ROOM_COUNTDOWN_TIME_UP",_c="BREAKOUT_ROOM_CURRENT_USER_PARTICIPANT_ROLE",Ec="BREAKOUT_ROOM_LOAD_PRE_ASSIGNED_ROOMS",Ic="BREAKOUT_ROOM_MAIN_SESSION_USER_UPDATE";let Ac=function(e){return e.InviteToJoin="invite-to-join",e.RoomCountdown="room-countdown",e.RoomTimeUp="room-time-up",e.ClosingRoomCountdown="closing-room-countdown",e.BroadcastMessage="broadcast-message",e.AskForHelp="ask-for-help",e.AskForHelpResponse="ask-for-help-response",e.RoomStateChange="room-state-change",e.MainSessionUserUpdate="main-session-user-updated",e}({});const wc={[Ac.InviteToJoin]:[{event:pc,payload:e=>e}],[Ac.RoomCountdown]:[{event:fc,payload:e=>e}],[Ac.RoomTimeUp]:[{event:Sc,payload:e=>e}],[Ac.ClosingRoomCountdown]:[{event:hc,payload:e=>e}],[Ac.BroadcastMessage]:[{event:mc,payload:e=>e}],[Ac.AskForHelp]:[{event:gc,payload:e=>e}],[Ac.AskForHelpResponse]:[{event:vc,payload:e=>e}],[Ac.RoomStateChange]:[{event:yc,payload:e=>({status:e.controlStatus})}],[Ac.MainSessionUserUpdate]:[{event:Ic,payload:()=>({})}]};var Cc=function(e){return e.StatusUpdate="archiving-status-update",e.OptionsUpdate="archiving-options-update",e}(Cc||{});const Tc={[Cc.StatusUpdate]:[{event:"ARCHIVING_STATUS_UPDATE",payload:e=>e}],[Cc.OptionsUpdate]:[{event:"ARCHIVING_OPTIONS_UPDATE",payload:e=>e}]};let Oc=function(e){return e.PollDataChange="poll-data-change",e.PollSizeUpdate="poll-size-update",e.PollStatusUpdate="poll-status-update",e}({});const Rc={[Oc.PollDataChange]:[{event:"POLL_DATA_CHANGE",payload:e=>e}],[Oc.PollSizeUpdate]:[{event:"POLL_SIZE_UPDATE",payload:e=>e}],[Oc.PollStatusUpdate]:[{event:"POLL_STATUS_UPDATE",payload:e=>e}]};let kc=function(e){return e.ReactionReceived="reaction-received",e.ReactionRemoved="reaction-removed",e}({});const Dc={...pa,...va,...Ia,...Ta,...Va,...Ed,...Yu,...Wd,...Bd,...cc,...wc,...Tc,"closed-caption-message":[{event:"CC_RECEIVE_MESSAGE",payload:e=>e}],"closed-caption-lt-status":[{event:"LT_STATUS_CHANGE",payload:e=>e}],"closed-caption-lt-message":[{event:"LT_RECEIVE_MESSAGE",payload:e=>e}],"closed-caption-status":[{event:"CC_ASSIGN_CC_EDITOR_SUCCESS",payload:e=>e},{event:"CC_STATUS_CHANGE",payload:e=>e}],...Rc,[kc.ReactionReceived]:[{event:"REACTION_RECEIVED",payload:e=>e}],[kc.ReactionRemoved]:[{event:"REACTION_REMOVED",payload:e=>e}],[function(e){return e.SummaryChange="summary-status-change",e}({}).SummaryChange]:[{event:"SMART_SUMMARY_STATUS_CHANGE",payload:e=>e}]},Pc=function(e){return{all:e=e||new Map,on:function(t,r){var o=e.get(t);o?o.push(r):e.set(t,[r])},off:function(t,r){var o=e.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var o=e.get(t);o&&o.slice().map((function(e){e(r)})),(o=e.get("*"))&&o.slice().map((function(e){e(t,r)}))}}}(),Mc=new Map,Nc=new Array,Lc=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;Pc.emit(e,t)},Vc=e=>new Promise(((t,r)=>{e.fail&&e.fail.length>0?Qe(xe(Pc,e.success).pipe(bt(1)),Ge(...e.fail.map((e=>xe(Pc,e).pipe(bt(1),Pe((t=>Z({type:e,payload:t})))))))).subscribe((e=>t(e)),(e=>{"object"==typeof e.payload?r({type:e.type,...e.payload}):void 0===e.payload?r({type:e.type}):r(e)})):xe(Pc,e.success).pipe(bt(1)).subscribe((e=>t(e)))})),Uc=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e4;return new Promise(((o,n)=>{let i=W;"string"==typeof e?i=xe(Pc,e).pipe(bt(1)):(i=xe(Pc,e.event),e.operations&&(i=e.operations.reduce(((e,t)=>e.pipe(t)),i))),Qe(i,Xe(r).pipe(kt(Z("timeout")))).subscribe((e=>{if(t){const r=t(e);"boolean"==typeof r?r?o(""):n({type:Gd}):0===r.ret?o(r.body):n({type:Gd,reason:r.body})}else o(e)}),(()=>{n({type:zd})}))}))},jc=(e,t)=>void 0!==t?xe(Pc,e).pipe(bt(t)):xe(Pc,e),xc=()=>{Nc.forEach((e=>{e.unsubscribe()})),Nc.length=0,Mc.clear()},{setAttendeesList:Bc,setAssistantList:Fc,setIsAdmitAllSilentUsers:Hc,resetParticipants:Wc,addFailoverAttendees:$c,removeFailoverAttendees:Gc,setClearRaiseHand:zc,setClearAttendeeFeedback:Kc,updateAttendeeDisplayName:qc,removeXmppAttendeeUser:Jc,updateXmppAttendeeList:Qc,setAttendeeExtraKey:Zc}=Fr({SET_ATTENDEES_LIST:e=>e,SET_ASSISTANT_LIST:e=>e,UPDATE_XMPP_ATTENDEE_LIST:e=>e,RESET_PARTICIPANTS:()=>({}),SET_IS_ADMIT_ALL_SILENT_USERS:e=>e,REMOVE_FAILOVER_ATTENDEES:e=>e,ADD_FAILOVER_ATTENDEES:e=>e,SET_CLEAR_RAISE_HAND:()=>({}),SET_CLEAR_ATTENDEE_FEEDBACK:()=>({}),UPDATE_ATTENDEE_DISPLAY_NAME:e=>e,REMOVE_XMPP_ATTENDEE_USER:e=>e,SET_ATTENDEE_EXTRA_KEY:e=>e});var Yc="NOT_FOUND",Xc=function(e,t){return e===t};function el(e,t){var r,o,n="object"==typeof t?t:{equalityCheck:t},i=n.equalityCheck,s=void 0===i?Xc:i,a=n.maxSize,u=void 0===a?1:a,d=n.resultEqualityCheck,c=function(e){return function(t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var o=t.length,n=0;n-1){var n=r[o];return o>0&&(r.splice(o,1),r.unshift(n)),n.value}return Yc}return{get:o,put:function(t,n){o(t)===Yc&&(r.unshift({key:t,value:n}),r.length>e&&r.pop())},getEntries:function(){return r},clear:function(){r=[]}}}(u,c);function p(){var t=l.get(arguments);if(t===Yc){if(t=e.apply(null,arguments),d){var r=l.getEntries().find((function(e){return d(e.value,t)}));r&&(t=r.value)}l.put(arguments,t)}return t}return p.clearCache=function(){return l.clear()},p}function tl(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o{let{participants:{attendeesList:t}}=e;return t},nl=e=>{let{meeting:{userId:t}}=e;return t},il=e=>{let{participants:{xmppAttendeeList:t}}=e;return t};let sl=function(e){return e[e.Attendee=0]="Attendee",e[e.Host=1]="Host",e[e.Owner=4]="Owner",e[e.ViewOnly=8]="ViewOnly",e[e.HostOwner=5]="HostOwner",e[e.ViewOnlyCanTalk=24]="ViewOnlyCanTalk",e}({}),al=function(e){return e[e.Host=10]="Host",e[e.Panelist=20]="Panelist",e[e.Attendee=30]="Attendee",e}({}),ul=function(e){return e[e.Client=9]="Client",e[e.Phone=5]="Phone",e[e.H323=15]="H323",e[e.Assitant=51]="Assitant",e}({});const dl=e=>(e&sl.Host)===sl.Host,cl=e=>(e&ul.Phone)===ul.Phone,ll=e=>e===sl.ViewOnlyCanTalk,pl=e=>(e&sl.ViewOnly)===sl.ViewOnly;let hl=function(e){return e[e.Automatically=1]="Automatically",e[e.Manually=2]="Manually",e}({}),fl=function(e){return e[e.NotStarted=1]="NotStarted",e[e.InProgress=2]="InProgress",e[e.Closing=3]="Closing",e[e.Closed=4]="Closed",e}({}),ml=function(e){return e[e.NoToken=1]="NoToken",e[e.GotToken=2]="GotToken",e[e.Started=3]="Started",e[e.Closing=4]="Closing",e[e.Closed=5]="Closed",e}({}),gl=function(e){return e.Initial="initial",e.Invited="invited",e.Joining="joining",e.InRoom="in room",e.Leaving="leaving",e.TimeUp="time up",e.MainSession="main session",e}({}),vl=function(e){return e.Join="joinRequest",e.Switch="switchRequest",e.Leave="leaveRequest",e.Broadcast="messageText",e.HelpReq="helpRequest",e.HelpRes="helpResponse",e.CoHostWantJoinThisBo="wantJoinThisBO",e}({}),yl=function(e){return e[e.Received=0]="Received",e[e.Busy=1]="Busy",e[e.Ignore=2]="Ignore",e[e.AlreadyInRoom=3]="AlreadyInRoom",e}({});const bl=rl([nl,ol],((e,t)=>t.find((t=>t.userId===e)))),Sl=rl([bl],(e=>(null==e?void 0:e.isHost)||(null==e?void 0:e.bCoHost))),_l=rl([bl],(e=>null==e?void 0:e.isHost)),El=rl([il],(e=>e.filter((e=>e.userRole===al.Attendee)))),Il=rl([ol],(e=>e.filter((e=>e.bHold&&!e.bid)))),Al=rl([ol,e=>{let{breakoutRoom:t}=e;return t&&t.controlStatus},e=>{let{breakoutRoom:t}=e;return t&&t.currentRoom.status}],((e,t,r)=>t!==fl.InProgress&&t!==fl.Closing||r!==gl.InRoom?e.filter((e=>!e.bHold&&!e.bid)):e.filter((e=>!e.bHold)))),wl=rl([e=>{let{participants:{assistantList:t}}=e;return t}],(e=>e)),Cl=rl([Al],(e=>e.find((e=>e.isHost)))),Tl=rl([Al],(e=>e.filter((e=>e.bCoHost)))),Ol=rl([bl,Al],((e,t)=>t.filter((t=>t.userId!==(null==e?void 0:e.userId)))));rl([il],(e=>e.reduce(((e,t)=>{const{jid:r}=t;return Object.assign(e,{[r]:t}),e}),{}))),rl([il,e=>{let{meeting:{jid:t}}=e;return t}],((e,t)=>{var r;return null===(r=e.find((e=>e.jid===t)))||void 0===r?void 0:r.userId}));let Rl=function(e){return e.Closed="closed",e.Connecting="connecting",e.Connected="connected",e}({}),kl=function(e){return e[e.SupportASL=1]="SupportASL",e[e.SidecarPhase2=2]="SidecarPhase2",e[e.SupportBroadcastVoice=8]="SupportBroadcastVoice",e[e.SendMeetingTokenSeparately=16]="SendMeetingTokenSeparately",e[e.SupportPreview=32]="SupportPreview",e[e.WebCameraIndication=64]="WebCameraIndication",e[e.SupportFarEndCameraControl=256]="SupportFarEndCameraControl",e[e.SupportVideoShare=512]="SupportVideoShare",e[e.UnifyErrorType=1024]="UnifyErrorType",e[e.WhiteBoard=2048]="WhiteBoard",e}({});const{setAsnIds:Dl,setIsCanUnmute:Pl,setDialoutSequence:Ml,setDialoutResultCode:Nl,setIsAllowToTalk:Ll,setIsHostMuteAll:Vl,setIsActiveOperation:Ul,setAudioSsrc:jl,setIsMutedUponEntry:xl,setIsUserGrantCaptureAudio:Bl,setIsMicrophoneForbidden:Fl,setWebrtcRestartCount:Hl,setMicrophoneList:Wl,setSpeakerList:$l,setActiveMicrophone:Gl,setActiveSpeaker:zl,setCanPlayAudio:Kl,resetAudio:ql,setIsComputerAudioLoading:Jl,setIsAllowToTalkAttendeeConnected:Ql,setIsMuteBeforeSharingAudio:Zl,addLocalShareAudioUser:Yl,updateLocalShareAudioUser:Xl,setIsJoinComputerAudioBeforeSharingAudio:ep,setIsShareAudioEnabled:tp,setIsShareAudioMuted:rp,setIsSharingAudio:op,setAudioDataEncoding:np,setAudioDataDecoding:ip,addLocallyMutedAudio:sp,removeLocallyMutedAudio:ap,updateUserAudioVolumeLocally:up,removeLocalUserAudioVolume:dp,setCustomizedAudioOption:cp,setIsBackgroundNoiseSuppression:lp,setIsHidEnabled:pp,setAudioMediaPlaybackFile:hp,setIsStopAllIncomingAudio:fp,setIsVerifiedAudioPermissionOnIosMobile:mp,setIsAudioBridgeSignalReconnecting:gp}=Fr("SET_ASN_IDS","SET_IS_CAN_UNMUTE","SET_DIALOUT_SEQUENCE","SET_DIALOUT_RESULT_CODE","SET_IS_ALLOW_TO_TALK","SET_IS_HOST_MUTE_ALL","SET_IS_ACTIVE_OPERATION","SET_AUDIO_SSRC","SET_IS_MUTED_UPON_ENTRY","SET_IS_USER_GRANT_CAPTURE_AUDIO","SET_IS_MICROPHONE_FORBIDDEN","SET_WEBRTC_RESTART_COUNT","SET_MICROPHONE_LIST","SET_SPEAKER_LIST","SET_ACTIVE_MICROPHONE","SET_ACTIVE_SPEAKER","SET_CAN_PLAY_AUDIO","RESET_AUDIO","SET_IS_COMPUTER_AUDIO_LOADING","SET_IS_ALLOW_TO_TALK_ATTENDEE_CONNECTED","SET_IS_MUTE_BEFORE_SHARING_AUDIO","SET_IS_SHARING_AUDIO","ADD_LOCAL_SHARE_AUDIO_USER","UPDATE_LOCAL_SHARE_AUDIO_USER","SET_IS_JOIN_COMPUTER_AUDIO_BEFORE_SHARING_AUDIO","SET_IS_SHARE_AUDIO_ENABLED","SET_IS_SHARE_AUDIO_MUTED","SET_AUDIO_DATA_ENCODING","SET_AUDIO_DATA_DECODING","ADD_LOCALLY_MUTED_AUDIO","REMOVE_LOCALLY_MUTED_AUDIO","UPDATE_USER_AUDIO_VOLUME_LOCALLY","REMOVE_LOCAL_USER_AUDIO_VOLUME","SET_CUSTOMIZED_AUDIO_OPTION","SET_IS_BACKGROUND_NOISE_SUPPRESSION","SET_IS_HID_ENABLED","SET_AUDIO_MEDIA_PLAYBACK_FILE","SET_IS_STOP_ALL_INCOMING_AUDIO","SET_IS_VERIFIED_AUDIO_PERMISSION_ON_IOS_MOBILE","SET_IS_AUDIO_BRIDGE_SIGNAL_RECONNECTING"),{setSharePrivilege:vp,setShareActiveNode:yp,setIsReceiveSharing:bp,setIsChromeExtensionInstalled:Sp,setIsScreenShareForbidden:_p,setShareDimension:Ep,setShareStatus:Ip,setShareSsrc:Ap,setShareQuality:wp,setReceivedShareDimension:Cp,setIsRemoteControlApproved:Tp,setIsGrabRemoteControl:Op,setIsSdkGrabControl:Rp,setIsReceiveSharingFromMainSession:kp,setIsSharingToBreakoutRoom:Dp,setIsSharingWithSecondCamera:Pp,setShringSecondCameraId:Mp,setIsRequireReadReceipt:Np,setIsOptimizedForSharedVideo:Lp,setShareDataEncoding:Vp,setShareDataDecoding:Up,addShareCapturedEnsuredCanvas:jp,addShareRenderedEnsuredCanvas:xp,resetShare:Bp}=Fr("SET_SHARE_PRIVILEGE","SET_SHARE_ACTIVE_NODE","SET_IS_RECEIVE_SHARING","SET_IS_CHROME_EXTENSION_INSTALLED","SET_IS_SCREEN_SHARE_FORBIDDEN","SET_SHARE_DIMENSION","SET_SHARE_STATUS","SET_SHARE_SSRC","SET_SHARE_QUALITY","SET_RECEIVED_SHARE_DIMENSION","SET_IS_REMOTE_CONTROL_APPROVED","SET_IS_GRAB_REMOTE_CONTROL","SET_IS_SDK_GRAB_CONTROL","SET_IS_RECEIVE_SHARING_FROM_MAIN_SESSION","SET_IS_SHARING_TO_BREAKOUT_ROOM","SET_IS_SHARING_WITH_SECOND_CAMERA","SET_SHRING_SECOND_CAMERA_ID","SET_IS_REQUIRE_READ_RECEIPT","SET_IS_OPTIMIZED_FOR_SHARED_VIDEO","SET_SHARE_DATA_ENCODING","SET_SHARE_DATA_DECODING","ADD_SHARE_CAPTURED_ENSURED_CANVAS","ADD_SHARE_RENDERED_ENSURED_CANVAS","RESET_SHARE"),{setVideoSsrc:Fp,setActiveVideoId:Hp,setCameraList:Wp,setActiveCamera:$p,setIsCurrentUserStartedVideo:Gp,setSpotlightVideo:zp,setIsCaptureForbidden:Kp,setVideoMaxQuality:qp,setIsVideoMuted:Jp,setIsCaptureCameraLoading:Qp,setIsCameraTaken:Zp,resetVideo:Yp,setReceivedVideoDimension:Xp,addSubscribedVideoId:eh,removeSubscribedVideoId:th,setIsFollowHostVideoLayout:rh,setHostDragLayout:oh,addRenderedVideoId:nh,removeRenderedVideoId:ih,setIsSupportHdVideo:sh,setMaximumNumbeOfHdSubscriptions:ah,setIsCanUnmuteVideo:uh,setIsVbPreloadReady:dh,setIsVbConfiged:ch,setVbImageSrc:lh,setVideoDataEncoding:ph,setVideoDataDecoding:hh,setHardwareAccelerationState:fh,setVideoCaptureCustomizedOption:mh,setNetworkQuality:gh,setVideoCameraPtzCapabilities:vh,setIsCurrentUserRequestCameraControlled:yh,setIsCurrentUserCameraInControl:bh,addVideoFarEndCameraControlUser:Sh,removeVideoFarEndCameraControlUser:_h,setVideoPtzCameraMoving:Eh,setVideoPtzCameraValue:Ih,setIsControllingFarEndCamera:Ah,setNetworkQualityBroadcastTime:wh,setIsMaskConfiged:Ch,setVideoBackgroundMode:Th,setVideoMask:Oh,setVideoCapturedDimension:Rh,addVideoRenderedEnsuredCanvas:kh,setVideoMediaPlaybackFile:Dh,setPrefetchedVideoUser:Ph}=Fr("SET_VIDEO_SSRC","SET_ACTIVE_VIDEO_ID","SET_CAMERA_LIST","SET_ACTIVE_CAMERA","SET_IS_CURRENT_USER_STARTED_VIDEO","SET_SPOTLIGHT_VIDEO","SET_IS_CAPTURE_FORBIDDEN","SET_VIDEO_MAX_QUALITY","SET_IS_VIDEO_MUTED","SET_IS_CAPTURE_CAMERA_LOADING","SET_IS_CAMERA_TAKEN","RESET_VIDEO","SET_RECEIVED_VIDEO_DIMENSION","ADD_SUBSCRIBED_VIDEO_ID","REMOVE_SUBSCRIBED_VIDEO_ID","SET_IS_FOLLOW_HOST_VIDEO_LAYOUT","SET_HOST_DRAG_LAYOUT","ADD_RENDERED_VIDEO_ID","REMOVE_RENDERED_VIDEO_ID","SET_IS_SUPPORT_HD_VIDEO","SET_MAXIMUM_NUMBE_OF_HD_SUBSCRIPTIONS","SET_IS_CAN_UNMUTE_VIDEO","SET_IS_VB_PRELOAD_READY","SET_IS_VB_CONFIGED","SET_VB_IMAGE_SRC","SET_VIDEO_DATA_ENCODING","SET_VIDEO_DATA_DECODING","SET_HARDWARE_ACCELERATION_STATE","SET_VIDEO_CAPTURE_CUSTOMIZED_OPTION","SET_NETWORK_QUALITY","SET_VIDEO_CAMERA_PTZ_CAPABILITIES","SET_IS_CURRENT_USER_REQUEST_CAMERA_CONTROLLED","SET_IS_CURRENT_USER_CAMERA_IN_CONTROL","ADD_VIDEO_FAR_END_CAMERA_CONTROL_USER","REMOVE_VIDEO_FAR_END_CAMERA_CONTROL_USER","SET_VIDEO_PTZ_CAMERA_MOVING","SET_VIDEO_PTZ_CAMERA_VALUE","SET_IS_CONTROLLING_FAR_END_CAMERA","SET_NETWORK_QUALITY_BROADCAST_TIME","SET_IS_MASK_CONFIGED","SET_VIDEO_BACKGROUND_MODE","SET_VIDEO_MASK","SET_VIDEO_CAPTURED_DIMENSION","ADD_VIDEO_RENDERED_ENSURED_CANVAS","SET_VIDEO_MEDIA_PLAYBACK_FILE","SET_PREFETCHED_VIDEO_USER"),{setQaSetting:Mh,addQaQuestion:Nh,addQaAnswer:Lh,removeQaComment:Vh,removeQaQuestion:Uh,dismissQaQuestion:jh,reopenQaQuestion:xh,voteQaQuestion:Bh,answerQaQuestionLive:Fh,updateAttendeeAnonymousQuestion:Hh,setQaEnabled:Wh,resetQa:$h}=Fr("SET_QA_SETTING","ADD_QA_QUESTION","ADD_QA_ANSWER","REMOVE_QA_COMMENT","REMOVE_QA_QUESTION","DISMISS_QA_QUESTION","REOPEN_QA_QUESTION","VOTE_QA_QUESTION","ANSWER_QA_QUESTION_LIVE","UPDATE_ATTENDEE_ANONYMOUS_QUESTION","SET_QA_ENABLED","RESET_QA"),{setChatPrivilege:Gh,setPanelistChatPrivilege:zh,addChatMessageHistory:Kh,resetChat:qh,setIsAllowAttendeeChat:Jh,setLatestChatMessageId:Qh,removeChatMessage:Zh}=Fr("SET_CHAT_PRIVILEGE","SET_PANELIST_CHAT_PRIVILEGE","ADD_CHAT_MESSAGE_HISTORY","RESET_CHAT","SET_IS_ALLOW_ATTENDEE_CHAT","SET_LATEST_CHAT_MESSAGE_ID","REMOVE_CHAT_MESSAGE"),{setCcEditorInfo:Yh,setTempSendCcText:Xh,setCcLtMessage:ef,setTempReceiveLtText:tf,setTempReceiveCcText:rf,setGatewayInfoList:of,setLtEnable:nf,setIsListenClosedCaption:sf,setCcEnable:af,allowParticipantAskLt:uf,receiveAskStartLt:df,setMeetingEnabledLtFeature:cf,updateLtStatus:lf,deleteMessage:pf,updateMessage:hf,resetClosedCaption:ff}=Fr("SET_CC_EDITOR_INFO","SET_CC_LT_MESSAGE","SET_TEMP_SEND_CC_TEXT","SET_TEMP_RECEIVE_LT_TEXT","SET_TEMP_RECEIVE_CC_TEXT","SET_GATEWAY_INFO_LIST","SET_LT_ENABLE","SET_IS_LISTEN_CLOSED_CAPTION","SET_CC_ENABLE","ALLOW_PARTICIPANT_ASK_LT","RECEIVE_ASK_START_LT","SET_MEETING_ENABLED_LT_FEATURE","UPDATE_LT_STATUS","DELETE_MESSAGE","UPDATE_MESSAGE","RESET_CLOSED_CAPTION"),{addBreakoutRooms:mf,setBreakoutRoomAllocationPattern:gf,setBreakoutRoomSequenceId:vf,setMeetingElapsedTime:yf,setStartRoomElapsedTime:bf,setBreakoutRoomOptions:Sf,setBreakoutRoomControlStatus:_f,setBreakoutRooms:Ef,setCurrentBreakoutRoom:If,setBreakoutRoomAttendeeStatus:Af,setBreakoutRoomConfId:wf,setBreakoutRoomToken:Cf,resetBreakoutRoom:Tf,setBreakoutRoomClosingRoomTime:Of,setBreakoutRoomBroadcastMessage:Rf,setBreakoutRoomHostReplyType:kf,setBreakoutRoomHostReplyRequestId:Df,setMainSessionAttendeeList:Pf,setIsHugeBreakoutRoom:Mf,setBreakoutRoomPreAssignedRoomList:Nf,setBreakoutRoomUserRoleUpdated:Lf,setBreakoutRoomMeetingOptions:Vf}=Fr("ADD_BREAKOUT_ROOMS","SET_BREAKOUT_ROOM_ALLOCATION_PATTERN","SET_BREAKOUT_ROOM_SEQUENCE_ID","SET_MEETING_ELAPSED_TIME","SET_START_ROOM_ELAPSED_TIME","SET_BREAKOUT_ROOM_OPTIONS","SET_BREAKOUT_ROOM_CONTROL_STATUS","SET_BREAKOUT_ROOMS","SET_CURRENT_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_ATTENDEE_STATUS","SET_BREAKOUT_ROOM_CONF_ID","SET_BREAKOUT_ROOM_TOKEN","RESET_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_CLOSING_ROOM_TIME","SET_BREAKOUT_ROOM_BROADCAST_MESSAGE","SET_BREAKOUT_ROOM_HOST_REPLY_TYPE","SET_BREAKOUT_ROOM_HOST_REPLY_REQUEST_ID","SET_MAIN_SESSION_ATTENDEE_LIST","SET_IS_HUGE_BREAKOUT_ROOM","SET_BREAKOUT_ROOM_PRE_ASSIGNED_ROOM_LIST","SET_BREAKOUT_ROOM_USER_ROLE_UPDATED","SET_BREAKOUT_ROOM_MEETING_OPTIONS"),{setCloudRecordingStatus:Uf,setCloudRecordingEnable:jf,setCloudIsoRecordingEnable:xf,setAllowStopAutoRecording:Bf,setAutomaticCloudRecordingEnable:Ff,setIsZoomIQ:Hf,setZoomIQChanging:Wf,resetRecording:$f}=Fr("SET_CLOUD_RECORDING_STATUS","SET_CLOUD_RECORDING_ENABLE","SET_CLOUD_ISO_RECORDING_ENABLE","SET_ALLOW_STOP_AUTO_RECORDING","SET_AUTOMATIC_CLOUD_RECORDING_ENABLE","SET_IS_ZOOM_I_Q","SET_ZOOM_I_Q_CHANGING","RESET_RECORDING"),{updateCmdJid:Gf,removeCmdJid:zf,setCmdChannelConnectionStatus:Kf,resetCmdChannel:qf}=Fr("UPDATE_CMD_JID","REMOVE_CMD_JID","SET_CMD_CHANNEL_CONNECTION_STATUS","RESET_CMD_CHANNEL"),{setArchivingStatus:Jf,setArchivingSessionReady:Qf,setArchivingOptions:Zf,resetArchiving:Yf}=Fr({SET_ARCHIVING_STATUS:e=>e,SET_ARCHIVING_SESSION_READY:e=>e,SET_ARCHIVING_OPTIONS:e=>e,RESET_ARCHIVING:()=>{}}),{setIsLiveTranscriptionEnabled:Xf,setLiveTranscriptionMeetingOptions:em,setIsLiveTranscriptionManualCaptionerEnabled:tm,setLiveTranscriptionGatewayId:rm,setLiveTranscriptionSupportedLanguage:om,setIsLiveTranscriptionSubscribed:nm,setCurrentTranscriptionLang:im,setCurrentTranslationLang:sm,addLiveTranscriptionMessage:am,updateLiveTranscriptionMessage:um,reduceLiveTranscriptionMessages:dm,setLiveTranscriptionEngineType:cm,removeLiveTranscriptionFailoverState:lm,setLiveTranscriptionLastCaptionMessage:pm,resetLiveTranscription:hm,setIsHostDisableCaptions:fm}=Fr("SET_IS_LIVE_TRANSCRIPTION_ENABLED","SET_LIVE_TRANSCRIPTION_MEETING_OPTIONS","SET_IS_LIVE_TRANSCRIPTION_MANUAL_CAPTIONER_ENABLED","SET_LIVE_TRANSCRIPTION_GATEWAY_ID","SET_LIVE_TRANSCRIPTION_SUPPORTED_LANGUAGE","SET_IS_LIVE_TRANSCRIPTION_SUBSCRIBED","SET_CURRENT_TRANSCRIPTION_LANG","SET_CURRENT_TRANSLATION_LANG","ADD_LIVE_TRANSCRIPTION_MESSAGE","UPDATE_LIVE_TRANSCRIPTION_MESSAGE","REDUCE_LIVE_TRANSCRIPTION_MESSAGES","SET_LIVE_TRANSCRIPTION_ENGINE_TYPE","REMOVE_LIVE_TRANSCRIPTION_FAILOVER_STATE","SET_LIVE_TRANSCRIPTION_LAST_CAPTION_MESSAGE","RESET_LIVE_TRANSCRIPTION"," SET_IS_HOST_DISABLE_CAPTIONS"),{setPollData:mm,setPollingId:gm,setPollingWebLinks:vm,setPollingDocMaxSize:ym,setPollingDocSize:bm,setPollingDocLibraryMaxSize:Sm,setPollingDocLibrarySize:_m,resetPoll:Em}=Fr("SET_POLL_DATA","SET_POLLING_ID","SET_POLLING_WEB_LINKS","SET_POLLING_DOC_MAX_SIZE","SET_POLLING_DOC_SIZE","SET_POLLING_DOC_LIBRARY_MAX_SIZE","SET_POLLING_DOC_LIBRARY_SIZE","RESET_POLL"),{setLoggerInitOptions:Im,setIsLaplaceInitialized:Am,resetLogger:wm}=Fr("SET_LOGGER_INIT_OPTIONS","SET_IS_LAPLACE_INITIALIZED","RESET_LOGGER"),Cm=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const{socket:{zoomSocketStatus:r,xmppSocketStatus:o,mainSessionSocketStatus:n},meeting:{meetingStatus:i}}=e,s=[];if(i===ji.Joined){const t=Js.getInstance(),r=Ws.createAgent();if(t.disconnect(),t.destroy(),e.video&&(e.video.subscribedVideoList.length>0&&e.video.subscribedVideoList.forEach((e=>{r.unsubscribeVideo(e)})),e.video.isCurrentUserStartedVideo&&Lc(Pu)),e.share&&e.share.isReceiveSharing){const t=e.share.activeNodeId;e.share.isRemoteControlApproved&&r.sharingRequestRemoteControl(t,!1),r.unsubscribeSharing(t)}}if(t||(Wi.clearSession(),[ms.WebclientTk,ms.WebclientZsk,ms.WebclientZtk].forEach((e=>{sessionStorage.removeItem(e)})),Ss.destroy()),r!==Rl.Closed&&s.push(Jr()),o!==Rl.Closed&&s.push(Qr()),n!==Rl.Closed&&s.push(to()),t){const r=bl(e);s.push(di({audio:null==r?void 0:r.audio,muted:null==r?void 0:r.muted,video:null==r?void 0:r.bVideoOn,isFailover:t}))}else s.push(di({audio:!1,muted:void 0,video:!1,isFailover:t}));return s.push(uo(),_o(),Wc(),ql(t),Bp(),Yp(t),$h(),qh(),$f(),ff(),Tf(),qf(),Yf(),hm(t),Em(),wm(t),vi(ji.Closed)),s},Tm=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;ot.find((t=>t.userId===e)))),Ke((e=>!!e)),bt(1)]},...r)},Om={[`${xi.AudioBridgeEnable}`]:{mask:240,action:wi},[`${xi.AudioDecodeInWorklet}`]:{mask:15,action:So}};function Rm(e){return T(ye(((t,r)=>e(t,r))),Ke((e=>null!=e)))}function km(e){return T(Pe(((t,r)=>e(t,r)||W)))}function Dm(e){return T(Ut(((t,r)=>e(t,r)||W)))}function Pm(e){return T(Pe(((t,r)=>e(t,r))),Pe((e=>Array.isArray(e)?Oe(e):Q(e))))}const Mm={period:500,rules:[{peak:50,throttle:300},{peak:60,throttle:400}]},Nm={[`${Is}`]:()=>({payloads:{add:[],update:[],remove:[]},onThrottle(e){e.add&&this.payloads.add.push(...e.add),e.update&&this.payloads.update.push(...e.update),e.remove&&this.payloads.remove.push(...e.remove)}})};function Lm(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Mm;return t=>new R((r=>{const o=new Map;let n=0,i=null;const{period:s,rules:a}=e;let u=null;i||(i=((e,t)=>{const r=performance.now();let o=0,n=!1;return setTimeout((function i(){o+=t,e();const s=performance.now()-r-o,a=setTimeout(i,Math.max(t-s,0));n&&clearTimeout(a)}),t),()=>{n=!0}})((()=>{n=0}),s));const d=Object.keys(Nm),c=t.subscribe({next(e){if(e&&e.evt&&null!==i){n+=1;const{evt:t,body:i}=e,s=String(t);if(d.indexOf(s)>=0)if(u){const e=o.get(s);if(e)e.onThrottle(i);else{const e=Nm[s]();e.onThrottle(i),o.set(s,e)}}else{let t=0;if(a.forEach((e=>{n>e.peak&&(t=e.throttle)})),t>0){const e=Nm[s]();e.onThrottle(i),o.set(s,e),u=setTimeout((()=>{o.forEach(((e,t)=>{const o={evt:Number(t),body:e.payloads};r.next(o)})),o.clear(),u=null}),t)}else r.next(e)}else r.next(e)}else r.next(e)},error(e){r.error(e)},complete(){r.complete()}});return()=>{c.unsubscribe(),i&&(i(),i=null),n=0}}))}rl([Al,e=>{let{share:{isReceiveSharing:t}}=e;return t},e=>{let{share:{activeNodeId:t}}=e;return t}],(function(){let e=arguments.length>2?arguments[2]:void 0;if(arguments.length>1?arguments[1]:void 0){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((t=>t.userId===e&&!0===t.sharerOn))}return null}));const Vm=rl([Al],(e=>e.filter((e=>e.sharerOn)))),Um=rl([Vm],(e=>e.some((e=>!!e.bVideoShare))));class jm{constructor(e){this._cancelError=new Error("request for lock canceled"),this._locked=void 0,this._queue=[],this._waiters=[],this._currentReleaser=void 0,e&&(this._cancelError=e),this._locked=!1}acquire(){const e=this.isLocked(),t=new Promise(((e,t)=>{this._queue.push({resolve:e,reject:t})}));return e||this._dispatch(),t}async runExclusive(e){const t=await this.acquire();try{return await e()}finally{t()}}async waitForUnlock(){return this.isLocked()?new Promise((e=>this._waiters.push({resolve:e}))):Promise.resolve()}isLocked(){return this._locked}release(){if(this._currentReleaser){const e=this._currentReleaser;this._currentReleaser=void 0,e()}}cancel(){this._queue.forEach((e=>e.reject(this._cancelError))),this._queue=[]}_dispatch(){const e=this._queue.shift();if(!e)return;let t=!1;this._currentReleaser=()=>{t||(t=!0,this._locked=!1,this._resolveWaiters(),this._dispatch())},this._locked=!0,e.resolve(this._currentReleaser)}_resolveWaiters(){this._waiters.forEach((e=>e.resolve())),this._waiters=[]}}function xm(e){if(e){var t;const r=document.getElementById(e);null==r||null===(t=r.parentNode)||void 0===t||t.removeChild(r)}}let Bm="zoom.us";const Fm="2.14.0",Hm=`https://dmogdx0jrul3u.cloudfront.net/${Fm}/lib/av`,Wm=`https://source.zoom.us/${Fm}/lib/av`,$m=`https://jssdk.zoomus.cn/${Fm}/lib/av`;const Gm=(e,t,r)=>Ue(...[t,r].map(((t,r)=>{if("initial"!==t)return Oe(Promise.resolve("success"===t));{const t=0===r?"ENCODE":"DECODE";return Qe(jc(`${e.toUpperCase()}_${t}_SUCCESS`,1).pipe(At(!0)),jc(`${e.toUpperCase()}_${t}_FAIL`,1).pipe(At(!1)))}}))),zm=e=>{const t=bl(e.value);return t?Q(t):jc(Qs,1).pipe(ee(le),Zt(e),ye((e=>{let[,t]=e;return bl(t)})))},Km=()=>Oe(navigator.mediaDevices.enumerateDevices()).pipe(ye((e=>{const t=[],r=[],o=[];return e.forEach((e=>{const{kind:n,deviceId:i,label:s}=e,a=s.replace(/\([\w,\d]+:[\w,\d]+\)/i,"").trim();switch(n){case"audioinput":"communications"===i||/ZoomAudioDevice/i.test(a)||/Zoom-\S*/.test(a)||/CubebAggregateDevice\S*/.test(a)||/Microsoft Teams Audio/i.test(a)||t.push({deviceId:i,label:a});break;case"audiooutput":"communications"===i||/ZoomAudioDevice/i.test(a)||/Microsoft Teams Audio/i.test(a)||r.push({deviceId:i,label:a});break;case"videoinput":o.push({deviceId:i,label:a})}})),{microphones:t,speakers:r,cameras:o}})));function qm(e){if(e){let r=e;try{const t=e.width;e.width=t}catch(o){var t;r=e.cloneNode(!0),null===(t=e.parentNode)||void 0===t||t.replaceChild(r,e)}return r}return e}function Jm(){try{return"undefined"!=typeof MessageChannel&&(new MessageChannel).port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate($a)}catch(e){return!1}}function Qm(){var e;return null===(e=WebAssembly)||void 0===e?void 0:e.validate(Ga)}function Zm(){return Zi()||es()}const Ym=(()=>{const e=new jm;return{withAudioAction:t=>function(){for(var r=arguments.length,o=new Array(r),n=0;n{let i=!1;const s=setTimeout((()=>{i=!0,n(new Error("Operation Timeout!"))}),3e4);try{const n=await e.acquire();i?n():(clearTimeout(s),r(t(...o)))}catch(e){i||(clearTimeout(s),n(e))}}))},processAudioAction:t=>e.acquire().then((()=>t())),completeAudioAction:()=>{e.release()},cancelAllAudioAction:()=>{e.cancel()}}})();function Xm(e){const t=["joinComputerAudio","joinSharingAudio","leaveComputerAudio","leaveSharingAudio"];return new Proxy(e,{get:(e,r)=>"string"==typeof r&&t.includes(r)?function(){return Ym.withAudioAction(e[r].bind(e))(...arguments)}:Reflect.get(e,r)})}function eg(e){var t,r;const o=Number(null===(t=$i())||void 0===t||null===(r=t.match(/\d+$/))||void 0===r?void 0:r[0]),n=Qi()&&o>=91,i=qi()&&o>=89,s=navigator.hardwareConcurrency>2;let a=as();return e&&!a&&(a=os()&&us()),!es()&&a&&(n||i)&&s}const tg=(e,t)=>{const r=document.createElement("link");return r.rel="preload",r.href=e,r.as=t,r.crossOrigin="anonymous",r},rg=(e,t,r)=>{const o=[],n=[],i=Array.isArray(e)?e:[e];return Gs.filter((e=>i.includes(e.category)&&e.tag===t)).forEach((e=>{"worker"===e.type?o.push(`${r}${e.name}`):"wasm"===e.type&&n.push(`${r}${e.name}`)})),{workers:o,wasms:n}};function og(e,t,r,o){let{share:{activeNodeId:n,shareQuality:i}}=t;const{share:{isReceiveSharingFromMainSession:s}}=t;r&&(n=r),void 0!==o&&(i=o);const a=Um(t);e.subscribeSharing(n,i,s,a)}const ng=Ws.createAgent();var ig=Object.freeze({__proto__:null,sharePrivilegeChangeEpic:(e,t)=>wo(e,As).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)})),Zt(t),Gt((e=>{let[t,r]=e;const{share:{sharePrivilege:o}}=r,{payload:{body:{lockShare:n}}}=t;o!==n&&Lc(Vd,n)})),ye((e=>{let[t]=e;return vp(t.payload.body.lockShare)}))),shareSSrcEpic:e=>wo(e,20227).pipe(ye((e=>Ap(e.payload.body.ssrc)))),shareStatusChangeEpic:(e,t)=>wo(e,_s).pipe(Zt(t),Ke((e=>{let[t,r]=e;const{payload:{body:o}}=t,{share:{isReceiveSharingFromMainSession:n}}=r;return!n||n&&o.fromMainSession})),ye((e=>{let[t,r]=e;const{share:{isReceiveSharing:o,activeNodeId:n,isReceiveSharingFromMainSession:i},breakoutRoom:s}=r,{payload:{body:a}}=t;if(o&&1===a.bStatus){let e=!1;(null==s?void 0:s.currentRoom.status)===gl.InRoom&&s.mainSessionAttendeeList.length>0&&(e=s.mainSessionAttendeeList.findIndex((e=>e.userId===n))>-1),ng.unsubscribeSharing(n,e),og(ng,r,a.activeNodeID),Js.getInstance().switchSharingSource(a.ssrc,i),Lc(Ld,{userId:a.activeNodeID})}else if(1===a.bStatus){const e={activeUserId:a.activeNodeID,isActive:!0};i&&Object.assign(e,{isFromMainSession:!0}),Lc(Id,e)}else if(o){const e={activeUserId:a.activeNodeID,isActive:!1};i&&Object.assign(e,{isFromMainSession:!0}),Lc(Id,e)}return yp(a)}))),handleChromeExtensionEpic:e=>Ro(e,Ua.CheckChromeSharingExtensionResponse).pipe(ye((e=>(Lc(Ad,e.payload.data),Sp(e.payload.data))))),handleSDKShareSuccessEpic:(e,t)=>Ro(e,[Ua.SharingDesktopStreamHaveAudio,Ua.SharingDesktopStreamHaveNoAudio]).pipe(Zt(t),ye((e=>{let[t,r]=e;const{meeting:{userId:o},share:{isSharingToBreakoutRoom:n,isOptimizedForSharedVideo:i}}=r,{payload:{type:s}}=t,a=s===Ua.SharingDesktopStreamHaveAudio;return ng.startSharing(o,{bShareToBO:n,bShareAudio:a,bShareVideo:!!i}),_p(!1)}))),handleSDKShareErrorEpic:e=>Ro(e,[Ua.DesktopSharingError,Ua.DesktopSharingChromeExtensionUninstalled,Ua.DesktopSharingPermissionDenied,Ua.DesktopSharingSystemError]).pipe(Pe((e=>{const t=[];let r="";return[Ua.DesktopSharingPermissionDenied,Ua.DesktopSharingSystemError].includes(e.payload.type)&&(t.push(_p(!0)),e.payload.type===Ua.DesktopSharingSystemError?/mac/i.test(navigator.platform)&&(r="To use screen share on Chrome, please allow screen recording access in system setting."):r="To use screen share, please allow the permission request."),Lc(wd,{reason:r}),Oe(t)}))),handleSDKShareDimensionChangeEpic:e=>Ro(e,Ua.CurrentDesktopSharingWidthHeight).pipe(Ke((e=>!!e.payload.data)),ye((e=>{Lc(Cd,e.payload.data);const{payload:{data:{width:t,height:r}}}=e;return Js.getInstance().ajustmentSharingCanvas(t,r),Ep(e.payload.data)}))),handleSDKReceivedShareSizeChangeEpic:(e,t)=>Ro(e,Ua.SharingDecodeMaxSize).pipe(Ke((e=>!!e.payload.data)),Zt(t),Rm((e=>{let[t,r]=e;const{share:{shareQuality:o,activeNodeId:n}}=r,{payload:{data:{fps:i}}}=t,s=Number(i);if(o!==s)return og(ng,r,n,s),wp(s)}))),handleRWGShareOriginalDimensionEpic:e=>wo(e,20226).pipe(Gt((e=>{var t,r;if(Lc(Td,null===(t=e.payload)||void 0===t?void 0:t.body),null!==(r=e.payload)&&void 0!==r&&r.body){const{payload:{body:{width:t,height:r}}}=e;Js.getInstance().ajustmentReceivedSharingCanvas(t,r)}})),ye((e=>Cp(e.payload.body)))),handleSDKShareOriginalDimensionEpic:e=>Ro(e,Ua.SharingPara).pipe(Gt((e=>{var t,r;if(Lc(Td,null===(t=e.payload.data)||void 0===t?void 0:t.body),null!==(r=e.payload.data)&&void 0!==r&&r.body){const{payload:{data:{body:{width:t,height:r}}}}=e;Js.getInstance().ajustmentReceivedSharingCanvas(t,r)}})),ye((e=>{var t;return Cp(null===(t=e.payload.data)||void 0===t?void 0:t.body)}))),handleSDKStopShareEpic:(e,t)=>Ro(e,Ua.UserStopDesktopSharing).pipe(Zt(t),ye((e=>{let[,t]=e;const{meeting:{userId:r},share:{status:o}}=t;return o!==Ka.End&&(ng.stopSharing(r),Lc(Od)),Ip(Ka.End)}))),handleRWGCurrentUserShareChangeEpic:(e,t)=>wo(e,Is).pipe(Zt(t),Ke((e=>{let[t,r]=e;const{meeting:{userId:o}}=r,n=t.payload.body.update;return n&&n.length>0&&n.findIndex((e=>e.id===o&&void 0!==e.bShareOn))>-1})),Pe((e=>{let[t,r]=e;const{meeting:{userId:o},share:{status:n,isReceiveSharing:i,activeNodeId:s}}=r,{payload:{body:{update:a}}}=t,u=a.find((e=>e.id===o&&!1===e.bShareOn)),d=a.find((e=>e.id===o&&!0===e.bShareOn)),c=[],l=Js.getInstance();return u&&n!==Ka.End&&(ng.stopSharing(o),l.stopDesktopSharing(),c.push(Ip(Ka.End)),Lc(Rd)),d&&n===Ka.End&&(i&&(l.stopRenderSharing(),ng.unsubscribeSharing(s),c.push(bp(!1))),c.push(Ip(Ka.Sharing))),Oe(c)}))),handleMultipleShareChangeEpic:(e,t)=>wo(e,Is).pipe(Zt(t),Ke((e=>{let[t,r]=e;const{meeting:{userId:o}}=r,n=t.payload.body.update;return n&&n.length>0&&n.findIndex((e=>e.id!==o&&void 0!==e.bShareOn))>-1})),Pe((r=>{let[o,n]=r;const{payload:{body:{update:i}}}=o,{share:{activeNodeId:s,isReceiveSharing:a}}=n,u=Vm(n),d=i.filter((e=>!0===e.bShareOn&&!1===e.bSharePause)),c=i.filter((e=>!0===e.bShareOn&&!0===e.bSharePause)),l=i.filter((e=>!1===e.bShareOn));return d.length>0&&d.forEach((e=>{-1===u.findIndex((t=>t.userId===e.id))?Lc(Dd,e):Lc(Nd,e)})),c.length>0&&c.forEach((e=>{Lc(Md,e)})),l.length>0&&(l.forEach((e=>{Lc(Pd,e)})),a&&l.some((e=>e.id===s)))?Qe(wo(e,_s).pipe(bt(1),kt(W)),Xe(50).pipe(kt(Z("timeout")))).pipe(lt((()=>{const{share:{activeNodeId:e,isReceiveSharingFromMainSession:r},audio:o}=t.value,n=u.filter((t=>t.userId!==e));if(n.length>0){const i=n[0],{userId:s}=i;ng.unsubscribeSharing(e,r),og(ng,t.value,s);const a=Js.getInstance();return a.switchSharingSource(s,r),null==o||o.localShareAudioUserMutedList.forEach((e=>{a.setSharingAudioVolume(s,e.userId!==s||e.muted,e.isFromMainSession)})),Lc(Ld,{userId:s}),Q(yp({activeNodeID:s,bStatus:1,ssrc:s}))}return W}))):W}))),handleSharingEncryptIndication:(e,t)=>wo(e,Es).pipe(Zt(t),Ut((e=>{let[r,o]=e;const{payload:{body:{encryptKey:n,additionalType:i}}}=r,{media:{sharingDecodeStatus:s,sharingEncodeStatus:a},meeting:{confId:u,userId:d,zoomId:c,meetingId:l,meetingNumber:p,isWebinar:h}}=o;return zm(t).pipe(Ut((e=>{let r=a;return h&&e&&pl(e.userRole)&&(r="failed"),Gm("sharing",r,s).pipe(Gt((e=>{let[r,o]=e;const s=Js.getInstance(),a={userId:d,sn:bn(c),confId:u,encryptKey:bn(n),encryptType:i,meetingId:l,meetingNumber:p};if(r&&(null==s||s.updateMediaParams({iVType:ps.SHARING_ENCODE,isFromMainSession:!1,updateParams:a})),o){s.updateMediaParams({iVType:ps.SHARING_DECODE,isFromMainSession:!1,updateParams:a});const{participants:{attendeesList:e}}=t.value;if(e.length>0){const t=e.map((e=>({userid:e.userId,sn:e.zoomID&&bn(e.zoomID)})));s.updateUserMediaSN({added:t,isFromMainSession:!1,iVType:ps.SHARING_DECODE})}}})),kt(W))})))}))),handleSharingReceivingChannelReadyEpic:(e,t)=>Oo(e,20235).pipe(Zt(t),Gt((e=>{let[t,r]=e;const{media:{sharingDecodeStatus:o}}=r,{type:n,payload:{body:i}}=t,s=n===`${ro}`;Gm("sharing","success",o).subscribe((e=>{let[,t]=e;t&&Js.getInstance().addReceivedSharingChannelType({isFromMainSession:s,...i})}))})),kt(W)),handleSharingReceivingChannelCloseEpic:(e,t)=>Oo(e,20236).pipe(Zt(t),Gt((e=>{let[t,r]=e;const{media:{sharingDecodeStatus:o}}=r,{type:n,payload:{body:{ssrc:i}}}=t,s=n===`${ro}`;Gm("sharing","success",o).subscribe((e=>{let[,t]=e;t&&Js.getInstance().removeReceivedSharingChannelType({isFromMainSession:s,ssrc:i})}))})),kt(W)),handleReceiveSharingConfirmEpic:e=>Ro(e,Ua.SharingFirstDecodeFrameReceivedSsrc).pipe(Ke((e=>!!e.payload.data)),Gt((e=>{const{payload:{data:{ssrc:t}}}=e;ng.sendReceivingSharingReady(t)})),kt(W)),handleReceiveSharingFeedbackEpic:(e,t)=>wo(e,20233).pipe(Ke((()=>!!t.value.share.isRequireReadReceipt)),Gt((e=>{const{payload:{body:{bReceiveOk:t}}}=e;t&&Lc(Ud)})),kt(W)),handleVideoShareChangedAsPrivilegeChangedEpic:(e,t)=>wo(e,As).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.lockShare)})),Pe((e=>{const{payload:{body:{lockShare:r}}}=e,{share:{isOptimizedForSharedVideo:o,isSharingToBreakoutRoom:n},audio:{isSharingAudio:i},meeting:{userId:s}}=t.value,a=[];return r===za.MultipleShare&&o&&(ng.startSharing(s,{bShareAudio:i,bShareToBO:n,bShareVideo:!1}),Js.getInstance().switchSharingMode(gu.Normal),a.push(Lp(!1))),Oe(a)}))),handleShareQosDataEpic:(e,t)=>Ro(e,Ua.ShareQosData).pipe(Zt(t),ye((e=>{var t;let[r,o]=e;const{meeting:{isWebinar:n},media:{sharingEncodeStatus:i,sharingDecodeStatus:s},share:{status:a,isReceiveSharing:u},participants:{xmppAttendeeList:d}}=o;let c=Ol(o).length>0;n&&(c=c||Boolean(d.length));const l=a!==Ka.End&&"success"===i&&c,p=u&&"success"===s;return null!==(t=r.payload.data)&&void 0!==t&&t.encoding?l?(Lc(jd,r.payload),Vp(r.payload)):Vp(cu):p?(Lc(jd,r.payload),Up(r.payload)):Up(cu)})))});function sg(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;o3?t.i-4:t.i:Array.isArray(e)?1:hg(e)?2:fg(e)?3:0}function lg(e,t){return 2===cg(e)?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function pg(e,t,r){var o=cg(e);2===o?e.set(t,r):3===o?(e.delete(t),e.add(r)):e[t]=r}function hg(e){return Bg&&e instanceof Map}function fg(e){return Fg&&e instanceof Set}function mg(e){return e.o||e.t}function gg(e){if(Array.isArray(e))return Array.prototype.slice.call(e);var t=qg(e);delete t[Gg];for(var r=Kg(t),o=0;o1&&(e.set=e.add=e.clear=e.delete=yg),Object.freeze(e),t&&dg(e,(function(e,t){return vg(t,!0)}),!0)),e}function yg(){sg(2)}function bg(e){return null==e||"object"!=typeof e||Object.isFrozen(e)}function Sg(e){var t=Jg[e];return t||sg(18,e),t}function _g(){return jg}function Eg(e,t){t&&(Sg("Patches"),e.u=[],e.s=[],e.v=t)}function Ig(e){Ag(e),e.p.forEach(Cg),e.p=null}function Ag(e){e===jg&&(jg=e.l)}function wg(e){return jg={p:[],l:jg,h:e,m:!0,_:0}}function Cg(e){var t=e[Gg];0===t.i||1===t.i?t.j():t.O=!0}function Tg(e,t){t._=t.p.length;var r=t.p[0],o=void 0!==e&&e!==r;return t.h.g||Sg("ES5").S(t,e,o),o?(r[Gg].P&&(Ig(t),sg(4)),ug(e)&&(e=Og(t,e),t.l||kg(t,e)),t.u&&Sg("Patches").M(r[Gg].t,e,t.u,t.s)):e=Og(t,r,[]),Ig(t),t.u&&t.v(t.u,t.s),e!==Wg?e:void 0}function Og(e,t,r){if(bg(t))return t;var o=t[Gg];if(!o)return dg(t,(function(n,i){return Rg(e,o,t,n,i,r)}),!0),t;if(o.A!==e)return t;if(!o.P)return kg(e,o.t,!0),o.t;if(!o.I){o.I=!0,o.A._--;var n=4===o.i||5===o.i?o.o=gg(o.k):o.o;dg(3===o.i?new Set(n):n,(function(t,i){return Rg(e,o,n,t,i,r)})),kg(e,n,!1),r&&e.u&&Sg("Patches").R(o,r,e.u,e.s)}return o.o}function Rg(e,t,r,o,n,i){if(ag(n)){var s=Og(e,n,i&&t&&3!==t.i&&!lg(t.D,o)?i.concat(o):void 0);if(pg(r,o,s),!ag(s))return;e.m=!1}if(ug(n)&&!bg(n)){if(!e.h.F&&e._<1)return;Og(e,n),t&&t.A.l||kg(e,n)}}function kg(e,t,r){void 0===r&&(r=!1),e.h.F&&e.m&&vg(t,r)}function Dg(e,t){var r=e[Gg];return(r?mg(r):e)[t]}function Pg(e,t){if(t in e)for(var r=Object.getPrototypeOf(e);r;){var o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Object.getPrototypeOf(r)}}function Mg(e){e.P||(e.P=!0,e.l&&Mg(e.l))}function Ng(e){e.o||(e.o=gg(e.t))}function Lg(e,t,r){var o=hg(t)?Sg("MapSet").N(t,r):fg(t)?Sg("MapSet").T(t,r):e.g?function(e,t){var r=Array.isArray(e),o={i:r?1:0,A:t?t.A:_g(),P:!1,I:!1,D:{},l:t,t:e,k:null,o:null,j:null,C:!1},n=o,i=Qg;r&&(n=[o],i=Zg);var s=Proxy.revocable(n,i),a=s.revoke,u=s.proxy;return o.k=u,o.j=a,u}(t,r):Sg("ES5").J(t,r);return(r?r.A:_g()).p.push(o),o}function Vg(e,t){switch(t){case 2:return new Map(e);case 3:return Array.from(e)}return gg(e)}var Ug,jg,xg="undefined"!=typeof Symbol&&"symbol"==typeof Symbol("x"),Bg="undefined"!=typeof Map,Fg="undefined"!=typeof Set,Hg="undefined"!=typeof Proxy&&void 0!==Proxy.revocable&&"undefined"!=typeof Reflect,Wg=xg?Symbol.for("immer-nothing"):((Ug={})["immer-nothing"]=!0,Ug),$g=xg?Symbol.for("immer-draftable"):"__$immer_draftable",Gg=xg?Symbol.for("immer-state"):"__$immer_state",zg=""+Object.prototype.constructor,Kg="undefined"!=typeof Reflect&&Reflect.ownKeys?Reflect.ownKeys:void 0!==Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:Object.getOwnPropertyNames,qg=Object.getOwnPropertyDescriptors||function(e){var t={};return Kg(e).forEach((function(r){t[r]=Object.getOwnPropertyDescriptor(e,r)})),t},Jg={},Qg={get:function(e,t){if(t===Gg)return e;var r=mg(e);if(!lg(r,t))return function(e,t,r){var o,n=Pg(t,r);return n?"value"in n?n.value:null===(o=n.get)||void 0===o?void 0:o.call(e.k):void 0}(e,r,t);var o=r[t];return e.I||!ug(o)?o:o===Dg(e.t,t)?(Ng(e),e.o[t]=Lg(e.A.h,o,e)):o},has:function(e,t){return t in mg(e)},ownKeys:function(e){return Reflect.ownKeys(mg(e))},set:function(e,t,r){var o=Pg(mg(e),t);if(null==o?void 0:o.set)return o.set.call(e.k,r),!0;if(!e.P){var n=Dg(mg(e),t),i=null==n?void 0:n[Gg];if(i&&i.t===r)return e.o[t]=r,e.D[t]=!1,!0;if(function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}(r,n)&&(void 0!==r||lg(e.t,t)))return!0;Ng(e),Mg(e)}return e.o[t]===r&&"number"!=typeof r&&(void 0!==r||t in e.o)||(e.o[t]=r,e.D[t]=!0,!0)},deleteProperty:function(e,t){return void 0!==Dg(e.t,t)||t in e.t?(e.D[t]=!1,Ng(e),Mg(e)):delete e.D[t],e.o&&delete e.o[t],!0},getOwnPropertyDescriptor:function(e,t){var r=mg(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o?{writable:!0,configurable:1!==e.i||"length"!==t,enumerable:o.enumerable,value:r[t]}:o},defineProperty:function(){sg(11)},getPrototypeOf:function(e){return Object.getPrototypeOf(e.t)},setPrototypeOf:function(){sg(12)}},Zg={};dg(Qg,(function(e,t){Zg[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}})),Zg.deleteProperty=function(e,t){return Zg.set.call(this,e,t,void 0)},Zg.set=function(e,t,r){return Qg.set.call(this,e[0],t,r,e[0])};var Yg=function(){function e(e){var t=this;this.g=Hg,this.F=!0,this.produce=function(e,r,o){if("function"==typeof e&&"function"!=typeof r){var n=r;r=e;var i=t;return function(e){var t=this;void 0===e&&(e=n);for(var o=arguments.length,s=Array(o>1?o-1:0),a=1;a1?o-1:0),i=1;i=0;r--){var o=t[r];if(0===o.path.length&&"replace"===o.op){e=o.value;break}}r>-1&&(t=t.slice(r+1));var n=Sg("Patches").$;return ag(e)?n(e,t):this.produce(e,(function(e){return n(e,t)}))},e}(),Xg=new Yg,ev=Xg.produce;Xg.produceWithPatches.bind(Xg),Xg.setAutoFreeze.bind(Xg),Xg.setUseProxies.bind(Xg),Xg.applyPatches.bind(Xg),Xg.createDraft.bind(Xg),Xg.finishDraft.bind(Xg);const tv={ssrc:0,status:Ka.End,shareDimension:{width:0,height:0},receivedShareDimension:{width:1920,height:1080,logicWidth:1920,logicHeight:1080},sharePrivilege:za.OnlyHost,activeNodeId:0,activeSsrc:0,shareQuality:1,isRemoteSharingActive:!1,isReceiveSharing:!1,isRemoteControlApproved:!1,isGrabRemoteControl:!1,isSDKGrabControl:!1,isChromeExtensionInstalled:!1,isScreenShareForbidden:!1,isReceiveSharingFromMainSession:!1,isSharingToBreakoutRoom:!1,isSharingWithSecondCamera:!1,secondCameraId:"default",isRequireReadReceipt:!1,capturedEnsuredCanvas:[],renderedEnsuredCanvas:[],statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}}},rv=zr({[`${vp}`]:ev(((e,t)=>{let{payload:r}=t;e.sharePrivilege=r})),[`${yp}`]:ev(((e,t)=>{let{payload:r}=t;e.isRemoteSharingActive=1===r.bStatus,e.activeNodeId=r.activeNodeID,e.activeSsrc=r.ssrc})),[`${bp}`]:ev(((e,t)=>{let{payload:r}=t;e.isReceiveSharing=r})),[`${Sp}`]:ev(((e,t)=>{let{payload:r}=t;e.isChromeExtensionInstalled=r})),[`${Ep}`]:ev(((e,t)=>{let{payload:r}=t;e.shareDimension={...r}})),[`${Ip}`]:ev(((e,t)=>{let{payload:r}=t;e.status=r})),[`${Ap}`]:ev(((e,t)=>{let{payload:r}=t;e.ssrc=r})),[`${wp}`]:ev(((e,t)=>{let{payload:r}=t;e.shareQuality=r})),[`${Cp}`]:ev(((e,t)=>{let{payload:r}=t;e.receivedShareDimension={...r}})),[`${Tp}`]:ev(((e,t)=>{let{payload:r}=t;e.isRemoteControlApproved=r})),[`${Op}`]:ev(((e,t)=>{let{payload:r}=t;e.isGrabRemoteControl=r})),[`${Rp}`]:ev(((e,t)=>{let{payload:r}=t;e.isSDKGrabControl=r})),[`${kp}`]:ev(((e,t)=>{let{payload:r}=t;e.isReceiveSharingFromMainSession=r})),[`${Dp}`]:ev(((e,t)=>{let{payload:r}=t;e.isSharingToBreakoutRoom=r})),[`${Pp}`]:ev(((e,t)=>{let{payload:r}=t;e.isSharingWithSecondCamera=r})),[`${Mp}`]:ev(((e,t)=>{let{payload:r}=t;e.secondCameraId=r})),[`${Np}`]:ev(((e,t)=>{let{payload:r}=t;e.isRequireReadReceipt=r})),[`${Lp}`]:ev(((e,t)=>{let{payload:r}=t;e.isOptimizedForSharedVideo=r})),[`${Vp}`]:ev(((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data})),[`${Up}`]:ev(((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})),[`${jp}`]:ev(((e,t)=>{let{payload:r}=t;e.capturedEnsuredCanvas.includes(r)||e.capturedEnsuredCanvas.push(r)})),[`${xp}`]:ev(((e,t)=>{let{payload:r}=t;e.renderedEnsuredCanvas.includes(r)||e.renderedEnsuredCanvas.push(r)})),[`${Bp}`]:()=>({...tv})},tv),ov=Ao(ig),nv=Ws.createAgent();var iv=Object.freeze({__proto__:null,joinMeetingWelcomeEpic:e=>wo(e,0).pipe(Gt((e=>{var t;if("READY"===(null===(t=e.payload.body)||void 0===t?void 0:t.status)){const e=Wi.get(ms.WebclientMeetingToken);e&&nv.joinMeeting(e)}})),kt(W)),joinMeetingSuccessfulEpic:(e,t)=>wo(e,Ts).pipe(Zt(t),Dm((e=>{let[t,r]=e;const{payload:{body:{res:o,userID:n,zoomID:i,mn:s,participantID:a,disableAqos:u,disableVqos:d,meetingtoken:c,role:l}}}=t,{meeting:{isWebinar:p,userEmail:h,userName:f,isMeetingReset:m,meetingOptions:g,zlkJwtToken:v,cv:y,apiKey:b,zsk:S,signatureType:_},media:{mediaConstraints:E,assetsPath:I}}=r;if(Mn.CONF_SUCCESS===o){const{WebclientParticipantId:e,WebclientZoomId:r,WebclientUserEmail:o,WebclientUserName:A,WebclientMeetingToken:w}=ms;Wi.set(r,i,Fi.SessionStorage),Wi.set(e,a,Fi.SessionStorage),h&&Wi.set(o,h,Fi.SessionStorage),Wi.set(A,f,Fi.SessionStorage),c&&Wi.set(w,c,Fi.SessionStorage),S&&nv.sendSdkKeyToMonitor(_,b,n);const C=[ai(t.payload.body),Si(performance.now())];Js.getInstance().init(),m&&(C.push(hi(!1)),void 0!==E&&void 0!==I&&C.push(co())),(g.isPollingEnabled||v||p)&&C.push(qr());let T=!d;const O=!u;return v&&En(y,"1.3.0")<0&&(T=!1),C.unshift(_i({audioQos:O,videoQos:T})),(l&sl.Owner)===sl.Owner&&(Lc(na,{reason:"dont support assisnt join through widget",errorCode:-1}),nv.leaveMeeting()),Lc(oa,{meetingNumber:s}),Oe(C)}return Mn.CONF_FAIL_CONFLOCKED===o?Lc(na,$n(o)):Mn.CONF_FAIL_CONF_USER_FULL===o?Lc(na,Object.assign({},$n(o),{lmUrl:t.payload.body.lmURL})):(Mn.CONF_FAIL_MEETING_OVER===o||Mn.CONF_RESULT_MMR_IB_REJECT===o||Mn.CONF_FAIL_RESULT_MMR_CONF_PARTICIPANT_EXISTS===o||[Mn.CONF_FAIL_HAS_BEEN_REMOVED,Mn.CONF_FAIL_WEBINAR_DENIED_EMAIL].includes(o),Lc(na,$n(o))),Oe(Cm(r,!1))}))),handleMeetingAttributeChangeEpic:(e,t)=>wo(e,As).pipe(Zt(t),ye((e=>{let[t,r]=e;const{payload:{body:o}}=t,{meeting:{zoomId:n,encType:i,gcmSessinKey:s}}=r;if(void 0!==(null==o?void 0:o.encryptKey)&&Ss.init(n,o.encryptKey,i),void 0!==(null==o?void 0:o.gatewayKey)){const e=Js.getInstance(),[,t,r]=o.gatewayKey.split(".");e.sendUserNodeList([{userid:Number(t),sn:r&&bn(r)}],s)}return Lc(ua,o),ui(o)}))),handleMeetingEndEpic:(e,t)=>wo(e,7939).pipe(Zt(t),Pe((e=>{let[t,r]=e;const{payload:{body:o}}=t;if(void 0!==o.reason){if(Nn.Reconnect===o.reason)return Ln.WaitingRoomFailover===o.subReason?Lc(ia,{reason:Mi.OnHold}):Lc(ia,{reason:Mi.Failover}),Q(Qn(Bi.NormalCase));Nn.KickedByHost===o.reason?Lc(sa,{reason:"kicked by host"}):[Nn.EndByHost,Nn.EndByNone,Nn.EndByAdmin,Nn.EndByHostStartAnotherMeeting].includes(o.reason)?Lc(sa,{reason:"ended by host"}):Nn.FreeMeetingTimeout===o.reason?Lc(sa,{reason:"free meeting ended"}):[Nn.DuplicateSession,Nn.MeetingTransfer].includes(o.reason)&&Lc(sa,{reason:"duplicated session"})}return r.meeting.isMeetingReset?W:Oe(Cm(r,!1))}))),meetingFailoverEpic:(e,t)=>e.pipe(tr(`${Qn}`),Zt(t),Pe((e=>{let[,t]=e;const r=Cm(t,!0);let o;if(t.meeting.zlkJwtToken){const e=function(e){if(e){const{meeting:{topic:t,passWord:r,userName:o,zlkJwtToken:n,lang:i,cv:s,customerKey:a}}=e;return{topic:t,passWord:r,userName:o,zlkJwtToken:n,lang:i,cv:s,customerKey:a}}return null}(t),r={topic:null==e?void 0:e.topic,password:null==e?void 0:e.passWord,userName:null==e?void 0:e.userName,zlk:null==e?void 0:e.zlkJwtToken,lang:null==e?void 0:e.lang,cv:null==e?void 0:e.cv,customerKey:null==e?void 0:e.customerKey};o=Q(qn(r)).pipe(mt(1e3))}else{const e=function(e){const{meeting:{apiKey:t,signature:r,signatureType:o,meetingNumber:n,userName:i,lang:s,passWord:a,userEmail:u,sdkUrl:d,sdkOrigin:c,proxy:l,cv:p,ztk:h,zsk:f,tk:m}}=e,g=h||sessionStorage.getItem(ms.WebclientZtk),v=f||sessionStorage.getItem(ms.WebclientZsk);return{apiKey:t,signature:r,signatureType:o,meetingNumber:n,userName:i,lang:s,passWord:a,userEmail:u,sdkUrl:d,sdkOrigin:c,proxy:l,cv:p,ztk:g,zsk:v,tk:m||sessionStorage.getItem(ms.WebclientTk),ulsm:v?1:0}}(t);o=Q(Kn(e)).pipe(mt(1e3))}return Ve(Oe(r),o)}))),hostChangeEpic:e=>Oo(e,7940).pipe(Gt((e=>{Lc("MEETING_HOST_CHANGE_INDICATION",e.payload.body.bHost)})),ye((e=>ci(e.payload.body)))),cohostChangeEpic:e=>Oo(e,7941).pipe(Gt((e=>{Lc("MEETING_COHOST_CHANGE_INDICATION",e.payload.body.bCoHost)})),ye((e=>li(e.payload.body)))),setMeetingOptEpic:e=>Oo(e,7945).pipe(Gt((e=>{const{payload:{body:{opt:t}}}=e;Wi.set(ms.WebclientOpt,t,Fi.SessionStorage)})),kt(W)),setMeetingOnHoldEpic:(e,t)=>wo(e,7942).pipe(Gt((e=>{const{payload:{body:{bHold:t}}}=e;Wi.set(ms.WebclientIsOnHold,t?1:0,Fi.SessionStorage),Lc(aa,t)})),Zt(t),Pe((e=>{let[t,r]=e;const o=[pi(t.payload.body.bHold)];if(t.payload.body.bHold){const e=bl(r);if(e){o.push(fi({audio:e.audio,video:e.bVideoOn,muted:e.muted}));const t=Js.getInstance();if("computer"===e.audio&&(t.leaveComputerAudio(),nv.joinOrLeaveVoip(!1)),e.bVideoOn&&t.stopCaptureVideo(),e.sharerOn&&(nv.stopSharing(e.userId),t.stopDesktopSharing(),o.push(Ip(Ka.End))),r.video&&r.video.subscribedVideoList.length>0&&r.video.subscribedVideoList.forEach((e=>{nv.unsubscribeVideo(e)})),r.share&&r.share.isReceiveSharing){const e=r.share.activeNodeId;r.share.isRemoteControlApproved&&(nv.sharingRequestRemoteControl(e,!1),t.stopRemoteControl()),nv.unsubscribeSharing(e),t.stopRenderSharing()}}}return Oe(o)}))),setMeetingDataCenterRegionEpic:e=>wo(e,7954).pipe(ye((e=>yi(e.payload.body)))),claimHostResponseEpic:e=>wo(e,4216).pipe(Gt((e=>{Lc("MEETING_CLAIM_HOST_KEY_RESPONSE",e.payload.body.bresult)})),kt(W)),leaveMeetingEpic:(e,t)=>e.pipe(tr(`${Zn}`,`${Yn}`),Zt(t),Pe((e=>{let[t,r]=e;return t.type===`${Zn}`?(nv.leaveMeeting(),Lc(sa,{})):t.type===`${Yn}`&&(nv.endMeeting(),Lc(sa,{})),Oe(Cm(r,!1))}))),versionUpgradeEpic:e=>wo(e,2).pipe(Gt((()=>{console.warn("Upgrade to latest version to optimize meeting experience")})),kt(W)),versionBlockEpic:e=>wo(e,1).pipe(Gt((e=>{const{payload:{body:{upgradeVersion:t}}}=e,r=$n(1e4);if(r&&r.reason){const e=r.reason.replace(/{(\d+)}/g,(()=>t));r.reason=e}Lc(na,r)})),kt(W)),handleSharePronounChangeEpic:e=>wo(e,4265).pipe(ye((e=>{const{payload:{body:t}}=e,{nShareType:r}=t;return Lc(da,{userSharePronounType:r}),Ti(r)}))),handleMeetingTokenEpic:e=>wo(e,4128).pipe(Gt((e=>{const{payload:{body:{meetingtoken:t}}}=e,{WebclientMeetingToken:r}=ms;t&&Wi.set(r,t,Fi.SessionStorage)})),kt(W)),handleQuicklyLeaveEpic:(e,t)=>e.pipe(tr(`${ai}`),Ke((()=>!!t.value.meeting.quicklyLeave)),Ut((()=>xe(window,"beforeunload").pipe(Gt((()=>{nv.leaveMeeting()})),kt(W)))))});let sv,av,uv=function(e){return e.Add="add",e.List="list",e.Remove="memberremove",e.rename="rename",e.update="UPDATE",e}({}),dv=function(e){return e.Open="open",e.Message="message",e.Error="error",e.Close="close",e}({});class cv{constructor(){this.eventHandlers=void 0,this.websocket=void 0,this.seq=void 0,this.eventHandlers=new Map,this.websocket=null,this.seq=1}static getInstance(){return this.xmppInstance||(this.xmppInstance=new cv),this.xmppInstance}on(e,t){let r=this.eventHandlers.get(e);r||(r=[]),r.push(t),this.eventHandlers.set(e,r)}off(e,t){const r=this.eventHandlers.get(e);if(r){const o=r.filter((e=>e!==t));this.eventHandlers.set(e,o)}}emit(e,t){const r=this.eventHandlers.get(e);r&&r instanceof Array&&r.slice(0).forEach((e=>{try{e(t)}catch(e){console.error(e)}}))}sendMessageToRwg(e){this.seq+=1;const t=this.seq;return this.websocket&&this.websocket.readyState===WebSocket.OPEN&&this.websocket.send(JSON.stringify(Object.assign(e,{seq:t}))),t}connect(e){this.websocket=new WebSocket(e),this.websocket.binaryType="arraybuffer",this.addWebSocketEventListeners()}close(){var e;null===(e=this.websocket)||void 0===e||e.close()}addWebSocketEventListeners(){this.websocket&&(this.websocket.addEventListener("open",(e=>{this.emit(dv.Open,e)})),this.websocket.addEventListener("message",(e=>{const{data:t}=e;var r;if(t instanceof ArrayBuffer)0===new Uint8Array(t)[0]&&(null===(r=this.websocket)||void 0===r||r.send(t));else try{this.emit(dv.Message,JSON.parse(t))}catch(e){console.warn("Unsupported format",t)}})),this.websocket.addEventListener("close",(e=>{this.emit(dv.Close,e)})),this.websocket.addEventListener("error",(e=>{this.emit(dv.Error,e)})))}join(e){return{seq:this.sendMessageToRwg({evt:24576,body:{clientCap:e}})}}raiseHand(){return{seq:this.sendMessageToRwg({evt:24580,body:null})}}lowerHand(e){return{seq:this.sendMessageToRwg({evt:24578,jids:e||[]})}}sendWebinarMseeage(e,t,r){const o={msg:e,jid:t?[t]:[],type:r,bcm:arguments.length>3&&void 0!==arguments[3]&&arguments[3]};return{seq:this.sendMessageToRwg({evt:24582,body:o})}}sendAnswer(e,t,r){return{seq:this.sendMessageToRwg({evt:24584,body:{question_attendeejid:t.jid,question_attendeename:t.displayName,question_text:t.questionText,question_id:t.questionId,question_anonymous:t.isAnonymous,question_time:t.questionTime,text:e,isPrivate:r}})}}answerOnline(e,t){return{seq:this.sendMessageToRwg({evt:24586,body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,isLiveStart:t}})}}dismissQuestion(e){return{seq:this.sendMessageToRwg({evt:24590,body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,bOpen:!1}})}}deleteQuestion(e){return{seq:this.sendMessageToRwg({evt:24614,body:{question_id:e,bDelete:!0}})}}deleteComment(e){return{seq:this.sendMessageToRwg({body:{comment_id:e,bDelete:!0},evt:24616})}}reopenQuestion(e){return{seq:this.sendMessageToRwg({body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,bOpen:!0},evt:24590})}}askQuestion(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=arguments.length>3?arguments[3]:void 0;const n=In();return{seq:this.sendMessageToRwg({body:{id:n,text:e,isAnonymous:r,bAllowAttendeeViewAllQuestion:o,name:t},evt:24592}),questionId:n}}upOrDownVote(e,t){return{seq:this.sendMessageToRwg({body:{question_attendeejid:e.jid,question_attendeename:e.displayName,question_text:e.questionText,question_id:e.questionId,question_anonymous:e.isAnonymous,question_time:e.questionTime,bUpVote:t},evt:24598})}}rename(e,t){return{seq:this.sendMessageToRwg({body:{jid:e,displayName:t},evt:24600})}}setSkinTome(e){return{seq:this.sendMessageToRwg({body:{skinTone:e},evt:24618})}}}cv.xmppInstance=null;var lv=Object.freeze({__proto__:null,startIdleTimerEpic:(e,t)=>e.pipe(tr(`${ai}`),Zt(t),Ke((e=>{let[,t]=e;return void 0!==t.meeting.zlkJwtToken})),Ut((()=>(sv&&sv.complete(),sv=new N,av=We(6e4).pipe(ye((()=>performance.now()))).subscribe(sv),sv.pipe(ye((e=>Xn(e)))))))),terminateIdleTimerEpic:e=>e.pipe(tr(`${Jr}`)).pipe(Gt((()=>{sv&&(sv.complete(),av.unsubscribe())})),kt(W)),idleCheckingEpic:(e,t)=>e.pipe(tr(`${Xn}`),Zt(t),Pe((e=>{var t;let[r,o]=e;const{meeting:{idleStartTime:n,sessionIdleTimeoutMins:i,isOriginHost:s},participants:{attendeesList:a,xmppAttendeeList:u},recording:d,breakoutRoom:c}=o,l=r.payload,p=[];if(1===a.length&&0===u.length&&(null==c||null===(t=c.currentRoom)||void 0===t?void 0:t.status)!==gl.InRoom&&(null==d?void 0:d.cmrStatus)!==Ra.Start)if(n){const e=s&&dl(a[0].userRole)?i:40;l-n>60*e*1e3&&(console.warn(`No active for ${e} minutes, will end the session.`),p.push(Yn()),Xe(500).subscribe((()=>{xc()})))}else p.push(Ii(l));else p.push(Ii(void 0));return Oe(p)}))),resetIdleStartTimeEpic:(e,t)=>e.pipe(tr(`${Zr}`),Ke((e=>[Is,As].includes(e.payload.evt)&&void 0!==t.value.meeting.idleStartTime)),ee(he),Pe((()=>{var e;const{participants:{attendeesList:r,xmppAttendeeList:o},recording:n,breakoutRoom:i}=t.value,s=[];return(r.length>1||o.length>0||(null==n?void 0:n.cmrStatus)===Ra.Start||(null==i||null===(e=i.currentRoom)||void 0===e?void 0:e.status)===gl.InRoom)&&s.push(Ii(void 0)),Oe(s)}))),resetIdleStartTimeAfterLeaveMeetingEpic:e=>e.pipe(tr(`${Zn}`,`${Yn}`),At(Ii(void 0)))});const pv=Ws.createAgent();var hv=Object.freeze({__proto__:null,startReportFailoverReasonEpic:(e,t)=>e.pipe(tr(`${ei}`),Ut((()=>{const r=0===t.value.meeting.failover.joinMeetingSuccessTimestamp&&!!Wi.get(ms.WebclientZoomId);return e.pipe(tr(`${ai}`),bt(1),Pe((()=>{const e=[],o=Wi.get(ms.WebclientFailoverCount)||0;let{meeting:{failover:{count:n,reason:i,interval:s}}}=t.value;const{meeting:{pingRWCTimestamp:a}}=t.value;r&&(n=o+1,i=Bi.RefreshPage,s=0,Wi.set(ms.WebclientFailoverCount,n,Fi.SessionStorage),e.push(Di({count:n,reason:i,interval:s})));const u=performance.now();let d=`WCL_M, JMCT(${u-a})`;return n>0&&i!==Bi.NormalCase&&(d=`${d},FAILOVER(${n},${i},${(s/1e3).toFixed(1)})`),pv.sendRWGConnectionPerformance(d),e.push(ki(),Ri(u)),Oe(e)})))}))),recordFailoverReasonEpic:(e,t)=>e.pipe(tr(`${Qn}`),Pe((e=>{const{payload:r}=e,{meeting:{failover:{joinMeetingSuccessTimestamp:o,isCurrentFailoverRecorded:n}}}=t.value,i=[];if(!n){let e=Wi.get(ms.WebclientFailoverCount)||0;r!==Bi.NormalCase&&(e+=1,Wi.set(ms.WebclientFailoverCount,e,Fi.SessionStorage));const t=performance.now()-o;i.push(Di({reason:r,count:e,interval:t}))}return Oe(i)})))});let fv=null;var mv=Object.freeze({__proto__:null,startStayAwakeEpic:(e,t)=>e.pipe(tr(`${ai}`),Zt(t),Ke((e=>{let[,t]=e;return!!t.meeting.stayAwake})),Gt((async()=>{try{fv&&fv.release().then((()=>{fv=null})),"wakeLock"in navigator&&((Ji()||Zi())&&await Qe(xe(document,"click").pipe(bt(1)),xe(document,"touchend").pipe(bt(1))).toPromise(),fv=await navigator.wakeLock.request("screen"),fv.addEventListener("release",(()=>{})))}catch(e){}})),Ut((()=>xe(document,"visibilitychange").pipe(Pe((async()=>{"visible"===document.visibilityState?(fv&&fv.release().then((()=>{fv=null})),"wakeLock"in navigator&&((Ji()||Zi())&&await Qe(xe(document,"click").pipe(bt(1)),xe(document,"touchend").pipe(bt(1))).toPromise(),fv=await navigator.wakeLock.request("screen"))):fv&&fv.release().then((()=>{fv=null}))})),kt(W))))),cancelStayAwakeEpic:e=>e.pipe(tr(`${Jr}`)).pipe(Gt((()=>{fv&&fv.release().then((()=>{fv=null}))})),kt(W))}),gv="undefined"!=typeof window&&window,vv="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,yv="undefined"!=typeof global&&global,bv=gv||yv||vv;function Sv(e,t){return void 0===t&&(t=null),new Tv({method:"GET",url:e,headers:t})}function _v(e,t,r){return new Tv({method:"POST",url:e,body:t,headers:r})}function Ev(e,t){return new Tv({method:"DELETE",url:e,headers:t})}function Iv(e,t,r){return new Tv({method:"PUT",url:e,body:t,headers:r})}function Av(e,t,r){return new Tv({method:"PATCH",url:e,body:t,headers:r})}!function(){if(!bv)throw new Error("RxJS could not find any global context (window, self, global)")}();var wv=ye((function(e,t){return e.response}));function Cv(e,t){return wv(new Tv({method:"GET",url:e,responseType:"json",headers:t}))}var Tv=function(e){function t(t){var r=e.call(this)||this,o={async:!0,createXHR:function(){return this.crossDomain?function(){if(bv.XMLHttpRequest)return new bv.XMLHttpRequest;if(bv.XDomainRequest)return new bv.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(bv.XMLHttpRequest)return new bv.XMLHttpRequest;var e=void 0;try{for(var t=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(e=t[r],new bv.ActiveXObject(e))break}catch(e){}return new bv.ActiveXObject(e)}catch(e){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof t)o.url=t;else for(var n in t)t.hasOwnProperty(n)&&(o[n]=t[n]);return r.request=o,r}var r;return c(t,e),t.prototype._subscribe=function(e){return new Ov(e,this.request)},t.create=((r=function(e){return new t(e)}).get=Sv,r.post=_v,r.delete=Ev,r.put=Iv,r.patch=Av,r.getJSON=Cv,r),t}(R),Ov=function(e){function t(t,r){var o=e.call(this,t)||this;o.request=r,o.done=!1;var n=r.headers=r.headers||{};return r.crossDomain||o.getHeader(n,"X-Requested-With")||(n["X-Requested-With"]="XMLHttpRequest"),o.getHeader(n,"Content-Type")||bv.FormData&&r.body instanceof bv.FormData||void 0===r.body||(n["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=o.serializeBody(r.body,o.getHeader(r.headers,"Content-Type")),o.send(),o}return c(t,e),t.prototype.next=function(e){this.done=!0;var t,r=this,o=r.xhr,n=r.request,i=r.destination;try{t=new Rv(e,o,n)}catch(e){return i.error(e)}i.next(t)},t.prototype.send=function(){var e=this.request,t=this.request,r=t.user,o=t.method,n=t.url,i=t.async,s=t.password,a=t.headers,u=t.body;try{var d=this.xhr=e.createXHR();this.setupEvents(d,e),r?d.open(o,n,i,r,s):d.open(o,n,i),i&&(d.timeout=e.timeout,d.responseType=e.responseType),"withCredentials"in d&&(d.withCredentials=!!e.withCredentials),this.setHeaders(d,a),u?d.send(u):d.send()}catch(e){this.error(e)}},t.prototype.serializeBody=function(e,t){if(!e||"string"==typeof e)return e;if(bv.FormData&&e instanceof bv.FormData)return e;if(t){var r=t.indexOf(";");-1!==r&&(t=t.substring(0,r))}switch(t){case"application/x-www-form-urlencoded":return Object.keys(e).map((function(t){return encodeURIComponent(t)+"="+encodeURIComponent(e[t])})).join("&");case"application/json":return JSON.stringify(e);default:return e}},t.prototype.setHeaders=function(e,t){for(var r in t)t.hasOwnProperty(r)&&e.setRequestHeader(r,t[r])},t.prototype.getHeader=function(e,t){for(var r in e)if(r.toLowerCase()===t.toLowerCase())return e[r]},t.prototype.setupEvents=function(e,t){var r,o,n=t.progressSubscriber;function i(e){var t,r=i,o=r.subscriber,n=r.progressSubscriber,s=r.request;n&&n.error(e);try{t=new Mv(this,s)}catch(e){t=e}o.error(t)}(e.ontimeout=i,i.request=t,i.subscriber=this,i.progressSubscriber=n,e.upload&&"withCredentials"in e)&&(n&&(r=function(e){r.progressSubscriber.next(e)},bv.XDomainRequest?e.onprogress=r:e.upload.onprogress=r,r.progressSubscriber=n),o=function(e){var t,r=o,n=r.progressSubscriber,i=r.subscriber,s=r.request;n&&n.error(e);try{t=new kv("ajax error",this,s)}catch(e){t=e}i.error(t)},e.onerror=o,o.request=t,o.subscriber=this,o.progressSubscriber=n);function s(e){}function a(e){var t=a,r=t.subscriber,o=t.progressSubscriber,n=t.request;if(4===this.readyState){var i=1223===this.status?204:this.status,s="text"===this.responseType?this.response||this.responseText:this.response;if(0===i&&(i=s?200:0),i<400)o&&o.complete(),r.next(e),r.complete();else{o&&o.error(e);var u=void 0;try{u=new kv("ajax error "+i,this,n)}catch(e){u=e}r.error(u)}}}e.onreadystatechange=s,s.subscriber=this,s.progressSubscriber=n,s.request=t,e.onload=a,a.subscriber=this,a.progressSubscriber=n,a.request=t},t.prototype.unsubscribe=function(){var t=this.done,r=this.xhr;!t&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),e.prototype.unsubscribe.call(this)},t}(I),Rv=function(e,t,r){this.originalEvent=e,this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType||r.responseType,this.response=Dv(this.responseType,t)},kv=function(){function e(e,t,r){return Error.call(this),this.message=e,this.name="AjaxError",this.xhr=t,this.request=r,this.status=t.status,this.responseType=t.responseType||r.responseType,this.response=Dv(this.responseType,t),this}return e.prototype=Object.create(Error.prototype),e}();function Dv(e,t){switch(e){case"json":return function(e){return"response"in e?e.responseType?e.response:JSON.parse(e.response||e.responseText||"null"):JSON.parse(e.responseText||"null")}(t);case"xml":return t.responseXML;default:return"response"in t?t.response:t.responseText}}var Pv,Mv=function(e,t){return kv.call(this,"ajax timeout",e,t),this.name="AjaxTimeoutError",this},Nv=Tv.create,Lv=new Uint8Array(16);function Vv(){if(!Pv&&!(Pv="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Pv(Lv)}for(var Uv,jv,xv,Bv,Fv=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,Hv=[],Wv=0;Wv<256;++Wv)Hv.push((Wv+256).toString(16).substr(1));function $v(e,t,r){var o=(e=e||{}).random||(e.rng||Vv)();if(o[6]=15&o[6]|64,o[8]=63&o[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=o[n];return t}return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(Hv[e[t+0]]+Hv[e[t+1]]+Hv[e[t+2]]+Hv[e[t+3]]+"-"+Hv[e[t+4]]+Hv[e[t+5]]+"-"+Hv[e[t+6]]+Hv[e[t+7]]+"-"+Hv[e[t+8]]+Hv[e[t+9]]+"-"+Hv[e[t+10]]+Hv[e[t+11]]+Hv[e[t+12]]+Hv[e[t+13]]+Hv[e[t+14]]+Hv[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&Fv.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r}(o)}!function(e){e[e.PLAIN=0]="PLAIN",e[e.RSA=1]="RSA",e[e.AESGCM256=2]="AESGCM256"}(Uv||(Uv={})),function(e){e[e.info=0]="info",e[e.debug=1]="debug",e[e.log=2]="log",e[e.warn=3]="warn",e[e.error=4]="error"}(jv||(jv={})),function(e){e[e.PROTECT_LOCAL_KEY=0]="PROTECT_LOCAL_KEY"}(xv||(xv={})),function(e){e.beforeInit="beforeInit",e.afterInit="afterInit",e.beforeLog="beforeLog",e.hitSizeLimit="hitSizeLimit",e.afterLog="afterLog",e.beforeReport="beforeReport",e.afterReport="afterReport"}(Bv||(Bv={}));class Gv{constructor(){}}var zv,Kv={exports:{}},qv={exports:{}},Jv=lr(Object.freeze({__proto__:null,default:{}}));qv.exports=(zv=zv||function(e,t){var r;if("undefined"!=typeof window&&window.crypto&&(r=window.crypto),"undefined"!=typeof self&&self.crypto&&(r=self.crypto),"undefined"!=typeof globalThis&&globalThis.crypto&&(r=globalThis.crypto),!r&&"undefined"!=typeof window&&window.msCrypto&&(r=window.msCrypto),!r&&void 0!==dr&&dr.crypto&&(r=dr.crypto),!r)try{r=Jv}catch(e){}var o=function(){if(r){if("function"==typeof r.getRandomValues)try{return r.getRandomValues(new Uint32Array(1))[0]}catch(e){}if("function"==typeof r.randomBytes)try{return r.randomBytes(4).readInt32LE()}catch(e){}}throw new Error("Native crypto module could not be used to get secure random number.")},n=Object.create||function(){function e(){}return function(t){var r;return e.prototype=t,r=new e,e.prototype=null,r}}(),i={},s=i.lib={},a=s.Base={extend:function(e){var t=n(this);return e&&t.mixIn(e),t.hasOwnProperty("init")&&this.init!==t.init||(t.init=function(){t.$super.init.apply(this,arguments)}),t.init.prototype=t,t.$super=this,t},create:function(){var e=this.extend();return e.init.apply(e,arguments),e},init:function(){},mixIn:function(e){for(var t in e)e.hasOwnProperty(t)&&(this[t]=e[t]);e.hasOwnProperty("toString")&&(this.toString=e.toString)},clone:function(){return this.init.prototype.extend(this)}},u=s.WordArray=a.extend({init:function(e,t){e=this.words=e||[],this.sigBytes=null!=t?t:4*e.length},toString:function(e){return(e||c).stringify(this)},concat:function(e){var t=this.words,r=e.words,o=this.sigBytes,n=e.sigBytes;if(this.clamp(),o%4)for(var i=0;i>>2]>>>24-i%4*8&255;t[o+i>>>2]|=s<<24-(o+i)%4*8}else for(var a=0;a>>2]=r[a>>>2];return this.sigBytes+=n,this},clamp:function(){var t=this.words,r=this.sigBytes;t[r>>>2]&=4294967295<<32-r%4*8,t.length=e.ceil(r/4)},clone:function(){var e=a.clone.call(this);return e.words=this.words.slice(0),e},random:function(e){for(var t=[],r=0;r>>2]>>>24-n%4*8&255;o.push((i>>>4).toString(16)),o.push((15&i).toString(16))}return o.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o>>3]|=parseInt(e.substr(o,2),16)<<24-o%8*4;return new u.init(r,t/2)}},l=d.Latin1={stringify:function(e){for(var t=e.words,r=e.sigBytes,o=[],n=0;n>>2]>>>24-n%4*8&255;o.push(String.fromCharCode(i))}return o.join("")},parse:function(e){for(var t=e.length,r=[],o=0;o>>2]|=(255&e.charCodeAt(o))<<24-o%4*8;return new u.init(r,t)}},p=d.Utf8={stringify:function(e){try{return decodeURIComponent(escape(l.stringify(e)))}catch(e){throw new Error("Malformed UTF-8 data")}},parse:function(e){return l.parse(unescape(encodeURIComponent(e)))}},h=s.BufferedBlockAlgorithm=a.extend({reset:function(){this._data=new u.init,this._nDataBytes=0},_append:function(e){"string"==typeof e&&(e=p.parse(e)),this._data.concat(e),this._nDataBytes+=e.sigBytes},_process:function(t){var r,o=this._data,n=o.words,i=o.sigBytes,s=this.blockSize,a=i/(4*s),d=(a=t?e.ceil(a):e.max((0|a)-this._minBufferSize,0))*s,c=e.min(4*d,i);if(d){for(var l=0;l>>6-s%4*2;n[i>>>2]|=a<<24-i%4*8,i++}return r.create(n,i)}t.enc.Base64={stringify:function(e){var t=e.words,r=e.sigBytes,o=this._map;e.clamp();for(var n=[],i=0;i>>2]>>>24-i%4*8&255)<<16|(t[i+1>>>2]>>>24-(i+1)%4*8&255)<<8|t[i+2>>>2]>>>24-(i+2)%4*8&255,a=0;a<4&&i+.75*a>>6*(3-a)&63));var u=o.charAt(64);if(u)for(;n.length%4;)n.push(u);return n.join("")},parse:function(e){var t=e.length,r=this._map,n=this._reverseMap;if(!n){n=this._reverseMap=[];for(var i=0;i{const t=Qv.exports.parse(e);return Kv.exports.stringify(t)},Xv=e=>{for(var t=e.length,r=e.length-1;r>=0;r--){var o=e.charCodeAt(r);o>127&&o<=2047?t++:o>2047&&o<=65535&&(t+=2),o>=56320&&o<=57343&&r--}return t};function ey(e){const t=new ArrayBuffer(e.length),r=new Uint8Array(t);for(let t=0,o=e.length;tZv(void 0,void 0,void 0,(function*(){return yield self.crypto.subtle.generateKey({name:"AES-GCM",length:256},!0,["encrypt","decrypt"])})),ny=(e,t,r)=>Zv(void 0,void 0,void 0,(function*(){try{return yield self.crypto.subtle.encrypt({name:"AES-GCM",iv:r},t,e)}catch(e){throw e}})),iy=(e,t,r)=>Zv(void 0,void 0,void 0,(function*(){try{return yield self.crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,e)}catch(e){throw e}})),sy=(e,t)=>Zv(void 0,void 0,void 0,(function*(){try{return yield self.crypto.subtle.decrypt({name:"RSA-OAEP"},t,e)}catch(e){throw e}})),ay=(e,t,r)=>Zv(void 0,void 0,void 0,(function*(){return new Promise(((o,n)=>{requestAnimationFrame((()=>Zv(void 0,void 0,void 0,(function*(){var i;try{const n=null===(i=null==t?void 0:t.algorithm)||void 0===i?void 0:i.name;let s;if("RSA-OAEP"===n?s=sy:"AES-GCM"===n&&(s=iy),!s)throw new Error("Unsupported encrypt key type");if("string"==typeof e){const n=new TextEncoder,i=yield s(n.encode(e),t,r);o(i)}else{const n=yield s(e,t,r);o(n)}}catch(e){n(e)}}))))}))})),uy=(e,t)=>{const r="string"==typeof e?ey(e):e;return self.crypto.subtle.encrypt({name:"RSA-OAEP"},t,r)},dy=(e,t,r)=>Zv(void 0,void 0,void 0,(function*(){return new Promise(((o,n)=>{requestAnimationFrame((()=>Zv(void 0,void 0,void 0,(function*(){var n;const i=null===(n=null==t?void 0:t.algorithm)||void 0===n?void 0:n.name;let s;if("RSA-OAEP"===i?s=uy:"AES-GCM"===i&&(s=ny),!s)throw new Error("Unsupported encrypt key type");if("string"==typeof e){const n=new TextEncoder,i=yield s(n.encode(e),t,r);o(i)}else{const n=yield s(e,t,r);o(n)}}))))}))})),cy={},ly=(e,t)=>{cy[t]=e},py=cy;var hy=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const fy=(e,t,r,o)=>hy(void 0,void 0,void 0,(function*(){try{if(!e||!t||!r)return null;const o=yield self.crypto.subtle.decrypt({name:"AES-GCM",iv:r},t,e);return String.fromCharCode.apply(null,new Uint8Array(o))}catch(e){throw e}})),my={decryptAESGCM256:fy,bulkDecryptAESGCM256:e=>hy(void 0,void 0,void 0,(function*(){return yield Promise.all(e.map((e=>fy(...e))))}))};var gy=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const vy=e=>{let t=0;return t+=Xv(e.message),e.tags.forEach((e=>{t+=Xv(e)})),t},yy={success:!1,codecWorker:null},by=[],Sy=()=>gy(void 0,void 0,void 0,(function*(){if(yy.success)return yy.codecWorker;{const e=new Promise(((e,t)=>{by.push((()=>{e(null)}))}));return yield e,yy.codecWorker}}));class _y{constructor(e){this.uuid=self.crypto.randomUUID();const{databaseName:t,maxSize:r,publicKey:o,reportUrl:n,plugins:i,idbManager:s,logManager:a,currentSize:u,externalKeys:d,codecWorkerFilePath:c}=e;yy.codecWorker=my,by.forEach((e=>{e()})),yy.success=!0,console.log("codec worker init success"),this.databaseName=t,this.maxSize=r,this.publicKey=null!=o?o:"",this.reportUrl=null!=n?n:"",this.plugins=null!=i?i:[],this.idbManager=s,this.logManager=a,this.currentSize=null!=u?u:0,this.getCodecWorker=Sy,this.externalKeys=d,this.commonMethods=Object.assign({},py)}getLocalAESGCM256Key(){var e;return gy(this,void 0,void 0,(function*(){if(this.localAESGCM256Key)return this.localAESGCM256Key;this.localAESGCM256Key=yield oy();const t=this.externalKeys?null===(e=this.externalKeys.filter((e=>e.usage===xv.PROTECT_LOCAL_KEY))[0])||void 0===e?void 0:e.key:void 0;return yield this.idbManager.saveAESGCM256Key(this.uuid,this.localAESGCM256Key,t),this.localAESGCM256Key}))}updateCurrentSize(e){var t;let r=null!==(t=this.currentSize)&&void 0!==t?t:0;if(e instanceof Map)for(const[t,o]of e)r+=vy(o);else r+=vy(e);return this.currentSize=r,r>=this.maxSize}}const Ey=(...e)=>{const t={},r=[];for(const o of e)o.forEach((e=>{t[e.id]||(t[e.id]=!0,r.push(e))}));const o=new Map;return r.sort(((e,t)=>(null==e?void 0:e.id)-(null==t?void 0:t.id))).forEach((e=>{o.set(e.id,e)})),o},Iy=(e,t)=>{const r=new Map;return t.forEach((t=>{e(t)&&r.set(t.id,t)})),r};class Ay{constructor(){this.getStore=()=>({byTag:Object.assign({},this.store.byTag),byTime:new Map(this.store.byTime)}),this.pushByTime=e=>{for(const t of e)this.store.byTime.set(t.id,t)},this.pushByTag=e=>{e.forEach((e=>{const t=e.tags;Array.isArray(t)&&t.forEach((t=>{this.store.byTag[t]||(this.store.byTag[t]=new Map),this.store.byTag[t].set(e.id,e)}))}))},this.addLog=e=>{let t=e;Array.isArray(e)||(t=[e]),this.pushByTime(t),this.pushByTag(t)},this.syncFromIDB=e=>function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const t=yield e.getAllLogs();this.addLog(t)})),this.reset=()=>{this.store={byTag:{},byTime:new Map}},this.deleteLogs=e=>{for(const t of e){const e=this.store.byTime.get(t);if(!e)continue;const{tags:r}=e;for(const e of r)this.store.byTag[e].delete(t);this.store.byTime.delete(t)}},this.filterStore=e=>{const t=((e,t)=>{if(!t)return e.byTime;if("string"==typeof t)return e.byTag[t]||new Map;if(Array.isArray(t)){if(t.every((e=>"string"==typeof e)))return Ey(...t.map((t=>e.byTag[t])).filter((e=>Boolean(e))))}else{if("function"==typeof t)return Iy(t,e.byTime);if("object"==typeof t)if(t.tags&&t.filter){if("string"==typeof t.tags)return Iy(t.filter,e.byTag[t.tags]);if(Array.isArray(t.tags)&&t.tags.every((e=>"string"==typeof e)))return Ey(...t.tags.map((r=>{const o=e.byTag[r];return o?Iy(t.filter,o):new Map})))}else{if(t.filter)return Iy(t.filter,e.byTime);if(t.tags){if("string"==typeof t)return e.byTag[t]||new Map;if(Array.isArray(t)&&t.every((e=>"string"==typeof e)))return Ey(...t.map((t=>e.byTag[t])))}}else console.error("Wrong filter type")}return new Map})(this.store,e),r=new Map;for(const[e,o]of t){const t=o.encryptMode!==Uv.AESGCM256,n=Object.assign(Object.assign({},o),{message:t?Yv(o.message):o.message});r.set(e,n)}return r},this.store={byTag:{},byTime:new Map}}}function wy(e,t,r){const o=e.plugins;if(!Array.isArray(o))return r;let n=r;return o.forEach((r=>{const o=r[t];if("function"==typeof o){const t=o(e,n);t&&(n=t)}})),n}const Cy=(e,t,r,o,n,i={})=>function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))}(void 0,void 0,void 0,(function*(){const{noCache:s,extraProperties:a={}}=i,u=((e,t,r,o,n,i)=>{const s=Array.isArray(t)?t:[t],a=Date.now();return Object.assign({message:e,logLevel:r,tags:s,encryptMode:o,timestamp:a,laplaceSessionId:n},i)})(`${t}`,r,o,n,e.uuid,a),d=wy(e,Bv.beforeLog,u);if(s)wy(e,Bv.afterLog,u);else{const{idbManager:t,logManager:r}=e,o=yield t.makeNextId();if(n===Uv.AESGCM256){const t=yield e.getLocalAESGCM256Key(),r=yield dy(d.message,t,new Uint8Array(16));d.message=ty(r)}else d.message=(e=>{const t=Kv.exports.parse(e);return Qv.exports.stringify(t)})(d.message);const i=Object.assign(Object.assign({},d),{id:o});e.updateCurrentSize(i)&&wy(e,Bv.hitSizeLimit,i),r.addLog(i),t.addLog(i),wy(e,Bv.afterLog,i)}}));ly(Cy,"commonLog");var Ty={},Oy=Uint8Array,Ry=Uint16Array,ky=Uint32Array,Dy=new Oy([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),Py=new Oy([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),My=new Oy([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Ny=function(e,t){for(var r=new Ry(31),o=0;o<31;++o)r[o]=t+=1<>>1|(21845&Hy)<<1;Wy=(61680&(Wy=(52428&Wy)>>>2|(13107&Wy)<<2))>>>4|(3855&Wy)<<4,Fy[Hy]=((65280&Wy)>>>8|(255&Wy)<<8)>>>1}var $y=function(e,t,r){for(var o=e.length,n=0,i=new Ry(t);n>>u]=d}else for(s=new Ry(o),n=0;n>>15-e[n]);return s},Gy=new Oy(288);for(Hy=0;Hy<144;++Hy)Gy[Hy]=8;for(Hy=144;Hy<256;++Hy)Gy[Hy]=9;for(Hy=256;Hy<280;++Hy)Gy[Hy]=7;for(Hy=280;Hy<288;++Hy)Gy[Hy]=8;var zy=new Oy(32);for(Hy=0;Hy<32;++Hy)zy[Hy]=5;var Ky=$y(Gy,9,0),qy=$y(Gy,9,1),Jy=$y(zy,5,0),Qy=$y(zy,5,1),Zy=function(e){for(var t=e[0],r=1;rt&&(t=e[r]);return t},Yy=function(e,t,r){var o=t/8|0;return(e[o]|e[o+1]<<8)>>(7&t)&r},Xy=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},eb=function(e){return(e+7)/8|0},tb=function(e,t,r){(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length);var o=new(2==e.BYTES_PER_ELEMENT?Ry:4==e.BYTES_PER_ELEMENT?ky:Oy)(r-t);return o.set(e.subarray(t,r)),o},rb=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ob=function(e,t,r){var o=new Error(t||rb[e]);if(o.code=e,Error.captureStackTrace&&Error.captureStackTrace(o,ob),!r)throw o;return o},nb=function(e,t,r){r<<=7&t;var o=t/8|0;e[o]|=r,e[o+1]|=r>>>8},ib=function(e,t,r){r<<=7&t;var o=t/8|0;e[o]|=r,e[o+1]|=r>>>8,e[o+2]|=r>>>16},sb=function(e,t){for(var r=[],o=0;op&&(p=i[o].s);var h=new Ry(p+1),f=ab(r[c-1],h,0);if(f>t){o=0;var m=0,g=f-t,v=1<t))break;m+=v-(1<>>=g;m>0;){var b=i[o].s;h[b]=0&&m;--o){var S=i[o].s;h[S]==t&&(--h[S],++m)}f=t}return[new Oy(h),f]},ab=function(e,t,r){return-1==e.s?Math.max(ab(e.l,t,r+1),ab(e.r,t,r+1)):t[e.s]=r},ub=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Ry(++t),o=0,n=e[0],i=1,s=function(e){r[o++]=e},a=1;a<=t;++a)if(e[a]==n&&a!=t)++i;else{if(!n&&i>2){for(;i>138;i-=138)s(32754);i>2&&(s(i>10?i-11<<5|28690:i-3<<5|12305),i=0)}else if(i>3){for(s(n),--i;i>6;i-=6)s(8304);i>2&&(s(i-3<<5|8208),i=0)}for(;i--;)s(n);i=1,n=e[a]}return[r.subarray(0,o),t]},db=function(e,t){for(var r=0,o=0;o>>8,e[n+2]=255^e[n],e[n+3]=255^e[n+1];for(var i=0;i4&&!C[My[O-1]];--O);var R,k,D,P,M=d+5<<3,N=db(n,Gy)+db(i,zy)+s,L=db(n,p)+db(i,m)+s+14+3*O+db(I,C)+(2*I[16]+3*I[17]+7*I[18]);if(M<=N&&M<=L)return cb(t,c,e.subarray(u,u+d));if(nb(t,c,1+(L15&&(nb(t,c,x[A]>>>5&127),c+=x[A]>>>12)}}}else R=Ky,k=Gy,D=Jy,P=zy;for(A=0;A255){B=o[A]>>>18&31,ib(t,c,R[B+257]),c+=k[B+257],B>7&&(nb(t,c,o[A]>>>23&31),c+=Dy[B]);var F=31&o[A];ib(t,c,D[F]),c+=P[F],F>3&&(ib(t,c,o[A]>>>5&8191),c+=Py[F])}else ib(t,c,R[o[A]]),c+=k[o[A]];return ib(t,c,R[256]),c+k[256]},pb=new ky([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),hb=new Oy(0),fb=function(e,t,r,o,n,i){var s=e.length,a=new Oy(o+s+5*(1+Math.ceil(s/7e3))+n),u=a.subarray(o,a.length-n),d=0;if(!t||s<8)for(var c=0;c<=s;c+=65535){var l=c+65535;l>=s&&(u[d>>3]=i),d=cb(u,d+1,e.subarray(c,l))}else{for(var p=pb[t-1],h=p>>>13,f=8191&p,m=(1<7e3||C>24576)&&P>423){d=lb(e,u,0,_,E,I,w,C,O,c-O,d),C=A=w=0,O=c;for(var M=0;M<286;++M)E[M]=0;for(M=0;M<30;++M)I[M]=0}var N=2,L=0,V=f,U=k-D&32767;if(P>2&&R==S(c-U))for(var j=Math.min(h,P)-1,x=Math.min(32767,c),B=Math.min(258,P);U<=x&&--V&&k!=D;){if(e[c+N]==e[c+N-U]){for(var F=0;FN){if(N=F,L=U,F>j)break;var H=Math.min(U,F-2),W=0;for(M=0;MW&&(W=G,D=$)}}}U+=(k=D)-(D=g[k])+32768&32767}if(L){_[C++]=268435456|Uy[N]<<18|By[L];var z=31&Uy[N],K=31&By[L];w+=Dy[z]+Py[K],++E[257+z],++I[K],T=c+N,++A}else _[C++]=e[c],++E[e[c]]}}d=lb(e,u,i,_,E,I,w,C,O,c-O,d),!i&&7&d&&(d=cb(u,d+1,hb))}return tb(a,0,o+eb(d)+n)},mb=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,o=9;--o;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),gb=function(){var e=-1;return{p:function(t){for(var r=e,o=0;o>>8;e=r},d:function(){return~e}}},vb=function(e,t,r,o,n){return fb(e,null==t.level?6:t.level,null==t.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,o,!n)},yb=function(e,t,r){for(var o=e(),n=e.toString(),i=n.slice(n.indexOf("[")+1,n.lastIndexOf("]")).replace(/\s+/g,"").split(","),s=0;s>>=8},Ab=function(e,t){var r=t.filename;if(e[0]=31,e[1]=139,e[2]=8,e[8]=t.level<2?4:9==t.level?2:0,e[9]=3,0!=t.mtime&&Ib(e,4,Math.floor(new Date(t.mtime||Date.now())/1e3)),r){e[3]=8;for(var o=0;o<=r.length;++o)e[o+10]=r.charCodeAt(o)}},wb=function(e){return 10+(e.filename&&e.filename.length+1||0)};function Cb(e,t){return vb(e,t||{},0,0)}function Tb(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&ob(7),function(e,t,r,o,n,i){var s=function(e,t,r,o){var n;if(!bb[r]){for(var i="",s={},a=e.length-1,u=0;u>1)),s=0,a=function(e){i[s++]=e};for(o=0;oi.length){var u=new Oy(s+8+(n-o<<1));u.set(i),i=u}var d=e.charCodeAt(o);d<128||t?a(d):d<2048?(a(192|d>>6),a(128|63&d)):d>55295&&d<57344?(a(240|(d=65536+(1047552&d)|1023&e.charCodeAt(++o))>>18),a(128|d>>12&63),a(128|d>>6&63),a(128|63&d)):(a(224|d>>12),a(128|d>>6&63),a(128|63&d))}return tb(i,0,s)}var Pb=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Mb=e=>Pb(void 0,void 0,void 0,(function*(){let t=e.report.meta;t?(t.version="000001",t.flag="0"):t={version:"000001",flag:"0"};const r=Object.assign(Object.assign({},e.report),{meta:t});return Object.assign(Object.assign({},e),{report:r})})),Nb=(e,t=2)=>{let r=`${e}`;for(;r.length{const t=new Date(e);return`${t.getUTCFullYear()}-${Nb(t.getUTCMonth()+1)}-${Nb(t.getUTCDate())} ${Nb(t.getUTCHours())}:${Nb(t.getUTCMinutes())}:${Nb(t.getUTCSeconds())}.${Nb(t.getUTCMilliseconds(),3)}`},Vb=(e,t)=>{const{message:r,logLevel:o,tags:n,timestamp:i,encryptMode:s,id:a}=e,u=function(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n{let o="",n=0;const i=new Map,s=new Map,a=Boolean(t.gzip)?92160:30720;for(const[t,u]of e){const e=Vb(u,r),t=Xv(e);n+tPb(void 0,void 0,void 0,(function*(){const o=e.logManager.filterStore(t);let n=e.publicKey;const{xhrOptions:i={},reportMaker:s,additionalContext:a,gzip:u,encrypt:d,publicKey:c}=r;if(c&&(n=c),d&&!n)throw new Error("Cannot encrypt report without key");const l=wy(e,Bv.beforeReport,o),p=yield((e,t)=>Pb(void 0,void 0,void 0,(function*(){try{const{idbManager:r,getCodecWorker:o,externalKeys:n}=t,i=n?n.filter((e=>e.usage===xv.PROTECT_LOCAL_KEY)).map((e=>e.key)):void 0,s=new Map,a=Array.from(e.values()),u=yield Promise.all(a.map((e=>Pb(void 0,void 0,void 0,(function*(){return e.encryptMode===Uv.AESGCM256?[ry(e.message),yield r.loadAESGCM256Key(e.laplaceSessionId,i),new Uint8Array(16)]:[]})))).map((e=>!1===e[1]?[]:e))),d=yield o(),c=yield d.bulkDecryptAESGCM256(u);return a.forEach(((e,t)=>{const r=c[t];r?s.set(e.id,Object.assign(Object.assign({},e),{message:r})):s.set(e.id,e)})),s}catch(t){return e}})))(l,e);let h=((e,t,r,o)=>{const n=[];let i;do{const s=t(i||e,r,o),{nextReportItems:a}=s;n.push(s),i=a}while(Boolean(i)&&Boolean(null==i?void 0:i.size));return n})(p,null!=s?s:Ub,r,a);if(u){const e=(e=>t=>Pb(void 0,void 0,void 0,(function*(){let r=yield(o=t.report.messages,new Promise(((e,t)=>{Tb(Db(o),{consume:!0},((r,o)=>{r&&t(r),e(o)}))})));var o;e&&(r=ty(r));const n=Object.assign(Object.assign({},t.report),{messages:r});return Object.assign(Object.assign({},t),{report:n})})))(!d);h=yield Promise.all(h.map(e))}h=d?yield Promise.all(h.map((e=>t=>Pb(void 0,void 0,void 0,(function*(){const r=self.crypto.getRandomValues(new Uint8Array(16)),o=yield oy(),n=yield(i=e,Zv(void 0,void 0,void 0,(function*(){const e=i.replace("-----BEGIN PUBLIC KEY-----","").replace("-----END PUBLIC KEY-----",""),t=ey(self.atob(e));return yield self.crypto.subtle.importKey("spki",t,{name:"RSA-OAEP",hash:"SHA-1"},!0,["encrypt"])})));var i;const s=yield(e=>Zv(void 0,void 0,void 0,(function*(){return yield self.crypto.subtle.exportKey("raw",e)})))(o),a=yield uy(s,n),u=yield dy(t.report.messages,o,r),d=Object.assign(Object.assign({},t.report),{messages:ty(u),meta:{key:ty(a),iv:ty(r),version:"000001"}});return Object.assign(Object.assign({},t),{report:d})})))(n))):yield Promise.all(h.map(Mb));const f={success:(t,r,o)=>{wy(e,Bv.afterReport,{report:r,reportItems:o.reportItems,nextReportItems:o.nextReportItems})},fail:(t,r,o)=>{wy(e,Bv.afterReport,{report:r,reportItems:o.reportItems,nextReportItems:o.nextReportItems,error:t})}};((e,t,r,o)=>{e.map((e=>Object.assign(Object.assign({url:t||"",type:"POST",withCredentials:!1,headers:{},data:JSON.stringify(e.report),meta:{reportItems:e.reportItems,nextReportItems:e.nextReportItems}},r),o))).forEach((e=>{(e=>{const t=new XMLHttpRequest;if(t.open(e.type||"GET",e.url,!0),t.withCredentials=e.withCredentials,t.onreadystatechange=function(){if(4===t.readyState){const r=t.status;r>=200&&r<300?e.success&&e.success(t.responseText,e.data,e.meta):e.fail&&e.fail(`Request failed, status: ${r}, responseText: ${t.responseText}`,e.data,e.meta)}},"POST"===e.type){if(e.headers)for(const r in e.headers)t.setRequestHeader(r,e.headers[r]);try{t.send(e.data)}catch(t){e.fail&&e.fail(t,e.data,e.meta)}}})(e)}))})(h,e.reportUrl,f,i)}));ly(jb,"commonReport");var xb=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Bb=(e,t,r)=>xb(void 0,void 0,void 0,(function*(){const{idbManager:o,logManager:n}=e;if(Array.isArray(r)&&(yield o.deleteLogs(r),n.deleteLogs(r),!t))return;const i=e.logManager.filterStore(t),s=[];for(const[e,t]of i)s.push(t.id);let a=s;Array.isArray(s)||(a=[s]),yield o.deleteLogs(a),n.deleteLogs(a)})),Fb=e=>xb(void 0,void 0,void 0,(function*(){const{idbManager:t,logManager:r}=e;yield t.reset(),r.reset()}));function Hb(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r1&&void 0!==arguments[1]?arguments[1]:zb())("readonly",(function(t){return Wb(t.get(e))}))}function qb(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:zb())("readwrite",(function(r){return r.put(t,e),Wb(r.transaction)}))}function Jb(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:zb())("readwrite",(function(t){return e.forEach((function(e){return t.delete(e)})),Wb(t.transaction)}))}function Qb(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:zb();return e("readonly",(function(t){if(t.getAll&&t.getAllKeys)return Promise.all([Wb(t.getAllKeys()),Wb(t.getAll())]).then((function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var o,n,i=[],s=!0,a=!1;try{for(r=r.call(e);!(s=(o=r.next()).done)&&(i.push(o.value),!t||i.length!==t);s=!0);}catch(e){a=!0,n=e}finally{try{s||null==r.return||r.return()}finally{if(a)throw n}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return Hb(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Hb(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2),r=t[0],o=t[1];return r.map((function(e,t){return[e,o[t]]}))}));var r=[];return e("readonly",(function(e){return function(e,t){return e.openCursor().onsuccess=function(){this.result&&(function(e){r.push([e.key,e.value])}(this.result),this.result.continue())},Wb(e.transaction)}(e).then((function(){return r}))}))}))}ly(Bb,"commonDelete"),ly(Fb,"commonReset");var Zb=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const Yb={default:{queue:[],isRunning:!1,listeners:[]}},Xb=e=>{let t=Yb[e];return t||(t={queue:[],isRunning:!1,listeners:[]},Yb[e]=t),t};function eS(e){return Zb(this,void 0,void 0,(function*(){const t=Xb(e),{queue:r,listeners:o}=t;for(;r.length>0&&!t.isRunning;){const o=r.shift();t.isRunning=!0;try{const e=yield o.task();o.resolution(e)}catch(e){o.rejection(e)}t.isRunning=!1,eS(e)}o.length&&o.forEach((e=>{e()}))}))}function tS(e,t){const r=Xb(t);return new Promise(((o,n)=>{r.queue.push({task:e,resolution:o,rejection:n}),eS(t)}))}const rS=(e,t)=>{Xb(e).listeners.push(t)};var oS=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const nS="change_meta",iS="change_log",sS=()=>Promise.resolve();class aS{constructor(e){this.waitingForReset=!1,this.isReseting=!1,this.isChangingMeta=!1,this.isChangingLog=!1,this.get=e=>oS(this,void 0,void 0,(function*(){return yield Kb(e,this.store)})),this.getSecret=e=>oS(this,void 0,void 0,(function*(){return yield Kb(e,this.keyStore)})),this.set=(e,t)=>oS(this,void 0,void 0,(function*(){try{return yield qb(e,t,this.store)}catch(r){r instanceof DOMException&&r&&"QuotaExceededError"===r.name&&(yield this.deleteOldLogsForSetNewOne(),yield this.set(e,t)),console.error(r)}})),this.setSecret=(e,t)=>oS(this,void 0,void 0,(function*(){try{return yield qb(e,t,this.keyStore)}catch(r){r instanceof DOMException&&r&&"QuotaExceededError"===r.name&&(yield this.deleteOldLogsForSetNewOne(),yield this.set(e,t)),console.error(r)}})),this.deleteOldLogsForSetNewOne=()=>oS(this,void 0,void 0,(function*(){var e;const t=yield this.getAllLogs(),r=[];for(let o=0;o<13;o++){const n=null===(e=t[o])||void 0===e?void 0:e.id;(n||0===n)&&r.push(`${n}`)}Jb(r,this.store)})),this.adjustMaxId=()=>oS(this,void 0,void 0,(function*(){return this.isReseting?sS():(this.isChangingMeta=!0,yield tS((()=>oS(this,void 0,void 0,(function*(){var e;const t=yield this.getAllLogs(),r=t[t.length-1],o=null!==(e=null==r?void 0:r.id)&&void 0!==e?e:0;return yield this.set("maxId",o),o}))),nS))})),this.makeNextId=()=>oS(this,void 0,void 0,(function*(){return this.isReseting?sS():(this.isChangingMeta=!0,yield tS((()=>oS(this,void 0,void 0,(function*(){const e=yield this.get("maxId");if(!e&&0!==e)return yield this.set("maxId",0),0;const t=e+1;return yield this.set("maxId",t),t}))),nS))})),this.addLog=e=>oS(this,void 0,void 0,(function*(){if(this.isReseting)return sS();this.isChangingLog=!0,yield tS((()=>oS(this,void 0,void 0,(function*(){const{id:t}=e;this.set(`${t}`,e)}))),iS)})),this.getAllLogs=()=>oS(this,void 0,void 0,(function*(){const e=(yield Qb(this.store)).filter((([e,t])=>"maxId"!==e)).sort(((e,t)=>{var r,o;return(null===(r=e[1])||void 0===r?void 0:r.id)-(null===(o=t[1])||void 0===o?void 0:o.id)})).map((([e,t])=>t));return e})),this.deleteLogs=e=>oS(this,void 0,void 0,(function*(){if(this.isReseting)return sS();this.isChangingLog=!0,yield tS((()=>oS(this,void 0,void 0,(function*(){Jb(e.map((e=>`${e}`)),this.store)}))),iS),yield this.adjustMaxId()})),this.saveAESGCM256Key=(e,t,r)=>oS(this,void 0,void 0,(function*(){if(r){const o=yield self.crypto.subtle.exportKey("raw",t),n=yield dy(o,r,new Uint8Array(16));yield this.setSecret(`aes-gcm-256-${e}`,n)}else yield this.setSecret(`aes-gcm-256-${e}`,t)})),this.loadAESGCM256Key=(e,t)=>oS(this,void 0,void 0,(function*(){const r=yield this.getSecret(`aes-gcm-256-${e}`);if(t){for(let e=0;eoS(this,void 0,void 0,(function*(){return this.isReseting?sS():(this.waitingForReset=!0,this.isChangingLog||this.isChangingMeta?sS():(this.isReseting=!0,yield function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:zb())("readwrite",(function(e){return e.clear(),Wb(e.transaction)}))}(this.store),this.isReseting=!1,void(this.waitingForReset=!1)))})),this.store=$b(e,e+"-store"),this.keyStore=$b(e+"-sec",e+"-store"),rS(nS,(()=>{this.isChangingMeta=!1,this.waitingForReset&&this.reset()})),rS(iS,(()=>{this.isChangingLog=!1,this.waitingForReset&&this.reset()}))}}var uS=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const dS={databaseName:"laplace-default-db",maxSize:49283072};class cS{constructor(e){this.commonLogWithContext=(e,t,r,o,n)=>uS(this,void 0,void 0,(function*(){yield Cy(this.runtimeMetaManager,e,t,r,o,n)})),this.commonReportWithContext=(e,t)=>uS(this,void 0,void 0,(function*(){yield jb(this.runtimeMetaManager,e,t)})),this.commonDeleteWithContext=e=>uS(this,void 0,void 0,(function*(){yield Bb(this.runtimeMetaManager,e)})),this.resetWithContext=()=>uS(this,void 0,void 0,(function*(){yield Fb(this.runtimeMetaManager)})),this.initLocalAESGCM256Key=()=>uS(this,void 0,void 0,(function*(){return yield oy()})),this.doNotUseDirtyGetStore=()=>this.runtimeMetaManager.logManager.getStore(),this.log=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.log,Uv.PLAIN,{extraProperties:r})})),this.info=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.info,Uv.PLAIN,{extraProperties:r})})),this.warn=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.warn,Uv.PLAIN,{extraProperties:r})})),this.debug=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.debug,Uv.PLAIN,{extraProperties:r})})),this.error=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.error,Uv.PLAIN,{extraProperties:r})})),this.logWithEncryption=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.log,Uv.AESGCM256,{extraProperties:r})})),this.infoWithEncryption=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.info,Uv.AESGCM256,{extraProperties:r})})),this.debugWithEncryption=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.debug,Uv.AESGCM256,{extraProperties:r})})),this.warnWithEncryption=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.warn,Uv.AESGCM256,{extraProperties:r})})),this.errorWithEncryption=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.error,Uv.AESGCM256,{extraProperties:r})})),this.logWithoutCache=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.log,Uv.PLAIN,{extraProperties:r,noCache:!0})})),this.infoWithoutCache=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.info,Uv.PLAIN,{extraProperties:r,noCache:!0})})),this.warnWithoutCache=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.warn,Uv.PLAIN,{extraProperties:r,noCache:!0})})),this.debugWithoutCache=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.debug,Uv.PLAIN,{extraProperties:r,noCache:!0})})),this.errorWithoutCache=(e,t,r)=>uS(this,void 0,void 0,(function*(){yield this.commonLogWithContext(e,t,jv.error,Uv.PLAIN,{extraProperties:r,noCache:!0})})),this.getLogs=e=>{const t=this.runtimeMetaManager.logManager;return t?t.filterStore(e):new Map},this.reportByHttps=(e,t)=>uS(this,void 0,void 0,(function*(){yield this.commonReportWithContext(e,t)})),this.deleteLog=e=>uS(this,void 0,void 0,(function*(){yield this.commonDeleteWithContext(e)})),this.deleteAll=()=>uS(this,void 0,void 0,(function*(){yield this.resetWithContext()}));const{runtimeMetaManager:t}=e;this.runtimeMetaManager=t}}cS.init=e=>uS(void 0,void 0,void 0,(function*(){const{databaseName:t="laplace-default-db"}=e,r=new aS(t),o=new Ay,n=new _y(Object.assign(Object.assign(Object.assign({},dS),e),{idbManager:r,logManager:o}));wy(n,Bv.beforeInit),yield o.syncFromIDB(n.idbManager);const i=new cS({runtimeMetaManager:n});return wy(n,Bv.afterInit),i}));class lS extends Gv{constructor(e){super(),this.config={verbose:!1},this.beforeLog=(e,t)=>{const{verbose:r}=this.config;switch(r&&console.log("beforeLog, ","state: ",t,"meta: ",e),t.logLevel){case jv.error:console.error(t.message);break;case jv.warn:console.warn(t.message);break;case jv.log:console.log(t.message);break;case jv.debug:console.debug(t.message);break;case jv.info:console.info(t.message)}},this.afterLog=(e,t)=>{const{verbose:r}=this.config;r&&console.log("afterLog, ","state: ",t,"meta: ",e)},this.beforeReport=(e,t)=>{const{verbose:r}=this.config;r&&console.log("beforeReport, ","store: ",t,"meta: ",e)},this.afterReport=(e,t)=>{const{verbose:r}=this.config;r&&console.log("afterReport, ","store: ",t,"meta: ",e)},e&&(this.config=e)}}const pS=e=>{const t=[];for(const[r,o]of e)t.push(o);return t};class hS extends Gv{constructor(e){super(),this.config={debug:!1},this.debugLog=e=>{const{debug:t}=this.config;t&&console.log(`[AutoCleanLogPlugin]: ${e}`)},this.afterInit=e=>{const{expireBefore:t}=this.config;if(!t)return void this.debugLog("early return on beforeInit because expireBefore is falsy");const{logManager:r,commonMethods:{commonDelete:o}}=e,n=r.getStore().byTime,i=("function"==typeof t?pS(n).filter(t):pS(n).filter((e=>e.timestampe.id));o(e,void 0,i),this.debugLog(`afterInit, clean log id: ${i}`)},this.afterReport=(e,{reportItems:t,report:r,nextReportItems:o,error:n})=>{if(n)return this.debugLog("error"),void console.error(n);const{cleanAfterReport:i}=this.config;if(!i)return void this.debugLog("early return on afterReport because cleanAfterReport is falsy");const{commonMethods:{commonDelete:s}}=e,a=("function"==typeof i?pS(t).filter(i):pS(t)).map((e=>e.id));s(e,void 0,a),this.debugLog(`afterReport, clean log id: ${a}`)},e&&(this.config=e)}}let fS=-1;const mS=e=>{addEventListener("pageshow",(t=>{t.persisted&&(fS=t.timeStamp,e(t))}),!0)},gS=()=>window.__WEB_VITALS_POLYFILL__?window.performance&&(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||(()=>{const e=performance.timing,t=performance.navigation.type,r={entryType:"navigation",startTime:0,type:2==t?"back_forward":1===t?"reload":"navigate"};for(const t in e)"navigationStart"!==t&&"toJSON"!==t&&(r[t]=Math.max(e[t]-e.navigationStart,0));return r})()):window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0],vS=()=>{const e=gS();return e&&e.activationStart||0},yS=(e,t)=>{const r=gS();let o="navigate";return fS>=0?o="back-forward-cache":r&&(o=document.prerendering||vS()>0?"prerender":document.wasDiscarded?"restore":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:`v3-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:o}},bS=(e,t,r)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const o=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return o.observe(Object.assign({type:e,buffered:!0},r||{})),o}}catch(e){}},SS=(e,t,r,o)=>{let n,i;return s=>{t.value>=0&&(s||o)&&(i=t.value-(n||0),(i||void 0===n)&&(n=t.value,t.delta=i,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t)))}},_S=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},ES=e=>{const t=t=>{"pagehide"!==t.type&&"hidden"!==document.visibilityState||e(t)};addEventListener("visibilitychange",t,!0),addEventListener("pagehide",t,!0)},IS=e=>{let t=!1;return r=>{t||(e(r),t=!0)}};let AS=-1;const wS=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,CS=e=>{"hidden"===document.visibilityState&&AS>-1&&(AS="visibilitychange"===e.type?e.timeStamp:0,OS())},TS=()=>{addEventListener("visibilitychange",CS,!0),addEventListener("prerenderingchange",CS,!0)},OS=()=>{removeEventListener("visibilitychange",CS,!0),removeEventListener("prerenderingchange",CS,!0)},RS=()=>(AS<0&&(window.__WEB_VITALS_POLYFILL__?(AS=window.webVitals.firstHiddenTime,AS===1/0&&TS()):(AS=wS(),TS()),mS((()=>{setTimeout((()=>{AS=wS(),TS()}),0)}))),{get firstHiddenTime(){return AS}}),kS=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},DS=(e,t)=>{t=t||{},kS((()=>{const r=[1800,3e3],o=RS();let n,i=yS("FCP");const s=bS("paint",(e=>{e.forEach((e=>{"first-contentful-paint"===e.name&&(s.disconnect(),e.startTime{i=yS("FCP"),n=SS(e,i,r,t.reportAllChanges),_S((()=>{i.value=performance.now()-o.timeStamp,n(!0)}))})))}))};let PS,MS,NS,LS;const VS={passive:!0,capture:!0},US=new Date,jS=(e,t)=>{PS||(PS=t,MS=e,NS=new Date,FS(removeEventListener),xS())},xS=()=>{if(MS>=0&&MS{if(e.cancelable){const t=(e.timeStamp>1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?((e,t)=>{const r=()=>{jS(e,t),n()},o=()=>{n()},n=()=>{removeEventListener("pointerup",r,VS),removeEventListener("pointercancel",o,VS)};addEventListener("pointerup",r,VS),addEventListener("pointercancel",o,VS)})(t,e):jS(t,e)}},FS=e=>{["mousedown","keydown","touchstart","pointerdown"].forEach((t=>e(t,BS,VS)))},HS={},WS=e=>{document.prerendering?kS((()=>WS(e))):"complete"!==document.readyState?addEventListener("load",(()=>WS(e)),!0):setTimeout(e,0)};var $S="Expected a function",GS=NaN,zS="[object Symbol]",KS=/^\s+|\s+$/g,qS=/^[-+]0x[0-9a-f]+$/i,JS=/^0b[01]+$/i,QS=/^0o[0-7]+$/i,ZS=parseInt,YS="object"==typeof dr&&dr&&dr.Object===Object&&dr,XS="object"==typeof self&&self&&self.Object===Object&&self,e_=YS||XS||Function("return this")(),t_=Object.prototype.toString,r_=Math.max,o_=Math.min,n_=function(){return e_.Date.now()};function i_(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}function s_(e){if("number"==typeof e)return e;if(function(e){return"symbol"==typeof e||function(e){return!!e&&"object"==typeof e}(e)&&t_.call(e)==zS}(e))return GS;if(i_(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i_(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(KS,"");var r=JS.test(e);return r||QS.test(e)?ZS(e.slice(2),r?2:8):qS.test(e)?GS:+e}var a_=function(e,t,r){var o=!0,n=!0;if("function"!=typeof e)throw new TypeError($S);return i_(r)&&(o="leading"in r?!!r.leading:o,n="trailing"in r?!!r.trailing:n),function(e,t,r){var o,n,i,s,a,u,d=0,c=!1,l=!1,p=!0;if("function"!=typeof e)throw new TypeError($S);function h(t){var r=o,i=n;return o=n=void 0,d=t,s=e.apply(i,r)}function f(e){var r=e-u;return void 0===u||r>=t||r<0||l&&e-d>=i}function m(){var e=n_();if(f(e))return g(e);a=setTimeout(m,function(e){var r=t-(e-u);return l?o_(r,i-(e-d)):r}(e))}function g(e){return a=void 0,p&&o?h(e):(o=n=void 0,s)}function v(){var e=n_(),r=f(e);if(o=arguments,n=this,u=e,r){if(void 0===a)return function(e){return d=e,a=setTimeout(m,t),c?h(e):s}(u);if(l)return a=setTimeout(m,t),h(u)}return void 0===a&&(a=setTimeout(m,t)),s}return t=s_(t)||0,i_(r)&&(c=!!r.leading,i=(l="maxWait"in r)?r_(s_(r.maxWait)||0,t):i,p="trailing"in r?!!r.trailing:p),v.cancel=function(){void 0!==a&&clearTimeout(a),d=0,o=u=n=a=void 0},v.flush=function(){return void 0===a?s:g(n_())},v}(e,t,{leading:o,maxWait:t,trailing:n})};class u_ extends Gv{constructor(e){super(),this.config={debug:!1,publicTags:[]},this.debugLog=e=>{const{debug:t}=this.config;t&&console.log("[AutoLogWebVitalsPlugin]:",e)},this.afterInit=e=>{const{autoReport:t,publicTags:r}=this.config,{commonMethods:{commonLog:o,commonReport:n}}=e,i=a_((r=>{n(e,r,t).catch((t=>{o(e,"web vitals auto report failed",["JS_ERROR"],jv.error,Uv.PLAIN)}))}),600),s=Boolean(t),a=t=>n=>function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))}(this,void 0,void 0,(function*(){const a=JSON.stringify(n),u=r?[t,"AUTO-WEB-VITALS",...r]:[t,"AUTO-WEB-VITALS"];this.debugLog(a),s?(yield o(e,a,u,jv.info,Uv.PLAIN),i(t)):o(e,a,u,jv.info,Uv.PLAIN)}));var u,d;u=a("CLS"),d=d||{},DS(IS((()=>{const e=[.1,.25];let t,r=yS("CLS",0),o=0,n=[];const i=e=>{e.forEach((e=>{if(!e.hadRecentInput){const t=n[0],r=n[n.length-1];o&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(o+=e.value,n.push(e)):(o=e.value,n=[e])}})),o>r.value&&(r.value=o,r.entries=n,t())},s=bS("layout-shift",i);s&&(t=SS(u,r,e,d.reportAllChanges),ES((()=>{i(s.takeRecords()),t(!0)})),mS((()=>{o=0,r=yS("CLS",0),t=SS(u,r,e,d.reportAllChanges),_S((()=>t()))})),setTimeout(t,0))}))),((e,t)=>{t=t||{},kS((()=>{const r=[100,300],o=RS();let n,i=yS("FID");const s=e=>{e.startTime{e.forEach(s)},u=bS("first-input",a);n=SS(e,i,r,t.reportAllChanges),u&&ES(IS((()=>{a(u.takeRecords()),u.disconnect()}))),window.__WEB_VITALS_POLYFILL__?(console.warn('The web-vitals "base+polyfill" build is deprecated. See: https://bit.ly/3aqzsGm'),u||window.webVitals.firstInputPolyfill(s),mS((()=>{i=yS("FID"),n=SS(e,i,r,t.reportAllChanges),window.webVitals.resetFirstInputPolyfill(),window.webVitals.firstInputPolyfill(s)}))):u&&mS((()=>{var o;i=yS("FID"),n=SS(e,i,r,t.reportAllChanges),LS=[],MS=-1,PS=null,FS(addEventListener),o=s,LS.push(o),xS()}))}))})(a("FID")),((e,t)=>{t=t||{},kS((()=>{const r=[2500,4e3],o=RS();let n,i=yS("LCP");const s=e=>{const t=e[e.length-1];if(t){const e=Math.max(t.startTime-vS(),0);e{HS[i.id]||(s(a.takeRecords()),a.disconnect(),HS[i.id]=!0,n(!0))}));["keydown","click"].forEach((e=>{addEventListener(e,o,!0)})),ES(o),mS((o=>{i=yS("LCP"),n=SS(e,i,r,t.reportAllChanges),_S((()=>{i.value=performance.now()-o.timeStamp,HS[i.id]=!0,n(!0)}))}))}}))})(a("LCP")),((e,t)=>{t=t||{};const r=[800,1800];let o=yS("TTFB"),n=SS(e,o,r,t.reportAllChanges);WS((()=>{const i=gS();if(i){const s=i.responseStart;if(s<=0||s>performance.now())return;o.value=Math.max(s-vS(),0),o.entries=[i],n(!0),mS((()=>{o=yS("TTFB",0),n=SS(e,o,r,t.reportAllChanges),n(!0)}))}}))})(a("TTFB")),DS(a("FCP"))},e&&(this.config=e),(null==e?void 0:e.publicTags)&&!Array.isArray(null==e?void 0:e.publicTags)&&(this.config.publicTags=[null==e?void 0:e.publicTags])}}var d_=function(e,t,r,o){return new(r||(r=Promise))((function(n,i){function s(e){try{u(o.next(e))}catch(e){i(e)}}function a(e){try{u(o.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((o=o.apply(e,t||[])).next())}))};const c_=["RESOURCE_ERROR","JS_ERROR","UNHANDLED_PROMISE_REJECTION"];class l_ extends Gv{constructor(e){super(),this.config={debug:!1,publicTags:[]},this.errorCount=0,this.addPublicTags=e=>{const{publicTags:t}=this.config;return t?[...e,...t]:e},this.debugLog=e=>{const{debug:t}=this.config;t&&console.log("[AutoLogErrorPlugin]:",e)},this.ignore=e=>{var t,r,o,n,i;return void 0!==(null===(t=this.config)||void 0===t?void 0:t.maxErrorCount)&&this.errorCount>=(null===(r=this.config)||void 0===r?void 0:r.maxErrorCount)||!!(null===(o=this.config)||void 0===o?void 0:o.ignoredErrorMsgKeywords)&&e&&!(null===(i=null===(n=this.config)||void 0===n?void 0:n.ignoredErrorMsgKeywords)||void 0===i?void 0:i.find((t=>null==e?void 0:e.includes(t))))},this.afterInit=e=>{if(!self.addEventListener)return;const{commonMethods:{commonLog:t,commonReport:r}}=e,{autoReport:o}=this.config;let n;const i=()=>{o&&(n&&clearTimeout(n),n=setTimeout((()=>{r(e,c_,o).catch((r=>{t(e,"auto log error plugin report failed",this.addPublicTags(["JS_ERROR"]),jv.error,Uv.PLAIN)})),this.debugLog(`report with option: ${JSON.stringify(o)}`)}),600))};try{self.addEventListener("error",(r=>d_(this,void 0,void 0,(function*(){var o,n,s,a,u,d,c;if(!this.ignore(null==r?void 0:r.message))if((null==r?void 0:r.target)&&((null===(o=null==r?void 0:r.target)||void 0===o?void 0:o.src)||(null===(n=null==r?void 0:r.target)||void 0===n?void 0:n.href))){const o=`Load Resource Error in ${null===(s=null==r?void 0:r.target)||void 0===s?void 0:s.tagName} element: ${(null===(a=null==r?void 0:r.target)||void 0===a?void 0:a.src)||(null===(u=null==r?void 0:r.target)||void 0===u?void 0:u.href)}`;yield t(e,o,this.addPublicTags(["RESOURCE_ERROR"]),jv.error,Uv.PLAIN),this.errorCount+=1,i(),this.debugLog(o)}else{const o=`Javascript Runtime Error in ${null==r?void 0:r.filename} (${null==r?void 0:r.lineno}:${null==r?void 0:r.colno}): ${null==r?void 0:r.message}\nStack: ${null!==(c=null===(d=null==r?void 0:r.error)||void 0===d?void 0:d.stack)&&void 0!==c?c:null==r?void 0:r.stack}`;yield t(e,o,this.addPublicTags(["JS_ERROR"]),jv.error,Uv.PLAIN),this.errorCount+=1,i(),this.debugLog(r)}})))),self.addEventListener("unhandledrejection",(r=>d_(this,void 0,void 0,(function*(){var o;if(this.ignore(null===(o=null==r?void 0:r.reason)||void 0===o?void 0:o.message))return;let n="";const{reason:s}=r;n="string"==typeof s?`Promise Error: ${s}`:"object"==typeof s?`Promise Error with reason: ${JSON.stringify(s)}`:`Promise Error with unrecognized reason: ${s}`,yield t(e,n,this.addPublicTags(["UNHANDLED_PROMISE_REJECTION"]),jv.error,Uv.PLAIN),this.errorCount+=1,i(),this.debugLog(r)}))))}catch(e){console.error(e)}this.debugLog("afterInit, add listener")},e&&(this.config=e),(null==e?void 0:e.publicTags)&&!Array.isArray(null==e?void 0:e.publicTags)&&(this.config.publicTags=[null==e?void 0:e.publicTags])}}let p_=function(e){return e.AudioEncodeSuccess="init audio encode success",e.AudioDecodeSuccess="init audio decode success",e.AudioEncodeFailed="init audio encode failed",e.AudioDecodeFailed="init audio decode failed",e.DeviceAudioStreamCaptured="device audio stream captured",e.AudioCapturedForbidden="audio captured forbidden",e.AudioWorkerWebsocketBroken="audio worker websocket broken",e.AudioCaptureZeroData="audio capture zero data, auto failover",e.AudioJoinComplete="audio join complete",e.AudioLeaveComplete="audio leave complete",e.SharingAudioStartComplete="sharing audio start complete",e.SharingAudioStopComplete="sharing audio stop complete",e.AudioBridgeReconnectStart="audio bridge reconnect start",e.AudioBridgeReconnectEnd="audio bridge reconnect end",e.ChangeSpeakerError="audio change speaker error",e}({}),h_=function(e){return e.VideoEncodeSuccess="init video encode success",e.VideoDecodeSuccess="init video decode success",e.VideoEncodeFailed="init video encode failed",e.VideoDecodeFailed="init video decode failed",e.VBSettingSuccess="video VB setting success",e.VBSettingFailed="init video VB failed",e.VBPreloadSuccess="preload video VB success",e.VBPreloading3S="preload video VB 3s",e.VBPreloading10S="preload video VB 10s",e.UserForbiddedCaptureVideo="user forbidded capture video",e.StartCaptureVideoSuccess="start capture video success",e.StopCaptureVideoSuccess="stop capture video success",e}({}),f_=function(e){return e.SharingEncodeSuccess="init sharing encode success",e.SharingDecodeSuccess="init sharing decode success",e.SharingEncodeFailed="init sharing encode failed",e.SharingDecodeFailed="init sharing decode failed",e}({});const m_={enable:!1,enableReport:!1,gatewayEndPoint:"",logLevel:{debug:!1,log:!1,info:!1,print:!1,warn:!1,error:!1},performanceReportRatio:.25,trackingCount:7},g_=["debug","log","info","print","warn","error"],v_=(e,t)=>[...e,...t].filter((e=>!!e));class y_{static getInstance(){return this.agentInstance||(this.agentInstance=new y_),this.agentInstance}constructor(){this.laplace=void 0,this.trackingId=void 0,this.logConfig=void 0,this.reportUrl=void 0,this.publicTags=void 0,this.initConfig=async e=>{let t,r=m_;try{e.logConfig&&(r=JSON.parse(e.logConfig),r.gatewayEndPoint&&(this.reportUrl=`${r.gatewayEndPoint}/pwa/webclient`));const{enable:o,enableReport:n,reportUrl:i,logLevel:s,encryptKeys:a,trackingId:u}=e;if(void 0!==o&&(r={...r,enable:!!o}),void 0!==n&&(r={...r,enableReport:!!n}),i&&(this.reportUrl=i),"string"==typeof s){const e=g_.indexOf(s),t=g_.reduce(((t,r,o)=>ofunction(e){return window.crypto.subtle.importKey("raw",(new TextEncoder).encode(e.slice(0,32)),"AES-GCM",!1,["encrypt","decrypt"])}(e).then((e=>({usage:xv.PROTECT_LOCAL_KEY,key:e}))))))}}catch(e){console.error("parse log config error",e)}const o=(new Date).getTime()-6048e5,n=r.enableReport&&this.reportUrl?{gzip:!1,encrypt:!1,additionalContext:{trackingId:this.trackingId}}:void 0;this.publicTags=["VideoSDK",this.trackingId];const i=[e.debugMode&&new lS({verbose:!1}),new hS({debug:!1,cleanAfterReport:!0,expireBefore:o}),new u_({autoReport:n,publicTags:this.publicTags}),new l_({autoReport:n,publicTags:this.publicTags})].filter(Boolean);return{laplaceConfig:{databaseName:"ZM-VSDK-LOG-DATABASE",maxSize:49283072,publicKey:e.logEncryptionPubKey,reportUrl:this.reportUrl,externalKeys:t,plugins:i},logConfig:r}},this.handleInitLaplaceSuccess=(e,t)=>{var r;this.laplace=e;const o=Wi.get(gs.VSDKLogTrackingId);let n=[];try{n=JSON.parse(o?window.atob(o):"[]")}catch(e){}(null===(r=n.length>=(null==t?void 0:t.trackingCount))||void 0===r||r)&&n.shift();const i=n.reduce(((e,t)=>({...e,[`${t}`]:!0})),{});e.deleteLog((e=>{var t;return!(null!==(t=e.tags)&&void 0!==t&&t.some((e=>i[e])))})),n.push(this.trackingId),Wi.set(gs.VSDKLogTrackingId,window.btoa(JSON.stringify(n)),Fi.LocalStorage)},this.init=async e=>{const{laplaceConfig:t,logConfig:r}=await this.initConfig(e);return r.enable?(this.logConfig=r,cS.init(t).then((e=>{this.handleInitLaplaceSuccess(e,r)})).catch((e=>{throw{type:Gd,reason:"Logger init failed.",error:e}}))):Promise.reject({type:$d,reason:"Logger feature is not enabled."})},this.check=e=>{var t,r;return!(!this.checkLaplace()||(null===(t=this.logConfig)||void 0===t||null===(r=t.logLevel)||void 0===r||!r[e])&&(console.warn(`Logger ${e} is not enabled.`),1))},this.log=(e,t,r)=>{if(this.check("log"))try{var o;return null===(o=this.laplace.logWithEncryption(e,v_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.warn=(e,t,r)=>{if(this.check("warn"))try{var o;return null===(o=this.laplace.warnWithEncryption(e,v_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.info=(e,t,r)=>{if(this.check("info"))try{var o;return null===(o=this.laplace.infoWithEncryption(e,v_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.debug=(e,t,r)=>{if(this.check("debug"))try{var o;return null===(o=this.laplace.debugWithEncryption(e,v_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.error=(e,t,r)=>{if(this.check("error"))try{var o;return null===(o=this.laplace.errorWithEncryption(e,v_(t,r)))||void 0===o?void 0:o.catch((()=>{}))}catch(e){return}},this.checkLaplace=()=>{var e;return!(null===(e=this.laplace)||void 0===e||!e.log)},this.makeLogger=e=>{var t;const r=v_(null!==(t=this.publicTags)&&void 0!==t?t:[],e);return{log:(e,t)=>this.log(e,r,null!=t?t:[]),warn:(e,t)=>this.warn(e,r,null!=t?t:[]),info:(e,t)=>this.info(e,r,null!=t?t:[]),debug:(e,t)=>this.debug(e,r,null!=t?t:[]),error:(e,t)=>this.error(e,r,null!=t?t:[])}},this.reportToGlobalTracing=e=>{var t;return this.checkLaplace()?null!==(t=this.logConfig)&&void 0!==t&&t.enableReport&&this.reportUrl?this.laplace.reportByHttps(e,{gzip:!1,encrypt:!1,xhrOptions:{url:this.reportUrl},additionalContext:{trackingId:this.trackingId}}):Promise.reject({type:$d,reason:"Please use getLogs to obtain log data and report by yourself."}):Promise.reject({type:$d,reason:"Logger has not been enabled or initialized."})},this.getLogs=(e,t)=>{if(!this.checkLaplace())return console.warn("Logger has not been enabled or initialized."),[];const r=e.getState(),{meeting:{meetingNumber:o,userId:n,userEmail:i,userName:s}}=r,a={meetingNumber:o,userId:n,userEmail:i,userName:s},u=this.laplace.getLogs(t),d=[];for(const[,e]of u)d.push({...e,...a});return d},this.doNotUseDirtyGetStore=()=>this.checkLaplace()?this.laplace.doNotUseDirtyGetStore():(console.warn("Logger has not been enabled or initialized."),{byTag:{},byTime:new Map}),this.trackingId=$v()}}y_.agentInstance=void 0;const b_=y_.getInstance(),S_=[{name:"joinComputerAudio",type:"Audio"},{name:"leaveComputerAudio",type:"Audio"},{name:"joinSharingAudio",type:"Audio"},{name:"leaveSharingAudio",type:"Audio"},{name:"startCaptureVideo",type:"Video"},{name:"stopCaptureVideo",type:"Video"},{name:"startDesktopSharing",type:"Sharing"},{name:"stopDesktopSharing",type:"Sharing"},{name:"pauseDesktopSharing",type:"Sharing"},{name:"resumeDesktopSharing",type:"Sharing"}],__=function(e){const t=S_.find((t=>t.name===e));if(t){const{type:i}=t;for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;ne.name));return new Proxy(e,{get:(e,r)=>"string"==typeof r&&t.includes(r)?function(){for(var t=arguments.length,o=new Array(t),n=0;n{const{meeting:{encryptedRWC:t,encryptedGEORWC:r,discardedRwcList:o,meetingOptions:n}}=e;let i=[];return(null==n?void 0:n.isEnableGeoFenceRWC)&&r&&(null==r?void 0:r.length)>0?i=r.filter((e=>!o.includes(e.rwc))).reduce(((e,t)=>{const{dl:r,rwc:o,rwcToken:n}=t,i=e.find((e=>e.dl===r));if(i)i.items.push({rwc:o,rwcToken:n});else{const t={dl:r,items:[]};t.items.push({rwc:o,rwcToken:n}),e.push(t)}return e}),[]):t&&(i=[{dl:0,items:Object.keys(t).map((e=>({rwc:e,rwcToken:t[e]})))}]),i},C_=e=>Ge(...e.map((e=>0===e.dl?Oe(e.items):Xe(e.dl).pipe(Pe((()=>Oe(e.items))))))),T_=(e,t)=>e.pipe(tr(`${Jn}`),Zt(t),Ke((e=>{let[,t]=e;return void 0!==t.meeting.encryptedRWC||void 0!==t.meeting.encryptedGEORWC&&t.meeting.encryptedGEORWC.length>0})),Ut((e=>{let[,r]=e;const{meeting:{ts:o,auth:n,meetingNumber:i,meetingOptions:s,meetingId:a,userName:u},breakoutRoom:d}=r,c=null==s?void 0:s.isEnableGeoFenceRWC,l=w_(r);if(l.length>0){const e={serversLength:l.reduce(((e,t)=>e+t.items.length),0),pingFailedServerList:[],pingRwcServerCounts:0,retryCounts:0};let r;return c&&(r=new ne,C_(l).subscribe((e=>{var t;return null===(t=r)||void 0===t?void 0:t.next(e)}))),(c?r:C_(l)).pipe(Ht((()=>{const{meeting:{meetingStatus:o}}=t.value,n=o===ji.Initial&&e.pingFailedServerList.length0;return!n&&r&&r.complete(),n})),Gt((()=>{if(e.pingRwcServerCounts=e.pingRwcServerCounts+1,c&&e.pingRwcServerCounts===e.serversLength){const o=1e3*Math.floor(5*Math.pow(2,e.retryCounts));e.retryCounts=e.retryCounts+1,A_.makeLogger(["Join Meeting Flow"]).info(`ping rwc retry,current rwc list:${JSON.stringify(w_(t.value))},retry counts:${e.retryCounts}, ${JSON.stringify({meetingId:I_(a),meetingNumber:I_(i),userName:I_(u)})}`,["Ping RWC Retry"]),Xe(o).pipe(ye((()=>{const r=w_(t.value);return Object.assign(e,{serversLength:r.reduce(((e,t)=>e+t.items.length),0),pingFailedServerList:[],pingRwcServerCounts:0}),r}))).subscribe((e=>{C_(e).subscribe((e=>{r.next(e)}))}))}})),Pe((t=>{const{rwc:s,rwcToken:l}=t,p=((e,t,r,o,n,i)=>{const s={ts:o,auth:n,rwcToken:r,dmz:1};return i&&Object.assign(s,{confID:i}),`https://${e}/wc/ping/${t}?${new URLSearchParams(s).toString()}`})(s,i,l,o,n,null==d?void 0:d.currentRoom.boConfId);return Nv(p).pipe(Pe((e=>{let t={};return t=e.response?{...e.response,rwc:s,fromNginx:!1}:{rwc:s,rwg:s,rwcToken:l,fromNginx:!0},Oe([no(t),Kr()])})),lt((()=>{const{pingFailedServerList:t,serversLength:o}=e;return t.push(p),t.length===o&&(c&&r&&r.complete(),A_.makeLogger(["Join Meeting Flow"]).error(`ping rwc error, ${JSON.stringify({meetingId:I_(a),meetingNumber:I_(i),userName:I_(u)})}`,["Ping RWC Error"]),Lc(na,{reason:"connection error",errorCode:Dn})),W})))})),Nt(si(performance.now())))}return W})));let O_=0;const R_={meetingStatus:ji.Initial,isWindowOpen:!1,apiKey:"",signature:"",signatureType:"",lang:"en-US",tk:"",customerKey:"",mtkGuid:"",pingRWCTimestamp:0,passWord:"",meetingNumber:0,userName:"",userEmail:"",sdkUrl:"",sdkOrigin:"",proxy:1,cv:"",meetingId:"",tid:"",ts:"",auth:"",sign:"",isSupportCallOut:!1,tollNumbers:void 0,recordingEnable:!1,callOutCountry:void 0,inviteEmail:"",xmppConfig:null,isSupportH323:!1,h323GatewayInfo:"",h323Password:"",trackAuth:"",isOriginHost:!1,isWebinar:!1,encryptedRWC:void 0,meetingOptions:{},meetingTopic:"",bLock:!1,bHoldUponEntry:!1,viewOnly:0,listenOnlyPhone:0,bAllowRaiseHand:!1,bAllowAttendeeRename:!1,bBroadcast:void 0,bAllowPlayChimeForEnterOrExit:!1,bIbDisableShare:!1,bIbDisableChat:!1,bAllowShowCount:!1,encryptKey:"",bNoHostTimeOut:!1,confId:"",conId:"",e2eEncrypt:!1,zoomId:"",jid:"",xtoken:"",groups:void 0,svcUrl:"",encType:NaN,userGUID:"",userId:NaN,isHost:!1,isCoHost:!1,participantID:0,isOnHold:!1,isMeetingReset:!1,bRecord:!1,audioVideoBeforeOnHold:void 0,region:void 0,network:void 0,joinMeetingTimeStamp:0,enableAudioQos:!0,enableVideoQos:!0,activeAppInfo:void 0,recordingDisclaimerForRecorder:{},recordingDisclaimer:{},ccUrl:"",sessionIdleTimeoutMins:40,reportDomain:"",isAudioBridgeEnabled:!0,discardedRwcList:[],sharePronounType:void 0,stayAwake:!1,wrInfo:{},meetingInfo:{},isNewJoinFlow:!1,gatewayUserList:[],logConfig:"",logEncryptionPubKey:"",failover:{count:0,isCurrentFailoverRecorded:!1,reason:-1,interval:0,joinMeetingSuccessTimestamp:0}},k_=zr({[`${ei}`]:ev(((e,t)=>{let{payload:r}=t;r.customerKey=e.customerKey||r.customerKey||"",Object.assign(e,r),e.meetingStatus=ji.Initial})),[`${ti}`]:ev(((e,t)=>{let{payload:r}=t;e.isWindowOpen=r})),[`${ri}`]:ev(((e,t)=>{let{payload:r}=t;r.useSDK?e.signatureType="sdk":e.signatureType="api",e.apiKey=r.apiKey,e.signature=r.signature,e.lang=r.language})),[`${oi}`]:ev(((e,t)=>{let{payload:r}=t;e.ztk=r})),[`${ni}`]:ev(((e,t)=>{let{payload:r}=t;e.zsk=r})),[`${ii}`]:ev(((e,t)=>{let{payload:r}=t;e.tk=r.tk,e.mtkGuid=r.mtkGuid})),[`${si}`]:ev(((e,t)=>{let{payload:r}=t;e.pingRWCTimestamp=r})),[`${ai}`]:ev(((e,t)=>{let{payload:r}=t;e.confId=r.confID,e.conId=r.conID,e.e2eEncrypt=r.e2eEncrypt,e.meetingNumber=parseInt(r.mn,10),e.zoomId=r.zoomID,e.meetingStatus=ji.Joined,e.jid=r.jid,e.xtoken=r.xtoken,e.groups=r.groups,e.svcUrl=r.svcUrl,e.encType=r.encType,e.userGUID=r.userGUID,e.userId=r.userID,e.role=r.role,e.participantID=r.participantID,e.reportDomain=r.reportDomain,e.abToken=r.ABtoken,r.enableWebTransport&&(e.enableWebtransport=r.enableWebTransport,e.webtransportPort=r.WebTransportPort)})),[`${ui}`]:ev(((e,t)=>{let{payload:r}=t;if(r.gatewayUser){var o;const{userId:t,sn:i}=r.gatewayUser,s=null===(o=e.gatewayUserList)||void 0===o?void 0:o.find((e=>e.userId===t));var n;s?s.sn=i:null===(n=e.gatewayUserList)||void 0===n||n.push(r.gatewayUser)}else Object.assign(e,r)})),[`${ci}`]:ev(((e,t)=>{let{payload:r}=t;e.isHost=r})),[`${li}`]:ev(((e,t)=>{let{payload:r}=t;e.isCoHost=r})),[`${pi}`]:ev(((e,t)=>{let{payload:r}=t;e.isOnHold=r})),[`${hi}`]:ev(((e,t)=>{let{payload:r}=t;e.isMeetingReset=r})),[`${fi}`]:ev(((e,t)=>{let{payload:r}=t;e.audioVideoBeforeOnHold=r})),[`${mi}`]:ev(((e,t)=>{let{payload:r}=t;e.currentUserAudioBeforeReset=r})),[`${gi}`]:ev(((e,t)=>{let{payload:r}=t;e.isCurrentUserMutedBeforeReset=r})),[`${vi}`]:ev(((e,t)=>{let{payload:r}=t;e.meetingStatus=r})),[`${yi}`]:ev(((e,t)=>{let{payload:r}=t;e.region=r.region,e.network=r.network})),[`${bi}`]:ev(((e,t)=>{let{payload:r}=t;e.isCurrentUserStartVideoBeforeReset=r})),[`${Si}`]:ev(((e,t)=>{let{payload:r}=t;e.joinMeetingTimeStamp=r})),[`${_i}`]:ev(((e,t)=>{let{payload:r}=t;e.enableAudioQos=r.audioQos,e.enableVideoQos=r.videoQos})),[`${Ei}`]:ev(((e,t)=>{let{payload:r}=t;e.activeAppInfo=r})),[`${Ii}`]:ev(((e,t)=>{let{payload:r}=t;e.idleStartTime=r})),[`${Ai}`]:ev(((e,t)=>{let{payload:r}=t;e.sessionIdleTimeoutMins=r})),[`${wi}`]:ev(((e,t)=>{let{payload:r}=t;e.isAudioBridgeEnabled=r})),[`${Ci}`]:ev(((e,t)=>{var r,o;let{payload:n}=t;const i=null===(r=e.encryptedGEORWC)||void 0===r||null===(o=r.find((e=>e.rwc===n)))||void 0===o?void 0:o.dc;if(i){var s;const t=null===(s=e.encryptedGEORWC)||void 0===s?void 0:s.filter((e=>e.dc===i));t&&e.discardedRwcList.some((e=>(null==t?void 0:t.findIndex((t=>t.rwc===e)))>=0))&&e.discardedRwcList.push(...t.map((e=>e.rwc))),e.discardedRwcList.push(n)}})),[`${Ti}`]:ev(((e,t)=>{let{payload:r}=t;e.sharePronounType=r})),[`${Oi}`]:ev(((e,t)=>{let{payload:r}=t;e.stayAwake=r})),[`${Ri}`]:ev(((e,t)=>{let{payload:r}=t;e.failover.joinMeetingSuccessTimestamp=r})),[`${ki}`]:ev((e=>{Object.assign(e.failover,{...R_.failover,count:e.failover.count,joinMeetingSuccessTimestamp:e.failover.joinMeetingSuccessTimestamp})})),[`${Di}`]:ev(((e,t)=>{let{payload:r}=t;const{count:o,reason:n,interval:i}=r;e.failover.count=o,e.failover.reason=n,e.failover.interval=i,e.failover.isCurrentFailoverRecorded=!0})),[`${Pi}`]:ev(((e,t)=>{let{payload:r}=t;e.quicklyLeave=r})),[`${di}`]:(e,t)=>{let{payload:r}=t;const{isFailover:o}=r,n={isMeetingReset:!0,apiKey:e.apiKey,signatureType:e.signatureType,signature:e.signature,lang:e.lang,proxy:1,stayAwake:e.stayAwake};return o&&Object.assign(n,{currentUserAudioBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.audio:r.audio,isCurrentUserMutedBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.muted:r.muted,isCurrentUserStartVideoBeforeReset:e.audioVideoBeforeOnHold?e.audioVideoBeforeOnHold.video:r.video,meetingNumber:e.meetingNumber,userName:e.userName,passWord:e.passWord,userEmail:e.userEmail,sdkUrl:e.sdkUrl,sdkOrigin:e.sdkOrigin,cv:e.cv,zsk:e.zsk,ztk:e.ztk,idleStartTime:e.idleStartTime,sessionIdleTimeoutMins:e.sessionIdleTimeoutMins,customerKey:e.customerKey,failover:e.failover,stayAwake:e.stayAwake,quicklyLeave:e.quicklyLeave}),{...R_,...n}}},R_),D_=Ao(iv,mv,hv,lv,{meetingInfoEpic:(e,t)=>e.pipe(tr(`${qn}`),Ut((e=>{const r=Object.assign({},e.payload,{password:mn(e.payload.password),topic:mn(e.payload.topic)}),{videoSDKUrl:o}={meetingSDKUrl:`https://${Bm}/api/v1/wc/info`,videoSDKUrl:`https://${Bm}/wc/lsdk`};return function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"zoomsdkjsonpcallback";return new R((o=>{O_++;const n=`${r}${O_}`,i=document.createElement("script");Object.keys(t).forEach((e=>(void 0===t[e]||null===t[e])&&delete t[e])),i.src=`${e}?${new URLSearchParams(Object.assign(t,{callback:n})).toString()}`,i.async=!0,i.onerror=e=>o.error(e),document.getElementsByTagName("head")[0].appendChild(i),window[n]=e=>{i.parentNode&&i.parentNode.removeChild(i),delete window[n],o.next(e),o.complete()}}))}(o,r).pipe(lt((e=>Q({status:!1,result:e.toString(),errorCode:Dn}))),Pe((r=>{const[o,n]=(i=Q(r),[Ke(s=e=>!0===e.status&&void 0!==e.result,a)(new R(Ce(i))),Ke(ze(s,a))(new R(Ce(i)))]);var i,s,a;return n.subscribe((e=>{e.state||(3e3===e.errorCode&&"Meeting password is incorrect"===e.errorMessage?Lc(na,Wn(3004)):3e3===e.errorCode&&"The role type error"===e.errorMessage?Lc(na,Wn(3010)):e.errorCode===Dn?Lc(na,{reason:"connection error"}):3e3===e.errorCode?Lc(na,{reason:e.errorMessage,errorCode:Un}):300===e.errorCode?Lc(na,{reason:"This account does not exist or does not belong to you",errorCode:Un}):124===e.errorCode&&"Parse lite sdk topic and pwd fail"===e.errorMessage?Lc(na,{reason:"Parse topic and pwd fail",errorCode:Un}):124===e.errorCode&&"The java web token is expired or more than 2 days or ineffective."===e.errorMessage?Lc(na,{reason:"The token is expired or more than 2 days or ineffective.",errorCode:Un}):124===e.errorCode&&Lc(na,{reason:"Verify JWT failed",errorCode:Un}))})),o.pipe(km((r=>{if(!0===r.status){const{result:{mid:o,websdkClientFeatureOptions:n}}=r;Wi.init(o);const i=((e,t)=>{if(e.result){const{result:{mn:r,ts:o,auth:n,track_auth:i,mid:s,tid:a,encryptedRWC:u,encryptedGEORWC:d,user_identity:c,meetingOptions:l,can_recording:p,wcXMPPConfig:h,call_out_country_json:f,isOriginalHost:m,support_call_out:g,liveTranscription:v,logConfig:y,logEncryptionPubKey:b,toll_numbers_json:S,h323Password:_}}=e,{lang:E,password:I,topic:A,zlk:w,cv:C,userName:T}=t;return{meetingNumber:r,meetingId:s,tid:a,ts:o,auth:n,passWord:I,trackAuth:i,customerKey:c,encryptedRWC:JSON.parse(u||"{}"),encryptedGEORWC:JSON.parse(d||"{}"),meetingOptions:JSON.parse(l||"{}"),recordingEnable:"1"===p,topic:A,userName:Wi.get(ms.WebclientUserName)||T,cv:C,zlkJwtToken:w,xmppConfig:JSON.parse(h||"{}"),callOutCountry:JSON.parse(f||"{}"),lang:E,isOriginHost:m,isSupportCallOut:"1"===g,liveTranscription:JSON.parse(v||"{}"),logConfig:y,logEncryptionPubKey:b,tollNumbers:void 0===S?void 0:JSON.parse(S),h323Password:_}}return e})(r,e.payload),s=[Q(ei(i)),Eo(T_,t,Jn())],a=((e,t)=>{const r=[];if(e){const t=e.split("").reverse();Object.keys(xi).filter((e=>/M:\d(,\d)*;V:\d(,\d)*/.test(xi[e]))).forEach((e=>{const o=xi[e];let[n,i]=o.split(";");n.startsWith("V:")&&([n,i]=[i,n]);const s=i.slice(2).split(",").map((e=>t[Number(e)-1])).reverse().join(""),a=parseInt(s,16),u=Om[o];if(u){const e=(a&u.mask)>0;r.push(Q(u.action(e)))}}))}return r})(n);return a.length>0&&s.unshift(...a),Ve(...s)}})))})))}))),pingRWCEpic:T_});var P_={exports:{}};P_.exports=function(){function e(e){for(var t=1;tt){const e=$i(),b=r[t],S={dn2:mn(o),auth:n,browser:e,trackAuth:i,mid:s,tid:u,lang:d,ts:c,"ZM-CID":y,_ZM_MTG_TRACK_ID:v||"",customer_key:mn(a),cfs:0};b.rwcAuth?Object.assign(S,{rwcAuth:b.rwcAuth}):b.rwcToken&&Object.assign(S,{rwcToken:b.rwcToken});const _=ss()?1:zi()||ns()?2:0;Object.assign(S,{as_type:_}),[{key:V_,queryKey:"opt"},{key:U_,queryKey:"participantID"},{key:j_,queryKey:"zoomid"}].forEach((e=>{const t=Wi.get(e.key);void 0!==t&&(S[e.queryKey]=t)})),l&&p&&h&&Object.assign(S,{bid:mn(l),botk:p,confID:h}),Wi.get(B_)&&Object.assign(S,{isdj:1}),ts()&&(Object.assign(S,{from:es()?"android":"ios"}),f&&Object.assign(S,{useABAudio:1})),Object.assign(S,{clientCaps:W_()});const E=m?g.length>0?1:0:1;return Object.assign(S,{isCamera:E}),{queryObject:{...S},rwgServer:b}}return null}function W_(){let e=kl.WebCameraIndication|kl.SendMeetingTokenSeparately;const t=Js.getPTZCapability();return(t.pan||t.tilt||t.zoom)&&(e|=kl.SupportFarEndCameraControl),Js.isSupportVideoShare()&&(e|=kl.SupportVideoShare),e|=kl.UnifyErrorType,e}const $_=Ws.createAgent();let G_;var z_=Object.freeze({__proto__:null,connectZoomSocketEpic:(e,t)=>e.pipe(tr(`${Kr}`),Zt(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Rl.Closed})),Ut((e=>{let[,t]=e;const{socket:{retryCount:r,rwgServerList:o},meeting:n,breakoutRoom:i,video:{cameraDevicesList:s}}=t;let a,u={...n,retryCount:r,rwgServerList:o,cameraDevicesList:s};if(i&&i.currentRoom.status===gl.Joining){const{currentRoom:{boId:e,boConfId:t,boToken:r}}=i;u={...u,bid:e,botk:r,confID:t}}if(a=n.zlkJwtToken?function(e){const t=H_(e);if(t){const{queryObject:r,rwgServer:o}=t,{topic:n,cv:i,zlkJwtToken:s,meetingNumber:a,passWord:u}=e;return Object.assign(r,{topic:mn(n),iccv:i,zlkJwtToken:s}),""!==u&&Object.assign(r,{mpwd:mn(u)}),`wss://${o.rwg}/instantsdk/${a}?${new URLSearchParams(r).toString()}`}return null}(u):function(e){const t=H_(e);if(t){const{queryObject:r,rwgServer:o}=t,{signatureType:n,userEmail:i,ztk:s,tk:a,cv:u,zsk:d,sign:c,meetingNumber:l,isHost:p,isOriginHost:h,passWord:f}=e;return Object.assign(r,{signType:n,email:i,zak:s||"",tk:a||"",jscv:u}),p&&h||""===f||Object.assign(r,{mpwd:f}),sessionStorage.getItem(ms.WebclientZsk)||d?Object.assign(r,{zak:d}):Object.assign(r,{sign:c}),[{key:L_,queryKey:"cfs"},{key:x_,queryKey:"tk"}].forEach((e=>{const t=Wi.get(e.key);void 0!==t&&(r[e.queryKey]=t)})),`wss://${o.rwg}/wc/api/${l}?${new URLSearchParams(r).toString()}`}return null}(u),a){const e=(d=a,$_.connect(d),G_=new N,Fe((e=>$_.on(Fs.Message,e)),(e=>$_.off(Fs.Message,e)),(e=>e.data)).subscribe(G_),G_);return Ge(e.pipe(Ke((e=>"string"==typeof e)),ye((e=>{try{return JSON.parse(e)}catch(e){return console.error(e),{evt:0}}})),Lm(),Rm((e=>{if(0!==e.evt||!e.body||"invalid parameters!"!==e.body.test)return Zr(e);Lc(na,Wn(jn.INVALID_PARAMETER))})),Nt(oo({status:Rl.Connecting,rwgUrl:a}))),e.pipe(Ke((e=>e instanceof ArrayBuffer)),ye((e=>Yr(e)))))}var d;return W}))),connectedZoomSocketEpic:(e,t)=>e.pipe(tr(`${Kr}`),Zt(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Rl.Closed})),Ut((()=>{const[e,r,o]=[Fs.Open,Fs.Close,Fs.Error].map((e=>Fe((t=>$_.on(e,t)),(t=>$_.on(e,t)))));return Ge(e.pipe(Pe((()=>Ge(Q(oo({status:Rl.Connected})),Xe(6e4).pipe(Zt(t),Ke((e=>{let[,t]=e;return t.meeting.meetingStatus===ji.Initial&&!t.meeting.isMeetingReset})),ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.NoHeartbeat))))))))),r.pipe(Zt(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus!==Rl.Closed&&t.meeting.meetingStatus===ji.Joined&&!t.meeting.isMeetingReset})),ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.Disconnect))))),o.pipe(Zt(t),Pe((e=>{let[,r]=e;const{meeting:{meetingStatus:o,isMeetingReset:n},socket:{rwgServerList:i,retryCount:s}}=r,a=[];if(o===ji.Initial&&null!=i&&i.length){const e=i[s];return Xe(5e3).pipe(Ke((()=>t.value.meeting.meetingStatus===ji.Initial)),Pe((()=>{const{socket:{rwgServerList:e,retryCount:r}}=t.value,o=[];return e.length>r+1?o.push(io(r+1),Jr({retry:!0})):(Lc(na,{reason:"connection error",errorCode:Dn}),o.push(...Cm(t.value))),Oe(o)})),Nt(Ci(null==e?void 0:e.rwc)))}return n||o!==ji.Joined||(Lc(ia,{reason:Mi.Failover}),a.push(Qn(Bi.OnError))),Oe(a)}))))}))),disconnectZoomSocketEpic:(e,t)=>e.pipe(tr(`${Jr}`),Ut((e=>e.payload&&e.payload.retry?Q(Kr()).pipe(mt(1e3),Nt(oo({status:Rl.Closed}))):Q(oo({status:Rl.Closed})))),mt(100),Gt((()=>{var e;t.value.socket.zoomSocketStatus===Rl.Closed&&($_.close(),null===(e=G_)||void 0===e||e.complete())})))});const K_=cv.getInstance();let q_;var J_=Object.freeze({__proto__:null,connectXmppSocketEpic:(e,t)=>e.pipe(tr(`${qr}`),Zt(t),Ke((e=>{let[,t]=e;return"closed"===t.socket.xmppSocketStatus})),Ut((e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:o,conId:n}}=t,i=function(e,t,r){return`wss://${e}/wc/media/${t}?type=x&cid=${r}`}(r,o,n);return(e=>(K_.connect(e),q_=new N,Fe((e=>K_.on(dv.Message,e)),(e=>K_.off(dv.Message,e))).subscribe(q_),q_))(i).pipe(Ke((e=>void 0!==(null==e?void 0:e.evt))),ye((e=>Xr(e))),Nt(so(Rl.Connecting)))}))),connectedXmppSocketEpic:(e,t)=>e.pipe(tr(`${qr}`),Ut((()=>{const[e,r,o]=[dv.Open,dv.Close,dv.Error].map((e=>Fe((t=>K_.on(e,t)),(t=>K_.on(e,t)))));return Ge(e.pipe(Gt((()=>{const e=ns()&&is()?11:10;K_.join(e)})),At(so(Rl.Connected))),r.pipe(mt(1e3),Zt(t),Ke((e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&t.meeting.meetingStatus===ji.Joined&&!t.meeting.isMeetingReset})),ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.DisconnectXmpp))))),o.pipe(mt(1e3),Zt(t),Ke((e=>{let[,t]=e;return"closed"!==t.socket.xmppSocketStatus&&t.meeting.meetingStatus===ji.Joined&&!t.meeting.isMeetingReset})),ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.OnError))))))}))),disconnectCmdChannelSocketEpic:e=>e.pipe(tr(`${Qr}`),At(so(Rl.Closed)),mt(100),Gt((()=>{var e;K_.close(),null===(e=q_)||void 0===e||e.complete()})))});const Q_=$s.getInstance();let Z_;var Y_=Object.freeze({__proto__:null,connectMainSessionSocketEpic:(e,t)=>e.pipe(tr(`${eo}`),Zt(t),Ke((e=>{let[,t]=e;return"closed"===t.socket.mainSessionSocketStatus})),Ut((e=>{let[,t]=e;const{meeting:{svcUrl:r,meetingNumber:o,conId:n}}=t,i=function(e,t,r){return`wss://${e}/wc/media/${t}?type=m&cid=${r}&mode=2`}(r,o,n);return(e=>(Q_.connect(e),Z_=new N,Fe((e=>Q_.on(Fs.Message,e)),(e=>Q_.off(Fs.Message,e))).pipe(ye((e=>e.data))).subscribe(Z_),Z_))(i).pipe(ye((e=>{try{return JSON.parse(e)}catch(e){return console.error(e),{evt:0}}})),Ke((e=>0!==e.evt)),Lm(),ye((e=>ro(e))),Nt(ao(Rl.Connecting)))}))),connectedMainSessionSocketEpic:(e,t)=>e.pipe(tr(`${eo}`),Ut((()=>{const[e,r,o]=[Fs.Open,Fs.Close,Fs.Error].map((e=>Fe((t=>Q_.on(e,t)),(t=>Q_.on(e,t)))));return Ge(e.pipe(At(ao(Rl.Connected))),r.pipe(Zt(t),Ke((e=>{let[,t]=e;return"closed"!==t.socket.zoomSocketStatus&&t.meeting.meetingStatus===ji.Joined})),ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.DisconnectMChannel))))),o.pipe(ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.OnErrorMChannel))))))}))),disconnectMainSessionSocketEpic:e=>e.pipe(tr(`${to}`),At(ao(Rl.Closed)),Gt((()=>{var e;Q_.close(),null===(e=Z_)||void 0===e||e.complete()})))});const X_={zoomSocketStatus:Rl.Closed,xmppSocketStatus:Rl.Closed,mainSessionSocketStatus:Rl.Closed,retryCount:0,rwgServerList:[]},eE=zr({[`${oo}`]:ev(((e,t)=>{let{payload:r}=t;e.zoomSocketStatus=r.status})),[`${no}`]:ev(((e,t)=>{let{payload:r}=t;const{rwgServerList:o}=e;o.find((e=>e.rwg===r.rwg))||o.push(r)})),[`${io}`]:ev(((e,t)=>{let{payload:r}=t;e.retryCount=r})),[`${so}`]:ev(((e,t)=>{let{payload:r}=t;e.xmppSocketStatus=r})),[`${ao}`]:ev(((e,t)=>{let{payload:r}=t;e.mainSessionSocketStatus=r})),[`${uo}`]:()=>X_},X_),tE=Ao(z_,J_,Y_),rE={id:"userId",type:e=>cl(e)?{userType:e,avatarBackgroundType:Math.floor(8*Math.random())+1}:{userType:e},role:e=>({userRole:e,isHost:dl(e)}),dn2:e=>({displayName:gn(e)}),bShareOn:"sharerOn",bSharePause:"sharerPause",bLocalRecordStatus:e=>({bLocalRecord:1===e}),bGuest:"isGuest",bCapsRequestLT:"isRequestLT",customerKey:"userIdentity"},oE=e=>{const t={};return["add","remove","update"].forEach((r=>{const o=r,n=e[o];null!=n&&(t[o]=n.reduce(((e,t)=>{const r=Object.keys(t).reduce(((e,r)=>{const o=rE[r];return"function"==typeof o?Object.assign(e,o(t[r])):"string"==typeof o?Object.assign(e,{[`${o}`]:t[r]}):Object.assign(e,{[`${r}`]:t[r]}),e}),{}),o=e.find((e=>e.userId===r.userId));return void 0!==o?Object.assign(o,r):e.push(r),e}),[]))})),t},nE={name:"displayName",node:e=>({userId:Number(e)}),role:e=>({userRole:Number(e)})},iE=e=>Object.keys(e).reduce(((t,r)=>{const o=nE[r];return"function"==typeof o?Object.assign(t,o(e[r])):"string"==typeof o?Object.assign(t,{[`${o}`]:e[r]}):Object.assign(t,{[`${r}`]:e[r]}),t}),{});var sE=Object.freeze({__proto__:null,updateAttendeesEpic:(e,t)=>wo(e,Is).pipe(ye((e=>oE(e.payload.body))),Zt(t),Pe((e=>{let[t,r]=e,o=[Bc(t)];const{meeting:{userId:n,isWebinar:i,isOnHold:s},participants:{attendeesList:a,failoverAttendeesList:u,allowTalkAttendeesList:d}}=r,c=d.map((e=>e.userId));if(t.add){const e=t.add.find((e=>e.userId===n));void 0!==e&&(void 0!==e.bHold&&o.push(pi(e.bHold)),Lc(Qs,e));const s=t.add.filter((e=>e.userId!==n));if(s.length>0){const e=s.filter((e=>!ll(e.userRole))).map((e=>{const t={...e};if(cl(e.userType)){var o;const n=null===(o=r.audio)||void 0===o?void 0:o.dialout.find((t=>t.phoneNodeId===e.userId));n&&Object.assign(t,{phoneNumber:n.phoneNumber})}const n=u.find((t=>t.zoomID===e.zoomID));return n&&Object.assign(t,{source:n.isOnHold?"on hold":"failover"}),t})),t=e.filter((e=>!!e.source)).map((e=>({zoomID:e.zoomID})));if(o.push(Gc(t)),Lc(Ys,e),i){const e=s.filter((e=>ll(e.userRole)));e.length>0&&Lc(ta,e.map((e=>({userId:e.userId,isAllowToTalk:!0}))))}}}if(t.update){const e=t.update.find((e=>e.userId===n));void 0!==e&&(Lc(Zs,e),void 0!==e.bHold&&o.push(pi(e.bHold)));const r=t.update.filter((e=>!(e.userId===n||c.includes(e.userId))));if(r.length>0&&Lc(Xs,r),i){const e=t.update.filter((e=>e.userId!==n&&c.includes(e.userId)));e.length>0&&Lc(ta,e)}}if(t.remove){const e=t.remove.map((e=>{const t=a.find((t=>t.userId===e.userId));return t?2===e.action&&1===e.nUserStatus?t.bHold?(o.push($c({zoomID:t.zoomID,isOnHold:!0})),{...e,...t,reason:"on hold"}):(o.push($c({zoomID:t.zoomID,isOnHold:!1})),{...e,...t,reason:"failover"}):{...e,...t}:null})).filter((e=>!!e));if(Lc(ea,e),i){const e=t.remove.filter((e=>c.includes(e.userId)));e.length>0&&Lc(ta,e.map((e=>({userId:e.userId,isAllowToTalk:!1}))))}}const l=o.filter((e=>e.type===`${pi}`));if(l.length>0){const e=l[l.length-1];o=o.filter((e=>e.type!==`${pi}`)),e.payload!==s&&(o.push(e),Lc(aa,!s))}return Oe(o)}))),receiveUserListFromXMPPEpic:(e,t)=>To(e,24595).pipe(Pe((e=>{const{payload:{body:{action:r,data:o}}}=e,{meeting:{jid:n},participants:{xmppAttendeeList:i}}=t.value,s=[];if(r===uv.rename){o.forEach((e=>{s.push(qc(e))}));const e=o.map((e=>iE(e)));Lc(ta,e)}if(r===uv.Remove){o.forEach((e=>{s.push(Jc(e))}));const e=o.map((e=>({...iE(e),removed:!0})));Lc(ra,e)}if([uv.Add,uv.List,uv.update].includes(r)){const e=o.map((e=>{const t=iE(e);return Object.keys(t).reduce(((e,r)=>(""!==t[r]&&Object.assign(e,{[r]:t[r]}),e)),{})}));if(Lc(ta,e),s.push(Qc(e)),r===uv.update){const e=o.find((e=>e.jid===n));if(e&&void 0!==e.bRaiseHand){const t=i.find((e=>e.jid===n));(null==t?void 0:t.bRaiseHand)!==e.bRaiseHand&&Lc("MEETING_WEBINAR_ATTENDEE_RAISE_HAND",{bRaiseHand:e.bRaiseHand})}}}return Oe(s)}))),handleAdmitAllSilentUsersEpic:e=>wo(e,7951).pipe(Gt((e=>{!1===e.payload.body.bStarted&&Lc("ADMIT_ALL_SILENT_USERS_END",e.payload.body.bStarted)})),ye((e=>Hc(e.payload.body.bStarted)))),handleKVUpdateIndicationEpic:e=>wo(e,7946).pipe(Ke((e=>{var t;return["bRaiseHand","feedback"].includes(null===(t=e.payload.body)||void 0===t?void 0:t.key)&&0===e.payload.body.value})),ye((e=>(Lc(Xs,{}),"bRaiseHand"===e.payload.body.key?zc():Kc()))))});const aE={attendeesList:[],assistantList:[],xmppAttendeeList:[],allowTalkAttendeesList:[],failoverAttendeesList:[],isAdmitAllSilentUsers:!1},uE=zr({[`${Bc}`]:ev(((e,t)=>{let{payload:r}=t;void 0!==r.add&&r.add.length>0&&r.add.forEach((t=>{if(t.userType===ul.Assitant){const r=e.assistantList.find((e=>e.userId===t.userId));void 0!==r?Object.assign(r,t):e.assistantList.push(t)}else if(ll(t.userRole)){const r=e.allowTalkAttendeesList.find((e=>e.userId===t.userId));void 0!==r?Object.assign(r,t):e.allowTalkAttendeesList.push(t)}else{const r=e.attendeesList.find((e=>e.userId===t.userId));void 0!==r?Object.assign(r,t):e.attendeesList.push(t)}})),void 0!==r.update&&r.update.length>0&&r.update.forEach((t=>{const r=e.attendeesList.find((e=>e.userId===t.userId));if(void 0!==r)Object.assign(r,t);else{const r=e.allowTalkAttendeesList.find((e=>e.userId===t.userId));if(void 0!==r)Object.assign(r,t);else{const r=e.assistantList.find((e=>e.userId===t.userId));void 0!==r&&Object.assign(r,t)}}})),void 0!==r.remove&&r.remove.length>0&&r.remove.forEach((t=>{const r=e.attendeesList.findIndex((e=>e.userId===t.userId));if(-1!==r)e.attendeesList.splice(r,1);else{const r=e.allowTalkAttendeesList.findIndex((e=>e.userId===t.userId));if(-1!==r)e.allowTalkAttendeesList.splice(r,1);else{const r=e.assistantList.findIndex((e=>e.userId===t.userId));-1!==r&&e.assistantList.splice(r,1)}}}))})),[`${Qc}`]:ev(((e,t)=>{let{payload:r}=t;const{xmppAttendeeList:o}=e,n=o.map((e=>e.jid));r.forEach((e=>{const{jid:t}=e,r=n.indexOf(t);-1!==r?Object.assign(o[r],e):o.push(e)}))})),[`${Hc}`]:ev(((e,t)=>{let{payload:r}=t;e.isAdmitAllSilentUsers=r})),[`${zc}`]:ev((e=>{e.attendeesList.forEach((e=>{e.bRaiseHand&&(e.bRaiseHand=!1)}))})),[`${Kc}`]:ev((e=>{e.attendeesList.forEach((e=>{e.feedback>0&&(e.feedback=0)}))})),[`${$c}`]:ev(((e,t)=>{let{payload:r}=t;e.failoverAttendeesList.push(r)})),[`${Gc}`]:ev(((e,t)=>{let{payload:r}=t;r.forEach((t=>{const r=e.failoverAttendeesList.findIndex((e=>e.zoomID===t.zoomID));-1!==r&&e.failoverAttendeesList.splice(r,1)}))})),[`${qc}`]:ev(((e,t)=>{let{payload:r}=t;const{jid:o,name:n}=r,i=e.xmppAttendeeList.find((e=>e.jid===o));i&&(i.displayName=n)})),[`${Jc}`]:ev(((e,t)=>{let{payload:r}=t;const{jid:o}=r,n=e.xmppAttendeeList.findIndex((e=>e.jid===o));-1!==o&&e.xmppAttendeeList.splice(n,1)})),[`${Zc}`]:ev(((e,t)=>{let{payload:r}=t;const{userId:o,key:n,value:i}=r,s=e.attendeesList.find((e=>e.userId===o));s&&(s[`${n}`]=i)})),[`${Wc}`]:()=>aE},aE),dE=Ao(sE),cE={audioEncodeStatus:"initial",audioDecodeStatus:"initial",videoEncodeStatus:"initial",videoDecodeStatus:"initial",sharingEncodeStatus:"initial",sharingDecodeStatus:"initial",assetsPath:"",mediaConstraints:void 0,fileWithVersion:!1,enforceMultipleVideos:!1,enforceVirtualBackground:!1},lE=zr({[`${ho}`]:ev(((e,t)=>{let{payload:r}=t;e.audioDecodeStatus=r})),[`${po}`]:ev(((e,t)=>{let{payload:r}=t;e.audioEncodeStatus=r})),[`${vo}`]:ev(((e,t)=>{let{payload:r}=t;e.sharingDecodeStatus=r})),[`${go}`]:ev(((e,t)=>{let{payload:r}=t;e.sharingEncodeStatus=r})),[`${mo}`]:ev(((e,t)=>{let{payload:r}=t;e.videoDecodeStatus=r})),[`${fo}`]:ev(((e,t)=>{let{payload:r}=t;e.videoEncodeStatus=r})),[`${yo}`]:ev(((e,t)=>{let{payload:r}=t;e.mediaConstraints=r.mediaConstraints,e.assetsPath=r.assetsPath,e.fileWithVersion=r.fileWithVersion,e.enforceMultipleVideos=r.enforceMultipleVideos,e.enforceVirtualBackground=r.enforceVirtualBackground})),[`${bo}`]:ev(((e,t)=>{let{payload:r}=t;const{type:o,encrypeKey:n,additionalType:i}=r,s={encrypeKey:n,additionalType:i};"audio"===o?e.audioEncrypt=s:"video"===o?e.videoEncrypt=s:"sharing"===o&&(e.sharingEncrypt=s)})),[`${So}`]:ev(((e,t)=>{let{payload:r}=t;e.isEnableDecoderInWorklet=r})),[`${_o}`]:e=>({...cE,mediaConstraints:e.mediaConstraints,assetsPath:e.assetsPath,fileWithVersion:e.fileWithVersion,enforceMultipleVideos:e.enforceMultipleVideos,enforceVirtualBackground:e.enforceVirtualBackground})},cE);var pE={exports:{}},hE={};!function(e,t){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},r(e,t)};function o(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,o=arguments.length;r90||r||(e(t+=(100-t)/50),requestAnimationFrame(o))};return o(),{finish:function(){100===t||r||(t=100,e(100))},abort:function(){100===t||r||(r=!0)},get curProgress(){return t}}}function T(){}function O(){O.init.call(this)}function R(e){return void 0===e._maxListeners?O.defaultMaxListeners:e._maxListeners}function k(e,t,r,o){var n,i,s;if("function"!=typeof r)throw new TypeError('"listener" argument must be a function');if((i=e._events)?(i.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),i=e._events),s=i[t]):(i=e._events=new T,e._eventsCount=0),s){if("function"==typeof s?s=i[t]=o?[r,s]:[s,r]:o?s.unshift(r):s.push(r),!s.warned&&(n=R(e))&&n>0&&s.length>n){s.warned=!0;var a=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");a.name="MaxListenersExceededWarning",a.emitter=e,a.type=t,a.count=s.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(a)}}else s=i[t]=r,++e._eventsCount;return e}function D(e,t,r){var o=!1;function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}return n.listener=r,n}function P(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function M(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}T.prototype=Object.create(null),O.EventEmitter=O,O.usingDomains=!1,O.prototype.domain=void 0,O.prototype._events=void 0,O.prototype._maxListeners=void 0,O.defaultMaxListeners=10,O.init=function(){this.domain=null,O.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new T,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},O.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},O.prototype.getMaxListeners=function(){return R(this)},O.prototype.emit=function(e){var t,r,o,n,i,s,a,u="error"===e;if(s=this._events)u=u&&null==s.error;else if(!u)return!1;if(a=this.domain,u){if(t=arguments[1],!a){if(t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var c="function"==typeof r;switch(o=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var o=e.length,n=M(e,o),i=0;i0;)if(r[i]===t||r[i].listener&&r[i].listener===t){s=r[i].listener,n=i;break}if(n<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new T,this;delete o[e]}else!function(e,t){for(var r=t,o=r+1,n=e.length;o0?Reflect.ownKeys(this._events):[]};var N=function(e){function t(t){var r=e.call(this)||this;return r.timeout=(null==t?void 0:t.timeout)||3e4,r}return o(t,e),t.prototype.clearTimeoutCheck=function(){this.timeoutTimer&&(clearTimeout(this.timeoutTimer),this.timeoutTimer=null)},t.prototype.startTimeoutCheck=function(){var e=this;!this.timeoutTimer&&!this.finished&&this.timeout>0&&(this.timeoutTimer=setTimeout((function(){e.finished||(e.finished=!0,e.data=null,e.emit("timeout")),e.clearTimeoutCheck()}),this.timeout))},t}(O),L=function(e){function t(t){var r=e.call(this,t)||this;return r.uuid=c(),r.domParams=t||{},r}return o(t,e),t.prototype.jsonp=function(){var e=this;if(!this.finished){var t=this.domParams,r=t.url,o=t.jsonpCallbackName,n=void 0===o?"callback":o,i=t.body,s=t.integrity;this.script=document.createElement("script"),s&&(this.script.integrity=s,this.script.crossOrigin="anonymous");var a="";i&&Object.entries(i).forEach((function(e){var t=e[0],r=e[1];a+=(a?"&":"")+t+"="+r})),a+=(a?"&":"")+n+"="+this.uuid,this.script.src=r+(r.includes("?")?"":"?")+a,this.jsonpCallback(),this.progressMonitory=C((function(t){e.finished||e.emit("progressUpdated",t)})),document.body.appendChild(this.script)}},t.prototype.clearSideEffect=function(e){if(void 0===e&&(e=!1),document.body.removeChild(this.script),e){var t=this.uuid;window[this.uuid]=function(){window[t]&&delete window[t]}}else delete window[this.uuid];this.script=null,this.uuid=null,this.finished=!0,this.data=null,this.clearTimeoutCheck()},t.prototype.jsonpCallback=function(){var e=this;this.script.onerror=function(t){var r;e.finished||(e.clearSideEffect(),null===(r=e.progressMonitory)||void 0===r||r.abort(),e.emit("error",new Error("string"==typeof t?t:"load jsonp script failed")))},window[this.uuid]=function(t){var r;if(!e.finished){var o=e.domParams,n=o.encoding,i=o.blobType,s=o.unZipOptions,a=o.beforeTransformData,u=o.afterTransformData;null===(r=e.progressMonitory)||void 0===r||r.finish(),e.clearSideEffect(),(a?a(t||""):Promise.resolve(t||"")).then((function(t){return w(t,{encoding:n,blobType:i,unZipOptions:s}).then((function(t){return(u?u(t):Promise.resolve(t)).then((function(t){return e.emit("finished",t)}))}))})).catch((function(t){return e.emit("error",t)}))}}},t.prototype.abort=function(){this.clearSideEffect(!0)},t}(N),V=function(e){function t(t){var r=e.call(this,t)||this;return r.socketParams=t||{},r}return o(t,e),t.prototype.write=function(e,t){e&&!this.finished&&(e instanceof Error?this.handleError(e):(this.data?this.appendData(e):this.data=e,this.handlePerCentUpdate(t)))},t.prototype.handlePerCentUpdate=function(e){void 0===e||this.finished||this.emit("progressUpdated",e)},t.prototype.handleError=function(e){this.data=null,this.finished=!0,this.clearTimeoutCheck(),this.emit("error",e)},t.prototype.appendData=function(e){u(e)===u(this.data)?"string"==typeof e?this.data+=e:Blob&&e instanceof Blob?this.data=new Blob([this.data,e],{type:e.type}):ArrayBuffer&&e instanceof ArrayBuffer&&(this.data=s(this.data,e)):this.handleError(new Error("every piece of the data format must be the same"))},t.prototype.end=function(e){var t=this;if(!this.finished){this.handlePerCentUpdate(100),e&&this.write(e);var r=this.socketParams,o=r.encoding,n=r.blobType,i=r.unZipOptions,s=r.beforeTransformData,a=r.afterTransformData;(s?s(this.data):Promise.resolve(this.data)).then((function(e){return w(e,{encoding:o,blobType:n,unZipOptions:i}).then((function(e){return(a?a(e):Promise.resolve(e)).then((function(e){return t.emit("finished",e)}))}))})).catch((function(e){return t.emit("error",e)})),this.data=null,this.finished=!0,this.clearTimeoutCheck()}},t.prototype.abort=function(){this.data=null,this.finished=!0,this.clearTimeoutCheck()},t}(N),U=function(t){function r(e){var r=t.call(this,e)||this;return r.xhrParams=e||{},r.xhrParams.headers=n({},r.xhrParams.headers||{}),r}return o(r,t),r.prototype.supportFetch=function(){return!!window.fetch&&window.AbortController&&window.Request},r.prototype.ajax=function(){var t=this;if(!this.finished)if(this.xhrParams.url){var r=this.xhrParams,o=r.headers,i=void 0===o?{}:o,s=r.url,a=r.body,u=void 0===a?{}:a,d=r.method,c=void 0===d?"POST":d,l=r.encoding,p=r.integrity;this.controller=this.supportFetch()?new AbortController:new XMLHttpRequest;var h=this.supportFetch()?C((function(e){t.finished||t.emit("progressUpdated",e)})):null;(this.supportFetch()?fetch(new Request(s,n({method:c,headers:i,body:"GET"===c?void 0:JSON.stringify(u),signal:this.controller.signal},p?{integrity:p,mode:"cors"}:{}))).then((function(t){return t.ok?l===e.TransformDataFormat.STRING?t.text():l===e.TransformDataFormat.ARRAY_BUFFER?t.arrayBuffer():t.blob():Promise.reject(new Error("xhr download "+s+" failed!"))})):new Promise((function(r,o){var n=new XMLHttpRequest;t.controller=n,n.open(c,s),n.responseType=l===e.TransformDataFormat.STRING?"text":l===e.TransformDataFormat.ARRAY_BUFFER?"arraybuffer":"blob",Object.entries(i).forEach((function(e){var t=e[0],r=e[1];n.setRequestHeader(t,r)})),n.onload=function(){var e=n.status,t=n.response,i=n.statusText;e>=200&&e<300||304===e?r(t):o(new Error(e+": "+i))},n.onprogress=function(e){var r=e||{},o=r.total,n=r.loaded;void 0===n||t.finished||(o?t.emit("progressUpdated",n/o*100):n&&!h&&(h=C((function(e){t.finished||t.emit("progressUpdated",e)}))))},n.onerror=function(){o(new Error("xhr download "+s+" failed!"))},n.send(JSON.stringify(u))}))).then((function(e){if(!t.finished){var r=t.xhrParams,o=r.encoding,n=r.blobType,i=r.unZipOptions,s=r.beforeTransformData,a=r.afterTransformData;null==h||h.finish(),t.finished=!0,t.clearTimeoutCheck(),(s?s(e):Promise.resolve(e)).then((function(e){return w(e,{encoding:o,blobType:n,unZipOptions:i}).then((function(e){return(a?a(e):Promise.resolve(e)).then((function(e){return t.emit("finished",e)}))}))})).catch((function(e){return t.emit("error",e)}))}})).catch((function(e){t.finished||(t.finished=!0,t.clearTimeoutCheck(),null==h||h.abort(),t.emit("error",e))}))}else this.emit("error",new Error("xhrDownloader url params invalid!"))},r.prototype.abort=function(){this.data=null,this.finished=!0,this.clearTimeoutCheck(),this.controller.abort()},r}(N),j=0;O.defaultMaxListeners=500;var x,B=new O,F="ThreadPoolReady",H=function(){j-=1,B.emit(F)};(x=e.DownloaderType||(e.DownloaderType={})).XHR="xhr",x.DOM="dom",x.SOCKET="socket";var W=function(t){function r(r){var o=t.call(this)||this;return o.aborted=!1,o.downloadParmas=n({type:e.DownloaderType.XHR},r),o.id=c(),o}return o(r,t),r.prototype.start=function(){var t=this;j+=1,this.progress=0,this.emit("downloadStart"),this.onDownloadStartCallback&&this.onDownloadStartCallback();var r=this.downloadParmas,o=r.type,n=r.xhrParams,i=r.domParams,s=r.socketParams;switch(o){case e.DownloaderType.DOM:this.downloader=new L(i),this.downloader.jsonp();break;case e.DownloaderType.SOCKET:this.downloader=new V(s);break;default:this.downloader=new U(n),this.downloader.ajax()}return this.downloader.startTimeoutCheck(),this.downloader.on("error",(function(e){t.emit("error",e),t.onErrorCallback&&t.onErrorCallback(e),H()})).on("finished",(function(e){t.emit("complete",e),t.onCompleteCallback&&t.onCompleteCallback(e),H()})).on("progressUpdated",(function(e){t.progress=e,t.emit("progressUpdated",e),t.onProgressUpdatedCallback&&t.onProgressUpdatedCallback(e)})).on("timeout",(function(){t.emit("timeout"),t.onTimeoutCallback&&t.onTimeoutCallback(),H()})),this},r.prototype.abort=function(){if(this.aborted)return this;this.aborted=!0,this.downloader&&!this.downloader.finished&&this.downloader.abort();var e=new Error("file download has been aborted");return this.emit("abort",e),this.onAbortCallback&&this.onAbortCallback(e),H(),this},r.prototype.onDownloadStart=function(e){return this.onDownloadStartCallback=e,this},r.prototype.onProgressUpdated=function(e){return this.onProgressUpdatedCallback=e,this},r.prototype.onError=function(e){return this.onErrorCallback=e,this},r.prototype.onComplete=function(e){return this.onCompleteCallback=e,this},r.prototype.onAbort=function(e){return this.onAbortCallback=e,this},r.prototype.onTimeout=function(e){return this.onTimeoutCallback=e,this},r.prototype.isInProgress=function(){return void 0!==this.progress},r.prototype.isFinished=function(){return 100===this.progress},r}(O),$=function(){function e(e){this.taskList=[],this.options=e||{};var t=this.options.threadLimit;if((void 0===t?6:t)>6)throw new Error("threadLimit must be lower than 6");B.on(F,this.startNextTask.bind(this))}return e.prototype.download=function(e){var t=new W(e),r=this.removeTask.bind(this,t);return t.on("abort",r),this.taskList.push(t),this.checkTaskReady(t),t},e.prototype.startNextTask=function(){var e=this.taskList.find((function(e){return!e.isInProgress()}));e&&this.checkTaskReady(e)},e.prototype.checkTaskReady=function(e){var t=this.options.threadLimit,r=void 0===t?6:t;if(!(this.taskList.findIndex((function(e){return!e.isInProgress()}))>=r||j+1>6)){var o=this.removeTask.bind(this,e);e.on("complete",o),e.on("error",o),e.on("timeout",o),setTimeout((function(){return e.start()}),0)}},e.prototype.removeTask=function(e){var t=this;this.taskList.some((function(r,o){return r===e&&(setTimeout((function(){return e.removeAllListeners()}),0),t.taskList.splice(o,1),!0)}))},e}();e.DownloadTask=W,e.IDownloadManager=$,e.appendBuffer=s,e.arrayBufferToBlob=h,e.arrayBufferToString=f,e.blobToArrayBuffer=l,e.blobToText=p,e.genUuid=c,e.getDataFormat=u,e.getExtName=v,e.getFileName=b,e.getFullPathName=y,e.isImgFile=S,e.isJsonFile=_,e.isVersionFile=E,e.monitorProgress=C,e.sep=a,e.stringToArrayBuffer=g,e.stringToBlob=m,e.transformData=w,Object.defineProperty(e,"__esModule",{value:!0})}(hE,lr(Object.freeze({__proto__:null,default:{}}))),cr(hE),function(e,t){var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])},r(e,t)};function o(e,t){function o(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}var n=function(){return n=Object.assign||function(e){for(var t,r=1,o=arguments.length;r0&&u.length>n){u.warned=!0;var d=new Error("Possible EventEmitter memory leak detected. "+u.length+" "+t+" listeners added. Use emitter.setMaxListeners() to increase limit");d.name="MaxListenersExceededWarning",d.emitter=e,d.type=t,d.count=u.length,function(e){"function"==typeof console.warn?console.warn(e):console.log(e)}(d)}}else u=s[t]=r,++e._eventsCount;return e}function d(e,t,r){var o=!1;function n(){e.removeListener(t,n),o||(o=!0,r.apply(e,arguments))}return n.listener=r,n}function c(e){var t=this._events;if(t){var r=t[e];if("function"==typeof r)return 1;if(r)return r.length}return 0}function l(e,t){for(var r=new Array(t);t--;)r[t]=e[t];return r}i.prototype=Object.create(null),s.EventEmitter=s,s.usingDomains=!1,s.prototype.domain=void 0,s.prototype._events=void 0,s.prototype._maxListeners=void 0,s.defaultMaxListeners=10,s.init=function(){this.domain=null,s.usingDomains&&undefined.active,this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=new i,this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw new TypeError('"n" argument must be a positive number');return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return a(this)},s.prototype.emit=function(e){var t,r,o,n,i,s,a,u="error"===e;if(s=this._events)u=u&&null==s.error;else if(!u)return!1;if(a=this.domain,u){if(t=arguments[1],!a){if(t instanceof Error)throw t;var d=new Error('Uncaught, unspecified "error" event. ('+t+")");throw d.context=t,d}return t||(t=new Error('Uncaught, unspecified "error" event')),t.domainEmitter=this,t.domain=a,t.domainThrown=!1,a.emit("error",t),!1}if(!(r=s[e]))return!1;var c="function"==typeof r;switch(o=arguments.length){case 1:!function(e,t,r){if(t)e.call(r);else for(var o=e.length,n=l(e,o),i=0;i0;)if(r[s]===t||r[s].listener&&r[s].listener===t){a=r[s].listener,n=s;break}if(n<0)return this;if(1===r.length){if(r[0]=void 0,0==--this._eventsCount)return this._events=new i,this;delete o[e]}else!function(e,t){for(var r=t,o=r+1,n=e.length;o0?Reflect.ownKeys(this._events):[]};var p="ZipInfo:";function h(e){var t;return null===(t=null==e?void 0:e.path)||void 0===t?void 0:t.startsWith(p)}function f(e){return"string"==typeof e&&e.startsWith(p)}function m(e,t){return(Array.isArray(e)?e:[e]).some((function(e){if("number"!=typeof e.version)throw new Error("file version must be an int number");return e.version=0;n--){var i=r.memoryFiles[n];("string"==typeof e&&(i.path===e||i.path.startsWith(""+e+t.sep))||e.path===i.path)&&r.memoryFiles.splice(n,1)}o(!0)}))},r.prototype.clear=function(){var e=this;return new Promise((function(t){e.memoryFiles=[],t(!0)}))},r.prototype.findFileByPath=function(e){var t=this;return new Promise((function(r){r(t.memoryFiles.filter((function(t){return t.path===e}))[0])}))},r.prototype.findFileBySourceURL=function(e){var t=this;return new Promise((function(r){r(t.memoryFiles.filter((function(t){return t.sourceURL===e})))}))},r.prototype.isDirectory=function(e){var r=this;return new Promise((function(o){f(e)?o(!1):o(r.memoryFiles.some((function(r){return r.path.startsWith(""+e+t.sep)})))}))},r.prototype.ls=function(e){var r=this;return new Promise((function(o){var n=[];r.memoryFiles.forEach((function(r){if(!h(r))if(e){if(r.path.startsWith(""+e+t.sep)){var o=r.path.split(""+e+t.sep)[1]||"";if(o.includes(t.sep)){var i=""+e+t.sep+o.split(t.sep)[0];return void(i&&!n.includes(i)&&n.push(i))}n.push(r)}}else if(r.path.includes(t.sep)){var s=r.path.split(t.sep)[0]||"";s&&!n.includes(s)&&n.push(s)}else n.push(r)})),o(n)}))},r}(y),E=function(e){function r(t){var r=e.call(this)||this;if(r.isLocalAvaliable=void 0,r.isEnable()){var o=(t||{}).nameSpaceId;r.storageName=function(e){return"resource-manager"+(e?"-"+e:"")}(o)}return r}return o(r,e),r.prototype.isEnable=function(){if(void 0!==this.isLocalAvaliable)return this.isLocalAvaliable;try{this.isLocalAvaliable=!0,localStorage.setItem("privateTest","")}catch(e){this.isLocalAvaliable=!1}return this.isLocalAvaliable},r.prototype.saveFile=function(e){var t=this;return this.isEnable()?new Promise((function(r){var o=t.getLocalFile();o.some((function(t,r){return t.path===e.path&&(o.splice(r,1,e),!0)}))||o.push(e),localStorage.setItem(t.storageName,JSON.stringify(o)),r(!0)})):Promise.resolve(!1)},r.prototype.getLocalFile=function(){var e=localStorage.getItem(this.storageName),t=[];if(e)try{t=JSON.parse(e)||"[]"}catch(e){console.log(e)}return t},r.prototype.removeFile=function(e){var r=this;return this.isEnable()?new Promise((function(o){for(var n=r.getLocalFile(),i=n.length-1;i>=0;i--){var s=n[i];("string"==typeof e&&(s.path===e||s.path.startsWith(""+e+t.sep))||e.path===s.path)&&n.splice(i,1)}localStorage.setItem(r.storageName,JSON.stringify(n)),o(!0)})):Promise.resolve(!1)},r.prototype.clear=function(){var e=this;return this.isEnable()?new Promise((function(t){localStorage.removeItem(e.storageName),t(!0)})):Promise.resolve(!1)},r.prototype.findFileByPath=function(e){var t=this;return this.isEnable()?new Promise((function(r){r(t.getLocalFile().filter((function(t){return t.path===e}))[0])})):Promise.resolve(void 0)},r.prototype.findFileBySourceURL=function(e){var t=this;return this.isEnable()?new Promise((function(r){r(t.getLocalFile().filter((function(t){return t.sourceURL===e})))})):Promise.resolve([])},r.prototype.isDirectory=function(e){var r=this;return this.isEnable()?new Promise((function(o){f(e)?o(!1):o(r.getLocalFile().some((function(r){return r.path.startsWith(""+e+t.sep)})))})):Promise.resolve(!1)},r.prototype.ls=function(e){var r=this;return this.isEnable()?new Promise((function(o){var n=[];r.getLocalFile().forEach((function(r){if(!h(r))if(e){if(r.path.startsWith(""+e+t.sep)){var o=r.path.split(""+e+t.sep)[1]||"";if(o.includes(t.sep)){var i=""+e+t.sep+o.split(t.sep)[0];return void(i&&!n.includes(i)&&n.push(i))}n.push(r)}}else if(r.path.includes(t.sep)){var s=r.path.split(t.sep)[0]||"";s&&!n.includes(s)&&n.push(s)}else n.push(r)})),o(n)})):Promise.resolve([])},r}(y);(v=e.FileStoreEnum||(e.FileStoreEnum={})).MEMORY="memoryStore",v.INDEX_DB="indexedDBStore",v.STORAGE="storageStore";var I=function(r){function i(e){var t=r.call(this)||this;return t.indexedDBStore=new S(e),t.memoryStore=new _,t.storageStore=new E(e),t}return o(i,r),i.prototype.saveFile=function(t,r,o){var i=this;void 0===r&&(r=!0);var s=(o||{}).forceSpecifyStore;return(r?this.findFileByPath(t.path,o):Promise.resolve(void 0)).then((function(r){if((null==r?void 0:r.version)&&m(t,r.version))throw new Error("there is an higher version file existed already");var o=n(n({},t),{createTime:r&&r.createTime||Date.now(),updateTime:Date.now()});return s&&i[s]&&i[s].isEnable()&&(s!==e.FileStoreEnum.STORAGE||i.isLocalStorageAvaliable(o))?i[s].saveFile(o):i[i.saveToTargetStoreRule(o)].saveFile(o)}))},i.prototype.isLocalStorageAvaliable=function(e){var r=e.data;return"string"===t.getDataFormat(r)&&r.length<=102400&&this.storageStore.isEnable()},i.prototype.saveToTargetStoreRule=function(t){return this.indexedDBStore.isEnable()?e.FileStoreEnum.INDEX_DB:this.isLocalStorageAvaliable(t)?e.FileStoreEnum.STORAGE:e.FileStoreEnum.MEMORY},i.prototype.removeFile=function(e,t){var r=(t||{}).forceSpecifyStore;return r&&this[r]?this[r].removeFile(e):Promise.all([this.indexedDBStore.removeFile(e),this.storageStore.removeFile(e),this.memoryStore.removeFile(e)]).then((function(){return!0}))},i.prototype.clear=function(e){var t=(e||{}).forceSpecifyStore;return t&&this[t]?this[t].clear():Promise.all([this.indexedDBStore.clear(),this.storageStore.clear(),this.memoryStore.clear()]).then((function(){return!0}))},i.prototype.findFileByPath=function(e,t){var r=this,o=(t||{}).forceSpecifyStore;return o&&this[o]?this[o].findFileByPath(e):g(this.searchInTargetStoreRule(),(function(t,o){return t?Promise.resolve(t):r[o].findFileByPath(e)}))},i.prototype.findFileBySourceURL=function(e,t){var r=this,o=(t||{}).forceSpecifyStore;return o&&this[o]?this[o].findFileBySourceURL(e):g(this.searchInTargetStoreRule(),(function(t,o){return r[o].findFileBySourceURL(e).then((function(e){return t?t.filter((function(t){return!e.some((function(e){return e.path===t.path}))})).concat(e||[]):e||[]}))}))},i.prototype.searchInTargetStoreRule=function(){return[e.FileStoreEnum.INDEX_DB,e.FileStoreEnum.STORAGE,e.FileStoreEnum.MEMORY]},i.prototype.isDirectory=function(e){var t=this;return e?g(this.searchInTargetStoreRule(),(function(r,o){return r?Promise.resolve(!0):t[o].isDirectory(e)})):Promise.resolve(!0)},i.prototype.ls=function(e){var t=this;return this.isDirectory(e).then((function(r){if(!r)throw new Error("path: "+e+" is an invalid directory path");return g(t.searchInTargetStoreRule(),(function(r,o){return t[o].ls(e).then((function(e){return r?(e||[]).concat(r.filter((function(t){return!e.some((function(e){return"string"==typeof t?e===t:"string"!=typeof e&&e.path===t.path}))}))):e}))}))}))},i}(s),A=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return o(t,e),t}(s),w=function(e){function r(r){var o=e.call(this)||this,n=r||{},i=n.storeOptions,s=n.downloadManagerOptions;return o.downloadManager=new t.IDownloadManager(s),o.store=new I(i),o.store.indexedDBStore.on("ready",(function(){return o.emit("ready")})),o}return o(r,e),r.prototype.getFile=function(e,t,r){var o=this,n=new A,i=Promise.resolve(void 0),s=t||{},a=s.downloadOptions,u=s.forceDownload,d=s.saveRootPath;u?i=Promise.resolve(void 0):"string"==typeof e?i=this.store.findFileByPath(e,r):(null==e?void 0:e.sourceURL)?i=this.store.findFileBySourceURL(e.sourceURL):a&&(a.domParams||a.socketParams||a.xhrParams)&&(i=this.store.findFileBySourceURL(this.genSourceURL(a)));var c=null,l=new Promise((function(e){c=e}));return n.getDownloadTask=function(){return l},i=i.then((function(e){if(e&&(!Array.isArray(e)||e.length)){var t=e;if(Array.isArray(t)){var o=t.find((function(e){return h(e)}));if(!o)return;t=t.filter((function(e){return!h(e)}));var i=o.data;if("string"!=typeof i)return;if(!JSON.parse(i||"[]").every((function(e){return t.some((function(t){return t.path===e}))})))return}if(!(null==r?void 0:r.targetVersion)||!m(t,r.targetVersion))return n.emit("checkExpire",!1),t;n.emit("checkExpire",!0)}})).then((function(t){if(!t&&a){var i=o.downloadManager.download(a);return c(i),new Promise((function(t,s){i.on("complete",(function(i){setTimeout((function(){var s=Array.isArray(i)?i.map((function(e){var t=e.data,n=e.path,i=e.extName;return{path:o.genFilePath(d,n),sourceURL:o.genSourceURL(a),data:t,fileFormat:i||o.getFileFormat(a),version:(null==r?void 0:r.targetVersion)||1}})):{path:o.genFilePath(d,void 0),sourceURL:o.genSourceURL(a),data:i,fileFormat:o.getFileFormat(a),version:(null==r?void 0:r.targetVersion)||1};if(Array.isArray(s)&&"string"==typeof e&&e){var u=s.find((function(t){return t.path===e}));t(u||s)}else t(s);n.emit("beforeSet",s),o.beforeWrite(s,r).then((function(){n.emit("afterSet")})).catch((function(e){return n.emit("afterSet",e)}))}),0)})),i.on("abort",s),i.on("error",s),i.on("timeout",(function(){return s(new Error("download timeout"))}))}))}return c(void 0),t})).catch((function(e){return c(void 0),Promise.reject(e)})),n.getResult=function(){return i},n},r.prototype.genSourceURL=function(e){var r=e.domParams,o=e.type,n=e.xhrParams;if(o===t.DownloaderType.SOCKET)return null;var i=(o===t.DownloaderType.DOM?r:n)||{},s=i.url,a=void 0===s?"":s,u=i.body;return u&&Object.keys(u).length?a+(a.includes("?")?"&":"?")+"downloadBodyParams="+JSON.stringify(u):a},r.prototype.updateFile=function(e,t){return this.saveStore(e,!0,t)},r.prototype.beforeWrite=function(e,t){var r=this;return Array.isArray(e)?Promise.all(e.concat(function(e){var t=e[0].sourceURL||"";return{path:""+p+t,sourceURL:t,data:JSON.stringify(e.map((function(e){return e.path})))}}(e)).map((function(e){return r.saveStore(e,!1,t)}))).then((function(e){return e.filter((function(e){return!h(e)}))})):this.saveStore(e,!0,t)},r.prototype.getFileFormat=function(e){var r=e||{},o=r.xhrParams,n=r.domParams,i=r.socketParams,s=r.type;return s===t.DownloaderType.DOM&&(null==n?void 0:n.fileFormat)?n.fileFormat:s===t.DownloaderType.SOCKET&&(null==i?void 0:i.fileFormat)?i.fileFormat:(null==o?void 0:o.fileFormat)?o.fileFormat:"unknow"},r.prototype.genFilePath=function(e,r){return r?""+(e||"")+(e?t.sep:"")+r:e||""},r.prototype.saveStore=function(e,t,r){return void 0===t&&(t=!0),this.store.saveFile(e,t,r).then((function(t){if(t)return e;throw new Error("fail to save file in local store")}))},r.prototype.remove=function(e,t){return this.store.removeFile(e,t)},r.prototype.clear=function(e){return this.store.clear(e)},r.prototype.list=function(e){return this.store.ls(e)},r.prototype.updateVersion=function(e,t){var r=this;return this.store.findFileByPath(e).then((function(o){if(o)return r.saveStore(n(n({},o),{version:t})).then((function(){}));throw new Error("the target path: "+e+" isn't existed")}))},r.prototype.updateSourceURL=function(e,t){var r=this;return this.store.findFileByPath(e).then((function(o){if(o)return r.saveStore(n(n({},o),{sourceURL:t})).then((function(){}));throw new Error("the target path: "+e+" isn't existed")}))},r}(s);e.IResourceManager=w,Object.defineProperty(e,"__esModule",{value:!0})}(pE.exports,hE),cr(pE.exports);const fE="__ZOOM_SDK_MEDIA_PLAYBACK_SOURCE_VIDEO__";class mE{constructor(){this.audioPlaybackUrl=void 0,this.videoPlaybackUrl=void 0,this._audioElement=void 0,this._videoElement=void 0,this.videoSrc=void 0,this.isUsingSameFile=void 0}static getInstance(){return void 0===this.instance&&(this.instance=new mE),this.instance}setAudioElement(e){return void 0===this._audioElement&&(this._audioElement=new Audio),new Promise(((t,r)=>{if(this.videoSrc===e.url)this._audioElement.pause(),this.isUsingSameFile=!0,this._videoElement.muted=!1,(n=this._videoElement).currentTime>0&&!n.paused&&!n.ended&&n.readyState>2?t(""):this._videoElement.play().then((()=>{t("")})).catch((()=>{r()}));else{var o;this.isUsingSameFile=!1;const n=qi()?"canplay":"canplaythrough",i=()=>{this._audioElement.play().then((()=>{this._audioElement.removeEventListener(n,i),t("")}))},s=()=>{this._audioElement.removeEventListener(n,i),this._audioElement.removeEventListener("error",s),r()};this._audioElement.addEventListener(n,i),this._audioElement.addEventListener("error",s),this._audioElement.src=e.url,this._audioElement.loop=!!e.loop,On(e.url)&&this._audioElement.setAttribute("crossorigin",""),this._audioElement.currentTime=Math.max(null!==(o=e.currentTime)&&void 0!==o?o:0,1e-4)}var n}))}setVideoElement(e){return void 0===this._videoElement&&(this._videoElement=document.createElement("video")),new Promise(((t,r)=>{var o;this.videoSrc=e.url;const n=qi()?"canplay":"canplaythrough",i=()=>{this._videoElement.play().then((()=>{this._videoElement.removeEventListener(n,i),t("")}))},s=()=>{this._videoElement.removeEventListener(n,i),this._videoElement.removeEventListener("error",s),r()};this._videoElement.addEventListener(n,i),this._videoElement.addEventListener("error",s),this._videoElement.src=e.url,this.isUsingSameFile||(this._videoElement.muted=!0),this._videoElement.loop=!!e.loop,this._videoElement.currentTime=null!==(o=e.currentTime)&&void 0!==o?o:0,On(e.url)&&this._videoElement.setAttribute("crossorigin",""),Ji()&&!document.getElementById(fE)&&(this._videoElement.id=fE,this._videoElement.setAttribute("style","position:fixed;top:-10000px;left:-10000px"),document.body.appendChild(this._videoElement))}))}get audioElement(){return this.isUsingSameFile?this._videoElement:this._audioElement}get videoElement(){return this._videoElement}stopAudioElement(){this.isUsingSameFile||this._audioElement&&(this._audioElement.currentTime=0,this._audioElement.pause())}stopVideoElement(){this._videoElement&&this._videoElement.pause(),this.videoSrc=void 0}}function gE(e,t,r,o){const{meeting:{userId:n},audio:{localShareAudioUserMutedList:i},share:{isReceiveSharingFromMainSession:s}}=o;return i.filter((e=>e.userId!==t)).forEach((t=>{e.setSharingAudioVolume(t.userId,!0,t.isFromMainSession)})),e.setSharingAudioVolume(t,r,!!s),t===n?rp(r):Xl({userId:t,muted:r})}async function vE(e,t,r){var o,n;const{audio:{audioSsrc:i,activeMicrophone:s,activeSpeaker:a,isAllowToTalk:u,customizeAudioOption:{speakerOnly:d,mute:c},isUsingMediaPlayback:l,mediaPlaybackFile:p,isBackgroundNoiseSuppression:h,isHIDEnabled:f,microphoneDevicesList:m,isVerifiedAudioPermissionOnIOSMobile:g},meeting:{svcUrl:v,conId:y,reportDomain:b,isAudioBridgeEnabled:S,userId:_}}=t,E=bl(t),I=!!d||pl(E.userRole)&&!u,A=null!=r?r:!I;Zm()&&!S&&console.warn("Cannot start audio due to the service is not ready.");let w=s;if(l&&null!=p&&p.url){const e=mE.getInstance();await e.setAudioElement(p),w=e.audioElement}else mE.getInstance().stopAudioElement();return I&&!g&&Zi()&&await async function(){await navigator.mediaDevices.getUserMedia({audio:!0})}(),null===(o=e.joinComputerAudio(i,w,a,A,Zm()?{rwgHost:v,cid:y,nginxHost:b}:void 0,h,f?{microphoneLabel:null===(n=m.find((e=>e.deviceId===s)))||void 0===n?void 0:n.label,defaultMuted:!(null==E||!E.muted)}:void 0))||void 0===o?void 0:o.then((()=>{c&&(Ws.createAgent().mute(_,!0),e.muteAudio()),null!=E&&E.muted?e.muteAudio():e.unmuteAudio()}))}async function yE(e,t,r){const o=[],{audio:{isJoinComputerAudioBeforeSharingAudio:n,mutedBeforeSharingAudio:i}}=r,s=bl(r);return!0===n&&(await vE(e,r),o.push(ep(void 0)),!1===i&&(o.push(Ul(!0)),t.mute(s.userId,!1)),o.push(Zl(void 0))),o}async function bE(e,t,r){const{audio:{isSharingAudio:o},meeting:{userId:n}}=r,i=[];if(i.push(gE(e,n,!0,r)),o){if(await e.leaveSharingAudio(!1),i.push(op(!1)),!IE()){const o=await yE(e,t,r);i.push(...o)}setTimeout((()=>{Lc(yd,{state:"off"})}),0)}return i.push(tp(!1)),i}async function SE(e,t,r){const{audio:{audioSsrc:o,activeMicrophone:n,activeSpeaker:i}}=r,s=bl(r),a=[];if(!IE()){const t=await async function(e,t){const r=[],o=bl(t),{audio:{isMicrophoneForbidden:n}}=t;return(null==o?void 0:o.audio)===yu.Computer&&(r.push(ep(!0)),r.push(Zl(o.muted)),o.muted||e.muteAudio(),await e.leaveComputerAudio(),r.push(Hl(0)),n&&r.push(Fl(!1))),r}(e,r);a.push(...t)}return await e.leaveSharingAudio(!0),await e.joinSharingAudio({ssrc:o,microphoneDeviceId:n,speakerDeviceId:i,isCaptureAudio:pl(s.userRole)}),a.push(tp(!0)),a.push(op(!0)),a.push(gE(e,s.userId,!1,r)),a.findIndex((e=>e.type===`${ep}`&&!0===e.payload))>-1&&(a.push(Ul(!0)),t.mute(r.meeting.userId,!0),Lc(nd,{source:Ba.SharingAudio})),setTimeout((()=>{Lc(yd,{state:"on"})}),0),a}mE.instance=void 0;const _E=()=>{if(cs())return!0;{var e;const r=null===(e=$i())||void 0===e?void 0:e.toLocaleLowerCase();if(r.indexOf("safari")>-1&&-1===r.indexOf("ios-safari")){var t;const e=null===(t=navigator.userAgent.match(/version\/(\d+\.?\d+)/i))||void 0===t?void 0:t[1];return En(e||"","15.2")>=0}return!1}};function EE(e,t,r){for(let o=0;oe.userId===n));r&&(r.displayName=i,t.splice(t.indexOf(n),1))}}}function IE(){return Js.isSupportOpenMicWhenShareAudio()}function AE(){return Js.isSupportAudioDenoise()}function wE(){var e;return"function"==typeof(null===(e=window.navigator.hid)||void 0===e?void 0:e.requestDevice)}function CE(e,t,r){const{audio:{isAllowToTalk:o,customizeAudioOption:n},media:{audioDecodeStatus:i,audioEncodeStatus:s}}=e;return{encodeInitStatus:pl(t.userRole)&&!o||r||null!=n&&n.speakerOnly||Zm()?"success":s,decodeInitStatus:Zm()?"success":i}}const TE=Ws.createAgent(),OE=E_(Xm(Js.getInstance())),RE=e=>!e.muted;var kE=Object.freeze({__proto__:null,audioAsnsEpic:(e,t)=>wo(e,12033).pipe(Zt(t),ye((e=>{let[t,r]=e;const{participants:{allowTalkAttendeesList:o}}=r,n=t.payload.body;let i={};if(n){const e=Al(r),t=Object.keys(n).map((e=>({key:e,userId:n[e]}))),s=t.map((e=>e.userId));EE(t,s,e),o.length>0&&s.length>0&&EE(t,s,o),i=t.reduce(((e,t)=>({...e,[`${t.key}`]:{userId:t.userId,displayName:t.displayName}})),{}),Lc(Xu,Object.values(i))}return Dl(i)}))),unmuteConsentAfterSpotlighted:(e,t)=>wo(e,16135).pipe(Zt(t),Gt((e=>{let[t,r]=e;const{payload:{body:{id:o,bLeadershipOn:n}}}=t,{audio:{bCanUnmute:i}}=r,s=bl(r);if(s){const{isHost:e,bCoHost:t,userId:r,audio:a,muted:u}=s,d=e||t;n&&wn(r,o)&&(null!==a&&""!==a&&!0!==u||!d&&!i||Lc(ed,xa.Spotlight))}})),kt(W)),unmuteConsentEpic:(e,t)=>wo(e,12037).pipe(Zt(t),Gt((e=>{let[,t]=e;const r=bl(t);null!==(null==r?void 0:r.audio)&&""!==(null==r?void 0:r.audio)&&1==(null==r?void 0:r.muted)&&Lc(ed,xa.Unmute)})),kt(W)),setAudioAttributeEpic:(e,t)=>wo(e,As).pipe(Ke((e=>e.payload.body&&["bCanUnmute","bMutedAll","bMutedUponEntry"].some((t=>void 0!==e.payload.body[t])))),Rm((e=>{const{payload:{body:{bCanUnmute:r,bMutedAll:o,bMutedUponEntry:n}}}=e;if(void 0!==r)return Pl(e.payload.body.bCanUnmute);if(void 0!==o){const r=bl(t.value);if(((null==r?void 0:r.audio)===yu.Computer||(null==r?void 0:r.audio)===yu.Phone)&&0==r.muted)return Vl(e.payload.body.bMutedAll)}return void 0!==n?xl(e.payload.body.bMutedUponEntry):void 0}))),currentUserAudioChangeEpic:(e,t)=>wo(e,Is).pipe(Zt(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Rl.Connected})),Pe((e=>{let[r,o]=e;const{payload:{body:{update:n}}}=r;if(null!=n&&n.some((e=>void 0!==e.audio||void 0!==e.muted))){const{meeting:{userId:e}}=o,r=n.filter((t=>t.id!==e)),i=n.filter((t=>t.id===e));if(r&&r.forEach((e=>{Lc(sd,e)})),i.length>0)return zm(t).pipe(Pe((e=>{const{audio:{isActiveOperation:r,isMutedAll:o,isAllowToTalk:n,isShareAudioEnabled:s,isSharingAudio:a,isAudioBridgeSignalReconnecting:u,customizeAudioOption:{speakerOnly:d}}}=t.value,c=e;return Oe(i).pipe(Pm((async e=>{const t=[];if(e.audio!==c.audio)if(""===e.audio)Lc(od);else if(e.audio===yu.Computer){const e=pl(c.userRole)&&!n||!!d;a&&Lc(td),e&&(Lc(td),Zi()&&t.push(mp(!0))),u&&(Lc(td),t.push(gp(!1)))}else e.audio===yu.Phone&&(c.audio===yu.Computer&&(await OE.leaveComputerAudio(),TE.joinOrLeaveVoip(!1)),Lc(rd));if(""!==c.audio&&e.muted!==c.muted){if(!0===e.muted){const e=r?Ba.Active:o?Ba.PassiveByMuteAll:Ba.PassiveByMuteOne;Lc(nd,{source:e}),s&&!IE()||OE.muteAudio()}else!1===e.muted&&(Lc(id,{source:r?"active":"passive"}),OE.unmuteAudio());t.push(Ul(!1),Vl(!1))}return t})))})))}return W}))),handleAllowToTalkEpic:(e,t)=>wo(e,12036).pipe(Zt(t),Pe((e=>{let[t,r]=e;const o=bl(r),{media:{audioEncodeStatus:n}}=r,{promoterID:i,bAllowTalk:s}=t.payload.body;if((null==o?void 0:o.userId)===i){if(Lc(vd,s),s)return"success"!==n&&OE.enableAudioEncode(),Gm("audio",n,"success").pipe(Pe((e=>(e&&Lc(ed,xa.AllowToTalk),W))),Nt(Ll(!0)));if(TE.mute(i,!0),(null==o?void 0:o.audio)===yu.Computer)return OE.leaveComputerAudio(),Xe(300).pipe(Gt((async()=>{(_E()?Qe(xe(document,"click").pipe(bt(1)),xe(document,"touchend").pipe(bt(1))).toPromise():Promise.resolve(!0)).then((()=>{vE(OE,r,!1)}))})),kt(W),Nt(Ll(!1)))}return W}))),handleAllowToTalkResponseEpic:e=>wo(e,8205).pipe(Gt((e=>{Lc("AUDIO_ALLOW_TO_TALK_RESPONSE",e.payload.body)})),kt(W)),handleAttendeePromoteDepromote:(e,t)=>To(e,24597).pipe(Zt(t),Gt((e=>{let[t,r]=e;const o=bl(r);(null==o?void 0:o.audio)===yu.Phone?TE.audioDrop(o.userId):(null==o?void 0:o.audio)===yu.Computer&&t.payload.body.bPromote})),kt(W)),setAudioSSRCEpic:(e,t)=>wo(e,12035).pipe(Zt(t),Pe((e=>{let[r,o]=e;const{meeting:{currentUserAudioBeforeReset:n}}=o,{payload:{body:{ssrc:i}}}=r,s=zm(t).pipe(Pe((e=>{if(n===yu.Computer&&(null==e||!e.audio)){const{encodeInitStatus:r,decodeInitStatus:n}=CE(o,e);return Gm("audio",r,n).pipe(Ke((e=>{let[t,r]=e;return t&&r})),Gt((()=>{(_E()?Qe(xe(document,"click").pipe(bt(1)),xe(document,"touchend").pipe(bt(1))).toPromise():Promise.resolve(!0)).then((()=>{TE.joinOrLeaveVoip(!0),vE(OE,t.value)}));const{audio:{locallyMutedAudioList:e,localUserAudioVolumeList:r,isStopAllImcomingAudio:o}}=t.value;e.length>0&&e.forEach((e=>{OE.muteOrUnmuteOtherAudio(e,!0)})),r.length>0&&r.forEach((e=>{OE.adjustOtherAudioVolume(e.userId,e.volume)})),o&&OE.stopAllIncomingAudio(!0)})),At(mi(void 0)))}return W})));return Ge(Q(jl(i)),s)}))),handleMergeAudioEpic:(e,t)=>wo(e,7952).pipe(Ut((e=>jc(rd,1).pipe(Zt(t),Gt((t=>{let[,r]=t;const{BindStatus:o,nOperatorUserId:n}=e.payload.body,i=r.participants.attendeesList.find((e=>e.userId===n));!0===o&&Lc(pd,{operatorName:null==i?void 0:i.displayName,operatorUserId:n,operatorRole:null==i?void 0:i.userRole})})))))),handleUserGrantAudioCaptureEpic:(e,t)=>Ro(e,Ua.UserGrantCaptureAudio).pipe(Zt(t),Pe((e=>{let[,t]=e;const r=bl(t);var o;(o=r,(null==o?void 0:o.audio)===yu.Computer?Promise.resolve():Uc({event:Zs,operations:[Ke((e=>void 0!==e.audio)),bt(1)]},(e=>{let{audio:t}=e;return t===yu.Phone||t===yu.Computer}))).then((()=>{Lc(td)}));const{meeting:{isCurrentUserMutedBeforeReset:n},audio:{bMutedUponEntry:i,isUserGrantCaptureAudio:s,isAllowToTalk:a}}=t,u=[Bl(!0)];if(r){!0===r.muted&&!1===a&&TE.mute(r.userId,!0);const e=s||r.isHost||a;(!0===n||!e&&i)&&(TE.mute(r.userId,!0),n&&u.push(gi(void 0)))}return Oe(u)}))),handleUserForbiddenMicrophoneEpic:e=>Ro(e,Ua.UserForbiddedCaptureAudio).pipe(Gt((()=>{Lc(hd)})),At(Fl(!0))),handleAudioSocketErrorEpic:e=>Ro(e,Ua.AudioWebsocketBroken).pipe(Gt((()=>{Lc(fd)})),kt(W)),handleAudioZeroDataEpic:(e,t)=>Ro(e,Ua.AudioZeroData).pipe(Zt(t),Rm((e=>{let[,t]=e;const{audio:{webrtcRestartCount:r,activeMicrophone:o}}=t;if(r<3)return OE.restoreWebRTC(o),Hl(r+1)}))),handleAutoPlayEpic:(e,t)=>e.pipe(tr(`${Kl}`),Ke((e=>!1===e.payload)),Pe((()=>(Lc(md),Qe(xe(document,"click").pipe(bt(1)),xe(document,"touchend").pipe(bt(1))).pipe(Gt((()=>{TE.joinOrLeaveVoip(!0),vE(OE,t.value)})),At(Kl(!0))))))),handleAudioActionCompleteEpic:e=>Ro(e,[Ua.JoinComputerAudioComplete,Ua.JoinSharingAudioComplete,Ua.LeaveComputerAudioComplete,Ua.LeaveSharingAudioComplete]).pipe(Gt((()=>{Ym.completeAudioAction()})),kt(W)),handleAudioQosDataEpic:(e,t)=>Ro(e,Ua.AudioQosData).pipe(Zt(t),ye((e=>{var t;let[r,o]=e;const{meeting:{isWebinar:n},media:{audioEncodeStatus:i,audioDecodeStatus:s},participants:{xmppAttendeeList:a,allowTalkAttendeesList:u}}=o,d=bl(o),c=Ol(o);let l=c.length>0,p=c.some(RE);n&&(l=l||Boolean(a.length),p=p||u.some(RE));const h=((null==d?void 0:d.audio)===yu.Computer||(null==d?void 0:d.audio)===yu.Phone)&&"success"===i&&!(null!=d&&d.muted)&&l,f=((null==d?void 0:d.audio)===yu.Computer||(null==d?void 0:d.audio)===yu.Phone)&&"success"===s&&l&&p;return null!==(t=r.payload.data)&&void 0!==t&&t.encoding?h?(Lc(bd,r.payload),np(r.payload)):np(du):f?(Lc(bd,r.payload),ip(r.payload)):ip(du)}))),handleResetLocalMuteStateAfterUserLeaveEpic:(e,t)=>wo(e,Is).pipe(Zt(t),Ke((e=>{let[t,r]=e;const{payload:{body:o}}=t,{audio:{locallyMutedAudioList:n,localUserAudioVolumeList:i}}=r;return(n.length>0||i.length>0)&&(null==o?void 0:o.remove)&&o.remove.length>0})),Pe((e=>{let[t,r]=e;const{payload:{body:{remove:o}}}=t,{audio:{locallyMutedAudioList:n,localUserAudioVolumeList:i}}=r,s=n.concat(i.map((e=>e.userId))).filter((e=>-1!==o.indexOf((t=>t.id===e))));return s.length>0?(s.forEach((e=>{OE.muteOrUnmuteOtherAudio(e,!1)})),Oe(s.map((e=>[ap(e),dp({userId:e})])).flat())):W}))),handleHIDStatusEpic:(e,t)=>Ro(e,Ua.HidStatusMute).pipe(Pe((e=>{const{payload:{data:r}}=e,o=t.value,{meeting:{userId:n},audio:{isShareAudioEnabled:i,bCanUnmute:s}}=o,a=[];if(a.push(Ul(!0)),r)i&&!IE()&&a.push(Zl(!0)),TE.mute(n,!0);else if(!i||IE()){i&&a.push(Zl(!1));const e=bl(o);(s||null!=e&&e.isHost||null!=e&&e.bCoHost)&&TE.mute(n,!1)}return Oe(a)})))});const DE=Ws.createAgent(),PE=E_(Xm(Js.getInstance()));var ME=Object.freeze({__proto__:null,handleAddLocalShareAudioUserEpic:(e,t)=>Oo(e,Is).pipe(Ke((e=>{const t=e.payload.body.update;return t&&t.length>0&&t.findIndex((e=>void 0!==e.bShareOn))>-1})),Zt(t),Pe((e=>{let[t,r]=e;const{payload:{body:{update:o}}}=t,{audio:{localShareAudioUserMutedList:n}}=r,i=o.filter((e=>!0===e.bShareOn&&!0===e.bShareAudioOn)),s=[];return i.length>0&&i.forEach((e=>{-1===n.findIndex((t=>t.userId===e.id))&&s.push(Yl({userId:e.id,isFromMainSession:!!e.bShareToBORooms}))})),Oe(s)}))),handleShareWithAudioEpic:(e,t)=>Ro(e,Ua.SharingDesktopStreamHaveAudio).pipe(Ut((()=>wo(e,Is).pipe(Ke((e=>{var r;const{payload:{body:o}}=e,{meeting:{userId:n}}=t.value;return(null==o||null===(r=o.update)||void 0===r?void 0:r.findIndex((e=>e.id===n&&!0===e.bShareOn)))>-1})),bt(1),Pm((async()=>{const e=t.value;return await SE(PE,DE,e)})),Nt(tp(!0)))))),handleMediaSDKLeaveShareAudioEpic:(e,t)=>Ro(e,Ua.SharingDesktopStreamHaveNoAudio).pipe(Zt(t),Ke((e=>{var t;let[,r]=e;return!0===(null===(t=r.audio)||void 0===t?void 0:t.isShareAudioEnabled)})),Pm((async e=>{let[,t]=e;return await bE(PE,DE,t)}))),handleJoinComputerAudioAfterShareAudioEpic:(e,t)=>wo(e,Is).pipe(Zt(t),Ke((e=>{let[,t]=e;return t.socket.zoomSocketStatus===Rl.Connected&&!0===t.audio.isSharingAudio})),Pe((e=>{var r;let[o,n]=e;if(null!==(r=o.payload.body.update)&&void 0!==r&&r.some((e=>void 0!==e.audio||void 0!==e.muted))){const{meeting:{userId:e}}=n,r=o.payload.body.update.filter((t=>t.id===e));return zm(t).pipe(Pe((e=>{const t=[];return r.findIndex((e=>e.audio===yu.Computer))>-1&&(null==e?void 0:e.audio)!==yu.Computer&&!IE()&&(t.push(ep(!0)),t.push(Zl(!0))),Oe(t)})))}return W}))),handleShareAudioWithCurrentShareStatusChangeEpic:(e,t)=>e.pipe(tr(`${Ip}`),ee(he),Zt(t),Ke((e=>{var t;let[,r]=e;return!0===(null===(t=r.audio)||void 0===t?void 0:t.isShareAudioEnabled)})),Pm((async e=>{let[t,r]=e;const{payload:o}=t,{audio:{isShareAudioMuted:n,isSharingAudio:i}}=r,s=[];if(o===Ka.End){const e=await bE(PE,DE,r);s.push(...e)}else if(o===Ka.Paused){if(!1===n&&!0===i){if(await PE.leaveSharingAudio(!0),s.push(op(!1)),!IE()){const e=await yE(PE,DE,r);s.push(...e)}setTimeout((()=>{Lc(yd,{state:"off"})}),0)}}else if(o===Ka.Sharing&&!1===n&&!1===i){const e=await SE(PE,DE,r);s.push(...e)}return s})))});const NE=Ws.createAgent(),LE=Js.getInstance();var VE=Object.freeze({__proto__:null,handleAudioBridgeTokenEpic:e=>wo(e,4299).pipe(Gt((e=>{const{payload:t}=e;LE.passThroughRWGMessage(t)})),kt(W)),handleAudioBridgeReconnectEpic:e=>Ro(e,Ua.AudioBridgeReconnectStart).pipe(ye((()=>(NE.joinOrLeaveVoip(!1),gp(!0))))),handleAudioBridgeReconnectSuccessEpic:e=>Ro(e,Ua.AudioBridgeReconnectEnd).pipe(Gt((()=>{NE.joinOrLeaveVoip(!0)})),kt(W)),handleSendNodeAudioStatusEpic:e=>wo(e,Is).pipe(Ke((e=>{var t,r;return Zm()&&((null===(t=e.payload.body.update)||void 0===t?void 0:t.some((e=>void 0!==e.muted)))||(null===(r=e.payload.body.remove)||void 0===r?void 0:r.length)>0)})),Gt((e=>{const{payload:{body:{update:t,remove:r}}}=e;LE.sendUserAudioStatus({update:(t||[]).filter((e=>void 0!==e.muted)).map((e=>({userId:e.id,muted:e.muted}))),remove:(r||[]).map((e=>({userId:e.id})))})})),kt(W)),handleAudioBridgeFailoverEpic:e=>Ro(e,Ua.NotifyUIFailover).pipe(ye((()=>(Lc(ia,{reason:Mi.Failover}),Qn(Bi.NotifyUiFailover))))),handlePreInitAudioBridge:(e,t)=>e.pipe(tr(`${co}`),Ke((()=>{const{meeting:{isAudioBridgeEnabled:e,abToken:r}}=t.value;return e&&Zm()&&!!r})),Gt((()=>{const{meeting:{abToken:e,svcUrl:r,reportDomain:o,conId:n}}=t.value;LE.preInitAudioBridge({abToken:e,rwgHost:r,cid:n,nginxHost:o})})),kt(W))}),UE=Object.freeze({__proto__:null,handleDialOutEpic:(e,t)=>wo(e,8198).pipe(Zt(t),Ke((e=>{let[t,r]=e;return r.audio.dialout.map((e=>e.sequence)).includes(t.payload.seq)})),Pe((e=>{let[t,r]=e;const{payload:{seq:o,body:{phoneNodeID:n,result:i}}}=t,s=[Nl({code:i,sequence:o,nodeId:n})];if(Lc(ad,{code:i}),i===Ha.Success){if(Lc(ud),n&&Al(r).findIndex((e=>e.userId===n))>-1){var a;const e=null===(a=r.audio.dialout.find((e=>e.sequence===o)))||void 0===a?void 0:a.phoneNumber;e&&(s.push(Zc({userId:n,key:"phoneNumber",value:e})),Lc(Xs,[{userId:n,phoneNumber:e}]))}}else[Ha.Canceling,Ha.Canceled,Ha.CancelFailed].includes(i)?i===Ha.Canceled?Lc(cd):i===Ha.CancelFailed&&Lc(ld):-1===[Ha.Calling,Ha.Ringing,Ha.Accepted,Ha.Success].indexOf(i)&&Lc(dd);return Oe(s)})))});const jE={asnIds:{asn1:{userId:0,displayName:null},asn2:{userId:0,displayName:null},asn3:{userId:0,displayName:null}},microphoneDevicesList:[],speakerDevicesList:[],activeMicrophone:"default",activeSpeaker:"default",isMicrophoneForbidden:!1,audioSsrc:0,bCanUnmute:!1,bMutedUponEntry:!1,isAllowToTalk:void 0,dialout:[],canPlayAudio:!1,isActiveOperation:!1,isMutedAll:!1,isUserGrantCaptureAudio:!1,webrtcRestartCount:0,isComputerAudioLoading:!1,isUsingMediaPlayback:!1,customizeAudioOption:{},localShareAudioUserMutedList:[],locallyMutedAudioList:[],localUserAudioVolumeList:[],isStopAllImcomingAudio:!1,statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0}}},xE=zr({[`${Dl}`]:ev(((e,t)=>{let{payload:r}=t;e.asnIds={...r}})),[`${Pl}`]:ev(((e,t)=>{let{payload:r}=t;e.bCanUnmute=r})),[`${Ml}`]:ev(((e,t)=>{let{payload:r}=t;const{sequence:o,phoneNumber:n}=r;-1===e.dialout.findIndex((e=>e.sequence===o))&&e.dialout.push({sequence:o,phoneNumber:n,returnCode:-1})})),[`${Nl}`]:ev(((e,t)=>{let{payload:r}=t;const{sequence:o,code:n,nodeId:i}=r,s=e.dialout.find((e=>e.sequence===o));s&&(s.returnCode=n,i&&(s.phoneNodeId=i))})),[`${Ll}`]:ev(((e,t)=>{let{payload:r}=t;e.isAllowToTalk=r,e.isAllowToTalkAttendeeConnected=!1})),[`${Ul}`]:ev(((e,t)=>{let{payload:r}=t;e.isActiveOperation=r})),[`${Vl}`]:ev(((e,t)=>{let{payload:r}=t;e.isMutedAll=r})),[`${jl}`]:ev(((e,t)=>{let{payload:r}=t;e.audioSsrc=r})),[`${xl}`]:ev(((e,t)=>{let{payload:r}=t;e.bMutedUponEntry=r})),[`${Bl}`]:ev(((e,t)=>{let{payload:r}=t;e.isUserGrantCaptureAudio=r})),[`${Fl}`]:ev(((e,t)=>{let{payload:r}=t;e.isMicrophoneForbidden=r})),[`${Hl}`]:ev(((e,t)=>{let{payload:r}=t;e.webrtcRestartCount=r})),[`${Wl}`]:ev(((e,t)=>{let{payload:r}=t;e.microphoneDevicesList=r})),[`${$l}`]:ev(((e,t)=>{let{payload:r}=t;e.speakerDevicesList=r})),[`${Gl}`]:ev(((e,t)=>{let{payload:r}=t;e.activeMicrophone=r})),[`${zl}`]:ev(((e,t)=>{let{payload:r}=t;e.activeSpeaker=r})),[`${Kl}`]:ev(((e,t)=>{let{payload:r}=t;e.canPlayAudio=r})),[`${ql}`]:(e,t)=>{let{dialout:r,locallyMutedAudioList:o,localUserAudioVolumeList:n,customizeAudioOption:i,isHIDEnabled:s,isBackgroundNoiseSuppression:a,isStopAllImcomingAudio:u}=e,{payload:d}=t;return d?{...jE,dialout:r,locallyMutedAudioList:o,localUserAudioVolumeList:n,customizeAudioOption:{...jE.customizeAudioOption,speakerOnly:i.speakerOnly},isHIDEnabled:s,isBackgroundNoiseSuppression:a,isStopAllImcomingAudio:u}:{...jE}},[`${Jl}`]:ev(((e,t)=>{let{payload:r}=t;e.isComputerAudioLoading=r})),[`${cp}`]:ev(((e,t)=>{let{payload:r}=t;const{speakerOnly:o,mute:n,backgroundNoiseSuppression:i,syncButtonsOnHeadset:s,mediaFile:a}=r;e.customizeAudioOption.speakerOnly=o,e.customizeAudioOption.mute=n,e.isBackgroundNoiseSuppression=!!i,e.isHIDEnabled=!!s,An(e.mediaPlaybackFile,a)||(e.mediaPlaybackFile=a,e.isUsingMediaPlayback=!(null==a||!a.url)),n&&(e.isActiveOperation=!0)})),[`${Ql}`]:ev(((e,t)=>{let{payload:r}=t;e.isAllowToTalkAttendeeConnected=r})),[`${Zl}`]:ev(((e,t)=>{let{payload:r}=t;e.mutedBeforeSharingAudio=r})),[`${op}`]:ev(((e,t)=>{let{payload:r}=t;e.isSharingAudio=r})),[`${rp}`]:ev(((e,t)=>{let{payload:r}=t;e.isShareAudioMuted=r})),[`${Yl}`]:ev(((e,t)=>{let{payload:r}=t;const{userId:o,isFromMainSession:n}=r;-1===e.localShareAudioUserMutedList.findIndex((e=>e.userId===o))&&e.localShareAudioUserMutedList.push({userId:o,isFromMainSession:n,muted:!1})})),[`${Xl}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.localShareAudioUserMutedList.find((e=>e.userId===r.userId));o&&(o.muted=r.muted)})),[`${ep}`]:ev(((e,t)=>{let{payload:r}=t;e.isJoinComputerAudioBeforeSharingAudio=r})),[`${tp}`]:ev(((e,t)=>{let{payload:r}=t;e.isShareAudioEnabled=r})),[`${np}`]:ev(((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data})),[`${ip}`]:ev(((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})),[`${sp}`]:ev(((e,t)=>{let{payload:r}=t;-1===e.locallyMutedAudioList.findIndex((e=>e===r))&&e.locallyMutedAudioList.push(r)})),[`${ap}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.locallyMutedAudioList.findIndex((e=>e===r));-1!==o&&e.locallyMutedAudioList.splice(o,1)})),[`${up}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.localUserAudioVolumeList.find((e=>e.userId===r.userId));o?o.volume=r.volume:e.localUserAudioVolumeList.push(r)})),[`${dp}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.localUserAudioVolumeList.findIndex((e=>e.userId===r.userId));-1!==o&&e.localUserAudioVolumeList.splice(o,1)})),[`${ql}`]:(e,t)=>{let{dialout:r,locallyMutedAudioList:o,localUserAudioVolumeList:n,customizeAudioOption:i,mediaPlaybackFile:s,isUsingMediaPlayback:a,isVerifiedAudioPermissionOnIOSMobile:u}=e,{payload:d}=t;return d?{...jE,dialout:r,locallyMutedAudioList:o,localUserAudioVolumeList:n,customizeAudioOption:{...jE.customizeAudioOption,speakerOnly:i.speakerOnly},mediaPlaybackFile:s,isUsingMediaPlayback:a,isVerifiedAudioPermissionOnIOSMobile:u}:{...jE}},[`${lp}`]:ev(((e,t)=>{let{payload:r}=t;e.isBackgroundNoiseSuppression=r})),[`${pp}`]:ev(((e,t)=>{let{payload:r}=t;e.isHIDEnabled=r})),[`${hp}`]:ev(((e,t)=>{let{payload:r}=t;e.mediaPlaybackFile=r,e.isUsingMediaPlayback=!(null==r||!r.url)})),[`${fp}`]:ev(((e,t)=>{let{payload:r}=t;e.isStopAllImcomingAudio=r})),[`${mp}`]:ev(((e,t)=>{let{payload:r}=t;e.isVerifiedAudioPermissionOnIOSMobile=r})),[`${gp}`]:ev(((e,t)=>{let{payload:r}=t;e.isAudioBridgeSignalReconnecting=r}))},jE),BE=Ao(kE,ME,VE,UE);var FE="object"==typeof global&&global&&global.Object===Object&&global,HE="object"==typeof self&&self&&self.Object===Object&&self,WE=FE||HE||Function("return this")(),$E=WE.Symbol,GE=Object.prototype,zE=GE.hasOwnProperty,KE=GE.toString,qE=$E?$E.toStringTag:void 0,JE=Object.prototype.toString,QE="[object Null]",ZE="[object Undefined]",YE=$E?$E.toStringTag:void 0;function XE(e){return null==e?void 0===e?ZE:QE:YE&&YE in Object(e)?function(e){var t=zE.call(e,qE),r=e[qE];try{e[qE]=void 0;var o=!0}catch(e){}var n=KE.call(e);return o&&(t?e[qE]=r:delete e[qE]),n}(e):function(e){return JE.call(e)}(e)}function eI(e){return null!=e&&"object"==typeof e}var tI=Array.isArray;function rI(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var oI="[object AsyncFunction]",nI="[object Function]",iI="[object GeneratorFunction]",sI="[object Proxy]";function aI(e){if(!rI(e))return!1;var t=XE(e);return t==nI||t==iI||t==oI||t==sI}var uI,dI=WE["__core-js_shared__"],cI=(uI=/[^.]+$/.exec(dI&&dI.keys&&dI.keys.IE_PROTO||""))?"Symbol(src)_1."+uI:"",lI=Function.prototype.toString;function pI(e){if(null!=e){try{return lI.call(e)}catch(e){}try{return e+""}catch(e){}}return""}var hI=/^\[object .+?Constructor\]$/,fI=Function.prototype,mI=Object.prototype,gI=fI.toString,vI=mI.hasOwnProperty,yI=RegExp("^"+gI.call(vI).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function bI(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return function(e){return!(!rI(e)||(t=e,cI&&cI in t))&&(aI(e)?yI:hI).test(pI(e));var t}(r)?r:void 0}var SI=bI(WE,"WeakMap"),_I=9007199254740991,EI=/^(?:0|[1-9]\d*)$/;function II(e,t){var r=typeof e;return!!(t=null==t?_I:t)&&("number"==r||"symbol"!=r&&EI.test(e))&&e>-1&&e%1==0&&e-1&&e%1==0&&e<=wI}function TI(e){return null!=e&&CI(e.length)&&!aI(e)}var OI=Object.prototype;function RI(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||OI)}function kI(e){return eI(e)&&"[object Arguments]"==XE(e)}var DI=Object.prototype,PI=DI.hasOwnProperty,MI=DI.propertyIsEnumerable,NI=kI(function(){return arguments}())?kI:function(e){return eI(e)&&PI.call(e,"callee")&&!MI.call(e,"callee")},LI="object"==typeof exports&&exports&&!exports.nodeType&&exports,VI=LI&&"object"==typeof module&&module&&!module.nodeType&&module,UI=VI&&VI.exports===LI?WE.Buffer:void 0,jI=(UI?UI.isBuffer:void 0)||function(){return!1},xI={};xI["[object Float32Array]"]=xI["[object Float64Array]"]=xI["[object Int8Array]"]=xI["[object Int16Array]"]=xI["[object Int32Array]"]=xI["[object Uint8Array]"]=xI["[object Uint8ClampedArray]"]=xI["[object Uint16Array]"]=xI["[object Uint32Array]"]=!0,xI["[object Arguments]"]=xI["[object Array]"]=xI["[object ArrayBuffer]"]=xI["[object Boolean]"]=xI["[object DataView]"]=xI["[object Date]"]=xI["[object Error]"]=xI["[object Function]"]=xI["[object Map]"]=xI["[object Number]"]=xI["[object Object]"]=xI["[object RegExp]"]=xI["[object Set]"]=xI["[object String]"]=xI["[object WeakMap]"]=!1;var BI,FI="object"==typeof exports&&exports&&!exports.nodeType&&exports,HI=FI&&"object"==typeof module&&module&&!module.nodeType&&module,WI=HI&&HI.exports===FI&&FE.process,$I=function(){try{return HI&&HI.require&&HI.require("util").types||WI&&WI.binding&&WI.binding("util")}catch(e){}}(),GI=$I&&$I.isTypedArray,zI=GI?(BI=GI,function(e){return BI(e)}):function(e){return eI(e)&&CI(e.length)&&!!xI[XE(e)]},KI=Object.prototype.hasOwnProperty;var qI=function(e,t){return function(r){return e(t(r))}}(Object.keys,Object),JI=Object.prototype.hasOwnProperty;function QI(e){if(!RI(e))return qI(e);var t=[];for(var r in Object(e))JI.call(e,r)&&"constructor"!=r&&t.push(r);return t}function ZI(e){return TI(e)?function(e,t){var r=tI(e),o=!r&&NI(e),n=!r&&!o&&jI(e),i=!r&&!o&&!n&&zI(e),s=r||o||n||i,a=s?function(e,t){for(var r=-1,o=Array(e);++r-1},nA.prototype.set=function(e,t){var r=this.__data__,o=rA(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this};var iA=bI(WE,"Map");function sA(e,t){var r,o,n=e.__data__;return("string"==(o=typeof(r=t))||"number"==o||"symbol"==o||"boolean"==o?"__proto__"!==r:null===r)?n["string"==typeof t?"string":"hash"]:n.map}function aA(e){var t=-1,r=null==e?0:e.length;for(this.clear();++ta))return!1;var d=i.get(e),c=i.get(t);if(d&&c)return d==t&&c==e;var l=-1,p=!0,h=r&PA?new RA:void 0;for(i.set(e,t),i.set(t,e);++l4294966272&e,aw=e=>{let t={R:0,G:0,B:0,A:0};if("string"==typeof e&&e.startsWith("#")){const a=e.slice(1);try{if(3===a.length){const e=Array.from(a).map((e=>e.repeat(2))).map((e=>parseInt(e,16)));t={R:e[0]/255,G:e[1]/255,B:e[2]/255,A:1}}else if(6===a.length||8===a.length){var r,o,n,i,s;const e=null===(r=a.match(/\S{2}/g))||void 0===r?void 0:r.map((e=>parseInt(e,16)));t={R:(null!==(o=null==e?void 0:e[0])&&void 0!==o?o:0)/255,G:(null!==(n=null==e?void 0:e[1])&&void 0!==n?n:0)/255,B:(null!==(i=null==e?void 0:e[2])&&void 0!==i?i:0)/255,A:null!=e&&e[3]?(null!==(s=null==e?void 0:e[3])&&void 0!==s?s:0)/255:1}}}catch(t){console.warn("error color representation:",e)}}else"object"==typeof e&&(t={R:e.R/255,G:e.G/255,B:e.B/255,A:e.A||1});return t};function uw(e){let{captureWidth:t=0,captureHeight:r=0}=e||{};const{hd:o}=e||{};return 0!==t&&0!==r||(o&&Js.isSupportSending720P()?(t=1280,r=720):(t=640,r=360)),{captureWidth:t,captureHeight:r}}function dw(e,t){return"default"===e||t.some((t=>t.deviceId===e))||[ru.Environment,ru.User,ru.Left,ru.Right].includes(e)}function cw(e,t,r){const o=[],{video:{videoSsrc:n,activeCamera:i}}=t,{cameraId:s=i,videoElement:a,originalRatio:u,ptz:d,hd:c,mediaFile:l,fps:p}=r||{};let h;a&&(a.id?h=a.id:(h=Tn("__ZOOM_SDK_SELF_VIDEO_@__"),a.id=h));let f=bu.Default;p&&pbu.Max&&(f=bu.Max,console.warn("the max fps is",bu.Max));const{captureWidth:m,captureHeight:g}=uw(r);let v=Promise.resolve(s);if(l&&l.url){const e=mE.getInstance();v=e.setVideoElement(l).then((()=>e.videoElement))}else mE.getInstance().stopVideoElement();return v.then((t=>{var r,o;e.startCaptureVideo(n,t,m,g,h,ts(),!u&&(ts()||!(null!==(r=navigator.mediaDevices)&&void 0!==r&&null!==(o=r.getSupportedConstraints)&&void 0!==o&&o.call(r).aspectRatio)||qi()||Ji()||cs()),d,f)})),o.push(mh({cameraId:s,captureWidth:m,captureHeight:g,videoDOMId:h,originalRatio:u,ptz:d,hd:c,mediaFile:l,fps:f})),o}function lw(e,t,r){const{max:o,min:n,step:i}=e;let s=r/100*(o-n);i&&(s=Math.min(Math.floor(s/i)*i,Math.floor(s)));let a=t+s;return a=Math.min(o,a),a=Math.max(n,a),a}function pw(e,t){let r="",o=t;switch(e){case pu.Down:o=-t,r="tilt";break;case pu.Up:r="tilt";break;case pu.Left:o=-t,r="pan";break;case pu.Right:r="pan";break;case pu.ZoomIn:r="zoom";break;case pu.ZoomOut:o=-t,r="zoom"}return{key:r,range:o}}function hw(e){const t=["pan","tilt","zoom"].reduce(((t,r)=>e[r]&&0!==e[r].value?{...t,[r]:e[r].value}:t),{});return function(e){if(null==e)return!0;if(TI(e)&&(tI(e)||"string"==typeof e||"function"==typeof e.splice||jI(e)||zI(e)||NI(e)))return!e.length;var t=TA(e);if("[object Map]"==t||"[object Set]"==t)return!e.size;if(RI(e))return!QI(e).length;for(var r in e)if(iw.call(e,r))return!1;return!0}(t)?null:t}function fw(e){return{pan:(e&hu.Pan)===hu.Pan,tilt:(e&hu.Tilt)===hu.Tilt,zoom:(e&hu.Zoom)===hu.Zoom}}function mw(e){const t=es()&&!qi();return"function"!=typeof window.SharedArrayBuffer&&t||!as()&&!e&&!Jm()&&("function"==typeof window.ImageCapture||us())&&os()}const gw=Ws.createAgent(),vw=Js.getInstance();var yw=Object.freeze({__proto__:null,receiveVideoActiveIndication:e=>wo(e,16129).pipe(ye((e=>{const{payload:{body:{id:t,bVideoOn:r}}}=e,o=sw(t);return Lc(Su,{bVideoOn:r,userId:o}),Hp({bVideoOn:r,userId:o})}))),receiveVideoDecodeMaxSizeEpic:(e,t)=>Ro(e,Ua.VideoDecodeMaxSize).pipe(Ke((e=>{var t;return null==e||null===(t=e.payload)||void 0===t?void 0:t.data})),ye((e=>{const{size:r}=e.payload.data,{video:{renderedVideoList:o,receivedVideoMaxQuality:n}}=t.value,i=o.filter((e=>e.videoQuality>=qa.Video_720P));return n!==r&&i.length>0&&(r!==qa.Video_720P&&n!==qa.Video_720P||i.forEach((e=>{gw.subscribeVideo(e.userId,e.videoQuality,!1)}))),qp(r)}))),spotlightVideoResponseEpic:e=>wo(e,16135).pipe(ye((e=>{const{payload:{body:{bLeadershipOn:t,id:r}}}=e,o=[];return t&&o.push(sw(r)),Lc(Mu,{spotlightList:o}),zp(o)}))),handleGroupLayoutIndicationEpic:(e,t)=>wo(e,7958).pipe(Zt(t),ye((e=>{let[t,r]=e;const{payload:{body:o}}=t;let n=[];o&&o.group_list&&o.group_list[0]&&(n=o.group_list[0].map((e=>e.id)));const i=Al(r);return n=n.filter((e=>i.findIndex((t=>t.userId===e))>=0)),Lc(Mu,{spotlightList:n}),zp(n)}))),handleCurrentVideoResolution:e=>Ro(e,Ua.CurrentVideoResolution).pipe(Rm((e=>(Lc(Iu,e.payload.data),Xp(e.payload.data))))),handleVideoWidthHeightEpic:e=>Ro(e,[Ua.CurrentVideoResolution,Ua.CurrentCaptureVideoWidthHeight]).pipe(Ke((e=>!!e.payload.data)),ye((e=>{const{payload:{data:t,type:r}}=e;return r===Ua.CurrentVideoResolution?(Lc(Iu,t),Xp(t)):(Lc(Au,t),Rh(t))}))),handleMeetingVideoAttributeEpic:e=>wo(e,As).pipe(Ke((e=>{const{payload:{body:t}}=e;return["bFollowHostVideo","VideoHd","bCanUnmuteVideo"].some((e=>void 0!==t[e]))})),ye((e=>{const{payload:{body:{bFollowHostVideo:t,VideoHd:r,bCanUnmuteVideo:o}}}=e;if(void 0!==t)return Lc(Nu,{bOn:t}),rh(t);if(void 0!==o)return uh(o);{const e=1===r;return vw.updateVideoHDValue(e),vw.enableHardwareAccelerationForVideoEncode(!1),sh(e)}}))),handleHostDragLayoutIndicationEpic:(e,t)=>wo(e,7957).pipe(Zt(t),ye((e=>{let[t,r]=e;const{video:{isFollowHostVideoLayout:o}}=r,{payload:{body:n}}=t,i=n&&n.drag_list&&n.drag_list.map((e=>e.id));return o&&Lc(Lu,{layout:i}),oh(i)}))),handlePeerVideoStateChangeEpic:(e,t)=>wo(e,Is).pipe(Zt(t),Ke((e=>{let[t,r]=e;const{meeting:{userId:o},video:{subscribedVideoList:n}}=r,i=t.payload.body.update,s=t.payload.body.remove;return i&&i.length>0&&i.findIndex((e=>e.id!==o&&(void 0!==e.bVideoOn||e.bHold)))>-1||s&&s.some((e=>n.includes(e.id)))})),Gt((e=>{let[t,r]=e;const{payload:{body:{remove:o,update:n}}}=t,{video:{subscribedVideoList:i}}=r,s=Il(r);if(o&&o.length>0&&o.filter((e=>i.includes(e.id))).forEach((e=>{Lc(Uu,{userId:e.id})})),n&&n.length>0){const e=n.filter((e=>void 0!==e.bVideoOn)).filter((e=>-1===s.findIndex((t=>t.userId===e.id)))),t=n.filter((e=>!0===e.bHold));t.length>0&&t.filter((e=>i.includes(e.id))).forEach((e=>{Lc(Uu,{userId:e.id})})),e.forEach((e=>{e.bVideoOn?Lc(Vu,{userId:e.id}):Lc(Uu,{userId:e.id})}))}})),kt(W)),handleVideoQosDataEpic:(e,t)=>Ro(e,Ua.VideoQosData).pipe(Zt(t),ye((e=>{var t;let[r,o]=e;const{video:{isCaptureForbidden:n,isCameraTaken:i},media:{videoEncodeStatus:s,videoDecodeStatus:a}}=o,u=bl(o),d=Ol(o),c=d.length>0,l=(null==u?void 0:u.bVideoOn)&&!n&&!i,p=d.some((e=>e.bVideoOn)),h="success"===s&&l&&c,f="success"===a&&c&&p;return null!==(t=r.payload.data)&&void 0!==t&&t.encoding?h?(Lc(Bu,r.payload),ph(r.payload)):ph(cu):f?(Lc(Bu,r.payload),hh(r.payload)):hh(cu)}))),handleVideoCellChangeEpic:e=>Ro(e,[66.5,66.6]).pipe(Gt((e=>{const{payload:{type:t,data:r}}=e;if(66.5===t){const{ssrc:e,width:t,height:o,quality:n}=r;Lc(Fu,{userId:e,width:t,height:o,quality:n})}else if(66.6===t){const{ssrc:e,fps:t}=r;Lc(Fu,{userId:e,fps:t})}})),kt(W)),handleMaximumNumberOfHDSubscriptionsEpic:e=>e.pipe(tr(`${co}`),Pe((async()=>ts()?1:await Js.isSupportVideoDecodeHardwareAcceleration()?4:1)),ye((e=>ah(e)))),handleNetworkQualityChangeEpic:(e,t)=>Ro(e,Ua.NetworkQualityChange).pipe(Ke((e=>!!e.payload.data)),Pe((e=>{var r;const{payload:{data:{bwLevel:o,isUplink:n,networkLevel:i}}}=e,s=[],{meeting:{userId:a},video:{networkQuality:u,subscribedVideoList:d,networkQualityBroadcastTime:c}}=t.value,l=n?"uplink":"downlink";s.push(gh({userId:a,level:i,bwLevel:o,type:l}));const p=An(null===(r=u[`${a}`])||void 0===r?void 0:r[l],{level:i,bwLevel:o});if(!p&&-1!==i){(!n&&d.filter((e=>e!==a)).length>0||n)&&Lc(Hu,{userId:a,type:l,level:i})}if(n){const e=performance.now();(!p||e-(null!=c?c:0)>3e4)&&(gw.broadcastUserNetworkQuality({isUplink:n,level:i,bwLevel:o}),s.push(wh(e)))}return Oe(s)}))),handleOthersNetworkQualityChangeEpic:(e,t)=>Oo(e,8005).pipe(Ke((e=>{var t;return!(null===(t=e.payload.body)||void 0===t||!t.nUserID)})),Pe((e=>{const{payload:{body:{nLevel:r,nUserID:o}}}=e,{video:{networkQuality:n}}=t.value,i=n[`${o}`],s=[];return i&&i.uplink.level===r||(Lc(Hu,{userId:o,level:r,type:"uplink"}),s.push(gh({userId:o,level:r,type:"uplink"}))),Oe(s)}))),handlePrefetchVideoRemovedEpic:(e,t)=>wo(e,Is).pipe(Ke((e=>{const{payload:{body:r}}=e,{video:{prefetchedVideo:o}}=t.value;return(null==o?void 0:o.userId)&&(r.update||r.remove)})),Pe((e=>{const{payload:{body:r}}=e,o=[],{video:{prefetchedVideo:n}}=t.value;let i=!1;return r.remove&&(i=-1!==r.remove.findIndex((e=>e.id===(null==n?void 0:n.userId)))),r.update&&(i=-1!==r.update.findIndex((e=>e.id===(null==n?void 0:n.userId)&&!1===e.bVideoOn))),i&&n&&(n.loaded||vw.cancelPrefetchVideoSsrc(n.userId),gw.unsubscribeVideo(n.userId),o.push(Ph(void 0))),Oe(o)}))),handlePrefetchVideoEpic:(e,t)=>e.pipe(tr(`${Ph}`),Ke((e=>!!e.payload)),Gt((e=>{const{payload:{lastCopy:r}}=e,{video:{prefetchedVideo:o}}=t.value;!o||r&&r.userId===o.userId||(null!=r&&r.userId&&(r.loaded&&vw.cancelPrefetchVideoSsrc(r.userId),gw.unsubscribeVideo(r.userId)),gw.subscribeVideo(o.userId,qa.Video_360P,!1),vw.prefetchVideoSsrc(o.userId))})),kt(W)),handleActiveVideoFrameCallbackEpic:(e,t)=>Ro(e,Ua.NewActiveSpeakerFirstFrameCallback).pipe(Ke((()=>!!t.value.video.prefetchedVideo)),Pe((e=>{const{payload:{data:{ssrc:r}}}=e,{video:{prefetchedVideo:o}}=t.value,n=[];return o&&(wn(o.userId,r)?(n.push(Ph({userId:o.userId,loaded:!0,lastCopy:o})),Lc(Ju,{userId:o.userId})):gw.unsubscribeVideo(o.userId)),Oe(n)})))});let bw,Sw;async function _w(e,t,r){const o=Tn(e),n=document.createElement("img");return n.src=t,n.id=o,n.style.display="none",On(t)&&n.setAttribute("crossorigin",""),await new Promise(((e,o)=>{n.onload=()=>{r&&URL.revokeObjectURL(t),e("")},n.onerror=()=>{r&&URL.revokeObjectURL(t),o("Cannot load image.")}})),{imageId:o,imgElement:n}}async function Ew(e,t,r){if(e===tu)return tu;{let o=e;if(t){const t=await function(e){return new Promise(((t,r)=>{try{bw&&Sw||(bw=document.createElement("canvas"),Sw=bw.getContext("2d"));const o=bw,n=Sw;if(n){n.clearRect(0,0,bw.width,bw.height);const i=new Image;i.src=e,On(e)&&(i.crossOrigin="");const s=16/9,a=1280,u=Math.floor(a/s);o.width=a,o.height=u,i.onload=()=>{const{width:e,height:d}=i,c=d*s;if(c>e){const t=e,r=Math.floor(e/s),o=0,c=(d-r)/2;null==n||n.drawImage(i,o,c,t,r,0,0,a,u)}else{const t=c,r=d,o=(e-t)/2,s=0;n.drawImage(i,o,s,t,r,0,0,a,u)}try{o.toBlob((e=>{t(e)}))}catch(e){e instanceof DOMException&&e.code===DOMException.SECURITY_ERR&&console.error("Image is not from the same origin, add CORS header to solve this issue"),r(e)}},i.onerror=e=>{r("Cannot load image.")}}}catch(e){r(e)}}))}(e);o=URL.createObjectURL(t)}if(o){const{imageId:e,imgElement:n}=await _w(au,o,!!t);return(null!=r?r:document.body).appendChild(n),e}}return null}async function Iw(e,t,r){var o;const n=null!==(o=r&&r.parentNode)&&void 0!==o?o:document.body,{imageUrl:i,cropped:s,rootWidth:a,rootHeight:u}=e;let d=e;!t.video.customizedVideoOption||e.captureWidth&&e.captureHeight||(d=t.video.customizedVideoOption);const{captureWidth:c,captureHeight:l}=uw(d),p=document.createElement("div");let h;p.style.display="none",h=i?await Ew(i,s,p):null;let f=Tn(su);if(r){const t=qm(r);t.id?f=t.id:t.id=f;try{a&&r.width!==a&&(r.width=a),u&&r.height!==u&&(r.height=u)}catch(e){console.warn("Cannot set the canvas width/height, and pay attention the canvas dimension is different from the setting")}}else{const e=document.createElement("canvas");e.width=null!=a?a:380,e.height=null!=u?u:214,e.id=f,p.appendChild(e)}return null==n||n.appendChild(p),{captureWidth:c,captureHeight:l,imageId:h,canvasId:f,divElement:p}}async function Aw(e,t,r,o){const n=Array.isArray(e)?e:e&&[e];if((null==n?void 0:n.length)>0){bw&&Sw||(bw=document.createElement("canvas"),Sw=bw.getContext("2d"));const i=bw,s=Sw;if(i.width=t,i.height=r,s)try{s.fillStyle="#fff",s.clearRect(0,0,t,r);for(let e=0;e{a.onload=()=>{e("")},a.onerror=()=>{t()}}));const{width:u,height:d}=a;s.drawImage(a,0,0,u,d,o,i,r,n)}}const e=await new Promise((e=>{null==i||i.toBlob((t=>{e(t)}))}));if(e){const t=URL.createObjectURL(e),{imageId:r,imgElement:n}=await _w(uu,t,!0);return(null!=o?o:document.body).appendChild(n),r}}catch(e){e instanceof DOMException&&e.code===DOMException.SECURITY_ERR&&console.error("Image is not from the same origin, add CORS header to solve this issue")}}return null}function ww(e,t){if(e===t)return!0;if(null==e&&null==t)return!0;const r=Array.isArray(e)?[...e]:[e],o=Array.isArray(t)?[...t]:[t];if(r.length!==o.length)return!1;const n=(e,t)=>e.typee)))}(i).toPromise().then((i=>i?o||!s&&e.imageUrl!==tu&&e.imageUrl?async function(e,t,r,o){const{canvasId:n,imageId:i,captureHeight:s,captureWidth:a,divElement:u}=await Iw(e,r,o),{cameraId:d}=e,{video:{videoSsrc:c,activeCamera:l}}=r;return t.startVirtualBackgroundSetting(n,i,c,null!=d?d:l,a,s),u}(e,t,r,o).then((e=>n?ch(!0):jc(xu,1).toPromise().then((r=>{var n;return o||t.stopVirtualBackgroundSetting(),r?(null==e||null===(n=e.parentNode)||void 0===n||n.removeChild(e),!0):Promise.reject("Cannot access the virtual background image.")})))):a===e.imageUrl&&u===vu.VirtualBackground&&!d||async function(e,t,r){const{imageUrl:o,cropped:n}=e;if(o){const e=await Ew(o,n);e&&(r.video.backgroundMode===vu.Mask&&(t.stopMaskSetting(!0),await Cn((()=>{t.stopVirtualBackgroundSetting()}),0)),t.updateVirtualBackgroundImage(e),e!==tu&&setTimeout((()=>{xm(e)}),0))}else t.updateVirtualBackgroundImage(null)}(e,t,r):Promise.reject("Cannot load virtual background model.")))}function Tw(e,t,r,o){const{video:{mask:{isMaskConfigured:n,imageSrc:i,clip:s},backgroundMode:a,isCurrentUserStartedVideo:u},meeting:{isCurrentUserStartVideoBeforeReset:d}}=r;return o||!n&&e.imageUrl?async function(e,t,r,o){const{canvasId:n,imageId:i,captureHeight:s,captureWidth:a,divElement:u}=await Iw(e,r,o),{cameraId:d,clip:c,rootWidth:l=1280,rootHeight:p=720}=e,h=c?await Aw(c,l,p,u):null,{video:{videoSsrc:f,activeCamera:m}}=r;return i&&h?(t.startMaskSetting(n,i,h,f,null!=d?d:m,l,p,a,s),u):Promise.reject("image or clip is empty")}(e,t,r,o).then((e=>u?Ch(!0):jc(Ku,1).toPromise().then((r=>{var n;return o||t.stopMaskSetting(),r?(null==e||null===(n=e.parentNode)||void 0===n||n.removeChild(e),!0):Promise.reject("Cannot set video mask")})))):a===vu.Mask&&e.imageUrl===i&&ww(e.clip,s)&&!d?Promise.resolve(!0):async function(e,t,r){const{imageUrl:o,cropped:n,clip:i,rootWidth:s,rootHeight:a}=e,{video:{mask:{imageSrc:u,cropped:d,clip:c},backgroundMode:l}}=r;if(o){if(l===vu.VirtualBackground&&(t.stopVirtualBackgroundSetting(!0),await Cn((()=>{t.stopMaskSetting()}),0)),o!==u||n!==d){const e=await Ew(o,n);e&&(t.updateMaskBackgroundImage(e),setTimeout((()=>{xm(e)}),0))}if(!ww(i,c)&&i&&s&&a){const e=await Aw(i,s,a);e&&(t.updateMaskClip(e,s,a),setTimeout((()=>{xm(e)}),0))}}else t.updateMaskBackgroundImage(null),t.updateMaskClip(null,s,a)}(e,t,r)}const Ow=Ws.createAgent(),Rw=Js.getInstance();var kw=Object.freeze({__proto__:null,handleStartCaptureVideoSuccessEpic:(e,t)=>Ro(e,Ua.StartVideoCaptureSuccess).pipe(Pe((e=>{const{video:{cameraDevicesList:r,activeCamera:o,ptz:n,isCurrentUserStartedVideo:i,isUsingMediaPlayback:s},meeting:{userId:a}}=t.value,{payload:{data:{currentDeviceID:u,PTZRange:d}}}=e,c=[];if(r.length<1&&!s&&(Lc(wu,{reason:"Cannot detect camera devices"}),Rw.stopCaptureVideo()),dw(o,r)||s){if(i||Ow.muteAttendeeVideo(a,!1),Lc(qu),s)c.push($p("default"));else if(u&&d&&c.push(vh({deviceId:u,ptzRange:d})),o!==u&&c.push($p(u)),Object.prototype.hasOwnProperty.call(n,u)){const e=n[u];if(e){const t=hw(e);t&&Rw.movePTZCamera(t)}}}else Lc(Cu,{reason:"cannot find target camera"}),Rw.stopCaptureVideo();return Oe(c)}))),handleVideoCaptureResponseEpic:(e,t)=>wo(e,Is).pipe(Ke((e=>{const{payload:{body:{update:r}}}=e,{meeting:{userId:o}}=t.value;return null==r?void 0:r.some((e=>e.id===o&&void 0!==e.bVideoOn))})),ye((e=>{const{payload:{body:{update:r}}}=e,{meeting:{userId:o}}=t.value,n=r.find((e=>e.id===o));return!0===n.bVideoOn?Lc(Du):Lc(Pu),Gp(!!n.bVideoOn)}))),handleCaptureVideoErrorEpic:e=>Ro(e,[Ua.UserForbiddedCaptureVideo,Ua.UserCameraIsTakenByOtherPrograms,Ua.VideoWebsocketBroken,Ua.StopVideoCaptureFailed]).pipe(Pe((e=>{const{payload:{type:t}}=e,r=[];switch(t){case Ua.UserForbiddedCaptureVideo:Lc(Tu),r.push(Kp(!0));break;case Ua.UserCameraIsTakenByOtherPrograms:Lc(Ou,{reason:"User camera is taken by other programs."}),r.push(Zp(!0));break;case Ua.VideoWebsocketBroken:Lc(ku,{reason:"Video websocket broken."});break;case Ua.StopVideoCaptureFailed:Lc(Pu,{failed:!0,reason:"Unknown."})}return Oe(r)}))),handleStopVideoCaptureSuccessEpic:(e,t)=>Ro(e,Ua.StopVideoCaptureSuccess).pipe(Zt(t),Rm((e=>{let[,t]=e;const{meeting:{userId:r},video:{isCurrentUserStartedVideo:o}}=t;o||Lc(Pu),Ow.muteAttendeeVideo(r,!0)}))),receiveVideoMuteIndication:(e,t)=>wo(e,16133).pipe(Zt(t),Ke((e=>{var t,r;let[o,n]=e;return(null==o||null===(t=o.payload)||void 0===t||null===(r=t.body)||void 0===r?void 0:r.id)===n.meeting.userId})),Rm((e=>{let[t]=e;const{id:r,bVideoMute:o}=t.payload.body;return Lc(_u,{id:r,isVideoMuted:o}),!0===o&&Rw.stopCaptureVideo(),!1===o&&Lc(Eu,{id:r,isVideoMuted:o}),Jp(o)}))),receiveVideoSsrcIndication:(e,t)=>wo(e,16131).pipe(Ke((e=>void 0!==e.payload.body.ssrc)),Ut((e=>{const{payload:{body:{ssrc:r}}}=e;return Ge(Q(Fp(r)),zm(t).pipe(Pe((e=>{const{meeting:{isCurrentUserStartVideoBeforeReset:r},media:{videoEncodeStatus:o}}=t.value;return!0!==(null==e?void 0:e.bVideoOn)&&!0===r?Gm("video",o,"success").pipe(Ke((e=>{let[t,r]=e;return t&&r})),ye((()=>{const e=t.value,{video:{backgroundMode:r,mask:o,virtualBackground:n,activeCamera:i,customizedVideoOption:s}}=e;let a=Promise.resolve(!0);return r===vu.VirtualBackground&&n.imageSrc?a=Cw({imageUrl:n.imageSrc,cropped:n.cropped},Rw,e):r===vu.Mask&&o.imageSrc&&o.clip&&(a=Tw({imageUrl:o.imageSrc,cropped:o.cropped,clip:o.clip,rootHeight:o.rootHeight,rootWidth:o.rootWidth},Rw,e)),a.then((()=>{cw(Js.getInstance(),e,{cameraId:i,...s})})),bi(void 0)}))):W}))))}))),handleCameraConnectedIndicationEpic:(e,t)=>e.pipe(tr(`${Wp}`),Gt((e=>{const{payload:r}=e,o=t.value,{meeting:{userId:n}}=o,i=bl(o);0===r.length?i&&!i.bVideoConnect||Ow.connectCamera(n,!1):null!=i&&i.bVideoConnect||Ow.connectCamera(n,!0)})),kt(W))}),Dw=Object.freeze({__proto__:null,handleVBPreloadEpic:e=>Ro(e,[Ua.VbModelPreloadingOk,Ua.VbModelPreloading_3S,Ua.VbModelPreloading_10S,Ua.VbSettingParaError]).pipe(Pe((e=>{const{payload:{type:t,data:r}}=e,o=[];return[Ua.VbModelPreloadingOk,Ua.VbModelPreloading_3S,Ua.VbModelPreloading_10S].includes(t)?(o.push(dh(!0)),Lc(ju,!0),t===Ua.VbModelPreloading_10S&&console.warn("Virtual Background is taking longer than expected to load.")):t===Ua.VbSettingParaError&&(r===eu.VBModelNotMatch?(Lc(ju,!1),o.push(dh(!1))):(Lc(xu,!1),o.push(ch(!1)))),Oe(o)}))),handleVBSettingSuccessEpic:e=>Ro(e,Ua.StartVideoStreamInVbSettingSuccess).pipe(ye((()=>(Lc(xu,!0),ch(!0))))),handleMaskSettingSuccessEpic:e=>Ro(e,Ua.StartVideoStreamInMaskSettingSuccess).pipe(ye((()=>(Lc(Ku,!0),Ch(!0))))),handleMaskSettingFailedEpic:e=>Ro(e,Ua.MaskSettingParaError).pipe(ye((()=>(Lc(Ku,!1),Ch(!1)))))});const Pw=Ws.createAgent(),Mw=Js.getInstance();var Nw=Object.freeze({__proto__:null,handleRemoteCameraControlEpic:(e,t)=>wo(e,8004).pipe(Pe((e=>{const{payload:{body:{nCmd:r,nUserID:o,nReason:n,nButtonID:i}}}=e,s=t.value,a=Al(s),{video:{currentCameraControlStatus:{isInControl:u,controllingUserId:d},cameraDevicesList:c,activeCamera:l}}=s,p=a.find((e=>wn(e.userId,o))),h=[];if(h.push(yh(!0)),r===lu.Request){const e={userId:null==p?void 0:p.userId,displayName:null==p?void 0:p.displayName};if(u){const t=a.find((e=>e.userId===d));Object.assign(e,{currentControllingUserId:null==t?void 0:t.userId,currentControllingDisplayName:null==t?void 0:t.displayName})}Lc(Wu,e)}else if(r===lu.Approve)h.push(Sh(null==p?void 0:p.userId)),Lc($u,{isApproved:!0,userId:null==p?void 0:p.userId,displayName:null==p?void 0:p.displayName});else if(r===lu.Decline)h.push(_h(null==p?void 0:p.userId)),Lc($u,{isApproved:!1,userId:null==p?void 0:p.userId,displayName:null==p?void 0:p.displayName,reason:n});else if(r===lu.GiveUp)h.push(bh({isInControl:!1,userId:0})),Lc(Gu,{isControlled:!1});else if(r===lu.StartControl||r===lu.StopControl)h.push(Eh({cmd:r===lu.StartControl?"start":"stop",type:i}));else if(r===lu.SwitchCamera){const e=c.findIndex((e=>e.deviceId===l)),t=e+1===c.length?0:e+1;if(t!==e){const e=c[t].deviceId;Mw.changeCamera(e)}}return Oe(h)}))),handleFarEndCameraCapabilityEpic:(e,t)=>wo(e,Is).pipe(Ke((e=>{var t;const{payload:{body:r}}=e;return null==r||null===(t=r.update)||void 0===t?void 0:t.some((e=>void 0!==e.nFECC||void 0!==e.nFECCExecutive))})),Gt((e=>{const{payload:{body:{update:r}}}=e,o=r.find((e=>void 0!==e.nFECC||void 0!==e.nFECCExecutive));if(o){const{meeting:{userId:e}}=t.value;wn(o.nFECCExecutive,e)&&Lc(zu,{userId:o.id,ptz:fw(o.nFECC)})}})),kt(W)),handleFarEndCameraUserLeftEpic:(e,t)=>wo(e,Is).pipe(Ke((e=>{var r;const{payload:{body:o}}=e,{video:{farEndCameraControlStatus:{controlledUserList:n}}}=t.value;return null==o||null===(r=o.remove)||void 0===r?void 0:r.some((e=>n.includes(e.id)))})),Pe((e=>{var r;const{payload:{body:o}}=e,n=[],{video:{farEndCameraControlStatus:{controlledUserList:i}}}=t.value,s=null==o||null===(r=o.remove)||void 0===r?void 0:r.find((e=>i.includes(e.id)));return s&&n.push(_h(s.id)),Oe(n)}))),handleFarEndCameraActionEpic:(e,t)=>e.pipe(tr(`${Eh}`),Ut((e=>{const{payload:{cmd:r,type:o}}=e;return"start"===r?Xe(0,200).pipe(Ht((()=>!!t.value.video.currentCameraControlStatus.isCameraMoving)),Pe((()=>{const{video:{ptz:e,activeCamera:r}}=t.value,n=e[r],i=hw(n)||{},{key:s,range:a}=pw(o,2);return n[s]?(Object.assign(i,{[s]:lw(n[s].capability,n[s].value,a)}),Mw.movePTZCamera(i).then((()=>Ih({deviceId:r,constraints:i})))):Promise.resolve(void 0)})),Pe((e=>"object"==typeof e&&void 0!==e.type?Q(e):W))):W}))),handleSendCapabilityWhenActiveCameraChangeEpic:(e,t)=>e.pipe(tr(`${$p}`),Pe((e=>{const{payload:r}=e,{video:{customizedVideoOption:o,ptz:n}}=t.value;if(null!=o&&o.ptz){const e=null==n?void 0:n[r];void 0!==e&&Pw.sendCameraAblity({pan:!!e.pan,tilt:!!e.tilt,zoom:!!e.zoom})}return W})))});const Lw={videoSsrc:0,cameraDevicesList:[],activeCamera:ts()?ru.User:"default",activeVideoId:0,isCurrentUserStartedVideo:!1,spotlightUserList:[],isCaptureForbidden:!1,receivedVideoMaxQuality:navigator.hardwareConcurrency>=8?qa.Video_720P:qa.Video_360P,subscribedVideoList:[],renderedVideoList:[],ensuredCanvas:[],isVideoMuted:!1,isCaptureCameraLoading:!1,isCameraTaken:!1,isUsingMediaPlayback:!1,receivedVideoDimension:{width:0,height:0},capturedVideoDimension:{width:0,height:0},isFollowHostVideoLayout:!1,hostDragLayout:[],isSupportHDVideo:!1,bCanUnmuteVideo:!1,virtualBackground:{isVBConfigured:!1,isVBPreloadReady:void 0,imageSrc:void 0,cropped:void 0},mask:{imageSrc:void 0,cropped:void 0,clip:void 0},backgroundMode:vu.Null,statistic:{encode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0},decode:{sample_rate:0,rtt:0,jitter:0,avg_loss:0,max_loss:0,width:0,height:0,fps:0}},hardwareAcceleration:{encode:!1,decode:!1},networkQuality:{},ptz:{},currentCameraControlStatus:{isRequested:!1,isInControl:!1,isCameraMoving:!1},farEndCameraControlStatus:{controlledUserList:[],isControlling:!1}},Vw=zr({[`${Fp}`]:ev(((e,t)=>{let{payload:r}=t;e.videoSsrc=r})),[`${Wp}`]:ev(((e,t)=>{let{payload:r}=t;e.cameraDevicesList=r})),[`${$p}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.activeCamera;if(o in e.ptz){const t=e.ptz[o];["pan","tilt","zoom"].forEach((e=>{t[e]&&(t[e].value=0)}))}e.activeCamera=r})),[`${Hp}`]:ev(((e,t)=>{let{payload:r}=t;e.activeVideoId=r.userId})),[`${Gp}`]:ev(((e,t)=>{let{payload:r}=t;e.isCurrentUserStartedVideo=r})),[`${zp}`]:ev(((e,t)=>{let{payload:r}=t;e.spotlightUserList=r})),[`${Kp}`]:ev(((e,t)=>{let{payload:r}=t;e.isCaptureForbidden=r})),[`${qp}`]:ev(((e,t)=>{let{payload:r}=t;e.receivedVideoMaxQuality=r})),[`${Jp}`]:ev(((e,t)=>{let{payload:r}=t;e.isVideoMuted=r})),[`${Qp}`]:ev(((e,t)=>{let{payload:r}=t;e.isCaptureCameraLoading=r})),[`${Zp}`]:ev(((e,t)=>{let{payload:r}=t;e.isCameraTaken=r})),[`${Xp}`]:ev(((e,t)=>{let{payload:r}=t;e.receivedVideoDimension=r})),[`${eh}`]:ev(((e,t)=>{let{payload:r}=t;e.subscribedVideoList.includes(r)||e.subscribedVideoList.push(r)})),[`${th}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.subscribedVideoList.indexOf(r);o>=0&&e.subscribedVideoList.splice(o,1)})),[`${nh}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.renderedVideoList.find((e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId));o?o.videoQuality=r.videoQuality:e.renderedVideoList.push({...r})})),[`${ih}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.renderedVideoList.findIndex((e=>e.userId===r.userId&&e.key===r.key&&e.canvasId===r.canvasId));o>=0&&e.renderedVideoList.splice(o,1)})),[`${rh}`]:ev(((e,t)=>{let{payload:r}=t;e.isFollowHostVideoLayout=r})),[`${oh}`]:ev(((e,t)=>{let{payload:r}=t;e.hostDragLayout=r})),[`${sh}`]:ev(((e,t)=>{let{payload:r}=t;e.isSupportHDVideo=r})),[`${ah}`]:ev(((e,t)=>{let{payload:r}=t;e.maximumNumbeOfHDSubscriptions=r})),[`${uh}`]:ev(((e,t)=>{let{payload:r}=t;e.bCanUnmuteVideo=r})),[`${dh}`]:ev(((e,t)=>{let{payload:r}=t;e.virtualBackground.isVBPreloadReady=r})),[`${ch}`]:ev(((e,t)=>{let{payload:r}=t;e.virtualBackground.isVBConfigured=r})),[`${lh}`]:ev(((e,t)=>{let{payload:r}=t;e.virtualBackground.imageSrc=r.imageUrl,e.virtualBackground.cropped=r.cropped,e.backgroundMode=vu.VirtualBackground})),[`${fh}`]:ev(((e,t)=>{let{payload:r}=t;const{encode:o,decode:n}=r;void 0!==o&&(e.hardwareAcceleration.encode=o),void 0!==n&&(e.hardwareAcceleration.decode=n)})),[`${ph}`]:ev(((e,t)=>{let{payload:r}=t;e.statistic.encode=r.data})),[`${hh}`]:ev(((e,t)=>{let{payload:r}=t;e.statistic.decode=r.data})),[`${mh}`]:ev(((e,t)=>{let{payload:r}=t;const{cameraId:o,captureWidth:n,captureHeight:i,videoDOMId:s,originalRatio:a,ptz:u,hd:d,mediaFile:c,fps:l}=r;e.activeCamera=o,e.customizedVideoOption={captureWidth:n,captureHeight:i,videoDOMId:s,originalRatio:a,ptz:u,hd:d,fps:l},An(e.mediaPlaybackFile,c)||(e.mediaPlaybackFile=c,e.isUsingMediaPlayback=!(null==c||!c.url))})),[`${gh}`]:ev(((e,t)=>{let{payload:r}=t;const{userId:o,level:n,bwLevel:i,type:s}=r;if(Object.prototype.hasOwnProperty.call(e.networkQuality,`${o}`))e.networkQuality[`${o}`][`${s}`]={level:n,bwLevel:i};else{const t={[s]:{level:n,bwLevel:i}};Object.assign(e.networkQuality,{[`${o}`]:t})}})),[`${vh}`]:ev(((e,t)=>{let{payload:r}=t;const{deviceId:o,ptzRange:n}=r;if(Object.prototype.hasOwnProperty.call(e.ptz,o)){const t=e.ptz[o];t&&["pan","tilt","zoom"].forEach((e=>{const r=n[e];if(r){var o;const n=null===(o=t[e])||void 0===o?void 0:o.capability;n?Object.assign(n,{...r}):t[e]={capability:{...r},value:0}}}))}else Object.assign(e.ptz,{[o]:{pan:n.pan?{capability:{...n.pan},value:0}:null,tilt:n.tilt?{capability:{...n.tilt},value:0}:null,zoom:n.zoom?{capability:{...n.zoom},value:0}:null}})})),[`${yh}`]:ev(((e,t)=>{let{payload:r}=t;e.currentCameraControlStatus.isRequested=r})),[`${bh}`]:ev(((e,t)=>{let{payload:r}=t;const{isInControl:o,userId:n}=r;e.currentCameraControlStatus.isInControl=o,e.currentCameraControlStatus.controllingUserId=n})),[`${Sh}`]:ev(((e,t)=>{let{payload:r}=t;e.farEndCameraControlStatus.controlledUserList.includes(r)||e.farEndCameraControlStatus.controlledUserList.push(r)})),[`${_h}`]:ev(((e,t)=>{let{payload:r}=t;const o=e.farEndCameraControlStatus.controlledUserList.indexOf(r);-1!==o&&e.farEndCameraControlStatus.controlledUserList.splice(o,1)})),[`${Eh}`]:ev(((e,t)=>{let{payload:r}=t;e.currentCameraControlStatus.isCameraMoving="start"===r.cmd})),[`${Ih}`]:ev(((e,t)=>{let{payload:r}=t;const{constraints:o,deviceId:n}=r,i=e.ptz[n];["pan","tilt","zoom"].forEach((e=>{void 0!==o[e]&&(i[e].value=o[e])}))})),[`${Ah}`]:ev(((e,t)=>{let{payload:r}=t;e.farEndCameraControlStatus.isControlling=r})),[`${wh}`]:ev(((e,t)=>{let{payload:r}=t;e.networkQualityBroadcastTime=r})),[`${Ch}`]:ev(((e,t)=>{let{payload:r}=t;e.mask.isMaskConfigured=r})),[`${Oh}`]:ev(((e,t)=>{let{payload:r}=t;const{imageUrl:o,cropped:n,rootHeight:i,rootWidth:s,clip:a}=r;e.mask.imageSrc=o,e.mask.cropped=n,e.mask.clip=a,e.mask.rootWidth=s,e.mask.rootHeight=i,e.backgroundMode=vu.Mask})),[`${Th}`]:ev(((e,t)=>{let{payload:r}=t;e.backgroundMode=r})),[`${Rh}`]:ev(((e,t)=>{let{payload:r}=t;e.capturedVideoDimension=r})),[`${kh}`]:ev(((e,t)=>{let{payload:r}=t;e.ensuredCanvas.includes(r)||e.ensuredCanvas.push(r)})),[`${Dh}`]:ev(((e,t)=>{let{payload:r}=t;e.mediaPlaybackFile=r,e.isUsingMediaPlayback=!(null==r||!r.url)})),[`${Ph}`]:ev(((e,t)=>{let{payload:r}=t;if(r){const{lastCopy:t,...o}=r;e.prefetchedVideo=o}else e.prefetchedVideo=r})),[`${Yp}`]:(e,t)=>{let{payload:r}=t;const o={cameraDevicesList:e.cameraDevicesList};return r&&Object.assign(o,{activeCamera:e.activeCamera,customizedVideoOption:e.customizedVideoOption,virtualBackground:{imageSrc:e.virtualBackground.imageSrc,cropped:e.virtualBackground.cropped},mask:{imageSrc:e.mask.imageSrc,cropped:e.mask.cropped,rootWidth:e.mask.rootWidth,rootHeight:e.mask.rootHeight,clip:e.mask.clip},backgroundMode:e.backgroundMode,ptz:e.ptz}),{...Lw,...o}}},Lw),Uw=Ao(yw,kw,Dw,Nw),{InitSuccessVideo:jw,InitSuccessAudio:xw,InitSuccessSharing:Bw,InitFailedVideo:Fw,InitFailedAudio:Hw,InitFailedSharing:Ww}=Ua;let $w;var Gw=Object.freeze({__proto__:null,connectToMediaStreamEpic:(e,t)=>e.pipe(tr(`${co}`),Zt(t),Ke((e=>{let[,t]=e;return void 0!==t.media.assetsPath&&void 0!==t.media.mediaConstraints})),Gt((e=>{let[,r]=e;const{media:{assetsPath:o,mediaConstraints:n,fileWithVersion:i,enforceMultipleVideos:s,enforceVirtualBackground:a,isEnableDecoderInWorklet:u}}=r;if($w=Js.getInstance(),$w.notifySDKMeetingReady(),o&&n){const e={enableDecoderInWorklet:u};"function"!=typeof window.SharedArrayBuffer&&(Object.assign(e,{enableMultiDecodeVideoWithoutSAB:!!s}),os()&&Object.assign(e,{enableVirtualBackgroundWithoutSAB:!!a})),eg(a)&&Object.assign(e,{resourceManager:pE.exports.IResourceManager,file:[{path:`${o}/vb-resources/vbbuffer.bin`,type:"bin"},{path:`${o}/vb-resources/tf.min.js`,type:"js"}]}),$w.setAssetsAndConstraint(o,n,i,e)}zm(t).pipe(Zt(t)).subscribe((e=>{let[t,r]=e;const{meeting:{svcUrl:o,meetingNumber:n,conId:i,e2eEncrypt:s,userId:a,isWebinar:u,enableAudioQos:d,enableVideoQos:c,enableWebtransport:l,webtransportPort:p}}=r;var h;t&&(null===(h=$w)||void 0===h||h.connect({svcUrl:o,meetingNumber:n,conId:i,e2eEncrypt:s,isViewOnly:pl(t.userRole),currentUserId:a,isWebinar:u,enableAudioQos:d,enableVideoQos:c,enableWebtransport:l,webtransportPort:p}))}))})),Ut((()=>Fe((e=>{var t;return null===(t=$w)||void 0===t?void 0:t.registerCallback(e)}),(e=>{var t;return null===(t=$w)||void 0===t?void 0:t.unregisterCallback(e)}),((e,t)=>({type:e,data:t}))).pipe(ye((e=>lo(e))))))),connectedMediaStreamEpic:e=>Ro(e,[jw,xw,Bw,Fw,Hw,Ww]).pipe(km((e=>{const{payload:{type:t,data:r}}=e;if(t===xw||t===Hw){if(r===ja.EncodeSuccess)return Lc(Qd),Q(po("success"));if(r===ja.DecodeSuccess)return Lc(Zd),Q(ho("success"));if(r===ja.EncodeFailed)return Lc(rc),Q(po("failed"));if(r===ja.DecodeFailed)return Lc(oc),Q(ho("failed"))}else if(t===jw||t===Fw){if(r===ja.EncodeSuccess)return Lc(Yd),Q(fo("success"));if(r===ja.DecodeSuccess)return Lc(Xd),Q(mo("success"));if(r===ja.EncodeFailed)return Lc(nc),Q(fo("failed"));if(r===ja.DecodeFailed)return Lc(ic),Q(mo("failed"))}else if(t===Bw||t===Ww){if(r===ja.EncodeSuccess)return Lc(ec),Q(go("success"));if(r===ja.DecodeSuccess)return Lc(tc),Q(vo("success"));if(r===ja.EncodeFailed)return Lc(sc),Q(go("failed"));if(r===ja.DecodeFailed)return Lc(ac),Q(vo("failed"));if(t===Bw&&void 0===r)return Lc(tc),Q(vo("success"))}}))),mediaDeviceUpdateEpic:(e,t)=>Ro(e,[jw,xw]).pipe(Dm((()=>{if("object"==typeof navigator.mediaDevices)return Ge(Km(),Ge(Ro(e,Ua.StartVideoCaptureSuccess),xe(navigator.mediaDevices,"devicechange"),Ro(e,Ua.UserGrantCaptureAudio).pipe(Ke((()=>!t.value.audio.isUserGrantCaptureAudio)))).pipe(Pe((()=>Km().pipe(Gt((()=>{Lc(uc)}))))))).pipe(Zt(t),Pe((e=>{let[t,r]=e;const o=[Wl(t.microphones),$l(t.speakers),Wp(t.cameras)];if(r.audio){const{audio:{activeMicrophone:e,activeSpeaker:s,microphoneDevicesList:a,speakerDevicesList:u}}=r,d=bl(r),{microphones:c,speakers:l}=t,p=a.filter((e=>-1===c.findIndex((t=>t.deviceId===e.deviceId)))),h=u.filter((e=>-1===l.findIndex((t=>t.deviceId===e.deviceId))));var n,i;p.length>0&&p[0].deviceId===e&&(null===(n=$w)||void 0===n||n.changeMicrophone("default",void 0,!(null==d||!d.muted)),o.push(Gl("default"))),h.length>0&&h[0].deviceId===s&&(null===(i=$w)||void 0===i||i.changeSpeaker("default"),o.push(zl("default")))}return Oe(o)})))}))),sendUserNodeListToMediaSDKEpic:(e,t)=>Oo(e,Is).pipe(Gt((e=>{const{type:r,payload:{body:o}}=e,n=Js.getInstance(),i=r===`${ro}`;if(o.add){const e=o.add.map((e=>({userid:e.id,sn:e.zoomID&&bn(e.zoomID)})));if(!i){const{meeting:{gcmSessinKey:r}}=t.value;n.sendUserNodeList(e,r)}n.updateUserMediaSN({added:e,isFromMainSession:i,iVType:ps.SHARING_DECODE}),i&&n.updateUserMediaSN({added:e,isFromMainSession:i,iVType:ps.AUDIO_DECODE})}if(o.remove){if(!i){const{meeting:{gcmSessinKey:e}}=t.value;n.sendUserNodeList(o.remove.map((e=>({userid:e.id,bremove:!0}))),e)}n.updateUserMediaSN({removed:o.remove.map((e=>e.id)),isFromMainSession:i,iVType:ps.SHARING_DECODE}),i&&n.updateUserMediaSN({removed:o.remove.map((e=>e.id)),isFromMainSession:i,iVType:ps.AUDIO_DECODE})}})),kt(W)),handleMediaSdkGcmIVResponseEpic:e=>Ro(e,Ua.AesGcmIvResponse).pipe(Gt((e=>{const{payload:{data:{workerType:t,iv:r}}}=e,o=Wi.get(ms.WebclientIVState);if(o){const e={...o,[t]:r};Wi.set(ms.WebclientIVState,e,Fi.SessionStorage)}})),kt(W)),handleMediaEncryptIndication:e=>e.pipe(tr(`${Zr}`),Ke((e=>[ws,Cs,Es].includes(e.payload.evt))),ye((e=>{const{payload:{evt:t,body:{encryptKey:r,additionalType:o}}}=e;return bo({type:t===ws?"audio":t===Cs?"video":"sharing",encryptKey:r,additionalType:o})})))});const zw=Ao(Gw),Kw={meeting:k_,socket:eE,participants:uE,media:lE},qw=window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__||ct;function Jw(){const e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new F.constructor(F.SchedulerAction),r=new N,o=void 0,n=function(n){o=n;var i=(new N).pipe(ee(t)),s=(new N).pipe(ee(t)),a=new or(i),u=new nr(s,o.getState()),d=r.pipe(ye((function(t){var r="dependencies"in e?t(a,u,e.dependencies):t(a,u);if(!r)throw new TypeError('Your root Epic "'+(t.name||"")+"\" does not return a stream. Double check you're not missing a return statement!");return r})),Pe((function(e){return Oe(e).pipe(function(e,t){return void 0===t&&(t=0),function(r){return r.lift(new Vt(e,t))}}(t),ee(t))})));return d.subscribe(o.dispatch),function(e){return function(t){var r=e(t);return s.next(o.getState()),i.next(t),r}}};return n.run=function(e){r.next(e)},n}(),{epicSubject:t,rootEpic:r}=function(){const e=new V(Io(D_,tE,dE,zw));return{epicSubject:e,rootEpic:(t,r,o)=>e.pipe(Pe((e=>e(t,r,o))))}}(),o=[e],n=dt(Qw(),qw(function(){for(var e=arguments.length,t=new Array(e),r=0;r{void 0===n.asyncReducers[e]&&(n.asyncReducers[e]=t,n.replaceReducer(Qw(n.asyncReducers)))},n.injectEpic=e=>{t.next(e)},e.run(r),n}function Qw(e){return function(e){for(var t=Object.keys(e),r={},o=0;oe.userId===t));if(n.findIndex((e=>e===uC.Attendee))>-1&&(i=El(o).find((e=>e.userId===t))),!i)return Promise.reject({type:Jd,reason:"no matching user"});{const{meeting:{userId:e}}=r.getState();for(let r=0;r1?o-1:0),s=1;st.includes(r+1)?I_(e):e)):n;return r.info(`${o},params:${JSON.stringify(s)}`),i.apply(this,n).then((e=>(r.info(`${o} success`),e))).catch((e=>{let t=`${o} failed,`;return"object"==typeof e&&(t=`${t},${e.type?`type:${e.type},`:""}${e.reason?`reason:${e.reason}`:""}`),r.error(t),Promise.reject(e)}))}catch(e){}return i.apply(this,n)}}}function pC(e,t,r){return function(o,n,i){const s=i.value;i.value=function(){for(var o,n=arguments.length,i=new Array(n),a=0;a!!u[e])))?s.apply(this,i):Promise.reject({type:Jd,reason:`Expected to accept ${null==e?void 0:e.name}, but actual it is ${"object"==typeof u&&null!==u?null===(o=Object.getPrototypeOf(u))||void 0===o?void 0:o.constructor.name:u}`})}}}class hC{constructor(e){this[Yw]=void 0,this[eC]=void 0,this[Xw]=void 0,this[tC]=void 0,this[Yw]=e,this[eC]=e.dispatch,this[Xw]=e.getState}}const fC=["userId","displayName","audio","isHost","avatar","bRaiseHand","bHold","bVideoOn","sharerOn","sharerPause","feedback","bLocalRecord","strPronoun","sdkKey","audioConnectionStatus","caps","bAllowISORecord","bVideoConnect","userIdentity","isSpeakerOnly","bVideoShare","bShareAudioOn","bShareToBORooms",{from:"userGUID",to:"userGuid"},{from:"bGuest",to:"isGuest"},{from:"sharerPause",to:"sharePause"},{from:"bCoHost",to:e=>({isCoHost:!!e})},{from:"muted",to:(e,t)=>({muted:null!=t&&t.isSpeakerOnly||""===(null==t?void 0:t.audio)?void 0:e})},{from:"userType",to:(e,t)=>{const r=cl(e),o={isPhoneUser:r};return r&&null!=t&&t.phoneNumber&&Object.assign(o,{phoneNumber:t.phoneNumber}),o}}];function mC(e){return fC.reduce(((t,r)=>{const o="string"==typeof r?r:r.from,n=function(e,t,r){if("string"==typeof e)return{[`${e}`]:t};if("object"==typeof e&&void 0!==e.from){const{to:o}=e;return"string"==typeof o?{[`${o}`]:t}:o(t,r)}}(r,e[o],e);return{...t,...n}}),{})}var gC,vC,yC,bC;const SC=Ws.createAgent();let _C=(gC=dC(uC.Other),vC=dC(uC.Other),yC=dC(uC.Other),bC=class extends hC{constructor(e){super(e),this.modules=void 0,this.useSDK=void 0,this.useSDK=!1,this.modules=new Map}initWithSDK(e,t,r){return this.useSDK=!0,this.init(e,t,r)}init(e,t,r){const{[eC]:o,[Yw]:n}=this;let i=Wm,s=(null==r?void 0:r.fileWithVersion)||!1,a="en-US",u=`${Wm}/${Li}`;if(r){const{dependentAssets:e,additionalFeatures:t,constraints:o,language:d,webEndpoint:c}=r;if(d&&(a=d),c&&function(e){Bm=function(e,t){let r=e;/^https?:\/\//.test(r)||(r=`https://${e}`);try{const e=new URL(r);if(!t)return e.href;if(t.hostname)return e.hostname;if(t.path)return e.pathname}catch(e){return""}return""}(e,{hostname:!0})}(c),e===Vi.CDN||e===Hm)i=Hm,u=`${Hm}/${Li}`,s=!0;else if(e===Vi.Global||e===Wm)i=Wm,u=`${Wm}/${Li}`,s=!0;else if(e===Vi.CN||e===$m)i=$m,u=`${$m}/${Li}`,s=!0;else if(e&&/^https?:\/\//.test(e)){let t=e;"/"===t[t.length-1]&&(t=t.slice(0,length-1)),i=t,u=s?`${t}/${Li}`:`${t}/${Ni}`}t&&Array.isArray(t)&&t.forEach((e=>{if(this[tC][e]&&void 0===n.getState()[e]){const{epic:t,reducer:r,Client:o}=this[tC][e];n.injectReducer(e,r),n.injectEpic(t);const i=new o(n);this.modules.set(e,i)}})),null!=o&&o.audio&&void 0===n.getState().audio&&(n.injectReducer("audio",xE),n.injectEpic(BE)),null!=o&&o.video&&void 0===n.getState().video&&(n.injectReducer("video",Vw),n.injectEpic(Uw)),null!=o&&o.screen&&void 0===n.getState().share&&(n.injectReducer("share",rv),n.injectEpic(ov))}return o(ri({apiKey:e,signature:t,language:a,useSDK:this.useSDK})),o(yo({mediaConstraints:r&&r.constraints||{},assetsPath:i,fileWithVersion:s,enforceMultipleVideos:null==r?void 0:r.enforceMultipleVideos,enforceVirtualBackground:null==r?void 0:r.enforceVirtualBackground})),void 0!==(null==r?void 0:r.stayAwake)&&o(Oi(r.stayAwake)),void 0!==(null==r?void 0:r.quicklyLeaveMeeting)&&o(Pi(r.quicklyLeaveMeeting)),new Promise(((e,t)=>{null!=r&&r.skipJsMedia?e(""):function(e,t,r){const o=document.createElement("script");o.type="text/javascript",o.readyState?o.onreadystatechange=()=>{"loaded"!==o.readyState&&"complete"!==o.readyState||(o.onreadystatechange=null,t())}:(o.onload=()=>{t()},o.onerror=()=>{r()}),o.src=e,"function"==typeof document.body.append?document.getElementsByTagName("head")[0].append(o):document.getElementsByTagName("head")[0].appendChild(o)}(u,(()=>{e("")}),(()=>{t({type:Jd,reason:"dependent assets are not accessible"})}))}))}on(e,t){((e,t)=>{const r=Dc[e];if(r){const o=Mc.get(e);if(o)o.push(t),Mc.set(e,o);else{const o=[t];Mc.set(e,o);const n=Ge(...r.map((e=>{const{event:t,payload:r}=e;return xe(Pc,t).pipe(ye((e=>r(e))),ee(le))}))).subscribe((t=>{const r=Mc.get(e);r&&r.forEach((e=>{e(t)}))}));Nc.push(n)}}})(e,t)}off(e,t){((e,t)=>{if(Dc[e]){const r=Mc.get(e);if(Array.isArray(r)){const o=r.filter((e=>e!==t));Mc.set(e,o)}}})(e,t)}getFeatureModule(e){return this.modules.get(e)}leave(){const{[Xw]:e,[eC]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(Zn()),Xe(500).pipe(At("")).toPromise()):Promise.resolve("")}end(){const{[Xw]:e,[eC]:t}=this;return"connected"===e().socket.zoomSocketStatus?(t(Yn()),Xe(500).pipe(Gt((()=>{xc()})),At("")).toPromise()):Promise.resolve("")}changeName(e,t){const r=this[Yw].getState(),{meeting:{bAllowAttendeeRename:o}}=r,n=bl(r),i=pl(n.userRole),s=Sl(r);if(i)return Promise.reject({type:Kd});if(t&&t!==(null==n?void 0:n.userId)){if(s){const{participants:{attendeesList:o}}=r,n=o.find((e=>e.userId===t));if(n)return SC.rename(t,mn(e),mn(n.displayName)),Tm(t,(t=>t.displayName===e));{const o=El(r).find((e=>e.userId===t));if(o){const t=cv.getInstance();return SC.rename(o.userId,mn(e),mn(o.displayName)),t.rename(o.jid,e),Uc(ta,(t=>{const r=t.find((e=>e.jid===o.jid));return r&&r.displayName===e}))}return Promise.reject({type:Jd,reason:"no matching user"})}}return Promise.reject({type:Kd})}return e===n.displayName?Promise.resolve():s||o?(SC.rename(n.userId,mn(e),mn(n.displayName)),Uc(Zs,(t=>t.displayName===e))):Promise.reject({type:Kd,reason:"host disallow rename themselves"})}makeHost(e){return SC.assignHost(e,!1),Tm(e,(e=>!0===e.isHost))}makeCoHost(e){const t=this[Yw].getState(),r=Al(t).find((t=>t.userId===e));return!0===(null==r?void 0:r.bCoHost)?Promise.reject({type:Jd,reason:`user:[${e}] is already co-host `}):(SC.assignHost(e,!0),Tm(e,(e=>!0===e.bCoHost)))}revokeCoHost(e){const t=this[Yw].getState(),r=Al(t).find((t=>t.userId===e));return!1===(null==r?void 0:r.bCoHost)?Promise.reject({type:Jd,reason:`user:[${e}] is not a co-host`}):(SC.revokeCoHost(e),Tm(e,(e=>!1===e.bCoHost)))}reclaimHost(){const e=this[Xw](),{meeting:{isOriginHost:t}}=e,r=bl(e);return null!=r&&r.isHost?Promise.resolve(""):t?(SC.reclaimHost(r.userId,!1),Uc(Zs,(e=>!0===e.isHost))):Promise.reject({type:Kd,reason:"You are not the origin host"})}isHost(){const e=this[Yw].getState(),t=bl(e);return!!t&&t.isHost}isCoHost(){const e=this[Yw].getState(),t=bl(e);return!!t&&!!t.bCoHost}isOriginHost(){const{meeting:{isOriginHost:e}}=this[Xw]();return e}getCurrentUserInfo(){const e=this[Yw].getState(),t=bl(e);if(t){const r=mC(t);if(e.meeting.isWebinar&&pl(t.userRole)){const{audio:t}=e,o=null==t?void 0:t.isAllowToTalk;Object.assign(r,{isAllowToTalk:o})}return r}return null}getParticipantsList(){const e=this[Yw].getState(),{meeting:{meetingStatus:t}}=e,r=bl(e);return t===ji.Joined&&r&&!r.bHold?Al(e).map((e=>mC(e))):[]}getAssistantsList(){const e=this[Yw].getState(),{meeting:{meetingStatus:t}}=e,r=bl(e);return t===ji.Joined&&r?wl(e).map((e=>({userId:e.userId,displayName:e.displayName,isNewAst:!0}))):[]}getMeetingHost(){var e;const t=this[Xw]();let r=Cl(t);return r||(null===(e=t.breakoutRoom)||void 0===e?void 0:e.currentRoom.status)!==gl.InRoom||(r=t.breakoutRoom.mainSessionAttendeeList.find((e=>e.isHost))),void 0!==r?mC(r):null}getMeetingInfo(){const{meeting:{meetingStatus:e,isOnHold:t,meetingNumber:r,passWord:o,userName:n,userEmail:i,meetingTopic:s,meetingOptions:a,encType:u,region:d,network:c,topic:l,zlkJwtToken:p,userId:h,lang:f,inviteEmail:m,meetingId:g,participantID:v,h323Password:y,recordingDisclaimer:b,recordingDisclaimerForRecorder:S,wrInfo:_,meetingInfo:E,isNewJoinFlow:I}}=this[Xw](),A=e===ji.Joined&&!t;if(p)return{topic:l,password:o,userName:n,isInMeeting:A,userId:h,meetingId:g};{let e="";return 0===u?e="None":1===u?e="AES ECB":2===u&&(e="AES GCM"),{meetingNumber:r,password:o,userName:n,userEmail:i,inviteEmail:m,meetingTopic:s,encryptionType:e,region:d,network:c,isInMeeting:A,userId:h,lang:f,webEndpoint:Bm,meetingId:g,participantId:v,telPwd:y,recordingInfo:{recordingDisclaimer:b,recordingDisclaimerForRecorder:S,isUserEnableRecordingReminder:null==a?void 0:a.isUserEnableRecordingReminder},wrInfo:Object.assign({},_,{isNew:I}),scheduleInfo:E}}}},Zw(bC.prototype,"end",[iC,oC],Object.getOwnPropertyDescriptor(bC.prototype,"end"),bC.prototype),Zw(bC.prototype,"changeName",[oC],Object.getOwnPropertyDescriptor(bC.prototype,"changeName"),bC.prototype),Zw(bC.prototype,"makeHost",[gC,iC,oC],Object.getOwnPropertyDescriptor(bC.prototype,"makeHost"),bC.prototype),Zw(bC.prototype,"makeCoHost",[vC,iC,oC],Object.getOwnPropertyDescriptor(bC.prototype,"makeCoHost"),bC.prototype),Zw(bC.prototype,"revokeCoHost",[yC,iC,oC],Object.getOwnPropertyDescriptor(bC.prototype,"revokeCoHost"),bC.prototype),Zw(bC.prototype,"reclaimHost",[oC],Object.getOwnPropertyDescriptor(bC.prototype,"reclaimHost"),bC.prototype),bC);var EC=Object.freeze({__proto__:null,receiveChatMessageFromXMPPEpic:(e,t)=>To(e,24583).pipe(Zt(t),Pe((e=>{let[t,r]=e;if(r.meeting.zlkJwtToken)return W;const{payload:{body:{sn:o,senderName:n,senderJid:i,receiver:s,text:a,type:u}}}=t,d=bl(r),c=El(r),{meeting:{jid:l,userId:p},participants:{xmppAttendeeList:h}}=r;return Ss.beginDecrypt({decryptedText:a,type:fs.XMPP_CHAT,zoomId:o}).then((e=>{var t;let{message:r}=e,o=null,a=0,f="";d&&pl(d.userRole)&&l===s?(o=h.find((e=>e.jid===i)),a=p,f=d.displayName):u===Ds.Panelist&&(o=c.find((e=>e.jid===i)),a=Ds.Panelist,f=xs.displayName);const m={message:r,sender:{name:n,userId:(null===(t=o)||void 0===t?void 0:t.userId)||0,avatar:""},receiver:{name:f,userId:a},timestamp:(new Date).getTime()};return Lc(ya,m),Kh(m)}))}))),receiveChatMessageFromRWGEpic:(e,t)=>wo(e,7944).pipe(Zt(t),Pe((e=>{let[t,r]=e;const{meeting:{bIbDisableChat:o,isWebinar:n},participants:{attendeesList:i}}=r,{payload:{body:{attendeeNodeID:s,sn:a,destNodeID:u,text:d,senderName:c,msgID:l}}}=t,p=bl(r),h=El(r);if(p){const e=pl(null==p?void 0:p.userRole)&&s===p.userId&&!l;if(!o&&!e){let e,t=a;if(!a){const e=i.find((e=>e.userId===u));e&&(t=e.zoomID)}if(s===Ds.SilentModeUsers){const t=gn(d),r={id:l,message:t,sender:{name:"Host",userId:u},receiver:{name:"Everyone (in Waiting Room)",userId:s},timestamp:(new Date).getTime()};e=Promise.resolve(r)}else e=Ss.beginDecrypt({decryptedText:d,zoomId:t,type:fs.RWG_CHAT}).then((e=>{let{message:t}=e;const r=i.find((e=>e.userId===u)),o=c?gn(c):null==r?void 0:r.displayName;let a="";if(s===Ds.All)a=n?"All panelists and attendees":"Everyone";else if(s===Ds.Panelist)a="All panelists";else if(n&&h.findIndex((e=>e.userId===s))>-1)a=h.find((e=>e.userId===s)).displayName;else{const e=i.find((e=>e.userId===s));e&&(a=e.displayName)}return{id:l,message:t,sender:{name:o,userId:u,avatar:null==r?void 0:r.avatar},receiver:{name:a,userId:s},timestamp:(new Date).getTime()}}));return e.then((e=>(Lc(ya,e),Kh(e))))}}return W}))),changeAttendeePrivilegeResponse:(e,t)=>wo(e,As).pipe(Ke((e=>{var t,r;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.chatPriviledge)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.bAllowAttendeeChat)})),Zt(t),ye((e=>{let[t,r]=e;const{payload:{body:{chatPriviledge:o,bAllowAttendeeChat:n}}}=t,{chat:{chatPrivilege:i}}=r;return void 0!==n?(Lc(ba,!0===n?{chatPrivilege:i}:{chatPrivilege:Rs.NoAttendee}),Jh(n)):(Lc(ba,{chatPrivilege:o}),Gh(o))}))),changePanelistPrivilegeResponse:e=>wo(e,As).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.panelistChatPriviledge)})),ye((e=>{const{payload:{body:{panelistChatPriviledge:t}}}=e;return Lc(ba,{panelistChatPrivilege:t}),zh(t)}))),chatResponseEpic:(e,t)=>wo(e,4136).pipe(Zt(t),Pe((e=>{let[t,r]=e;const{payload:{body:{result:o,destNodeID:n,msgID:i}}}=t,{meeting:{userId:s},chat:{chatHistory:a}}=r;if(o===Ms.Success){var u,d;const e=[];for(let t=a.length-1;t>=0;t--){const r=a[t];if(!r.id&&r.sender.userId===s&&[Ds.All,Ds.Panelist,Ds.IndividualCcPanelist,n].includes(r.receiver.userId)&&e.unshift(r),r.id)break}const t=e.length>0&&null!==(u=null===(d=e[0])||void 0===d?void 0:d.highResTimeStampForIdentification)&&void 0!==u?u:0;return Lc(Sa,{msgId:i,receiverId:n,identification:t}),Q(Qh({destNodeID:n,msgID:i,userId:s}))}return o===Ms.Delete||o===Ms.Block?Q(Zh({msgId:i})):W}))),chatCmdResponseEpic:e=>wo(e,4238).pipe(Pe((e=>{const{payload:{body:{bSuccess:t,cmd:r,msgID:o}}}=e,n=[];return t&&r===Ps.Delete&&(n.push(Zh({msgId:o})),Lc(_a,{id:o})),Oe(n)}))),chatCmdIndicationEpic:e=>wo(e,7960).pipe(Pe((e=>{const{payload:{body:{cmd:t,msgID:r}}}=e,o=[];return t===Ps.Delete&&(o.push(Zh({msgId:r})),Lc(_a,{id:r})),Oe(o)})))});const IC={chatHistory:[],chatPrivilege:Rs.All,panelistChatPrivilege:ks.AllPanelist,isAllowAttendeeChat:!0},AC=zr({[`${Kh}`]:ev(((e,t)=>{let{payload:r}=t;e.chatHistory.push(r)})),[`${Gh}`]:ev(((e,t)=>{let{payload:r}=t;e.chatPrivilege=r})),[`${zh}`]:ev(((e,t)=>{let{payload:r}=t;e.panelistChatPrivilege=r})),[`${Jh}`]:ev(((e,t)=>{let{payload:r}=t;e.isAllowAttendeeChat=r})),[`${Qh}`]:ev(((e,t)=>{let{payload:r}=t;const{destNodeID:o,msgID:n,userId:i}=r,s=[];for(let t=e.chatHistory.length-1;t>=0;t--){const r=e.chatHistory[t];if(!r.id&&r.sender.userId===i&&[Ds.All,Ds.Panelist,o].includes(r.receiver.userId)&&s.unshift(r),r.id)break}s.length>0&&(s[0].id=n)})),[`${Zh}`]:ev(((e,t)=>{let{payload:r}=t;const{msgId:o}=r,n=e.chatHistory.findIndex((e=>e.id===o));n>=0&&e.chatHistory.splice(n,1)})),[`${qh}`]:()=>({...IC})},IC);function wC(e,t,r){if(null!=r&&r.host)return[Cl(e),...Tl(e)].filter((e=>(null==e?void 0:e.userId)!==t)).map((e=>({userId:null==e?void 0:e.userId,displayName:null==e?void 0:e.displayName,isHost:null==e?void 0:e.isHost,isCoHost:null==e?void 0:e.bCoHost})));{let o=[Cl(e),...Tl(e),...e.participants.attendeesList.filter((e=>!(e.bCoHost||e.isHost||e.bHold)))];if(null!=r&&r.includeAttendee){const t=El(e).filter((e=>!cl(e.userType)));o=[...o,...t]}return o.filter((e=>(null==e?void 0:e.userId)!==t)).map((e=>({userId:null==e?void 0:e.userId,displayName:null==e?void 0:e.displayName,isHost:null==e?void 0:e.isHost,isCoHost:null==e?void 0:e.bCoHost})))}}var CC;const TC=Ws.createAgent(),OC=cv.getInstance(),RC=e=>{const{text:t,destId:r,sn:o,attendeeId:n}=e;return Ss.beginEncrypt({text:t,type:fs.RWG_CHAT}).then((e=>{TC.chat(e,r,o,n)}))};let kC=(CC=class extends hC{send(e,t){if(!e)return Promise.reject({type:Jd,reason:"Text is empty"});const{[Xw]:r,[eC]:o}=this,n=r(),i=bl(n),s=function(e,t){if(t===Ds.All)return js;if(t===Ds.Panelist)return xs;if(t===Ds.SilentModeUsers)return Bs;{const{meeting:{isWebinar:r},participants:{xmppAttendeeList:o,attendeesList:n}}=e;return r?n.find((e=>e.userId===t))||o.find((e=>e.userId===t)):n.find((e=>e.userId===t))}}(n,t),a=((e,t,r)=>{const o=null==t?void 0:t.userId;if(null==e||!e.zoomID||null==t||!t.displayName||o===e.userId)return{type:Jd,reason:"invalid target user"};const{chat:{chatPrivilege:n,panelistChatPrivilege:i},meeting:{isWebinar:s}}=r,a=Sl(r),u=t.isHost||t.bCoHost;let d=!1;if(!a){if(s)if(pl(e.userRole))(n===Rs.NoAttendee||n===Rs.AllPanelist&&o!==Ds.Panelist||n===Rs.All&&o!==Ds.All&&o!==Ds.Panelist)&&(d=!0);else{const e=pl(null==t?void 0:t.userRole);(i===ks.Invalid||i===ks.AllPanelist&&(e||o===Ds.All))&&(d=!0)}else(n===Rs.NoAttendee||n===Rs.Host&&!u||o===Ds.SilentModeUsers||n===Rs.EveryonePublicly&&o!==Ds.All&&!u)&&(d=!0);if(d)return{type:Kd,reason:"Insufficient chat privilege"}}return null})(i,s,n);if(a)return Promise.reject(a);const{meeting:{isWebinar:u,encType:d}}=n,c=d===hs.AES_GCM;let l=Promise.resolve(),p=!1;const h=u&&pl(s.userRole);return t===Ds.SilentModeUsers?TC.chat(mn(e),t):u?h?8==(8&s.clientCap)?l=RC({text:e,destId:Ds.IndividualCcPanelist,sn:null==i?void 0:i.zoomID,attendeeId:t}):(l=RC({text:e,destId:Ds.Panelist,sn:null==i?void 0:i.zoomID,attendeeId:t}).then((()=>(e=>{const{text:t,jid:r,isGCMEnabled:o}=e;return Ss.beginEncrypt({text:t,type:fs.XMPP_CHAT}).then((e=>{OC.sendWebinarMseeage(e,r,Ds.IndividualCcPanelist,o)}))})({text:e,jid:s.jid,isGCMEnabled:c}))),p=!0):s&&(l=RC({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID})):l=RC({text:e,destId:s.userId,sn:null==i?void 0:i.zoomID}),l.then((()=>{const r=(new Date).getTime(),n=performance.now(),a={message:e,sender:{name:null==i?void 0:i.displayName,userId:null==i?void 0:i.userId,avatar:null==i?void 0:i.avatar},receiver:{name:null==s?void 0:s.displayName,userId:h?Ds.IndividualCcPanelist:null==s?void 0:s.userId},timestamp:r,highResTimeStampForIdentification:n};return o(Kh(a)),p?(Lc(ya,a),a):new Promise(((e,r)=>{jc(Sa).pipe(Qt(5e3),Dt((e=>n!==e.identification||!([e.receiverId,Ds.All,Ds.Panelist].includes(t)||e.receiverId===Ds.IndividualCcPanelist))),bt(1)).subscribe((t=>{const{msgId:r}=t,{highResTimeStampForIdentification:o,...n}=a,i={id:r,...n,...h&&{receiver:{name:null==s?void 0:s.displayName,userId:null==s?void 0:s.userId}}};Lc(ya,i),e(i)}),(()=>{r({type:zd})}))}))}))}setPrivilege(e){const t=this[Xw](),{meeting:{isWebinar:r},chat:{chatPrivilege:o}}=t;return o===e?Promise.resolve(""):!r&&!Ns.includes(e)||r&&!Ls.includes(e)?Promise.reject({type:Jd,reason:"invalid privilege value of parameter"}):(TC.setChatPriviledge(e),Uc(ba,(t=>t.chatPrivilege===e)))}setPanelistPrivilege(e){const t=this[Xw](),{chat:{panelistChatPrivilege:r}}=t,o=Us[e];return r===o?Promise.resolve(""):Object.values(Vs).includes(e)?(TC.setPanelistChatPrivilege(e),Uc(ba,(e=>e.panelistChatPrivilege===o))):Promise.reject({type:Jd,reason:"Panelist privilege value is invalid"})}deleteMessage(e){const t=this[Xw](),{chat:{chatHistory:r},meeting:{meetingOptions:o,userId:n}}=t;if(null!=o&&o.isEnableDeleteChatMsg){const o=Sl(t),i=r.find((t=>t.id===e));if(i){const{sender:t}=i;if(o)TC.chatCmdReq(e,Ps.Delete);else{if(t.userId!==n)return Promise.reject({type:Kd,reason:"can not delete message"});TC.chatCmdReq(e,Ps.Delete)}return Uc(_a,(t=>t.id===e)).then((()=>({id:e})))}return Promise.reject({type:Jd,reason:"msgId is wrong"})}return Promise.reject({type:$d,reason:"can not delete messages"})}lockChat(e){const t=this[Xw](),{meeting:{meetingOptions:r}}=t,o=null!=r&&r.isPrivateChatEnabled?Rs.All:Rs.EveryonePublicly;return this.setPrivilege(e?Rs.NoOne:o)}getPrivilege(){const{chat:{chatPrivilege:e,isAllowAttendeeChat:t}}=this[Xw]();return t?e:Rs.NoAttendee}getReceivers(){const e=this[Xw](),{chat:{chatPrivilege:t,panelistChatPrivilege:r,isAllowAttendeeChat:o},meeting:{isWebinar:n}}=e;if(!n&&!o)return[];const i=bl(e),s=Sl(e);if(i)if(n)if(pl(i.userRole)){if(!o)return[];if(t===Rs.All)return[xs,js];if(t===Rs.AllPanelist)return[xs];if(t===Rs.NoOne)return[]}else{if(s||r===ks.Everyone){const t=wC(e,i.userId,{includeAttendee:!0});return[xs,js,...t]}if(r===ks.AllPanelist){const t=wC(e,i.userId);return[xs,...t]}}else{const r=Sl(e);if(t===Rs.All||r){const t=wC(e,i.userId);return[js,...t]}if(t===Rs.Host)return wC(e,i.userId,{host:!0});if(t===Rs.EveryonePublicly){const t=wC(e,i.userId,{host:!0});return[js,...t]}if(t===Rs.NoOne)return[]}return[]}getHistory(){return this[Xw]().chat.chatHistory.map((e=>{const{highResTimeStampForIdentification:t,...r}=e;return r}))}isAllowToDeleteMessages(){const e=this[Xw](),{meeting:{meetingOptions:t}}=e;return null==t?void 0:t.isEnableDeleteChatMsg}},Zw(CC.prototype,"send",[oC],Object.getOwnPropertyDescriptor(CC.prototype,"send"),CC.prototype),Zw(CC.prototype,"setPrivilege",[nC,oC],Object.getOwnPropertyDescriptor(CC.prototype,"setPrivilege"),CC.prototype),Zw(CC.prototype,"setPanelistPrivilege",[nC,oC,function(e,t,r){const o=r.value;r.value=function(){const e=this[Yw];if(e){const{meeting:{isWebinar:t}}=e.getState();if(!t)return Promise.reject({type:qd,reason:"non-webinar"})}for(var t=arguments.length,r=new Array(t),n=0;n{let n=!1;try{var i,s;const{logger:{options:e},meeting:{logConfig:r}}=t.value;n=null!==(i=null==e?void 0:e.enable)&&void 0!==i?i:null===(s=JSON.parse(r||"{}"))||void 0===s?void 0:s.enable}catch(e){}try{if(n){const{logger:{isLaplaceInitialized:n}}=t.value;if(!n)return e.pipe(tr(`${Am}`),bt(1),Pe((e=>(e.payload&&r(o),W))));r(o)}}catch(e){console.warn(e)}return W})))}const NC=[{event:Ua.AudioBridgeReconnectStart,message:p_.AudioBridgeReconnectStart,logType:"info",additionalTags:["Audio Join Flow"]},{event:Ua.AudioBridgeReconnectEnd,message:p_.AudioBridgeReconnectEnd,logType:"info",additionalTags:["Audio Join Flow"]},{event:Ua.UserGrantCaptureAudio,message:p_.DeviceAudioStreamCaptured,logType:"info",additionalTags:["Audio Capture Flow"]},{event:Ua.UserForbiddedCaptureAudio,message:p_.AudioCapturedForbidden,logType:"error",additionalTags:["Audio Capture Flow"]},{event:Ua.AudioWebsocketBroken,message:p_.AudioWorkerWebsocketBroken,logType:"error",additionalTags:["Audio Init Flow"]},{event:Ua.AudioZeroData,message:e=>{const{audio:{webrtcRestartCount:t}}=e;return t<3?p_.AudioCaptureZeroData:null},logType:"error",additionalTags:["Audio Init Flow"]},{event:Ua.JoinComputerAudioComplete,message:p_.AudioJoinComplete,logType:"info",additionalTags:["Audio Join Flow"]},{event:Ua.LeaveComputerAudioComplete,message:p_.AudioLeaveComplete,logType:"info",additionalTags:["Audio Join Flow"]},{event:Ua.JoinSharingAudioComplete,message:p_.SharingAudioStartComplete,logType:"info",additionalTags:["Audio Sharing Flow"]},{event:Ua.LeaveSharingAudioComplete,message:p_.SharingAudioStopComplete,logType:"info",additionalTags:["Audio Sharing Flow"]},{event:Ua.AudioSpeakerSetError,message:p_.ChangeSpeakerError,logType:"error",additionalTags:["Audio Play Flow"]}],LC=[{event:Ua.UserForbiddedCaptureVideo,message:h_.UserForbiddedCaptureVideo,logType:"warn",additionalTags:["Video Join Flow"]},{event:Ua.StartVideoCaptureSuccess,message:h_.StartCaptureVideoSuccess,logType:"info",additionalTags:["Video Join Flow"]},{event:Ua.StopVideoCaptureSuccess,message:h_.StopCaptureVideoSuccess,logType:"info",additionalTags:["Video Join Flow"]},{event:Ua.StartVideoStreamInVbSettingSuccess,message:h_.VBSettingSuccess,logType:"info",additionalTags:["Video VB Flow"]},{event:Ua.VbModelPreloadingOk,message:h_.VBPreloadSuccess,logType:"info",additionalTags:["Video VB Flow"]},{event:Ua.VbModelPreloading_3S,message:h_.VBPreloading3S,logType:"warn",additionalTags:["Video VB Flow"]},{event:Ua.VbModelPreloading_10S,message:h_.VBPreloading10S,logType:"warn",additionalTags:["Video VB Flow"]},{event:Ua.VbSettingParaError,message:h_.VBSettingFailed,logType:"error",additionalTags:["Video VB Flow"]}],VC=NC.map((e=>({...e,tag:"Audio"}))).concat(LC.map((e=>({...e,tag:"Video"})))),UC=y_.getInstance(),{InitSuccessVideo:jC,InitSuccessAudio:xC,InitSuccessSharing:BC,InitFailedVideo:FC,InitFailedAudio:HC,InitFailedSharing:WC}=Ua;var $C=Object.freeze({__proto__:null,handleLoggerMeetingOptionEpic:(e,t)=>e.pipe(tr(`${ei}`),Pe((()=>{const{meeting:{logConfig:e,logEncryptionPubKey:r},logger:{options:o}}=t.value;let n=o||{};return n={...n,logConfig:e,logEncryptionPubKey:r},UC.init(n).then((()=>Am(!0))).catch((()=>Am(!1)))}))),connectedMediaStreamForLogEpic:(e,t)=>Ro(e,[jC,xC,BC,FC,HC,WC]).pipe(MC(e,t,(e=>{const{payload:{type:t,data:r}}=e,o=UC.makeLogger(["Audio","Audio Init Flow"]),n=UC.makeLogger(["Video","Video Init Flow"]),i=UC.makeLogger(["Sharing","Sharing Init Flow"]);t===xC||t===HC?r===ja.EncodeSuccess?o.info(p_.AudioEncodeSuccess):r===ja.DecodeSuccess?o.info(p_.AudioDecodeSuccess):r===ja.EncodeFailed?o.warn(p_.AudioEncodeFailed):r===ja.DecodeFailed&&o.warn(p_.AudioDecodeFailed):t===jC||t===FC?r===ja.EncodeSuccess?n.info(h_.VideoEncodeSuccess):r===ja.DecodeSuccess?n.info(h_.VideoDecodeSuccess):r===ja.EncodeFailed?n.warn(h_.VideoEncodeFailed):r===ja.DecodeFailed&&n.warn(h_.VideoDecodeFailed):t!==BC&&t!==WC||(r===ja.EncodeSuccess?i.info(f_.SharingEncodeSuccess):r===ja.DecodeSuccess?i.info(f_.SharingDecodeSuccess):r===ja.EncodeFailed?i.warn(f_.SharingEncodeFailed):r===ja.DecodeFailed?i.warn(f_.SharingDecodeFailed):t===BC&&void 0===r&&i.info(f_.SharingDecodeSuccess))}))),handleLogFromMediaSDKEpic:(e,t)=>function(e,t,r,o){return Ro(e,r).pipe(MC(e,t,o))}(e,t,VC.map((e=>e.event)),(e=>{const{payload:{type:r}}=e,o=VC.find((e=>e.event===r));if(o){const{message:e,logType:r,additionalTags:n,tag:i}=o;let s=e;"function"==typeof e&&(s=e(t.value)),s&&UC.makeLogger([i])[r](s,n)}})),handleLogJoinEpic:(e,t)=>function(e,t,r,o){return wo(e,4098).pipe(MC(e,t,o))}(e,t,0,(e=>{var r,o;const{payload:{body:n}}=e,i=["conID","confID","mmrFeature","mmrFeatureEx","reportDomain","res","role","svcUrl","userID"],s=["jid","mn","participantID","userGUID","zoomID"];if(n&&n.res===Mn.CONF_SUCCESS){let e=i.reduce(((e,t)=>void 0!==n[t]?{...e,[`${t}`]:n[t]}:e),{});e=s.reduce(((e,t)=>void 0!==n[t]?{...e,[`${t}`]:I_(n[t])}:e),e),UC.makeLogger(["A/V Performance Info"]).info(`${navigator.hardwareConcurrency}`,["CPU_CORES"]),UC.makeLogger(["Command Socket Event"]).info(`log join meeting info ${JSON.stringify(e)}`,["User Info Map"])}else UC.makeLogger(["JOIN_MEETING_FAILED"]).error(`join meeting failed, error:${$n(null==n?void 0:n.res)}, rwg error code:${null==n?void 0:n.res}`);Ws.createAgent().sendRWGConnectionPerformance(`WCL_M, conId: ${null==n?void 0:n.conID}, trackingId: ${null===(r=t.value.logger)||void 0===r||null===(o=r.options)||void 0===o?void 0:o.trackingId}`)})),handleLogRWCEmptyEpic:(e,t)=>e.pipe(tr(`${Jn}`),Zt(t),Ke((e=>{let[,t]=e;return void 0===t.meeting.encryptedRWC&&(void 0===t.meeting.encryptedGEORWC||0===t.meeting.encryptedGEORWC.length)})),MC(e,t,(()=>{const{label:e,payload:r}=PC(t.value);UC.makeLogger(["Join Meeting Flow"]).info(`${e} ${JSON.stringify(r)}`,["Ping RWC Domain Empty"])}))),handleLogSocketErrorEpic:(e,t)=>e.pipe(tr(`${Qn}`),Ke((e=>e.payload===Bi.OnError||e.payload===Bi.Disconnect||e.payload===Bi.NoHeartbeat)),MC(e,t,(e=>{const{payload:r}=e,{socket:{rwgServerList:o,retryCount:n}}=t.value,{payload:i}=PC(t.value);UC.makeLogger(["Join Meeting Flow"]).info(`websocket unexpected disconnected,${JSON.stringify({code:r,rwgHost:o[n],...i})}`,["RWG Disconnect"])}))),handleLogFailoverEpic:(e,t)=>e.pipe(tr(`${Di}`),MC(e,t,(e=>{const{payload:{reason:r,count:o,interval:n}}=e,{payload:i}=PC(t.value);UC.makeLogger(["Join Meeting Flow"]).info(`meeting failover,${JSON.stringify({reason:r,count:o,interval:n,...i})}`,["Failover"])}))),handleLogRwgUrlEpic:(e,t)=>e.pipe(tr(`${oo}`),Ke((e=>e.payload.status===Rl.Connecting)),MC(e,t,(e=>{const{payload:{rwgUrl:r}}=e;let o=r.replace(/(\d+)\?/,`${I_("$1")}?`);o=["email","zoomid","participantID","dn2","customer_key","mpwd","topic"].reduce(((e,t)=>e.indexOf(t)>-1?e.replace(new RegExp(`${t}=([^&]+)`,"g"),`${t}=${I_("$1")}`):e),o);const{payload:n}=PC(t.value);UC.makeLogger(["Join Meeting Flow"]).info(`RWG URL,${JSON.stringify({rwgUrl:o,...n})}`,["RWG Url"])}))),handleLogUnableConnectRWGEpic:(e,t)=>e.pipe(tr(`${Jr}`),Ke((e=>{const{payload:r}=e;return r?r.retry:t.value.meeting.meetingStatus===ji.Initial})),MC(e,t,(()=>{const{meeting:{meetingStatus:e},socket:{rwgServerList:r,retryCount:o}}=t.value;if(e!==ji.Joined){const{payload:e}=PC(t.value),n=(null==r?void 0:r.length)>0?r[o]:void 0;UC.makeLogger(["meeting_connection_details"]).log(JSON.stringify({...e,rwc:null==n?void 0:n.rwc,rwg:null==n?void 0:n.rwg})),UC.reportToGlobalTracing(["meeting_connection_details"])}})))});const GC=y_.getInstance(),zC={options:void 0,isLaplaceInitialized:!1},KC=zr({[`${Im}`]:ev(((e,t)=>{let{payload:r}=t;e.options=r})),[`${Am}`]:ev(((e,t)=>{let{payload:r}=t;e.isLaplaceInitialized=r})),[`${wm}`]:(e,t)=>{let{options:r}=e,{payload:o}=t;return o?{...zC,options:r}:{...zC}}},zC),qC=Ao($C);var JC=Object.freeze({__proto__:null,handleRecordingEnableEpic:e=>e.pipe(tr(`${ei}`),ye((e=>{const{payload:{recordingEnable:t}}=e;return jf(t)}))),receiveCloudRecordIndication:(e,t)=>wo(e,As).pipe(Ke((e=>{var t,r,o;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.cmrServerStatus)||void 0!==(null===(r=e.payload.body)||void 0===r?void 0:r.disAllowClientStopAutoCmr)||void 0!==(null===(o=e.payload.body)||void 0===o?void 0:o.enableAutomicRecordingCloud)})),Zt(t),Pe((e=>{let[t,r]=e;const{cmrServerStatus:o,disAllowClientStopAutoCmr:n,enableAutomicRecordingCloud:i}=t.payload.body,s=[];return void 0!==o&&(o!==Ra.Init&&(Lc(ka,{cmrServerStatus:o}),r.recording.recordingIsoEnable&&o===Ra.Start&&Lc(Da,{status:Oa.Ask})),s.push(Uf(o))),void 0!==n&&s.push(Bf(!n)),void 0!==i&&s.push(Ff(i)),Oe(s)}))),receiveIsoCloudRecordIndication:e=>wo(e,As).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.bCmrIsoEnble)})),ye((e=>{const{bCmrIsoEnble:t}=e.payload.body;return xf(t)}))),receiveLocalRecordingIndicationEpic:e=>wo(e,Is).pipe(Ke((e=>{const{payload:{body:{update:t}}}=e;return null==t?void 0:t.some((e=>void 0!==e.bLocalRecordStatus))})),Gt((e=>{const{payload:{body:{update:t}}}=e;t.filter((e=>void 0!==e.bLocalRecordStatus)).forEach((e=>{Lc(Pa,{userId:e.id,bLocalRecord:1===e.bLocalRecordStatus})}))})),kt(W)),receiveUserISORecordingStatusEpic:e=>wo(e,Is).pipe(Ke((e=>{const{payload:{body:{update:t}}}=e;return null==t?void 0:t.some((e=>void 0!==e.bAllowISORecord))})),Gt((e=>{const{payload:{body:{update:t}}}=e;t.filter((e=>void 0!==e.bAllowISORecord)).forEach((e=>{Lc(Da,{userId:e.id,status:e.bAllowISORecord?Oa.Accept:Oa.Decline})}))})),kt(W)),receiveIQResponseIndication:e=>wo(e,As).pipe(Ke((e=>{var t;return void 0!==(null===(t=e.payload.body)||void 0===t?void 0:t.SalesRecordingAnalytics)})),ye((e=>{const{SalesRecordingAnalytics:t}=e.payload.body;return Lc(Ma,{isZoomIQ:t}),Hf(t)}))),receiveIQOperationResponse:(e,t)=>wo(e,4319).pipe(Zt(t),Ke((e=>{var t;let[r]=e;return void 0!==(null===(t=r.payload.body)||void 0===t?void 0:t.success)})),Pe((e=>{let[t,r]=e;const o=[],{success:n}=t.payload.body,{recording:{zoomIQChanging:i}}=r;return Lc(Na,{success:n}),n&&o.push(Wf(!i)),Oe(o)})))});const QC={cmrStatus:Ra.Stop,recordingEnable:!1,recordingIsoEnable:!1,allowStopAutoRecording:!1,automaticCloudRecordingEnable:!1,isZoomIQ:!1,zoomIQChanging:!1},ZC=zr({[`${Uf}`]:ev(((e,t)=>{let{payload:r}=t;e.cmrStatus=r})),[`${jf}`]:ev(((e,t)=>{let{payload:r}=t;e.recordingEnable=r})),[`${xf}`]:ev(((e,t)=>{let{payload:r}=t;e.recordingIsoEnable=r})),[`${Bf}`]:ev(((e,t)=>{let{payload:r}=t;e.allowStopAutoRecording=r})),[`${Ff}`]:ev(((e,t)=>{let{payload:r}=t;e.automaticCloudRecordingEnable=r})),[`${Hf}`]:ev(((e,t)=>{let{payload:r}=t;e.isZoomIQ=r})),[`${Wf}`]:ev(((e,t)=>{let{payload:r}=t;e.zoomIQChanging=r})),[`${$f}`]:()=>({...QC})},QC);var YC,XC,eT,tT,rT,oT;const nT=Ws.createAgent();let iT=(YC=sC("recording"),XC=sC("recording"),eT=sC("recording"),tT=sC("recording"),rT=sC("recording"),oT=class extends hC{startRecording(){const e=this[Xw](),{meeting:{bIbDisableRecording:t,recordingEnable:r},recording:{cmrStatus:o}}=e;return t?Promise.reject({type:$d,reason:"Rejected by Information Barrier"}):r?o===Ra.Start?Promise.resolve(""):(nT.recordMeeting(!0,!1),Uc(ka,(e=>e.cmrServerStatus===Ra.Start))):Promise.reject({type:$d,reason:"The account of the meeting disabled the cloud recording"})}pauseRecording(){const e=this[Xw](),{recording:{cmrStatus:t}}=e;return t===Ra.Pause?Promise.resolve(""):t!==Ra.Start?Promise.reject({type:$d,reason:"Recording is not started"}):(nT.recordMeeting(!1,!0),Uc(ka,(e=>e.cmrServerStatus===Ra.Pause)))}stopRecording(){const e=this[Xw](),{recording:{cmrStatus:t}}=e;return t===Ra.Stop?Promise.resolve(""):(nT.recordMeeting(!1,!1),Uc(ka,(e=>e.cmrServerStatus===Ra.Stop)))}accept(){const e=this[Xw](),{recording:{cmrStatus:t,recordingIsoEnable:r}}=e,o=bl(e);return r?t!==Ra.Start&&t!==Ra.Pause?Promise.reject({type:$d,reason:"Recording is not started"}):null!=o&&o.bAllowISORecord?Promise.resolve("You accepted ISO recording"):(nT.allowSelfRecord(!0),Uc(Da,(e=>(null==e?void 0:e.userId)===(null==o?void 0:o.userId)&&(null==e?void 0:e.status)===Oa.Accept))):Promise.reject({type:$d,reason:"ISO Recording is not enabled"})}decline(){const e=this[Xw](),{recording:{cmrStatus:t,recordingIsoEnable:r}}=e,o=bl(e);return r?t!==Ra.Start&&t!==Ra.Pause?Promise.reject({type:$d,reason:"Recording is not started"}):!0===(null==o?void 0:o.bAllowISORecord)?Promise.reject({type:$d,reason:"You had accept ISO recording, cant change it"}):(nT.allowSelfRecord(!1),Promise.resolve("")):Promise.reject({type:$d,reason:"ISO Recording is not enabled"})}getRecordingStatus(){const e=this[Xw](),{recording:{cmrStatus:t}}=e;return t===Ra.Start?Oa.Recording:t===Ra.Pause?Oa.Paused:Oa.Stopped}isRecordingEnabled(){const e=this[Xw](),{recording:{recordingEnable:t}}=e;return t}isAllowedToStopAutoRecording(){const e=this[Xw](),{recording:{allowStopAutoRecording:t}}=e;return t}isAutomaticCloudRecordingEnabled(){const e=this[Xw](),{recording:{automaticCloudRecordingEnable:t}}=e;return t}enableRecordingWithIQ(e){const{[Xw]:t,[eC]:r}=this,o=t(),{recording:{isZoomIQ:n,zoomIQChanging:i},meeting:{meetingOptions:s}}=t();return s.isEnableKiwiRecording?Sl(o)?i?Promise.reject({type:$d,reason:"We are changing, please wait"}):e===n?Promise.reject({type:$d,reason:`You have ${e?"enable":"disable"} Zoom IQ, don't need change`}):(r(Wf(!i)),r(Hf(!n)),nT.enableZoomIQRecord(e),Uc(Na,(e=>null==e?void 0:e.success))):Promise.reject({type:$d,reason:"Only Host or co-host can enable/disable Zoom IQ"}):Promise.reject({type:$d,reason:"You not have zoom IQ license or not enable zoom IQ, please check and retry"})}},Zw(oT.prototype,"startRecording",[nC,oC,YC],Object.getOwnPropertyDescriptor(oT.prototype,"startRecording"),oT.prototype),Zw(oT.prototype,"pauseRecording",[nC,oC,XC],Object.getOwnPropertyDescriptor(oT.prototype,"pauseRecording"),oT.prototype),Zw(oT.prototype,"stopRecording",[nC,oC,eT],Object.getOwnPropertyDescriptor(oT.prototype,"stopRecording"),oT.prototype),Zw(oT.prototype,"accept",[oC,tT],Object.getOwnPropertyDescriptor(oT.prototype,"accept"),oT.prototype),Zw(oT.prototype,"decline",[oC,rT],Object.getOwnPropertyDescriptor(oT.prototype,"decline"),oT.prototype),oT);const sT=Ao(JC);let aT=function(e){return e[e.All=1]="All",e[e.Private=2]="Private",e}({}),uT=function(e){return e.SUCCESS="success",e}({}),dT=function(e){return e.CustomizedKey="__zoom_internal_message_customized_key__@@",e.SpeakerOnly="__zoom_internal_message_speaker_only__@@",e}({});const cT=cv.getInstance(),lT=(e,t,r)=>{const{meeting:{encType:o}}=r,n=t,i=vn(e),s=n?aT.Private:aT.All;return o===hs.AES_GCM?Ss.beginEncrypt({text:i,type:fs.XMPP_CHAT}).then((e=>{cT.sendWebinarMseeage(e,n,s,!0)})):cT.sendWebinarMseeage(i,n,s,!1)};function pT(e,t){const{cmd:{jids:r}}=t;return Object.prototype.hasOwnProperty.call(r,e)?Promise.resolve():jc(ta).pipe(Dt((t=>-1===t.findIndex((t=>Number(t.userId)===e)))),bt(1),ee(he)).toPromise()}function hT(e){const{cmd:{connectionStatus:t}}=e;return t===uT.SUCCESS?Promise.resolve(!0):jc(wa,1).toPromise().then((e=>e===Ui.Connected||Promise.reject({type:$d,reason:"Cannot establish the command channel"})))}function fT(e,t){for(const[r,o]of Object.entries(e))if(o.jid===t)return r}var mT=Object.freeze({__proto__:null,receiveCmdChannelResponseXMPPEpic:(e,t)=>To(e,24577).pipe(Zt(t),ye((e=>{let[t]=e;const{payload:{body:{status:r}}}=t;return r===uT.SUCCESS&&Lc(wa,Ui.Connected),Kf(r)}))),receiveCmdChannelMessageFromXMPPEpic:(e,t)=>To(e,24583).pipe(Zt(t),Pe((e=>{let[t,r]=e;const{meeting:{userId:o,encType:n},cmd:{jids:i}}=r,{payload:{body:{senderName:s,senderJid:a,text:u,type:d,receiver:c,msgid:l,sn:p}}}=t,h=fT(i,c),f=n===hs.AES_GCM,m=fT(i,a),g=(new Date).getTime();let v=Promise.resolve({message:u});return f&&(v=Ss.beginDecrypt({decryptedText:u,type:fs.XMPP_CHAT,zoomId:p})),v.then((e=>{let{message:t}=e;if(d===aT.Private&&Number(h)===o||d===aT.All){const e=gn(t);if(null!=e&&e.startsWith(dT.SpeakerOnly)){const t=e.substring(dT.SpeakerOnly.length),r=1===Number(t);return Zc({userId:Number(m),key:"isSpeakerOnly",value:r})}{var r;const t=m&&(null===(r=i[m])||void 0===r?void 0:r.userGuid);Lc(Aa,{senderId:m,senderName:s,senderGuid:t,text:e,timestamp:g,msgid:l})}}return""}))})),Ke((e=>"object"==typeof e&&null!==e&&void 0!==e.type)),Gt((e=>{const{payload:{userId:t,key:r,value:o}}=e;Lc(Xs,[{userId:t,[`${r}`]:o}])}))),receiveUserJidUpdateFromXMPPEpic:(e,t)=>To(e,24595).pipe(Pe((e=>{const{payload:{body:{action:r,data:o}}}=e,n=[];if([uv.List,uv.Add,uv.update].includes(r)&&o){const{breakoutRoom:e,participants:{attendeesList:r}}=t.value,i=(null==e?void 0:e.currentRoom.status)===gl.InRoom?r.concat(e.mainSessionAttendeeList):r;n.push(Gf({data:o,attendees:i}))}return r===uv.Remove&&o&&n.push(zf(o)),Oe(n)})))}),gT=Object.freeze({__proto__:null,handleIsSpeakerOnlyBroadcastEpic:(e,t)=>e.pipe(tr(`${cp}`),Ut((e=>{const{payload:{speakerOnly:r}}=e,o=bl(t.value);return(void 0!==(null==o?void 0:o.audio)?Oe(Promise.resolve(o.audio)):jc(Zs).pipe(Ke((e=>void 0!==e.audio)),bt(1))).pipe(Gt((()=>{hT(t.value).then((()=>{lT(`${dT.SpeakerOnly}${r?1:0}`,"",t.value)}))})),kt(W))}))),handleSpeakerOnlyPushEpic:(e,t)=>wo(e,Is).pipe(Ke((e=>{const{payload:{body:r}}=e;return!!r.add&&!!t.value.audio.customizeAudioOption.speakerOnly})),ee(he),Gt((async e=>{const{payload:{body:{add:r}}}=e,o=t.value,{meeting:{userId:n}}=o;for(let e=0;e{lT(`${dT.SpeakerOnly}1`,e[o].jid,t.value)}),Math.floor(Math.random()*Math.log10(r.length)*1e3))}}})),kt(W))});const vT={connectionStatus:"initial",jids:{}},yT=zr({[`${qf}`]:()=>({...vT}),[`${Gf}`]:ev(((e,t)=>{let{payload:r}=t;const{data:o,attendees:n}=r;o.forEach((t=>{const{jid:r,node:o}=t;if(!e.jids[o]||e.jids[o].jid!==r){const t=n.find((e=>e.userId===Number(o)));e.jids[o]={jid:r,userGuid:null==t?void 0:t.userGUID}}}))})),[`${zf}`]:ev(((e,t)=>{let{payload:r}=t;r.forEach((t=>{const{jid:r}=t,o=fT(e.jids,r);o&&delete e.jids[o]}))})),[`${Kf}`]:ev(((e,t)=>{let{payload:r}=t;e.connectionStatus=r}))},vT);var bT;let ST=(bT=class extends hC{send(e,t){if(!e)return Promise.reject({type:Jd,reason:"Text is empty"});if("string"!=typeof e)return Promise.reject({type:Jd,reason:"Text is not a string"});if(e.length>512)return Promise.reject({type:Jd,reason:"Text exceeds the max length(512)."});const{[Xw]:r}=this,o=r(),{socket:{xmppSocketStatus:n},meeting:{userId:i}}=o;return n!==Rl.Connected?Promise.reject({type:qd,reason:"Command channel is not ready"}):hT(o).then((()=>t?-1!==Al(r()).findIndex((e=>e.userId===t))?pT(t,o).then((()=>{const{cmd:{jids:o}}=r();return o[t]?(lT(e,o[t].jid,r()),{timestamp:(new Date).getTime(),text:e,receiverId:t,senderId:i}):Promise.reject({type:Gd})})):Promise.reject({type:Jd,reason:"Cannot find the user"}):(lT(e,"",o),{timestamp:(new Date).getTime(),text:e,receiverId:0,senderId:i})))}getJids(){const{[Xw]:e}=this,t=e(),{cmd:{jids:r}}=t;return r}},Zw(bT.prototype,"send",[oC],Object.getOwnPropertyDescriptor(bT.prototype,"send"),bT.prototype),bT);const _T=Ao(mT,gT),ET=(e,t,r,o)=>{const{getState:n,dispatch:i}=r,s=n(),{participants:{attendeesList:a},audio:{localShareAudioUserMutedList:u},share:{isReceiveSharingFromMainSession:d},breakoutRoom:c}=s,l=(d?null==c?void 0:c.mainSessionAttendeeList:a).find((t=>t.userId==e));if(l){if(l.bShareAudioOn){const r=u.find((t=>t.userId===e));return r&&r.muted===!t&&i(gE(o,e,t,s)),Promise.resolve("")}return Promise.reject({type:$d,reason:`Cannot ${t?"mute":"unmute"} share audio when the user's share audio is not enable.`})}return Promise.reject({type:Jd,reason:"Cannot find the user"})},IT=(e,t)=>{const{store:{getState:r},rwgAgent:o}=e,{share:{sharePrivilege:n}}=r();return n===t?Promise.resolve(""):Object.values(za).includes(t)?(o.lockSharing(t),Uc(ua,(e=>e.lockShare===t))):Promise.reject({type:Jd})},AT=rl([Al],(e=>e.filter((e=>e.bVideoOn)))),wT=rl([AT],(e=>e.filter((e=>(e.caps&N_)===N_))));var CT,TT,OT,RT,kT,DT,PT,MT,NT,LT,VT,UT,jT,xT,BT,FT,HT,WT,$T,GT,zT,KT,qT,JT,QT,ZT,YT,XT,eO,tO,rO,oO,nO,iO,sO,aO,uO,dO,cO,lO,pO,hO,fO,mO,gO,vO,yO,bO,SO,_O,EO,IO,AO,wO,CO,TO,OO,RO,kO,DO,PO;const MO=lC("Audio"),NO=lC("Video"),LO=lC("Sharing"),VO=pC(HTMLCanvasElement,0),UO=pC(HTMLCanvasElement,0,["id"]);let jO=(CT=sC("audio"),TT=sC("audio"),OT=sC("audio"),RT=sC("audio"),kT=sC("audio"),DT=lC("Audio",[1,2,3]),PT=sC("audio"),MT=lC("Audio",[1,2]),NT=sC("audio"),LT=sC("audio"),VT=sC("audio"),UT=sC("audio"),jT=sC("share"),xT=sC("audio"),BT=sC("share"),FT=sC("audio"),HT=sC("audio"),WT=sC("audio"),$T=sC("audio"),GT=sC("video"),zT=sC("video"),KT=sC("video"),qT=sC("video"),JT=sC("video"),QT=sC("video"),ZT=sC("video"),YT=sC("video"),XT=sC("video"),eO=sC("video"),tO=sC("video"),rO=sC("video"),oO=sC("video"),nO=sC("video"),iO=sC("video"),sO=sC("video"),aO=sC("video"),uO=sC("video"),dO=sC("video"),cO=sC("video"),lO=sC("video"),pO=sC("video"),hO=sC("video"),fO=sC("video"),mO=sC("share"),gO=sC("share"),vO=sC("share"),yO=sC("share"),bO=sC("share"),SO=sC("share"),_O=sC("share"),EO=sC("share"),IO=aC("isShareOptionLocked"),AO=aC("isShareOptionLocked"),wO=sC("share"),CO=sC("share"),TO=sC("share"),OO=sC("share"),RO=sC("share"),kO=sC("share"),DO=sC("share"),PO=class extends hC{constructor(e){super(e),this[Yw].dispatch(co()),this[rC]={store:e,mediaAgent:E_(Xm(Js.getInstance())),rwgAgent:Ws.createAgent()}}startAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),{speakerOnly:a,autoStartAudioInSafari:u}=t||{},d=bl(s);if((null==d?void 0:d.audio)===yu.Computer)return Promise.resolve();if((null==d?void 0:d.audio)===yu.Phone)return Promise.reject({type:$d,reason:"joined by phone"});{const{audio:{isAllowToTalk:e,isComputerAudioLoading:c,canPlayAudio:l,customizeAudioOption:{speakerOnly:p}},media:{audioDecodeStatus:h,audioEncodeStatus:f}}=s;if(c)return Promise.reject({type:$d,reason:"Computer audio has been loading, please wait."});if(AE()||!0!==(null==t?void 0:t.backgroundNoiseSuppression)||(console.warn("Background noise suppression requires SharedArrayBuffer and is only supported on Chromium-like browser"),Object.assign(t,{backgroundNoiseSuppression:void 0})),wE()||!0!==(null==t?void 0:t.syncButtonsOnHeadset)||(console.warn("Sync buttons on headset is not supported on the current platform"),Object.assign(t,{syncButtonsOnHeadset:void 0})),null!=t&&t.mediaFile&&!Js.isSupportMediaPlaybackAsVideoInput()&&(console.warn("Cannot use media file as audio input due to the browser limitation"),Object.assign(t,{mediaFile:void 0})),o(cp(null!=t?t:{})),!!p!=!!a&&o(Zc({userId:s.meeting.userId,key:"isSpeakerOnly",value:!!a})),!d)return Promise.reject({type:$d,reason:"Please call `startAudio` method after the `join` has been resolved"});{const t=pl(d.userRole)&&!e||a,{encodeInitStatus:c,decodeInitStatus:p}=CE(s,d,a);if(_E()&&("success"!==p||"success"!==c))return Promise.reject({type:$d,reason:"It is required to wait for the audio encoding and decoding to be ready before calling `startAudio` method"});o(Jl(!0)),Gm("audio",c,p).subscribe((s=>{let[a,c]=s;if(a&&c){let s=l||(_E()||Zi())&&!u?Promise.resolve():function(){const e=URL.createObjectURL(Wa),t=new Audio(e);return t.muted=!1,Zi()?new Promise(((r,o)=>{var n;t.addEventListener("canplaythrough",(()=>{t.play().then((()=>{r(!0)})).catch((e=>{o(e)})).finally((()=>{URL.revokeObjectURL(e)}))})),null===(n=t.load)||void 0===n||n.call(t)})):Promise.race([t.play(),new Promise(((e,t)=>{window.setTimeout((()=>{t()}),3e3)}))]).finally((()=>{URL.revokeObjectURL(e)}))}();void 0===s&&(s=Promise.resolve()),s.then((()=>{const s=r(),{audio:{isSharingAudio:a}}=s;n.joinOrLeaveVoip(!0),a&&!IE()||vE(i,s,!t),pl(d.userRole)&&e&&o(Ql(!0)),o(Kl(!0))})).catch((()=>{o(Kl(!1)),o(Jl(!1))}))}else o(Jl(!1))}))}return"failed"===f||"failed"===h?(o(Jl(!1)),Promise.reject({type:Gd,reason:"audio encode or decode error"})):new Promise(((e,t)=>{Qe(jc(_d.JoinComputerAudio.success,1),Ge(..._d.JoinComputerAudio.fail.map((e=>jc(e,1).pipe(Pe((()=>Z({type:Kd,reason:e}))))))),Xe(45e3).pipe(Pe((()=>Z({type:zd}))))).subscribe((()=>{o(Jl(!1)),e("")}),(e=>{(e.type===Kd||r().audio.canPlayAudio)&&n.joinOrLeaveVoip(!1),o(Jl(!1)),t(e)}))}))}})(this[rC],e)}stopAudio(){return(async e=>{const{store:{getState:t,dispatch:r},mediaAgent:o,rwgAgent:n}=e,i=t(),{audio:{isComputerAudioLoading:s,isShareAudioEnabled:a,isSharingAudio:u,isUsingMediaPlayback:d,customizeAudioOption:{speakerOnly:c}}}=i,l=bl(i);if(s)return Promise.reject({type:$d,reason:"Computer audio has not finished joining, please wait."});if(a){if(u&&!IE())return Promise.reject({type:$d,reason:"Cannot stop audio during sharing with audio"});r(ep(void 0)),r(Zl(void 0))}return(null==l?void 0:l.audio)===yu.Computer?(await o.leaveComputerAudio(),n.joinOrLeaveVoip(!1),c&&r(Zc({userId:i.meeting.userId,key:"isSpeakerOnly",value:void 0})),d&&mE.getInstance().stopAudioElement(),r(Hl(0)),Uc(od)):Promise.resolve("")})(this[rC])}muteAudio(e){return((e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),a=bl(s);if(null==t||t===(null==a?void 0:a.userId))return""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio)?Promise.reject({type:$d,reason:"no audio joined"}):!0===(null==a?void 0:a.muted)?Promise.resolve(""):(o(Ul(!0)),n.mute(a.userId,!0),s.audio.isShareAudioEnabled&&!IE()&&(o(Zl(!0)),i.muteAudio()),Uc(nd).then((()=>"")));if(Sl(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,o=e.concat(r).find((e=>e.userId===t));return o?""===o.audio||null===o?Promise.reject({type:$d,reason:"no audio joined"}):!1===o.muted?(n.mute(t,!0),Uc(sd,(e=>e.id===t&&1==e.muted))):Promise.resolve(""):Promise.reject({type:Jd,reason:"no matching user"})}return Promise.reject({type:Kd})})(this[rC],e)}unmuteAudio(e){return(async(e,t)=>{const{store:{getState:r,dispatch:o},rwgAgent:n,mediaAgent:i}=e,s=r(),a=bl(s);if(void 0===t||t===(null==a?void 0:a.userId)){if(""===(null==a?void 0:a.audio)||null===(null==a?void 0:a.audio))return Promise.reject({type:$d,reason:"no audio joined"});if(!1===(null==a?void 0:a.muted))return Promise.resolve("");if(s.audio.isShareAudioEnabled&&!IE()){if(s.audio.isSharingAudio)return Promise.reject({type:$d,reason:"Cannot unmute audio during sharing with audio"});o(Zl(!1))}if(o(Ul(!0)),s.audio.bCanUnmute||null!=a&&a.isHost||null!=a&&a.bCoHost){if(pl(a.userRole)){const{audio:{isAllowToTalk:e,isAllowToTalkAttendeeConnected:t}}=s;e?t||(await i.leaveComputerAudio(),await vE(i,s,!0),o(Ql(!0))):Promise.reject({type:$d,reason:"Webinar attendee cannot unmute self audio."})}return n.mute(a.userId,!1),i.unmuteAudio(),Uc(id).then((()=>""))}return Promise.reject({type:Kd,reason:"host not allow unmute themselves"})}if(Sl(s)){const{participants:{allowTalkAttendeesList:e,attendeesList:r}}=s,o=e.concat(r).find((e=>e.userId===t));return o?""===o.audio||null===o?Promise.reject({type:$d,reason:"no audio joined"}):(!0===o.muted&&n.mute(t,!1),Promise.resolve("")):Promise.reject({type:Jd,reason:"no matching user"})}return Promise.reject({type:Kd})})(this[rC],e)}dialOut(e,t,r,o){return((e,t,r,o,n)=>{const{store:{getState:i,dispatch:s},rwgAgent:a}=e,u=i(),{meeting:{callOutCountry:d,isSupportCallOut:c}}=u;if(c&&Array.isArray(d)&&d.findIndex((e=>e.code===t))>-1){const{seq:e}=a.audioDialout(t+r,o,!(null==n||!n.callMe),!(null==n||!n.pressingOne),!(null==n||!n.greeting));return s(Ml({sequence:e,phoneNumber:t+r})),Vc(_d.JoinAudioByCallMe)}return Promise.reject({type:Jd,reason:"no matching country code"})})(this[rC],e,t,r,o)}cancelDialOut(e,t,r){return((e,t,r,o)=>{const{rwgAgent:n}=e;return n.audioCancelDialout(t+r,!(null==o||!o.callMe)),Vc(_d.cancelDialOut)})(this[rC],e,t,r)}hangup(){return(e=>{const{store:{getState:t},rwgAgent:r}=e,o=t(),n=bl(o);return(null==n?void 0:n.audio)===yu.Phone&&null!==n.userId?(r.audioDrop(n.userId),Vc(_d.hangup)):Promise.reject({type:$d,reason:"not joined audio by phone"})})(this[rC])}switchMicrophone(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,i=r(),{audio:{microphoneDevicesList:s,activeMicrophone:a,mediaPlaybackFile:u,isUsingMediaPlayback:d}}=i,c=s.find((e=>e.deviceId===t));if("default"===t||"string"!=typeof t||c){const e=bl(i);if("string"==typeof t)t!==a&&(n.changeMicrophone(t,null==c?void 0:c.label,!(null==e||!e.muted)),o(Gl(t)),o(hp(void 0)),mE.getInstance().stopAudioElement());else if(t&&(!d||(null==u?void 0:u.url)!==t.url)){const r=mE.getInstance();r.setAudioElement(t).then((()=>{n.changeMicrophone(r.audioElement,void 0,!(null==e||!e.muted)),o(hp(t))}))}return Promise.resolve("")}return Promise.reject({type:gd})})(this[rC],e)}switchSpeaker(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,{audio:{speakerDevicesList:i,activeSpeaker:s}}=r();return"default"!==t&&-1==i.findIndex((e=>e.deviceId===t))?Promise.reject({type:gd}):(t!==s&&(n.changeSpeaker(t),o(zl(t))),Promise.resolve(""))})(this[rC],e)}muteShareAudio(e){return((e,t)=>{const{mediaAgent:r,rwgAgent:o,store:{getState:n,dispatch:i}}=e,s=n(),{meeting:{userId:a}}=s;if(t&&t!==a)return ET(t,!0,e.store,r);{const{audio:{isSharingAudio:e,isShareAudioEnabled:t,isShareAudioMuted:n}}=s;if(!t)return Promise.reject({type:$d,reason:"Cannot mute sharing audio when sharing audio is not enable"});if(n)return Promise.resolve("");{o.muteShareAudio(!0);let t=Promise.resolve();var u;return e&&(t=null===(u=r.leaveSharingAudio(!0))||void 0===u?void 0:u.then((()=>{if(!IE())return yE(r,o,s).then((e=>{e.forEach((e=>i(e)))}))}))),gE(r,a,!0,s),Promise.all([Uc({event:Zs,operations:[Ke((e=>void 0!==e.bShareAudioOn)),bt(1)]},(e=>!1===e.bShareAudioOn)),t]).then((()=>(i(rp(!0)),e&&(i(op(!1)),Lc(yd,{state:"off"})),"")))}}})(this[rC],e)}unmuteShareAudio(e){return((e,t)=>{const{mediaAgent:r,rwgAgent:o,store:{getState:n,dispatch:i}}=e,s=n(),{meeting:{userId:a}}=s;if(t&&t!==a)return ET(t,!1,e.store,r);{const{audio:{isSharingAudio:e,isShareAudioEnabled:t,isShareAudioMuted:n},share:{status:u}}=s;if(!t)return Promise.reject({type:$d,reason:"Cannot unmute sharing audio when sharing audio is not enable"});if(!1===n)return Promise.resolve("");{o.muteShareAudio(!1);let t=Promise.resolve();return!1===e&&u===Ka.Sharing&&(t=SE(r,o,s).then((e=>{e.forEach((e=>i(e)))}))),gE(r,a,!1,s),Promise.all([Uc({event:Zs,operations:[Ke((e=>void 0!==e.bShareAudioOn)),bt(1)]},(e=>!0===e.bShareAudioOn)),t]).then((()=>(i(rp(!1)),!1===e&&u===Ka.Sharing&&(i(op(!0)),Lc(yd,{state:"on"})),"")))}}})(this[rC],e)}subscribeAudioStatisticData(e){return(async(e,t)=>{const{mediaAgent:r,store:{getState:o}}=e,n=o(),i=bl(n),s=!t||t.decode,a=!t||t.encode;if(!i)return Promise.reject({type:$d,reason:"Call this function after the 'join' method resolved."});{const{encodeInitStatus:e,decodeInitStatus:t}=CE(n,i);Gm("audio",e,t).subscribe((e=>{let[t,o]=e;t&&o&&(s&&r.subscribeToQos([Ks.AudioDecode],ou),a&&r.subscribeToQos([Ks.AudioEncode],ou))}))}return""})(this[rC],e)}unsubscribeAudioStatisticData(e){return(async(e,t)=>{const{mediaAgent:r,store:{dispatch:o}}=e,n=!t||t.decode,i=!t||t.encode;return n&&(r.unsubscribeFromQos([Ks.AudioDecode]),o(np(du))),i&&(r.unsubscribeFromQos([Ks.AudioEncode]),o(ip(du))),null})(this[rC],e)}enableBackgroundNoiseSuppression(e){return((e,t)=>{const{mediaAgent:r,store:{getState:o,dispatch:n}}=e,{audio:{isBackgroundNoiseSuppression:i}}=o();return t===!!i||(t&&!AE()?console.warn("Background noise suppression requires SharedArrayBuffer and is only supported on Chromium-like browser"):(r.enableAudioDenoise(t),n(lp(t)))),Promise.resolve("")})(this[rC],e)}enableSyncButtonsOnHeadset(e){return((e,t)=>{const{mediaAgent:r,store:{getState:o,dispatch:n}}=e,i=o(),{audio:{isHIDEnabled:s,microphoneDevicesList:a,activeMicrophone:u}}=i;if(t===!!s)return Promise.resolve("");{const e=bl(i);var d;return e?(t&&!wE()?console.warn("Sync buttons on headset is not supported on the current platform"):(r.enableSyncButtonsOnHeadset(t,null===(d=a.find((e=>e.deviceId===u)))||void 0===d?void 0:d.label,e.muted),n(pp(t))),Promise.resolve("")):Promise.reject({type:$d,reason:"Please call `enableSyncButtonsOnHeadset` method after the `join` has been resolved"})}})(this[rC],e)}getMicList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.microphoneDevicesList]:[]})(this[rC])}getSpeakerList(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?[...r.audio.speakerDevicesList]:[]})(this[rC])}getAudioState(e){return((e,t)=>{let{store:{getState:r}}=e;const o=r(),{meeting:{isWebinar:n}}=o;let i=null;return null==t?i=bl(o):(i=o.participants.attendeesList.find((e=>e.userId===t)),n&&!i&&(i=o.participants.xmppAttendeeList.find((e=>e.userId===t)))),i?i.audio:null})(this[rC],e)}isAudioMuted(e){return((e,t)=>{let{store:{getState:r}}=e;const o=r(),{meeting:{isWebinar:n}}=o;let i=null;return void 0===t?i=bl(o):(i=o.participants.attendeesList.find((e=>e.userId===t)),n&&!i&&(i=o.participants.xmppAttendeeList.find((e=>e.userId===t)))),!!i&&!!i.muted})(this[rC],e)}getActiveMicrophone(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeMicrophone:null})(this[rC])}getActiveSpeaker(){return(e=>{let{store:{getState:t}}=e;const r=t();return r.audio?r.audio.activeSpeaker:null})(this[rC])}isSupportCallOut(){return(e=>{let{store:{getState:t}}=e;const{meeting:{isSupportCallOut:r,callOutCountry:o}}=t();return r&&Array.isArray(o)&&(null==o?void 0:o.length)>0})(this[rC])}getDialOutStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:r}=t();return null==r?void 0:r.dialout[r.dialout.length-1].returnCode})(this[rC])}getDialOutCountries(){return(e=>{let{store:{getState:t}}=e;const{meeting:{callOutCountry:r}}=t();return Array.isArray(r)?r:[]})(this[rC])}getShareAudioStatus(){return(e=>{let{store:{getState:t}}=e;const{audio:{isShareAudioEnabled:r,isShareAudioMuted:o,isSharingAudio:n}}=t();return{isShareAudioEnabled:r,isShareAudioMuted:o,isSharingAudio:n}})(this[rC])}isOthersShareAudioMutedLocally(e){return((e,t)=>{var r;let{store:{getState:o}}=e;const{audio:{localShareAudioUserMutedList:n}}=o();return null===(r=n.find((e=>e.userId===t)))||void 0===r?void 0:r.muted})(this[rC],e)}getAudioStatisticData(){return(e=>{let{store:{getState:t}}=e;const{audio:{statistic:r}}=t();return{...r}})(this[rC])}getDialInInfo(){return(e=>{let{store:{getState:t}}=e;const{meeting:{meetingNumber:r,tollNumbers:o,participantID:n,h323Password:i}}=t();return void 0===o?null:{meetingId:r,participantId:n,password:i||"",tollNumbers:o.map((e=>({...e})))}})(this[rC])}isSupportMicrophoneAndShareAudioSimultaneously(){return IE()}startVideo(e){return((e,t)=>{const{store:{getState:r,dispatch:o},mediaAgent:n}=e,i=r(),{media:{videoDecodeStatus:s,videoEncodeStatus:a,enforceVirtualBackground:u},video:{isCaptureCameraLoading:d,isCurrentUserStartedVideo:c,isVideoMuted:l}}=i;return c?Promise.reject({type:$d,reason:"Video is started"}):d?Promise.reject({type:$d,reason:"Camera is starting,please wait."}):l&&!Sl(i)?Promise.reject({type:$d,reason:"Video is muted by the host"}):!mw(u)||(null==t?void 0:t.videoElement)instanceof HTMLVideoElement?!eg(u)&&null!=t&&t.virtualBackground?Promise.reject({type:Jd,reason:"Virtual background only compatible with Chrome and Edge with SharedArrayBuffer enabled."}):(o(Qp(!0)),Gm("video",a,s).subscribe((e=>{let[i]=e;if(i){const e=r(),{video:{activeCamera:i,isSupportHDVideo:s,virtualBackground:{imageSrc:a},mask:{imageSrc:u}}}=e,{cameraId:d=i,captureWidth:c=0,captureHeight:l=0,mirrored:p,hd:h,virtualBackground:f,mask:m}=t||{};p&&n.mirrorVideo(p),h&&(console.log("HD support is currently limited, and comes with a number of restrictions and limitations. Please visit https://developers.zoom.us/docs/video-sdk/web/video/#720p-video for more details"),s&&Js.isCompatibleHardwareForEncode()?Js.isSupportVideoEncodeHardwareAcceleration().then((e=>{e?(n.enableHardwareAccelerationForVideoEncode(!0),o(fh({encode:e}))):console.warn("Cannot capture HD video due to hardware limitation")})):console.warn("Cannot capture HD video due to either account restriction and/or hardware limitation"));const g=f||void 0===f&&!!a&&void 0===m,v=m||void 0===m&&!!u;let y=Promise.resolve({});if(g){const t=f||{imageUrl:void 0,cropped:void 0};y=Cw({...t,captureWidth:c,captureHeight:l,cameraId:d,hd:h},n,e).then((()=>t))}else if(v){const t=m||{imageUrl:void 0,cropped:void 0,clip:void 0,rootWidth:void 0,rootHeight:void 0};t.rootWidth||Object.assign(t,{rootWidth:1280}),t.rootHeight||Object.assign(t,{rootHeight:720}),y=Tw({...t,captureWidth:c,captureHeight:l,cameraId:d,hd:h},n,e).then((()=>t))}null!=t&&t.mediaFile&&!Js.isSupportMediaPlaybackAsVideoInput()&&(console.warn("Cannot use media file as video input due to the browser limitation."),Object.assign(t,{mediaFile:void 0})),y.then((r=>{cw(n,e,t).forEach((e=>{o(e)})),g?o(lh(r)):v&&o(Oh(r))})).catch((e=>{o(Qp(!1)),Lc(Ru,{reason:e})}))}else o(Qp(!1))})),Vc(Qu.startCaptureVideo).then((()=>{o(Zp(!1)),o(Kp(!1))})).finally((()=>{o(Qp(!1))}))):Promise.reject({type:Jd,reason:"You must pass a