UNPKG

@zoom/videosdk

Version:
1 lines 118 kB
(()=>{var e={2601:(e,t,r)=>{e.exports=r(4444)},7201:(e,t,r)=>{r(3042)},3565:(e,t,r)=>{"use strict";var n=r(1960);e.exports=n},1829:(e,t,r)=>{"use strict";var n=r(2222);e.exports=n},2671:(e,t,r)=>{"use strict";r(2344),e.exports=r(5951)},6823:(e,t,r)=>{"use strict";var n=r(8280),o=r(2017),s=String.prototype;e.exports=function(e){var t=e.replaceAll;return"string"==typeof e||e===s||n(s,e)&&t===s.replaceAll?o:t}},2017:(e,t,r)=>{"use strict";r(1398),r(1995),r(929);var n=r(1747);e.exports=n("String","replaceAll")},4444:(e,t,r)=>{"use strict";e.exports=r(214)},3042:(e,t,r)=>{"use strict";r(9604)},214:(e,t,r)=>{"use strict";r(397);var n=r(3565);e.exports=n},9604:(e,t,r)=>{"use strict";r(6038);var n=r(1829);e.exports=n},2159:(e,t,r)=>{"use strict";var n=r(2250),o=r(4640),s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(o(e)+" is not a function")}},6624:(e,t,r)=>{"use strict";var n=r(6285),o=String,s=TypeError;e.exports=function(e){if(n(e))return e;throw new s(o(e)+" is not an object")}},5807:(e,t,r)=>{"use strict";var n=r(1907),o=n({}.toString),s=n("".slice);e.exports=function(e){return s(o(e),8,-1)}},3948:(e,t,r)=>{"use strict";var n=r(2623),o=r(2250),s=r(5807),i=r(6264)("toStringTag"),a=Object,u="Arguments"===s(function(){return arguments}());e.exports=n?s:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=a(e),i))?r:u?s(t):"Object"===(n=s(t))&&o(t.callee)?"Arguments":n}},1626:(e,t,r)=>{"use strict";var n=r(9447),o=r(4284),s=r(5817);e.exports=n?function(e,t,r){return o.f(e,t,s(1,r))}:function(e,t,r){return e[t]=r,e}},5817:e=>{"use strict";e.exports=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}}},2532:(e,t,r)=>{"use strict";var n=r(5951),o=Object.defineProperty;e.exports=function(e,t){try{o(n,e,{value:t,configurable:!0,writable:!0})}catch(r){n[e]=t}return t}},9447:(e,t,r)=>{"use strict";var n=r(8828);e.exports=!n((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(e,t,r)=>{"use strict";var n=r(5951),o=r(6285),s=n.document,i=o(s)&&o(s.createElement);e.exports=function(e){return i?s.createElement(e):{}}},6794:(e,t,r)=>{"use strict";var n=r(5951).navigator,o=n&&n.userAgent;e.exports=o?String(o):""},798:(e,t,r)=>{"use strict";var n,o,s=r(5951),i=r(6794),a=s.process,u=s.Deno,c=a&&a.versions||u&&u.version,l=c&&c.v8;l&&(o=(n=l.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&i&&(!(n=i.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=i.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},1091:(e,t,r)=>{"use strict";var n=r(5951),o=r(6024),s=r(2361),i=r(2250),a=r(3846).f,u=r(7463),c=r(2046),l=r(8311),f=r(1626),h=r(9724);r(6128);var d=function(e){var t=function(r,n,s){if(this instanceof t){switch(arguments.length){case 0:return new e;case 1:return new e(r);case 2:return new e(r,n)}return new e(r,n,s)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var r,o,_,p,m,g,y,v,E,w=e.target,b=e.global,S=e.stat,A=e.proto,k=b?n:S?n[w]:n[w]&&n[w].prototype,D=b?c:c[w]||f(c,w,{})[w],T=D.prototype;for(p in t)o=!(r=u(b?p:w+(S?".":"#")+p,e.forced))&&k&&h(k,p),g=D[p],o&&(y=e.dontCallGetSet?(E=a(k,p))&&E.value:k[p]),m=o&&y?y:t[p],(r||A||typeof g!=typeof m)&&(v=e.bind&&o?l(m,n):e.wrap&&o?d(m):A&&i(m)?s(m):m,(e.sham||m&&m.sham||g&&g.sham)&&f(v,"sham",!0),f(D,p,v),A&&(h(c,_=w+"Prototype")||f(c,_,{}),f(c[_],p,m),e.real&&T&&(r||!T[p])&&f(T,p,m)))}},8828:e=>{"use strict";e.exports=function(e){try{return!!e()}catch(e){return!0}}},6024:(e,t,r)=>{"use strict";var n=r(1505),o=Function.prototype,s=o.apply,i=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?i.bind(s):function(){return i.apply(s,arguments)})},8311:(e,t,r)=>{"use strict";var n=r(2361),o=r(2159),s=r(1505),i=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:s?i(e,t):function(){return e.apply(t,arguments)}}},1505:(e,t,r)=>{"use strict";var n=r(8828);e.exports=!n((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))},3930:(e,t,r)=>{"use strict";var n=r(1505),o=Function.prototype.call;e.exports=n?o.bind(o):function(){return o.apply(o,arguments)}},2361:(e,t,r)=>{"use strict";var n=r(5807),o=r(1907);e.exports=function(e){if("Function"===n(e))return o(e)}},1907:(e,t,r)=>{"use strict";var n=r(1505),o=Function.prototype,s=o.call,i=n&&o.bind.bind(s,s);e.exports=n?i:function(e){return function(){return s.apply(e,arguments)}}},1747:(e,t,r)=>{"use strict";var n=r(5951),o=r(2046);e.exports=function(e,t){var r=o[e+"Prototype"],s=r&&r[t];if(s)return s;var i=n[e],a=i&&i.prototype;return a&&a[t]}},5582:(e,t,r)=>{"use strict";var n=r(2046),o=r(5951),s=r(2250),i=function(e){return s(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?i(n[e])||i(o[e]):n[e]&&n[e][t]||o[e]&&o[e][t]}},9367:(e,t,r)=>{"use strict";var n=r(2159),o=r(7136);e.exports=function(e,t){var r=e[t];return o(r)?void 0:n(r)}},7703:(e,t,r)=>{"use strict";var n=r(1907),o=r(9298),s=Math.floor,i=n("".charAt),a=n("".replace),u=n("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,l=/\$([$&'`]|\d{1,2})/g;e.exports=function(e,t,r,n,f,h){var d=r+e.length,_=n.length,p=l;return void 0!==f&&(f=o(f),p=c),a(h,p,(function(o,a){var c;switch(i(a,0)){case"$":return"$";case"&":return e;case"`":return u(t,0,r);case"'":return u(t,d);case"<":c=f[u(a,1,-1)];break;default:var l=+a;if(0===l)return o;if(l>_){var h=s(l/10);return 0===h?o:h<=_?void 0===n[h-1]?i(a,1):n[h-1]+i(a,1):o}c=n[l-1]}return void 0===c?"":c}))}},5951:function(e,t,r){"use strict";var n=function(e){return e&&e.Math===Math&&e};e.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof r.g&&r.g)||n("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(e,t,r)=>{"use strict";var n=r(1907),o=r(9298),s=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return s(o(e),t)}},3648:(e,t,r)=>{"use strict";var n=r(9447),o=r(8828),s=r(9552);e.exports=!n&&!o((function(){return 7!==Object.defineProperty(s("div"),"a",{get:function(){return 7}}).a}))},6946:(e,t,r)=>{"use strict";var n=r(1907),o=r(8828),s=r(5807),i=Object,a=n("".split);e.exports=o((function(){return!i("z").propertyIsEnumerable(0)}))?function(e){return"String"===s(e)?a(e,""):i(e)}:i},2250:e=>{"use strict";var t="object"==typeof document&&document.all;e.exports=void 0===t&&void 0!==t?function(e){return"function"==typeof e||e===t}:function(e){return"function"==typeof e}},7463:(e,t,r)=>{"use strict";var n=r(8828),o=r(2250),s=/#|\.prototype\./,i=function(e,t){var r=u[a(e)];return r===l||r!==c&&(o(t)?n(t):!!t)},a=i.normalize=function(e){return String(e).replace(s,".").toLowerCase()},u=i.data={},c=i.NATIVE="N",l=i.POLYFILL="P";e.exports=i},7136:e=>{"use strict";e.exports=function(e){return null==e}},6285:(e,t,r)=>{"use strict";var n=r(2250);e.exports=function(e){return"object"==typeof e?null!==e:n(e)}},7376:e=>{"use strict";e.exports=!0},2087:(e,t,r)=>{"use strict";var n=r(6285),o=r(5807),s=r(6264)("match");e.exports=function(e){var t;return n(e)&&(void 0!==(t=e[s])?!!t:"RegExp"===o(e))}},5594:(e,t,r)=>{"use strict";var n=r(5582),o=r(2250),s=r(8280),i=r(1175),a=Object;e.exports=i?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&s(t.prototype,a(e))}},4284:(e,t,r)=>{"use strict";var n=r(9447),o=r(3648),s=r(8661),i=r(6624),a=r(470),u=TypeError,c=Object.defineProperty,l=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",d="writable";t.f=n?s?function(e,t,r){if(i(e),t=a(t),i(r),"function"==typeof e&&"prototype"===t&&"value"in r&&d in r&&!r[d]){var n=l(e,t);n&&n[d]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return c(e,t,r)}:c:function(e,t,r){if(i(e),t=a(t),i(r),o)try{return c(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new u("Accessors not supported");return"value"in r&&(e[t]=r.value),e}},3846:(e,t,r)=>{"use strict";var n=r(9447),o=r(3930),s=r(2574),i=r(5817),a=r(7374),u=r(470),c=r(9724),l=r(3648),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=a(e),t=u(t),l)try{return f(e,t)}catch(e){}if(c(e,t))return i(!o(s.f,e,t),e[t])}},8280:(e,t,r)=>{"use strict";var n=r(1907);e.exports=n({}.isPrototypeOf)},2574:(e,t)=>{"use strict";var r={}.propertyIsEnumerable,n=Object.getOwnPropertyDescriptor,o=n&&!r.call({1:2},1);t.f=o?function(e){var t=n(this,e);return!!t&&t.enumerable}:r},581:(e,t,r)=>{"use strict";var n=r(3930),o=r(2250),s=r(6285),i=TypeError;e.exports=function(e,t){var r,a;if("string"===t&&o(r=e.toString)&&!s(a=n(r,e)))return a;if(o(r=e.valueOf)&&!s(a=n(r,e)))return a;if("string"!==t&&o(r=e.toString)&&!s(a=n(r,e)))return a;throw new i("Can't convert object to primitive value")}},2046:e=>{"use strict";e.exports={}},5606:(e,t,r)=>{"use strict";var n=r(6624);e.exports=function(){var e=n(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t}},663:(e,t,r)=>{"use strict";var n=r(3930),o=r(9724),s=r(8280),i=r(5606),a=RegExp.prototype;e.exports=function(e){var t=e.flags;return void 0!==t||"flags"in a||o(e,"flags")||!s(a,e)?t:n(i,e)}},4239:(e,t,r)=>{"use strict";var n=r(7136),o=TypeError;e.exports=function(e){if(n(e))throw new o("Can't call method on "+e);return e}},6128:(e,t,r)=>{"use strict";var n=r(7376),o=r(5951),s=r(2532),i="__core-js_shared__",a=e.exports=o[i]||s(i,{});(a.versions||(a.versions=[])).push({version:"3.39.0",mode:n?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.39.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:(e,t,r)=>{"use strict";var n=r(6128);e.exports=function(e,t){return n[e]||(n[e]=t||{})}},9846:(e,t,r)=>{"use strict";var n=r(798),o=r(8828),s=r(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!s(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},7374:(e,t,r)=>{"use strict";var n=r(6946),o=r(4239);e.exports=function(e){return n(o(e))}},9298:(e,t,r)=>{"use strict";var n=r(4239),o=Object;e.exports=function(e){return o(n(e))}},6028:(e,t,r)=>{"use strict";var n=r(3930),o=r(6285),s=r(5594),i=r(9367),a=r(581),u=r(6264),c=TypeError,l=u("toPrimitive");e.exports=function(e,t){if(!o(e)||s(e))return e;var r,u=i(e,l);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!o(r)||s(r))return r;throw new c("Can't convert object to primitive value")}return void 0===t&&(t="number"),a(e,t)}},470:(e,t,r)=>{"use strict";var n=r(6028),o=r(5594);e.exports=function(e){var t=n(e,"string");return o(t)?t:t+""}},2623:(e,t,r)=>{"use strict";var n={};n[r(6264)("toStringTag")]="z",e.exports="[object z]"===String(n)},160:(e,t,r)=>{"use strict";var n=r(3948),o=String;e.exports=function(e){if("Symbol"===n(e))throw new TypeError("Cannot convert a Symbol value to a string");return o(e)}},4640:e=>{"use strict";var t=String;e.exports=function(e){try{return t(e)}catch(e){return"Object"}}},6499:(e,t,r)=>{"use strict";var n=r(1907),o=0,s=Math.random(),i=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+i(++o+s,36)}},1175:(e,t,r)=>{"use strict";var n=r(9846);e.exports=n&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(e,t,r)=>{"use strict";var n=r(9447),o=r(8828);e.exports=n&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(e,t,r)=>{"use strict";var n=r(5951),o=r(5816),s=r(9724),i=r(6499),a=r(9846),u=r(1175),c=n.Symbol,l=o("wks"),f=u?c.for||c:c&&c.withoutSetter||i;e.exports=function(e){return s(l,e)||(l[e]=a&&s(c,e)?c[e]:f("Symbol."+e)),l[e]}},2344:(e,t,r)=>{"use strict";var n=r(1091),o=r(5951);n({global:!0,forced:o.globalThis!==o},{globalThis:o})},1398:()=>{},929:(e,t,r)=>{"use strict";var n=r(1091),o=r(3930),s=r(1907),i=r(4239),a=r(2250),u=r(7136),c=r(2087),l=r(160),f=r(9367),h=r(663),d=r(7703),_=r(6264),p=r(7376),m=_("replace"),g=TypeError,y=s("".indexOf),v=s("".replace),E=s("".slice),w=Math.max;n({target:"String",proto:!0},{replaceAll:function(e,t){var r,n,s,_,b,S,A,k,D,T,M=i(this),C=0,P="";if(!u(e)){if((r=c(e))&&(n=l(i(h(e))),!~y(n,"g")))throw new g("`.replaceAll` does not allow non-global regexes");if(s=f(e,m))return o(s,e,M,t);if(p&&r)return v(l(M),e,t)}for(_=l(M),b=l(e),(S=a(t))||(t=l(t)),A=b.length,k=w(1,A),D=y(_,b);-1!==D;)T=S?l(t(b,D,_)):d(b,_,D,[],void 0,t),P+=E(_,C,D)+T,C=D+A,D=D+k>_.length?-1:y(_,b,D+k);return C<_.length&&(P+=E(_,C)),P}})},1995:()=>{},397:(e,t,r)=>{"use strict";r(2344)},6038:(e,t,r)=>{"use strict";r(929)},1960:(e,t,r)=>{"use strict";var n=r(2671);e.exports=n},2222:(e,t,r)=>{"use strict";var n=r(6823);e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={exports:{}};return e[n].call(s.exports,s,s.exports,r),s.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{"use strict";var e=r(2601),t=r.n(e),n=function(e,t){this._BYTES_PER_ELEMENT=t,this.capacity=(e.byteLength-8)/t,this.usableCapacity=this.capacity-1,this.buf=e,this.write_ptr=new Uint32Array(this.buf,0,1),this.read_ptr=new Uint32Array(this.buf,4,1),this.storageUint8s=new Uint8Array(this.buf,8,e.byteLength-8)};n.prototype.available_read=function(){var e=Atomics.load(this.read_ptr,0),t=Atomics.load(this.write_ptr,0);return this._available_read(e,t)},n.prototype._available_read=function(e,t){return(t+this.capacity-e)%this.capacity},n.prototype.dequeue=function(){var e=Atomics.load(this.read_ptr,0);let t=new Uint32Array(this.buf,e*this._BYTES_PER_ELEMENT+8,1);return this.storageUint8s.subarray(e*this._BYTES_PER_ELEMENT+4,e*this._BYTES_PER_ELEMENT+4+t[0])},n.prototype.addReadPtr=function(){var e=Atomics.load(this.read_ptr,0);Atomics.store(this.read_ptr,0,(e+1)%this.capacity)},n.prototype.getReaderPtr=function(){return this.read_ptr[0]},n.prototype.setReaderPtr=function(e){Atomics.store(this.read_ptr,0,e%this.capacity)},n.prototype.get=function(e){let t=e%this.capacity,r=new Uint32Array(this.buf,t*this._BYTES_PER_ELEMENT+8,1);return this.storageUint8s.subarray(t*this._BYTES_PER_ELEMENT+4,t*this._BYTES_PER_ELEMENT+4+r[0])};const o=n,s="MEDIASDK_CACHE_INFO";function i(e){postMessage({status:35,data:e})}function a(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(t)return t.postMessage({status:48,data:e});postMessage({status:48,data:e})}new class{constructor(){this._highFrequencyLogs={},this.fixVersion="",this.cacheLogStack=[],this.isFlushing=!1}setInstance(e,t){this._instance=e,this.fixVersion=t}getMessageFromErrorOrEvent(e,t){let r=e;return t instanceof ErrorEvent?(t.filename&&(r+=" File: ".concat(t.filename)),(t.lineno||t.colno)&&(r+=" Line: ".concat(t.lineno,":").concat(t.colno)),t.message&&(r+=" Message: ".concat(t.message)),t.error&&(r+="\nStack: ".concat(t.error.stack))):t instanceof Error?(t.fileName&&(r+=" File: ".concat(t.fileName)),(t.lineNumber||t.columnNumber)&&(r+=" Line: ".concat(t.lineNumber,":").concat(t.columnNumber)),t.message&&(r+=" Message: ".concat(t.message)),t.stack&&(r+=" Stack: ".concat(t.stack)),t.name&&(r+=" Name: ".concat(t.name)),t.constraint&&(r+=" Constraint: ".concat(t.constraint))):t instanceof CloseEvent?(t.code&&(r+=" Code: ".concat(t.code)),t.reason&&(r+=" Reason: ".concat(t.reason)),r+=" wasClean: ".concat(t.wasClean)):t instanceof DOMException?(t.message&&(r+=" Message: ".concat(t.message)),t.name&&(r+=" Name: ".concat(t.name))):r+=t?t.toString():"",r}_addCacheLog(e,t){this.cacheLogStack.length<100&&this.cacheLogStack.push({type:e,message:t})}flushCacheLog(){if(this._instance&&this.cacheLogStack.length>0&&!this.isFlushing){this.isFlushing=!0;let e="";this.cacheLogStack.forEach((t=>{let{type:r,message:{message:n="",tags:o=[]}}=t;const i=n?"".concat(o.join("|"),":").concat(n).concat("|----|"):"";switch(r){case"log":this._log(n,[...o,s]);break;case"warn":case"error":case"severityerror":case"directReport":e+=i}})),e&&this._directReport(e,[s]),this.cacheLogStack=[],this.isFlushing=!1}}log(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._instance?(this.flushCacheLog(),this._log(e,t)):this._addCacheLog("log",{message:e,tags:t})}warn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];e=this.getMessageFromErrorOrEvent(e,t),this._instance?(this.flushCacheLog(),this._warn(e,r)):this._addCacheLog("warn",{message:e,tags:r})}error(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];var n;e=this.getMessageFromErrorOrEvent(e,t),this._highFrequencyLogs[e]?this._highFrequencyLogs[e]+=1:this._highFrequencyLogs[e]=1,!((n=this._highFrequencyLogs[e])&n-1)&&(this._instance?(this.flushCacheLog(),this._error(e,r)):this._addCacheLog("error",{message:e,tags:r}))}severityerror(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._instance?(this.flushCacheLog(),this._severityerror(JSON.stringify(e),t)):this._addCacheLog("severityerror",{message:JSON.stringify(e),tags:t})}directReport(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:["MEDIASDK_INFO"];var r;this._instance?(this.flushCacheLog(),null===(r=this._directReport)||void 0===r||r.call(this,e,t)):this._addCacheLog("directReport",{message:e,tags:t})}_log(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._instance&&this._instance.log(e,t)}_warn(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._instance&&this._instance.warn(e,t)}_error(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._instance&&this._instance.error(e,[this.fixVersion,...t])}_severityerror(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];this._instance&&this._instance.error(e,t)}_directReport(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];var r,n;this._instance&&(null===(r=(n=this._instance).directReport)||void 0===r||r.call(n,{msg:e},t))}clearHighFrequencyLogs(){this._highFrequencyLogs={}}},r(7201),new Error,new Map,new Map,new class{constructor(){this.ssrcInfoMap=new Map,this.timer=null}updateSSRCInfo(e,t){this.ssrcInfoMap.has(e)||this.ssrcInfoMap.set(e,{firstTime:0,lastTime:0,frames:0,fps:0}),this._calculateFPS(e,t),this._removeZeroFPS()}_calculateFPS(e,t){const r=this.ssrcInfoMap.get(e);if(0===r.frames?r.firstTime=t:r.lastTime=t,r.frames+=1,r.frames>2&&r.frames%5==0&&r.lastTime-r.firstTime>=1e3){const t=Math.floor(1e3/((r.lastTime-r.firstTime)/(r.frames-1)));r.fps!==t&&(this._notifyFPS(e,t),r.fps=t),r.firstTime=r.lastTime,r.frames=1}}_removeZeroFPS(){let e=Date.now();this.ssrcInfoMap.forEach(((t,r)=>{const n=this.ssrcInfoMap.get(r);n&&e-n.lastTime>2e3&&(this.ssrcInfoMap.delete(r),this._notifyFPS(r,0))}))}_notifyFPS(e,t){postMessage({status:66.6,data:{ssrc:e,fps:t}})}_checkIfNewFrameComing(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((()=>{this._removeZeroFPS(),this.timer=null}),2500)}};const u={ENCODE:1,DECODE:2,DECRPT:3,DECRPT_DECODE:4,WORKLET_APM_ONLY:5},c={MUTE:0,UNMUTE:1,LEAVED:2,MUTE_APM_ONLY:3,UNMUTE_APM_ONLY:4};let l,f,h,d,_,p,m,g,y,v,E=0,w=!0;var b=0,S=!1,A=null,k=!1;const D={WASMTYPE:u,AUDIO_STATE:c,onWasmModuleReady:function(e){if(!e)return console.warn("[AudioWASMAdapter] Module undefined");h=e.cwrap("_Heartbeat","number",["number"]),d=e.cwrap("_MuteUnmuteState","number",["number","number"]),_=e.cwrap("_Switch_Original_Sound","number",["number","boolean","boolean","boolean","boolean"]),p=e.cwrap("_Deliver_Recorded_Data","number",["number","number","number","number","number","number"]),m=e.cwrap("_Switch_Denoise","number",["number","number","number","number"]),g=e.cwrap("_Audio_Init","number",["number","string","string","number","number","boolean","boolean","boolean","number","boolean"]),y=e.cwrap("_Switch_High_Bitrate","number",["number","number"]),v=e.cwrap("_Set_All_Speech_Volume_Level","number",["number"])},setAudioInstanceAndType:function(e,t,r){l=e,t&&(E=t),r&&(f=r)},muteUnmuteState:function(e){if(null!=Object.values(c).find((t=>t==e)))return l?void(E!=u.WORKLET_APM_ONLY&&(d(l,e),i("muteUnmuteState: "+e))):i("muteUnmuteState: -1")},switchOriginalSound:function(e,t,r,n){l&&_(l,e,t,r,n)},deliverRecordedData:function(e,t,r,n){l&&p(l,e,t,0,r,n)},switchDenoise:function(e,t){l&&(S=e,m(l,!!e,3,!!t))},audioInit:function(e,t,r,n,o,s,i,a,u,c){return g(e,t,r,n,o,s,i,a,u,c)},setDecoder:function(e){A=e},needCalculateDenoiseOutput:function(){k=!0},switchHighBitrate:function(e){l&&y(l,e)},disableJitterLog:function(){w=!1},setAllSpeechVolume:function(e){l&&v(l,e)},onMonitorLogWASM:function(e,t){if(t<=0)return;const r=Module.HEAPU8.subarray(e,e+t),n=String.fromCharCode.apply(null,r);n&&(!w&&n.includes("JITTER")||n.includes("WCL_MCM_AUDIO_RECEIVE")&&E!=u.DECRPT&&E!=u.DECRPT_DECODE||n.includes("WCL_MCM_AUDIO,")&&E==u.DECRPT||(E==u.ENCODE||E==u.DECRPT||E==u.DECRPT_DECODE?a(n):E==u.DECODE?f&&f.port&&a(n,f.port):E==u.WORKLET_APM_ONLY&&f.port&&f.port.postMessage({status:"SPEECH_LOG",data:{log:n}})))},onMuteSpeechWarningWASM:function(){postMessage({status:121})},onAudioLevelWASM:function(e,t,r){var n;E!=u.ENCODE&&E!=u.WORKLET_APM_ONLY||1==e&&(0===t&&0===b||(b=t,E===u.ENCODE?postMessage({status:38,value:t}):null!==(n=f)&&void 0!==n&&n.port&&f.port.postMessage({status:38,data:t})))},onAPMProcessedPCMWASM:function(e,t,r,n){if(!S)return;let o=Module.HEAPF32.subarray(e/4,e/4+t);if(A){if(k){k=!1;let{sumRms:e}=function(e,t){let r=0,n=0;for(let o=0;o<e.length;o+=t){n+=e[o]*e[o];let t=Math.abs(e[o]);t>r&&(r=t)}return r=r>1?1:r,{sumRms:n/e.length/t,absMax:r}}(o,2),t=function(e){let t=0;return t=e>.1995?15:e>.0794?14:e>.0316?13:e>.0126?12:e>.005?11:e>.002?10:e>79433e-8?9:e>31623e-8?8:e>12589e-8?7:e>50119e-9?6:e>19953e-9?5:e>79433e-10?4:e>31623e-10?3:e>12589e-10?2:e>5.0119e-7?1:0,t}(e);f.port&&f.port.postMessage({status:"AUDIO_LEVEL_R16_DENOISE",level:t})}A.push([o])}}};class T{constructor(){this.cacheSize=0,this.sameCacheSizeCounter=0}shouldSendCacheSize(e){return e===this.cacheSize&&this.sameCacheSizeCounter++,(this.cacheSize!==e||200===this.sameCacheSizeCounter)&&(this.sameCacheSizeCounter=0,this.cacheSize=e,!0)}}class M{constructor(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1;if(this.STATE_READ_READY=0,this.STATE_READ_INDEX=1,this.STATE_WRITE_READY=2,this.STATE_WRITE_INDEX=3,this.STATE_DATA_COUNT=4,this.STATE_CACHE_SIZE=5,this.STATY_READY_NO=0,this.STATY_READY_YES=1,this.sabState=new Uint32Array(e),this.sabBuffer=new Float32Array(t),this.perFrameLength=r,this.writeChannelNumb=n,this.bufferLen=this.sabBuffer.length,this.supportSpecialOptimization=this.bufferLen%r==0,this.bufferIndex=null,this.supportSpecialOptimization){let e=this.bufferLen/r;this.bufferIndex=[];for(let t=0;t<e;t++)this.bufferIndex.push(this.sabBuffer.subarray(t*r,t*r+r))}this.placeBuffer=new Float32Array(this.perFrameLength),this.QUANTUM_SIZE=128,this.CACHE_SIZE_MAX_VALUE=Math.floor(Math.floor(this.bufferLen/this.QUANTUM_SIZE)/2),this.CACHE_SIZE_MIN_VALUE=6,this.CACHE_SIZE_MAX_VALUE<this.CACHE_SIZE_MIN_VALUE&&(this.CACHE_SIZE_MAX_VALUE=this.CACHE_SIZE_MIN_VALUE),this.setCacheSize(this.CACHE_SIZE_MIN_VALUE),this._counter=0,this.onCacheSizeChange=null,this.cacheSizeController=new T}getCacheSize(){return Atomics.load(this.sabState,this.STATE_CACHE_SIZE)}setCacheSize(e){e>this.CACHE_SIZE_MAX_VALUE&&(e=this.CACHE_SIZE_MAX_VALUE),e<this.CACHE_SIZE_MIN_VALUE&&(e=this.CACHE_SIZE_MIN_VALUE),this.onCacheSizeChange&&this.cacheSizeController.shouldSendCacheSize(e)&&this.onCacheSizeChange(e),Atomics.store(this.sabState,this.STATE_CACHE_SIZE,e)}setQuantumSize(e){this.QUANTUM_SIZE=e,this.CACHE_SIZE_MAX_VALUE=Math.floor(Math.floor(this.bufferLen/this.QUANTUM_SIZE)/2),this.CACHE_SIZE_MAX_VALUE<this.CACHE_SIZE_MIN_VALUE&&(this.CACHE_SIZE_MAX_VALUE=this.CACHE_SIZE_MIN_VALUE)}isNeedMoreData(){let e=Atomics.load(this.sabState,this.STATE_CACHE_SIZE);return Atomics.load(this.sabState,this.STATE_DATA_COUNT)<e*this.QUANTUM_SIZE}shouldAdjustCacheBuffer(){this._counter>0&&this.setCacheSize(this.getCacheSize()+1)}clear(){this.sabState&&(this.sabState[this.STATE_READ_READY]=0,this.sabState[this.STATE_READ_INDEX]=0,this.sabState[this.STATE_WRITE_READY]=0,this.sabState[this.STATE_WRITE_INDEX]=0,this.sabState[this.STATE_DATA_COUNT]=0),this._counter=0}setWriteReady(){this.sabState[this.STATE_WRITE_READY]=this.STATY_READY_YES}isReady(){return this.sabState[this.STATE_WRITE_READY]&&this.sabState[this.STATE_READ_READY]}getDataCount(){return Atomics.load(this.sabState,this.STATE_DATA_COUNT)}write(e){if(void 0===e[0]||e[0].length*this.writeChannelNumb!==this.perFrameLength)return;let t=this.sabState[this.STATE_READ_READY];return this.sabState[this.STATE_WRITE_READY]||(this.sabState[this.STATE_WRITE_READY]=this.STATY_READY_YES,this.sabState[this.STATE_WRITE_INDEX]=0),t?this.supportSpecialOptimization?this.writeSpecial(e):this.writeNormal(e):void 0}writeNormal(e){let t=this.sabState[this.STATE_WRITE_INDEX];for(let r=0;r<this.writeChannelNumb;r++)for(let n=0;e[r]&&n<e[r].length;n++)this.sabBuffer[(t+n*this.writeChannelNumb+r)%this.bufferLen]=e[r][n];t+=this.perFrameLength,t>=this.bufferLen&&(t-=this.bufferLen),this.sabState[this.STATE_WRITE_INDEX]=t,Atomics.add(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength)}writeSpecial(e){let t=this.sabState[this.STATE_WRITE_INDEX];for(let r=0;r<this.writeChannelNumb;r++)for(let n=0;e[r]&&n<e[r].length;n++)this.bufferIndex[t][n*this.writeChannelNumb+r]=e[r][n];t=(t+1)%this.bufferIndex.length,this.sabState[this.STATE_WRITE_INDEX]=t,Atomics.add(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength)}read(){let e=this.sabState[this.STATE_READ_READY],t=this.sabState[this.STATE_WRITE_READY];if(e||(this.sabState[this.STATE_READ_READY]=this.STATY_READY_YES,this.sabState[this.STATE_READ_INDEX]=0),!t)return null;let r=this.supportSpecialOptimization?this.readSpecial():this.readNormal();return null===r?this.shouldAdjustCacheBuffer():this._counter++,r}readNormal(){let e=this.sabState[this.STATE_READ_INDEX],t=Atomics.load(this.sabState,this.STATE_DATA_COUNT);if(t<this.perFrameLength)return null;if(t>this.bufferLen){let r=Math.ceil((t-this.bufferLen)/this.perFrameLength)+1;e=(r*this.perFrameLength+e)%this.bufferLen,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,r*this.perFrameLength)}let r=null;if(this.bufferLen-e>=this.perFrameLength)r=this.sabBuffer.subarray(e,e+this.perFrameLength);else{let t=this.sabBuffer.subarray(e),n=this.sabBuffer.subarray(0,this.perFrameLength-t.length);r=this.placeBuffer,r.set(t),r.set(n,t.length)}return e+=this.perFrameLength,e>=this.bufferLen&&(e-=this.bufferLen),this.sabState[this.STATE_READ_INDEX]=e,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength),r}readSpecial(){let e=this.sabState[this.STATE_READ_INDEX],t=Atomics.load(this.sabState,this.STATE_DATA_COUNT);if(t<this.perFrameLength)return null;if(t>this.bufferLen){let r=Math.ceil((t-this.bufferLen)/this.perFrameLength)+1;e=(r+e)%this.bufferIndex.length,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,r*this.perFrameLength)}let r=this.bufferIndex[e];return e=(e+1)%this.bufferIndex.length,this.sabState[this.STATE_READ_INDEX]=e,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength),r}}class C{constructor(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.rframes=e,this.wframes=t,this.writeChannelNumb=r,this.cap=this.lcm(e,t),this.buffer=new Float32Array(this.cap),this.remain=0,this.woffset=0,this.roffset=0}gcd(e,t){return 0===t?e:this.gcd(t,e%t)}lcm(e,t){return e/this.gcd(e,t)*t}push(e){if(null==e[0]||e[0].length*this.writeChannelNumb==this.wframes){for(let t=0;t<this.writeChannelNumb;t++)for(let r=0;r<e[0].length;r++)this.buffer[(this.woffset+r*this.writeChannelNumb+t)%this.cap]=e[t]?e[t][r]:e[0][r];this.woffset+=this.wframes,this.remain+=this.wframes,this.woffset>=this.cap&&(this.woffset=this.woffset%this.cap)}else{var t;console.error("[Audio] critical error in AudioWorklet: data.length:",e.length,"this.woffset:",this.woffset,"this.cap:",this.cap),_workletPrinter&&_workletPrinter.error("critical error in AudioWorklet: ".concat(null===(t=e[0])||void 0===t?void 0:t.length," ").concat(his.writeChannelNumb," ").concat(this.wframes))}}read(){if(!this.hasData())return null;let e=this.buffer.subarray(this.roffset,this.roffset+this.rframes);return this.remain-=this.rframes,this.roffset+=this.rframes,this.roffset>=this.cap&&(this.roffset=this.roffset%this.cap),e}hasData(){return this.remain>=this.rframes}clear(){this.buffer.fill(0),this.remain=0,this.woffset=0,this.roffset=0}}t().onWasmModuleReady=function(){D.onWasmModuleReady(Module),I=Module.cwrap("_Audio_Init","number",["number","string","string","number","number","boolean","boolean","boolean","number","boolean"]),(x=I(W,z,j,0,0,!0,!1,!1,1))?D.setAudioInstanceAndType(x,D.WASMTYPE.DECODE,ne):_workletPrinter.error("audio_handle not exist"),N=Module.cwrap("_Audio_Try_Analysis","number",["number","number","number","number"]),B=Module.cwrap("_Get_Mixed_Audio","number",["number","number","number","number"]),U=Module.cwrap("_setMultiViewFlag","number",["number","boolean"]),Z=Module.cwrap("_Interpretation_Configure","number",["number","number","number","number"]),K=Module.cwrap("_Set_Speech_Volume_Level","number",["number","number","number"]),X=Module._malloc(4*$),Module.HEAPU32.subarray(X/4,X/4+$),U(x,Y),Q=Module._malloc(J),Module.HEAP8.subarray(Q,Q+J),ne.port.postMessage({status:"WASM_INIT_SUCCESS",data:{audio_handle:0!==x}})},t().onAbort=function(e){_workletPrinter.error("WASM onAbort "+(e?e.message:""),e)},t().preInit=function(e){_workletPrinter.debug("WASM preInit"+(e?e.message:""),e)},t().preRun=function(e){_workletPrinter.debug("WASM preRun"+(e?e.message:""),e)},t()._workletPrinter=new class{constructor(e){this.messageQueue=[],this.auidoNodePort,this.userAgent="",this.isSafari=!1,this.debug=this.debug.bind(this),this.log=this.log.bind(this),this.warn=this.warn.bind(this),this.error=this.error.bind(this),this.print_=this.print_.bind(this),this.messageHeader=e}setUserAgent(e){this.userAgent=e,this.userAgent.match(/AppleWebKit\/(\d+)\./)&&(this.isSafari=!0)}setAuidoNodePort(e){this.auidoNodePort=e}debug(e){e=this.messageHeader+e;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.print_({level:"debug",message:e,data:r})}log(e){e=this.messageHeader+e;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.print_({level:"log",message:e,data:r})}warn(e){e=this.messageHeader+e;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.print_({level:"warn",message:e,data:r})}error(e){e=this.messageHeader+e;for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];this.print_({level:"error",message:e,data:r})}print_(e){if(this.messageQueue.push(e),this.auidoNodePort)for(;this.messageQueue.length;){let e=this.messageQueue.shift();this._postToWorkerPrint(e)}}_postToWorkerPrint(e){this.auidoNodePort&&this.auidoNodePort.postMessage({status:"workletMessage",data:{level:e.level,message:e.message,data:e.data}})}}("[Audio][Worklet][WASM]"),t().AudioWasmAdapter=D;class P{constructor(){this.buffList=[],this.cacheMinSize=4,this.cacheMaxSize=16,this.cacheSize=this.cacheMinSize,this.onCacheSizeChange=null,this.onrollbackbuffer=null,this.onneedmoredata=null,this.isReady=!1,this.cacheSizeController=new T}push(e){this.isReady=!0,this.buffList.push({buff:e,offset:0})}copy(e,t,r,n){return e.length-t<=r.length-n?(0===t?r.set(e,n):r.set(e.subarray(t),n),e.length-t):(r.set(e.subarray(t,t+r.length-n),n),r.length-n)}increaseCacheSize(){this.isReady&&this.cacheSize++,this.cacheSize>this.cacheMaxSize&&(this.cacheSize=this.cacheMaxSize),this.onCacheSizeChange&&this.isReady&&this.cacheSizeController.shouldSendCacheSize(this.cacheSize)&&this.onCacheSizeChange(this.cacheSize)}copyTo(e){if(0===this.buffList.length)return e.fill(0),void this.increaseCacheSize();let t=this.buffList[0];if(t.buff.length-t.offset>=e.length)this.copy(t.buff,t.offset,e,0),t.offset+=e.length,t.offset===t.buff.length&&(this.buffList.shift(),this.onrollbackbuffer&&this.onrollbackbuffer(t.buff));else{if(this.buffList.length<2)return e.fill(0),void this.increaseCacheSize();let r=this.copy(t.buff,t.offset,e,0);this.buffList.shift(),this.onrollbackbuffer&&this.onrollbackbuffer(t.buff),t=this.buffList[0],r=this.copy(t.buff,t.offset,e,r),t.offset+=r}}requestMoreData(){this.buffList.length<this.cacheSize&&this.onneedmoredata&&this.onneedmoredata()}hasData(){return this.buffList.length>=2}}class R{constructor(e){this.buffList=[],this.frameLength=e,this.onframedata=null}copy(e,t,r,n){if(e[0].length*V<=r.length-n){for(let t=0;t<V;t++)for(let o=0;e[t]&&o<e[t].length;o++)r[n+o*V+t]=e[t][o];return(e[0].length-t)*V}for(let t=0;t<V;t++)for(let o=0;e[t]&&o<e[t].length&&n+o*V+t<r.length;o++)r[n+o*V+t]=e[t][o];return r.length-n}rollbackbuffer(e){this.buffList.push({buff:e,offset:0})}push(e){0===this.buffList.length&&this.buffList.push({buff:new Float32Array(this.frameLength),offset:0});let t=this.buffList[0];if(t.buff.length-t.offset>=e[0].length*V){let r=this.copy(e,0,t.buff,t.offset);t.offset+=r,t.buff.length===t.offset&&(this.buffList.shift(),this.onframedata&&this.onframedata(t.buff))}else{let r=this.copy(e,0,t.buff,t.offset);if(this.buffList.shift(),this.onframedata&&this.onframedata(t.buff),e[0].length*V>r){let t=[];for(let n=0;n<V;n++)t.push(e[n].subarray(Math.floor(r/V)+(r%V>n?1:0)));this.push(t)}}}}class L{constructor(e,t){this.context=t,this.decodePort=null,this.encodePort=null,this.captureSize=e/100*V,this.playBuffer=new P,this.playBuffer.onrollbackbuffer=e=>{this.decodePort},this.playBuffer.onneedmoredata=()=>{this.decodePort&&this.decodePort.postMessage({status:1})},this.playBuffer.onCacheSizeChange=e=>{this.decodePort&&this.decodePort.postMessage({status:3,cacheSize:e})},this.quantum=new Float32Array(128*G),this.captureBuffer=new R(this.captureSize),this.captureBuffer.onframedata=e=>{this.encodePort&&this.encodePort.postMessage({command:2,buffer:e},[e.buffer])}}setDecodePort(e){this.decodePort&&this.decodePort.close(),this.decodePort=e,this.decodePort.onmessage=this.handleDecodeData.bind(this)}setEncodePort(e){this.encodePort&&this.encodePort.close(),this.encodePort=e,this.encodePort.onmessage=this.handleEncodeData.bind(this)}handleDecodeData(e){this.context.isPlaying&&this.playBuffer.push(e.data.data)}handleEncodeData(e){0===e.data.event&&this.captureBuffer.rollbackbuffer(e.data.buffer)}requestMoreData(){this.playBuffer.requestMoreData()}close(){this.decodePort&&(this.decodePort=null,this.decodePort.close()),this.encodePort&&(this.encodePort=null,this.encodePort.close())}write(e){this.captureBuffer.push(e)}read(){return this.playBuffer.copyTo(this.quantum),this.requestMoreData(),this.quantum}}let F="undefined"!=typeof SharedArrayBuffer,O=!0;var I=null,N=null,x=null,B=null,U=null;let j=0,z=0,W=0,H=0,Y=!1,V=1,G=1,q=null;var Z,X,K,Q,$=10;let J=1500;function ee(e){let t=e[1];return 4294967296*e[2]+t}new Map,t().update_play_time=function(e,t){if(t){var r=new Uint8Array(t),n=Module.HEAP8.subarray(e+0,e+t);if(r.set(n),Y){var o;null===(o=ne.videoDecodePort)||void 0===o||o.postMessage({status:1,data:r},[r.buffer])}else{let e=new Uint32Array(r.buffer),t=null,n=null,o=0,s=0;for(let i=0;i<r.length/16;i++){let r=e[4*i];512&r?(t=e.subarray(4*i,4*i+4),s=ee(t)):r>>10==H>>10&&(n=e.subarray(4*i,4*i+4),o=ee(n))}if(!o&&!s)return;ne.port.postMessage({status:57,at:o,st:s})}}};let te=null,re=null;t().frame_callback=function(e,t,r,n,o,s,i,a){te===e&&re.length==t*i||(re=Module.HEAPF32.subarray(e/4,e/4+t*i),te=e),q.push([re])};let ne=null;class oe extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:"pcm",defaultValue:1}]}constructor(e){var r,n;super(),ne=this,monitorLOG("WIB"),this.port.onmessage=this.handleMessage.bind(this),this.isPlaying=!1,this.isCapturing=!1,this.wasmModule=null==e||null===(r=e.processorOptions)||void 0===r?void 0:r.wasmModule,e&&e.processorOptions&&(e.processorOptions.audioEncodeChannelsNum&&(V=e.processorOptions.audioEncodeChannelsNum),e.processorOptions.audioDecodeChannelsNum&&(G=e.processorOptions.audioDecodeChannelsNum)),this.SABConstructor(e&&e.processorOptions?e.processorOptions.sharedBuffer:null),this.noSABConstructor(),t().fsHandler&&t().fsHandler.setPort(this.port),null!=e&&null!==(n=e.processorOptions)&&void 0!==n&&n.userAgent&&_workletPrinter.setUserAgent(e.processorOptions.userAgent),_workletPrinter.setAuidoNodePort(this.port),monitorLOG("WIE")}SABConstructor(e){this.sampleRate_=0,this.g_sharedbuffer=e||null,this.encodeSAB=null,this.decodeSAB=null,this.audioEncodePort=null,this.audioDecodePort=null,this.videoDecodePort=null,this.rtpSAB=null,this.stopPlayAudio=!1,q=new C(128*G,sampleRate/100*G)}noSABConstructor(){this.audioProcessBuffer=new L(sampleRate,this),this.isRunning=!0}handleMessage(e){const{status:t,data:r}=e.data;switch(t){case"diableSharedArrayBuffer":F=!1;break;case"disableDecoderinworklet":O=!1;break;case"data":console.info("Dropped audio data before initialized");break;case"stopPlayAudio":this.isPlaying=!1;break;case"stopWorklet":ae=!0;break;case"startPlayAudio":this.isPlaying=!0;break;case"StartCaptureAudio":this.isCapturing=!0;break;case"sampleRate":this.sampleRate_=r;break;case"audiowasm":try{initWasm(Module,this.wasmModule)}catch(e){ne.port.postMessage({status:"WASM_INIT_FAILED"}),_workletPrinter.error("init WASM failed, error message:"+e.message+e.stack)}break;case"initData":W=r.userid,j=r.meetingid,z=r.meetingnum;break;case"currentSSRC":H=r;break;case"stop_audio_incoming":this.stopPlayAudio=r;break;case"codecDoAVSync":Y=!0,U&&x&&U(x,!0);break;case"checkProcess":{monitorLOG("PCC"+ue);let e=parseInt(1e3*ce/this.sampleRate_);monitorLOG("ADD:"+e),!ue!==le&&(le=!ue,ne.port.postMessage({status:"PROCESS_EXCEPTIONS",data:le})),ue=0,ce=0;break}case"interpretation_set_lang":Module.HEAPU32.subarray(X/4,X/4+$)[0]=r.lang,Z(x,1,X,1);break;case"interpretation_enable":Module.HEAPU32.subarray(X/4,X/4+$)[0]=r.enable?1:0,Z(x,0,X,1);break;case"interpretation_mute_origin":Module.HEAPU32.subarray(X/4,X/4+$)[0]=r.mute?1:0,Z(x,2,X,1);break;case"interpretation_set_interpreter":{let e=Module.HEAPU32.subarray(X/4,X/4+$),t=X;r.interpreterList.length>=$&&(t=Module._malloc(4*r.interpreterList.length),e=Module.HEAPU32.subarray(t/4,t/4+r.interpreterList.length));for(let t=0;t<r.interpreterList.length;t++)e[t]=r.interpreterList[t];Z(x,3,t,r.interpreterList.length),r.interpreterList.length>=$&&Module._free(t);break}case"setSpeechVolumeLevel":if(!x)return;K(x,r.userid,r.volume);break;case 131:D.setAllSpeechVolume(r.volume);break;default:F?this.handleMessageForSAB(e):this.handleMessageForNoSAB(e)}}handleMessageForSAB(e){const{status:t,data:r}=e.data;switch(t){case"encodeAudioPort":this.audioEncodePort&&this.audioEncodePort.close(),this.audioEncodePort=e.ports[0];break;case"decodeAudioPort":this.audioDecodePort&&this.audioDecodePort.close(),this.audioDecodePort=e.ports[0],this.audioDecodePort.onmessage=function(e){};break;case"decodeVideoPort":this.videoDecodePort&&this.videoDecodePort.close(),this.videoDecodePort=e.ports[0];break;case"close":break;case"sharedBuffer":r&&(this.g_sharedbuffer=r),this.g_sharedbuffer&&(this.encodeSAB=new M(this.g_sharedbuffer.inputState,this.g_sharedbuffer.inputBuffer,128*V,V),this.decodeSAB=new M(this.g_sharedbuffer.outputState,this.g_sharedbuffer.outputBuffer,128*G),this.g_sharedbuffer.echoState&&this.g_sharedbuffer.echoBuffer&&(this.echoSAB=new M(this.g_sharedbuffer.echoState,this.g_sharedbuffer.echoBuffer,128*G,G)),this.rtpSAB=new o(this.g_sharedbuffer.rtpBuffer,1200),this.decodeSAB.onCacheSizeChange=e=>{this.audioDecodePort&&this.audioDecodePort.postMessage({status:3,cacheSize:e,isSAB:!0})});break;default:console.warn("unhanle commands in audioworklet",t)}}handleMessageForNoSAB(e){const{status:t}=e.data;switch(t){case"encodeAudioPort":this.audioProcessBuffer.setEncodePort(e.ports[0]);break;case"decodeAudioPort":this.audioProcessBuffer.setDecodePort(e.ports[0]);break;case"close":this.audioProcessBuffer.close(),this.isPlaying=!1,this.isRunning=!1;break;default:console.warn("unhanle commands in audioworklet",t)}}onReceivedRTP(){}process(e,t,r){if(ue++,ae)return!1;try{return F?O?this.SABDecodeProcess(e,t,r):this.SABProcess(e,t,r):this.NoSABprocess(e,t,r)}catch(e){return _workletPrinter.error("::process() exception: "+e.message+e.stack),!0}}NoSABprocess(e,t,r){return!(!this.isRunning||this.isPlaying&&(this.inputDataForNoSAB(e),this.outputDataForNoSAB(t),0))}inputDataForNoSAB(e){if(!e[0]||!e[0][0])return!0;let t=e[0];if(ce+=t[0].length,!ie&&e[0].length<V)try{for(let r=e[0].length;!ie&&r<V;r++)t.push(t[0])}catch(e){ie=!0,_workletPrinter.error("::inputDataForNoSAB() exception: "+e.message+e.stack)}this.audioProcessBuffer.write(t)}outputDataForNoSAB(e){let t=this.audioProcessBuffer.read();if(this.stopPlayAudio)return!0;let r=e[0];if(1===G)for(let e=0;e<r.length;e++)r[e].set(t);else for(let e=0;e<G;e++)for(let n=0;r[e]&&n<r[e].length;n++)r[e][n]=t[n*G+e]}inputData(e){if(!this.encodeSAB)return!0;ce+=e[0].length,this.encodeSAB.write(e),this.audioEncodePort.postMessage({command:2,buffer:!1})}outputDecodeData(e,r){try{q.hasData()||B&&(sampleRate!=se&&(t().sampleRateLog(se,sampleRate,"","",3),se=sampleRate),B(x,sampleRate/100,0,sampleRate,G))}catch(e){_workletPrinter.error("::outputDecodeData() get_mixed_Audio exception: "+e.message+e.stack)}try{let t=q.read();if(!t)return;if(1===G)for(let r=0;r<e.length;r++)e[r].set(t);else for(let r=0;r<G;r++)for(let n=0;e[r]&&n<e[r].length;n++)e[r][n]=t[n*G+r];r&&this.echoSAB&&this.echoSAB.write(e)}catch(e){_workletPrinter.error("::outputDecodeData() set outputs exception: "+e.message+e.stack)}}outputData(e){if(!this.decodeSAB)return!0;let t=this.decodeSAB.read();if(null===t||this.stopPlayAudio)return!0;if(1===G)for(let r=0;r<e.length;r++)e[r].set(t);else for(let r=0;r<G;r++)for(let n=0;e[r]&&n<e[r].length;n++)e[r][n]=t[n*G+r]}SABDecodeProcess(e,r,n){try{if(!this.rtpSAB)return t().monitorLOG("SABN"),!0;{let e=this.rtpSAB.available_read();e>100&&(e=100);let t=this.rtpSAB.getReaderPtr(),r=0;for(;r<e;){r++;let e=this.rtpSAB.get(t);t++,x&&Q&&(Module.HEAP8.subarray(Q,Q+J).set(e),N(x,0,Q,e.length))}this.rtpSAB.setReaderPtr(t)}}catch(e){_workletPrinter.error("::SABDecodeProcess() audio_decode exception: "+e.message+e.stack)}try{let t=e[0],n=r[0];if(!this.g_sharedbuffer)return!0;if(!this.sampleRate_||!n[0])return!0;let o=t[0]&&this.isCapturing;if(o){if(t.length<V&&!ie)try{for(let e=t.length;!ie&&e<V;e++)t.push(t[0])}catch(e){ie=!0,_workletPrinter.error("::SABDecodeProcess() copy input data exception: "+e.message+e.stack)}this.inputData(t)}return this.outputDecodeData(n,o),!0}catch(e){_workletPrinter.error("::SABDecodeProcess() inputs or outputs exception: "+e.message+e.stack)}return!0}SABProcess(e,t,r){let n=e[0],o=t[0];if(!this.g_sharedbuffer)return!0;if(!this.sampleRate_||!o[0])return!0;if(n[0]&&this.isCapturing){if(!ie&&n.length<V)try{for(let e=n.length;!ie&&e<V;e++)n.push(n[0])}catch(e){ie=!0,_workletPrinter.error("::SABProcess() exception: "+e.message+e.stack)}this.inputData(n)}return this.outputData(o),!0}}var se=0,ie=!1,ae=!1,ue=0,ce=0,le=!1;t().LOG_OUT=function(){},t().fsHandler?(t().LOG_OUT_WEBRTC=t().fsHandler.handleFile,t().Get_ExternalRecord=t().fsHandler.handleViperPrint):(t().LOG_OUT_WEBRTC=function(){},t().Get_ExternalRecord=function(){}),t().send_data=function(){},t().monitorLOG=function(e){e&&ne.port.postMessage({status:"MONITOR_LOG",data:e})},t().sampleRateLog=function(e,r,n,o,s){if(!e&&!r)return;let i=null;switch(s){case 1:i="GGDS: ";break;case 2:i="SCAG: ";break;case 3:i="SCIW: "}let a=i+e+"|"+r+"|"+n+"|"+o;t().monitorLOG(a)},t().wcl_trace_log=function(e,r){t().fsHandler&&t().fsHandler.handleAudioSDKUtilPrint(e,r)},t().Viper_NetworkTrace=function(e,t){},registerProcessor("zoomAudioWorklet",oe)})()})();var wasmModule,Module=Module||{};function initWasm(e,t){let r=()=>Date.now();wasmModule=t;var n,o,s,i=void 0!==(i=e)?i:{},a=Object.assign({},i),u=[],c="./this.program",l="object"==typeof window,f="function"==typeof importScripts,h="object"==typeof process&&"object"==typeof process.versions&&"string"==typeof process.versions.node,d="";(l||f)&&(f?d=self.location.href:"undefined"!=typeof document&&document.currentScript&&(d=document.currentScript.src),d=0!==d.indexOf("blob:")?d.substr(0,d.replace(/[?#].*/,"").lastIndexOf("/")+1):"",n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f&&(s=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.responseType="arraybuffer",t.send(null),new Uint8Array(t.response)}),o=(e,t,r)=>{var n=new XMLHttpRequest;n.open("GET",e,!0),n.responseType="arraybuffer",n.onload=()=>{200==n.status||0==n.status&&n.response?t(n.response):r()},n.onerror=r,n.send(null)});var _,p,m=i.print||console.log.bind(console),g=i.printErr||console.warn.bind(console);Object.assign(i,a),a=null,i.arguments&&(u=i.arguments),i.thisProgram&&(c=i.thisProgram),i.quit&&i.quit,i.wasmBinary&&(_=i.wasmBinary),i.noExitRuntime,"object"!=typeof WebAssembly&&Z("no native wasm support detected");var y=!1;function v(e,t){e||Z(t)}var E,w,b,S,A,k,D,T,M="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function C(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&M)return M.decode(e.subarray(t,o));for(var s="";t<o;){var i=e[t++];if(128&i){var a=63&e[t++];if(192!=(224&i)){var u=63&e[t++];if((i=224==(240&i)?(15&i)<<12|a<<6|u:(7&i)<<18|a<<12|u<<6|63&e[t++])<65536)s+=String.fromCharCode(i);else{var c=i-65536;s+=String.fromCharCode(55296|c>>10,56320|1023&c)}}else s+=String.fromCharCode((31&i)<<6|a)}else s+=String.fromCharCode(i)}return s}function P(e,t){return e?C(b,e,t):""}function R(e,t,r,n){if(!(n>0))return 0;for(var o=r,s=r+n-1,i=0;i<e.length;++i){var a=e.charCodeAt(i);if(a>=55296&&a<=57343&&(a=65536+((1023&a)<<10)|1023&e.charCodeAt(++i)),a<=127){if(r>=s)break;t[r++]=a}else if(a<=2047){if(r+1>=s)break;t[r++]=192|a>>6,t[r++]=128|63&a}else if(a<=65535){if(r+2>=s)break;t[r++]=224|a>>12,t[r++]=128|a>>6&63,t[r++]=128|63&a}else{if(r+3>=s)break;t[r++]=240|a>>18,t[r++]=128|a>>12&63,t[r++]=128|a>>6&63,t[r++]=128|63&a}}return t[r]=0,r-o}function L(e,t,r){return R(e,b,t,r)}function F(e){for(var t=0,r=0;r<e.length;++r){var n=e.charCodeAt(r);n<=127?t++:n<=2047?t+=2:n>=55296&&n<=57343?(t+=4,++r):t+=3}return t}function O(e){E=e,i.HEAP8=w=new Int8Array(e),i.HEAP16=S=new Int16Array(e),i.HEAP32=k=new Int32Array(e),i.HEAPU8=b=new Uint8Array(e),i.HEAPU16=A=new Uint16Array(e),i.HEAPU32=D=new Uint32Array(e),i.HEAPF32=new Float32Array(e),i.HEAPF64=T=new Float64Array(e)}var I=i.INITIAL_MEMORY||20971520;(p=i.wasmMemory?i.wasmMemory:new WebAssembly.Memory({initial:I/65536,maximum:2048}))&&(E=p.buffer),I=E.byteLength,O(E);var N,x,B,U,j=[],z=[],W=[],H=0,Y=null,V=null;function G(e){H++,i.monitorRunDependencies&&i.monitorRunDependencies(H)}function q(e){if(H--,i.monitorRunDependencies&&i.monitorRunDependencies(H),0==H&&(null!==Y&&(clearInterval(Y),Y=null),V)){var t=V;V=null,t()}}function Z(e){throw i.onAbort&&i.onAbort(e),g(e="Aborted("+e+")"),y=!0,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}function X(e){return e.startsWith("data:application/octet-stream;base64,")}function K(e){return e.startsWith("file://")}function Q(e){try{if(e==N&&_)return new Uint8Array(_);if(s)return s(e);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}}X(N="audio.encode.wasm")||(x=N,N=i.locateFile?i.locateFile(x,d):d+x);var $={1099740:e=>{console.log("Audio Version: ",e)},1099777:(e,t)=>{send_data(e,t)},1099800:(e,t)=>{SAVE_IV(e,t)},1099818:(e,t,r,n)=>{audio_encode_frame_callback(e,t,r,n)},1099867:(e,t,r)=>{Get_ExternalRecord(e,t,r)},1099903:()=>Date.now(),1099926:(e,t)=>{update_play_time(e,t)},1099956:()=>{AudioWasmAdapter.onMuteSpeechWarningWASM()},1100003:(e,t)=>{AudioWasmAdapter.onMonitorLogWASM(e,t)},1100046:(e,t)=>{AudioWasmAdapter.onAudioLevelWASM(e,t)},1100089:(e,t,r)=>{network_quality_callback(e,t,r)},1100129:(e,t,r,n)=>{AudioWasmAdapter.onAPMProcessedPCMWASM(e,t,r,n)},1100189:(e,t,r,n)=>{pump_rtp_data(e,t,r,n)},1100224:(e,t,r,n)=>{pump_rtp_data(e,t,r,n)},1100259:(e,t,r,n,o,s,i,a)=>{responseAudioQosData(e,t,r,n,o,s,i,a)},1100314:(e,t,r,n,o)=>{sampleRateLog(e,t,r,n,o)},1100351:(e,t,r,n,o)=>{sampleRateLog(e,t,r,n,o)},1100388:(e,t,r,n,o,s,i,a)=>{frame_callback(e,t,r,n,o,s,i,a)},1100440:(e,t)=>{get_edition(e,t)},1100465:(e,t)=>{SAVE_IV(e,t)},1100483:()=>getNTPBaseTime(),1100512:()=>r(),1100542:(e,t)=>{COMMIT_PRINT(e,t)},1100564:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},1100600:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},1100636:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},1100672:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},1100708:(e,t)=>{LOG_OUT(e,t)},1100729:(e,t)=>{wcl_trace_log(e,t)}};function J(e){for(;e.length>0;)e.shift()(i)}function ee(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){D[this.ptr+4>>2]=e},this.get_type=function(){return D[this.ptr+4>>2]},this.set_destructor=function(e){D[this.ptr+8>>2]=e},this.get_destructor=function(){return D[this.ptr+8>>2]},this.set_refcount=function(e){k[this.ptr>>2]=e},this.set_caught=function(e){e=e?1:0,w[this.ptr+12|0]=e},this.get_caught=function(){return 0!=w[this.ptr+12|0]},this.set_rethrown=function(e){e=e?1:0,w[this.ptr+13|0]=e},this.get_rethrown=function(){return 0!=w[this.ptr+13|0]},this.init=function(e,t){this.set_adjusted_ptr(0),this.set_type(e),this.set_destructor(t),this.set_refcount(0),this.set_caught(!1),this.set_rethrown(!1)},this.add_ref=function(){var e=k[this.ptr>>2];k[this.ptr>>2]=e+1},this.release_ref=function(){var e=k[this.ptr>>2]