@jt-home/mfe-components 1.0.39 → 1.0.41

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.
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-poi8lPme.cjs");require("vue");require("element-plus");exports.JtAttachmentPreview=e.JtAttachmentPreview;exports.JtAttachmentPreviewByParams=e.JtAttachmentPreviewByParams;exports.setupJtAttachmentPreview=e.setupJtAttachmentPreview;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../index-c8YlthVt.cjs");require("vue");require("element-plus");exports.JtAttachmentPreview=e.JtAttachmentPreview;exports.JtAttachmentPreviewByParams=e.JtAttachmentPreviewByParams;exports.setupJtAttachmentPreview=e.setupJtAttachmentPreview;
@@ -1,4 +1,4 @@
1
- import { J as m, a as i, b as s } from "../index-C6AyqKhk.js";
1
+ import { J as m, a as i, b as s } from "../index-moF0d2Ee.js";
2
2
  import "vue";
3
3
  import "element-plus";
4
4
  export {
@@ -0,0 +1 @@
1
+ "use strict";const t=require("vue"),z=require("element-plus"),ae={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js 无法读取该文件,已切换为浏览器内置预览",PDF加载中___:"PDF 加载中...",PDF加载失败:"PDF 加载失败",上传:"上 传",下载:"下载",保存:"保存",信息:"信息","信息集不能为空,最后一条数据不可删除":"信息集不能为空,最后一条数据不可删除",共:"共",关闭:"关闭",删除:"删除",加载中___:"加载中...",取消:"取消",否:"否",复位:"复位",展开:"展 开",序号:"序号",开始日期:"开始日期",接口请求失败:"接口请求失败",操作:"操作",收起:"收 起",放大:"放大",文件信息缺少URL:"文件信息缺少 URL",文件信息获取失败:"文件信息获取失败",新增:"新增",是:"是",暂不支持预览此类型的文件:"暂不支持预览此类型的文件",暂无数据:"暂无数据",暂无附件:"暂无附件",未命名标题:"未命名标题",条记录:"条记录",查询:"查 询",正在获取文件信息:"正在获取文件信息",正在识别文件类型:"正在识别文件类型",目录:"目录",确认:"确认","确认删除吗?":"确认删除吗?",结束日期:"结束日期",编辑:"编辑",缩小:"缩小",请先调用setupJtAttachmentPreview注册请求配置:"请先调用 setupJtAttachmentPreview 注册请求配置",请检查mapResponse是否返回了url字段:"请检查 mapResponse 是否返回了 url 字段","请稍候,获取完成后将自动预览或下载":"请稍候,获取完成后将自动预览或下载","请稍候,识别完成后将自动预览或下载":"请稍候,识别完成后将自动预览或下载",请输入:"请输入",请输入关键词:"请输入关键词",请选择:"请选择",请选择文件:"请选择文件",请选择日期:"请选择日期",重置:"重 置",附件预览:"附件预览",附件预览未初始化:"附件预览未初始化"}},ie={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js cannot read the file. It has been switched to browser built-in preview",PDF加载中___:"PDF loading...",PDF加载失败:"PDF loading failed",上传:"upload",下载:"download",保存:"save",信息:"information","信息集不能为空,最后一条数据不可删除":"The information set cannot be empty, and the last piece of data cannot be deleted",共:"total of",关闭:"closed",删除:"delete",加载中___:"Loading...",取消:"cancel",否:"no",复位:"reset",展开:"commence",序号:"serial number",开始日期:"start date",接口请求失败:"Interface request failed",操作:"operation",收起:"put away",放大:"enlarged",文件信息缺少URL:"File information missing URL",文件信息获取失败:"Failed to obtain file information",新增:"new",是:"is",暂不支持预览此类型的文件:"Preview of this type of file is not currently supported",暂无数据:"no data",暂无附件:"No attachments",未命名标题:"Unnamed title",条记录:"records",查询:"enquiries",正在获取文件信息:"Getting file information",正在识别文件类型:"Identifying file type",目录:"directory",确认:"confirmed","确认删除吗?":"Confirm deletion?",结束日期:"end date",编辑:"edit",缩小:"narrow",请先调用setupJtAttachmentPreview注册请求配置:"Please first call setupJtAttachmentPreview to register request configuration",请检查mapResponse是否返回了url字段:"Please check whether the mapResponse returns the url field","请稍候,获取完成后将自动预览或下载":"Please wait, it will be automatically previewed or downloaded after the acquisition is completed","请稍候,识别完成后将自动预览或下载":"Please wait, it will be automatically previewed or downloaded after identification is completed",请输入:"please enter",请输入关键词:"Please enter keywords",请选择:"please select",请选择文件:"please select a file",请选择日期:"please add your dates",重置:"reset",附件预览:"Attachment Preview",附件预览未初始化:"Attachment preview not initialized"}},re={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js ไม่สามารถอ่านไฟล์ได้ เปลี่ยนเป็นตัวอย่างในตัวเบราว์เซอร์",PDF加载中___:"กําลังโหลดไฟล์ PDF ...",PDF加载失败:"โหลด PDF ล้มเหลว",上传:"อัปโหลด",下载:"โหลดข้อมูล",保存:"บันทึก",信息:"ข้อมูล","信息集不能为空,最后一条数据不可删除":"ชุดข้อมูลไม่สามารถว่างเปล่าได้ ข้อมูลสุดท้ายไม่สามารถลบได้",共:"รวมทั้งหมด",关闭:"ปิด",删除:"ลบ",加载中___:"กําลังโหลด ...",取消:"ยกเลิก",否:"ไม่ ไม่",复位:"รีเซ็ต (รีเซ็ต)",展开:"เ ป็ น เ รื่ อ ง",序号:"หมายเลขซีเรียล",开始日期:"วันที่เริ่มต้น",接口请求失败:"การร้องขออินเทอร์เฟซล้มเหลว",操作:"การดําเนินงาน",收起:"รีบเก็บ",放大:"ขยาย",文件信息缺少URL:"ข้อมูลไฟล์หายไป URL",文件信息获取失败:"ล้มเหลวในการรับข้อมูลไฟล์",新增:"เพิ่มใหม่",是:"ใช่ ใช่",暂不支持预览此类型的文件:"การแสดงตัวอย่างของไฟล์ประเภทนี้ไม่ได้รับการสนับสนุน",暂无数据:"ข้อมูลที่ไม่มี",暂无附件:"ไม่มีสิ่งที่แนบมา",未命名标题:"ชื่อที่ไม่มีชื่อ",条记录:"บันทึก",查询:"สอบถามข้อมูล",正在获取文件信息:"กําลังรับข้อมูลไฟล์",正在识别文件类型:"กําลังระบุประเภทของไฟล์",目录:"แคตตาล็อก",确认:"การยืนยัน","确认删除吗?":"ยืนยันการลบหรือไม่?",结束日期:"วันที่สิ้นสุด",编辑:"แก้ไข",缩小:"ลดขนาด",请先调用setupJtAttachmentPreview注册请求配置:"โปรดเรียก setupJtAttachmentPreviewเพื่อขอการตั้งค่าลงทะเบียน",请检查mapResponse是否返回了url字段:"โปรดตรวจสอบว่า mapResponse ได้ส่งกลับฟิลด์ url หรือไม่","请稍候,获取完成后将自动预览或下载":"โปรดรอสักครู่ จะมีการแสดงตัวอย่างหรือดาวน์โหลดโดยอัตโนมัติเมื่อได้รับเสร็จสมบูรณ์","请稍候,识别完成后将自动预览或下载":"โปรดรอสักครู่ การแสดงตัวอย่างหรือดาวน์โหลดจะดําเนินการโดยอัตโนมัติเมื่อการระบุเสร็จสมบูรณ์",请输入:"กรุณาใส่",请输入关键词:"กรุณาใส่คําหลัก",请选择:"กรุณาเลือก",请选择文件:"กรุณาเลือกไฟล์",请选择日期:"กรุณาเลือกวันที่",重置:"รีเซ็ต",附件预览:"เอกสารแนบตัวอย่าง",附件预览未初始化:"การแสดงตัวอย่างของสิ่งที่แนบมาไม่ได้เริ่มต้น"}},oe={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js không thể đọc tập tin, đã chuyển sang trình duyệt built-in xem trước",PDF加载中___:"Đang tải PDF...",PDF加载失败:"Nạp PDF thất bại",上传:"tải lên / tải lên",下载:"Tải xuống đây",保存:"Lưu lại (Lưu lại)",信息:"thông tin / thông tin / thông tin","信息集不能为空,最后一条数据不可删除":"Bộ thông tin không thể trống, dữ liệu cuối cùng không thể bị xóa",共:"tổng cộng",关闭:"Đóng cửa đi",删除:"Xóa bỏ nó đi",加载中___:"Đang tải...",取消:"Hủy bỏ nó đi",否:"Không, không, không, không",复位:"Đặt lại vị trí",展开:"mở ra / mở ra",序号:"số sê-ri / số sê-ri",开始日期:"Ngày bắt đầu",接口请求失败:"Yêu cầu giao diện không thành công",操作:"hoạt động / hoạt động",收起:"thu thập lại / thu thập lại",放大:"Tự phóng to lên",文件信息缺少URL:"Thiếu URL thông tin tệp",文件信息获取失败:"Lấy thông tin tệp không thành công",新增:"Thêm thêm",是:"Phải, phải, phải",暂不支持预览此类型的文件:"Xem trước kiểu tệp này không được hỗ trợ",暂无数据:"tạm thời không có dữ liệu",暂无附件:"tạm thời không có đính kèm",未命名标题:"Tiêu đề không được đặt tên",条记录:"một bản ghi chép / một bản ghi chép",查询:"tra vấn / tra vấn / tra vấn / tra vấn",正在获取文件信息:"Đang lấy thông tin tệp",正在识别文件类型:"Đang nhận dạng loại tệp",目录:"Danh mục hàng đầu",确认:"xác nhận / xác nhận / xác nhận","确认删除吗?":"Bạn có xác nhận xóa không?",结束日期:"Ngày kết thúc",编辑:"Sửa đổi (edit)",缩小:"thu hẹp lại",请先调用setupJtAttachmentPreview注册请求配置:"Vui lòng gọi setupJtAttachmentPreview để đăng ký yêu cầu cấu hình",请检查mapResponse是否返回了url字段:"Hãy kiểm tra xem mapResponse có trả về trường url không","请稍候,获取完成后将自动预览或下载":"Vui lòng chờ đợi, khi lấy xong sẽ tự động xem trước hoặc tải xuống","请稍候,识别完成后将自动预览或下载":"Vui lòng chờ đợi, xem trước hoặc tải xuống sẽ tự động khi nhận dạng hoàn tất",请输入:"Vui lòng nhập vào",请输入关键词:"Vui lòng nhập từ khóa",请选择:"Vui lòng chọn",请选择文件:"Vui lòng chọn tập tin",请选择日期:"Vui lòng chọn ngày",重置:"Đặt lại nó",附件预览:"Xem trước tệp đính kèm",附件预览未初始化:"Bản xem trước đính kèm không được khởi tạo"}},se={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js no puede leer este archivo, cambió a la vista previa integrada del navegador",PDF加载中___:"Carga de PDF...",PDF加载失败:"PDF carga fallida",上传:"Upload",下载:"Download",保存:"Preservación",信息:"Información","信息集不能为空,最后一条数据不可删除":"El conjunto de información no puede estar vacío, el último elemento de datos no se puede eliminar.",共:"Total",关闭:"Cierre",删除:"Eliminación",加载中___:"Loading...",取消:"Cancelación",否:"no",复位:"Reset",展开:"Expandir",序号:"Número de serie",开始日期:"Fecha de inicio",接口请求失败:"Solicitud de interfaz fallida",操作:"Operaciones",收起:"Colección",放大:"Ampliar",文件信息缺少URL:"Falta URL para la información del archivo",文件信息获取失败:"Error en la obtención de información del archivo",新增:"Añadir",是:"Sí.",暂不支持预览此类型的文件:"La vista previa de este tipo de archivo no es compatible",暂无数据:"No hay datos",暂无附件:"No hay anexo",未命名标题:"Título sin nombre",条记录:"Strip registro",查询:"Inquesta",正在获取文件信息:"Obtención de información de archivo",正在识别文件类型:"Identificación del tipo de archivo",目录:"Catálogo",确认:"Validación","确认删除吗?":"¿Confirmas la eliminación?",结束日期:"Fecha final",编辑:"Edición",缩小:"Reducción",请先调用setupJtAttachmentPreview注册请求配置:"Llame a setupJtAttachmentPreview para registrar la configuración de la solicitud",请检查mapResponse是否返回了url字段:"Compruebe que mapResponse devuelve el campo url","请稍候,获取完成后将自动预览或下载":"Por favor espere, la vista previa o descarga se realizará automáticamente cuando se complete la adquisición","请稍候,识别完成后将自动预览或下载":"Por favor espere, la vista previa o descarga se realizará automáticamente cuando se complete el reconocimiento.",请输入:"Por favor, ingrese",请输入关键词:"Por favor, introduzca palabras clave",请选择:"Por favor seleccione",请选择文件:"Seleccione un archivo",请选择日期:"Seleccione la fecha",重置:"Reset",附件预览:"Anexo Preview",附件预览未初始化:"Anexo Preview no inicializado"}},ce={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js tidak dapat membaca file ini, telah beralih ke pratinjau built-in browser",PDF加载中___:"PDF sedang memuat...",PDF加载失败:"Gagal memuat PDF",上传:"Upload",下载:"Download",保存:"Penyimpanan",信息:"Informasi:","信息集不能为空,最后一条数据不可删除":"Set informasi tidak dapat kosong, data terakhir tidak dapat dihapus, dan data terakhir tidak dapat dihapus.",共:"bersama-sama",关闭:"Penutupan",删除:"Penghapusan",加载中___:"sedang dimuat...",取消:"Pembatalan",否:"Tidak",复位:"Reset",展开:"membuka.",序号:"nomor seri",开始日期:"Tanggal Mulai",接口请求失败:"Permintaan antarmuka gagal",操作:"Operasi",收起:"Mengumpulkan.",放大:"Memperbesar",文件信息缺少URL:"Informasi file tidak ada URL",文件信息获取失败:"Gagal mendapatkan informasi file",新增:"Tambahan baru",是:"Ya, ya, ya, ya, ya.",暂不支持预览此类型的文件:"Pratinjau jenis file ini tidak didukung untuk saat ini",暂无数据:"Tidak ada data untuk saat ini",暂无附件:"Tidak ada lampiran untuk saat ini",未命名标题:"Judul yang tidak diberi nama",条记录:"Catatan-catatan",查询:"Penyelidikan",正在获取文件信息:"Mengambil informasi file",正在识别文件类型:"Mengidentifikasi jenis file",目录:"Katalog",确认:"Konfirmasi","确认删除吗?":"Confirm penghapusan?",结束日期:"Tanggal akhir",编辑:"Editorial:",缩小:"Mengurangi",请先调用setupJtAttachmentPreview注册请求配置:"Silakan panggil setupJtAttachmentPreview terlebih dahulu untuk mendaftarkan permintaan konfigurasi",请检查mapResponse是否返回了url字段:"Periksa apakah mapResponse mengembalikan bidang url.","请稍候,获取完成后将自动预览或下载":"Silakan tunggu sebentar, pratinjau atau unduhan akan dilakukan secara otomatis setelah mendapatkan selesai.","请稍候,识别完成后将自动预览或下载":"Silakan tunggu, pratinjau atau unduhan akan dilakukan secara otomatis setelah identifikasi selesai",请输入:"Silakan Masukkan",请输入关键词:"Silakan masukkan kata kunci",请选择:"Silakan pilih",请选择文件:"Silakan pilih file",请选择日期:"Silakan pilih tanggal",重置:"Reset Reset Reset",附件预览:"Lampiran Pratinjau",附件预览未初始化:"Lampiran Pratinjau tidak diinisialisasi Lampiran Pratinjau tidak diinisialisasi Lampiran Pratinjau tidak diinisialisasi Lampiran Pratinjau tidak diinisialisasi"}},le={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"PDF.js kann die Datei nicht lesen, wurde auf die eingebaute Vorschau des Browsers umgeschaltet",PDF加载中___:"PDF wird geladen...",PDF加载失败:"PDF-Laden fehlgeschlagen",上传:"Übertragen.",下载:"Download",保存:"Bewahrung",信息:"Information","信息集不能为空,最后一条数据不可删除":"Der Datensatz kann nicht leer sein, die letzten Daten können nicht gelöscht werden.",共:"gemeinsam",关闭:"Schließen",删除:"Löschen",加载中___:"geladen...",取消:"Absage",否:"Nein Nein",复位:"Wiederherstellung",展开:"Öffnen.",序号:"Seriennummern",开始日期:"Startdatum",接口请求失败:"Schnittstellenanforderung fehlgeschlagen",操作:"Operationen",收起:"Sammeln Sie",放大:"Vergrößern",文件信息缺少URL:"Die URL fehlt",文件信息获取失败:"Erfassung von Dokumentinformationen fehlgeschlagen",新增:"Neu hinzugefügt",是:"Ja, ja.",暂不支持预览此类型的文件:"Die Vorschau dieser Art von Dateien wird derzeit nicht unterstützt",暂无数据:"Vorläufig keine Daten",暂无附件:"Vorläufig kein Anhang",未命名标题:"Unbenannter Titel",条记录:"Artikel Aufzeichnungen",查询:"Nachfrage",正在获取文件信息:"Dokumentinformationen werden erfasst.",正在识别文件类型:"Dokumenttypen werden erkannt",目录:"Katalog",确认:"bestätigt","确认删除吗?":"Bestätigen Sie die Löschung?",结束日期:"Enddatum",编辑:"Herausgeber",缩小:"reduziert.",请先调用setupJtAttachmentPreview注册请求配置:"Bitte rufen Sie setupJtAttachmentPreview auf, um die Konfiguration anzufordern.",请检查mapResponse是否返回了url字段:"Bitte überprüfen Sie, ob mapResponse das URL-Feld zurückgibt.","请稍候,获取完成后将自动预览或下载":"Bitte warten Sie, sobald der Erwerb abgeschlossen ist, wird automatisch eine Vorschau oder Download angezeigt","请稍候,识别完成后将自动预览或下载":"Bitte warten Sie, sobald die Identifizierung abgeschlossen ist, wird automatisch eine Vorschau oder ein Download durchgeführt.",请输入:"Bitte importieren",请输入关键词:"Bitte geben Sie ein Schlüsselwort ein",请选择:"Bitte wählen",请选择文件:"Bitte wählen Sie ein Dokument",请选择日期:"Bitte Datum wählen",重置:"Ersetzen",附件预览:"Anhang Vorschau",附件预览未初始化:"Anlage Vorschau nicht initialisiert"}},ue={common:{"PDF_js无法读取该文件,已切换为浏览器内置预览":"O PDF.js não pode ler o arquivo, mudou para a visualização integrada do navegador",PDF加载中___:"PDF Carregando...",PDF加载失败:"PDF não foi carregado",上传:"upload",下载:"Download",保存:"Preservação",信息:"Informações","信息集不能为空,最后一条数据不可删除":"O conjunto de informações não pode estar vazio, o último item de dados não pode ser excluído",共:"Total",关闭:"Fechamento",删除:"Exclusão",加载中___:"Loading...",取消:"Cancelamento",否:"Não",复位:"Reset",展开:"Desdobramento",序号:"Número de série",开始日期:"Data de início",接口请求失败:"Solicitação de interface falhada",操作:"Operação",收起:"Vá em frente.",放大:"Magnificação",文件信息缺少URL:"URL faltando para informações de arquivo",文件信息获取失败:"Falha na aquisição de informações do arquivo",新增:"Novo",是:"Sim, sim.",暂不支持预览此类型的文件:"A visualização deste tipo de arquivo não é suportada no momento",暂无数据:"Nenhum dado temporário",暂无附件:"Nenhum anexo",未命名标题:"Título sem nome",条记录:"Registros",查询:"Inquérito",正在获取文件信息:"Obtenção de informações de arquivo",正在识别文件类型:"Identificação do tipo de arquivo",目录:"Catálogo",确认:"Confirmação","确认删除吗?":"Confirmo a remoção?",结束日期:"Data do fim",编辑:"Edição",缩小:"Reduzir",请先调用setupJtAttachmentPreview注册请求配置:"Por favor, primeiro chame setupJtAttachmentPreview para registrar a configuração da solicitação",请检查mapResponse是否返回了url字段:"Verifique se o mapaResponse está retornando o campo url","请稍候,获取完成后将自动预览或下载":"Por favor, espere, a pré - visualização ou o download será feito automaticamente quando a aquisição estiver concluída","请稍候,识别完成后将自动预览或下载":"Por favor, espere, a visualização ou o download será feito automaticamente quando o reconhecimento estiver concluído.",请输入:"Por favor, insira",请输入关键词:"Por favor, insira uma palavra chave",请选择:"Por favor, selecione",请选择文件:"Por favor, selecione um arquivo",请选择日期:"Por favor, escolha uma data",重置:"Reset",附件预览:"Anexo Preview",附件预览未初始化:"Anexo Preview não inicializado"}},de={},me={"zh-cn":ae,en:ie,th:re,vi:oe,es:se,id:ce,de:le,pt:ue,km:de},he={zh:"zh-cn","zh-hans":"zh-cn","zh-cn":"zh-cn",zh_cn:"zh-cn",cn:"zh-cn",en_us:"en","en-us":"en",th_th:"th","th-th":"th",vi_vn:"vi","vi-vn":"vi",es_es:"es","es-es":"es",id_id:"id","id-id":"id",de_de:"de","de-de":"de",pt_pt:"pt","pt-pt":"pt",pt_br:"pt","pt-br":"pt",km_kh:"km","km-kh":"km"};function R(e){const n=String(e||"zh-cn").trim().toLowerCase().replace(/_/g,"-");return he[n]||n||"zh-cn"}const E=t.ref("zh-cn");let Y;function T(){Y?.(),Y=void 0}function G(e){return e?typeof e=="function"?R(e()):t.isRef(e)?R(e.value):R(e):E.value}function ve(e,n){if(e)return n.split(".").reduce((a,r)=>{if(!(!a||typeof a!="object"))return a[r]},e)}function K(e,n){const a=ve(me[e],n);return typeof a=="string"?a:void 0}function pe(e){T(),E.value=R(e)}function fe(){return E.value}function ge(){T(),E.value="zh-cn"}function we(e,n={}){if(T(),n.locale){if(typeof n.locale=="function"||t.isRef(n.locale)){Y=t.watch(()=>G(n.locale),a=>{E.value=a},{immediate:!0,flush:"sync"});return}E.value=G(n.locale)}}function s(e,n=e){const a=n||e,r=E.value;return K(r,e)||K("zh-cn",e)||a||e}/*! Element Plus Icons Vue v2.3.2 */var ye=t.defineComponent({name:"Download",__name:"download",setup(e){return(n,a)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64m384-253.696 236.288-236.352 45.248 45.248L508.8 704 192 387.2l45.248-45.248L480 584.704V128h64z"})]))}}),_e=ye,ke=t.defineComponent({name:"RefreshLeft",__name:"refresh-left",setup(e){return(n,a)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"M289.088 296.704h92.992a32 32 0 0 1 0 64H232.96a32 32 0 0 1-32-32V179.712a32 32 0 0 1 64 0v50.56a384 384 0 0 1 643.84 282.88 384 384 0 0 1-383.936 384 384 384 0 0 1-384-384h64a320 320 0 1 0 640 0 320 320 0 0 0-555.712-216.448z"})]))}}),be=ke,Pe=t.defineComponent({name:"ZoomIn",__name:"zoom-in",setup(e){return(n,a)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"})]))}}),Ae=Pe,De=t.defineComponent({name:"ZoomOut",__name:"zoom-out",setup(e){return(n,a)=>(t.openBlock(),t.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 1024 1024"},[t.createElementVNode("path",{fill:"currentColor",d:"m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"})]))}}),je=De;const Ee="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANgAAADYCAMAAAC+/t3fAAAAaVBMVEUAAABWapNVapKeqsLJztx3hKnGzN2yu8////9XapWcqMGps8lXapVYa5RWaZWps8lfcJjS1+KjrsVXapWapr////9sfaKrtMrV2uWBj7B4iKqWob1wgaXr7fOBj6/Ax9dhc5yhq8OKl7Wba+6tAAAAE3RSTlMAgGDuDyVLoYDe2XuXRb68cy6e4BCQEAAAAyZJREFUeNrt29tyokAUheGOQjIoeMhuCQ4e0Pd/yCE1STU4mGq7bXqzZ/23ufoqYblTqkIIIYQQQggNlM42Lzctf5nMD22bKQYVOQ30sTPt6dEO74mKXLoiCgDTi1RFbUMUBhZXluQUDKbnWxWtjMLB2pYqUj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g","png","gif","webp","bmp","svg","avif","ico"]),Ce=new Set(["mp4","webm","ogg","ogv","mov","m4v"]),Be=new Set(["mp3","wav","ogg","oga","m4a","aac","flac"]),Re=new Set(["html","htm","txt","json","xml","csv","md","log"]),Fe=new Set(["doc","docx","xls","xlsx","ppt","pptx","zip","rar","7z"]);let k=null,S=null,M=null;async function ze(){return S||(S=Promise.all([Promise.resolve().then(()=>require("./pdf-Da0bm_Ya.cjs")),Promise.resolve().then(()=>require("./pdf.worker.min-BAJUPwg6.cjs"))]).then(([e,n])=>(e.GlobalWorkerOptions.workerSrc=n.default,e))),S}function Me(e){return typeof e=="string"?{url:e}:e}function H(e){const[n]=e.split(/[?#]/);return n??""}function O(e,n){if(n?.trim())return n.trim();const a=H(e).split("/").filter(Boolean).pop();if(!a)return s("common.附件预览");try{return decodeURIComponent(a)}catch{return a}}function U(e){return H(e).match(/\.([a-z0-9]+)$/i)?.[1]?.toLowerCase()??""}function Ne(e){return e?.trim().replace(/^\./,"").toLowerCase()??""}function Se(e){const n=Ne(e);return xe.has(n)?"image":n==="pdf"?"pdf":Ce.has(n)?"video":Be.has(n)?"audio":Re.has(n)?"iframe":Fe.has(n)?"unsupported":"unknown"}function q(e){const n=e.toLowerCase().split(";")[0]?.trim()??"";return n.startsWith("image/")?"image":n==="application/pdf"?"pdf":n.startsWith("video/")?"video":n.startsWith("audio/")?"audio":n.startsWith("text/")?"iframe":"unknown"}function W(e){if(!e.url.trim())return"empty";if(e.mode&&e.mode!=="auto")return e.mode;if(e.mimeType){const a=q(e.mimeType);if(a!=="unknown")return a}const n=Se(e.extension||U(e.name||"")||U(e.url));return n!=="unknown"?n:"unknown"}async function Je(e){try{const a=(await fetch(e,{method:"HEAD"})).headers.get("content-type")??"";return q(a)}catch{return"unknown"}}async function Q(e){const n=await fetch(e);if(!n.ok)throw new Error(`fetch failed: ${n.status}`);return n.blob()}async function Ye(e){const n=await fetch(e);if(!n.ok)throw new Error(`fetch failed: ${n.status}`);return new Uint8Array(await n.arrayBuffer())}function Ue(e,n){const a=U(n);return a==="doc"||a==="docx"?"W":a==="xls"||a==="xlsx"?"X":a==="ppt"||a==="pptx"?"P":a==="zip"||a==="rar"||a==="7z"?"ZIP":e==="pdf"?"PDF":"FILE"}function X(e,n,a){return t.h("button",{class:a,type:"button",onClick:()=>{$(e,n)}},[t.h(z.ElIcon,{class:"jt-attachment-preview-service__download-icon"},()=>t.h(_e)),t.h("span",{class:"jt-attachment-preview-service__download-text"},s("common.下载"))])}function J(e){return e==="image"||e==="pdf"}function Z(e){return t.h("div",{class:"jt-attachment-preview-service__preview-fallback"},[t.h("img",{class:"jt-attachment-preview-service__preview-fallback-icon",src:e.icon,alt:""}),t.h("div",{class:"jt-attachment-preview-service__unsupported-text"},s("common.暂不支持预览此类型的文件")),t.h("div",{class:"jt-attachment-preview-service__file-name",title:e.name},e.name)])}function I(e,n){const a=document.createElement("a");a.href=e,a.download=n,a.style.display="none",document.body.appendChild(a),a.click(),a.remove()}async function $(e,n){try{const a=await Q(e),r=URL.createObjectURL(a);I(r,n),URL.revokeObjectURL(r)}catch{I(e,n)}}const Ie=t.defineComponent({name:"JtAttachmentPreviewPdfCanvas",props:{url:{type:String,required:!0},name:{type:String,required:!0},downloadName:{type:String,required:!0},downloadable:{type:Boolean,required:!0}},emits:{previewLoad:e=>e instanceof Event,previewError:e=>e instanceof Event},setup(e,{emit:n}){const a=t.ref("loading"),r=t.ref([]),i=t.ref([]),c=new Map,l=t.ref("");let m=null,y=[],h=0;async function v(o,u){if(!u)return null;const _=typeof u=="string"?await o.getDestination(u):u;return!Array.isArray(_)||!_[0]?null:await o.getPageIndex(_[0])+1}async function A(o,u,_=0){if(!u?.length)return[];const g=[];for(const P of u){const L=await v(o,P.dest);g.push({title:P.title||s("common.未命名标题"),pageNumber:L,level:_});const D=await A(o,P.items,_+1);g.push(...D)}return g}function f(){h+=1;for(const o of y)o.cancel();y=[],m?.destroy(),m=null,c.clear()}async function b(){f();const o=h;a.value="loading",l.value="",r.value=[],i.value=[];try{const u=await ze();if(o!==h)return;const _=await Ye(e.url);if(o!==h)return;m=u.getDocument({data:_});const g=await m.promise;if(o!==h)return;r.value=Array.from({length:g.numPages},(D,j)=>j+1),i.value=await A(g,await g.getOutline()),await t.nextTick();const P=c.values().next().value,L=Math.max((P?.parentElement?.clientWidth??800)-32,320);for(const D of r.value){if(o!==h)return;const j=await g.getPage(D),w=c.get(D),x=w?.getContext("2d");if(!w||!x)continue;const N=j.getViewport({scale:1}),d=Math.min(L/N.width,2),C=j.getViewport({scale:d}),F=window.devicePixelRatio||1;w.width=Math.floor(C.width*F),w.height=Math.floor(C.height*F),w.style.width=`${Math.floor(C.width)}px`,w.style.height=`${Math.floor(C.height)}px`,x.setTransform(F,0,0,F,0,0);const V=j.render({canvas:w,canvasContext:x,viewport:C});y.push(V),await V.promise}if(o!==h)return;a.value="ready",n("previewLoad",new Event("load"))}catch(u){if(o!==h)return;a.value="error",l.value=u instanceof Error?u.message:s("common.PDF加载失败"),n("previewError",new Event("error"))}}t.watch(()=>e.url,b,{immediate:!0}),t.onBeforeUnmount(f);function p(o){if(!o)return;c.get(o)?.scrollIntoView({behavior:"smooth",block:"start"})}return()=>t.h("div",{class:"jt-attachment-preview-service__pdf-viewer"},[a.value==="loading"?t.h("div",{class:"jt-attachment-preview-service__pdf-state"},s("common.PDF加载中___")):null,a.value==="error"?t.h("div",{class:"jt-attachment-preview-service__pdf-state"},[Z({icon:Le,name:e.name})]):null,null,null,t.h("div",{class:["jt-attachment-preview-service__pdf-layout",a.value!=="ready"?"jt-attachment-preview-service__pdf-layout--hidden":""]},[i.value.length?t.h("aside",{class:"jt-attachment-preview-service__pdf-outline"},[t.h("div",{class:"jt-attachment-preview-service__pdf-outline-title"},s("common.目录")),t.h("div",{class:"jt-attachment-preview-service__pdf-outline-list"},i.value.map((o,u)=>t.h("button",{key:`${o.title}-${u}`,class:"jt-attachment-preview-service__pdf-outline-item",style:{paddingLeft:`${12+o.level*14}px`},type:"button",disabled:!o.pageNumber,title:o.title,onClick:()=>p(o.pageNumber)},o.title)))]):null,t.h("div",{class:"jt-attachment-preview-service__pdf-pages"},r.value.map(o=>t.h("canvas",{key:o,ref:u=>{u instanceof HTMLCanvasElement&&c.set(o,u)},class:"jt-attachment-preview-service__pdf-page"})))])])}}),Te=t.defineComponent({name:"JtAttachmentPreviewImageTransform",props:{url:{type:String,required:!0},name:{type:String,required:!0},downloadName:{type:String,required:!0},downloadable:{type:Boolean,required:!0},fit:{type:String,default:"contain"}},emits:{previewLoad:e=>e instanceof Event,previewError:e=>e instanceof Event},setup(e,{emit:n}){const a=t.ref(null),r=t.ref("ready"),i=t.ref(1),c=t.ref(!1);let l=0,m=0,y=0,h=0,v=0,A=0,f=0;const b=t.computed(()=>({"--jt-attachment-preview-service-image-fit":e.fit,transform:`translate(${l}px, ${m}px) scale(${i.value})`}));function p(){a.value&&(a.value.style.transform=`translate(${l}px, ${m}px) scale(${i.value})`)}function o(){f||(f=window.requestAnimationFrame(()=>{f=0,p()}))}function u(d){i.value=Math.min(Math.max(Number(d.toFixed(2)),.2),5),i.value<=1&&(l=0,m=0),p()}function _(){u(i.value+.2)}function g(){const d=Math.max(Number((i.value-.2).toFixed(2)),.2);i.value=d,d<=1&&(l=0,m=0),p()}function P(){l=0,m=0,u(1)}function L(d){r.value="ready",n("previewLoad",d)}function D(d){r.value="error",n("previewError",d)}function j(d){i.value<=1||(d.preventDefault(),c.value=!0,y=d.clientX,h=d.clientY,v=l,A=m,window.addEventListener("pointermove",w),window.addEventListener("pointerup",x,{once:!0}))}function w(d){c.value&&(l=v+d.clientX-y,m=A+d.clientY-h,o())}function x(){c.value=!1,window.removeEventListener("pointermove",w)}function N(d){d.preventDefault(),u(i.value+(d.deltaY<0?.1:-.1))}return t.onMounted(p),t.watch(()=>e.url,()=>{r.value="ready",P()}),t.onBeforeUnmount(()=>{window.removeEventListener("pointermove",w),f&&window.cancelAnimationFrame(f)}),()=>t.h("div",{class:"jt-attachment-preview-service__image-viewer"},r.value==="error"?Z({icon:Ee,name:e.name}):[t.h("img",{ref:a,class:["jt-attachment-preview-service__media","jt-attachment-preview-service__image",i.value>1?"jt-attachment-preview-service__image--draggable":"",c.value?"jt-attachment-preview-service__image--dragging":""],src:e.url,alt:e.name,style:b.value,onLoad:L,onError:D,onPointerdown:j,onWheel:N,onDragstart:d=>d.preventDefault(),draggable:!1}),t.h("div",{class:"jt-attachment-preview-service__image-toolbar"},[t.h("button",{class:"jt-attachment-preview-service__image-tool",type:"button",title:s("common.缩小"),onClick:g},[t.h(z.ElIcon,()=>t.h(je))]),t.h("span",{class:"jt-attachment-preview-service__image-scale"},`${Math.round(i.value*100)}%`),t.h("button",{class:"jt-attachment-preview-service__image-tool",type:"button",title:s("common.放大"),onClick:_},[t.h(z.ElIcon,()=>t.h(Ae))]),t.h("button",{class:"jt-attachment-preview-service__image-tool",type:"button",title:s("common.复位"),onClick:P},[t.h(z.ElIcon,()=>t.h(be))])])])}}),Oe=t.defineComponent({name:"JtAttachmentPreviewService",props:{options:{type:Object,required:!0},onDestroy:{type:Function,required:!0}},setup(e){const n=t.computed(()=>O(e.options.url,e.options.name)),a=t.computed(()=>e.options.downloadName||n.value),r=t.computed(()=>W(e.options)),i=t.computed(()=>Ue(r.value,e.options.url)),c=t.computed(()=>({zIndex:e.options.zIndex??3e3,"--jt-attachment-preview-service-image-fit":e.options.fit??"contain"}));function l(){e.options.onClose?.(),e.onDestroy()}function m(v){v.key==="Escape"&&e.options.closeOnPressEscape!==!1&&l()}function y(v){e.options.onLoad?.(v)}function h(v){e.options.onError?.(v)}return t.onMounted(()=>{document.addEventListener("keydown",m),document.body.classList.add("jt-attachment-preview-service-lock")}),t.onBeforeUnmount(()=>{document.removeEventListener("keydown",m),document.body.classList.remove("jt-attachment-preview-service-lock")}),()=>{const v=e.options.downloadable===!1?[]:[X(e.options.url,a.value,"jt-attachment-preview-service__top-download")];return t.h("div",{class:"jt-attachment-preview-service",style:c.value},[t.h("div",{class:"jt-attachment-preview-service__modal"},[t.h("div",{class:"jt-attachment-preview-service__header"},[t.h("div",{class:"jt-attachment-preview-service__filename",title:n.value},n.value),t.h("div",{class:"jt-attachment-preview-service__header-actions"},[...v,t.h("button",{class:"jt-attachment-preview-service__close",type:"button","aria-label":s("common.关闭"),onClick:l},"×")])]),t.h("div",{class:"jt-attachment-preview-service__body"},[qe({type:r.value,url:e.options.url,name:n.value,downloadName:a.value,sandbox:e.options.sandbox,iconText:i.value,downloadable:e.options.downloadable!==!1,onLoad:y,onError:h})])])])}}}),B=t.defineComponent({name:"JtAttachmentPreviewDetectingService",props:{options:{type:Object,required:!0},onDestroy:{type:Function,required:!0},title:{type:String,default:s("common.正在识别文件类型")},desc:{type:String,default:s("common.请稍候,识别完成后将自动预览或下载")},spinning:{type:Boolean,default:!0}},setup(e){const n=t.computed(()=>O(e.options.url,e.options.name)),a=t.computed(()=>({zIndex:e.options.zIndex??3e3}));function r(){e.options.onClose?.(),e.onDestroy()}function i(c){c.key==="Escape"&&e.options.closeOnPressEscape!==!1&&r()}return t.onMounted(()=>{document.addEventListener("keydown",i),document.body.classList.add("jt-attachment-preview-service-lock")}),t.onBeforeUnmount(()=>{document.removeEventListener("keydown",i),document.body.classList.remove("jt-attachment-preview-service-lock")}),()=>t.h("div",{class:"jt-attachment-preview-service",style:a.value},[t.h("div",{class:"jt-attachment-preview-service__modal"},[t.h("div",{class:"jt-attachment-preview-service__header"},[t.h("div",{class:"jt-attachment-preview-service__filename",title:n.value},n.value),t.h("div",{class:"jt-attachment-preview-service__header-actions"},[t.h("button",{class:"jt-attachment-preview-service__close",type:"button","aria-label":s("common.关闭"),onClick:r},"×")])]),t.h("div",{class:"jt-attachment-preview-service__body"},[t.h("div",{class:"jt-attachment-preview-service__detecting"},[e.spinning?t.h("span",{class:"jt-attachment-preview-service__detecting-spinner"}):null,t.h("span",{class:"jt-attachment-preview-service__detecting-title"},e.title),t.h("span",{class:"jt-attachment-preview-service__detecting-desc"},e.desc)])])])])}});function qe(e){return e.type==="empty"?t.h("div",{class:"jt-attachment-preview-service__empty"},s("common.暂无附件")):e.type==="image"?t.h(Te,{url:e.url,name:e.name,downloadName:e.downloadName,downloadable:e.downloadable,onPreviewLoad:e.onLoad,onPreviewError:e.onError}):e.type==="video"?t.h("video",{class:"jt-attachment-preview-service__media",src:e.url,controls:!0,onLoadeddata:e.onLoad,onError:e.onError}):e.type==="audio"?t.h("audio",{class:"jt-attachment-preview-service__audio",src:e.url,controls:!0,onLoadeddata:e.onLoad,onError:e.onError}):e.type==="pdf"?t.h(Ie,{url:e.url,name:e.name,downloadName:e.downloadName,downloadable:e.downloadable,onPreviewLoad:e.onLoad,onPreviewError:e.onError}):e.type==="iframe"?t.h("iframe",{class:"jt-attachment-preview-service__iframe",src:e.url,title:e.name,sandbox:e.sandbox||void 0,onLoad:e.onLoad}):t.h("div",{class:"jt-attachment-preview-service__unsupported"},[t.h("div",{class:"jt-attachment-preview-service__file-card"},[t.h("div",{class:"jt-attachment-preview-service__file-icon"},e.iconText),t.h("div",{class:"jt-attachment-preview-service__unsupported-text"},s("common.暂不支持预览此类型的文件"))]),t.h("div",{class:"jt-attachment-preview-service__file-name",title:e.name},e.name),e.downloadable?X(e.url,e.downloadName,"jt-attachment-preview-service__primary-download"):null])}function ee(e){if(typeof document>"u")return{close:()=>{}};k?.close();const n=Me(e),a=n.downloadName||O(n.url,n.name);let r=!1,i=null,c=null;const l=()=>{r=!0,i&&(t.render(null,i),i.remove(),i=null),c&&(URL.revokeObjectURL(c),c=null),k?.close===l&&(k=null)};function m(){r||(i||(i=document.createElement("div"),document.body.appendChild(i)),t.render(t.h(Oe,{options:n,onDestroy:l}),i))}function y(){r||(i||(i=document.createElement("div"),document.body.appendChild(i)),t.render(t.h(B,{options:n,onDestroy:l}),i))}function h(){i&&(t.render(null,i),i.remove(),i=null)}function v(){r||$(n.url,a)}function A(b){if(r)return;const p=URL.createObjectURL(b);I(p,a),URL.revokeObjectURL(p)}const f=W(n);return J(f)?m():f==="unknown"?(y(),Je(n.url).then(async b=>{if(!r){if(J(b)){n.mode=b,m();return}try{const p=await Q(n.url),o=q(p.type);if(J(o)){c=URL.createObjectURL(p),n.url=c,n.mode=o,m();return}h(),A(p)}catch{h(),v()}}})):v(),k={close:l},k}function te(e){M=e}function ne(e){if(typeof document>"u")return{close:()=>{}};k?.close();let n=!1,a=document.createElement("div");document.body.appendChild(a);const r=()=>{n=!0,a&&(t.render(null,a),a.remove(),a=null),k?.close===r&&(k=null)},i={close:r};return k=i,M?(t.render(t.h(B,{options:{url:"",name:s("common.附件预览")},title:s("common.正在获取文件信息"),desc:s("common.请稍候,获取完成后将自动预览或下载"),spinning:!0,onDestroy:r}),a),M.request(e).then(c=>{if(n)return;const l=M?.mapResponse(c,e);if(!l?.url){t.render(t.h(B,{options:{url:"",name:s("common.附件预览")},title:s("common.文件信息缺少URL"),desc:s("common.请检查mapResponse是否返回了url字段"),spinning:!1,onDestroy:r}),a);return}ee(l)}).catch(c=>{if(n)return;const l=c instanceof Error?c.message:s("common.接口请求失败");t.render(t.h(B,{options:{url:"",name:s("common.附件预览")},title:s("common.文件信息获取失败"),desc:l,spinning:!1,onDestroy:r}),a)}),i):(t.render(t.h(B,{options:{url:"",name:s("common.附件预览")},title:s("common.附件预览未初始化"),desc:s("common.请先调用setupJtAttachmentPreview注册请求配置"),spinning:!1,onDestroy:r}),a),i)}const Ve=Object.assign(ee,{openByParams:ne,setup:te});exports.JtAttachmentPreview=Ve;exports.JtAttachmentPreviewByParams=ne;exports.getLocale=fe;exports.installLocale=we;exports.normalizeLocale=R;exports.resetLocale=ge;exports.setLocale=pe;exports.setupJtAttachmentPreview=te;exports.t=s;