@vinay.kumar.ha/videosdk-ui-toolkit 2.3.5-1.5 → 2.3.5-1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/lib/annoter.min.js +3 -0
  2. package/dist/lib/audio.encode.wasm +0 -0
  3. package/dist/lib/audio.light.simd.wasm +0 -0
  4. package/dist/lib/audio.simd.wasm +0 -0
  5. package/dist/lib/audio_light_simd.min.js +2 -0
  6. package/dist/lib/audio_simd.min.js +2 -0
  7. package/dist/lib/graphics.min.js +2 -0
  8. package/dist/lib/js_audio_level_worklet_process.min.js +2 -0
  9. package/dist/lib/js_audio_level_worklet_process_light.min.js +2 -0
  10. package/dist/lib/js_audio_process.min.js +2 -0
  11. package/dist/lib/js_audio_processor_worklet.min.js +2 -0
  12. package/dist/lib/js_audio_worklet.min.js +2 -0
  13. package/dist/lib/js_audio_worklet_light_simd.min.js +2 -0
  14. package/dist/lib/js_audio_worklet_process.min.js +2 -0
  15. package/dist/lib/js_audio_worklet_simd.min.js +2 -0
  16. package/dist/lib/js_media.min.js +3 -0
  17. package/dist/lib/js_sharing_audio_worklet.min.js +2 -0
  18. package/dist/lib/manifest.json +338 -0
  19. package/dist/lib/mesh_thread.min.js +2 -0
  20. package/dist/lib/net.wasm +0 -0
  21. package/dist/lib/net_thread.min.js +2 -0
  22. package/dist/lib/pako.min.js +2 -0
  23. package/dist/lib/qrscanner.min.js +2 -0
  24. package/dist/lib/share_processor.min.js +2 -0
  25. package/dist/lib/sharing_m.min.js +3 -0
  26. package/dist/lib/sharing_mtsimd.min.js +3 -0
  27. package/dist/lib/sharing_s.min.js +2 -0
  28. package/dist/lib/sharing_simd.min.js +2 -0
  29. package/dist/lib/tp.min.js +2 -0
  30. package/dist/lib/tp.wasm +0 -0
  31. package/dist/lib/vb-resource/dualModel.bin +0 -0
  32. package/dist/lib/vb-resource/tf.min.js +18 -0
  33. package/dist/lib/vb.min.js +2 -0
  34. package/dist/lib/vb_worker.min.js +2 -0
  35. package/dist/lib/video.decode.js +1 -0
  36. package/dist/lib/video.decode.wasm +0 -0
  37. package/dist/lib/video.mt.js +1 -0
  38. package/dist/lib/video.mt.wasm +0 -0
  39. package/dist/lib/video.mtsimd.js +1 -0
  40. package/dist/lib/video.mtsimd.wasm +0 -0
  41. package/dist/lib/video.simd.js +1 -0
  42. package/dist/lib/video.simd.wasm +0 -0
  43. package/dist/lib/video_m.min.js +3 -0
  44. package/dist/lib/video_mtsimd.min.js +3 -0
  45. package/dist/lib/video_processor.min.js +2 -0
  46. package/dist/lib/video_s.min.js +2 -0
  47. package/dist/lib/video_share_mtsimd.min.js +3 -0
  48. package/dist/lib/video_simd.min.js +2 -0
  49. package/dist/lib/wasm_ssrc_stream_service_dynmod.min.js +2 -0
  50. package/dist/lib/webgpu_renderer_dynmod.min.js +2 -0
  51. package/dist/lib/wmsc.min.js +2 -0
  52. package/dist/videosdk-ui-toolkit.min.esm.js +1832 -1832
  53. package/dist/videosdk-ui-toolkit.min.umd.js +82 -82
  54. package/package.json +1 -1
@@ -0,0 +1,2 @@
1
+ (()=>{var t={2601:(t,e,s)=>{t.exports=s(4444)},3565:(t,e,s)=>{"use strict";var r=s(1960);t.exports=r},2671:(t,e,s)=>{"use strict";s(2344),t.exports=s(5951)},4444:(t,e,s)=>{"use strict";t.exports=s(214)},214:(t,e,s)=>{"use strict";s(397);var r=s(3565);t.exports=r},2159:(t,e,s)=>{"use strict";var r=s(2250),i=s(4640),o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not a function")}},6624:(t,e,s)=>{"use strict";var r=s(6285),i=String,o=TypeError;t.exports=function(t){if(r(t))return t;throw new o(i(t)+" is not an object")}},5807:(t,e,s)=>{"use strict";var r=s(1907),i=r({}.toString),o=r("".slice);t.exports=function(t){return o(i(t),8,-1)}},1626:(t,e,s)=>{"use strict";var r=s(9447),i=s(4284),o=s(5817);t.exports=r?function(t,e,s){return i.f(t,e,o(1,s))}:function(t,e,s){return t[e]=s,t}},5817:t=>{"use strict";t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},2532:(t,e,s)=>{"use strict";var r=s(5951),i=Object.defineProperty;t.exports=function(t,e){try{i(r,t,{value:e,configurable:!0,writable:!0})}catch(s){r[t]=e}return e}},9447:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},9552:(t,e,s)=>{"use strict";var r=s(5951),i=s(6285),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},6794:(t,e,s)=>{"use strict";var r=s(5951).navigator,i=r&&r.userAgent;t.exports=i?String(i):""},798:(t,e,s)=>{"use strict";var r,i,o=s(5951),a=s(6794),n=o.process,h=o.Deno,u=n&&n.versions||h&&h.version,c=u&&u.v8;c&&(i=(r=c.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!i&&a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=+r[1]),t.exports=i},1091:(t,e,s)=>{"use strict";var r=s(5951),i=s(6024),o=s(2361),a=s(2250),n=s(3846).f,h=s(7463),u=s(2046),c=s(8311),l=s(1626),f=s(9724);s(6128);var d=function(t){var e=function(s,r,o){if(this instanceof e){switch(arguments.length){case 0:return new t;case 1:return new t(s);case 2:return new t(s,r)}return new t(s,r,o)}return i(t,this,arguments)};return e.prototype=t.prototype,e};t.exports=function(t,e){var s,i,p,b,_,g,m,S,A,E=t.target,T=t.global,y=t.stat,v=t.proto,w=T?r:y?r[E]:r[E]&&r[E].prototype,C=T?u:u[E]||l(u,E,{})[E],M=C.prototype;for(b in e)i=!(s=h(T?b:E+(y?".":"#")+b,t.forced))&&w&&f(w,b),g=C[b],i&&(m=t.dontCallGetSet?(A=n(w,b))&&A.value:w[b]),_=i&&m?m:e[b],(s||v||typeof g!=typeof _)&&(S=t.bind&&i?c(_,r):t.wrap&&i?d(_):v&&a(_)?o(_):_,(t.sham||_&&_.sham||g&&g.sham)&&l(S,"sham",!0),l(C,b,S),v&&(f(u,p=E+"Prototype")||l(u,p,{}),l(u[p],b,_),t.real&&M&&(s||!M[b])&&l(M,b,_)))}},8828:t=>{"use strict";t.exports=function(t){try{return!!t()}catch(t){return!0}}},6024:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.apply,a=i.call;t.exports="object"==typeof Reflect&&Reflect.apply||(r?a.bind(o):function(){return a.apply(o,arguments)})},8311:(t,e,s)=>{"use strict";var r=s(2361),i=s(2159),o=s(1505),a=r(r.bind);t.exports=function(t,e){return i(t),void 0===e?t:o?a(t,e):function(){return t.apply(e,arguments)}}},1505:(t,e,s)=>{"use strict";var r=s(8828);t.exports=!r((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},3930:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype.call;t.exports=r?i.bind(i):function(){return i.apply(i,arguments)}},2361:(t,e,s)=>{"use strict";var r=s(5807),i=s(1907);t.exports=function(t){if("Function"===r(t))return i(t)}},1907:(t,e,s)=>{"use strict";var r=s(1505),i=Function.prototype,o=i.call,a=r&&i.bind.bind(o,o);t.exports=r?a:function(t){return function(){return o.apply(t,arguments)}}},5582:(t,e,s)=>{"use strict";var r=s(2046),i=s(5951),o=s(2250),a=function(t){return o(t)?t:void 0};t.exports=function(t,e){return arguments.length<2?a(r[t])||a(i[t]):r[t]&&r[t][e]||i[t]&&i[t][e]}},9367:(t,e,s)=>{"use strict";var r=s(2159),i=s(7136);t.exports=function(t,e){var s=t[e];return i(s)?void 0:r(s)}},5951:function(t,e,s){"use strict";var r=function(t){return t&&t.Math===Math&&t};t.exports=r("object"==typeof globalThis&&globalThis)||r("object"==typeof window&&window)||r("object"==typeof self&&self)||r("object"==typeof s.g&&s.g)||r("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9724:(t,e,s)=>{"use strict";var r=s(1907),i=s(9298),o=r({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return o(i(t),e)}},3648:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828),o=s(9552);t.exports=!r&&!i((function(){return 7!==Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},6946:(t,e,s)=>{"use strict";var r=s(1907),i=s(8828),o=s(5807),a=Object,n=r("".split);t.exports=i((function(){return!a("z").propertyIsEnumerable(0)}))?function(t){return"String"===o(t)?n(t,""):a(t)}:a},2250:t=>{"use strict";var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},7463:(t,e,s)=>{"use strict";var r=s(8828),i=s(2250),o=/#|\.prototype\./,a=function(t,e){var s=h[n(t)];return s===c||s!==u&&(i(e)?r(e):!!e)},n=a.normalize=function(t){return String(t).replace(o,".").toLowerCase()},h=a.data={},u=a.NATIVE="N",c=a.POLYFILL="P";t.exports=a},7136:t=>{"use strict";t.exports=function(t){return null==t}},6285:(t,e,s)=>{"use strict";var r=s(2250);t.exports=function(t){return"object"==typeof t?null!==t:r(t)}},7376:t=>{"use strict";t.exports=!0},5594:(t,e,s)=>{"use strict";var r=s(5582),i=s(2250),o=s(8280),a=s(1175),n=Object;t.exports=a?function(t){return"symbol"==typeof t}:function(t){var e=r("Symbol");return i(e)&&o(e.prototype,n(t))}},4284:(t,e,s)=>{"use strict";var r=s(9447),i=s(3648),o=s(8661),a=s(6624),n=s(470),h=TypeError,u=Object.defineProperty,c=Object.getOwnPropertyDescriptor,l="enumerable",f="configurable",d="writable";e.f=r?o?function(t,e,s){if(a(t),e=n(e),a(s),"function"==typeof t&&"prototype"===e&&"value"in s&&d in s&&!s[d]){var r=c(t,e);r&&r[d]&&(t[e]=s.value,s={configurable:f in s?s[f]:r[f],enumerable:l in s?s[l]:r[l],writable:!1})}return u(t,e,s)}:u:function(t,e,s){if(a(t),e=n(e),a(s),i)try{return u(t,e,s)}catch(t){}if("get"in s||"set"in s)throw new h("Accessors not supported");return"value"in s&&(t[e]=s.value),t}},3846:(t,e,s)=>{"use strict";var r=s(9447),i=s(3930),o=s(2574),a=s(5817),n=s(7374),h=s(470),u=s(9724),c=s(3648),l=Object.getOwnPropertyDescriptor;e.f=r?l:function(t,e){if(t=n(t),e=h(e),c)try{return l(t,e)}catch(t){}if(u(t,e))return a(!i(o.f,t,e),t[e])}},8280:(t,e,s)=>{"use strict";var r=s(1907);t.exports=r({}.isPrototypeOf)},2574:(t,e)=>{"use strict";var s={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,i=r&&!s.call({1:2},1);e.f=i?function(t){var e=r(this,t);return!!e&&e.enumerable}:s},581:(t,e,s)=>{"use strict";var r=s(3930),i=s(2250),o=s(6285),a=TypeError;t.exports=function(t,e){var s,n;if("string"===e&&i(s=t.toString)&&!o(n=r(s,t)))return n;if(i(s=t.valueOf)&&!o(n=r(s,t)))return n;if("string"!==e&&i(s=t.toString)&&!o(n=r(s,t)))return n;throw new a("Can't convert object to primitive value")}},2046:t=>{"use strict";t.exports={}},4239:(t,e,s)=>{"use strict";var r=s(7136),i=TypeError;t.exports=function(t){if(r(t))throw new i("Can't call method on "+t);return t}},6128:(t,e,s)=>{"use strict";var r=s(7376),i=s(5951),o=s(2532),a="__core-js_shared__",n=t.exports=i[a]||o(a,{});(n.versions||(n.versions=[])).push({version:"3.39.0",mode:r?"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:(t,e,s)=>{"use strict";var r=s(6128);t.exports=function(t,e){return r[t]||(r[t]=e||{})}},9846:(t,e,s)=>{"use strict";var r=s(798),i=s(8828),o=s(5951).String;t.exports=!!Object.getOwnPropertySymbols&&!i((function(){var t=Symbol("symbol detection");return!o(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},7374:(t,e,s)=>{"use strict";var r=s(6946),i=s(4239);t.exports=function(t){return r(i(t))}},9298:(t,e,s)=>{"use strict";var r=s(4239),i=Object;t.exports=function(t){return i(r(t))}},6028:(t,e,s)=>{"use strict";var r=s(3930),i=s(6285),o=s(5594),a=s(9367),n=s(581),h=s(6264),u=TypeError,c=h("toPrimitive");t.exports=function(t,e){if(!i(t)||o(t))return t;var s,h=a(t,c);if(h){if(void 0===e&&(e="default"),s=r(h,t,e),!i(s)||o(s))return s;throw new u("Can't convert object to primitive value")}return void 0===e&&(e="number"),n(t,e)}},470:(t,e,s)=>{"use strict";var r=s(6028),i=s(5594);t.exports=function(t){var e=r(t,"string");return i(e)?e:e+""}},4640:t=>{"use strict";var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},6499:(t,e,s)=>{"use strict";var r=s(1907),i=0,o=Math.random(),a=r(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+a(++i+o,36)}},1175:(t,e,s)=>{"use strict";var r=s(9846);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8661:(t,e,s)=>{"use strict";var r=s(9447),i=s(8828);t.exports=r&&i((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},6264:(t,e,s)=>{"use strict";var r=s(5951),i=s(5816),o=s(9724),a=s(6499),n=s(9846),h=s(1175),u=r.Symbol,c=i("wks"),l=h?u.for||u:u&&u.withoutSetter||a;t.exports=function(t){return o(c,t)||(c[t]=n&&o(u,t)?u[t]:l("Symbol."+t)),c[t]}},2344:(t,e,s)=>{"use strict";var r=s(1091),i=s(5951);r({global:!0,forced:i.globalThis!==i},{globalThis:i})},397:(t,e,s)=>{"use strict";s(2344)},1960:(t,e,s)=>{"use strict";var r=s(2671);t.exports=r}},e={};function s(r){var i=e[r];if(void 0!==i)return i.exports;var o=e[r]={exports:{}};return t[r].call(o.exports,o,o.exports,s),o.exports}s.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return s.d(e,{a:e}),e},s.d=(t,e)=>{for(var r in e)s.o(e,r)&&!s.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=s(2601),e=s.n(t),r=function(t,e){this._BYTES_PER_ELEMENT=e,this.capacity=(t.byteLength-8)/e,this.usableCapacity=this.capacity-1,this.buf=t,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,t.byteLength-8)};r.prototype.available_read=function(){var t=Atomics.load(this.read_ptr,0),e=Atomics.load(this.write_ptr,0);return this._available_read(t,e)},r.prototype._available_read=function(t,e){return(e+this.capacity-t)%this.capacity},r.prototype.dequeue=function(){var t=Atomics.load(this.read_ptr,0);let e=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+e[0])},r.prototype.addReadPtr=function(){var t=Atomics.load(this.read_ptr,0);Atomics.store(this.read_ptr,0,(t+1)%this.capacity)},r.prototype.getReaderPtr=function(){return this.read_ptr[0]},r.prototype.setReaderPtr=function(t){Atomics.store(this.read_ptr,0,t%this.capacity)},r.prototype.get=function(t){let e=t%this.capacity,s=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+s[0])};const i=r,o="MEDIASDK_CACHE_INFO";function a(t){postMessage({status:35,data:t})}function n(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;if(e)return e.postMessage({status:48,data:t});postMessage({status:48,data:t})}new class{constructor(){this._highFrequencyLogs={},this.fixVersion="",this.cacheLogStack=[],this.isFlushing=!1}setInstance(t,e){this._instance=t,this.fixVersion=e}getMessageFromErrorOrEvent(t,e){let s=t;return e instanceof ErrorEvent?(e.filename&&(s+=` File: ${e.filename}`),(e.lineno||e.colno)&&(s+=` Line: ${e.lineno}:${e.colno}`),e.message&&(s+=` Message: ${e.message}`),e.error&&(s+=`\nStack: ${e.error.stack}`)):e instanceof Error?(e.message&&(s+=` Message: ${e.message}`),e.stack&&(s+=` Stack: ${e.stack}`),e.name&&(s+=` Name: ${e.name}`),e.constraint&&(s+=` Constraint: ${e.constraint}`)):e instanceof CloseEvent?(e.code&&(s+=` Code: ${e.code}`),e.reason&&(s+=` Reason: ${e.reason}`),s+=` wasClean: ${e.wasClean}`):e instanceof DOMException?(e.message&&(s+=` Message: ${e.message}`),e.name&&(s+=` Name: ${e.name}`)):s+=e?e.toString():"",s}_addCacheLog(t,e){this.cacheLogStack.length<100&&this.cacheLogStack.push({type:t,message:e})}flushCacheLog(){if(this._instance&&this.cacheLogStack.length>0&&!this.isFlushing){this.isFlushing=!0;let t="";this.cacheLogStack.forEach((e=>{let{type:s,message:{message:r="",tags:i=[]}}=e;const a=r?`${i.join("|")}:${r}|----|`:"";switch(s){case"log":this._log(r,[...i,o]);break;case"warn":case"error":case"severityerror":case"directReport":t+=a}})),t&&this._directReport(t,[o]),this.cacheLogStack=[],this.isFlushing=!1}}log(t,e=[]){this._instance?(this.flushCacheLog(),this._log(t,e)):this._addCacheLog("log",{message:t,tags:e})}warn(t,e=null,s=[]){t=this.getMessageFromErrorOrEvent(t,e),this._instance?(this.flushCacheLog(),this._warn(t,s)):this._addCacheLog("warn",{message:t,tags:s})}error(t,e=null,s=[]){var r;t=this.getMessageFromErrorOrEvent(t,e),this._highFrequencyLogs[t]?this._highFrequencyLogs[t]+=1:this._highFrequencyLogs[t]=1,!((r=this._highFrequencyLogs[t])&r-1)&&(this._instance?(this.flushCacheLog(),this._error(t,s)):this._addCacheLog("error",{message:t,tags:s}))}severityerror(t,e=[]){this._instance?(this.flushCacheLog(),this._severityerror(JSON.stringify(t),e)):this._addCacheLog("severityerror",{message:JSON.stringify(t),tags:e})}directReport(t,e=["MEDIASDK_INFO"]){var s;this._instance?(this.flushCacheLog(),null===(s=this._directReport)||void 0===s||s.call(this,t,e)):this._addCacheLog("directReport",{message:t,tags:e})}_log(t,e=[]){this._instance&&this._instance.log(t,e)}_warn(t,e=[]){this._instance&&this._instance.warn(t,e)}_error(t,e=[]){this._instance&&this._instance.error(t,[this.fixVersion,...e])}_severityerror(t,e=[]){this._instance&&this._instance.error(t,e)}_directReport(t,e=[]){var s,r;this._instance&&(null===(r=(s=this._instance).directReport)||void 0===r||r.call(s,{msg:t},e))}clearHighFrequencyLogs(){this._highFrequencyLogs={}}},new Error,new Map,new Map,new class{constructor(){this.ssrcInfoMap=new Map,this.timer=null}updateSSRCInfo(t,e){this.ssrcInfoMap.has(t)||this.ssrcInfoMap.set(t,{firstTime:0,lastTime:0,frames:0,fps:0}),this._calculateFPS(t,e),this._removeZeroFPS()}_calculateFPS(t,e){const s=this.ssrcInfoMap.get(t);if(0===s.frames?s.firstTime=e:s.lastTime=e,s.frames+=1,s.frames>2&&s.frames%5==0&&s.lastTime-s.firstTime>=1e3){const e=Math.floor(1e3/((s.lastTime-s.firstTime)/(s.frames-1)));s.fps!==e&&(this._notifyFPS(t,e),s.fps=e),s.firstTime=s.lastTime,s.frames=1}}_removeZeroFPS(){let t=Date.now();this.ssrcInfoMap.forEach(((e,s)=>{const r=this.ssrcInfoMap.get(s);r&&r.lastTime&&t-r.lastTime>2e3&&(this.ssrcInfoMap.delete(s),this._notifyFPS(s,0))}))}_notifyFPS(t,e){postMessage({status:66.6,data:{ssrc:t,fps:e}})}_checkIfNewFrameComing(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((()=>{this._removeZeroFPS(),this.timer=null}),2500)}},new class{constructor(){this.ssrcInfoMap=new Map,this.timer=null}updateSSRCInfo(t,e){this.ssrcInfoMap.has(t)||this.ssrcInfoMap.set(t,{timeList:[],lastTime:0,fps:0}),this._calculateFPS(t,e),this._removeZeroFPS(),this._checkIfNewFrameComing()}_calculateFPS(t,e){const s=this.ssrcInfoMap.get(t);if(s.timeList.push(e),s.lastTime=e,s.timeList.length>2){const e=s.timeList[0],r=s.timeList[s.timeList.length-1];if(r-e>=1e3){const i=Math.floor(1e3/((r-e)/(s.timeList.length-1)));s.fps!==i&&(this._notifyFPS(t,i),s.fps=i),s.timeList=[]}}s.timeList.length>30&&(s.timeList=s.timeList.slice(s.timeList.length-30))}_removeZeroFPS(){this.ssrcInfoMap.forEach(((t,e)=>{const s=this.ssrcInfoMap.get(e);s&&Date.now()-s.lastTime>2e3&&(this.ssrcInfoMap.delete(e),this._notifyFPS(e,0))}))}_notifyFPS(t,e){postMessage({status:66.6,data:{ssrc:t,fps:e}})}_checkIfNewFrameComing(){this.timer&&(clearTimeout(this.timer),this.timer=null),this.timer=setTimeout((()=>{this._removeZeroFPS(),this.timer=null}),2500)}};const h={ENCODE:1,DECODE:2,DECRPT:3,DECRPT_DECODE:4,WORKLET_APM_ONLY:5},u={MUTE:0,UNMUTE:1,LEAVED:2,MUTE_APM_ONLY:3,UNMUTE_APM_ONLY:4};let c,l,f=0;const d=new Map,p=[1,2,4,8,16,32,64,128,256];let b,_,g,m,S,A,E,T,y=!0;var v=0,w=!1,C=null,M=!1;const P={WASMTYPE:h,AUDIO_STATE:u,onWasmModuleReady:function(t){if(!t)return console.warn("[AudioWASMAdapter] Module undefined");b=t.cwrap("_Heartbeat","number",["number"]),_=t.cwrap("_MuteUnmuteState","number",["number","number"]),g=t.cwrap("_Switch_Original_Sound","number",["number","boolean","boolean","boolean","boolean"]),m=t.cwrap("_Deliver_Recorded_Data","number",["number","number","number","number","number","number"]),S=t.cwrap("_Switch_Denoise","number",["number","boolean","number","boolean"]),A=t.cwrap("_Audio_Init","number",["number","string","string","number","number","boolean","boolean","boolean","number","boolean"]),E=t.cwrap("_Switch_High_Bitrate","number",["number","number"]),T=t.cwrap("_Set_All_Speech_Volume_Level","number",["number"])},setAudioInstanceAndType:function(t,e,s){c=t,e&&(f=e),s&&(l=s)},muteUnmuteState:function(t){if(null!=Object.values(u).find((e=>e==t)))return c?void(f!=h.WORKLET_APM_ONLY&&(_(c,t),a("muteUnmuteState: "+t))):a("muteUnmuteState: -1")},switchOriginalSound:function(t,e,s,r){c&&g(c,t,e,s,r)},deliverRecordedData:function(t,e,s,r){c&&m(c,t,e,0,s,r)},switchDenoise:function(t,e,s=3){c&&(w=t,S(c,!!t,s,!!e))},audioInit:function(t,e,s,r,i,o,a,n,h,u){return A(t,e,s,r,i,o,a,n,h,u)},setDecoder:function(t){C=t},needCalculateDenoiseOutput:function(){M=!0},switchHighBitrate:function(t){c&&E(c,t)},disableJitterLog:function(){y=!1},setAllSpeechVolume:function(t){c&&T(c,t)},onMonitorLogWASM:function(t,e){if(e<=0)return;const s=Module.HEAPU8.subarray(t,t+e),r=String.fromCharCode.apply(null,s);r&&(!y&&r.includes("JITTER")||r.includes("WCL_MCM_AUDIO_RECEIVE")&&f!=h.DECRPT&&f!=h.DECRPT_DECODE||r.includes("WCL_MCM_AUDIO,")&&f==h.DECRPT||(f==h.ENCODE||f==h.DECRPT||f==h.DECRPT_DECODE?n(r):f==h.DECODE?l&&l.port&&n(r,l.port):f==h.WORKLET_APM_ONLY&&l.port&&l.port.postMessage({status:"SPEECH_LOG",data:{log:r}})))},onGlobalTracingLogWASM:function(t,e,s,r){if(e<=0)return;const i=Module.HEAPU8.subarray(t,t+e);let o=String.fromCharCode.apply(null,i);if(o){if(1==r){const t=`${r}_${s}_${o.substring(0,100)}`,e=(d.get(t)||0)+1;if(d.set(t,e),!p.includes(e)&&(e<256||e%256!=0))return;o=`${o} [Count: ${e}] `}switch(s){case 0:case 2:break;case 1:postMessage({status:61,errorMessage:"[WASM audio] "+o,level:"low"});break;case 3:!function(t,e=null){var s,r;if(e instanceof Error||e instanceof ErrorEvent){const i=e;t+=" Code: "+(null==i?void 0:i.code)+" Message: "+(null==e?void 0:e.message)+" Stack: "+(null!==(r=null===(s=null==i?void 0:i.error)||void 0===s?void 0:s.stack)&&void 0!==r?r:null==i?void 0:i.stack),e=null}postMessage({status:61,errorMessage:t,errorEvent:e})}("[WASM audio] "+o)}}},onMuteSpeechWarningWASM:function(){postMessage({status:121})},onAudioLevelWASM:function(t,e,s){f!=h.ENCODE&&f!=h.WORKLET_APM_ONLY||1==t&&(0===e&&0===v||(v=e,f===h.ENCODE?postMessage({status:38,value:e}):(null==l?void 0:l.port)&&l.port.postMessage({status:38,data:e})))},onAPMProcessedPCMWASM:function(t,e,s,r){if(!w)return;let i=Module.HEAPF32.subarray(t/4,t/4+e);if(C){if(M){M=!1;let{sumRms:t}=function(t,e){let s=0,r=0;for(let i=0;i<t.length;i+=e){r+=t[i]*t[i];let e=Math.abs(t[i]);e>s&&(s=e)}return s=s>1?1:s,{sumRms:r/t.length/e,absMax:s}}(i,2),e=function(t){let e=0;return e=t>.1995?15:t>.0794?14:t>.0316?13:t>.0126?12:t>.005?11:t>.002?10:t>79433e-8?9:t>31623e-8?8:t>12589e-8?7:t>50119e-9?6:t>19953e-9?5:t>79433e-10?4:t>31623e-10?3:t>12589e-10?2:t>5.0119e-7?1:0,e}(t);l.port&&l.port.postMessage({status:"AUDIO_LEVEL_R16_DENOISE",level:e})}C.push([i])}},onSenderStatsLogWASM:function(t,e,s,r,i,o){e=Date.now(),f===h.ENCODE&&postMessage({status:206,data:{ssrc:t,timestamp:e,roundTripTime:s,jitter:r,packetsLost:i,packetsSent:o,kind:"audio"}})},onReceiverStatsLogWASM:function(t,e,s,r,i,o){}};class D{constructor(){this.cacheSize=0,this.sameCacheSizeCounter=0}shouldSendCacheSize(t){return t===this.cacheSize&&this.sameCacheSizeCounter++,(this.cacheSize!==t||200===this.sameCacheSizeCounter)&&(this.sameCacheSizeCounter=0,this.cacheSize=t,!0)}}class L{constructor(t,e,s){let r=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(t),this.sabBuffer=new Float32Array(e),this.perFrameLength=s,this.writeChannelNumb=r,this.bufferLen=this.sabBuffer.length,this.supportSpecialOptimization=this.bufferLen%s==0,this.bufferIndex=null,this.supportSpecialOptimization){let t=this.bufferLen/s;this.bufferIndex=[];for(let e=0;e<t;e++)this.bufferIndex.push(this.sabBuffer.subarray(e*s,e*s+s))}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 D}getCacheSize(){return Atomics.load(this.sabState,this.STATE_CACHE_SIZE)}setCacheSize(t){t>this.CACHE_SIZE_MAX_VALUE&&(t=this.CACHE_SIZE_MAX_VALUE),t<this.CACHE_SIZE_MIN_VALUE&&(t=this.CACHE_SIZE_MIN_VALUE),this.onCacheSizeChange&&this.cacheSizeController.shouldSendCacheSize(t)&&this.onCacheSizeChange(t),Atomics.store(this.sabState,this.STATE_CACHE_SIZE,t)}setQuantumSize(t){this.QUANTUM_SIZE=t,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 t=Atomics.load(this.sabState,this.STATE_CACHE_SIZE);return Atomics.load(this.sabState,this.STATE_DATA_COUNT)<t*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(t){if(void 0===t[0]||t[0].length*this.writeChannelNumb!==this.perFrameLength)return;let e=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),e?this.supportSpecialOptimization?this.writeSpecial(t):this.writeNormal(t):void 0}writeNormal(t){let e=this.sabState[this.STATE_WRITE_INDEX];for(let s=0;s<this.writeChannelNumb;s++)for(let r=0;t[s]&&r<t[s].length;r++)this.sabBuffer[(e+r*this.writeChannelNumb+s)%this.bufferLen]=t[s][r];e+=this.perFrameLength,e>=this.bufferLen&&(e-=this.bufferLen),this.sabState[this.STATE_WRITE_INDEX]=e,Atomics.add(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength)}writeSpecial(t){let e=this.sabState[this.STATE_WRITE_INDEX];for(let s=0;s<this.writeChannelNumb;s++)for(let r=0;t[s]&&r<t[s].length;r++)this.bufferIndex[e][r*this.writeChannelNumb+s]=t[s][r];e=(e+1)%this.bufferIndex.length,this.sabState[this.STATE_WRITE_INDEX]=e,Atomics.add(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength)}read(){let t=this.sabState[this.STATE_READ_READY],e=this.sabState[this.STATE_WRITE_READY];if(t||(this.sabState[this.STATE_READ_READY]=this.STATY_READY_YES,this.sabState[this.STATE_READ_INDEX]=0),!e)return null;let s=this.supportSpecialOptimization?this.readSpecial():this.readNormal();return null===s?this.shouldAdjustCacheBuffer():this._counter++,s}readNormal(){let t=this.sabState[this.STATE_READ_INDEX],e=Atomics.load(this.sabState,this.STATE_DATA_COUNT);if(e<this.perFrameLength)return null;if(e>this.bufferLen){let s=Math.ceil((e-this.bufferLen)/this.perFrameLength)+1;t=(s*this.perFrameLength+t)%this.bufferLen,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,s*this.perFrameLength)}let s=null;if(this.bufferLen-t>=this.perFrameLength)s=this.sabBuffer.subarray(t,t+this.perFrameLength);else{let e=this.sabBuffer.subarray(t),r=this.sabBuffer.subarray(0,this.perFrameLength-e.length);s=this.placeBuffer,s.set(e),s.set(r,e.length)}return t+=this.perFrameLength,t>=this.bufferLen&&(t-=this.bufferLen),this.sabState[this.STATE_READ_INDEX]=t,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength),s}readSpecial(){let t=this.sabState[this.STATE_READ_INDEX],e=Atomics.load(this.sabState,this.STATE_DATA_COUNT);if(e<this.perFrameLength)return null;if(e>this.bufferLen){let s=Math.ceil((e-this.bufferLen)/this.perFrameLength)+1;t=(s+t)%this.bufferIndex.length,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,s*this.perFrameLength)}let s=this.bufferIndex[t];return t=(t+1)%this.bufferIndex.length,this.sabState[this.STATE_READ_INDEX]=t,Atomics.sub(this.sabState,this.STATE_DATA_COUNT,this.perFrameLength),s}}class R{constructor(t,e){let s=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;this.rframes=t,this.wframes=e,this.writeChannelNumb=s,this.cap=this.lcm(t,e),this.buffer=new Float32Array(this.cap),this.remain=0,this.woffset=0,this.roffset=0}gcd(t,e){return 0===e?t:this.gcd(e,t%e)}lcm(t,e){return t/this.gcd(t,e)*e}push(t){if(null==t[0]||t[0].length*this.writeChannelNumb==this.wframes){for(let e=0;e<this.writeChannelNumb;e++)for(let s=0;s<t[0].length;s++)this.buffer[(this.woffset+s*this.writeChannelNumb+e)%this.cap]=t[e]?t[e][s]:t[0][s];this.woffset+=this.wframes,this.remain+=this.wframes,this.woffset>=this.cap&&(this.woffset=this.woffset%this.cap)}else{var e;console.error("[Audio] critical error in AudioWorklet: data.length:",t.length,"this.woffset:",this.woffset,"this.cap:",this.cap),_workletPrinter&&_workletPrinter.error("critical error in AudioWorklet: ".concat(null===(e=t[0])||void 0===e?void 0:e.length," ").concat(his.writeChannelNumb," ").concat(this.wframes))}}read(){if(!this.hasData())return null;let t=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),t}hasData(){return this.remain>=this.rframes}clear(){this.buffer.fill(0),this.remain=0,this.woffset=0,this.roffset=0}}e().onWasmModuleReady=function(){P.onWasmModuleReady(Module),x=Module.cwrap("_Audio_Init","number",["number","string","string","number","number","boolean","boolean","boolean","number","boolean"]),(U=x(j,Y,H,0,0,!0,!1,!1,1))?P.setAudioInstanceAndType(U,P.WASMTYPE.DECODE,nt):_workletPrinter.error("audio_handle not exist"),F=Module.cwrap("_Audio_Try_Analysis","number",["number","number","number","number"]),W=Module.cwrap("_Get_Mixed_Audio","number",["number","number","number","number"]),z=Module.cwrap("_setMultiViewFlag","number",["number","boolean"]),q=Module.cwrap("_Interpretation_Configure","number",["number","number","number","number"]),K=Module.cwrap("_Set_Speech_Volume_Level","number",["number","number","number"]),Module.cwrap("_Get_Receiver_Monitor_Statistics","number",["number"]),st=Module.cwrap("_Set_Audio_Statistics_Flag","number",["number","boolean"]),Q=Module._malloc(4*tt),Module.HEAPU32.subarray(Q/4,Q/4+tt),z(U,Z),J=Module._malloc(et),Module.HEAP8.subarray(J,J+et),nt.port.postMessage({status:"WASM_INIT_SUCCESS",data:{audio_handle:0!==U}})},e().onAbort=function(t){_workletPrinter.error("WASM onAbort "+(t?t.message:""),t)},e().preInit=function(t){_workletPrinter.debug("WASM preInit"+(t?t.message:""),t)},e().preRun=function(t){_workletPrinter.debug("WASM preRun"+(t?t.message:""),t)},e()._workletPrinter=new class{constructor(t){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=t}setUserAgent(t){this.userAgent=t,this.userAgent.match(/AppleWebKit\/(\d+)\./)&&(this.isSafari=!0)}setAuidoNodePort(t){this.auidoNodePort=t}debug(t){t=this.messageHeader+t;for(var e=arguments.length,s=new Array(e>1?e-1:0),r=1;r<e;r++)s[r-1]=arguments[r];this.print_({level:"debug",message:t,data:s})}log(t){t=this.messageHeader+t;for(var e=arguments.length,s=new Array(e>1?e-1:0),r=1;r<e;r++)s[r-1]=arguments[r];this.print_({level:"log",message:t,data:s})}warn(t){t=this.messageHeader+t;for(var e=arguments.length,s=new Array(e>1?e-1:0),r=1;r<e;r++)s[r-1]=arguments[r];this.print_({level:"warn",message:t,data:s})}error(t){t=this.messageHeader+t;for(var e=arguments.length,s=new Array(e>1?e-1:0),r=1;r<e;r++)s[r-1]=arguments[r];this.print_({level:"error",message:t,data:s})}print_(t){if(this.messageQueue.push(t),this.auidoNodePort)for(;this.messageQueue.length;){let t=this.messageQueue.shift();this._postToWorkerPrint(t)}}_postToWorkerPrint(t){this.auidoNodePort&&this.auidoNodePort.postMessage({status:"workletMessage",data:{level:t.level,message:t.message,data:t.data}})}}("[Audio][Worklet][WASM]"),e().AudioWasmAdapter=P;class I{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 D}push(t){this.isReady=!0,this.buffList.push({buff:t,offset:0})}copy(t,e,s,r){return t.length-e<=s.length-r?(0===e?s.set(t,r):s.set(t.subarray(e),r),t.length-e):(s.set(t.subarray(e,e+s.length-r),r),s.length-r)}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(t){if(0===this.buffList.length)return t.fill(0),void this.increaseCacheSize();let e=this.buffList[0];if(e.buff.length-e.offset>=t.length)this.copy(e.buff,e.offset,t,0),e.offset+=t.length,e.offset===e.buff.length&&(this.buffList.shift(),this.onrollbackbuffer&&this.onrollbackbuffer(e.buff));else{if(this.buffList.length<2)return t.fill(0),void this.increaseCacheSize();let s=this.copy(e.buff,e.offset,t,0);this.buffList.shift(),this.onrollbackbuffer&&this.onrollbackbuffer(e.buff),e=this.buffList[0],s=this.copy(e.buff,e.offset,t,s),e.offset+=s}}requestMoreData(){this.buffList.length<this.cacheSize&&this.onneedmoredata&&this.onneedmoredata()}hasData(){return this.buffList.length>=2}}class N{constructor(t){this.buffList=[],this.frameLength=t,this.onframedata=null}copy(t,e,s,r){if(t[0].length*X<=s.length-r){for(let e=0;e<X;e++)for(let i=0;t[e]&&i<t[e].length;i++)s[r+i*X+e]=t[e][i];return(t[0].length-e)*X}for(let e=0;e<X;e++)for(let i=0;t[e]&&i<t[e].length&&r+i*X+e<s.length;i++)s[r+i*X+e]=t[e][i];return s.length-r}rollbackbuffer(t){this.buffList.push({buff:t,offset:0})}push(t){0===this.buffList.length&&this.buffList.push({buff:new Float32Array(this.frameLength),offset:0});let e=this.buffList[0];if(e.buff.length-e.offset>=t[0].length*X){let s=this.copy(t,0,e.buff,e.offset);e.offset+=s,e.buff.length===e.offset&&(this.buffList.shift(),this.onframedata&&this.onframedata(e.buff))}else{let s=this.copy(t,0,e.buff,e.offset);if(this.buffList.shift(),this.onframedata&&this.onframedata(e.buff),t[0].length*X>s){let e=[];for(let r=0;r<X;r++)e.push(t[r].subarray(Math.floor(s/X)+(s%X>r?1:0)));this.push(e)}}}}class O{constructor(t,e){this.context=e,this.decodePort=null,this.encodePort=null,this.captureSize=t/100*X,this.playBuffer=new I,this.playBuffer.onrollbackbuffer=t=>{this.decodePort},this.playBuffer.onneedmoredata=()=>{this.decodePort&&this.decodePort.postMessage({status:1})},this.playBuffer.onCacheSizeChange=t=>{this.decodePort&&this.decodePort.postMessage({status:3,cacheSize:t})},this.quantum=new Float32Array(128*G),this.captureBuffer=new N(this.captureSize),this.captureBuffer.onframedata=t=>{this.encodePort&&this.encodePort.postMessage({command:2,buffer:t},[t.buffer])}}setDecodePort(t){this.decodePort&&this.decodePort.close(),this.decodePort=t,this.decodePort.onmessage=this.handleDecodeData.bind(this)}setEncodePort(t){this.encodePort&&this.encodePort.close(),this.encodePort=t,this.encodePort.onmessage=this.handleEncodeData.bind(this)}handleDecodeData(t){this.context.isPlaying&&this.playBuffer.push(t.data.data)}handleEncodeData(t){0===t.data.event&&this.captureBuffer.rollbackbuffer(t.data.buffer)}requestMoreData(){this.playBuffer.requestMoreData()}close(){this.decodePort&&(this.decodePort=null,this.decodePort.close()),this.encodePort&&(this.encodePort=null,this.encodePort.close())}write(t){this.captureBuffer.push(t)}read(){return this.playBuffer.copyTo(this.quantum),this.requestMoreData(),this.quantum}}let k="undefined"!=typeof SharedArrayBuffer,B=!0;var x=null,F=null,U=null,W=null,z=null;let H=0,Y=0,j=0,V=0,Z=!1,X=1,G=1,$=null;var q,Q,K,J,tt=10;let et=1500;var st,rt={audioStatisticsFlag:!1};function it(t){let e=t[1];return 4294967296*t[2]+e}new Map,e().update_play_time=function(t,e){if(e){var s=new Uint8Array(e),r=Module.HEAP8.subarray(t+0,t+e);if(s.set(r),Z){var i;null===(i=nt.videoDecodePort)||void 0===i||i.postMessage({status:1,data:s},[s.buffer])}else{let t=new Uint32Array(s.buffer),e=null,r=null,i=0,o=0;for(let a=0;a<s.length/16;a++){let s=t[4*a];512&s?(e=t.subarray(4*a,4*a+4),o=it(e)):s>>10==V>>10&&(r=t.subarray(4*a,4*a+4),i=it(r))}if(!i&&!o)return;nt.port.postMessage({status:57,at:i,st:o})}}};let ot=null,at=null;e().frame_callback=function(t,e,s,r,i,o,a,n){ot===t&&at.length==e*a||(at=Module.HEAPF32.subarray(t/4,t/4+e*a),ot=t),$.push([at])};let nt=null;class ht extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:"pcm",defaultValue:1}]}constructor(t){var s,r;super(),nt=this,monitorLOG("WIB"),this.port.onmessage=this.handleMessage.bind(this),this.isPlaying=!1,this.isCapturing=!1,this.wasmModule=null==t||null===(s=t.processorOptions)||void 0===s?void 0:s.wasmModule,t&&t.processorOptions&&(t.processorOptions.audioEncodeChannelsNum&&(X=t.processorOptions.audioEncodeChannelsNum),t.processorOptions.audioDecodeChannelsNum&&(G=t.processorOptions.audioDecodeChannelsNum)),this.SABConstructor(t&&t.processorOptions?t.processorOptions.sharedBuffer:null),this.noSABConstructor(),e().fsHandler&&e().fsHandler.setPort(this.port),null!=t&&null!==(r=t.processorOptions)&&void 0!==r&&r.userAgent&&_workletPrinter.setUserAgent(t.processorOptions.userAgent),_workletPrinter.setAuidoNodePort(this.port),monitorLOG("WIE")}SABConstructor(t){this.sampleRate_=0,this.g_sharedbuffer=t||null,this.encodeSAB=null,this.decodeSAB=null,this.audioEncodePort=null,this.audioDecodePort=null,this.videoDecodePort=null,this.rtpSAB=null,this.stopPlayAudio=!1,$=new R(128*G,sampleRate/100*G)}noSABConstructor(){this.audioProcessBuffer=new O(sampleRate,this),this.isRunning=!0}handleMessage(t){const{status:e,data:s}=t.data;switch(e){case"diableSharedArrayBuffer":k=!1;break;case"disableDecoderinworklet":B=!1;break;case"data":console.info("Dropped audio data before initialized");break;case"stopPlayAudio":this.isPlaying=!1;break;case"stopWorklet":lt=!0;break;case"startPlayAudio":this.isPlaying=!0;break;case"StartCaptureAudio":this.isCapturing=!0;break;case"sampleRate":this.sampleRate_=s;break;case"audiowasm":try{initWasm(Module,this.wasmModule)}catch(t){nt.port.postMessage({status:"WASM_INIT_FAILED"}),_workletPrinter.error("init WASM failed, error message:"+t.message+t.stack)}break;case"initData":j=s.userid,H=s.meetingid,Y=s.meetingnum;break;case"currentSSRC":V=s;break;case"stop_audio_incoming":this.stopPlayAudio=s;break;case"codecDoAVSync":Z=!0,z&&U&&z(U,!0);break;case"checkProcess":{monitorLOG("PCC"+ft);let t=parseInt(1e3*dt/this.sampleRate_);monitorLOG("ADD:"+t),!ft!==pt&&(pt=!ft,nt.port.postMessage({status:"PROCESS_EXCEPTIONS",data:pt})),ft=0,dt=0;break}case"interpretation_set_lang":Module.HEAPU32.subarray(Q/4,Q/4+tt)[0]=s.lang,q(U,1,Q,1);break;case"interpretation_enable":Module.HEAPU32.subarray(Q/4,Q/4+tt)[0]=s.enable?1:0,q(U,0,Q,1);break;case"interpretation_mute_origin":Module.HEAPU32.subarray(Q/4,Q/4+tt)[0]=s.mute?1:0,q(U,2,Q,1);break;case"interpretation_set_interpreter":{let t=Module.HEAPU32.subarray(Q/4,Q/4+tt),e=Q;s.interpreterList.length>=tt&&(e=Module._malloc(4*s.interpreterList.length),t=Module.HEAPU32.subarray(e/4,e/4+s.interpreterList.length));for(let e=0;e<s.interpreterList.length;e++)t[e]=s.interpreterList[e];q(U,3,e,s.interpreterList.length),s.interpreterList.length>=tt&&Module._free(e);break}case"setSpeechVolumeLevel":if(!U)return;K(U,s.userid,s.volume);break;case 131:P.setAllSpeechVolume(s.volume);break;case 160:rt.audioStatisticsFlag=!!s.enable,r=rt.audioStatisticsFlag,U&&st(U,r);break;default:k?this.handleMessageForSAB(t):this.handleMessageForNoSAB(t)}var r}handleMessageForSAB(t){const{status:e,data:s}=t.data;switch(e){case"encodeAudioPort":this.audioEncodePort&&this.audioEncodePort.close(),this.audioEncodePort=t.ports[0];break;case"decodeAudioPort":this.audioDecodePort&&this.audioDecodePort.close(),this.audioDecodePort=t.ports[0],this.audioDecodePort.onmessage=function(t){};break;case"decodeVideoPort":this.videoDecodePort&&this.videoDecodePort.close(),this.videoDecodePort=t.ports[0];break;case"close":break;case"sharedBuffer":s&&(this.g_sharedbuffer=s),this.g_sharedbuffer&&(this.encodeSAB=new L(this.g_sharedbuffer.inputState,this.g_sharedbuffer.inputBuffer,128*X,X),this.decodeSAB=new L(this.g_sharedbuffer.outputState,this.g_sharedbuffer.outputBuffer,128*G),this.g_sharedbuffer.echoState&&this.g_sharedbuffer.echoBuffer&&(this.echoSAB=new L(this.g_sharedbuffer.echoState,this.g_sharedbuffer.echoBuffer,128*G,G)),this.rtpSAB=new i(this.g_sharedbuffer.rtpBuffer,1200),this.decodeSAB.onCacheSizeChange=t=>{this.audioDecodePort&&this.audioDecodePort.postMessage({status:3,cacheSize:t,isSAB:!0})});break;default:console.warn("unhanle commands in audioworklet",e)}}handleMessageForNoSAB(t){const{status:e}=t.data;switch(e){case"encodeAudioPort":this.audioProcessBuffer.setEncodePort(t.ports[0]);break;case"decodeAudioPort":this.audioProcessBuffer.setDecodePort(t.ports[0]);break;case"close":this.audioProcessBuffer.close(),this.isPlaying=!1,this.isRunning=!1;break;default:console.warn("unhanle commands in audioworklet",e)}}onReceivedRTP(){}process(t,e,s){if(ft++,lt)return!1;try{return k?B?this.SABDecodeProcess(t,e,s):this.SABProcess(t,e,s):this.NoSABprocess(t,e,s)}catch(t){return _workletPrinter.error("::process() exception: "+t.message+t.stack),!0}}NoSABprocess(t,e,s){return!(!this.isRunning||this.isPlaying&&(this.inputDataForNoSAB(t),this.outputDataForNoSAB(e),0))}inputDataForNoSAB(t){if(!t[0]||!t[0][0])return!0;let e=t[0];if(dt+=e[0].length,!ct&&t[0].length<X)try{for(let s=t[0].length;!ct&&s<X;s++)e.push(e[0])}catch(t){ct=!0,_workletPrinter.error("::inputDataForNoSAB() exception: "+t.message+t.stack)}this.audioProcessBuffer.write(e)}outputDataForNoSAB(t){let e=this.audioProcessBuffer.read();if(this.stopPlayAudio)return!0;let s=t[0];if(1===G)for(let t=0;t<s.length;t++)s[t].set(e);else for(let t=0;t<G;t++)for(let r=0;s[t]&&r<s[t].length;r++)s[t][r]=e[r*G+t]}inputData(t){if(!this.encodeSAB)return!0;dt+=t[0].length,this.encodeSAB.write(t),this.audioEncodePort.postMessage({command:2,buffer:!1})}outputDecodeData(t,s){try{$.hasData()||W&&(sampleRate!=ut&&(e().sampleRateLog(ut,sampleRate,"","",3),ut=sampleRate),W(U,sampleRate/100,0,sampleRate,G))}catch(t){_workletPrinter.error("::outputDecodeData() get_mixed_Audio exception: "+t.message+t.stack)}try{let e=$.read();if(!e)return;if(1===G)for(let s=0;s<t.length;s++)t[s].set(e);else for(let s=0;s<G;s++)for(let r=0;t[s]&&r<t[s].length;r++)t[s][r]=e[r*G+s];s&&this.echoSAB&&this.echoSAB.write(t)}catch(t){_workletPrinter.error("::outputDecodeData() set outputs exception: "+t.message+t.stack)}}outputData(t){if(!this.decodeSAB)return!0;let e=this.decodeSAB.read();if(null===e||this.stopPlayAudio)return!0;if(1===G)for(let s=0;s<t.length;s++)t[s].set(e);else for(let s=0;s<G;s++)for(let r=0;t[s]&&r<t[s].length;r++)t[s][r]=e[r*G+s]}SABDecodeProcess(t,s,r){try{if(!this.rtpSAB)return e().monitorLOG("SABN"),!0;{let t=this.rtpSAB.available_read();t>100&&(t=100);let e=this.rtpSAB.getReaderPtr(),s=0;for(;s<t;){s++;let t=this.rtpSAB.get(e);e++,U&&J&&(Module.HEAP8.subarray(J,J+et).set(t),F(U,0,J,t.length))}this.rtpSAB.setReaderPtr(e)}}catch(t){_workletPrinter.error("::SABDecodeProcess() audio_decode exception: "+t.message+t.stack)}try{let e=t[0],r=s[0];if(!this.g_sharedbuffer)return!0;if(!this.sampleRate_||!r[0])return!0;let i=e[0]&&this.isCapturing;if(i){if(e.length<X&&!ct)try{for(let t=e.length;!ct&&t<X;t++)e.push(e[0])}catch(t){ct=!0,_workletPrinter.error("::SABDecodeProcess() copy input data exception: "+t.message+t.stack)}this.inputData(e)}return this.outputDecodeData(r,i),!0}catch(t){_workletPrinter.error("::SABDecodeProcess() inputs or outputs exception: "+t.message+t.stack)}return!0}SABProcess(t,e,s){let r=t[0],i=e[0];if(!this.g_sharedbuffer)return!0;if(!this.sampleRate_||!i[0])return!0;if(r[0]&&this.isCapturing){if(!ct&&r.length<X)try{for(let t=r.length;!ct&&t<X;t++)r.push(r[0])}catch(t){ct=!0,_workletPrinter.error("::SABProcess() exception: "+t.message+t.stack)}this.inputData(r)}return this.outputData(i),!0}}var ut=0,ct=!1,lt=!1,ft=0,dt=0,pt=!1;e().LOG_OUT=function(){},e().fsHandler?(e().LOG_OUT_WEBRTC=e().fsHandler.handleFile,e().Get_ExternalRecord=e().fsHandler.handleViperPrint):(e().LOG_OUT_WEBRTC=function(){},e().Get_ExternalRecord=function(){}),e().send_data=function(){},e().monitorLOG=function(t){t&&nt.port.postMessage({status:"MONITOR_LOG",data:t})},e().sampleRateLog=function(t,s,r,i,o){if(!t&&!s)return;let a=null;switch(o){case 1:a="GGDS: ";break;case 2:a="SCAG: ";break;case 3:a="SCIW: "}let n=a+t+"|"+s+"|"+r+"|"+i;e().monitorLOG(n)},e().wcl_trace_log=function(t,s){e().fsHandler&&e().fsHandler.handleAudioSDKUtilPrint(t,s)},e().Viper_NetworkTrace=function(t,e){},registerProcessor("zoomAudioWorklet",ht)})()})();
2
+ //# sourceMappingURL=https://d1cdksi819e9z7.cloudfront.net/sourcemap/js_audio_worklet.min.js-6ef135f4bc6935cdfaa1.map
@@ -0,0 +1,2 @@
1
+ (()=>{var e={2601:(e,t,r)=>{e.exports=r(4444)},3565:(e,t,r)=>{"use strict";var n=r(1960);e.exports=n},2671:(e,t,r)=>{"use strict";r(2344),e.exports=r(5951)},4444:(e,t,r)=>{"use strict";e.exports=r(214)},214:(e,t,r)=>{"use strict";r(397);var n=r(3565);e.exports=n},2159:(e,t,r)=>{"use strict";var n=r(2250),o=r(4640),i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(o(e)+" is not a function")}},6624:(e,t,r)=>{"use strict";var n=r(6285),o=String,i=TypeError;e.exports=function(e){if(n(e))return e;throw new i(o(e)+" is not an object")}},5807:(e,t,r)=>{"use strict";var n=r(1907),o=n({}.toString),i=n("".slice);e.exports=function(e){return i(o(e),8,-1)}},1626:(e,t,r)=>{"use strict";var n=r(9447),o=r(4284),i=r(5817);e.exports=n?function(e,t,r){return o.f(e,t,i(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),i=n.document,a=o(i)&&o(i.createElement);e.exports=function(e){return a?i.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,i=r(5951),a=r(6794),s=i.process,u=i.Deno,l=s&&s.versions||u&&u.version,c=l&&l.v8;c&&(o=(n=c.split("."))[0]>0&&n[0]<4?1:+(n[0]+n[1])),!o&&a&&(!(n=a.match(/Edge\/(\d+)/))||n[1]>=74)&&(n=a.match(/Chrome\/(\d+)/))&&(o=+n[1]),e.exports=o},1091:(e,t,r)=>{"use strict";var n=r(5951),o=r(6024),i=r(2361),a=r(2250),s=r(3846).f,u=r(7463),l=r(2046),c=r(8311),f=r(1626),h=r(9724);r(6128);var _=function(e){var t=function(r,n,i){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,i)}return o(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var r,o,d,p,m,g,y,v,w,E=e.target,b=e.global,S=e.stat,A=e.proto,M=b?n:S?n[E]:n[E]&&n[E].prototype,k=b?l:l[E]||f(l,E,{})[E],T=k.prototype;for(p in t)o=!(r=u(b?p:E+(S?".":"#")+p,e.forced))&&M&&h(M,p),g=k[p],o&&(y=e.dontCallGetSet?(w=s(M,p))&&w.value:M[p]),m=o&&y?y:t[p],(r||A||typeof g!=typeof m)&&(v=e.bind&&o?c(m,n):e.wrap&&o?_(m):A&&a(m)?i(m):m,(e.sham||m&&m.sham||g&&g.sham)&&f(v,"sham",!0),f(k,p,v),A&&(h(l,d=E+"Prototype")||f(l,d,{}),f(l[d],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,i=o.apply,a=o.call;e.exports="object"==typeof Reflect&&Reflect.apply||(n?a.bind(i):function(){return a.apply(i,arguments)})},8311:(e,t,r)=>{"use strict";var n=r(2361),o=r(2159),i=r(1505),a=n(n.bind);e.exports=function(e,t){return o(e),void 0===t?e:i?a(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,i=o.call,a=n&&o.bind.bind(i,i);e.exports=n?a:function(e){return function(){return i.apply(e,arguments)}}},5582:(e,t,r)=>{"use strict";var n=r(2046),o=r(5951),i=r(2250),a=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?a(n[e])||a(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)}},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),i=n({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(o(e),t)}},3648:(e,t,r)=>{"use strict";var n=r(9447),o=r(8828),i=r(9552);e.exports=!n&&!o((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},6946:(e,t,r)=>{"use strict";var n=r(1907),o=r(8828),i=r(5807),a=Object,s=n("".split);e.exports=o((function(){return!a("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?s(e,""):a(e)}:a},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),i=/#|\.prototype\./,a=function(e,t){var r=u[s(e)];return r===c||r!==l&&(o(t)?n(t):!!t)},s=a.normalize=function(e){return String(e).replace(i,".").toLowerCase()},u=a.data={},l=a.NATIVE="N",c=a.POLYFILL="P";e.exports=a},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},5594:(e,t,r)=>{"use strict";var n=r(5582),o=r(2250),i=r(8280),a=r(1175),s=Object;e.exports=a?function(e){return"symbol"==typeof e}:function(e){var t=n("Symbol");return o(t)&&i(t.prototype,s(e))}},4284:(e,t,r)=>{"use strict";var n=r(9447),o=r(3648),i=r(8661),a=r(6624),s=r(470),u=TypeError,l=Object.defineProperty,c=Object.getOwnPropertyDescriptor,f="enumerable",h="configurable",_="writable";t.f=n?i?function(e,t,r){if(a(e),t=s(t),a(r),"function"==typeof e&&"prototype"===t&&"value"in r&&_ in r&&!r[_]){var n=c(e,t);n&&n[_]&&(e[t]=r.value,r={configurable:h in r?r[h]:n[h],enumerable:f in r?r[f]:n[f],writable:!1})}return l(e,t,r)}:l:function(e,t,r){if(a(e),t=s(t),a(r),o)try{return l(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),i=r(2574),a=r(5817),s=r(7374),u=r(470),l=r(9724),c=r(3648),f=Object.getOwnPropertyDescriptor;t.f=n?f:function(e,t){if(e=s(e),t=u(t),c)try{return f(e,t)}catch(e){}if(l(e,t))return a(!o(i.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),i=r(6285),a=TypeError;e.exports=function(e,t){var r,s;if("string"===t&&o(r=e.toString)&&!i(s=n(r,e)))return s;if(o(r=e.valueOf)&&!i(s=n(r,e)))return s;if("string"!==t&&o(r=e.toString)&&!i(s=n(r,e)))return s;throw new a("Can't convert object to primitive value")}},2046:e=>{"use strict";e.exports={}},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),i=r(2532),a="__core-js_shared__",s=e.exports=o[a]||i(a,{});(s.versions||(s.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),i=r(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!o((function(){var e=Symbol("symbol detection");return!i(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),i=r(5594),a=r(9367),s=r(581),u=r(6264),l=TypeError,c=u("toPrimitive");e.exports=function(e,t){if(!o(e)||i(e))return e;var r,u=a(e,c);if(u){if(void 0===t&&(t="default"),r=n(u,e,t),!o(r)||i(r))return r;throw new l("Can't convert object to primitive value")}return void 0===t&&(t="number"),s(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+""}},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,i=Math.random(),a=n(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+a(++o+i,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),i=r(9724),a=r(6499),s=r(9846),u=r(1175),l=n.Symbol,c=o("wks"),f=u?l.for||l:l&&l.withoutSetter||a;e.exports=function(e){return i(c,e)||(c[e]=s&&i(l,e)?l[e]:f("Symbol."+e)),c[e]}},2344:(e,t,r)=>{"use strict";var n=r(1091),o=r(5951);n({global:!0,forced:o.globalThis!==o},{globalThis:o})},397:(e,t,r)=>{"use strict";r(2344)},1960:(e,t,r)=>{"use strict";var n=r(2671);e.exports=n}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.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,i="MEDIASDK_CACHE_INFO";function a(e){postMessage({status:35,data:e})}function s(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: ${t.filename}`),(t.lineno||t.colno)&&(r+=` Line: ${t.lineno}:${t.colno}`),t.message&&(r+=` Message: ${t.message}`),t.error&&(r+=`\nStack: ${t.error.stack}`)):t instanceof Error?(t.message&&(r+=` Message: ${t.message}`),t.stack&&(r+=` Stack: ${t.stack}`),t.name&&(r+=` Name: ${t.name}`),t.constraint&&(r+=` Constraint: ${t.constraint}`)):t instanceof CloseEvent?(t.code&&(r+=` Code: ${t.code}`),t.reason&&(r+=` Reason: ${t.reason}`),r+=` wasClean: ${t.wasClean}`):t instanceof DOMException?(t.message&&(r+=` Message: ${t.message}`),t.name&&(r+=` Name: ${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 a=n?`${o.join("|")}:${n}|----|`:"";switch(r){case"log":this._log(n,[...o,i]);break;case"warn":case"error":case"severityerror":case"directReport":e+=a}})),e&&this._directReport(e,[i]),this.cacheLogStack=[],this.isFlushing=!1}}log(e,t=[]){this._instance?(this.flushCacheLog(),this._log(e,t)):this._addCacheLog("log",{message:e,tags:t})}warn(e,t=null,r=[]){e=this.getMessageFromErrorOrEvent(e,t),this._instance?(this.flushCacheLog(),this._warn(e,r)):this._addCacheLog("warn",{message:e,tags:r})}error(e,t=null,r=[]){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,t=[]){this._instance?(this.flushCacheLog(),this._severityerror(JSON.stringify(e),t)):this._addCacheLog("severityerror",{message:JSON.stringify(e),tags:t})}directReport(e,t=["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,t=[]){this._instance&&this._instance.log(e,t)}_warn(e,t=[]){this._instance&&this._instance.warn(e,t)}_error(e,t=[]){this._instance&&this._instance.error(e,[this.fixVersion,...t])}_severityerror(e,t=[]){this._instance&&this._instance.error(e,t)}_directReport(e,t=[]){var r,n;this._instance&&(null===(n=(r=this._instance).directReport)||void 0===n||n.call(r,{msg:e},t))}clearHighFrequencyLogs(){this._highFrequencyLogs={}}},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&&n.lastTime&&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)}},new class{constructor(){this.ssrcInfoMap=new Map,this.timer=null}updateSSRCInfo(e,t){this.ssrcInfoMap.has(e)||this.ssrcInfoMap.set(e,{timeList:[],lastTime:0,fps:0}),this._calculateFPS(e,t),this._removeZeroFPS(),this._checkIfNewFrameComing()}_calculateFPS(e,t){const r=this.ssrcInfoMap.get(e);if(r.timeList.push(t),r.lastTime=t,r.timeList.length>2){const t=r.timeList[0],n=r.timeList[r.timeList.length-1];if(n-t>=1e3){const o=Math.floor(1e3/((n-t)/(r.timeList.length-1)));r.fps!==o&&(this._notifyFPS(e,o),r.fps=o),r.timeList=[]}}r.timeList.length>30&&(r.timeList=r.timeList.slice(r.timeList.length-30))}_removeZeroFPS(){this.ssrcInfoMap.forEach(((e,t)=>{const r=this.ssrcInfoMap.get(t);r&&Date.now()-r.lastTime>2e3&&(this.ssrcInfoMap.delete(t),this._notifyFPS(t,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},l={MUTE:0,UNMUTE:1,LEAVED:2,MUTE_APM_ONLY:3,UNMUTE_APM_ONLY:4};let c,f,h=0;const _=new Map,d=[1,2,4,8,16,32,64,128,256];let p,m,g,y,v,w,E,b,S=!0;var A=0,M=!1,k=null,T=!1;const D={WASMTYPE:u,AUDIO_STATE:l,onWasmModuleReady:function(e){if(!e)return console.warn("[AudioWASMAdapter] Module undefined");p=e.cwrap("_Heartbeat","number",["number"]),m=e.cwrap("_MuteUnmuteState","number",["number","number"]),g=e.cwrap("_Switch_Original_Sound","number",["number","boolean","boolean","boolean","boolean"]),y=e.cwrap("_Deliver_Recorded_Data","number",["number","number","number","number","number","number"]),v=e.cwrap("_Switch_Denoise","number",["number","boolean","number","boolean"]),w=e.cwrap("_Audio_Init","number",["number","string","string","number","number","boolean","boolean","boolean","number","boolean"]),E=e.cwrap("_Switch_High_Bitrate","number",["number","number"]),b=e.cwrap("_Set_All_Speech_Volume_Level","number",["number"])},setAudioInstanceAndType:function(e,t,r){c=e,t&&(h=t),r&&(f=r)},muteUnmuteState:function(e){if(null!=Object.values(l).find((t=>t==e)))return c?void(h!=u.WORKLET_APM_ONLY&&(m(c,e),a("muteUnmuteState: "+e))):a("muteUnmuteState: -1")},switchOriginalSound:function(e,t,r,n){c&&g(c,e,t,r,n)},deliverRecordedData:function(e,t,r,n){c&&y(c,e,t,0,r,n)},switchDenoise:function(e,t,r=3){c&&(M=e,v(c,!!e,r,!!t))},audioInit:function(e,t,r,n,o,i,a,s,u,l){return w(e,t,r,n,o,i,a,s,u,l)},setDecoder:function(e){k=e},needCalculateDenoiseOutput:function(){T=!0},switchHighBitrate:function(e){c&&E(c,e)},disableJitterLog:function(){S=!1},setAllSpeechVolume:function(e){c&&b(c,e)},onMonitorLogWASM:function(e,t){if(t<=0)return;const r=Module.HEAPU8.subarray(e,e+t),n=String.fromCharCode.apply(null,r);n&&(!S&&n.includes("JITTER")||n.includes("WCL_MCM_AUDIO_RECEIVE")&&h!=u.DECRPT&&h!=u.DECRPT_DECODE||n.includes("WCL_MCM_AUDIO,")&&h==u.DECRPT||(h==u.ENCODE||h==u.DECRPT||h==u.DECRPT_DECODE?s(n):h==u.DECODE?f&&f.port&&s(n,f.port):h==u.WORKLET_APM_ONLY&&f.port&&f.port.postMessage({status:"SPEECH_LOG",data:{log:n}})))},onGlobalTracingLogWASM:function(e,t,r,n){if(t<=0)return;const o=Module.HEAPU8.subarray(e,e+t);let i=String.fromCharCode.apply(null,o);if(i){if(1==n){const e=`${n}_${r}_${i.substring(0,100)}`,t=(_.get(e)||0)+1;if(_.set(e,t),!d.includes(t)&&(t<256||t%256!=0))return;i=`${i} [Count: ${t}] `}switch(r){case 0:case 2:break;case 1:postMessage({status:61,errorMessage:"[WASM audio] "+i,level:"low"});break;case 3:!function(e,t=null){var r,n;if(t instanceof Error||t instanceof ErrorEvent){const o=t;e+=" Code: "+(null==o?void 0:o.code)+" Message: "+(null==t?void 0:t.message)+" Stack: "+(null!==(n=null===(r=null==o?void 0:o.error)||void 0===r?void 0:r.stack)&&void 0!==n?n:null==o?void 0:o.stack),t=null}postMessage({status:61,errorMessage:e,errorEvent:t})}("[WASM audio] "+i)}}},onMuteSpeechWarningWASM:function(){postMessage({status:121})},onAudioLevelWASM:function(e,t,r){h!=u.ENCODE&&h!=u.WORKLET_APM_ONLY||1==e&&(0===t&&0===A||(A=t,h===u.ENCODE?postMessage({status:38,value:t}):(null==f?void 0:f.port)&&f.port.postMessage({status:38,data:t})))},onAPMProcessedPCMWASM:function(e,t,r,n){if(!M)return;let o=Module.HEAPF32.subarray(e/4,e/4+t);if(k){if(T){T=!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})}k.push([o])}},onSenderStatsLogWASM:function(e,t,r,n,o,i){t=Date.now(),h===u.ENCODE&&postMessage({status:206,data:{ssrc:e,timestamp:t,roundTripTime:r,jitter:n,packetsLost:o,packetsSent:i,kind:"audio"}})},onReceiverStatsLogWASM:function(e,t,r,n,o,i){}};class C{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 P{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 C}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 R{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),x=Module.cwrap("_Audio_Init","number",["number","string","string","number","number","boolean","boolean","boolean","number","boolean"]),(j=x(Y,H,W,0,0,!0,!1,!1,1))?D.setAudioInstanceAndType(j,D.WASMTYPE.DECODE,se):_workletPrinter.error("audio_handle not exist"),N=Module.cwrap("_Audio_Try_Analysis","number",["number","number","number","number"]),U=Module.cwrap("_Get_Mixed_Audio","number",["number","number","number","number"]),z=Module.cwrap("_setMultiViewFlag","number",["number","boolean"]),K=Module.cwrap("_Interpretation_Configure","number",["number","number","number","number"]),Q=Module.cwrap("_Set_Speech_Volume_Level","number",["number","number","number"]),Module.cwrap("_Get_Receiver_Monitor_Statistics","number",["number"]),re=Module.cwrap("_Set_Audio_Statistics_Flag","number",["number","boolean"]),$=Module._malloc(4*ee),Module.HEAPU32.subarray($/4,$/4+ee),z(j,G),J=Module._malloc(te),Module.HEAP8.subarray(J,J+te),se.port.postMessage({status:"WASM_INIT_SUCCESS",data:{audio_handle:0!==j}})},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 L{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 C}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 F{constructor(e){this.buffList=[],this.frameLength=e,this.onframedata=null}copy(e,t,r,n){if(e[0].length*Z<=r.length-n){for(let t=0;t<Z;t++)for(let o=0;e[t]&&o<e[t].length;o++)r[n+o*Z+t]=e[t][o];return(e[0].length-t)*Z}for(let t=0;t<Z;t++)for(let o=0;e[t]&&o<e[t].length&&n+o*Z+t<r.length;o++)r[n+o*Z+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*Z){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*Z>r){let t=[];for(let n=0;n<Z;n++)t.push(e[n].subarray(Math.floor(r/Z)+(r%Z>n?1:0)));this.push(t)}}}}class I{constructor(e,t){this.context=t,this.decodePort=null,this.encodePort=null,this.captureSize=e/100*Z,this.playBuffer=new L,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*q),this.captureBuffer=new F(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 O="undefined"!=typeof SharedArrayBuffer,B=!0;var x=null,N=null,j=null,U=null,z=null;let W=0,H=0,Y=0,V=0,G=!1,Z=1,q=1,X=null;var K,$,Q,J,ee=10;let te=1500;var re,ne={audioStatisticsFlag:!1};function oe(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),G){var o;null===(o=se.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,i=0;for(let a=0;a<r.length/16;a++){let r=e[4*a];512&r?(t=e.subarray(4*a,4*a+4),i=oe(t)):r>>10==V>>10&&(n=e.subarray(4*a,4*a+4),o=oe(n))}if(!o&&!i)return;se.port.postMessage({status:57,at:o,st:i})}}};let ie=null,ae=null;t().frame_callback=function(e,t,r,n,o,i,a,s){ie===e&&ae.length==t*a||(ae=Module.HEAPF32.subarray(e/4,e/4+t*a),ie=e),X.push([ae])};let se=null;class ue extends AudioWorkletProcessor{static get parameterDescriptors(){return[{name:"pcm",defaultValue:1}]}constructor(e){var r,n;super(),se=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&&(Z=e.processorOptions.audioEncodeChannelsNum),e.processorOptions.audioDecodeChannelsNum&&(q=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,X=new R(128*q,sampleRate/100*q)}noSABConstructor(){this.audioProcessBuffer=new I(sampleRate,this),this.isRunning=!0}handleMessage(e){const{status:t,data:r}=e.data;switch(t){case"diableSharedArrayBuffer":O=!1;break;case"disableDecoderinworklet":B=!1;break;case"data":console.info("Dropped audio data before initialized");break;case"stopPlayAudio":this.isPlaying=!1;break;case"stopWorklet":fe=!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){se.port.postMessage({status:"WASM_INIT_FAILED"}),_workletPrinter.error("init WASM failed, error message:"+e.message+e.stack)}break;case"initData":Y=r.userid,W=r.meetingid,H=r.meetingnum;break;case"currentSSRC":V=r;break;case"stop_audio_incoming":this.stopPlayAudio=r;break;case"codecDoAVSync":G=!0,z&&j&&z(j,!0);break;case"checkProcess":{monitorLOG("PCC"+he);let e=parseInt(1e3*_e/this.sampleRate_);monitorLOG("ADD:"+e),!he!==de&&(de=!he,se.port.postMessage({status:"PROCESS_EXCEPTIONS",data:de})),he=0,_e=0;break}case"interpretation_set_lang":Module.HEAPU32.subarray($/4,$/4+ee)[0]=r.lang,K(j,1,$,1);break;case"interpretation_enable":Module.HEAPU32.subarray($/4,$/4+ee)[0]=r.enable?1:0,K(j,0,$,1);break;case"interpretation_mute_origin":Module.HEAPU32.subarray($/4,$/4+ee)[0]=r.mute?1:0,K(j,2,$,1);break;case"interpretation_set_interpreter":{let e=Module.HEAPU32.subarray($/4,$/4+ee),t=$;r.interpreterList.length>=ee&&(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];K(j,3,t,r.interpreterList.length),r.interpreterList.length>=ee&&Module._free(t);break}case"setSpeechVolumeLevel":if(!j)return;Q(j,r.userid,r.volume);break;case 131:D.setAllSpeechVolume(r.volume);break;case 160:ne.audioStatisticsFlag=!!r.enable,n=ne.audioStatisticsFlag,j&&re(j,n);break;default:O?this.handleMessageForSAB(e):this.handleMessageForNoSAB(e)}var n}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 P(this.g_sharedbuffer.inputState,this.g_sharedbuffer.inputBuffer,128*Z,Z),this.decodeSAB=new P(this.g_sharedbuffer.outputState,this.g_sharedbuffer.outputBuffer,128*q),this.g_sharedbuffer.echoState&&this.g_sharedbuffer.echoBuffer&&(this.echoSAB=new P(this.g_sharedbuffer.echoState,this.g_sharedbuffer.echoBuffer,128*q,q)),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(he++,fe)return!1;try{return O?B?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(_e+=t[0].length,!ce&&e[0].length<Z)try{for(let r=e[0].length;!ce&&r<Z;r++)t.push(t[0])}catch(e){ce=!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===q)for(let e=0;e<r.length;e++)r[e].set(t);else for(let e=0;e<q;e++)for(let n=0;r[e]&&n<r[e].length;n++)r[e][n]=t[n*q+e]}inputData(e){if(!this.encodeSAB)return!0;_e+=e[0].length,this.encodeSAB.write(e),this.audioEncodePort.postMessage({command:2,buffer:!1})}outputDecodeData(e,r){try{X.hasData()||U&&(sampleRate!=le&&(t().sampleRateLog(le,sampleRate,"","",3),le=sampleRate),U(j,sampleRate/100,0,sampleRate,q))}catch(e){_workletPrinter.error("::outputDecodeData() get_mixed_Audio exception: "+e.message+e.stack)}try{let t=X.read();if(!t)return;if(1===q)for(let r=0;r<e.length;r++)e[r].set(t);else for(let r=0;r<q;r++)for(let n=0;e[r]&&n<e[r].length;n++)e[r][n]=t[n*q+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===q)for(let r=0;r<e.length;r++)e[r].set(t);else for(let r=0;r<q;r++)for(let n=0;e[r]&&n<e[r].length;n++)e[r][n]=t[n*q+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++,j&&J&&(Module.HEAP8.subarray(J,J+te).set(e),N(j,0,J,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<Z&&!ce)try{for(let e=t.length;!ce&&e<Z;e++)t.push(t[0])}catch(e){ce=!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(!ce&&n.length<Z)try{for(let e=n.length;!ce&&e<Z;e++)n.push(n[0])}catch(e){ce=!0,_workletPrinter.error("::SABProcess() exception: "+e.message+e.stack)}this.inputData(n)}return this.outputData(o),!0}}var le=0,ce=!1,fe=!1,he=0,_e=0,de=!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&&se.port.postMessage({status:"MONITOR_LOG",data:e})},t().sampleRateLog=function(e,r,n,o,i){if(!e&&!r)return;let a=null;switch(i){case 1:a="GGDS: ";break;case 2:a="SCAG: ";break;case 3:a="SCIW: "}let s=a+e+"|"+r+"|"+n+"|"+o;t().monitorLOG(s)},t().wcl_trace_log=function(e,r){t().fsHandler&&t().fsHandler.handleAudioSDKUtilPrint(e,r)},t().Viper_NetworkTrace=function(e,t){},registerProcessor("zoomAudioWorklet",ue)})()})();var wasmModule,Module=Module||{};function initWasm(e,t){let r=()=>Date.now();wasmModule=t;var n,o,i,a=void 0!==(a=e)?a:{},s=Object.assign({},a),u=[],l="./this.program",c="object"==typeof window,f="function"==typeof importScripts,h=("object"==typeof process&&"object"==typeof process.versions&&process.versions.node,"");(c||f)&&(f?h=self.location.href:"undefined"!=typeof document&&document.currentScript&&(h=document.currentScript.src),h=0!==h.indexOf("blob:")?h.substr(0,h.replace(/[?#].*/,"").lastIndexOf("/")+1):"",n=e=>{var t=new XMLHttpRequest;return t.open("GET",e,!1),t.send(null),t.responseText},f&&(i=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 _,d,p=a.print||console.log.bind(console),m=a.printErr||console.warn.bind(console);Object.assign(a,s),s=null,a.arguments&&(u=a.arguments),a.thisProgram&&(l=a.thisProgram),a.quit&&a.quit,a.wasmBinary&&(_=a.wasmBinary),a.noExitRuntime,"object"!=typeof WebAssembly&&Z("no native wasm support detected");var g=!1;function y(e,t){e||Z(t)}var v,w,E,b,S,A,M,k="undefined"!=typeof TextDecoder?new TextDecoder("utf8"):void 0;function T(e,t,r){for(var n=t+r,o=t;e[o]&&!(o>=n);)++o;if(o-t>16&&e.buffer&&k)return k.decode(e.subarray(t,o));for(var i="";t<o;){var a=e[t++];if(128&a){var s=63&e[t++];if(192!=(224&a)){var u=63&e[t++];if((a=224==(240&a)?(15&a)<<12|s<<6|u:(7&a)<<18|s<<12|u<<6|63&e[t++])<65536)i+=String.fromCharCode(a);else{var l=a-65536;i+=String.fromCharCode(55296|l>>10,56320|1023&l)}}else i+=String.fromCharCode((31&a)<<6|s)}else i+=String.fromCharCode(a)}return i}function D(e,t){return e?T(E,e,t):""}function C(e,t,r,n){if(!(n>0))return 0;for(var o=r,i=r+n-1,a=0;a<e.length;++a){var s=e.charCodeAt(a);if(s>=55296&&s<=57343&&(s=65536+((1023&s)<<10)|1023&e.charCodeAt(++a)),s<=127){if(r>=i)break;t[r++]=s}else if(s<=2047){if(r+1>=i)break;t[r++]=192|s>>6,t[r++]=128|63&s}else if(s<=65535){if(r+2>=i)break;t[r++]=224|s>>12,t[r++]=128|s>>6&63,t[r++]=128|63&s}else{if(r+3>=i)break;t[r++]=240|s>>18,t[r++]=128|s>>12&63,t[r++]=128|s>>6&63,t[r++]=128|63&s}}return t[r]=0,r-o}function P(e,t,r){return C(e,E,t,r)}function R(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 L(e){v=e,a.HEAP8=w=new Int8Array(e),a.HEAP16=b=new Int16Array(e),a.HEAP32=S=new Int32Array(e),a.HEAPU8=E=new Uint8Array(e),a.HEAPU16=new Uint16Array(e),a.HEAPU32=A=new Uint32Array(e),a.HEAPF32=new Float32Array(e),a.HEAPF64=M=new Float64Array(e)}var F,I=a.INITIAL_MEMORY||20971520;(d=a.wasmMemory?a.wasmMemory:new WebAssembly.Memory({initial:I/65536,maximum:2048}))&&(v=d.buffer),I=v.byteLength,L(v);var O,B,x,N,j=[],U=[],z=[],W=0,H=null,Y=null;function V(e){W++,a.monitorRunDependencies&&a.monitorRunDependencies(W)}function G(e){if(W--,a.monitorRunDependencies&&a.monitorRunDependencies(W),0==W&&(null!==H&&(clearInterval(H),H=null),Y)){var t=Y;Y=null,t()}}function Z(e){throw a.onAbort&&a.onAbort(e),m(e="Aborted("+e+")"),g=!0,e+=". Build with -sASSERTIONS for more info.",new WebAssembly.RuntimeError(e)}function q(e){return e.startsWith("data:application/octet-stream;base64,")}function X(e){return e.startsWith("file://")}function K(e){try{if(e==O&&_)return new Uint8Array(_);if(i)return i(e);throw"both async and sync fetching of the wasm failed"}catch(e){Z(e)}}q(O="audio.light.simd.wasm")||(B=O,O=a.locateFile?a.locateFile(B,h):h+B);var $={691520:e=>{console.log("Audio Version: ",e)},691557:(e,t)=>{send_data(e,t)},691580:(e,t)=>{SAVE_IV(e,t)},691598:(e,t,r,n)=>{audio_encode_frame_callback(e,t,r,n)},691647:(e,t,r)=>{Get_ExternalRecord(e,t,r)},691683:()=>Date.now(),691706:(e,t)=>{update_play_time(e,t)},691736:()=>{AudioWasmAdapter.onMuteSpeechWarningWASM()},691783:(e,t)=>{AudioWasmAdapter.onMonitorLogWASM(e,t)},691826:(e,t,r,n)=>{AudioWasmAdapter.onGlobalTracingLogWASM(e,t,r,n)},691881:(e,t,r,n,o,i)=>{AudioWasmAdapter.onSenderStatsLogWASM(e,t,r,n,o,i)},691945:(e,t,r,n,o,i)=>{AudioWasmAdapter.onReceiverStatsLogWASM(e,t,r,n,o,i)},692011:(e,t)=>{AudioWasmAdapter.onAudioLevelWASM(e,t)},692054:(e,t,r,n,o)=>{mesh_recv_audio_data(e,t,r,n,o)},692100:(e,t,r)=>{network_quality_callback(e,t,r)},692140:(e,t,r,n)=>{AudioWasmAdapter.onAPMProcessedPCMWASM(e,t,r,n)},692200:(e,t,r,n)=>{pump_rtp_data(e,t,r,n)},692235:(e,t,r,n)=>{pump_rtp_data(e,t,r,n)},692270:(e,t,r,n,o,i,a,s)=>{responseAudioQosData(e,t,r,n,o,i,a,s)},692325:(e,t,r,n,o)=>{sampleRateLog(e,t,r,n,o)},692362:(e,t,r,n,o)=>{sampleRateLog(e,t,r,n,o)},692399:(e,t,r,n,o,i,a,s)=>{frame_callback(e,t,r,n,o,i,a,s)},692451:(e,t)=>{get_edition(e,t)},692476:(e,t)=>{SAVE_IV(e,t)},692494:()=>getNTPBaseTime(),692523:()=>r(),692553:(e,t)=>{reportSenderNTPTime(e,t)},692586:(e,t)=>{COMMIT_PRINT(e,t)},692608:()=>a.getRandomValue(),692644:()=>{if(void 0===a.getRandomValue)try{var e="object"==typeof window?window:self,t=void 0!==e.crypto?e.crypto:e.msCrypto,r=function(){var e=new Uint32Array(1);return t.getRandomValues(e),e[0]>>>0};r(),a.getRandomValue=r}catch(e){try{var n=require("crypto"),o=function(){var e=n.randomBytes(4);return(e[0]<<24|e[1]<<16|e[2]<<8|e[3])>>>0};o(),a.getRandomValue=o}catch(e){throw"No secure random number generator found"}}},693366:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},693402:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},693438:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},693474:(e,t,r,n)=>{LOG_OUT_WEBRTC(e,t,r,n)},693510:(e,t)=>{LOG_OUT(e,t)},693531:(e,t)=>{wcl_trace_log(e,t)}};function Q(e){for(;e.length>0;)e.shift()(a)}var J=[],ee=0,te=0;function re(e){this.excPtr=e,this.ptr=e-24,this.set_type=function(e){A[this.ptr+4>>2]=e},this.get_type=function(){return A[this.ptr+4>>2]},this.set_destructor=function(e){A[this.ptr+8>>2]=e},this.get_destructor=function(){return A[this.ptr+8>>2]},this.set_refcount=function(e){S[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=S[this.ptr>>2];S[this.ptr>>2]=e+1},this.release_ref=function(){var e=S[this.ptr>>2];return S[this.ptr>>2]=e-1,1===e},this.set_adjusted_ptr=function(e){A[this.ptr+16>>2]=e},this.get_adjusted_ptr=function(){return A[this.ptr+16>>2]},this.get_exception_ptr=function(){if(Ye(this.get_type()))return A[this.excPtr>>2];var e=this.get_adjusted_ptr();return 0!==e?e:this.excPtr}}function ne(e){return Be(new re(e).ptr)}var oe=[];function ie(e){var t=oe[e];return t||(e>=oe.length&&(oe.length=e+1),oe[e]=t=F.get(e)),t}var ae={isAbs:e=>"/"===e.charAt(0),splitPath:e=>/^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/.exec(e).slice(1),normalizeArray:(e,t)=>{for(var r=0,n=e.length-1;n>=0;n--){var o=e[n];"."===o?e.splice(n,1):".."===o?(e.splice(n,1),r++):r&&(e.splice(n,1),r--)}if(t)for(;r;r--)e.unshift("..");return e},normalize:e=>{var t=ae.isAbs(e),r="/"===e.substr(-1);return(e=ae.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||t||(e="."),e&&r&&(e+="/"),(t?"/":"")+e},dirname:e=>{var t=ae.splitPath(e),r=t[0],n=t[1];return r||n?(n&&(n=n.substr(0,n.length-1)),r+n):"."},basename:e=>{if("/"===e)return"/";var t=(e=(e=ae.normalize(e)).replace(/\/$/,"")).lastIndexOf("/");return-1===t?e:e.substr(t+1)},join:function(){var e=Array.prototype.slice.call(arguments);return ae.normalize(e.join("/"))},join2:(e,t)=>ae.normalize(e+"/"+t)},se={resolve:function(){for(var e="",t=!1,r=arguments.length-1;r>=-1&&!t;r--){var n=r>=0?arguments[r]:he.cwd();if("string"!=typeof n)throw new TypeError("Arguments to path.resolve must be strings");if(!n)return"";e=n+"/"+e,t=ae.isAbs(n)}return(t?"/":"")+(e=ae.normalizeArray(e.split("/").filter((e=>!!e)),!t).join("/"))||"."},relative:(e,t)=>{function r(e){for(var t=0;t<e.length&&""===e[t];t++);for(var r=e.length-1;r>=0&&""===e[r];r--);return t>r?[]:e.slice(t,r-t+1)}e=se.resolve(e).substr(1),t=se.resolve(t).substr(1);for(var n=r(e.split("/")),o=r(t.split("/")),i=Math.min(n.length,o.length),a=i,s=0;s<i;s++)if(n[s]!==o[s]){a=s;break}var u=[];for(s=a;s<n.length;s++)u.push("..");return(u=u.concat(o.slice(a))).join("/")}};function ue(e,t,r){var n=r>0?r:R(e)+1,o=new Array(n),i=C(e,o,0,o.length);return t&&(o.length=i),o}var le={ttys:[],init:function(){},shutdown:function(){},register:function(e,t){le.ttys[e]={input:[],output:[],ops:t},he.registerDevice(e,le.stream_ops)},stream_ops:{open:function(e){var t=le.ttys[e.node.rdev];if(!t)throw new he.ErrnoError(43);e.tty=t,e.seekable=!1},close:function(e){e.tty.ops.fsync(e.tty)},fsync:function(e){e.tty.ops.fsync(e.tty)},read:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.get_char)throw new he.ErrnoError(60);for(var i=0,a=0;a<n;a++){var s;try{s=e.tty.ops.get_char(e.tty)}catch(e){throw new he.ErrnoError(29)}if(void 0===s&&0===i)throw new he.ErrnoError(6);if(null==s)break;i++,t[r+a]=s}return i&&(e.node.timestamp=Date.now()),i},write:function(e,t,r,n,o){if(!e.tty||!e.tty.ops.put_char)throw new he.ErrnoError(60);try{for(var i=0;i<n;i++)e.tty.ops.put_char(e.tty,t[r+i])}catch(e){throw new he.ErrnoError(29)}return n&&(e.node.timestamp=Date.now()),i}},default_tty_ops:{get_char:function(e){if(!e.input.length){var t=null;if("undefined"!=typeof window&&"function"==typeof window.prompt?null!==(t=window.prompt("Input: "))&&(t+="\n"):"function"==typeof readline&&null!==(t=readline())&&(t+="\n"),!t)return null;e.input=ue(t,!0)}return e.input.shift()},put_char:function(e,t){null===t||10===t?(p(T(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(p(T(e.output,0)),e.output=[])}},default_tty1_ops:{put_char:function(e,t){null===t||10===t?(m(T(e.output,0)),e.output=[]):0!=t&&e.output.push(t)},fsync:function(e){e.output&&e.output.length>0&&(m(T(e.output,0)),e.output=[])}}};function ce(e){e=function(e){return 65536*Math.ceil(e/65536)}(e);var t=xe(65536,e);return t?function(e,t){return E.fill(0,e,e+t),e}(t,e):0}var fe={ops_table:null,mount:function(e){return fe.createNode(null,"/",16895,0)},createNode:function(e,t,r,n){if(he.isBlkdev(r)||he.isFIFO(r))throw new he.ErrnoError(63);fe.ops_table||(fe.ops_table={dir:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr,lookup:fe.node_ops.lookup,mknod:fe.node_ops.mknod,rename:fe.node_ops.rename,unlink:fe.node_ops.unlink,rmdir:fe.node_ops.rmdir,readdir:fe.node_ops.readdir,symlink:fe.node_ops.symlink},stream:{llseek:fe.stream_ops.llseek}},file:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr},stream:{llseek:fe.stream_ops.llseek,read:fe.stream_ops.read,write:fe.stream_ops.write,allocate:fe.stream_ops.allocate,mmap:fe.stream_ops.mmap,msync:fe.stream_ops.msync}},link:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr,readlink:fe.node_ops.readlink},stream:{}},chrdev:{node:{getattr:fe.node_ops.getattr,setattr:fe.node_ops.setattr},stream:he.chrdev_stream_ops}});var o=he.createNode(e,t,r,n);return he.isDir(o.mode)?(o.node_ops=fe.ops_table.dir.node,o.stream_ops=fe.ops_table.dir.stream,o.contents={}):he.isFile(o.mode)?(o.node_ops=fe.ops_table.file.node,o.stream_ops=fe.ops_table.file.stream,o.usedBytes=0,o.contents=null):he.isLink(o.mode)?(o.node_ops=fe.ops_table.link.node,o.stream_ops=fe.ops_table.link.stream):he.isChrdev(o.mode)&&(o.node_ops=fe.ops_table.chrdev.node,o.stream_ops=fe.ops_table.chrdev.stream),o.timestamp=Date.now(),e&&(e.contents[t]=o,e.timestamp=o.timestamp),o},getFileDataAsTypedArray:function(e){return e.contents?e.contents.subarray?e.contents.subarray(0,e.usedBytes):new Uint8Array(e.contents):new Uint8Array(0)},expandFileStorage:function(e,t){var r=e.contents?e.contents.length:0;if(!(r>=t)){t=Math.max(t,r*(r<1048576?2:1.125)>>>0),0!=r&&(t=Math.max(t,256));var n=e.contents;e.contents=new Uint8Array(t),e.usedBytes>0&&e.contents.set(n.subarray(0,e.usedBytes),0)}},resizeFileStorage:function(e,t){if(e.usedBytes!=t)if(0==t)e.contents=null,e.usedBytes=0;else{var r=e.contents;e.contents=new Uint8Array(t),r&&e.contents.set(r.subarray(0,Math.min(t,e.usedBytes))),e.usedBytes=t}},node_ops:{getattr:function(e){var t={};return t.dev=he.isChrdev(e.mode)?e.id:1,t.ino=e.id,t.mode=e.mode,t.nlink=1,t.uid=0,t.gid=0,t.rdev=e.rdev,he.isDir(e.mode)?t.size=4096:he.isFile(e.mode)?t.size=e.usedBytes:he.isLink(e.mode)?t.size=e.link.length:t.size=0,t.atime=new Date(e.timestamp),t.mtime=new Date(e.timestamp),t.ctime=new Date(e.timestamp),t.blksize=4096,t.blocks=Math.ceil(t.size/t.blksize),t},setattr:function(e,t){void 0!==t.mode&&(e.mode=t.mode),void 0!==t.timestamp&&(e.timestamp=t.timestamp),void 0!==t.size&&fe.resizeFileStorage(e,t.size)},lookup:function(e,t){throw he.genericErrors[44]},mknod:function(e,t,r,n){return fe.createNode(e,t,r,n)},rename:function(e,t,r){if(he.isDir(e.mode)){var n;try{n=he.lookupNode(t,r)}catch(e){}if(n)for(var o in n.contents)throw new he.ErrnoError(55)}delete e.parent.contents[e.name],e.parent.timestamp=Date.now(),e.name=r,t.contents[r]=e,t.timestamp=e.parent.timestamp,e.parent=t},unlink:function(e,t){delete e.contents[t],e.timestamp=Date.now()},rmdir:function(e,t){var r=he.lookupNode(e,t);for(var n in r.contents)throw new he.ErrnoError(55);delete e.contents[t],e.timestamp=Date.now()},readdir:function(e){var t=[".",".."];for(var r in e.contents)e.contents.hasOwnProperty(r)&&t.push(r);return t},symlink:function(e,t,r){var n=fe.createNode(e,t,41471,0);return n.link=r,n},readlink:function(e){if(!he.isLink(e.mode))throw new he.ErrnoError(28);return e.link}},stream_ops:{read:function(e,t,r,n,o){var i=e.node.contents;if(o>=e.node.usedBytes)return 0;var a=Math.min(e.node.usedBytes-o,n);if(a>8&&i.subarray)t.set(i.subarray(o,o+a),r);else for(var s=0;s<a;s++)t[r+s]=i[o+s];return a},write:function(e,t,r,n,o,i){if(t.buffer===w.buffer&&(i=!1),!n)return 0;var a=e.node;if(a.timestamp=Date.now(),t.subarray&&(!a.contents||a.contents.subarray)){if(i)return a.contents=t.subarray(r,r+n),a.usedBytes=n,n;if(0===a.usedBytes&&0===o)return a.contents=t.slice(r,r+n),a.usedBytes=n,n;if(o+n<=a.usedBytes)return a.contents.set(t.subarray(r,r+n),o),n}if(fe.expandFileStorage(a,o+n),a.contents.subarray&&t.subarray)a.contents.set(t.subarray(r,r+n),o);else for(var s=0;s<n;s++)a.contents[o+s]=t[r+s];return a.usedBytes=Math.max(a.usedBytes,o+n),n},llseek:function(e,t,r){var n=t;if(1===r?n+=e.position:2===r&&he.isFile(e.node.mode)&&(n+=e.node.usedBytes),n<0)throw new he.ErrnoError(28);return n},allocate:function(e,t,r){fe.expandFileStorage(e.node,t+r),e.node.usedBytes=Math.max(e.node.usedBytes,t+r)},mmap:function(e,t,r,n,o){if(!he.isFile(e.node.mode))throw new he.ErrnoError(43);var i,a,s=e.node.contents;if(2&o||s.buffer!==v){if((r>0||r+t<s.length)&&(s=s.subarray?s.subarray(r,r+t):Array.prototype.slice.call(s,r,r+t)),a=!0,!(i=ce(t)))throw new he.ErrnoError(48);w.set(s,i)}else a=!1,i=s.byteOffset;return{ptr:i,allocated:a}},msync:function(e,t,r,n,o){return fe.stream_ops.write(e,t,0,n,r,!1),0}}},he={root:null,mounts:[],devices:{},streams:[],nextInode:1,nameTable:null,currentPath:"/",initialized:!1,ignorePermissions:!0,ErrnoError:null,genericErrors:{},filesystems:null,syncFSRequests:0,lookupPath:(e,t={})=>{if(!(e=se.resolve(e)))return{path:"",node:null};if((t=Object.assign({follow_mount:!0,recurse_count:0},t)).recurse_count>8)throw new he.ErrnoError(32);for(var r=e.split("/").filter((e=>!!e)),n=he.root,o="/",i=0;i<r.length;i++){var a=i===r.length-1;if(a&&t.parent)break;if(n=he.lookupNode(n,r[i]),o=ae.join2(o,r[i]),he.isMountpoint(n)&&(!a||a&&t.follow_mount)&&(n=n.mounted.root),!a||t.follow)for(var s=0;he.isLink(n.mode);){var u=he.readlink(o);if(o=se.resolve(ae.dirname(o),u),n=he.lookupPath(o,{recurse_count:t.recurse_count+1}).node,s++>40)throw new he.ErrnoError(32)}}return{path:o,node:n}},getPath:e=>{for(var t;;){if(he.isRoot(e)){var r=e.mount.mountpoint;return t?"/"!==r[r.length-1]?r+"/"+t:r+t:r}t=t?e.name+"/"+t:e.name,e=e.parent}},hashName:(e,t)=>{for(var r=0,n=0;n<t.length;n++)r=(r<<5)-r+t.charCodeAt(n)|0;return(e+r>>>0)%he.nameTable.length},hashAddNode:e=>{var t=he.hashName(e.parent.id,e.name);e.name_next=he.nameTable[t],he.nameTable[t]=e},hashRemoveNode:e=>{var t=he.hashName(e.parent.id,e.name);if(he.nameTable[t]===e)he.nameTable[t]=e.name_next;else for(var r=he.nameTable[t];r;){if(r.name_next===e){r.name_next=e.name_next;break}r=r.name_next}},lookupNode:(e,t)=>{var r=he.mayLookup(e);if(r)throw new he.ErrnoError(r,e);for(var n=he.hashName(e.id,t),o=he.nameTable[n];o;o=o.name_next){var i=o.name;if(o.parent.id===e.id&&i===t)return o}return he.lookup(e,t)},createNode:(e,t,r,n)=>{var o=new he.FSNode(e,t,r,n);return he.hashAddNode(o),o},destroyNode:e=>{he.hashRemoveNode(e)},isRoot:e=>e===e.parent,isMountpoint:e=>!!e.mounted,isFile:e=>32768==(61440&e),isDir:e=>16384==(61440&e),isLink:e=>40960==(61440&e),isChrdev:e=>8192==(61440&e),isBlkdev:e=>24576==(61440&e),isFIFO:e=>4096==(61440&e),isSocket:e=>!(49152&~e),flagModes:{r:0,"r+":2,w:577,"w+":578,a:1089,"a+":1090},modeStringToFlags:e=>{var t=he.flagModes[e];if(void 0===t)throw new Error("Unknown file open mode: "+e);return t},flagsToPermissionString:e=>{var t=["r","w","rw"][3&e];return 512&e&&(t+="w"),t},nodePermissions:(e,t)=>he.ignorePermissions||(!t.includes("r")||292&e.mode)&&(!t.includes("w")||146&e.mode)&&(!t.includes("x")||73&e.mode)?0:2,mayLookup:e=>he.nodePermissions(e,"x")||(e.node_ops.lookup?0:2),mayCreate:(e,t)=>{try{return he.lookupNode(e,t),20}catch(e){}return he.nodePermissions(e,"wx")},mayDelete:(e,t,r)=>{var n;try{n=he.lookupNode(e,t)}catch(e){return e.errno}var o=he.nodePermissions(e,"wx");if(o)return o;if(r){if(!he.isDir(n.mode))return 54;if(he.isRoot(n)||he.getPath(n)===he.cwd())return 10}else if(he.isDir(n.mode))return 31;return 0},mayOpen:(e,t)=>e?he.isLink(e.mode)?32:he.isDir(e.mode)&&("r"!==he.flagsToPermissionString(t)||512&t)?31:he.nodePermissions(e,he.flagsToPermissionString(t)):44,MAX_OPEN_FDS:4096,nextfd:(e=0,t=he.MAX_OPEN_FDS)=>{for(var r=e;r<=t;r++)if(!he.streams[r])return r;throw new he.ErrnoError(33)},getStream:e=>he.streams[e],createStream:(e,t,r)=>{he.FSStream||(he.FSStream=function(){this.shared={}},he.FSStream.prototype={},Object.defineProperties(he.FSStream.prototype,{object:{get:function(){return this.node},set:function(e){this.node=e}},isRead:{get:function(){return 1!=(2097155&this.flags)}},isWrite:{get:function(){return!!(2097155&this.flags)}},isAppend:{get:function(){return 1024&this.flags}},flags:{get:function(){return this.shared.flags},set:function(e){this.shared.flags=e}},position:{get:function(){return this.shared.position},set:function(e){this.shared.position=e}}})),e=Object.assign(new he.FSStream,e);var n=he.nextfd(t,r);return e.fd=n,he.streams[n]=e,e},closeStream:e=>{he.streams[e]=null},chrdev_stream_ops:{open:e=>{var t=he.getDevice(e.node.rdev);e.stream_ops=t.stream_ops,e.stream_ops.open&&e.stream_ops.open(e)},llseek:()=>{throw new he.ErrnoError(70)}},major:e=>e>>8,minor:e=>255&e,makedev:(e,t)=>e<<8|t,registerDevice:(e,t)=>{he.devices[e]={stream_ops:t}},getDevice:e=>he.devices[e],getMounts:e=>{for(var t=[],r=[e];r.length;){var n=r.pop();t.push(n),r.push.apply(r,n.mounts)}return t},syncfs:(e,t)=>{"function"==typeof e&&(t=e,e=!1),he.syncFSRequests++,he.syncFSRequests>1&&m("warning: "+he.syncFSRequests+" FS.syncfs operations in flight at once, probably just doing extra work");var r=he.getMounts(he.root.mount),n=0;function o(e){return he.syncFSRequests--,t(e)}function i(e){if(e)return i.errored?void 0:(i.errored=!0,o(e));++n>=r.length&&o(null)}r.forEach((t=>{if(!t.type.syncfs)return i(null);t.type.syncfs(t,e,i)}))},mount:(e,t,r)=>{var n,o="/"===r,i=!r;if(o&&he.root)throw new he.ErrnoError(10);if(!o&&!i){var a=he.lookupPath(r,{follow_mount:!1});if(r=a.path,n=a.node,he.isMountpoint(n))throw new he.ErrnoError(10);if(!he.isDir(n.mode))throw new he.ErrnoError(54)}var s={type:e,opts:t,mountpoint:r,mounts:[]},u=e.mount(s);return u.mount=s,s.root=u,o?he.root=u:n&&(n.mounted=s,n.mount&&n.mount.mounts.push(s)),u},unmount:e=>{var t=he.lookupPath(e,{follow_mount:!1});if(!he.isMountpoint(t.node))throw new he.ErrnoError(28);var r=t.node,n=r.mounted,o=he.getMounts(n);Object.keys(he.nameTable).forEach((e=>{for(var t=he.nameTable[e];t;){var r=t.name_next;o.includes(t.mount)&&he.destroyNode(t),t=r}})),r.mounted=null;var i=r.mount.mounts.indexOf(n);r.mount.mounts.splice(i,1)},lookup:(e,t)=>e.node_ops.lookup(e,t),mknod:(e,t,r)=>{var n=he.lookupPath(e,{parent:!0}).node,o=ae.basename(e);if(!o||"."===o||".."===o)throw new he.ErrnoError(28);var i=he.mayCreate(n,o);if(i)throw new he.ErrnoError(i);if(!n.node_ops.mknod)throw new he.ErrnoError(63);return n.node_ops.mknod(n,o,t,r)},create:(e,t)=>(t=void 0!==t?t:438,t&=4095,t|=32768,he.mknod(e,t,0)),mkdir:(e,t)=>(t=void 0!==t?t:511,t&=1023,t|=16384,he.mknod(e,t,0)),mkdirTree:(e,t)=>{for(var r=e.split("/"),n="",o=0;o<r.length;++o)if(r[o]){n+="/"+r[o];try{he.mkdir(n,t)}catch(e){if(20!=e.errno)throw e}}},mkdev:(e,t,r)=>(void 0===r&&(r=t,t=438),t|=8192,he.mknod(e,t,r)),symlink:(e,t)=>{if(!se.resolve(e))throw new he.ErrnoError(44);var r=he.lookupPath(t,{parent:!0}).node;if(!r)throw new he.ErrnoError(44);var n=ae.basename(t),o=he.mayCreate(r,n);if(o)throw new he.ErrnoError(o);if(!r.node_ops.symlink)throw new he.ErrnoError(63);return r.node_ops.symlink(r,n,e)},rename:(e,t)=>{var r,n,o=ae.dirname(e),i=ae.dirname(t),a=ae.basename(e),s=ae.basename(t);if(r=he.lookupPath(e,{parent:!0}).node,n=he.lookupPath(t,{parent:!0}).node,!r||!n)throw new he.ErrnoError(44);if(r.mount!==n.mount)throw new he.ErrnoError(75);var u,l=he.lookupNode(r,a),c=se.relative(e,i);if("."!==c.charAt(0))throw new he.ErrnoError(28);if("."!==(c=se.relative(t,o)).charAt(0))throw new he.ErrnoError(55);try{u=he.lookupNode(n,s)}catch(e){}if(l!==u){var f=he.isDir(l.mode),h=he.mayDelete(r,a,f);if(h)throw new he.ErrnoError(h);if(h=u?he.mayDelete(n,s,f):he.mayCreate(n,s))throw new he.ErrnoError(h);if(!r.node_ops.rename)throw new he.ErrnoError(63);if(he.isMountpoint(l)||u&&he.isMountpoint(u))throw new he.ErrnoError(10);if(n!==r&&(h=he.nodePermissions(r,"w")))throw new he.ErrnoError(h);he.hashRemoveNode(l);try{r.node_ops.rename(l,n,s)}catch(e){throw e}finally{he.hashAddNode(l)}}},rmdir:e=>{var t=he.lookupPath(e,{parent:!0}).node,r=ae.basename(e),n=he.lookupNode(t,r),o=he.mayDelete(t,r,!0);if(o)throw new he.ErrnoError(o);if(!t.node_ops.rmdir)throw new he.ErrnoError(63);if(he.isMountpoint(n))throw new he.ErrnoError(10);t.node_ops.rmdir(t,r),he.destroyNode(n)},readdir:e=>{var t=he.lookupPath(e,{follow:!0}).node;if(!t.node_ops.readdir)throw new he.ErrnoError(54);return t.node_ops.readdir(t)},unlink:e=>{var t=he.lookupPath(e,{parent:!0}).node;if(!t)throw new he.ErrnoError(44);var r=ae.basename(e),n=he.lookupNode(t,r),o=he.mayDelete(t,r,!1);if(o)throw new he.ErrnoError(o);if(!t.node_ops.unlink)throw new he.ErrnoError(63);if(he.isMountpoint(n))throw new he.ErrnoError(10);t.node_ops.unlink(t,r),he.destroyNode(n)},readlink:e=>{var t=he.lookupPath(e).node;if(!t)throw new he.ErrnoError(44);if(!t.node_ops.readlink)throw new he.ErrnoError(28);return se.resolve(he.getPath(t.parent),t.node_ops.readlink(t))},stat:(e,t)=>{var r=he.lookupPath(e,{follow:!t}).node;if(!r)throw new he.ErrnoError(44);if(!r.node_ops.getattr)throw new he.ErrnoError(63);return r.node_ops.getattr(r)},lstat:e=>he.stat(e,!0),chmod:(e,t,r)=>{var n;if(!(n="string"==typeof e?he.lookupPath(e,{follow:!r}).node:e).node_ops.setattr)throw new he.ErrnoError(63);n.node_ops.setattr(n,{mode:4095&t|-4096&n.mode,timestamp:Date.now()})},lchmod:(e,t)=>{he.chmod(e,t,!0)},fchmod:(e,t)=>{var r=he.getStream(e);if(!r)throw new he.ErrnoError(8);he.chmod(r.node,t)},chown:(e,t,r,n)=>{var o;if(!(o="string"==typeof e?he.lookupPath(e,{follow:!n}).node:e).node_ops.setattr)throw new he.ErrnoError(63);o.node_ops.setattr(o,{timestamp:Date.now()})},lchown:(e,t,r)=>{he.chown(e,t,r,!0)},fchown:(e,t,r)=>{var n=he.getStream(e);if(!n)throw new he.ErrnoError(8);he.chown(n.node,t,r)},truncate:(e,t)=>{if(t<0)throw new he.ErrnoError(28);var r;if(!(r="string"==typeof e?he.lookupPath(e,{follow:!0}).node:e).node_ops.setattr)throw new he.ErrnoError(63);if(he.isDir(r.mode))throw new he.ErrnoError(31);if(!he.isFile(r.mode))throw new he.ErrnoError(28);var n=he.nodePermissions(r,"w");if(n)throw new he.ErrnoError(n);r.node_ops.setattr(r,{size:t,timestamp:Date.now()})},ftruncate:(e,t)=>{var r=he.getStream(e);if(!r)throw new he.ErrnoError(8);if(!(2097155&r.flags))throw new he.ErrnoError(28);he.truncate(r.node,t)},utime:(e,t,r)=>{var n=he.lookupPath(e,{follow:!0}).node;n.node_ops.setattr(n,{timestamp:Math.max(t,r)})},open:(e,t,r)=>{if(""===e)throw new he.ErrnoError(44);var n;if(r=void 0===r?438:r,r=64&(t="string"==typeof t?he.modeStringToFlags(t):t)?4095&r|32768:0,"object"==typeof e)n=e;else{e=ae.normalize(e);try{n=he.lookupPath(e,{follow:!(131072&t)}).node}catch(e){}}var o=!1;if(64&t)if(n){if(128&t)throw new he.ErrnoError(20)}else n=he.mknod(e,r,0),o=!0;if(!n)throw new he.ErrnoError(44);if(he.isChrdev(n.mode)&&(t&=-513),65536&t&&!he.isDir(n.mode))throw new he.ErrnoError(54);if(!o){var i=he.mayOpen(n,t);if(i)throw new he.ErrnoError(i)}512&t&&!o&&he.truncate(n,0),t&=-131713;var s=he.createStream({node:n,path:he.getPath(n),flags:t,seekable:!0,position:0,stream_ops:n.stream_ops,ungotten:[],error:!1});return s.stream_ops.open&&s.stream_ops.open(s),!a.logReadFiles||1&t||(he.readFiles||(he.readFiles={}),e in he.readFiles||(he.readFiles[e]=1)),s},close:e=>{if(he.isClosed(e))throw new he.ErrnoError(8);e.getdents&&(e.getdents=null);try{e.stream_ops.close&&e.stream_ops.close(e)}catch(e){throw e}finally{he.closeStream(e.fd)}e.fd=null},isClosed:e=>null===e.fd,llseek:(e,t,r)=>{if(he.isClosed(e))throw new he.ErrnoError(8);if(!e.seekable||!e.stream_ops.llseek)throw new he.ErrnoError(70);if(0!=r&&1!=r&&2!=r)throw new he.ErrnoError(28);return e.position=e.stream_ops.llseek(e,t,r),e.ungotten=[],e.position},read:(e,t,r,n,o)=>{if(n<0||o<0)throw new he.ErrnoError(28);if(he.isClosed(e))throw new he.ErrnoError(8);if(1==(2097155&e.flags))throw new he.ErrnoError(8);if(he.isDir(e.node.mode))throw new he.ErrnoError(31);if(!e.stream_ops.read)throw new he.ErrnoError(28);var i=void 0!==o;if(i){if(!e.seekable)throw new he.ErrnoError(70)}else o=e.position;var a=e.stream_ops.read(e,t,r,n,o);return i||(e.position+=a),a},write:(e,t,r,n,o,i)=>{if(n<0||o<0)throw new he.ErrnoError(28);if(he.isClosed(e))throw new he.ErrnoError(8);if(!(2097155&e.flags))throw new he.ErrnoError(8);if(he.isDir(e.node.mode))throw new he.ErrnoError(31);if(!e.stream_ops.write)throw new he.ErrnoError(28);e.seekable&&1024&e.flags&&he.llseek(e,0,2);var a=void 0!==o;if(a){if(!e.seekable)throw new he.ErrnoError(70)}else o=e.position;var s=e.stream_ops.write(e,t,r,n,o,i);return a||(e.position+=s),s},allocate:(e,t,r)=>{if(he.isClosed(e))throw new he.ErrnoError(8);if(t<0||r<=0)throw new he.ErrnoError(28);if(!(2097155&e.flags))throw new he.ErrnoError(8);if(!he.isFile(e.node.mode)&&!he.isDir(e.node.mode))throw new he.ErrnoError(43);if(!e.stream_ops.allocate)throw new he.ErrnoError(138);e.stream_ops.allocate(e,t,r)},mmap:(e,t,r,n,o)=>{if(2&n&&!(2&o)&&2!=(2097155&e.flags))throw new he.ErrnoError(2);if(1==(2097155&e.flags))throw new he.ErrnoError(2);if(!e.stream_ops.mmap)throw new he.ErrnoError(43);return e.stream_ops.mmap(e,t,r,n,o)},msync:(e,t,r,n,o)=>e.stream_ops.msync?e.stream_ops.msync(e,t,r,n,o):0,munmap:e=>0,ioctl:(e,t,r)=>{if(!e.stream_ops.ioctl)throw new he.ErrnoError(59);return e.stream_ops.ioctl(e,t,r)},readFile:(e,t={})=>{if(t.flags=t.flags||0,t.encoding=t.encoding||"binary","utf8"!==t.encoding&&"binary"!==t.encoding)throw new Error('Invalid encoding type "'+t.encoding+'"');var r,n=he.open(e,t.flags),o=he.stat(e).size,i=new Uint8Array(o);return he.read(n,i,0,o,0),"utf8"===t.encoding?r=T(i,0):"binary"===t.encoding&&(r=i),he.close(n),r},writeFile:(e,t,r={})=>{r.flags=r.flags||577;var n=he.open(e,r.flags,r.mode);if("string"==typeof t){var o=new Uint8Array(R(t)+1),i=C(t,o,0,o.length);he.write(n,o,0,i,void 0,r.canOwn)}else{if(!ArrayBuffer.isView(t))throw new Error("Unsupported data type");he.write(n,t,0,t.byteLength,void 0,r.canOwn)}he.close(n)},cwd:()=>he.currentPath,chdir:e=>{var t=he.lookupPath(e,{follow:!0});if(null===t.node)throw new he.ErrnoError(44);if(!he.isDir(t.node.mode))throw new he.ErrnoError(54);var r=he.nodePermissions(t.node,"x");if(r)throw new he.ErrnoError(r);he.currentPath=t.path},createDefaultDirectories:()=>{he.mkdir("/tmp"),he.mkdir("/home"),he.mkdir("/home/web_user")},createDefaultDevices:()=>{he.mkdir("/dev"),he.registerDevice(he.makedev(1,3),{read:()=>0,write:(e,t,r,n,o)=>n}),he.mkdev("/dev/null",he.makedev(1,3)),le.register(he.makedev(5,0),le.default_tty_ops),le.register(he.makedev(6,0),le.default_tty1_ops),he.mkdev("/dev/tty",he.makedev(5,0)),he.mkdev("/dev/tty1",he.makedev(6,0));var e=function(){if("object"==typeof crypto&&"function"==typeof crypto.getRandomValues){var e=new Uint8Array(1);return()=>(crypto.getRandomValues(e),e[0])}return()=>Z("randomDevice")}();he.createDevice("/dev","random",e),he.createDevice("/dev","urandom",e),he.mkdir("/dev/shm"),he.mkdir("/dev/shm/tmp")},createSpecialDirectories:()=>{he.mkdir("/proc");var e=he.mkdir("/proc/self");he.mkdir("/proc/self/fd"),he.mount({mount:()=>{var t=he.createNode(e,"fd",16895,73);return t.node_ops={lookup:(e,t)=>{var r=+t,n=he.getStream(r);if(!n)throw new he.ErrnoError(8);var o={parent:null,mount:{mountpoint:"fake"},node_ops:{readlink:()=>n.path}};return o.parent=o,o}},t}},{},"/proc/self/fd")},createStandardStreams:()=>{a.stdin?he.createDevice("/dev","stdin",a.stdin):he.symlink("/dev/tty","/dev/stdin"),a.stdout?he.createDevice("/dev","stdout",null,a.stdout):he.symlink("/dev/tty","/dev/stdout"),a.stderr?he.createDevice("/dev","stderr",null,a.stderr):he.symlink("/dev/tty1","/dev/stderr"),he.open("/dev/stdin",0),he.open("/dev/stdout",1),he.open("/dev/stderr",1)},ensureErrnoError:()=>{he.ErrnoError||(he.ErrnoError=function(e,t){this.node=t,this.setErrno=function(e){this.errno=e},this.setErrno(e),this.message="FS error"},he.ErrnoError.prototype=new Error,he.ErrnoError.prototype.constructor=he.ErrnoError,[44].forEach((e=>{he.genericErrors[e]=new he.ErrnoError(e),he.genericErrors[e].stack="<generic error, no stack>"})))},staticInit:()=>{he.ensureErrnoError(),he.nameTable=new Array(4096),he.mount(fe,{},"/"),he.createDefaultDirectories(),he.createDefaultDevices(),he.createSpecialDirectories(),he.filesystems={MEMFS:fe}},init:(e,t,r)=>{he.init.initialized=!0,he.ensureErrnoError(),a.stdin=e||a.stdin,a.stdout=t||a.stdout,a.stderr=r||a.stderr,he.createStandardStreams()},quit:()=>{he.init.initialized=!1;for(var e=0;e<he.streams.length;e++){var t=he.streams[e];t&&he.close(t)}},getMode:(e,t)=>{var r=0;return e&&(r|=365),t&&(r|=146),r},findObject:(e,t)=>{var r=he.analyzePath(e,t);return r.exists?r.object:null},analyzePath:(e,t)=>{try{e=(n=he.lookupPath(e,{follow:!t})).path}catch(e){}var r={isRoot:!1,exists:!1,error:0,name:null,path:null,object:null,parentExists:!1,parentPath:null,parentObject:null};try{var n=he.lookupPath(e,{parent:!0});r.parentExists=!0,r.parentPath=n.path,r.parentObject=n.node,r.name=ae.basename(e),n=he.lookupPath(e,{follow:!t}),r.exists=!0,r.path=n.path,r.object=n.node,r.name=n.node.name,r.isRoot="/"===n.path}catch(e){r.error=e.errno}return r},createPath:(e,t,r,n)=>{e="string"==typeof e?e:he.getPath(e);for(var o=t.split("/").reverse();o.length;){var i=o.pop();if(i){var a=ae.join2(e,i);try{he.mkdir(a)}catch(e){}e=a}}return a},createFile:(e,t,r,n,o)=>{var i=ae.join2("string"==typeof e?e:he.getPath(e),t),a=he.getMode(n,o);return he.create(i,a)},createDataFile:(e,t,r,n,o,i)=>{var a=t;e&&(e="string"==typeof e?e:he.getPath(e),a=t?ae.join2(e,t):e);var s=he.getMode(n,o),u=he.create(a,s);if(r){if("string"==typeof r){for(var l=new Array(r.length),c=0,f=r.length;c<f;++c)l[c]=r.charCodeAt(c);r=l}he.chmod(u,146|s);var h=he.open(u,577);he.write(h,r,0,r.length,0,i),he.close(h),he.chmod(u,s)}return u},createDevice:(e,t,r,n)=>{var o=ae.join2("string"==typeof e?e:he.getPath(e),t),i=he.getMode(!!r,!!n);he.createDevice.major||(he.createDevice.major=64);var a=he.makedev(he.createDevice.major++,0);return he.registerDevice(a,{open:e=>{e.seekable=!1},close:e=>{n&&n.buffer&&n.buffer.length&&n(10)},read:(e,t,n,o,i)=>{for(var a=0,s=0;s<o;s++){var u;try{u=r()}catch(e){throw new he.ErrnoError(29)}if(void 0===u&&0===a)throw new he.ErrnoError(6);if(null==u)break;a++,t[n+s]=u}return a&&(e.node.timestamp=Date.now()),a},write:(e,t,r,o,i)=>{for(var a=0;a<o;a++)try{n(t[r+a])}catch(e){throw new he.ErrnoError(29)}return o&&(e.node.timestamp=Date.now()),a}}),he.mkdev(o,i,a)},forceLoadFile:e=>{if(e.isDevice||e.isFolder||e.link||e.contents)return!0;if("undefined"!=typeof XMLHttpRequest)throw new Error("Lazy loading should have been performed (contents set) in createLazyFile, but it was not. Lazy loading only works in web workers. Use --embed-file or --preload-file in emcc on the main thread.");if(!n)throw new Error("Cannot load without read() or XMLHttpRequest.");try{e.contents=ue(n(e.url),!0),e.usedBytes=e.contents.length}catch(e){throw new he.ErrnoError(29)}},createLazyFile:(e,t,r,n,o)=>{function i(){this.lengthKnown=!1,this.chunks=[]}if(i.prototype.get=function(e){if(!(e>this.length-1||e<0)){var t=e%this.chunkSize,r=e/this.chunkSize|0;return this.getter(r)[t]}},i.prototype.setDataGetter=function(e){this.getter=e},i.prototype.cacheLength=function(){var e=new XMLHttpRequest;if(e.open("HEAD",r,!1),e.send(null),!(e.status>=200&&e.status<300||304===e.status))throw new Error("Couldn't load "+r+". Status: "+e.status);var t,n=Number(e.getResponseHeader("Content-length")),o=(t=e.getResponseHeader("Accept-Ranges"))&&"bytes"===t,i=(t=e.getResponseHeader("Content-Encoding"))&&"gzip"===t,a=1048576;o||(a=n);var s=this;s.setDataGetter((e=>{var t=e*a,o=(e+1)*a-1;if(o=Math.min(o,n-1),void 0===s.chunks[e]&&(s.chunks[e]=((e,t)=>{if(e>t)throw new Error("invalid range ("+e+", "+t+") or no bytes requested!");if(t>n-1)throw new Error("only "+n+" bytes available! programmer error!");var o=new XMLHttpRequest;if(o.open("GET",r,!1),n!==a&&o.setRequestHeader("Range","bytes="+e+"-"+t),o.responseType="arraybuffer",o.overrideMimeType&&o.overrideMimeType("text/plain; charset=x-user-defined"),o.send(null),!(o.status>=200&&o.status<300||304===o.status))throw new Error("Couldn't load "+r+". Status: "+o.status);return void 0!==o.response?new Uint8Array(o.response||[]):ue(o.responseText||"",!0)})(t,o)),void 0===s.chunks[e])throw new Error("doXHR failed!");return s.chunks[e]})),!i&&n||(a=n=1,n=this.getter(0).length,a=n,p("LazyFiles on gzip forces download of the whole file when length is accessed")),this._length=n,this._chunkSize=a,this.lengthKnown=!0},"undefined"!=typeof XMLHttpRequest){if(!f)throw"Cannot do synchronous binary XHRs outside webworkers in modern browsers. Use --embed-file or --preload-file in emcc";var a=new i;Object.defineProperties(a,{length:{get:function(){return this.lengthKnown||this.cacheLength(),this._length}},chunkSize:{get:function(){return this.lengthKnown||this.cacheLength(),this._chunkSize}}});var s={isDevice:!1,contents:a}}else s={isDevice:!1,url:r};var u=he.createFile(e,t,s,n,o);s.contents?u.contents=s.contents:s.url&&(u.contents=null,u.url=s.url),Object.defineProperties(u,{usedBytes:{get:function(){return this.contents.length}}});var l={};function c(e,t,r,n,o){var i=e.node.contents;if(o>=i.length)return 0;var a=Math.min(i.length-o,n);if(i.slice)for(var s=0;s<a;s++)t[r+s]=i[o+s];else for(s=0;s<a;s++)t[r+s]=i.get(o+s);return a}return Object.keys(u.stream_ops).forEach((e=>{var t=u.stream_ops[e];l[e]=function(){return he.forceLoadFile(u),t.apply(null,arguments)}})),l.read=(e,t,r,n,o)=>(he.forceLoadFile(u),c(e,t,r,n,o)),l.mmap=(e,t,r,n,o)=>{he.forceLoadFile(u);var i=ce(t);if(!i)throw new he.ErrnoError(48);return c(e,w,i,t,r),{ptr:i,allocated:!0}},u.stream_ops=l,u},createPreloadedFile:(e,t,r,n,i,a,s,u,l,c)=>{var f=t?se.resolve(ae.join2(e,t)):e;function h(r){function o(r){c&&c(),u||he.createDataFile(e,t,r,n,i,l),a&&a(),G()}Browser.handledByPreloadPlugin(r,f,o,(()=>{s&&s(),G()}))||o(r)}V(),"string"==typeof r?function(e,t,r){var n="al "+e;o(e,(t=>{y(t,'Loading data file "'+e+'" failed (no arrayBuffer).'),h(new Uint8Array(t)),n&&G()}),(t=>{if(!r)throw'Loading data file "'+e+'" failed.';r()})),n&&V()}(r,0,s):h(r)},indexedDB:()=>window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,DB_NAME:()=>"EM_FS_"+window.location.pathname,DB_VERSION:20,DB_STORE_NAME:"FILE_DATA",saveFilesToDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=he.indexedDB();try{var o=n.open(he.DB_NAME(),he.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=()=>{p("creating db"),o.result.createObjectStore(he.DB_STORE_NAME)},o.onsuccess=()=>{var n=o.result.transaction([he.DB_STORE_NAME],"readwrite"),i=n.objectStore(he.DB_STORE_NAME),a=0,s=0,u=e.length;function l(){0==s?t():r()}e.forEach((e=>{var t=i.put(he.analyzePath(e).object.contents,e);t.onsuccess=()=>{++a+s==u&&l()},t.onerror=()=>{s++,a+s==u&&l()}})),n.onerror=r},o.onerror=r},loadFilesFromDB:(e,t,r)=>{t=t||(()=>{}),r=r||(()=>{});var n=he.indexedDB();try{var o=n.open(he.DB_NAME(),he.DB_VERSION)}catch(e){return r(e)}o.onupgradeneeded=r,o.onsuccess=()=>{var n=o.result;try{var i=n.transaction([he.DB_STORE_NAME],"readonly")}catch(e){return void r(e)}var a=i.objectStore(he.DB_STORE_NAME),s=0,u=0,l=e.length;function c(){0==u?t():r()}e.forEach((e=>{var t=a.get(e);t.onsuccess=()=>{he.analyzePath(e).exists&&he.unlink(e),he.createDataFile(ae.dirname(e),ae.basename(e),t.result,!0,!0,!0),++s+u==l&&c()},t.onerror=()=>{u++,s+u==l&&c()}})),i.onerror=r},o.onerror=r}},_e={DEFAULT_POLLMASK:5,calculateAt:function(e,t,r){if(ae.isAbs(t))return t;var n;if(n=-100===e?he.cwd():_e.getStreamFromFD(e).path,0==t.length){if(!r)throw new he.ErrnoError(44);return n}return ae.join2(n,t)},doStat:function(e,t,r){try{var n=e(t)}catch(e){if(e&&e.node&&ae.normalize(t)!==ae.normalize(he.getPath(e.node)))return-54;throw e}return S[r>>2]=n.dev,S[r+8>>2]=n.ino,S[r+12>>2]=n.mode,A[r+16>>2]=n.nlink,S[r+20>>2]=n.uid,S[r+24>>2]=n.gid,S[r+28>>2]=n.rdev,N=[n.size>>>0,(x=n.size,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[r+40>>2]=N[0],S[r+44>>2]=N[1],S[r+48>>2]=4096,S[r+52>>2]=n.blocks,N=[Math.floor(n.atime.getTime()/1e3)>>>0,(x=Math.floor(n.atime.getTime()/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[r+56>>2]=N[0],S[r+60>>2]=N[1],A[r+64>>2]=0,N=[Math.floor(n.mtime.getTime()/1e3)>>>0,(x=Math.floor(n.mtime.getTime()/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[r+72>>2]=N[0],S[r+76>>2]=N[1],A[r+80>>2]=0,N=[Math.floor(n.ctime.getTime()/1e3)>>>0,(x=Math.floor(n.ctime.getTime()/1e3),+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[r+88>>2]=N[0],S[r+92>>2]=N[1],A[r+96>>2]=0,N=[n.ino>>>0,(x=n.ino,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[r+104>>2]=N[0],S[r+108>>2]=N[1],0},doMsync:function(e,t,r,n,o){if(!he.isFile(t.node.mode))throw new he.ErrnoError(43);if(2&n)return 0;var i=E.slice(e,e+r);he.msync(t,i,o,r,n)},varargs:void 0,get:function(){return _e.varargs+=4,S[_e.varargs-4>>2]},getStr:function(e){return D(e)},getStreamFromFD:function(e){var t=he.getStream(e);if(!t)throw new he.ErrnoError(8);return t}},de={BUCKET_BUFFER_SIZE:8192,mount:function(e){return he.createNode(null,"/",16895,0)},createPipe:function(){var e={buckets:[],refcnt:2};e.buckets.push({buffer:new Uint8Array(de.BUCKET_BUFFER_SIZE),offset:0,roffset:0});var t=de.nextname(),r=de.nextname(),n=he.createNode(de.root,t,4096,0),o=he.createNode(de.root,r,4096,0);n.pipe=e,o.pipe=e;var i=he.createStream({path:t,node:n,flags:0,seekable:!1,stream_ops:de.stream_ops});n.stream=i;var a=he.createStream({path:r,node:o,flags:1,seekable:!1,stream_ops:de.stream_ops});return o.stream=a,{readable_fd:i.fd,writable_fd:a.fd}},stream_ops:{poll:function(e){var t=e.node.pipe;if(1==(2097155&e.flags))return 260;if(t.buckets.length>0)for(var r=0;r<t.buckets.length;r++){var n=t.buckets[r];if(n.offset-n.roffset>0)return 65}return 0},ioctl:function(e,t,r){return 28},fsync:function(e){return 28},read:function(e,t,r,n,o){for(var i=e.node.pipe,a=0,s=0;s<i.buckets.length;s++){var u=i.buckets[s];a+=u.offset-u.roffset}y(t instanceof ArrayBuffer||ArrayBuffer.isView(t));var l=t.subarray(r,r+n);if(n<=0)return 0;if(0==a)throw new he.ErrnoError(6);var c=Math.min(a,n),f=c,h=0;for(s=0;s<i.buckets.length;s++){var _=i.buckets[s],d=_.offset-_.roffset;if(c<=d){var p=_.buffer.subarray(_.roffset,_.offset);c<d?(p=p.subarray(0,c),_.roffset+=c):h++,l.set(p);break}p=_.buffer.subarray(_.roffset,_.offset),l.set(p),l=l.subarray(p.byteLength),c-=p.byteLength,h++}return h&&h==i.buckets.length&&(h--,i.buckets[h].offset=0,i.buckets[h].roffset=0),i.buckets.splice(0,h),f},write:function(e,t,r,n,o){var i=e.node.pipe;y(t instanceof ArrayBuffer||ArrayBuffer.isView(t));var a=t.subarray(r,r+n),s=a.byteLength;if(s<=0)return 0;var u=null;0==i.buckets.length?(u={buffer:new Uint8Array(de.BUCKET_BUFFER_SIZE),offset:0,roffset:0},i.buckets.push(u)):u=i.buckets[i.buckets.length-1],y(u.offset<=de.BUCKET_BUFFER_SIZE);var l=de.BUCKET_BUFFER_SIZE-u.offset;if(l>=s)return u.buffer.set(a,u.offset),u.offset+=s,s;l>0&&(u.buffer.set(a.subarray(0,l),u.offset),u.offset+=l,a=a.subarray(l,a.byteLength));for(var c=a.byteLength/de.BUCKET_BUFFER_SIZE|0,f=a.byteLength%de.BUCKET_BUFFER_SIZE,h=0;h<c;h++){var _={buffer:new Uint8Array(de.BUCKET_BUFFER_SIZE),offset:de.BUCKET_BUFFER_SIZE,roffset:0};i.buckets.push(_),_.buffer.set(a.subarray(0,de.BUCKET_BUFFER_SIZE)),a=a.subarray(de.BUCKET_BUFFER_SIZE,a.byteLength)}return f>0&&(_={buffer:new Uint8Array(de.BUCKET_BUFFER_SIZE),offset:a.byteLength,roffset:0},i.buckets.push(_),_.buffer.set(a)),s},close:function(e){var t=e.node.pipe;t.refcnt--,0===t.refcnt&&(t.buckets=null)}},nextname:function(){return de.nextname.current||(de.nextname.current=0),"pipe["+de.nextname.current+++"]"}};function pe(e){return A[e>>2]+4294967296*S[e+4>>2]}function me(e){return e%4==0&&(e%100!=0||e%400==0)}var ge=[0,31,60,91,121,152,182,213,244,274,305,335],ye=[0,31,59,90,120,151,181,212,243,273,304,334];function ve(e){var t=R(e)+1,r=Ie(t);return r&&C(e,w,r,t),r}var we,Ee=[];function be(e,t,r){var n=function(e,t){var r;for(Ee.length=0,t>>=2;r=E[e++];)t+=105!=r&t,Ee.push(105==r?S[t]:M[t++>>1]),++t;return Ee}(t,r);return $[e].apply(null,n)}function Se(e){try{return d.grow(e-v.byteLength+65535>>>16),L(d.buffer),1}catch(e){}}we=()=>r();var Ae={};function Me(){if(!Me.strings){var e={USER:"web_user",LOGNAME:"web_user",PATH:"/",PWD:"/",HOME:"/home/web_user",LANG:("object"==typeof navigator&&navigator.languages&&navigator.languages[0]||"C").replace("-","_")+".UTF-8",_:l||"./this.program"};for(var t in Ae)void 0===Ae[t]?delete e[t]:e[t]=Ae[t];var r=[];for(var t in e)r.push(t+"="+e[t]);Me.strings=r}return Me.strings}var ke=[31,29,31,30,31,30,31,31,30,31,30,31],Te=[31,28,31,30,31,30,31,31,30,31,30,31];function De(e,t){w.set(e,t)}function Ce(e,t,r,n){var o=S[n+40>>2],i={tm_sec:S[n>>2],tm_min:S[n+4>>2],tm_hour:S[n+8>>2],tm_mday:S[n+12>>2],tm_mon:S[n+16>>2],tm_year:S[n+20>>2],tm_wday:S[n+24>>2],tm_yday:S[n+28>>2],tm_isdst:S[n+32>>2],tm_gmtoff:S[n+36>>2],tm_zone:o?D(o):""},a=D(r),s={"%c":"%a %b %d %H:%M:%S %Y","%D":"%m/%d/%y","%F":"%Y-%m-%d","%h":"%b","%r":"%I:%M:%S %p","%R":"%H:%M","%T":"%H:%M:%S","%x":"%m/%d/%y","%X":"%H:%M:%S","%Ec":"%c","%EC":"%C","%Ex":"%m/%d/%y","%EX":"%H:%M:%S","%Ey":"%y","%EY":"%Y","%Od":"%d","%Oe":"%e","%OH":"%H","%OI":"%I","%Om":"%m","%OM":"%M","%OS":"%S","%Ou":"%u","%OU":"%U","%OV":"%V","%Ow":"%w","%OW":"%W","%Oy":"%y"};for(var u in s)a=a.replace(new RegExp(u,"g"),s[u]);var l=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],c=["January","February","March","April","May","June","July","August","September","October","November","December"];function f(e,t,r){for(var n="number"==typeof e?e.toString():e||"";n.length<t;)n=r[0]+n;return n}function h(e,t){return f(e,t,"0")}function _(e,t){function r(e){return e<0?-1:e>0?1:0}var n;return 0===(n=r(e.getFullYear()-t.getFullYear()))&&0===(n=r(e.getMonth()-t.getMonth()))&&(n=r(e.getDate()-t.getDate())),n}function d(e){switch(e.getDay()){case 0:return new Date(e.getFullYear()-1,11,29);case 1:return e;case 2:return new Date(e.getFullYear(),0,3);case 3:return new Date(e.getFullYear(),0,2);case 4:return new Date(e.getFullYear(),0,1);case 5:return new Date(e.getFullYear()-1,11,31);case 6:return new Date(e.getFullYear()-1,11,30)}}function p(e){var t=function(e,t){for(var r=new Date(e.getTime());t>0;){var n=me(r.getFullYear()),o=r.getMonth(),i=(n?ke:Te)[o];if(!(t>i-r.getDate()))return r.setDate(r.getDate()+t),r;t-=i-r.getDate()+1,r.setDate(1),o<11?r.setMonth(o+1):(r.setMonth(0),r.setFullYear(r.getFullYear()+1))}return r}(new Date(e.tm_year+1900,0,1),e.tm_yday),r=new Date(t.getFullYear(),0,4),n=new Date(t.getFullYear()+1,0,4),o=d(r),i=d(n);return _(o,t)<=0?_(i,t)<=0?t.getFullYear()+1:t.getFullYear():t.getFullYear()-1}var m={"%a":function(e){return l[e.tm_wday].substring(0,3)},"%A":function(e){return l[e.tm_wday]},"%b":function(e){return c[e.tm_mon].substring(0,3)},"%B":function(e){return c[e.tm_mon]},"%C":function(e){return h((e.tm_year+1900)/100|0,2)},"%d":function(e){return h(e.tm_mday,2)},"%e":function(e){return f(e.tm_mday,2," ")},"%g":function(e){return p(e).toString().substring(2)},"%G":function(e){return p(e)},"%H":function(e){return h(e.tm_hour,2)},"%I":function(e){var t=e.tm_hour;return 0==t?t=12:t>12&&(t-=12),h(t,2)},"%j":function(e){return h(e.tm_mday+function(e,t){for(var r=0,n=0;n<=t;r+=e[n++]);return r}(me(e.tm_year+1900)?ke:Te,e.tm_mon-1),3)},"%m":function(e){return h(e.tm_mon+1,2)},"%M":function(e){return h(e.tm_min,2)},"%n":function(){return"\n"},"%p":function(e){return e.tm_hour>=0&&e.tm_hour<12?"AM":"PM"},"%S":function(e){return h(e.tm_sec,2)},"%t":function(){return"\t"},"%u":function(e){return e.tm_wday||7},"%U":function(e){var t=e.tm_yday+7-e.tm_wday;return h(Math.floor(t/7),2)},"%V":function(e){var t=Math.floor((e.tm_yday+7-(e.tm_wday+6)%7)/7);if((e.tm_wday+371-e.tm_yday-2)%7<=2&&t++,t){if(53==t){var r=(e.tm_wday+371-e.tm_yday)%7;4==r||3==r&&me(e.tm_year)||(t=1)}}else{t=52;var n=(e.tm_wday+7-e.tm_yday-1)%7;(4==n||5==n&&me(e.tm_year%400-1))&&t++}return h(t,2)},"%w":function(e){return e.tm_wday},"%W":function(e){var t=e.tm_yday+7-(e.tm_wday+6)%7;return h(Math.floor(t/7),2)},"%y":function(e){return(e.tm_year+1900).toString().substring(2)},"%Y":function(e){return e.tm_year+1900},"%z":function(e){var t=e.tm_gmtoff,r=t>=0;return t=(t=Math.abs(t)/60)/60*100+t%60,(r?"+":"-")+String("0000"+t).slice(-4)},"%Z":function(e){return e.tm_zone},"%%":function(){return"%"}};for(var u in a=a.replace(/%%/g,"\0\0"),m)a.includes(u)&&(a=a.replace(new RegExp(u,"g"),m[u](i)));var g=ue(a=a.replace(/\0\0/g,"%"),!1);return g.length>t?0:(De(g,e),g.length-1)}function Pe(e){return a["_"+e]}var Re=function(e,t,r,n){e||(e=this),this.parent=e,this.mount=e.mount,this.mounted=null,this.id=he.nextInode++,this.name=t,this.mode=r,this.node_ops={},this.stream_ops={},this.rdev=n};Object.defineProperties(Re.prototype,{read:{get:function(){return!(365&~this.mode)},set:function(e){e?this.mode|=365:this.mode&=-366}},write:{get:function(){return!(146&~this.mode)},set:function(e){e?this.mode|=146:this.mode&=-147}},isFolder:{get:function(){return he.isDir(this.mode)}},isDevice:{get:function(){return he.isChrdev(this.mode)}}}),he.FSNode=Re,he.staticInit();var Le,Fe={__assert_fail:function(e,t,r,n){Z("Assertion failed: "+D(e)+", at: "+[t?D(t):"unknown filename",r,n?D(n):"unknown function"])},__cxa_allocate_exception:function(e){return Ie(e+24)+24},__cxa_begin_catch:function(e){var t=new re(e);return t.get_caught()||(t.set_caught(!0),ee--),t.set_rethrown(!1),J.push(t),function(e){e.add_ref()}(t),t.get_exception_ptr()},__cxa_end_catch:function(){Ne(0),function(e){if(e.release_ref()&&!e.get_rethrown()){var t=e.get_destructor();t&&ie(t)(e.excPtr),ne(e.excPtr)}}(J.pop()),te=0},__cxa_find_matching_catch_2:function(){var e=te;if(!e)return je(0),0;var t=new re(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return je(0),e;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=t.ptr+16;if(He(o,r,i))return je(o),e}return je(r),e},__cxa_find_matching_catch_3:function(){var e=te;if(!e)return je(0),0;var t=new re(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return je(0),e;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=t.ptr+16;if(He(o,r,i))return je(o),e}return je(r),e},__cxa_find_matching_catch_4:function(){var e=te;if(!e)return je(0),0;var t=new re(e);t.set_adjusted_ptr(e);var r=t.get_type();if(!r)return je(0),e;for(var n=0;n<arguments.length;n++){var o=arguments[n];if(0===o||o===r)break;var i=t.ptr+16;if(He(o,r,i))return je(o),e}return je(r),e},__cxa_free_exception:ne,__cxa_rethrow:function(){var e=J.pop();e||Z("no exception to throw");var t=e.excPtr;throw e.get_rethrown()||(J.push(e),e.set_rethrown(!0),e.set_caught(!1),ee++),te=t,t},__cxa_throw:function(e,t,r){throw new re(e).init(t,r),te=e,ee++,e},__cxa_uncaught_exceptions:function(){return ee},__resumeException:function(e){throw te||(te=e),e},__stack_chk_fail:function(){m("missing function: __stack_chk_fail"),Z(-1)},__syscall_fcntl64:function(e,t,r){_e.varargs=r;try{var n=_e.getStreamFromFD(e);switch(t){case 0:return(o=_e.get())<0?-28:he.createStream(n,o).fd;case 1:case 2:case 6:case 7:return 0;case 3:return n.flags;case 4:var o=_e.get();return n.flags|=o,0;case 5:return o=_e.get(),b[o+0>>1]=2,0;case 16:case 8:default:return-28;case 9:return S[Oe()>>2]=28,-1}}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_fstat64:function(e,t){try{var r=_e.getStreamFromFD(e);return _e.doStat(he.stat,r.path,t)}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_getcwd:function(e,t){try{if(0===t)return-28;var r=he.cwd(),n=R(r)+1;return t<n?-68:(P(r,e,t),n)}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_getdents64:function(e,t,r){try{var n=_e.getStreamFromFD(e);n.getdents||(n.getdents=he.readdir(n.path));for(var o=280,i=0,a=he.llseek(n,0,1),s=Math.floor(a/o);s<n.getdents.length&&i+o<=r;){var u,l,c=n.getdents[s];if("."===c)u=n.node.id,l=4;else if(".."===c)u=he.lookupPath(n.path,{parent:!0}).node.id,l=4;else{var f=he.lookupNode(n.node,c);u=f.id,l=he.isChrdev(f.mode)?2:he.isDir(f.mode)?4:he.isLink(f.mode)?10:8}N=[u>>>0,(x=u,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[t+i>>2]=N[0],S[t+i+4>>2]=N[1],N=[(s+1)*o>>>0,(x=(s+1)*o,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[t+i+8>>2]=N[0],S[t+i+12>>2]=N[1],b[t+i+16>>1]=280,w[t+i+18|0]=l,P(c,t+i+19,256),i+=o,s+=1}return he.llseek(n,s*o,0),i}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_ioctl:function(e,t,r){_e.varargs=r;try{var n=_e.getStreamFromFD(e);switch(t){case 21509:case 21505:case 21510:case 21511:case 21512:case 21506:case 21507:case 21508:case 21523:case 21524:return n.tty?0:-59;case 21519:if(!n.tty)return-59;var o=_e.get();return S[o>>2]=0,0;case 21520:return n.tty?-28:-59;case 21531:return o=_e.get(),he.ioctl(n,t,o);default:return-28}}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_lstat64:function(e,t){try{return e=_e.getStr(e),_e.doStat(he.lstat,e,t)}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_mkdirat:function(e,t,r){try{return t=_e.getStr(t),t=_e.calculateAt(e,t),"/"===(t=ae.normalize(t))[t.length-1]&&(t=t.substr(0,t.length-1)),he.mkdir(t,r,0),0}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_newfstatat:function(e,t,r,n){try{t=_e.getStr(t);var o=256&n,i=4096&n;return n&=-6401,t=_e.calculateAt(e,t,i),_e.doStat(o?he.lstat:he.stat,t,r)}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_openat:function(e,t,r,n){_e.varargs=n;try{t=_e.getStr(t),t=_e.calculateAt(e,t);var o=n?_e.get():0;return he.open(t,r,o).fd}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_pipe:function(e){try{if(0==e)throw new he.ErrnoError(21);var t=de.createPipe();return S[e>>2]=t.readable_fd,S[e+4>>2]=t.writable_fd,0}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_poll:function(e,t,r){try{for(var n=0,o=0;o<t;o++){var i=e+8*o,a=S[i>>2],s=b[i+4>>1],u=32,l=he.getStream(a);l&&(u=_e.DEFAULT_POLLMASK,l.stream_ops.poll&&(u=l.stream_ops.poll(l))),(u&=24|s)&&n++,b[i+6>>1]=u}return n}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},__syscall_stat64:function(e,t){try{return e=_e.getStr(e),_e.doStat(he.stat,e,t)}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},_emscripten_get_now_is_monotonic:function(){return!0},_gmtime_js:function(e,t){var r=new Date(1e3*pe(e));S[t>>2]=r.getUTCSeconds(),S[t+4>>2]=r.getUTCMinutes(),S[t+8>>2]=r.getUTCHours(),S[t+12>>2]=r.getUTCDate(),S[t+16>>2]=r.getUTCMonth(),S[t+20>>2]=r.getUTCFullYear()-1900,S[t+24>>2]=r.getUTCDay();var n=Date.UTC(r.getUTCFullYear(),0,1,0,0,0,0),o=(r.getTime()-n)/864e5|0;S[t+28>>2]=o},_localtime_js:function(e,t){var r=new Date(1e3*pe(e));S[t>>2]=r.getSeconds(),S[t+4>>2]=r.getMinutes(),S[t+8>>2]=r.getHours(),S[t+12>>2]=r.getDate(),S[t+16>>2]=r.getMonth(),S[t+20>>2]=r.getFullYear()-1900,S[t+24>>2]=r.getDay();var n=0|function(e){return(me(e.getFullYear())?ge:ye)[e.getMonth()]+e.getDate()-1}(r);S[t+28>>2]=n,S[t+36>>2]=-60*r.getTimezoneOffset();var o=new Date(r.getFullYear(),0,1),i=new Date(r.getFullYear(),6,1).getTimezoneOffset(),a=o.getTimezoneOffset(),s=0|(i!=a&&r.getTimezoneOffset()==Math.min(a,i));S[t+32>>2]=s},_munmap_js:function(e,t,r,n,o,i){try{var a=_e.getStreamFromFD(o);2&r&&_e.doMsync(e,a,t,n,i),he.munmap(a)}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return-e.errno}},_tzset_js:function(e,t,r){var n=(new Date).getFullYear(),o=new Date(n,0,1),i=new Date(n,6,1),a=o.getTimezoneOffset(),s=i.getTimezoneOffset(),u=Math.max(a,s);function l(e){var t=e.toTimeString().match(/\(([A-Za-z ]+)\)$/);return t?t[1]:"GMT"}A[e>>2]=60*u,S[t>>2]=Number(a!=s);var c=l(o),f=l(i),h=ve(c),_=ve(f);s<a?(A[r>>2]=h,A[r+4>>2]=_):(A[r>>2]=_,A[r+4>>2]=h)},abort:function(){Z("")},emscripten_asm_const_double:function(e,t,r){return be(e,t,r)},emscripten_asm_const_int:function(e,t,r){return be(e,t,r)},emscripten_date_now:function(){return Date.now()},emscripten_get_heap_max:function(){return 134217728},emscripten_get_now:we,emscripten_memcpy_big:function(e,t,r){E.copyWithin(e,t,t+r)},emscripten_resize_heap:function(e){var t,r=E.length,n=134217728;if((e>>>=0)>n)return!1;for(var o=1;o<=4;o*=2){var i=r*(1+.2/o);if(i=Math.min(i,e+100663296),Se(Math.min(n,(t=Math.max(e,i))+(65536-t%65536)%65536)))return!0}return!1},environ_get:function(e,t){var r=0;return Me().forEach((function(n,o){var i=t+r;A[e+4*o>>2]=i,function(e,t){for(var r=0;r<e.length;++r)w[0|t++]=e.charCodeAt(r);w[0|t]=0}(n,i),r+=n.length+1})),0},environ_sizes_get:function(e,t){var r=Me();A[e>>2]=r.length;var n=0;return r.forEach((function(e){n+=e.length+1})),A[t>>2]=n,0},fd_close:function(e){try{var t=_e.getStreamFromFD(e);return he.close(t),0}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return e.errno}},fd_read:function(e,t,r,n){try{var o=function(e,t,r){for(var n=0,o=0;o<r;o++){var i=A[t>>2],a=A[t+4>>2];t+=8;var s=he.read(e,w,i,a,undefined);if(s<0)return-1;if(n+=s,s<a)break}return n}(_e.getStreamFromFD(e),t,r);return A[n>>2]=o,0}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return e.errno}},fd_seek:function(e,t,r,n,o){try{var i=(u=r)+2097152>>>0<4194305-!!(s=t)?(s>>>0)+4294967296*u:NaN;if(isNaN(i))return 61;var a=_e.getStreamFromFD(e);return he.llseek(a,i,n),N=[a.position>>>0,(x=a.position,+Math.abs(x)>=1?x>0?(0|Math.min(+Math.floor(x/4294967296),4294967295))>>>0:~~+Math.ceil((x-+(~~x>>>0))/4294967296)>>>0:0)],S[o>>2]=N[0],S[o+4>>2]=N[1],a.getdents&&0===i&&0===n&&(a.getdents=null),0}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return e.errno}var s,u},fd_write:function(e,t,r,n){try{var o=function(e,t,r){for(var n=0,o=0;o<r;o++){var i=A[t>>2],a=A[t+4>>2];t+=8;var s=he.write(e,w,i,a,undefined);if(s<0)return-1;n+=s}return n}(_e.getStreamFromFD(e),t,r);return A[n>>2]=o,0}catch(e){if(void 0===he||!(e instanceof he.ErrnoError))throw e;return e.errno}},invoke_diii:function(e,t,r,n){var o=Ue();try{return ie(e)(t,r,n)}catch(e){if(ze(o),e!==e+0)throw e;Ne(1,0)}},invoke_fiii:function(e,t,r,n){var o=Ue();try{return ie(e)(t,r,n)}catch(e){if(ze(o),e!==e+0)throw e;Ne(1,0)}},invoke_i:function(e){var t=Ue();try{return ie(e)()}catch(e){if(ze(t),e!==e+0)throw e;Ne(1,0)}},invoke_ii:function(e,t){var r=Ue();try{return ie(e)(t)}catch(e){if(ze(r),e!==e+0)throw e;Ne(1,0)}},invoke_iii:function(e,t,r){var n=Ue();try{return ie(e)(t,r)}catch(e){if(ze(n),e!==e+0)throw e;Ne(1,0)}},invoke_iiii:function(e,t,r,n){var o=Ue();try{return ie(e)(t,r,n)}catch(e){if(ze(o),e!==e+0)throw e;Ne(1,0)}},invoke_iiiii:function(e,t,r,n,o){var i=Ue();try{return ie(e)(t,r,n,o)}catch(e){if(ze(i),e!==e+0)throw e;Ne(1,0)}},invoke_iiiiii:function(e,t,r,n,o,i){var a=Ue();try{return ie(e)(t,r,n,o,i)}catch(e){if(ze(a),e!==e+0)throw e;Ne(1,0)}},invoke_iiiiiii:function(e,t,r,n,o,i,a){var s=Ue();try{return ie(e)(t,r,n,o,i,a)}catch(e){if(ze(s),e!==e+0)throw e;Ne(1,0)}},invoke_iiiiiiii:function(e,t,r,n,o,i,a,s){var u=Ue();try{return ie(e)(t,r,n,o,i,a,s)}catch(e){if(ze(u),e!==e+0)throw e;Ne(1,0)}},invoke_iiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,l,c){var f=Ue();try{return ie(e)(t,r,n,o,i,a,s,u,l,c)}catch(e){if(ze(f),e!==e+0)throw e;Ne(1,0)}},invoke_iiiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,l,c,f){var h=Ue();try{return ie(e)(t,r,n,o,i,a,s,u,l,c,f)}catch(e){if(ze(h),e!==e+0)throw e;Ne(1,0)}},invoke_iiiiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,l,c,f,h){var _=Ue();try{return ie(e)(t,r,n,o,i,a,s,u,l,c,f,h)}catch(e){if(ze(_),e!==e+0)throw e;Ne(1,0)}},invoke_jiiii:function(e,t,r,n,o){var i=Ue();try{return Ze(e,t,r,n,o)}catch(e){if(ze(i),e!==e+0)throw e;Ne(1,0)}},invoke_v:function(e){var t=Ue();try{ie(e)()}catch(e){if(ze(t),e!==e+0)throw e;Ne(1,0)}},invoke_vi:function(e,t){var r=Ue();try{ie(e)(t)}catch(e){if(ze(r),e!==e+0)throw e;Ne(1,0)}},invoke_vii:function(e,t,r){var n=Ue();try{ie(e)(t,r)}catch(e){if(ze(n),e!==e+0)throw e;Ne(1,0)}},invoke_viii:function(e,t,r,n){var o=Ue();try{ie(e)(t,r,n)}catch(e){if(ze(o),e!==e+0)throw e;Ne(1,0)}},invoke_viiii:function(e,t,r,n,o){var i=Ue();try{ie(e)(t,r,n,o)}catch(e){if(ze(i),e!==e+0)throw e;Ne(1,0)}},invoke_viiiiiii:function(e,t,r,n,o,i,a,s){var u=Ue();try{ie(e)(t,r,n,o,i,a,s)}catch(e){if(ze(u),e!==e+0)throw e;Ne(1,0)}},invoke_viiiiiiiiii:function(e,t,r,n,o,i,a,s,u,l,c){var f=Ue();try{ie(e)(t,r,n,o,i,a,s,u,l,c)}catch(e){if(ze(f),e!==e+0)throw e;Ne(1,0)}},invoke_viiiiiiiiiiiiiii:function(e,t,r,n,o,i,a,s,u,l,c,f,h,_,d,p){var m=Ue();try{ie(e)(t,r,n,o,i,a,s,u,l,c,f,h,_,d,p)}catch(e){if(ze(m),e!==e+0)throw e;Ne(1,0)}},invoke_viiiij:function(e,t,r,n,o,i,a){var s=Ue();try{Ge(e,t,r,n,o,i,a)}catch(e){if(ze(s),e!==e+0)throw e;Ne(1,0)}},invoke_vij:function(e,t,r,n){var o=Ue();try{Ve(e,t,r,n)}catch(e){if(ze(o),e!==e+0)throw e;Ne(1,0)}},llvm_eh_typeid_for:function(e){return e},memory:d,shmat:function(){m("missing function: shmat"),Z(-1)},shmctl:function(){m("missing function: shmctl"),Z(-1)},shmdt:function(){m("missing function: shmdt"),Z(-1)},shmget:function(){m("missing function: shmget"),Z(-1)},strftime:Ce,strftime_l:function(e,t,r,n,o){return Ce(e,t,r,n)}},Ie=(function(){var e={env:Fe,wasi_snapshot_preview1:Fe};function t(e,t){var r,n=e.exports;a.asm=n,F=a.asm.__indirect_function_table,r=a.asm.__wasm_call_ctors,U.unshift(r),G()}function r(e){t(e.instance)}function n(t){return function(){if(!_&&(c||f)){if("function"==typeof fetch&&!X(O))return fetch(O,{credentials:"same-origin"}).then((function(e){if(!e.ok)throw"failed to load wasm binary file at '"+O+"'";return e.arrayBuffer()})).catch((function(){return K(O)}));if(o)return new Promise((function(e,t){o(O,(function(t){e(new Uint8Array(t))}),t)}))}return Promise.resolve().then((function(){return K(O)}))}().then((function(t){return WebAssembly.instantiate(t,e)})).then((function(e){return e})).then(t,(function(e){m("failed to asynchronously prepare wasm: "+e),Z(e)}))}if(V(),a.instantiateWasm)try{return a.instantiateWasm(e,t)}catch(e){return m("Module.instantiateWasm callback failed with error: "+e),!1}_||"function"!=typeof WebAssembly.instantiateStreaming||q(O)||X(O)||"function"!=typeof fetch?n(r):fetch(O,{credentials:"same-origin"}).then((function(t){return WebAssembly.instantiateStreaming(t,e).then(r,(function(e){return m("wasm streaming compile failed: "+e),m("falling back to ArrayBuffer instantiation"),n(r)}))}))}(),a.___wasm_call_ctors=function(){return(a.___wasm_call_ctors=a.asm.__wasm_call_ctors).apply(null,arguments)},a._malloc=function(){return(Ie=a._malloc=a.asm.malloc).apply(null,arguments)}),Oe=(a.__Audio_Init=function(){return(a.__Audio_Init=a.asm._Audio_Init).apply(null,arguments)},a.__Audio_UnInit=function(){return(a.__Audio_UnInit=a.asm._Audio_UnInit).apply(null,arguments)},a.__Deliver_Recorded_Data=function(){return(a.__Deliver_Recorded_Data=a.asm._Deliver_Recorded_Data).apply(null,arguments)},a.__Audio_Try_Analysis=function(){return(a.__Audio_Try_Analysis=a.asm._Audio_Try_Analysis).apply(null,arguments)},a.__Put_Pre_Aec_Data=function(){return(a.__Put_Pre_Aec_Data=a.asm._Put_Pre_Aec_Data).apply(null,arguments)},a.__Set_Aec_Delay=function(){return(a.__Set_Aec_Delay=a.asm._Set_Aec_Delay).apply(null,arguments)},a.__ReSet_Aec=function(){return(a.__ReSet_Aec=a.asm._ReSet_Aec).apply(null,arguments)},a.__Get_Aec_Delay=function(){return(a.__Get_Aec_Delay=a.asm._Get_Aec_Delay).apply(null,arguments)},a.__Request_Audio_Qos_Data=function(){return(a.__Request_Audio_Qos_Data=a.asm._Request_Audio_Qos_Data).apply(null,arguments)},a.__Get_Mixed_Audio=function(){return(a.__Get_Mixed_Audio=a.asm._Get_Mixed_Audio).apply(null,arguments)},a.__Get_Audio_Edition=function(){return(a.__Get_Audio_Edition=a.asm._Get_Audio_Edition).apply(null,arguments)},a.__Audio_Set_Data_Encryption=function(){return(a.__Audio_Set_Data_Encryption=a.asm._Audio_Set_Data_Encryption).apply(null,arguments)},a.__Add_Cooker_info=function(){return(a.__Add_Cooker_info=a.asm._Add_Cooker_info).apply(null,arguments)},a.__Remove_Cooker_Info=function(){return(a.__Remove_Cooker_Info=a.asm._Remove_Cooker_Info).apply(null,arguments)},a.__Get_Audio_Meat_Weight=function(){return(a.__Get_Audio_Meat_Weight=a.asm._Get_Audio_Meat_Weight).apply(null,arguments)},a.__Change_Aec_Flag=function(){return(a.__Change_Aec_Flag=a.asm._Change_Aec_Flag).apply(null,arguments)},a.__Change_Connect_Type=function(){return(a.__Change_Connect_Type=a.asm._Change_Connect_Type).apply(null,arguments)},a.__Cc_Set_Lang=function(){return(a.__Cc_Set_Lang=a.asm._Cc_Set_Lang).apply(null,arguments)},a.__Interpretation_Configure=function(){return(a.__Interpretation_Configure=a.asm._Interpretation_Configure).apply(null,arguments)},a.__Start_Audio_Share=function(){return(a.__Start_Audio_Share=a.asm._Start_Audio_Share).apply(null,arguments)},a.__InsertShareData=function(){return(a.__InsertShareData=a.asm._InsertShareData).apply(null,arguments)},a.__Set_Share_Volume_Level=function(){return(a.__Set_Share_Volume_Level=a.asm._Set_Share_Volume_Level).apply(null,arguments)},a.__Set_Speech_Volume_Level=function(){return(a.__Set_Speech_Volume_Level=a.asm._Set_Speech_Volume_Level).apply(null,arguments)},a.__Set_All_Speech_Volume_Level=function(){return(a.__Set_All_Speech_Volume_Level=a.asm._Set_All_Speech_Volume_Level).apply(null,arguments)},a.__Update_Monitor_Send_Audio_Info=function(){return(a.__Update_Monitor_Send_Audio_Info=a.asm._Update_Monitor_Send_Audio_Info).apply(null,arguments)},a.__Update_Monitor_Receive_Audio_Info=function(){return(a.__Update_Monitor_Receive_Audio_Info=a.asm._Update_Monitor_Receive_Audio_Info).apply(null,arguments)},a.__Set_Audio_Encryption_Key_Directly=function(){return(a.__Set_Audio_Encryption_Key_Directly=a.asm._Set_Audio_Encryption_Key_Directly).apply(null,arguments)},a.__Add_Roster_Info_Directly=function(){return(a.__Add_Roster_Info_Directly=a.asm._Add_Roster_Info_Directly).apply(null,arguments)},a.__Enable_Share_To_Bo=function(){return(a.__Enable_Share_To_Bo=a.asm._Enable_Share_To_Bo).apply(null,arguments)},a.__Enable_Broadcast_To_Bo=function(){return(a.__Enable_Broadcast_To_Bo=a.asm._Enable_Broadcast_To_Bo).apply(null,arguments)},a.__Set_Audio_Pipe_To_Bo=function(){return(a.__Set_Audio_Pipe_To_Bo=a.asm._Set_Audio_Pipe_To_Bo).apply(null,arguments)},a.__Enable_Pipe_OUT_RTP=function(){return(a.__Enable_Pipe_OUT_RTP=a.asm._Enable_Pipe_OUT_RTP).apply(null,arguments)},a.__Smooth_Send_For_Qos=function(){return(a.__Smooth_Send_For_Qos=a.asm._Smooth_Send_For_Qos).apply(null,arguments)},a.__request_nack_t_periodically_for_qos=function(){return(a.__request_nack_t_periodically_for_qos=a.asm._request_nack_t_periodically_for_qos).apply(null,arguments)},a.__setMultiViewFlag=function(){return(a.__setMultiViewFlag=a.asm._setMultiViewFlag).apply(null,arguments)},a.__Switch_Denoise=function(){return(a.__Switch_Denoise=a.asm._Switch_Denoise).apply(null,arguments)},a.__Switch_Original_Sound=function(){return(a.__Switch_Original_Sound=a.asm._Switch_Original_Sound).apply(null,arguments)},a.__Switch_High_Bitrate=function(){return(a.__Switch_High_Bitrate=a.asm._Switch_High_Bitrate).apply(null,arguments)},a.__Heartbeat=function(){return(a.__Heartbeat=a.asm._Heartbeat).apply(null,arguments)},a.__MuteUnmuteState=function(){return(a.__MuteUnmuteState=a.asm._MuteUnmuteState).apply(null,arguments)},a.__Enable_Outfilter=function(){return(a.__Enable_Outfilter=a.asm._Enable_Outfilter).apply(null,arguments)},a.__set_mmr_signature_info=function(){return(a.__set_mmr_signature_info=a.asm._set_mmr_signature_info).apply(null,arguments)},a.__set_singature_info=function(){return(a.__set_singature_info=a.asm._set_singature_info).apply(null,arguments)},a.__set_meeting_uuid_for_signature=function(){return(a.__set_meeting_uuid_for_signature=a.asm._set_meeting_uuid_for_signature).apply(null,arguments)},a.__update_signagure_verify_action=function(){return(a.__update_signagure_verify_action=a.asm._update_signagure_verify_action).apply(null,arguments)},a.__Set_Audio_Statistics_Flag=function(){return(a.__Set_Audio_Statistics_Flag=a.asm._Set_Audio_Statistics_Flag).apply(null,arguments)},a._GIT_COMMIT_VERSION=function(){return(a._GIT_COMMIT_VERSION=a.asm.GIT_COMMIT_VERSION).apply(null,arguments)},a.getTempRet0=function(){return(a.getTempRet0=a.asm.getTempRet0).apply(null,arguments)},a.___errno_location=function(){return(Oe=a.___errno_location=a.asm.__errno_location).apply(null,arguments)}),Be=a._free=function(){return(Be=a._free=a.asm.free).apply(null,arguments)},xe=(a._ntohs=function(){return(a._ntohs=a.asm.ntohs).apply(null,arguments)},a._htons=function(){return(a._htons=a.asm.htons).apply(null,arguments)},a._htonl=function(){return(a._htonl=a.asm.htonl).apply(null,arguments)},a._emscripten_builtin_memalign=function(){return(xe=a._emscripten_builtin_memalign=a.asm.emscripten_builtin_memalign).apply(null,arguments)}),Ne=a._setThrew=function(){return(Ne=a._setThrew=a.asm.setThrew).apply(null,arguments)},je=a.setTempRet0=function(){return(je=a.setTempRet0=a.asm.setTempRet0).apply(null,arguments)},Ue=a.stackSave=function(){return(Ue=a.stackSave=a.asm.stackSave).apply(null,arguments)},ze=a.stackRestore=function(){return(ze=a.stackRestore=a.asm.stackRestore).apply(null,arguments)},We=a.stackAlloc=function(){return(We=a.stackAlloc=a.asm.stackAlloc).apply(null,arguments)},He=(a.___cxa_demangle=function(){return(a.___cxa_demangle=a.asm.__cxa_demangle).apply(null,arguments)},a.___cxa_can_catch=function(){return(He=a.___cxa_can_catch=a.asm.__cxa_can_catch).apply(null,arguments)}),Ye=a.___cxa_is_pointer_type=function(){return(Ye=a.___cxa_is_pointer_type=a.asm.__cxa_is_pointer_type).apply(null,arguments)},Ve=(a.dynCall_iiij=function(){return(a.dynCall_iiij=a.asm.dynCall_iiij).apply(null,arguments)},a.dynCall_iij=function(){return(a.dynCall_iij=a.asm.dynCall_iij).apply(null,arguments)},a.dynCall_iijii=function(){return(a.dynCall_iijii=a.asm.dynCall_iijii).apply(null,arguments)},a.dynCall_iiijiji=function(){return(a.dynCall_iiijiji=a.asm.dynCall_iiijiji).apply(null,arguments)},a.dynCall_iiijiii=function(){return(a.dynCall_iiijiii=a.asm.dynCall_iiijiii).apply(null,arguments)},a.dynCall_iiiji=function(){return(a.dynCall_iiiji=a.asm.dynCall_iiiji).apply(null,arguments)},a.dynCall_vij=function(){return(Ve=a.dynCall_vij=a.asm.dynCall_vij).apply(null,arguments)}),Ge=a.dynCall_viiiij=function(){return(Ge=a.dynCall_viiiij=a.asm.dynCall_viiiij).apply(null,arguments)},Ze=(a.dynCall_viiijii=function(){return(a.dynCall_viiijii=a.asm.dynCall_viiijii).apply(null,arguments)},a.dynCall_iiiiiijiii=function(){return(a.dynCall_iiiiiijiii=a.asm.dynCall_iiiiiijiii).apply(null,arguments)},a.dynCall_ji=function(){return(a.dynCall_ji=a.asm.dynCall_ji).apply(null,arguments)},a.dynCall_viij=function(){return(a.dynCall_viij=a.asm.dynCall_viij).apply(null,arguments)},a.dynCall_jiii=function(){return(a.dynCall_jiii=a.asm.dynCall_jiii).apply(null,arguments)},a.dynCall_jiji=function(){return(a.dynCall_jiji=a.asm.dynCall_jiji).apply(null,arguments)},a.dynCall_viijii=function(){return(a.dynCall_viijii=a.asm.dynCall_viijii).apply(null,arguments)},a.dynCall_jiiii=function(){return(Ze=a.dynCall_jiiii=a.asm.dynCall_jiiii).apply(null,arguments)});function qe(e){function t(){Le||(Le=!0,a.calledRun=!0,g||(a.noFSInit||he.init.initialized||he.init(),he.ignorePermissions=!1,le.init(),de.root=he.mount(de,{},null),Q(U),a.onRuntimeInitialized&&a.onRuntimeInitialized(),function(){if(a.postRun)for("function"==typeof a.postRun&&(a.postRun=[a.postRun]);a.postRun.length;)e=a.postRun.shift(),z.unshift(e);var e;Q(z)}()))}e=e||u,W>0||(function(){if(a.preRun)for("function"==typeof a.preRun&&(a.preRun=[a.preRun]);a.preRun.length;)e=a.preRun.shift(),j.unshift(e);var e;Q(j)}(),W>0||(a.setStatus?(a.setStatus("Running..."),setTimeout((function(){setTimeout((function(){a.setStatus("")}),1),t()}),1)):t()))}if(a.dynCall_iiiiij=function(){return(a.dynCall_iiiiij=a.asm.dynCall_iiiiij).apply(null,arguments)},a.dynCall_iiiiijj=function(){return(a.dynCall_iiiiijj=a.asm.dynCall_iiiiijj).apply(null,arguments)},a.dynCall_iiiiiijj=function(){return(a.dynCall_iiiiiijj=a.asm.dynCall_iiiiiijj).apply(null,arguments)},a.cwrap=function(e,t,r,n){var o=(r=r||[]).every((e=>"number"===e||"boolean"===e));return"string"!==t&&o&&!n?Pe(e):function(){return function(e,t,r,n){var o={string:e=>{var t=0;if(null!=e&&0!==e){var r=1+(e.length<<2);P(e,t=We(r),r)}return t},array:e=>{var t=We(e.length);return De(e,t),t}},i=Pe(e),a=[],s=0;if(n)for(var u=0;u<n.length;u++){var l=o[r[u]];l?(0===s&&(s=Ue()),a[u]=l(n[u])):a[u]=n[u]}return function(e){return 0!==s&&ze(s),function(e){return"string"===t?D(e):"boolean"===t?Boolean(e):e}(e)}(i.apply(null,a))}(e,t,r,arguments)}},Y=function e(){Le||qe(),Le||(Y=e)},a.preInit)for("function"==typeof a.preInit&&(a.preInit=[a.preInit]);a.preInit.length>0;)a.preInit.pop()();qe()}Module.onRuntimeInitialized=function(){globalThis.onWasmModuleReady()},Module.onAbort=function(){globalThis.onAbort()},Module.instantiateWasm=function(e,t){return WebAssembly.instantiate(wasmModule,e).then((function(e){e.instance?t(e.instance):t(e)})),{}};
2
+ //# sourceMappingURL=https://d1cdksi819e9z7.cloudfront.net/sourcemap/js_audio_worklet_light_simd.min.js-4f139b9afbf10f3ae10f.map