jssz-meeting-component 1.2.13 → 1.3.0

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.
package/dist/index.esm.js CHANGED
@@ -176,10 +176,7 @@ const _sfc_main$1c = {
176
176
  },
177
177
  setup(__props) {
178
178
  return (_ctx, _cache) => {
179
- return openBlock(), createBlock(Transition, {
180
- name: "fade",
181
- to: "body"
182
- }, {
179
+ return openBlock(), createBlock(Transition, { name: "fade" }, {
183
180
  default: withCtx(() => [
184
181
  __props.visible ? (openBlock(), createElementBlock("div", {
185
182
  key: 0,
@@ -220,12 +217,12 @@ const _sfc_main$1c = {
220
217
  };
221
218
  }
222
219
  };
223
- const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-ba22629b"]]);
220
+ const Loading = /* @__PURE__ */ _export_sfc(_sfc_main$1c, [["__scopeId", "data-v-7f7409c4"]]);
224
221
  function createDirective(globalOptions = {}) {
225
222
  function createInstance2(el2, binding) {
226
223
  const fullscreen = el2 === document.body;
227
224
  const textColor = globalOptions.textColor || "#409eff";
228
- const zIndex = globalOptions.zIndex || 2e3;
225
+ const zIndex = globalOptions.zIndex || 1e5;
229
226
  const props = reactive({
230
227
  visible: binding.value,
231
228
  fullscreen,
@@ -289,7 +286,7 @@ function createService(globalOptions = {}) {
289
286
  target: target2 = document.body,
290
287
  // background = globalOptions.background || 'rgba(255,255,255,0.7)',
291
288
  textColor = globalOptions.textColor || "#409eff",
292
- zIndex = globalOptions.zIndex || 2e3
289
+ zIndex = globalOptions.zIndex || 1e5
293
290
  } = options;
294
291
  const props = reactive({
295
292
  visible: true,
@@ -37715,37 +37712,167 @@ function markNetworkDisconnected() {
37715
37712
  );
37716
37713
  handleLevelNotification("lost");
37717
37714
  }
37718
- const runtimeLoaders = /* @__PURE__ */ new Map();
37719
- function loadRnnoiseRuntime(basePath) {
37720
- if (window.RNNoiseNode) {
37721
- return Promise.resolve();
37722
- }
37723
- const url = `${basePath}rnnoise-runtime.js`;
37724
- let loader = runtimeLoaders.get(url);
37725
- if (loader) {
37726
- return loader;
37727
- }
37728
- loader = new Promise((resolve, reject) => {
37729
- const script = document.createElement("script");
37730
- script.src = url;
37731
- script.onload = () => resolve();
37732
- script.onerror = () => reject(new Error(`加载 rnnoise-runtime.js 失败: ${url}`));
37733
- document.head.appendChild(script);
37734
- });
37735
- runtimeLoaders.set(url, loader);
37736
- return loader;
37715
+ class AssetLoader {
37716
+ constructor(config = {}) {
37717
+ this.cdnUrl = config.cdnUrl ?? "https://cdn.mezon.ai/AI/models/datas/noise_suppression/deepfilternet3";
37718
+ }
37719
+ getCdnUrl(relativePath) {
37720
+ return `${this.cdnUrl}/${relativePath}`;
37721
+ }
37722
+ getAssetUrls() {
37723
+ return {
37724
+ wasm: this.getCdnUrl("v2/pkg/df_bg.wasm"),
37725
+ model: this.getCdnUrl("v2/models/DeepFilterNet3_onnx.tar.gz")
37726
+ };
37727
+ }
37728
+ async fetchAsset(url) {
37729
+ const response = await fetch(url);
37730
+ if (!response.ok) {
37731
+ throw new Error(`Failed to fetch asset: ${response.statusText}`);
37732
+ }
37733
+ return response.arrayBuffer();
37734
+ }
37737
37735
  }
37738
- class RnnoiseProcessor {
37736
+ let defaultLoader = null;
37737
+ function getAssetLoader(config) {
37738
+ if (!defaultLoader || config) {
37739
+ defaultLoader = new AssetLoader(config);
37740
+ }
37741
+ return defaultLoader;
37742
+ }
37743
+ async function createWorkletModule(audioContext, workletCode2) {
37744
+ const blob = new Blob([workletCode2], { type: "application/javascript" });
37745
+ const blobUrl = URL.createObjectURL(blob);
37746
+ await audioContext.audioWorklet.addModule(blobUrl);
37747
+ }
37748
+ const WorkletMessageTypes = {
37749
+ SET_SUPPRESSION_LEVEL: "SET_SUPPRESSION_LEVEL",
37750
+ SET_BYPASS: "SET_BYPASS"
37751
+ };
37752
+ var workletCode = "(function () {\n 'use strict';\n\n let wasm;\n\n const heap = new Array(128).fill(undefined);\n\n heap.push(undefined, null, true, false);\n\n function getObject(idx) { return heap[idx]; }\n\n let heap_next = heap.length;\n\n function dropObject(idx) {\n if (idx < 132) return;\n heap[idx] = heap_next;\n heap_next = idx;\n }\n\n function takeObject(idx) {\n const ret = getObject(idx);\n dropObject(idx);\n return ret;\n }\n\n const cachedTextDecoder = (typeof TextDecoder !== 'undefined' ? new TextDecoder('utf-8', { ignoreBOM: true, fatal: true }) : { decode: () => { throw Error('TextDecoder not available') } } );\n\n if (typeof TextDecoder !== 'undefined') { cachedTextDecoder.decode(); }\n let cachedUint8Memory0 = null;\n\n function getUint8Memory0() {\n if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {\n cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);\n }\n return cachedUint8Memory0;\n }\n\n function getStringFromWasm0(ptr, len) {\n ptr = ptr >>> 0;\n return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));\n }\n\n function addHeapObject(obj) {\n if (heap_next === heap.length) heap.push(heap.length + 1);\n const idx = heap_next;\n heap_next = heap[idx];\n\n heap[idx] = obj;\n return idx;\n }\n /**\n * Set DeepFilterNet attenuation limit.\n *\n * Args:\n * - lim_db: New attenuation limit in dB.\n * @param {number} st\n * @param {number} lim_db\n */\n function df_set_atten_lim(st, lim_db) {\n wasm.df_set_atten_lim(st, lim_db);\n }\n\n /**\n * Get DeepFilterNet frame size in samples.\n * @param {number} st\n * @returns {number}\n */\n function df_get_frame_length(st) {\n const ret = wasm.df_get_frame_length(st);\n return ret >>> 0;\n }\n\n let WASM_VECTOR_LEN = 0;\n\n function passArray8ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 1, 1) >>> 0;\n getUint8Memory0().set(arg, ptr / 1);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n }\n /**\n * Create a DeepFilterNet Model\n *\n * Args:\n * - path: File path to a DeepFilterNet tar.gz onnx model\n * - atten_lim: Attenuation limit in dB.\n *\n * Returns:\n * - DF state doing the full processing: stft, DNN noise reduction, istft.\n * @param {Uint8Array} model_bytes\n * @param {number} atten_lim\n * @returns {number}\n */\n function df_create(model_bytes, atten_lim) {\n const ptr0 = passArray8ToWasm0(model_bytes, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.df_create(ptr0, len0, atten_lim);\n return ret >>> 0;\n }\n\n let cachedFloat32Memory0 = null;\n\n function getFloat32Memory0() {\n if (cachedFloat32Memory0 === null || cachedFloat32Memory0.byteLength === 0) {\n cachedFloat32Memory0 = new Float32Array(wasm.memory.buffer);\n }\n return cachedFloat32Memory0;\n }\n\n function passArrayF32ToWasm0(arg, malloc) {\n const ptr = malloc(arg.length * 4, 4) >>> 0;\n getFloat32Memory0().set(arg, ptr / 4);\n WASM_VECTOR_LEN = arg.length;\n return ptr;\n }\n /**\n * Processes a chunk of samples.\n *\n * Args:\n * - df_state: Created via df_create()\n * - input: Input buffer of length df_get_frame_length()\n * - output: Output buffer of length df_get_frame_length()\n *\n * Returns:\n * - Local SNR of the current frame.\n * @param {number} st\n * @param {Float32Array} input\n * @returns {Float32Array}\n */\n function df_process_frame(st, input) {\n const ptr0 = passArrayF32ToWasm0(input, wasm.__wbindgen_malloc);\n const len0 = WASM_VECTOR_LEN;\n const ret = wasm.df_process_frame(st, ptr0, len0);\n return takeObject(ret);\n }\n\n function handleError(f, args) {\n try {\n return f.apply(this, args);\n } catch (e) {\n wasm.__wbindgen_exn_store(addHeapObject(e));\n }\n }\n\n (typeof FinalizationRegistry === 'undefined')\n ? { }\n : new FinalizationRegistry(ptr => wasm.__wbg_dfstate_free(ptr >>> 0));\n\n function __wbg_get_imports() {\n const imports = {};\n imports.wbg = {};\n imports.wbg.__wbindgen_object_drop_ref = function(arg0) {\n takeObject(arg0);\n };\n imports.wbg.__wbg_crypto_566d7465cdbb6b7a = function(arg0) {\n const ret = getObject(arg0).crypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_object = function(arg0) {\n const val = getObject(arg0);\n const ret = typeof(val) === 'object' && val !== null;\n return ret;\n };\n imports.wbg.__wbg_process_dc09a8c7d59982f6 = function(arg0) {\n const ret = getObject(arg0).process;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_versions_d98c6400c6ca2bd8 = function(arg0) {\n const ret = getObject(arg0).versions;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_node_caaf83d002149bd5 = function(arg0) {\n const ret = getObject(arg0).node;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_is_string = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'string';\n return ret;\n };\n imports.wbg.__wbg_require_94a9da52636aacbf = function() { return handleError(function () {\n const ret = module.require;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_function = function(arg0) {\n const ret = typeof(getObject(arg0)) === 'function';\n return ret;\n };\n imports.wbg.__wbindgen_string_new = function(arg0, arg1) {\n const ret = getStringFromWasm0(arg0, arg1);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_msCrypto_0b84745e9245cdf6 = function(arg0) {\n const ret = getObject(arg0).msCrypto;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_randomFillSync_290977693942bf03 = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).randomFillSync(takeObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_getRandomValues_260cc23a41afad9a = function() { return handleError(function (arg0, arg1) {\n getObject(arg0).getRandomValues(getObject(arg1));\n }, arguments) };\n imports.wbg.__wbg_newnoargs_e258087cd0daa0ea = function(arg0, arg1) {\n const ret = new Function(getStringFromWasm0(arg0, arg1));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_63b92bc8671ed464 = function(arg0) {\n const ret = new Uint8Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_new_9efabd6b6d2ce46d = function(arg0) {\n const ret = new Float32Array(getObject(arg0));\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_buffer_12d079cc21e14bdb = function(arg0) {\n const ret = getObject(arg0).buffer;\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_aa4a17c33a06e5cb = function(arg0, arg1, arg2) {\n const ret = new Uint8Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithlength_e9b4878cebadb3d3 = function(arg0) {\n const ret = new Uint8Array(arg0 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_set_a47bac70306a19a7 = function(arg0, arg1, arg2) {\n getObject(arg0).set(getObject(arg1), arg2 >>> 0);\n };\n imports.wbg.__wbg_subarray_a1f73cd4b5b42fe1 = function(arg0, arg1, arg2) {\n const ret = getObject(arg0).subarray(arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_newwithbyteoffsetandlength_4a659d079a1650e0 = function(arg0, arg1, arg2) {\n const ret = new Float32Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_self_ce0dbfc45cf2f5be = function() { return handleError(function () {\n const ret = self.self;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_window_c6fb939a7f436783 = function() { return handleError(function () {\n const ret = window.window;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_globalThis_d1e6af4856ba331b = function() { return handleError(function () {\n const ret = globalThis.globalThis;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbg_global_207b558942527489 = function() { return handleError(function () {\n const ret = global.global;\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_is_undefined = function(arg0) {\n const ret = getObject(arg0) === undefined;\n return ret;\n };\n imports.wbg.__wbg_call_27c0f87801dedf93 = function() { return handleError(function (arg0, arg1) {\n const ret = getObject(arg0).call(getObject(arg1));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_object_clone_ref = function(arg0) {\n const ret = getObject(arg0);\n return addHeapObject(ret);\n };\n imports.wbg.__wbg_call_b3ca7c6051f9bec1 = function() { return handleError(function (arg0, arg1, arg2) {\n const ret = getObject(arg0).call(getObject(arg1), getObject(arg2));\n return addHeapObject(ret);\n }, arguments) };\n imports.wbg.__wbindgen_memory = function() {\n const ret = wasm.memory;\n return addHeapObject(ret);\n };\n imports.wbg.__wbindgen_throw = function(arg0, arg1) {\n throw new Error(getStringFromWasm0(arg0, arg1));\n };\n\n return imports;\n }\n\n function __wbg_finalize_init(instance, module) {\n wasm = instance.exports;\n cachedFloat32Memory0 = null;\n cachedUint8Memory0 = null;\n\n\n return wasm;\n }\n\n function initSync(module) {\n if (wasm !== undefined) return wasm;\n\n const imports = __wbg_get_imports();\n\n if (!(module instanceof WebAssembly.Module)) {\n module = new WebAssembly.Module(module);\n }\n\n const instance = new WebAssembly.Instance(module, imports);\n\n return __wbg_finalize_init(instance);\n }\n\n const WorkletMessageTypes = {\n SET_SUPPRESSION_LEVEL: 'SET_SUPPRESSION_LEVEL',\n SET_BYPASS: 'SET_BYPASS'\n };\n\n class DeepFilterAudioProcessor extends AudioWorkletProcessor {\n constructor(options) {\n super();\n this.dfModel = null;\n this.inputWritePos = 0;\n this.inputReadPos = 0;\n this.outputWritePos = 0;\n this.outputReadPos = 0;\n this.bypass = false;\n this.isInitialized = false;\n this.tempFrame = null;\n this.bufferSize = 8192;\n this.inputBuffer = new Float32Array(this.bufferSize);\n this.outputBuffer = new Float32Array(this.bufferSize);\n try {\n // Initialize WASM from pre-compiled module\n initSync(options.processorOptions.wasmModule);\n const modelBytes = new Uint8Array(options.processorOptions.modelBytes);\n const handle = df_create(modelBytes, options.processorOptions.suppressionLevel ?? 50);\n const frameLength = df_get_frame_length(handle);\n this.dfModel = { handle, frameLength };\n this.bufferSize = frameLength * 4;\n this.inputBuffer = new Float32Array(this.bufferSize);\n this.outputBuffer = new Float32Array(this.bufferSize);\n // Pre-allocate temp frame buffer for processing\n this.tempFrame = new Float32Array(frameLength);\n this.isInitialized = true;\n this.port.onmessage = (event) => {\n this.handleMessage(event.data);\n };\n }\n catch (error) {\n console.error('Failed to initialize DeepFilter in AudioWorklet:', error);\n this.isInitialized = false;\n }\n }\n handleMessage(data) {\n switch (data.type) {\n case WorkletMessageTypes.SET_SUPPRESSION_LEVEL:\n if (this.dfModel && typeof data.value === 'number') {\n const level = Math.max(0, Math.min(100, Math.floor(data.value)));\n df_set_atten_lim(this.dfModel.handle, level);\n }\n break;\n case WorkletMessageTypes.SET_BYPASS:\n this.bypass = Boolean(data.value);\n break;\n }\n }\n getInputAvailable() {\n return (this.inputWritePos - this.inputReadPos + this.bufferSize) % this.bufferSize;\n }\n getOutputAvailable() {\n return (this.outputWritePos - this.outputReadPos + this.bufferSize) % this.bufferSize;\n }\n process(inputList, outputList) {\n const sourceLimit = Math.min(inputList.length, outputList.length);\n const input = inputList[0]?.[0];\n if (!input) {\n return true;\n }\n // Passthrough mode - copy input to all output channels\n if (!this.isInitialized || !this.dfModel || this.bypass || !this.tempFrame) {\n for (let inputNum = 0; inputNum < sourceLimit; inputNum++) {\n const output = outputList[inputNum];\n const channelCount = output.length;\n for (let channelNum = 0; channelNum < channelCount; channelNum++) {\n output[channelNum].set(input);\n }\n }\n return true;\n }\n // Write input to ring buffer\n for (let i = 0; i < input.length; i++) {\n this.inputBuffer[this.inputWritePos] = input[i];\n this.inputWritePos = (this.inputWritePos + 1) % this.bufferSize;\n }\n const frameLength = this.dfModel.frameLength;\n while (this.getInputAvailable() >= frameLength) {\n // Extract frame from ring buffer\n for (let i = 0; i < frameLength; i++) {\n this.tempFrame[i] = this.inputBuffer[this.inputReadPos];\n this.inputReadPos = (this.inputReadPos + 1) % this.bufferSize;\n }\n const processed = df_process_frame(this.dfModel.handle, this.tempFrame);\n // Write to output ring buffer\n for (let i = 0; i < processed.length; i++) {\n this.outputBuffer[this.outputWritePos] = processed[i];\n this.outputWritePos = (this.outputWritePos + 1) % this.bufferSize;\n }\n }\n const outputAvailable = this.getOutputAvailable();\n if (outputAvailable >= 128) {\n for (let inputNum = 0; inputNum < sourceLimit; inputNum++) {\n const output = outputList[inputNum];\n const channelCount = output.length;\n for (let channelNum = 0; channelNum < channelCount; channelNum++) {\n const outputChannel = output[channelNum];\n let readPos = this.outputReadPos;\n for (let i = 0; i < 128; i++) {\n outputChannel[i] = this.outputBuffer[readPos];\n readPos = (readPos + 1) % this.bufferSize;\n }\n }\n }\n this.outputReadPos = (this.outputReadPos + 128) % this.bufferSize;\n }\n return true;\n }\n }\n registerProcessor('deepfilter-audio-processor', DeepFilterAudioProcessor);\n\n})();\n";
37753
+ class DeepFilterNet3Core {
37754
+ constructor(config = {}) {
37755
+ this.assets = null;
37756
+ this.workletNode = null;
37757
+ this.isInitialized = false;
37758
+ this.bypassEnabled = false;
37759
+ this.config = {
37760
+ sampleRate: config.sampleRate ?? 48e3,
37761
+ noiseReductionLevel: config.noiseReductionLevel ?? 50,
37762
+ assetConfig: config.assetConfig
37763
+ };
37764
+ this.assetLoader = getAssetLoader(config.assetConfig);
37765
+ }
37766
+ async initialize() {
37767
+ if (this.isInitialized)
37768
+ return;
37769
+ const assetUrls = this.assetLoader.getAssetUrls();
37770
+ const [wasmBytes, modelBytes] = await Promise.all([
37771
+ this.assetLoader.fetchAsset(assetUrls.wasm),
37772
+ this.assetLoader.fetchAsset(assetUrls.model)
37773
+ ]);
37774
+ const wasmModule = await WebAssembly.compile(wasmBytes);
37775
+ this.assets = { wasmModule, modelBytes };
37776
+ this.isInitialized = true;
37777
+ }
37778
+ async createAudioWorkletNode(audioContext) {
37779
+ this.ensureInitialized();
37780
+ if (!this.assets) {
37781
+ throw new Error("Assets not loaded");
37782
+ }
37783
+ await createWorkletModule(audioContext, workletCode);
37784
+ this.workletNode = new AudioWorkletNode(audioContext, "deepfilter-audio-processor", {
37785
+ processorOptions: {
37786
+ wasmModule: this.assets.wasmModule,
37787
+ modelBytes: this.assets.modelBytes,
37788
+ suppressionLevel: this.config.noiseReductionLevel
37789
+ }
37790
+ });
37791
+ return this.workletNode;
37792
+ }
37793
+ setSuppressionLevel(level) {
37794
+ if (!this.workletNode || typeof level !== "number" || isNaN(level))
37795
+ return;
37796
+ const clampedLevel = Math.max(0, Math.min(100, Math.floor(level)));
37797
+ this.workletNode.port.postMessage({
37798
+ type: WorkletMessageTypes.SET_SUPPRESSION_LEVEL,
37799
+ value: clampedLevel
37800
+ });
37801
+ }
37802
+ destroy() {
37803
+ if (!this.isInitialized)
37804
+ return;
37805
+ if (this.workletNode) {
37806
+ this.workletNode.disconnect();
37807
+ this.workletNode = null;
37808
+ }
37809
+ this.assets = null;
37810
+ this.isInitialized = false;
37811
+ }
37812
+ isReady() {
37813
+ return this.isInitialized && this.workletNode !== null;
37814
+ }
37815
+ setNoiseSuppressionEnabled(enabled) {
37816
+ if (!this.workletNode)
37817
+ return;
37818
+ this.bypassEnabled = !enabled;
37819
+ this.workletNode.port.postMessage({
37820
+ type: WorkletMessageTypes.SET_BYPASS,
37821
+ value: !enabled
37822
+ });
37823
+ }
37824
+ isNoiseSuppressionEnabled() {
37825
+ return !this.bypassEnabled;
37826
+ }
37827
+ ensureInitialized() {
37828
+ if (!this.isInitialized) {
37829
+ throw new Error("Processor not initialized. Call initialize() first.");
37830
+ }
37831
+ }
37832
+ }
37833
+ const GZIP_FIX_FLAG = "__srtcGzipFix";
37834
+ function patchAssetLoaderGzipFix() {
37835
+ const proto = AssetLoader.prototype;
37836
+ if (proto[GZIP_FIX_FLAG]) {
37837
+ return;
37838
+ }
37839
+ const original = proto.fetchAsset;
37840
+ proto.fetchAsset = async function(url) {
37841
+ const buf = await original.call(this, url);
37842
+ if (!url.endsWith(".tar.gz")) {
37843
+ return buf;
37844
+ }
37845
+ const head = new Uint8Array(buf);
37846
+ if (head[0] === 31 && head[1] === 139) {
37847
+ return buf;
37848
+ }
37849
+ const isTar = head.length > 262 && head[257] === 117 && head[258] === 115 && head[259] === 116 && head[260] === 97 && head[261] === 114;
37850
+ if (isTar) {
37851
+ if (typeof CompressionStream === "undefined") {
37852
+ throw new Error("DeepFilterNet 模型被服务器以 Content-Encoding 解压,且当前环境不支持 CompressionStream 无法自动还原;请让服务器对 .tar.gz 不要设置 Content-Encoding: gzip。");
37853
+ }
37854
+ const stream = new Response(buf).body.pipeThrough(new CompressionStream("gzip"));
37855
+ return await new Response(stream).arrayBuffer();
37856
+ }
37857
+ throw new Error(`DeepFilterNet 模型内容无效(既非 gzip 也非 tar,可能路径错误或命中 SPA fallback):${url}`);
37858
+ };
37859
+ proto[GZIP_FIX_FLAG] = true;
37860
+ }
37861
+ class DeepFilterNetProcessor {
37739
37862
  constructor(options = {}) {
37740
- this.name = "rnnoise";
37863
+ this.name = "deepfilternet";
37741
37864
  this.ownContext = false;
37742
- this.basePath = options.basePath ?? "/";
37865
+ this.suppressionLevel = options.suppressionLevel ?? 50;
37866
+ this.assetBasePath = options.assetBasePath ?? "/";
37867
+ this.cdnUrl = options.cdnUrl;
37868
+ }
37869
+ resolveAssetBase() {
37870
+ return (this.cdnUrl ?? this.assetBasePath).replace(/\/+$/, "");
37743
37871
  }
37744
37872
  async init(options) {
37745
37873
  if (options.kind !== Bn.Audio) {
37746
- throw new Error("RnnoiseProcessor 仅支持音频轨道");
37874
+ throw new Error("DeepFilterNetProcessor 仅支持音频轨道");
37747
37875
  }
37748
- await loadRnnoiseRuntime(this.basePath);
37749
37876
  if (options.audioContext) {
37750
37877
  this.audioContext = options.audioContext;
37751
37878
  this.ownContext = false;
@@ -37756,37 +37883,152 @@ class RnnoiseProcessor {
37756
37883
  });
37757
37884
  this.ownContext = true;
37758
37885
  }
37759
- await RNNoiseNode.register(this.audioContext);
37886
+ patchAssetLoaderGzipFix();
37887
+ this.core = new DeepFilterNet3Core({
37888
+ sampleRate: 48e3,
37889
+ noiseReductionLevel: this.suppressionLevel,
37890
+ assetConfig: { cdnUrl: this.resolveAssetBase() }
37891
+ });
37892
+ await this.core.initialize();
37893
+ this.workletNode = await this.core.createAudioWorkletNode(this.audioContext);
37760
37894
  this.sourceNode = this.audioContext.createMediaStreamSource(new MediaStream([options.track]));
37761
- this.rnnoiseNode = new RNNoiseNode(this.audioContext);
37762
37895
  this.destinationNode = this.audioContext.createMediaStreamDestination();
37763
- this.sourceNode.connect(this.rnnoiseNode);
37764
- this.rnnoiseNode.connect(this.destinationNode);
37896
+ this.sourceNode.connect(this.workletNode);
37897
+ this.workletNode.connect(this.destinationNode);
37765
37898
  const tracks = this.destinationNode.stream.getAudioTracks();
37766
37899
  if (!tracks.length) {
37767
- throw new Error("RnnoiseProcessor 未产出音频轨道");
37900
+ throw new Error("DeepFilterNetProcessor 未产出音频轨道");
37768
37901
  }
37769
37902
  this.processedTrack = tracks[0];
37770
37903
  }
37904
+ setSuppressionLevel(level) {
37905
+ var _a25;
37906
+ this.suppressionLevel = Math.max(0, Math.min(100, Math.floor(level)));
37907
+ (_a25 = this.core) == null ? void 0 : _a25.setSuppressionLevel(this.suppressionLevel);
37908
+ }
37909
+ setEnabled(enabled) {
37910
+ var _a25;
37911
+ (_a25 = this.core) == null ? void 0 : _a25.setNoiseSuppressionEnabled(enabled);
37912
+ }
37771
37913
  async destroy() {
37772
- var _a25, _b25, _c2, _d;
37773
- try {
37774
- (_a25 = this.rnnoiseNode) == null ? void 0 : _a25.update(false);
37775
- } catch {
37776
- }
37914
+ var _a25, _b25, _c2;
37915
+ (_a25 = this.core) == null ? void 0 : _a25.destroy();
37777
37916
  (_b25 = this.sourceNode) == null ? void 0 : _b25.disconnect();
37778
- (_c2 = this.rnnoiseNode) == null ? void 0 : _c2.disconnect();
37779
- (_d = this.destinationNode) == null ? void 0 : _d.disconnect();
37917
+ (_c2 = this.destinationNode) == null ? void 0 : _c2.disconnect();
37780
37918
  if (this.ownContext && this.audioContext && this.audioContext.state !== "closed") {
37781
37919
  await this.audioContext.close();
37782
37920
  }
37921
+ this.core = void 0;
37783
37922
  this.sourceNode = void 0;
37784
- this.rnnoiseNode = void 0;
37923
+ this.workletNode = void 0;
37785
37924
  this.destinationNode = void 0;
37786
37925
  this.audioContext = void 0;
37787
37926
  this.processedTrack = void 0;
37788
37927
  }
37789
37928
  }
37929
+ const MIC_NOISE_REDUCTION_PREFS_KEY = "JS_MIC_NOISE_REDUCTION_PREFS";
37930
+ const DEFAULT_SUPPRESSION_LEVEL = 50;
37931
+ const DEFAULT_ASSET_BASE_PATH = "/deepfilternet/";
37932
+ function clampSuppressionLevel(level) {
37933
+ if (!Number.isFinite(level)) return DEFAULT_SUPPRESSION_LEVEL;
37934
+ return Math.max(0, Math.min(100, Math.round(level)));
37935
+ }
37936
+ function readPrefs() {
37937
+ try {
37938
+ const raw = localStorage.getItem(MIC_NOISE_REDUCTION_PREFS_KEY);
37939
+ if (!raw) return {};
37940
+ const parsed = JSON.parse(raw);
37941
+ return parsed && typeof parsed === "object" ? parsed : {};
37942
+ } catch {
37943
+ return {};
37944
+ }
37945
+ }
37946
+ const initialPrefs$1 = readPrefs();
37947
+ const micNoiseReductionState = reactive({
37948
+ enabled: initialPrefs$1.enabled ?? true,
37949
+ suppressionLevel: clampSuppressionLevel(
37950
+ initialPrefs$1.suppressionLevel ?? DEFAULT_SUPPRESSION_LEVEL
37951
+ ),
37952
+ assetBasePath: typeof initialPrefs$1.assetBasePath === "string" && initialPrefs$1.assetBasePath.trim() ? initialPrefs$1.assetBasePath : DEFAULT_ASSET_BASE_PATH
37953
+ });
37954
+ const micNoiseReductionError = ref("");
37955
+ let currentTrack;
37956
+ let currentProcessor;
37957
+ let operationQueue = Promise.resolve();
37958
+ function enqueueOperation(operation) {
37959
+ const next = operationQueue.then(operation, operation);
37960
+ operationQueue = next.then(
37961
+ () => void 0,
37962
+ () => void 0
37963
+ );
37964
+ return next;
37965
+ }
37966
+ async function destroyProcessor(track) {
37967
+ if (!currentProcessor) return;
37968
+ if (track) {
37969
+ try {
37970
+ await track.removeProcessor();
37971
+ } catch (_2) {
37972
+ }
37973
+ }
37974
+ try {
37975
+ await currentProcessor.destroy();
37976
+ } catch (_2) {
37977
+ }
37978
+ currentProcessor = void 0;
37979
+ }
37980
+ async function applyToTrack(track = currentTrack) {
37981
+ if (!track) {
37982
+ await destroyProcessor();
37983
+ micNoiseReductionError.value = "";
37984
+ return { status: "disabled" };
37985
+ }
37986
+ if (!micNoiseReductionState.enabled) {
37987
+ if (currentProcessor) {
37988
+ currentProcessor.setSuppressionLevel(micNoiseReductionState.suppressionLevel);
37989
+ currentProcessor.setEnabled(false);
37990
+ }
37991
+ micNoiseReductionError.value = "";
37992
+ return { status: "disabled" };
37993
+ }
37994
+ try {
37995
+ if (!currentProcessor) {
37996
+ currentProcessor = new DeepFilterNetProcessor({
37997
+ assetBasePath: micNoiseReductionState.assetBasePath,
37998
+ suppressionLevel: micNoiseReductionState.suppressionLevel
37999
+ });
38000
+ await track.setProcessor(currentProcessor);
38001
+ }
38002
+ currentProcessor.setSuppressionLevel(micNoiseReductionState.suppressionLevel);
38003
+ currentProcessor.setEnabled(true);
38004
+ micNoiseReductionError.value = "";
38005
+ return { status: "enabled" };
38006
+ } catch (error) {
38007
+ micNoiseReductionError.value = error instanceof Error ? error.message : "AI 降噪启用失败";
38008
+ await destroyProcessor(track);
38009
+ return { status: "failed", error };
38010
+ }
38011
+ }
38012
+ function bindMicNoiseReductionTrack(track) {
38013
+ return enqueueOperation(async () => {
38014
+ const previousTrack = currentTrack;
38015
+ currentTrack = track;
38016
+ if (previousTrack && previousTrack !== track) {
38017
+ await destroyProcessor(previousTrack);
38018
+ }
38019
+ return applyToTrack(track);
38020
+ });
38021
+ }
38022
+ function releaseMicNoiseReductionTrack(track) {
38023
+ return enqueueOperation(async () => {
38024
+ const targetTrack = track || currentTrack;
38025
+ if (currentTrack === targetTrack) {
38026
+ currentTrack = void 0;
38027
+ }
38028
+ await destroyProcessor(targetTrack);
38029
+ micNoiseReductionError.value = "";
38030
+ });
38031
+ }
37790
38032
  const alertMsg = "需要浏览器授权麦克风摄像头访问,才能进行音视频通话。请依次点击右上角三个点 > 设置 > 隐私设置和安全性 > 网站设置 > 摄像头或麦克风,把权限更改为 允许 。";
37791
38033
  const deviceInfo = reactive({
37792
38034
  speakers: [],
@@ -38265,9 +38507,9 @@ async function stopAndUnpublishLocalMicTrack() {
38265
38507
  if (!track) return;
38266
38508
  try {
38267
38509
  await srtc.unpublishLocalTrack(track);
38268
- await track.removeProcessor();
38269
38510
  } catch (_2) {
38270
38511
  }
38512
+ await releaseMicNoiseReductionTrack(track);
38271
38513
  try {
38272
38514
  await track.stopCapture();
38273
38515
  } catch (_2) {
@@ -39057,12 +39299,14 @@ function openMic() {
39057
39299
  noiseSuppression: true,
39058
39300
  autoGainControl: true
39059
39301
  });
39060
- await track.setProcessor(new RnnoiseProcessor({ basePath: "/rnnoise/" }));
39061
- console.log(11111111111111112e12);
39302
+ const noiseReductionResult = await bindMicNoiseReductionTrack(track);
39062
39303
  await srtc.publishLocalTrack(track, {
39063
39304
  priority: "high"
39064
39305
  });
39065
39306
  speechDetector.start(track);
39307
+ if (noiseReductionResult.status === "failed") {
39308
+ showNotification("AI 降噪启用失败,已自动回退为原始麦克风", "warning", 4e3);
39309
+ }
39066
39310
  meState.microPhoneState = "1";
39067
39311
  meetingStore$1.upsertMember(getUserId(), { audioStatus: "1" });
39068
39312
  writeSelfMediaPrefs({ audioStatus: "1" });
@@ -41118,7 +41362,7 @@ const _hoisted_10$d = {
41118
41362
  const _hoisted_11$c = ["onDblclick"];
41119
41363
  const _hoisted_12$c = ["checked", "disabled", "onChange"];
41120
41364
  const _hoisted_13$a = { class: "card-body" };
41121
- const _hoisted_14$9 = { class: "user" };
41365
+ const _hoisted_14$a = { class: "user" };
41122
41366
  const _hoisted_15$8 = { class: "avatar large" };
41123
41367
  const _hoisted_16$7 = { class: "meta" };
41124
41368
  const _hoisted_17$6 = { class: "user-name" };
@@ -41370,7 +41614,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
41370
41614
  (openBlock(), createElementBlock(Fragment, null, renderList(12, (n2) => {
41371
41615
  return createElementVNode("div", {
41372
41616
  key: n2,
41373
- class: "skeleton"
41617
+ class: "skeleton-con"
41374
41618
  }, [
41375
41619
  createVNode(Skeleton)
41376
41620
  ]);
@@ -41390,7 +41634,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
41390
41634
  onChange: ($event) => toggleUser(user)
41391
41635
  }, null, 40, _hoisted_12$c),
41392
41636
  createElementVNode("div", _hoisted_13$a, [
41393
- createElementVNode("div", _hoisted_14$9, [
41637
+ createElementVNode("div", _hoisted_14$a, [
41394
41638
  createElementVNode("div", _hoisted_15$8, toDisplayString((user.name || "").charAt(0)), 1),
41395
41639
  createElementVNode("div", _hoisted_16$7, [
41396
41640
  createElementVNode("div", _hoisted_17$6, toDisplayString(user.name) + "(" + toDisplayString(user.shortNumber) + ") ", 1),
@@ -41477,7 +41721,7 @@ const _sfc_main$s = /* @__PURE__ */ defineComponent({
41477
41721
  };
41478
41722
  }
41479
41723
  });
41480
- const JSUser = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-9cf6c83a"]]);
41724
+ const JSUser = /* @__PURE__ */ _export_sfc(_sfc_main$s, [["__scopeId", "data-v-0d2f3a42"]]);
41481
41725
  var RoomModalSelectType = /* @__PURE__ */ ((RoomModalSelectType2) => {
41482
41726
  RoomModalSelectType2["microphoneClick"] = "microphoneClick";
41483
41727
  RoomModalSelectType2["cameraClick"] = "cameraClick";
@@ -41649,7 +41893,7 @@ const _hoisted_11$b = {
41649
41893
  };
41650
41894
  const _hoisted_12$b = { class: "section-title" };
41651
41895
  const _hoisted_13$9 = ["onClick"];
41652
- const _hoisted_14$8 = { class: "label" };
41896
+ const _hoisted_14$9 = { class: "label" };
41653
41897
  const _hoisted_15$7 = {
41654
41898
  key: 0,
41655
41899
  class: "empty-device"
@@ -41687,7 +41931,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
41687
41931
  if (id !== deviceInfo.microPhoneId) {
41688
41932
  try {
41689
41933
  await switchMicrophone(id);
41690
- deviceInfo.microPhoneId = id;
41691
41934
  } catch (error) {
41692
41935
  console.error("切换麦克风失败:", error);
41693
41936
  alert(
@@ -41700,7 +41943,6 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
41700
41943
  if (id !== deviceInfo.cameraId) {
41701
41944
  try {
41702
41945
  await switchCamera(id);
41703
- deviceInfo.cameraId = id;
41704
41946
  emit("close");
41705
41947
  } catch (error) {
41706
41948
  console.error("切换摄像头失败:", error);
@@ -41780,7 +42022,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
41780
42022
  createElementVNode("span", {
41781
42023
  class: normalizeClass(["check", { show: cam.deviceId === cameraId.value }])
41782
42024
  }, "✓", 2),
41783
- createElementVNode("span", _hoisted_14$8, toDisplayString(formatDeviceLabel(cam.label)), 1)
42025
+ createElementVNode("span", _hoisted_14$9, toDisplayString(formatDeviceLabel(cam.label)), 1)
41784
42026
  ], 8, _hoisted_13$9);
41785
42027
  }), 128)),
41786
42028
  !cameras.value.length ? (openBlock(), createElementBlock("div", _hoisted_15$7, " 暂无摄像头,请检查电脑设备 ")) : createCommentVNode("", true)
@@ -41789,7 +42031,7 @@ const _sfc_main$q = /* @__PURE__ */ defineComponent({
41789
42031
  };
41790
42032
  }
41791
42033
  });
41792
- const DeviceSelector = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-ced67da8"]]);
42034
+ const DeviceSelector = /* @__PURE__ */ _export_sfc(_sfc_main$q, [["__scopeId", "data-v-30a7a3c3"]]);
41793
42035
  const _hoisted_1$n = ["title"];
41794
42036
  const _hoisted_2$l = {
41795
42037
  class: "signal-bars",
@@ -41812,7 +42054,7 @@ const _hoisted_10$b = { class: "popup-grid" };
41812
42054
  const _hoisted_11$a = { class: "popup-item-label" };
41813
42055
  const _hoisted_12$a = { class: "popup-item-value" };
41814
42056
  const _hoisted_13$8 = { class: "popup-section" };
41815
- const _hoisted_14$7 = { class: "popup-grid" };
42057
+ const _hoisted_14$8 = { class: "popup-grid" };
41816
42058
  const _hoisted_15$6 = { class: "popup-item-label" };
41817
42059
  const _hoisted_16$6 = { class: "popup-item-value" };
41818
42060
  const _hoisted_17$5 = { class: "popup-header" };
@@ -42203,7 +42445,7 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
42203
42445
  ]),
42204
42446
  createElementVNode("div", _hoisted_13$8, [
42205
42447
  _cache[6] || (_cache[6] = createElementVNode("div", { class: "popup-section-title" }, "网络指标", -1)),
42206
- createElementVNode("div", _hoisted_14$7, [
42448
+ createElementVNode("div", _hoisted_14$8, [
42207
42449
  (openBlock(true), createElementBlock(Fragment, null, renderList(overviewItems.value, (item) => {
42208
42450
  return openBlock(), createElementBlock("div", {
42209
42451
  key: item.label,
@@ -42345,7 +42587,7 @@ const _hoisted_10$a = { class: "status-right" };
42345
42587
  const _hoisted_11$9 = ["onClick"];
42346
42588
  const _hoisted_12$9 = { class: "video-wrapper" };
42347
42589
  const _hoisted_13$7 = ["id"];
42348
- const _hoisted_14$6 = { class: "avatar-container" };
42590
+ const _hoisted_14$7 = { class: "avatar-container" };
42349
42591
  const _hoisted_15$5 = { class: "avatar" };
42350
42592
  const _hoisted_16$5 = { class: "video-loading-overlay" };
42351
42593
  const _hoisted_17$4 = { class: "video-loading-text" };
@@ -42773,7 +43015,7 @@ const _sfc_main$n = /* @__PURE__ */ defineComponent({
42773
43015
  }, null, 8, _hoisted_13$7), [
42774
43016
  [vShow, (user == null ? void 0 : user.cameraStatus) === "1"]
42775
43017
  ]),
42776
- withDirectives(createElementVNode("div", _hoisted_14$6, [
43018
+ withDirectives(createElementVNode("div", _hoisted_14$7, [
42777
43019
  createElementVNode("div", _hoisted_15$5, toDisplayString(unref(getUserAvatar)(user)), 1)
42778
43020
  ], 512), [
42779
43021
  [vShow, (user == null ? void 0 : user.cameraStatus) !== "1"]
@@ -43936,7 +44178,7 @@ const _hoisted_10$8 = { key: 1 };
43936
44178
  const _hoisted_11$7 = { class: "js-member-actions" };
43937
44179
  const _hoisted_12$7 = ["onClick"];
43938
44180
  const _hoisted_13$6 = ["onClick"];
43939
- const _hoisted_14$5 = ["onClick"];
44181
+ const _hoisted_14$6 = ["onClick"];
43940
44182
  const _hoisted_15$4 = ["id"];
43941
44183
  const _hoisted_16$4 = ["onClick"];
43942
44184
  const _hoisted_17$3 = ["onClick"];
@@ -44229,7 +44471,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
44229
44471
  onClick: ($event) => kickOut(member.member.memberId)
44230
44472
  }, " 移出会议 ", 8, _hoisted_17$3)
44231
44473
  ], 10, _hoisted_15$4)) : createCommentVNode("", true)
44232
- ], 8, _hoisted_14$5)) : createCommentVNode("", true)
44474
+ ], 8, _hoisted_14$6)) : createCommentVNode("", true)
44233
44475
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
44234
44476
  member.roleType !== "5" ? (openBlock(), createBlock(SvgIcon, {
44235
44477
  key: 0,
@@ -44298,7 +44540,7 @@ const _hoisted_10$7 = {
44298
44540
  const _hoisted_11$6 = { class: "chat-input-toolbar" };
44299
44541
  const _hoisted_12$6 = { class: "image-upload-wrapper" };
44300
44542
  const _hoisted_13$5 = { class: "emoji-picker-popup-global" };
44301
- const _hoisted_14$4 = ["onClick"];
44543
+ const _hoisted_14$5 = ["onClick"];
44302
44544
  const _sfc_main$i = /* @__PURE__ */ defineComponent({
44303
44545
  __name: "Chat",
44304
44546
  setup(__props) {
@@ -44839,7 +45081,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
44839
45081
  key: emoji,
44840
45082
  class: "emoji-item",
44841
45083
  onClick: ($event) => selectEmoji(emoji)
44842
- }, toDisplayString(emoji), 9, _hoisted_14$4);
45084
+ }, toDisplayString(emoji), 9, _hoisted_14$5);
44843
45085
  }), 64))
44844
45086
  ])
44845
45087
  ]),
@@ -45432,7 +45674,10 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
45432
45674
  const Tree = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-b9399b47"]]);
45433
45675
  const _hoisted_1$b = { class: "js-invite-modal-content-left" };
45434
45676
  const _hoisted_2$b = { class: "search" };
45435
- const _hoisted_3$b = { class: "js-tree-container" };
45677
+ const _hoisted_3$b = {
45678
+ class: "js-tree-container",
45679
+ "loading-text": "加载中..."
45680
+ };
45436
45681
  const _hoisted_4$9 = {
45437
45682
  key: 0,
45438
45683
  class: "js-empty"
@@ -45446,6 +45691,7 @@ const _hoisted_10$6 = { class: "js-selected-users" };
45446
45691
  const _hoisted_11$5 = { class: "js-selected-item-info" };
45447
45692
  const _hoisted_12$5 = { class: "js-selected-item-avatar" };
45448
45693
  const _hoisted_13$4 = { class: "js-selected-item-name" };
45694
+ const _hoisted_14$4 = { class: "js-modal-right-footer" };
45449
45695
  const _sfc_main$c = /* @__PURE__ */ defineComponent({
45450
45696
  __name: "Invite",
45451
45697
  props: {
@@ -45459,6 +45705,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45459
45705
  const themeClass = computed(() => `theme-${props.theme}`);
45460
45706
  const emit = __emit;
45461
45707
  const isVisible = computed(() => props.visible);
45708
+ const loading = ref(false);
45462
45709
  const treeData = ref([]);
45463
45710
  const originalTreeData = ref([]);
45464
45711
  const searchKeyword = ref("");
@@ -45487,6 +45734,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45487
45734
  });
45488
45735
  return users;
45489
45736
  });
45737
+ const canConfirm = computed(() => selectedUsers.value.length > 0);
45490
45738
  const treeProps = {
45491
45739
  children: "children",
45492
45740
  label: "name",
@@ -45543,25 +45791,26 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45543
45791
  emit("update:visible", false);
45544
45792
  };
45545
45793
  async function getAddressBook() {
45794
+ var _a25;
45795
+ loading.value = true;
45546
45796
  try {
45547
- getMemberTree(props.taskId).then((res) => {
45548
- if (res.code == 200) {
45549
- treeData.value = res.data.contacts;
45550
- originalTreeData.value = JSON.parse(JSON.stringify(treeData.value));
45551
- nextTick(() => {
45552
- var _a25;
45553
- (_a25 = treeRef.value) == null ? void 0 : _a25.expandAll();
45554
- });
45555
- } else {
45556
- }
45557
- }).catch(() => {
45558
- treeData.value = [];
45559
- originalTreeData.value = [];
45560
- }).finally(() => {
45561
- });
45562
- } catch (err) {
45797
+ const res = await getMemberTree(props.taskId);
45798
+ if ((res == null ? void 0 : res.code) == 200) {
45799
+ treeData.value = ((_a25 = res.data) == null ? void 0 : _a25.contacts) ?? [];
45800
+ originalTreeData.value = JSON.parse(JSON.stringify(treeData.value));
45801
+ nextTick(() => {
45802
+ var _a26;
45803
+ (_a26 = treeRef.value) == null ? void 0 : _a26.expandAll();
45804
+ });
45805
+ return;
45806
+ }
45807
+ treeData.value = [];
45808
+ originalTreeData.value = [];
45809
+ } catch {
45563
45810
  treeData.value = [];
45564
45811
  originalTreeData.value = [];
45812
+ } finally {
45813
+ loading.value = false;
45565
45814
  }
45566
45815
  }
45567
45816
  watch(
@@ -45584,6 +45833,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45584
45833
  emitter.off("refreshUserList", getAddressBook);
45585
45834
  });
45586
45835
  return (_ctx, _cache) => {
45836
+ const _directive_loding = resolveDirective("loding");
45587
45837
  return isVisible.value ? (openBlock(), createElementBlock("div", {
45588
45838
  key: 0,
45589
45839
  class: normalizeClass(["js-invite-modal", themeClass.value])
@@ -45605,14 +45855,14 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45605
45855
  size: 15
45606
45856
  })
45607
45857
  ]),
45608
- createElementVNode("div", _hoisted_3$b, [
45609
- treeData.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$9, [
45858
+ withDirectives((openBlock(), createElementBlock("div", _hoisted_3$b, [
45859
+ !loading.value && treeData.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_4$9, [
45610
45860
  createVNode(SvgIcon, {
45611
45861
  name: "NoUserIcon",
45612
- size: 120
45862
+ size: 100
45613
45863
  }),
45614
- _cache[1] || (_cache[1] = createTextVNode(" 暂无用户 ", -1))
45615
- ])) : (openBlock(), createBlock(Tree, {
45864
+ _cache[2] || (_cache[2] = createTextVNode(" 暂无用户 ", -1))
45865
+ ])) : !loading.value ? (openBlock(), createBlock(Tree, {
45616
45866
  key: 1,
45617
45867
  ref_key: "treeRef",
45618
45868
  ref: treeRef,
@@ -45620,7 +45870,9 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45620
45870
  props: treeProps,
45621
45871
  onNodeClick: handleClick,
45622
45872
  onCheckChange: handleCheck
45623
- }, null, 8, ["data"]))
45873
+ }, null, 8, ["data"])) : createCommentVNode("", true)
45874
+ ])), [
45875
+ [_directive_loding, loading.value]
45624
45876
  ])
45625
45877
  ]),
45626
45878
  createElementVNode("div", _hoisted_5$8, [
@@ -45655,11 +45907,11 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45655
45907
  }), 128))
45656
45908
  ])
45657
45909
  ]),
45658
- createElementVNode("div", { class: "js-modal-right-footer" }, [
45910
+ createElementVNode("div", _hoisted_14$4, [
45659
45911
  createElementVNode("div", {
45660
- class: "button button-primary",
45661
- onClick: handleConfirm
45662
- }, "确定"),
45912
+ class: normalizeClass(["button button-primary", { disabled: !canConfirm.value }]),
45913
+ onClick: _cache[1] || (_cache[1] = ($event) => canConfirm.value && handleConfirm())
45914
+ }, " 确定 ", 2),
45663
45915
  createElementVNode("div", {
45664
45916
  class: "button button-secondary",
45665
45917
  onClick: handleClose
@@ -45670,7 +45922,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
45670
45922
  };
45671
45923
  }
45672
45924
  });
45673
- const Invite = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-deceb72d"]]);
45925
+ const Invite = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-005d905b"]]);
45674
45926
  const _hoisted_1$a = { class: "js-meeting-invite-modal" };
45675
45927
  const _hoisted_2$a = { class: "js-meeting-invite-modal-header" };
45676
45928
  const _hoisted_3$a = { class: "js-meeting-invite-modal-title" };
@@ -46943,7 +47195,7 @@ const _sfc_main$8 = /* @__PURE__ */ defineComponent({
46943
47195
  };
46944
47196
  }
46945
47197
  });
46946
- const JSSOSSetting = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-e743e4f6"]]);
47198
+ const JSSOSSetting = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__scopeId", "data-v-cb010b2e"]]);
46947
47199
  const _hoisted_1$6 = { class: "dialog" };
46948
47200
  const _hoisted_2$6 = { class: "modal-header" };
46949
47201
  const _hoisted_3$6 = { class: "content" };
@@ -47670,7 +47922,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47670
47922
  const selectedSpeakerId = computed({
47671
47923
  get: () => deviceInfo.speakerId,
47672
47924
  set: async (value) => {
47673
- setPreferredSpeakerDevice(value);
47925
+ await switchSpeaker(value);
47674
47926
  if (speakerTesting.value) {
47675
47927
  await restartSpeakerTest();
47676
47928
  }
@@ -47680,7 +47932,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47680
47932
  get: () => deviceInfo.microPhoneId,
47681
47933
  set: async (value) => {
47682
47934
  await switchMicrophone(value);
47683
- setPreferredMicrophoneDevice(value);
47684
47935
  if (microphoneTesting.value) {
47685
47936
  await restartMicrophoneTest();
47686
47937
  }
@@ -47690,7 +47941,6 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
47690
47941
  get: () => deviceInfo.cameraId,
47691
47942
  set: async (value) => {
47692
47943
  await switchCamera(value);
47693
- setPreferredCameraDevice(value);
47694
47944
  if (visible.value && activeTab.value === "camera") {
47695
47945
  await startCameraPreview();
47696
47946
  }
@@ -48131,7 +48381,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
48131
48381
  };
48132
48382
  }
48133
48383
  });
48134
- const JSSettings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b420aee0"]]);
48384
+ const JSSettings = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-6a4053ae"]]);
48135
48385
  function scheduleJoinRoom() {
48136
48386
  setTimeout(() => {
48137
48387
  try {