import { defineComponent, ref, reactive, computed, useSSRContext } from 'vue'; import { ssrRenderAttrs, ssrRenderStyle, ssrRenderList, ssrRenderAttr, ssrIncludeBooleanAttr, ssrLooseContain, ssrLooseEqual, ssrInterpolate, ssrRenderClass } from 'vue/server-renderer'; import { u as useApi } from './useApi-B-E5eLsI.mjs'; import { u as useToast } from './useToast-CS21XT61.mjs'; import { _ as _export_sfc } from './server.mjs'; import './useLoading-D4zrSa2m.mjs'; import '../nitro/nitro.mjs'; import 'node:http'; import 'node:https'; import 'node:events'; import 'node:buffer'; import 'node:fs'; import 'node:path'; import 'node:crypto'; import 'node:url'; import '../routes/renderer.mjs'; import 'vue-bundle-renderer/runtime'; import 'unhead/server'; import 'devalue'; import 'unhead/utils'; import 'pinia'; import 'perfect-debounce'; const SCAT_STT = 1; const SCAT_TTS = 2; const SCAT_MT = 3; const SCAT_AST = 4; const _sfc_main = /* @__PURE__ */ defineComponent({ __name: "calltranslate", __ssrInlineRender: true, setup(__props) { const LANGS = [ { c: "zh", n: "中文" }, { c: "en", n: "英文" }, { c: "ja", n: "日语" }, { c: "ko", n: "韩语" }, { c: "fr", n: "法语" }, { c: "de", n: "德语" }, { c: "es", n: "西班牙语" }, { c: "pt", n: "葡萄牙语" }, { c: "ru", n: "俄语" }, { c: "ar", n: "阿拉伯语" }, { c: "th", n: "泰语" }, { c: "vi", n: "越南语" }, { c: "id", n: "印尼语" }, { c: "ms", n: "马来语" }, { c: "hi", n: "印地语" } ]; function langName(c) { const x = LANGS.find((l) => l.c === c); return x ? x.n : c || ""; } const REGIONS = [ { value: 1, label: "中国" }, { value: 2, label: "美国" }, { value: 3, label: "东亚" }, { value: 4, label: "东南亚" }, { value: 5, label: "南亚" }, { value: 6, label: "中东" }, { value: 7, label: "欧洲" }, { value: 8, label: "俄罗斯" }, { value: 9, label: "非洲" }, { value: 10, label: "南美" }, { value: 11, label: "北美" }, { value: 12, label: "大洋洲" }, { value: 13, label: "巴西" }, { value: 14, label: "印度" } ]; useApi(); useToast(); const backendReady = ref(true); const allSvcs = ref([]); const pairs = ref([]); const curRegion = ref(REGIONS.length ? REGIONS[0].value : 1); const editorOpen = ref(false); const editingPair = ref(null); ref(0); const ed = reactive({ src: "zh", dst: "en", bidir: false, mode: 0, asr: "", mt: "", tts: "", ast: "", enable: true }); function svcsByCat(cat) { return allSvcs.value.filter( (s) => s.enable && (s.categories || "").split(",").map(Number).indexOf(cat) >= 0 ); } function svcName(id) { const s = allSvcs.value.find((x) => x.id === id); return s ? s.name : id || "未配置"; } const syncOpen = ref(false); const syncDesc = ref(""); const syncTargets = ref([]); const syncRegions = computed(() => REGIONS.filter((r) => r.value !== curRegion.value)); return (_ctx, _push, _parent, _attrs) => { _push(`
按区域和语言对配置翻译服务。支持三段式(ASR→MT→TTS)和端到端 AST 两种模式。
当前区域暂无语言对配置