file-viewer3 1.0.8 → 1.0.26
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/LICENSE +160 -0
- package/README.en.md +390 -0
- package/README.md +306 -89
- package/dist/components/3MFLoader.js +527 -0
- package/dist/components/AMFLoader.js +188 -0
- package/dist/components/ArchiveViewer.js +526 -0
- package/dist/components/AudioViewer.js +66 -0
- package/dist/components/CadViewer.js +9040 -0
- package/dist/components/CodeViewer.js +151 -0
- package/dist/components/ColladaLoader.js +2282 -0
- package/dist/components/DrawingViewer.js +295 -0
- package/dist/components/EdaViewer.js +630 -0
- package/dist/components/EmailViewer.js +276 -0
- package/dist/components/EpubViewer.js +172 -0
- package/dist/components/FBXLoader.js +1574 -0
- package/dist/components/GLTFLoader.js +1383 -0
- package/dist/components/ImageViewer.js +1516 -1895
- package/dist/components/KMZLoader.js +45 -0
- package/dist/components/MarkdownViewer.js +1456 -1557
- package/dist/components/ModelViewer.js +797 -0
- package/dist/components/OBJLoader.js +287 -0
- package/dist/components/OfdViewer.js +133 -0
- package/dist/components/PCDLoader.js +141 -0
- package/dist/components/PLYLoader.js +305 -0
- package/dist/components/PdfView.js +27662 -21655
- package/dist/components/PptxRender.js +11170 -21118
- package/dist/components/STLLoader.js +83 -0
- package/dist/components/TDSLoader.js +228 -0
- package/dist/components/TypstViewer.js +1697 -0
- package/dist/components/USDLoader.js +2526 -0
- package/dist/components/UmdViewer.js +1873 -0
- package/dist/components/VRMLLoader.js +6422 -0
- package/dist/components/VTKLoader.js +337 -0
- package/dist/components/XYZLoader.js +30 -0
- package/dist/components/XlsxTable.js +7871 -69873
- package/dist/components/__vite-browser-external.js +7 -0
- package/dist/components/_plugin-vue_export-helper.js +8 -0
- package/dist/components/ar-SA-G6X2FPQ2.js +523 -0
- package/dist/components/arc.js +79 -0
- package/dist/components/architecture-7EHR7CIX.js +3 -0
- package/dist/components/architectureDiagram-3BPJPVTR.js +4096 -0
- package/dist/components/archive.js +24 -0
- package/dist/components/asyncToGenerator.js +29 -0
- package/dist/components/audio.js +19 -0
- package/dist/components/az-AZ-76LH7QW2.js +523 -0
- package/dist/components/bash.js +169 -0
- package/dist/components/bg-BG-XCXSNQG7.js +523 -0
- package/dist/components/blockDiagram-GPEHLZMM.js +3357 -0
- package/dist/components/bn-BD-2XOGV67Q.js +523 -0
- package/dist/components/c4Diagram-AAUBKEIU.js +2957 -0
- package/dist/components/ca-ES-6MX7JW3Y.js +523 -0
- package/dist/components/cad.js +23 -0
- package/dist/components/cfb.js +1174 -0
- package/dist/components/channel.js +5 -0
- package/dist/components/chunk-2J33WTMH.js +26 -0
- package/dist/components/chunk-3OPIFGDE.js +4167 -0
- package/dist/components/chunk-4BX2VUAB.js +19 -0
- package/dist/components/chunk-55IACEB6.js +9 -0
- package/dist/components/chunk-5ZQYHXKU.js +669 -0
- package/dist/components/chunk-6U3AYISY.js +624 -0
- package/dist/components/chunk-727SXJPM.js +3356 -0
- package/dist/components/chunk-AGHRB4JF.js +324 -0
- package/dist/components/chunk-AQP2D5EJ.js +2055 -0
- package/dist/components/chunk-BSJP7CBP.js +83 -0
- package/dist/components/chunk-CSCIHK7Q.js +3500 -0
- package/dist/components/chunk-EIO257PC.js +1836 -0
- package/dist/components/chunk-FMBD7UC4.js +5 -0
- package/dist/components/chunk-K2UTITRG.js +17627 -0
- package/dist/components/chunk-KSCS5N6A.js +572 -0
- package/dist/components/chunk-L5ZTLDWV.js +40 -0
- package/dist/components/chunk-LZXEDZCA.js +60 -0
- package/dist/components/chunk-ND2GUHAM.js +61 -0
- package/dist/components/chunk-NNHCCRGN.js +20425 -0
- package/dist/components/chunk-NZK2D7GU.js +68 -0
- package/dist/components/chunk-O5CBEL6O.js +1894 -0
- package/dist/components/chunk-QZHKN3VN.js +12 -0
- package/dist/components/chunk-SRAX5OIU.js +22 -0
- package/dist/components/chunk-WU5MYG2G.js +14 -0
- package/dist/components/chunk-XPW4576I.js +1146 -0
- package/dist/components/chunk-Z3N5DIM6.js +59 -0
- package/dist/components/chunk-ZUYEQ4TG.js +22 -0
- package/dist/components/chunk.js +23 -0
- package/dist/components/classDiagram-4FO5ZUOK.js +29 -0
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +29 -0
- package/dist/components/compiler.js +2 -0
- package/dist/components/core.js +845 -0
- package/dist/components/cose-bilkent-S5V4N54A.js +2268 -0
- package/dist/components/cpp.js +225 -0
- package/dist/components/cs-CZ-2BRQDIVT.js +523 -0
- package/dist/components/csharp.js +260 -0
- package/dist/components/css.js +140 -0
- package/dist/components/cytoscape.esm.js +18114 -0
- package/dist/components/da-DK-5WZEPLOC.js +523 -0
- package/dist/components/dagre-BM42HDAG.js +325 -0
- package/dist/components/dagre.js +1936 -0
- package/dist/components/de-DE-XR44H4JA.js +523 -0
- package/dist/components/defaultLocale.js +201 -0
- package/dist/components/defineProperty.js +50 -0
- package/dist/components/diagram-2AECGRRQ.js +229 -0
- package/dist/components/diagram-5GNKFQAL.js +108 -0
- package/dist/components/diagram-KO2AKTUF.js +443 -0
- package/dist/components/diagram-LMA3HP47.js +139 -0
- package/dist/components/diagram-OG6HWLK6.js +541 -0
- package/dist/components/diff.js +39 -0
- package/dist/components/directory-open-01563666.js +26 -0
- package/dist/components/directory-open-4ed118d0.js +83 -0
- package/dist/components/dist.js +50 -0
- package/dist/components/dist2.js +3291 -0
- package/dist/components/dist3.js +1593 -0
- package/dist/components/documentSearch.js +378 -0
- package/dist/components/docx-preview.js +3113 -0
- package/dist/components/drawing.js +19 -0
- package/dist/components/ebook.js +16 -0
- package/dist/components/eda.js +20 -0
- package/dist/components/el-GR-BZB4AONW.js +523 -0
- package/dist/components/email.js +21 -0
- package/dist/components/en-B4ZKOASM.js +3 -0
- package/dist/components/erDiagram-TEJ5UH35.js +1719 -0
- package/dist/components/es-ES-U4NZUMDT.js +523 -0
- package/dist/components/eu-ES-A7QVB2H4.js +523 -0
- package/dist/components/eventmodeling-FCH6USID.js +3 -0
- package/dist/components/fa-IR-HGAKTJCU.js +523 -0
- package/dist/components/fflate.module.js +323 -0
- package/dist/components/fi-FI-Z5N7JZ37.js +523 -0
- package/dist/components/file-open-002ab408.js +38 -0
- package/dist/components/file-open-7c801643.js +24 -0
- package/dist/components/file-save-3189631c.js +40 -0
- package/dist/components/file-save-745eba88.js +36 -0
- package/dist/components/flowDiagram-I6XJVG4X.js +4181 -0
- package/dist/components/fr-FR-RHASNOE6.js +523 -0
- package/dist/components/ganttDiagram-6RSMTGT7.js +2182 -0
- package/dist/components/gitGraph-WXDBUCRP.js +3 -0
- package/dist/components/gitGraphDiagram-PVQCEYII.js +788 -0
- package/dist/components/gl-ES-HMX3MZ6V.js +523 -0
- package/dist/components/global-compiler.js +23 -0
- package/dist/components/global-renderer.js +23 -0
- package/dist/components/go.js +140 -0
- package/dist/components/graphlib.js +1267 -0
- package/dist/components/he-IL-6SHJWFNN.js +523 -0
- package/dist/components/hi-IN-IWLTKZ5I.js +523 -0
- package/dist/components/hu-HU-A5ZG7DT2.js +523 -0
- package/dist/components/id-ID-SAP4L64H.js +523 -0
- package/dist/components/image-GAAHSSAO.js +3 -0
- package/dist/components/image-blob-reduce.esm.js +1429 -0
- package/dist/components/image.js +17 -0
- package/dist/components/info-J43DQDTF.js +3 -0
- package/dist/components/infoDiagram-5YYISTIA.js +26 -0
- package/dist/components/ini.js +88 -0
- package/dist/components/init.js +15 -0
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +718 -0
- package/dist/components/it-IT-JPQ66NNP.js +523 -0
- package/dist/components/ja-JP-DBVTYXUO.js +523 -0
- package/dist/components/java.js +169 -0
- package/dist/components/javascript.js +436 -0
- package/dist/components/journeyDiagram-JHISSGLW.js +885 -0
- package/dist/components/json.js +36 -0
- package/dist/components/jszip.min.js +3033 -0
- package/dist/components/kaa-6HZHGXH3.js +523 -0
- package/dist/components/kab-KAB-ZGHBKWFO.js +523 -0
- package/dist/components/kanban-definition-UN3LZRKU.js +986 -0
- package/dist/components/katex.js +21979 -0
- package/dist/components/kk-KZ-P5N5QNE5.js +523 -0
- package/dist/components/km-KH-HSX4SM5Z.js +523 -0
- package/dist/components/ko-KR-MTYHY66A.js +523 -0
- package/dist/components/ku-TR-6OUDTVRD.js +523 -0
- package/dist/components/lib.js +4877 -0
- package/dist/components/libarchive.js +360 -0
- package/dist/components/linear.js +289 -0
- package/dist/components/lt-LT-XHIRWOB4.js +523 -0
- package/dist/components/lv-LV-5QDEKY6T.js +523 -0
- package/dist/components/markdown.js +181 -0
- package/dist/components/md.js +17 -0
- package/dist/components/mermaid-parser.core.js +328 -0
- package/dist/components/mindmap-definition-RKZ34NQL.js +1016 -0
- package/dist/components/model.js +21 -0
- package/dist/components/mp4.js +12 -0
- package/dist/components/mr-IN-CRQNXWMA.js +523 -0
- package/dist/components/my-MM-5M5IBNSE.js +523 -0
- package/dist/components/nb-NO-T6EIAALU.js +523 -0
- package/dist/components/nestedRender.js +158 -0
- package/dist/components/nl-NL-IS3SIHDZ.js +523 -0
- package/dist/components/nn-NO-6E72VCQL.js +523 -0
- package/dist/components/objectSpread2.js +29 -0
- package/dist/components/objectWithoutProperties.js +28 -0
- package/dist/components/oc-FR-POXYY2M6.js +523 -0
- package/dist/components/ofd.js +5261 -0
- package/dist/components/ofd2.js +16 -0
- package/dist/components/ordinal.js +65 -0
- package/dist/components/pa-IN-N4M65BXN.js +523 -0
- package/dist/components/packet-YPE3B663.js +3 -0
- package/dist/components/pdf.js +24 -0
- package/dist/components/percentages-BXMCSKIN.js +3 -0
- package/dist/components/php.js +294 -0
- package/dist/components/pica.js +1009 -0
- package/dist/components/pie-LRSECV5Y.js +3 -0
- package/dist/components/pie.js +47 -0
- package/dist/components/pieDiagram-4H26LBE5.js +130 -0
- package/dist/components/pl-PL-T2D74RX3.js +523 -0
- package/dist/components/postal-mime.js +3146 -0
- package/dist/components/pptx.js +15 -0
- package/dist/components/printLayout.js +42 -0
- package/dist/components/prod.js +21770 -0
- package/dist/components/pt-BR-5N22H2LF.js +523 -0
- package/dist/components/pt-PT-UZXXM6DQ.js +523 -0
- package/dist/components/python.js +238 -0
- package/dist/components/quadrantDiagram-W4KKPZXB.js +1988 -0
- package/dist/components/radar-GUYGQ44K.js +3 -0
- package/dist/components/renderer.js +2 -0
- package/dist/components/requirementDiagram-4Y6WPE33.js +2230 -0
- package/dist/components/ro-RO-JPDTUUEW.js +523 -0
- package/dist/components/rough.esm.js +1355 -0
- package/dist/components/roundRect.js +90 -0
- package/dist/components/ru-RU-B4JR7IUQ.js +523 -0
- package/dist/components/rust.js +169 -0
- package/dist/components/sankeyDiagram-5OEKKPKP.js +972 -0
- package/dist/components/sequenceDiagram-3UESZ5HK.js +4255 -0
- package/dist/components/shared.js +175 -0
- package/dist/components/shared2.js +4 -0
- package/dist/components/si-LK-N5RQ5JYF.js +523 -0
- package/dist/components/sk-SK-C5VTKIMK.js +523 -0
- package/dist/components/sl-SI-NN7IZMDC.js +523 -0
- package/dist/components/sourceLoading.js +134 -0
- package/dist/components/sql.js +118 -0
- package/dist/components/src.js +2664 -0
- package/dist/components/src2.js +10722 -0
- package/dist/components/stateDiagram-AJRCARHV.js +217 -0
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +27 -0
- package/dist/components/subset-shared.chunk.js +3 -0
- package/dist/components/subset-worker.chunk.js +21 -0
- package/dist/components/sv-SE-XGPEYMSR.js +523 -0
- package/dist/components/ta-IN-2NMHFXQM.js +523 -0
- package/dist/components/text.js +20 -0
- package/dist/components/th-TH-HPSO5L25.js +523 -0
- package/dist/components/three.module.js +13134 -0
- package/dist/components/time.js +910 -0
- package/dist/components/timeline-definition-PNZ67QCA.js +1084 -0
- package/dist/components/tr-TR-DEFEU3FU.js +523 -0
- package/dist/components/treeView-BLDUP644.js +3 -0
- package/dist/components/treemap-LRROVOQU.js +3 -0
- package/dist/components/typescript.js +521 -0
- package/dist/components/typst.js +25 -0
- package/dist/components/uk-UA-QMV73CPH.js +523 -0
- package/dist/components/umd.js +16 -0
- package/dist/components/use.js +422 -0
- package/dist/components/util.js +49 -0
- package/dist/components/vennDiagram-CIIHVFJN.js +1880 -0
- package/dist/components/vi-VN-M7AON7JQ.js +523 -0
- package/dist/components/viewerZoom.js +92 -0
- package/dist/components/wardley-L42UT6IY.js +3 -0
- package/dist/components/wardleyDiagram-YWT4CUSO.js +656 -0
- package/dist/components/wasm-pack-shim.js +1711 -0
- package/dist/components/wasm-pack-shim2.js +934 -0
- package/dist/components/wasm.js +97 -0
- package/dist/components/word.js +3055 -0
- package/dist/components/worker-ref.js +15 -20
- package/dist/components/xlsx.js +21 -0
- package/dist/components/xml.js +166 -0
- package/dist/components/xychartDiagram-2RQKCTM6.js +2015 -0
- package/dist/components/yaml.js +144 -0
- package/dist/components/zh-CN-LNUGB5OW.js +523 -0
- package/dist/components/zh-HK-E62DVLB3.js +523 -0
- package/dist/components/zh-TW-RAJ6MFWO.js +523 -0
- package/dist/file-viewer3.css +2 -0
- package/dist/index.mjs +3292 -5
- package/dist/src/App.vue.d.ts +3 -0
- package/dist/src/compare/CompareApp.vue.d.ts +3 -0
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +7 -0
- package/dist/src/components/HelloWorld.vue.d.ts +3 -0
- package/dist/src/components/utils.d.ts +4 -0
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +27 -0
- package/dist/src/package/common/printLayout.d.ts +16 -0
- package/dist/src/package/common/sourceLoading.d.ts +10 -0
- package/dist/src/package/common/type.d.ts +522 -8
- package/dist/src/package/common/worker-ref.d.ts +1 -1
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +74 -24
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +9 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +29 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +21 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +8 -0
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +34 -0
- package/dist/src/package/components/FileViewer/index.d.ts +1 -1
- package/dist/src/package/components/FileViewer/util.d.ts +2 -1
- package/dist/src/package/index.d.ts +14 -4
- package/dist/src/package/use/documentLocation.d.ts +15 -0
- package/dist/src/package/use/documentSearch.d.ts +234 -0
- package/dist/src/package/use/index.d.ts +4 -0
- package/dist/src/package/use/loading.d.ts +33 -0
- package/dist/src/package/use/viewerZoom.d.ts +42 -0
- package/dist/src/package/use/worker.d.ts +2 -2
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +9 -0
- package/dist/src/package/vendors/archive/cache.d.ts +10 -0
- package/dist/src/package/vendors/archive/fallback.d.ts +9 -0
- package/dist/src/package/vendors/archive/index.d.ts +3 -0
- package/dist/src/package/vendors/archive/shared.d.ts +24 -0
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +7 -0
- package/dist/src/package/vendors/audio/index.d.ts +7 -0
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +9 -0
- package/dist/src/package/vendors/cad/index.d.ts +8 -0
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +15 -0
- package/dist/src/package/vendors/drawing/index.d.ts +7 -0
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +6 -0
- package/dist/src/package/vendors/ebook/index.d.ts +7 -0
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +8 -0
- package/dist/src/package/vendors/eda/index.d.ts +2 -0
- package/dist/src/package/vendors/eda/parser.d.ts +77 -0
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +10 -0
- package/dist/src/package/vendors/email/index.d.ts +2 -0
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +6 -13
- package/dist/src/package/vendors/image/index.d.ts +1 -1
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +6 -13
- package/dist/src/package/vendors/md/index.d.ts +1 -1
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +8 -0
- package/dist/src/package/vendors/model/index.d.ts +3 -0
- package/dist/src/package/vendors/model/shared.d.ts +1 -0
- package/dist/src/package/vendors/nestedRender.d.ts +10 -0
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +6 -0
- package/dist/src/package/vendors/ofd/index.d.ts +7 -0
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +10 -13
- package/dist/src/package/vendors/pdf/index.d.ts +2 -1
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +9 -81
- package/dist/src/package/vendors/pptx/index.d.ts +1 -1
- package/dist/src/package/vendors/renders.d.ts +1 -1
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +7 -13
- package/dist/src/package/vendors/text/index.d.ts +6 -2
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +15 -0
- package/dist/src/package/vendors/typst/index.d.ts +8 -0
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +6 -0
- package/dist/src/package/vendors/umd/index.d.ts +7 -0
- package/dist/src/package/vendors/umd/parser.d.ts +30 -0
- package/dist/src/package/vendors/word/doc.d.ts +5 -0
- package/dist/src/package/vendors/word/docx.d.ts +5 -0
- package/dist/src/package/vendors/word/docx.worker.d.ts +1 -0
- package/dist/src/package/vendors/word/index.d.ts +3 -0
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +80 -0
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +25 -0
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +6 -21
- package/dist/src/package/vendors/xlsx/index.d.ts +3 -2
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -5
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +4 -6
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +73 -0
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +1 -0
- package/dist/style.css +1 -57
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +24 -0
- package/dist/wasm/cad/libredwg-web.js +15 -0
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
- package/package.json +118 -42
- package/.vscode/extensions.json +0 -3
- package/dist/components/_commonjs-dynamic-modules.js +0 -6
- package/dist/components/_commonjsHelpers.js +0 -36
- package/dist/components/docx-preview.min.js +0 -5287
- package/dist/components/index.js +0 -1717
- package/dist/favicon.ico +0 -0
- package/dist/index.umd.js +0 -436
- package/dist/src/package/vendors/docx/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/render.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/worker/xls/SheetJsModel.d.ts +0 -36
- package/dist/src/package/vendors/xlsx/worker/xlsx/ExcelJsModel.d.ts +0 -39
- package/dist/src/package/vendors/xlsx/worker/xlsx/context.d.ts +0 -7
- package/dist/src/package/vendors/xlsx/worker/xlsx/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/xlsx/util.d.ts +0 -10
- package/dist/worker/pdf.worker.js +0 -66
- package/dist/worker/pptx.worker.js +0 -21
- package/dist/worker/sheet.worker.js +0 -38
- package/dist/worker/xlsx.worker.js +0 -65
- /package/dist/src/package/vendors/xlsx/worker/{xlsx → sheetjs}/color.d.ts +0 -0
- /package/dist/src/package/vendors/xlsx/worker/{xls → sheetjs}/index.d.ts +0 -0
|
@@ -0,0 +1,276 @@
|
|
|
1
|
+
import { o as e } from "./chunk.js";
|
|
2
|
+
import { n as t, t as n } from "./asyncToGenerator.js";
|
|
3
|
+
import { t as r } from "./_plugin-vue_export-helper.js";
|
|
4
|
+
import { t as i } from "./nestedRender.js";
|
|
5
|
+
import { Fragment as a, computed as o, createCommentVNode as s, createElementBlock as c, createElementVNode as l, createTextVNode as u, defineComponent as d, nextTick as f, normalizeClass as p, onBeforeUnmount as m, onMounted as h, openBlock as g, ref as _, renderList as v, toDisplayString as y } from "vue";
|
|
6
|
+
//#region src/package/vendors/email/EmailViewer.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
+
t();
|
|
8
|
+
var b = { class: "email-viewer" }, x = { class: "email-header" }, S = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "email-meta"
|
|
11
|
+
}, C = { key: 0 }, w = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "email-body"
|
|
14
|
+
}, T = { class: "email-sidebar" }, E = { class: "body-tabs" }, D = ["disabled", "onClick"], O = { class: "attachment-panel" }, k = { class: "attachment-title" }, A = ["onClick"], ee = { class: "message-panel" }, j = ["srcdoc"], M = {
|
|
15
|
+
key: 1,
|
|
16
|
+
class: "email-text"
|
|
17
|
+
}, N = {
|
|
18
|
+
key: 2,
|
|
19
|
+
class: "email-text"
|
|
20
|
+
}, P = {
|
|
21
|
+
key: 3,
|
|
22
|
+
class: "attachment-preview"
|
|
23
|
+
}, F = { class: "attachment-preview-head" }, I = {
|
|
24
|
+
key: 1,
|
|
25
|
+
class: "email-state"
|
|
26
|
+
}, L = {
|
|
27
|
+
key: 2,
|
|
28
|
+
class: "email-error"
|
|
29
|
+
}, R = /*#__PURE__*/ r(/* @__PURE__ */ d({
|
|
30
|
+
__name: "EmailViewer",
|
|
31
|
+
props: {
|
|
32
|
+
data: {},
|
|
33
|
+
type: {},
|
|
34
|
+
filename: {},
|
|
35
|
+
options: {}
|
|
36
|
+
},
|
|
37
|
+
setup(t) {
|
|
38
|
+
let r = t, d = _(null), R = _(!0), z = _("正在解析邮件..."), B = _(""), V = _("html"), H = _(null), U = _(null), W = /* @__PURE__ */ new Map(), G = [], K, q = (e) => {
|
|
39
|
+
if (!Number.isFinite(e) || e < 0) return "-";
|
|
40
|
+
if (e < 1024) return `${e} B`;
|
|
41
|
+
let t = e / 1024 / 1024;
|
|
42
|
+
return t >= 1 ? `${t.toFixed(+(t < 10))} MB` : `${(e / 1024).toFixed(+(e < 10 * 1024))} KB`;
|
|
43
|
+
}, J = (e) => e ? (Array.isArray(e) ? e : [e]).flatMap((e) => {
|
|
44
|
+
let t = e;
|
|
45
|
+
return t.group ? J(t.group) : [{
|
|
46
|
+
name: t.name || "",
|
|
47
|
+
address: t.address || t.email || ""
|
|
48
|
+
}];
|
|
49
|
+
}) : [], Y = (e) => e.map((e) => e.name && e.address ? `${e.name} <${e.address}>` : e.address || e.name || "").filter(Boolean).join(", "), X = o(() => {
|
|
50
|
+
var e;
|
|
51
|
+
let t = ((e = d.value) == null ? void 0 : e.html) || "";
|
|
52
|
+
if (!t) return "";
|
|
53
|
+
let n = t;
|
|
54
|
+
return W.forEach((e, t) => {
|
|
55
|
+
n = n.replace(RegExp(`cid:${t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}`, "gi"), e);
|
|
56
|
+
}), `<!doctype html><html><head><meta charset="utf-8"><base target="_blank"><style>body{margin:0;padding:18px;font-family:Aptos,"Segoe UI",sans-serif;line-height:1.6;color:#172033;word-break:break-word;}img{max-width:100%;height:auto;}</style></head><body>${n}</body></html>`;
|
|
57
|
+
}), Z = o(() => {
|
|
58
|
+
var e, t, n;
|
|
59
|
+
return [
|
|
60
|
+
{
|
|
61
|
+
key: "html",
|
|
62
|
+
label: "HTML",
|
|
63
|
+
disabled: !((e = d.value) != null && e.html)
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
key: "text",
|
|
67
|
+
label: "正文",
|
|
68
|
+
disabled: !((t = d.value) != null && t.text)
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
key: "headers",
|
|
72
|
+
label: "头信息",
|
|
73
|
+
disabled: !((n = d.value) != null && n.headers)
|
|
74
|
+
}
|
|
75
|
+
];
|
|
76
|
+
}), Q = function() {
|
|
77
|
+
var e = n(function* (e) {
|
|
78
|
+
if (e instanceof ArrayBuffer) return e;
|
|
79
|
+
if (e instanceof Uint8Array) {
|
|
80
|
+
let t = new Uint8Array(e.byteLength);
|
|
81
|
+
return t.set(e), t.buffer;
|
|
82
|
+
}
|
|
83
|
+
return Q(new TextEncoder().encode(e));
|
|
84
|
+
});
|
|
85
|
+
return function(t) {
|
|
86
|
+
return e.apply(this, arguments);
|
|
87
|
+
};
|
|
88
|
+
}(), te = function() {
|
|
89
|
+
var e = n(function* () {
|
|
90
|
+
var e, t;
|
|
91
|
+
let i = yield (yield import("./postal-mime.js")).default.parse(r.data, {
|
|
92
|
+
attachmentEncoding: "arraybuffer",
|
|
93
|
+
maxNestingDepth: 24,
|
|
94
|
+
maxHeadersSize: 2 * 1024 * 1024
|
|
95
|
+
}), a = i.attachments.map((e, t) => {
|
|
96
|
+
let n = typeof e.content == "string" ? e.content.length : e.content.byteLength, r = e.filename || `attachment-${t + 1}`;
|
|
97
|
+
return {
|
|
98
|
+
id: `${t}-${r}`,
|
|
99
|
+
name: r,
|
|
100
|
+
mimeType: e.mimeType,
|
|
101
|
+
size: n,
|
|
102
|
+
contentId: e.contentId,
|
|
103
|
+
load: () => Q(e.content)
|
|
104
|
+
};
|
|
105
|
+
});
|
|
106
|
+
return yield Promise.all(a.map(function() {
|
|
107
|
+
var e = n(function* (e) {
|
|
108
|
+
var t;
|
|
109
|
+
if (!e.contentId || !((t = e.mimeType) != null && t.startsWith("image/"))) return;
|
|
110
|
+
let n = yield e.load(), r = URL.createObjectURL(new Blob([n], { type: e.mimeType }));
|
|
111
|
+
G.push(r), W.set(e.contentId.replace(/[<>]/g, ""), r);
|
|
112
|
+
});
|
|
113
|
+
return function(t) {
|
|
114
|
+
return e.apply(this, arguments);
|
|
115
|
+
};
|
|
116
|
+
}())), {
|
|
117
|
+
kind: "eml",
|
|
118
|
+
subject: i.subject || r.filename,
|
|
119
|
+
from: J(i.from),
|
|
120
|
+
to: J(i.to),
|
|
121
|
+
cc: J(i.cc),
|
|
122
|
+
date: i.date,
|
|
123
|
+
text: i.text,
|
|
124
|
+
html: i.html,
|
|
125
|
+
headers: ((e = i.headerLines) == null ? void 0 : e.map((e) => e.line).join("\n")) || ((t = i.headers) == null ? void 0 : t.map((e) => `${e.originalKey}: ${e.value}`).join("\n")),
|
|
126
|
+
attachments: a
|
|
127
|
+
};
|
|
128
|
+
});
|
|
129
|
+
return function() {
|
|
130
|
+
return e.apply(this, arguments);
|
|
131
|
+
};
|
|
132
|
+
}(), ne = function() {
|
|
133
|
+
var t = n(function* () {
|
|
134
|
+
var t;
|
|
135
|
+
let i = yield import("./lib.js").then((t) => /* @__PURE__ */ e(t.default, 1)), a = new (((t = i.default) == null ? void 0 : t.default) || i.default)(r.data), o = a.getFileData(), s = (o.attachments || []).map((e, t) => {
|
|
136
|
+
let r = e.fileName || e.fileNameShort || e.name || `attachment-${t + 1}${e.extension || ""}`;
|
|
137
|
+
return {
|
|
138
|
+
id: `${t}-${r}`,
|
|
139
|
+
name: r,
|
|
140
|
+
mimeType: "application/octet-stream",
|
|
141
|
+
size: e.contentLength || e.size || 0,
|
|
142
|
+
contentId: e.pidContentId,
|
|
143
|
+
load() {
|
|
144
|
+
return n(function* () {
|
|
145
|
+
return Q(a.getAttachment(e).content);
|
|
146
|
+
})();
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
});
|
|
150
|
+
return {
|
|
151
|
+
kind: "msg",
|
|
152
|
+
subject: o.subject || r.filename,
|
|
153
|
+
from: J({
|
|
154
|
+
name: o.senderName,
|
|
155
|
+
address: o.senderEmail
|
|
156
|
+
}),
|
|
157
|
+
to: J(o.recipients || []).filter((e) => e.name || e.address),
|
|
158
|
+
cc: [],
|
|
159
|
+
date: o.messageDeliveryTime || o.clientSubmitTime || o.creationTime,
|
|
160
|
+
text: o.body,
|
|
161
|
+
html: o.html || "",
|
|
162
|
+
headers: o.headers,
|
|
163
|
+
attachments: s
|
|
164
|
+
};
|
|
165
|
+
});
|
|
166
|
+
return function() {
|
|
167
|
+
return t.apply(this, arguments);
|
|
168
|
+
};
|
|
169
|
+
}(), re = function() {
|
|
170
|
+
var e = n(function* () {
|
|
171
|
+
R.value = !0, B.value = "";
|
|
172
|
+
try {
|
|
173
|
+
d.value = r.type === "msg" ? yield ne() : yield te(), V.value = d.value.html ? "html" : d.value.text ? "text" : "headers";
|
|
174
|
+
} catch (e) {
|
|
175
|
+
console.error(e), B.value = e instanceof Error ? e.message : String(e);
|
|
176
|
+
} finally {
|
|
177
|
+
R.value = !1;
|
|
178
|
+
}
|
|
179
|
+
});
|
|
180
|
+
return function() {
|
|
181
|
+
return e.apply(this, arguments);
|
|
182
|
+
};
|
|
183
|
+
}(), $ = () => {
|
|
184
|
+
var e;
|
|
185
|
+
K == null || (e = K.unmount) == null || e.call(K), K = void 0;
|
|
186
|
+
let t = U.value;
|
|
187
|
+
if (t) for (; t.firstChild;) t.removeChild(t.firstChild);
|
|
188
|
+
}, ie = function() {
|
|
189
|
+
var e = n(function* (e) {
|
|
190
|
+
H.value = e, R.value = !0, z.value = `正在打开附件 ${e.name}...`;
|
|
191
|
+
try {
|
|
192
|
+
let t = yield e.load();
|
|
193
|
+
yield f(), $();
|
|
194
|
+
let n = U.value;
|
|
195
|
+
if (!n) return;
|
|
196
|
+
let a = document.createElement("div");
|
|
197
|
+
a.className = "email-attachment-render", n.appendChild(a), K = yield i(t, e.name.includes(".") ? e.name.slice(e.name.lastIndexOf(".") + 1).toLowerCase() : "txt", a, {
|
|
198
|
+
filename: e.name,
|
|
199
|
+
options: r.options
|
|
200
|
+
});
|
|
201
|
+
} catch (e) {
|
|
202
|
+
console.error(e), B.value = e instanceof Error ? e.message : String(e);
|
|
203
|
+
} finally {
|
|
204
|
+
R.value = !1, z.value = "正在解析邮件...";
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
return function(t) {
|
|
208
|
+
return e.apply(this, arguments);
|
|
209
|
+
};
|
|
210
|
+
}(), ae = function() {
|
|
211
|
+
var e = n(function* (e) {
|
|
212
|
+
let t = yield e.load(), n = URL.createObjectURL(new Blob([t], { type: e.mimeType || "application/octet-stream" }));
|
|
213
|
+
G.push(n);
|
|
214
|
+
let r = document.createElement("a");
|
|
215
|
+
r.href = n, r.download = e.name, document.body.appendChild(r), r.click(), r.remove();
|
|
216
|
+
});
|
|
217
|
+
return function(t) {
|
|
218
|
+
return e.apply(this, arguments);
|
|
219
|
+
};
|
|
220
|
+
}();
|
|
221
|
+
return h(() => {
|
|
222
|
+
re();
|
|
223
|
+
}), m(() => {
|
|
224
|
+
$(), G.forEach((e) => URL.revokeObjectURL(e));
|
|
225
|
+
}), (e, n) => {
|
|
226
|
+
var r, i;
|
|
227
|
+
return g(), c("section", b, [
|
|
228
|
+
l("header", x, [
|
|
229
|
+
l("span", null, y(((r = d.value) == null || (r = r.kind) == null ? void 0 : r.toUpperCase()) || t.type.toUpperCase()), 1),
|
|
230
|
+
l("h2", null, y(((i = d.value) == null ? void 0 : i.subject) || t.filename), 1),
|
|
231
|
+
d.value ? (g(), c("div", S, [
|
|
232
|
+
l("p", null, [n[1] || (n[1] = l("strong", null, "发件人", -1)), u(y(Y(d.value.from) || "-"), 1)]),
|
|
233
|
+
l("p", null, [n[2] || (n[2] = l("strong", null, "收件人", -1)), u(y(Y(d.value.to) || "-"), 1)]),
|
|
234
|
+
d.value.cc.length ? (g(), c("p", C, [n[3] || (n[3] = l("strong", null, "抄送", -1)), u(y(Y(d.value.cc)), 1)])) : s("", !0),
|
|
235
|
+
l("p", null, [n[4] || (n[4] = l("strong", null, "时间", -1)), u(y(d.value.date || "-"), 1)])
|
|
236
|
+
])) : s("", !0)
|
|
237
|
+
]),
|
|
238
|
+
d.value ? (g(), c("div", w, [l("aside", T, [l("div", E, [(g(!0), c(a, null, v(Z.value, (e) => (g(), c("button", {
|
|
239
|
+
key: e.key,
|
|
240
|
+
type: "button",
|
|
241
|
+
disabled: e.disabled,
|
|
242
|
+
class: p({ active: V.value === e.key }),
|
|
243
|
+
onClick: (t) => V.value = e.key
|
|
244
|
+
}, y(e.label), 11, D))), 128))]), l("section", O, [l("div", k, [n[5] || (n[5] = l("strong", null, "附件", -1)), l("span", null, y(d.value.attachments.length), 1)]), (g(!0), c(a, null, v(d.value.attachments, (e) => {
|
|
245
|
+
var t, n;
|
|
246
|
+
return g(), c("button", {
|
|
247
|
+
key: e.id,
|
|
248
|
+
type: "button",
|
|
249
|
+
class: p(["attachment-item", { active: ((t = H.value) == null ? void 0 : t.id) === e.id }]),
|
|
250
|
+
onClick: (t) => ie(e)
|
|
251
|
+
}, [
|
|
252
|
+
l("span", null, y(((n = e.name.split(".").pop()) == null ? void 0 : n.toUpperCase()) || "FILE"), 1),
|
|
253
|
+
l("strong", null, y(e.name), 1),
|
|
254
|
+
l("em", null, y(q(e.size)), 1)
|
|
255
|
+
], 10, A);
|
|
256
|
+
}), 128))])]), l("main", ee, [V.value === "html" && X.value ? (g(), c("iframe", {
|
|
257
|
+
key: 0,
|
|
258
|
+
class: "email-html",
|
|
259
|
+
sandbox: "",
|
|
260
|
+
srcdoc: X.value
|
|
261
|
+
}, null, 8, j)) : V.value === "text" ? (g(), c("pre", M, y(d.value.text), 1)) : (g(), c("pre", N, y(d.value.headers), 1)), H.value ? (g(), c("section", P, [l("div", F, [l("strong", null, y(H.value.name), 1), l("button", {
|
|
262
|
+
type: "button",
|
|
263
|
+
onClick: n[0] || (n[0] = (e) => ae(H.value))
|
|
264
|
+
}, "下载附件")]), l("div", {
|
|
265
|
+
ref_key: "attachmentTarget",
|
|
266
|
+
ref: U,
|
|
267
|
+
class: "attachment-target"
|
|
268
|
+
}, null, 512)])) : s("", !0)])])) : s("", !0),
|
|
269
|
+
R.value ? (g(), c("div", I, [n[6] || (n[6] = l("span", null, null, -1)), l("strong", null, y(z.value), 1)])) : s("", !0),
|
|
270
|
+
B.value ? (g(), c("div", L, [n[7] || (n[7] = l("strong", null, "邮件预览提示", -1)), l("p", null, y(B.value), 1)])) : s("", !0)
|
|
271
|
+
]);
|
|
272
|
+
};
|
|
273
|
+
}
|
|
274
|
+
}), [["__scopeId", "data-v-0989d798"]]);
|
|
275
|
+
//#endregion
|
|
276
|
+
export { R as default };
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { n as e, t } from "./asyncToGenerator.js";
|
|
2
|
+
import { t as n } from "./_plugin-vue_export-helper.js";
|
|
3
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, defineComponent as c, nextTick as l, normalizeClass as u, normalizeStyle as d, onBeforeUnmount as f, onMounted as p, openBlock as m, ref as h, renderList as g, toDisplayString as _ } from "vue";
|
|
4
|
+
//#region src/package/vendors/ebook/EpubViewer.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
e();
|
|
6
|
+
var v = { class: "epub-toolbar" }, y = { class: "epub-title" }, b = { class: "epub-actions" }, x = ["disabled"], S = { class: "epub-progress" }, C = ["disabled"], w = { class: "epub-body" }, T = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "epub-toc"
|
|
9
|
+
}, E = { class: "epub-toc-head" }, D = { class: "epub-toc-list" }, O = ["onClick"], k = { class: "epub-stage-wrap" }, A = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "epub-state"
|
|
12
|
+
}, j = {
|
|
13
|
+
key: 1,
|
|
14
|
+
class: "epub-state error"
|
|
15
|
+
}, M = /*#__PURE__*/ n(/* @__PURE__ */ c({
|
|
16
|
+
__name: "EpubViewer",
|
|
17
|
+
props: { data: {} },
|
|
18
|
+
setup(e) {
|
|
19
|
+
let n = e, c = h(null), M = h("loading"), N = h(""), P = h(!0), F = h("EPUB 电子书"), I = h(""), L = h([]), R = h(""), z = h(null), B = h(!0), V = h(!1), H, U, W = !1, G, K = i(() => {
|
|
20
|
+
if (!R.value) return "";
|
|
21
|
+
let e = L.value.find((e) => e.href === R.value);
|
|
22
|
+
if (e) return e.label;
|
|
23
|
+
let t = L.value.find((e) => R.value.includes(e.href.split("#")[0]));
|
|
24
|
+
return (t == null ? void 0 : t.label) || "";
|
|
25
|
+
}), q = i(() => typeof z.value == "number" ? `${z.value}%` : K.value || "阅读中"), J = (e, t) => typeof e == "string" && e.trim() ? e.trim() : t, Y = (e, t = 0) => Array.isArray(e) ? e.flatMap((e, n) => {
|
|
26
|
+
let r = e, i = typeof r.href == "string" ? r.href : "", a = J(r.label || r.title, `章节 ${n + 1}`), o = Y(r.subitems || r.children, t + 1);
|
|
27
|
+
return i ? [{
|
|
28
|
+
depth: t,
|
|
29
|
+
href: i,
|
|
30
|
+
id: `${t}-${n}-${i}`,
|
|
31
|
+
label: a
|
|
32
|
+
}, ...o] : o;
|
|
33
|
+
}) : [], X = (e) => {
|
|
34
|
+
var t;
|
|
35
|
+
let n = e.find((e) => {
|
|
36
|
+
let t = e.label.toLowerCase();
|
|
37
|
+
return /(^|\s)(chapter|part|book|prologue|preface|introduction)\b/.test(t) || /第[一二三四五六七八九十百千0-9]+[章节回部卷篇]/.test(e.label);
|
|
38
|
+
});
|
|
39
|
+
if (n) return n.href;
|
|
40
|
+
let r = e.find((e) => {
|
|
41
|
+
let t = `${e.label} ${e.href}`.toLowerCase();
|
|
42
|
+
return !/(cover|titlepage|title-page|copyright|license|toc|contents|nav|table-of-contents|wrap0000)/.test(t);
|
|
43
|
+
});
|
|
44
|
+
return (r == null ? void 0 : r.href) || ((t = e[0]) == null ? void 0 : t.href);
|
|
45
|
+
}, Z = (e) => {
|
|
46
|
+
var t, n;
|
|
47
|
+
B.value = !!(e != null && e.atStart), V.value = !!(e != null && e.atEnd), R.value = (e == null || (t = e.start) == null ? void 0 : t.href) || "", typeof (e == null || (n = e.start) == null ? void 0 : n.percentage) == "number" && (z.value = Math.round(e.start.percentage * 100));
|
|
48
|
+
}, Q = (e) => new Promise((t) => {
|
|
49
|
+
G = window.setTimeout(t, e);
|
|
50
|
+
}), $ = () => {
|
|
51
|
+
var e, t;
|
|
52
|
+
let n = (e = c.value) == null ? void 0 : e.querySelector("iframe"), r = n == null || (t = n.contentDocument) == null ? void 0 : t.body;
|
|
53
|
+
return r ? !!(r.innerText.trim() || r.querySelector("img, svg, canvas")) : !1;
|
|
54
|
+
}, ee = function() {
|
|
55
|
+
var e = t(function* () {
|
|
56
|
+
for (let e = 0; e < 20; e++) {
|
|
57
|
+
if (W || $()) return $();
|
|
58
|
+
yield Q(100);
|
|
59
|
+
}
|
|
60
|
+
return $();
|
|
61
|
+
});
|
|
62
|
+
return function() {
|
|
63
|
+
return e.apply(this, arguments);
|
|
64
|
+
};
|
|
65
|
+
}(), te = function() {
|
|
66
|
+
var e = t(function* () {
|
|
67
|
+
M.value = "loading", yield l();
|
|
68
|
+
let e = c.value;
|
|
69
|
+
if (e) try {
|
|
70
|
+
let { default: t } = yield import("./src2.js");
|
|
71
|
+
if (W) return;
|
|
72
|
+
H = t(n.data.slice(0), {
|
|
73
|
+
openAs: "binary",
|
|
74
|
+
replacements: "blobUrl"
|
|
75
|
+
}), U = H.renderTo(e, {
|
|
76
|
+
allowScriptedContent: !1,
|
|
77
|
+
flow: "scrolled",
|
|
78
|
+
height: "100%",
|
|
79
|
+
manager: "continuous",
|
|
80
|
+
resizeOnOrientationChange: !0,
|
|
81
|
+
spread: "none",
|
|
82
|
+
width: "100%"
|
|
83
|
+
}), U.themes.default({
|
|
84
|
+
body: {
|
|
85
|
+
color: "#172033",
|
|
86
|
+
fontFamily: "Georgia, \"Times New Roman\", serif",
|
|
87
|
+
lineHeight: "1.72",
|
|
88
|
+
padding: "0 8px"
|
|
89
|
+
},
|
|
90
|
+
img: { maxWidth: "100%" },
|
|
91
|
+
html: {
|
|
92
|
+
height: "auto",
|
|
93
|
+
overflow: "auto"
|
|
94
|
+
}
|
|
95
|
+
}), U.on("relocated", Z), yield H.ready;
|
|
96
|
+
let r = yield H.loaded.metadata.catch(() => void 0);
|
|
97
|
+
F.value = J(r == null ? void 0 : r.title, F.value), I.value = J(r == null ? void 0 : r.creator, "");
|
|
98
|
+
let i = yield H.loaded.navigation.catch(() => void 0);
|
|
99
|
+
L.value = Y(i == null ? void 0 : i.toc);
|
|
100
|
+
let a = X(L.value);
|
|
101
|
+
if (yield U.display(a), !(yield ee())) throw Error("EPUB 正文渲染未完成,请刷新后重试");
|
|
102
|
+
if (W) return;
|
|
103
|
+
M.value = "ready", H.locations.generate(1200).catch(() => void 0);
|
|
104
|
+
} catch (e) {
|
|
105
|
+
console.error(e), N.value = e instanceof Error ? e.message : String(e), M.value = "error";
|
|
106
|
+
}
|
|
107
|
+
});
|
|
108
|
+
return function() {
|
|
109
|
+
return e.apply(this, arguments);
|
|
110
|
+
};
|
|
111
|
+
}(), ne = function() {
|
|
112
|
+
var e = t(function* () {
|
|
113
|
+
yield U == null ? void 0 : U.prev();
|
|
114
|
+
});
|
|
115
|
+
return function() {
|
|
116
|
+
return e.apply(this, arguments);
|
|
117
|
+
};
|
|
118
|
+
}(), re = function() {
|
|
119
|
+
var e = t(function* () {
|
|
120
|
+
yield U == null ? void 0 : U.next();
|
|
121
|
+
});
|
|
122
|
+
return function() {
|
|
123
|
+
return e.apply(this, arguments);
|
|
124
|
+
};
|
|
125
|
+
}(), ie = function() {
|
|
126
|
+
var e = t(function* (e) {
|
|
127
|
+
yield U == null ? void 0 : U.display(e.href), P.value = !1;
|
|
128
|
+
});
|
|
129
|
+
return function(t) {
|
|
130
|
+
return e.apply(this, arguments);
|
|
131
|
+
};
|
|
132
|
+
}();
|
|
133
|
+
return p(te), f(() => {
|
|
134
|
+
W = !0, G !== void 0 && (clearTimeout(G), G = void 0), U && (U.off("relocated", Z), U.destroy(), U = void 0), H == null || H.destroy(), H = void 0;
|
|
135
|
+
}), (e, t) => (m(), o("div", { class: u(["epub-viewer", { "epub-viewer--toc-hidden": !P.value }]) }, [s("div", v, [
|
|
136
|
+
s("button", {
|
|
137
|
+
type: "button",
|
|
138
|
+
class: u(["epub-icon-button", { active: P.value }]),
|
|
139
|
+
title: "目录",
|
|
140
|
+
onClick: t[0] || (t[0] = (e) => P.value = !P.value)
|
|
141
|
+
}, [...t[1] || (t[1] = [s("span", null, null, -1)])], 2),
|
|
142
|
+
s("div", y, [s("strong", null, _(F.value), 1), s("span", null, _(I.value || q.value), 1)]),
|
|
143
|
+
s("div", b, [
|
|
144
|
+
s("button", {
|
|
145
|
+
type: "button",
|
|
146
|
+
class: "epub-button",
|
|
147
|
+
disabled: M.value !== "ready" || B.value,
|
|
148
|
+
onClick: ne
|
|
149
|
+
}, " 上一页 ", 8, x),
|
|
150
|
+
s("span", S, _(q.value), 1),
|
|
151
|
+
s("button", {
|
|
152
|
+
type: "button",
|
|
153
|
+
class: "epub-button",
|
|
154
|
+
disabled: M.value !== "ready" || V.value,
|
|
155
|
+
onClick: re
|
|
156
|
+
}, " 下一页 ", 8, C)
|
|
157
|
+
])
|
|
158
|
+
]), s("div", w, [P.value ? (m(), o("aside", T, [s("div", E, [t[2] || (t[2] = s("strong", null, "目录", -1)), s("span", null, _(L.value.length) + " 项", 1)]), s("div", D, [(m(!0), o(r, null, g(L.value, (e) => (m(), o("button", {
|
|
159
|
+
key: e.id,
|
|
160
|
+
type: "button",
|
|
161
|
+
class: u(["epub-toc-item", { active: e.href === R.value }]),
|
|
162
|
+
style: d({ paddingLeft: `${12 + e.depth * 14}px` }),
|
|
163
|
+
onClick: (t) => ie(e)
|
|
164
|
+
}, _(e.label), 15, O))), 128))])])) : a("", !0), s("main", k, [s("div", {
|
|
165
|
+
ref_key: "stage",
|
|
166
|
+
ref: c,
|
|
167
|
+
class: "epub-stage"
|
|
168
|
+
}, null, 512), M.value === "loading" ? (m(), o("div", A, "正在解析 EPUB...")) : M.value === "error" ? (m(), o("div", j, _(N.value), 1)) : a("", !0)])])], 2));
|
|
169
|
+
}
|
|
170
|
+
}), [["__scopeId", "data-v-8f8a2b3b"]]);
|
|
171
|
+
//#endregion
|
|
172
|
+
export { M as default };
|