@l1yp/file-viewer 0.1.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/LICENSE +21 -0
- package/README.md +134 -0
- package/dist/FileViewer.js +7 -0
- package/dist/FileViewer.vue.d.ts +37 -0
- package/dist/FileViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/_virtual/_plugin-vue_export-helper.js +8 -0
- package/dist/components/AppxViewer.js +7 -0
- package/dist/components/AppxViewer.vue.d.ts +18 -0
- package/dist/components/AppxViewer.vue_vue_type_script_setup_true_lang.js +174 -0
- package/dist/components/ArchiveBrowser.js +7 -0
- package/dist/components/ArchiveBrowser.vue.d.ts +18 -0
- package/dist/components/ArchiveBrowser.vue_vue_type_script_setup_true_lang.js +279 -0
- package/dist/components/AudioViewer.js +7 -0
- package/dist/components/AudioViewer.vue.d.ts +21 -0
- package/dist/components/AudioViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/BinObjBrowser.js +7 -0
- package/dist/components/BinObjBrowser.vue.d.ts +19 -0
- package/dist/components/BinObjBrowser.vue_vue_type_script_setup_true_lang.js +141 -0
- package/dist/components/CertViewer.js +7 -0
- package/dist/components/CertViewer.vue.d.ts +17 -0
- package/dist/components/CertViewer.vue_vue_type_script_setup_true_lang.js +251 -0
- package/dist/components/ClassViewer.js +7 -0
- package/dist/components/ClassViewer.vue.d.ts +15 -0
- package/dist/components/ClassViewer.vue_vue_type_script_setup_true_lang.js +164 -0
- package/dist/components/CodeBlock.js +7 -0
- package/dist/components/CodeBlock.vue.d.ts +17 -0
- package/dist/components/CodeBlock.vue_vue_type_script_setup_true_lang.js +79 -0
- package/dist/components/CodeView.js +7 -0
- package/dist/components/CodeView.vue.d.ts +21 -0
- package/dist/components/CodeView.vue_vue_type_script_setup_true_lang.js +180 -0
- package/dist/components/CsvViewer.js +7 -0
- package/dist/components/CsvViewer.vue.d.ts +26 -0
- package/dist/components/CsvViewer.vue_vue_type_script_setup_true_lang.js +187 -0
- package/dist/components/DicomViewer.js +7 -0
- package/dist/components/DicomViewer.vue.d.ts +30 -0
- package/dist/components/DicomViewer.vue_vue_type_script_setup_true_lang.js +362 -0
- package/dist/components/DocxViewer.js +7 -0
- package/dist/components/DocxViewer.vue.d.ts +19 -0
- package/dist/components/DocxViewer.vue_vue_type_script_setup_true_lang.js +59 -0
- package/dist/components/DrawioViewer.js +7 -0
- package/dist/components/DrawioViewer.vue.d.ts +16 -0
- package/dist/components/DrawioViewer.vue_vue_type_script_setup_true_lang.js +38 -0
- package/dist/components/DxfViewer.js +7 -0
- package/dist/components/DxfViewer.vue.d.ts +14 -0
- package/dist/components/DxfViewer.vue_vue_type_script_setup_true_lang.js +239 -0
- package/dist/components/EbookViewer.js +7 -0
- package/dist/components/EbookViewer.vue.d.ts +22 -0
- package/dist/components/EbookViewer.vue_vue_type_script_setup_true_lang.js +170 -0
- package/dist/components/EmlViewer.js +7 -0
- package/dist/components/EmlViewer.vue.d.ts +21 -0
- package/dist/components/EmlViewer.vue_vue_type_script_setup_true_lang.js +193 -0
- package/dist/components/EplViewer.js +7 -0
- package/dist/components/EplViewer.vue.d.ts +19 -0
- package/dist/components/EplViewer.vue_vue_type_script_setup_true_lang.js +201 -0
- package/dist/components/FileViewerBody.js +7 -0
- package/dist/components/FileViewerBody.vue.d.ts +47 -0
- package/dist/components/FileViewerBody.vue_vue_type_script_setup_true_lang.js +599 -0
- package/dist/components/FileViewerPanel.js +7 -0
- package/dist/components/FileViewerPanel.vue.d.ts +3 -0
- package/dist/components/FileViewerPanel.vue_vue_type_script_setup_true_lang.js +207 -0
- package/dist/components/FontViewer.js +7 -0
- package/dist/components/FontViewer.vue.d.ts +17 -0
- package/dist/components/FontViewer.vue_vue_type_script_setup_true_lang.js +120 -0
- package/dist/components/FrontmatterCard.js +7 -0
- package/dist/components/FrontmatterCard.vue.d.ts +11 -0
- package/dist/components/FrontmatterCard.vue_vue_type_script_setup_true_lang.js +30 -0
- package/dist/components/GeoViewer.js +7 -0
- package/dist/components/GeoViewer.vue.d.ts +17 -0
- package/dist/components/GeoViewer.vue_vue_type_script_setup_true_lang.js +255 -0
- package/dist/components/HarViewer.js +7 -0
- package/dist/components/HarViewer.vue.d.ts +20 -0
- package/dist/components/HarViewer.vue_vue_type_script_setup_true_lang.js +322 -0
- package/dist/components/HexViewer.js +7 -0
- package/dist/components/HexViewer.vue.d.ts +22 -0
- package/dist/components/HexViewer.vue_vue_type_script_setup_true_lang.js +121 -0
- package/dist/components/HprofViewer.js +7 -0
- package/dist/components/HprofViewer.vue.d.ts +27 -0
- package/dist/components/HprofViewer.vue_vue_type_script_setup_true_lang.js +561 -0
- package/dist/components/ImageLightbox.js +7 -0
- package/dist/components/ImageLightbox.vue.d.ts +3 -0
- package/dist/components/ImageLightbox.vue_vue_type_script_setup_true_lang.js +86 -0
- package/dist/components/InlineText.d.ts +29 -0
- package/dist/components/InlineText.js +21 -0
- package/dist/components/JksViewer.js +7 -0
- package/dist/components/JksViewer.vue.d.ts +22 -0
- package/dist/components/JksViewer.vue_vue_type_script_setup_true_lang.js +353 -0
- package/dist/components/JsonlViewer.js +7 -0
- package/dist/components/JsonlViewer.vue.d.ts +15 -0
- package/dist/components/JsonlViewer.vue_vue_type_script_setup_true_lang.js +103 -0
- package/dist/components/LogViewer.js +7 -0
- package/dist/components/LogViewer.vue.d.ts +29 -0
- package/dist/components/LogViewer.vue_vue_type_script_setup_true_lang.js +670 -0
- package/dist/components/LrcViewer.js +7 -0
- package/dist/components/LrcViewer.vue.d.ts +17 -0
- package/dist/components/LrcViewer.vue_vue_type_script_setup_true_lang.js +106 -0
- package/dist/components/MarkdownTable.js +7 -0
- package/dist/components/MarkdownTable.vue.d.ts +19 -0
- package/dist/components/MarkdownTable.vue_vue_type_script_setup_true_lang.js +71 -0
- package/dist/components/MarkdownText.d.ts +30 -0
- package/dist/components/MarkdownText.js +21 -0
- package/dist/components/MhtViewer.js +7 -0
- package/dist/components/MhtViewer.vue.d.ts +22 -0
- package/dist/components/MhtViewer.vue_vue_type_script_setup_true_lang.js +112 -0
- package/dist/components/MindMapView.js +7 -0
- package/dist/components/MindMapView.vue.d.ts +23 -0
- package/dist/components/MindMapView.vue_vue_type_script_setup_true_lang.js +337 -0
- package/dist/components/MissingDependency.js +7 -0
- package/dist/components/MissingDependency.vue.d.ts +17 -0
- package/dist/components/MissingDependency.vue_vue_type_script_setup_true_lang.js +37 -0
- package/dist/components/ModelViewer.js +7 -0
- package/dist/components/ModelViewer.vue.d.ts +18 -0
- package/dist/components/ModelViewer.vue_vue_type_script_setup_true_lang.js +157 -0
- package/dist/components/MsiViewer.js +7 -0
- package/dist/components/MsiViewer.vue.d.ts +19 -0
- package/dist/components/MsiViewer.vue_vue_type_script_setup_true_lang.js +136 -0
- package/dist/components/NotebookViewer.js +7 -0
- package/dist/components/NotebookViewer.vue.d.ts +20 -0
- package/dist/components/NotebookViewer.vue_vue_type_script_setup_true_lang.js +125 -0
- package/dist/components/PdfViewer.js +7 -0
- package/dist/components/PdfViewer.vue.d.ts +19 -0
- package/dist/components/PdfViewer.vue_vue_type_script_setup_true_lang.js +114 -0
- package/dist/components/PptxViewer.js +7 -0
- package/dist/components/PptxViewer.vue.d.ts +20 -0
- package/dist/components/PptxViewer.vue_vue_type_script_setup_true_lang.js +73 -0
- package/dist/components/PsdViewer.js +7 -0
- package/dist/components/PsdViewer.vue.d.ts +15 -0
- package/dist/components/PsdViewer.vue_vue_type_script_setup_true_lang.js +218 -0
- package/dist/components/QmcAudioViewer.js +7 -0
- package/dist/components/QmcAudioViewer.vue.d.ts +18 -0
- package/dist/components/QmcAudioViewer.vue_vue_type_script_setup_true_lang.js +92 -0
- package/dist/components/RasterViewer.js +7 -0
- package/dist/components/RasterViewer.vue.d.ts +21 -0
- package/dist/components/RasterViewer.vue_vue_type_script_setup_true_lang.js +161 -0
- package/dist/components/RtfViewer.js +7 -0
- package/dist/components/RtfViewer.vue.d.ts +21 -0
- package/dist/components/RtfViewer.vue_vue_type_script_setup_true_lang.js +66 -0
- package/dist/components/SevenZipBrowser.js +7 -0
- package/dist/components/SevenZipBrowser.vue.d.ts +13 -0
- package/dist/components/SevenZipBrowser.vue_vue_type_script_setup_true_lang.js +366 -0
- package/dist/components/SqliteViewer.js +7 -0
- package/dist/components/SqliteViewer.vue.d.ts +18 -0
- package/dist/components/SqliteViewer.vue_vue_type_script_setup_true_lang.js +186 -0
- package/dist/components/SubtitleViewer.js +7 -0
- package/dist/components/SubtitleViewer.vue.d.ts +15 -0
- package/dist/components/SubtitleViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/XlsxChart.js +7 -0
- package/dist/components/XlsxChart.vue.d.ts +14 -0
- package/dist/components/XlsxChart.vue_vue_type_script_setup_true_lang.js +240 -0
- package/dist/components/XlsxViewer.js +7 -0
- package/dist/components/XlsxViewer.vue.d.ts +22 -0
- package/dist/components/XlsxViewer.vue_vue_type_script_setup_true_lang.js +814 -0
- package/dist/components/XmindViewer.js +7 -0
- package/dist/components/XmindViewer.vue.d.ts +13 -0
- package/dist/components/XmindViewer.vue_vue_type_script_setup_true_lang.js +48 -0
- package/dist/components/ZipBrowser.js +7 -0
- package/dist/components/ZipBrowser.vue.d.ts +14 -0
- package/dist/components/ZipBrowser.vue_vue_type_script_setup_true_lang.js +326 -0
- package/dist/components/ZoomImage.js +7 -0
- package/dist/components/ZoomImage.vue.d.ts +29 -0
- package/dist/components/ZoomImage.vue_vue_type_script_setup_true_lang.js +147 -0
- package/dist/components/epl/EplCodeBlock.js +7 -0
- package/dist/components/epl/EplCodeBlock.vue.d.ts +15 -0
- package/dist/components/epl/EplCodeBlock.vue_vue_type_script_setup_true_lang.js +72 -0
- package/dist/components/epl/EplDoc.js +7 -0
- package/dist/components/epl/EplDoc.vue.d.ts +19 -0
- package/dist/components/epl/EplDoc.vue_vue_type_script_setup_true_lang.js +327 -0
- package/dist/components/epl/EplMethod.js +7 -0
- package/dist/components/epl/EplMethod.vue.d.ts +14 -0
- package/dist/components/epl/EplMethod.vue_vue_type_script_setup_true_lang.js +100 -0
- package/dist/components/epl/EplResource.js +7 -0
- package/dist/components/epl/EplResource.vue.d.ts +15 -0
- package/dist/components/epl/EplResource.vue_vue_type_script_setup_true_lang.js +204 -0
- package/dist/components/epl/EplTree.js +7 -0
- package/dist/components/epl/EplTree.vue.d.ts +27 -0
- package/dist/components/epl/EplTree.vue_vue_type_script_setup_true_lang.js +123 -0
- package/dist/components/epl/EplVarTable.js +7 -0
- package/dist/components/epl/EplVarTable.vue.d.ts +21 -0
- package/dist/components/epl/EplVarTable.vue_vue_type_script_setup_true_lang.js +60 -0
- package/dist/components/epl/docTypes.d.ts +12 -0
- package/dist/components/epl/numbering.d.ts +21 -0
- package/dist/components/epl/numbering.js +14 -0
- package/dist/components/icons/Icon.js +7 -0
- package/dist/components/icons/Icon.vue.d.ts +14 -0
- package/dist/components/icons/Icon.vue_vue_type_script_setup_true_lang.js +33 -0
- package/dist/components/icons/iconPaths.d.ts +60 -0
- package/dist/components/icons/iconPaths.js +54 -0
- package/dist/components/optionalViewer.d.ts +14 -0
- package/dist/components/optionalViewer.js +37 -0
- package/dist/components/ui/ClampBlock.d.ts +82 -0
- package/dist/components/ui/ClampBlock.js +63 -0
- package/dist/composables/useFileViewer.d.ts +428 -0
- package/dist/composables/useFileViewer.js +27 -0
- package/dist/composables/useLightbox.d.ts +33 -0
- package/dist/composables/useLightbox.js +17 -0
- package/dist/composables/useLogRules.d.ts +47 -0
- package/dist/composables/useLogRules.js +74 -0
- package/dist/index.d.ts +44 -0
- package/dist/index.js +30 -0
- package/dist/lib/aes.d.ts +25 -0
- package/dist/lib/aes.js +99 -0
- package/dist/lib/appx.d.ts +66 -0
- package/dist/lib/appx.js +112 -0
- package/dist/lib/archive.d.ts +29 -0
- package/dist/lib/asn1.d.ts +47 -0
- package/dist/lib/asn1.js +122 -0
- package/dist/lib/binobj.d.ts +69 -0
- package/dist/lib/binobj.js +430 -0
- package/dist/lib/brotli.d.ts +14 -0
- package/dist/lib/brotli.js +16 -0
- package/dist/lib/bzip2.d.ts +14 -0
- package/dist/lib/bzip2.js +161 -0
- package/dist/lib/classfile.d.ts +72 -0
- package/dist/lib/classfile.js +210 -0
- package/dist/lib/codePreview.d.ts +22 -0
- package/dist/lib/codePreview.js +27 -0
- package/dist/lib/codefold.d.ts +14 -0
- package/dist/lib/codefold.js +30 -0
- package/dist/lib/codeformat.d.ts +21 -0
- package/dist/lib/codeformat.js +130 -0
- package/dist/lib/csv.d.ts +19 -0
- package/dist/lib/csv.js +74 -0
- package/dist/lib/des.d.ts +17 -0
- package/dist/lib/des.js +928 -0
- package/dist/lib/diagram.d.ts +5 -0
- package/dist/lib/diagram.js +479 -0
- package/dist/lib/dicom.d.ts +69 -0
- package/dist/lib/dicom.js +442 -0
- package/dist/lib/dicomCodecs.d.ts +28 -0
- package/dist/lib/dicomCodecs.js +156 -0
- package/dist/lib/dicomRender.d.ts +46 -0
- package/dist/lib/dicomRender.js +114 -0
- package/dist/lib/dxf.d.ts +86 -0
- package/dist/lib/dxf.js +399 -0
- package/dist/lib/eml.d.ts +40 -0
- package/dist/lib/eml.js +46 -0
- package/dist/lib/encoding.d.ts +28 -0
- package/dist/lib/encoding.js +44 -0
- package/dist/lib/epl/code/ast.d.ts +150 -0
- package/dist/lib/epl/code/codeDataParser.d.ts +3 -0
- package/dist/lib/epl/code/codeDataParser.js +330 -0
- package/dist/lib/epl/code/codeLines.d.ts +20 -0
- package/dist/lib/epl/code/codeLines.js +191 -0
- package/dist/lib/epl/code/structures.d.ts +86 -0
- package/dist/lib/epl/code/textCode.d.ts +29 -0
- package/dist/lib/epl/code/textCode.js +150 -0
- package/dist/lib/epl/code/variable.d.ts +25 -0
- package/dist/lib/epl/eplDocument.d.ts +21 -0
- package/dist/lib/epl/eplDocument.js +36 -0
- package/dist/lib/epl/imageList.d.ts +28 -0
- package/dist/lib/epl/imageList.js +66 -0
- package/dist/lib/epl/index.d.ts +53 -0
- package/dist/lib/epl/index.js +45 -0
- package/dist/lib/epl/io/binaryReader.d.ts +56 -0
- package/dist/lib/epl/io/binaryReader.js +119 -0
- package/dist/lib/epl/io/encoding.d.ts +16 -0
- package/dist/lib/epl/io/encoding.js +27 -0
- package/dist/lib/epl/model/eplSystemId.d.ts +64 -0
- package/dist/lib/epl/model/eplSystemId.js +16 -0
- package/dist/lib/epl/model/section.d.ts +46 -0
- package/dist/lib/epl/names/eplLibData.js +39 -0
- package/dist/lib/epl/names/idToNameMap.d.ts +33 -0
- package/dist/lib/epl/names/idToNameMap.js +130 -0
- package/dist/lib/epl/names/libNameProvider.d.ts +15 -0
- package/dist/lib/epl/names/libNameProvider.js +18 -0
- package/dist/lib/epl/program.d.ts +120 -0
- package/dist/lib/epl/program.js +134 -0
- package/dist/lib/epl/projectFileReader.d.ts +23 -0
- package/dist/lib/epl/projectFileReader.js +65 -0
- package/dist/lib/epl/sections/code.d.ts +20 -0
- package/dist/lib/epl/sections/esystemInfo.d.ts +14 -0
- package/dist/lib/epl/sections/losable.d.ts +11 -0
- package/dist/lib/epl/sections/projectConfig.d.ts +23 -0
- package/dist/lib/epl/sections/resource.d.ts +57 -0
- package/dist/lib/fb2.d.ts +14 -0
- package/dist/lib/fb2.js +62 -0
- package/dist/lib/fileType.d.ts +315 -0
- package/dist/lib/fileType.js +800 -0
- package/dist/lib/fonts.d.ts +8 -0
- package/dist/lib/fonts.js +4 -0
- package/dist/lib/format.d.ts +16 -0
- package/dist/lib/format.js +38 -0
- package/dist/lib/frontmatter.d.ts +13 -0
- package/dist/lib/frontmatter.js +23 -0
- package/dist/lib/geo.d.ts +30 -0
- package/dist/lib/geo.js +235 -0
- package/dist/lib/har.d.ts +171 -0
- package/dist/lib/har.js +397 -0
- package/dist/lib/highlight.d.ts +18 -0
- package/dist/lib/highlight.js +34 -0
- package/dist/lib/highlightLangs.d.ts +15 -0
- package/dist/lib/highlightLangs.js +93 -0
- package/dist/lib/hprof.d.ts +211 -0
- package/dist/lib/hprof.js +709 -0
- package/dist/lib/ipynb.d.ts +48 -0
- package/dist/lib/ipynb.js +130 -0
- package/dist/lib/jks.d.ts +86 -0
- package/dist/lib/jks.js +167 -0
- package/dist/lib/jsonl.d.ts +29 -0
- package/dist/lib/jsonl.js +24 -0
- package/dist/lib/lrc.d.ts +32 -0
- package/dist/lib/lrc.js +84 -0
- package/dist/lib/lzma.d.ts +70 -0
- package/dist/lib/lzma.js +204 -0
- package/dist/lib/markdown/blocks.d.ts +9 -0
- package/dist/lib/markdown/blocks.js +221 -0
- package/dist/lib/markdown/index.d.ts +3 -0
- package/dist/lib/markdown/inline.d.ts +33 -0
- package/dist/lib/markdown/inline.js +84 -0
- package/dist/lib/markdown/math.d.ts +5 -0
- package/dist/lib/markdown/math.js +25 -0
- package/dist/lib/markdown/segmentize.d.ts +11 -0
- package/dist/lib/markdown/segmentize.js +28 -0
- package/dist/lib/markdown/styles.d.ts +26 -0
- package/dist/lib/markdown/styles.js +135 -0
- package/dist/lib/mht.d.ts +51 -0
- package/dist/lib/mht.js +122 -0
- package/dist/lib/midi.d.ts +28 -0
- package/dist/lib/midi.js +84 -0
- package/dist/lib/mime.d.ts +82 -0
- package/dist/lib/mime.js +151 -0
- package/dist/lib/mindmap.d.ts +51 -0
- package/dist/lib/mindmap.js +113 -0
- package/dist/lib/mobi.d.ts +15 -0
- package/dist/lib/mobi.js +68 -0
- package/dist/lib/msi.d.ts +50 -0
- package/dist/lib/msi.js +332 -0
- package/dist/lib/optionalDep.d.ts +26 -0
- package/dist/lib/optionalDep.js +20 -0
- package/dist/lib/pkcs12.d.ts +56 -0
- package/dist/lib/pkcs12.js +356 -0
- package/dist/lib/qmc.d.ts +50 -0
- package/dist/lib/qmc.js +213 -0
- package/dist/lib/rar.d.ts +16 -0
- package/dist/lib/rar.js +40 -0
- package/dist/lib/rawPreview.d.ts +12 -0
- package/dist/lib/rawPreview.js +54 -0
- package/dist/lib/rc2.d.ts +12 -0
- package/dist/lib/rc2.js +298 -0
- package/dist/lib/resolveInput.d.ts +22 -0
- package/dist/lib/resolveInput.js +55 -0
- package/dist/lib/rtf.d.ts +53 -0
- package/dist/lib/rtf.js +413 -0
- package/dist/lib/sevenZip.d.ts +82 -0
- package/dist/lib/sevenZip.js +395 -0
- package/dist/lib/sha1.d.ts +24 -0
- package/dist/lib/sha1.js +53 -0
- package/dist/lib/sha256.d.ts +21 -0
- package/dist/lib/sha256.js +119 -0
- package/dist/lib/speechAudio.d.ts +36 -0
- package/dist/lib/speechAudio.js +85 -0
- package/dist/lib/sqlite.d.ts +38 -0
- package/dist/lib/sqlite.js +104 -0
- package/dist/lib/subtitle.d.ts +26 -0
- package/dist/lib/subtitle.js +99 -0
- package/dist/lib/tarball.d.ts +20 -0
- package/dist/lib/tarball.js +248 -0
- package/dist/lib/viewerFormats.d.ts +35 -0
- package/dist/lib/viewerFormats.js +83 -0
- package/dist/lib/viewerKind.d.ts +36 -0
- package/dist/lib/viewerKind.js +233 -0
- package/dist/lib/x509.d.ts +68 -0
- package/dist/lib/x509.js +267 -0
- package/dist/lib/xlsx.d.ts +55 -0
- package/dist/lib/xlsx.js +321 -0
- package/dist/lib/xlsxCharts.d.ts +34 -0
- package/dist/lib/xlsxCharts.js +152 -0
- package/dist/lib/xmind.d.ts +6 -0
- package/dist/lib/xmind.js +124 -0
- package/dist/lib/zip.d.ts +56 -0
- package/dist/lib/zip.js +169 -0
- package/dist/style.css +2 -0
- package/dist/types.d.ts +42 -0
- package/package.json +128 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { h } from 'vue';
|
|
2
|
+
/**
|
|
3
|
+
* Renders inline markdown (code/bold/italic/links/strikethrough) as a fragment,
|
|
4
|
+
* for embedding inside SFC templates (table cells, recipe steps, …). The block
|
|
5
|
+
* renderer in lib/markdown/blocks.ts calls `inline()` directly instead.
|
|
6
|
+
*/
|
|
7
|
+
declare const _default: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
8
|
+
text: {
|
|
9
|
+
type: StringConstructor;
|
|
10
|
+
default: string;
|
|
11
|
+
};
|
|
12
|
+
kp: {
|
|
13
|
+
type: StringConstructor;
|
|
14
|
+
default: string;
|
|
15
|
+
};
|
|
16
|
+
}>, () => ReturnType<typeof h>[], {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
17
|
+
text: {
|
|
18
|
+
type: StringConstructor;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
21
|
+
kp: {
|
|
22
|
+
type: StringConstructor;
|
|
23
|
+
default: string;
|
|
24
|
+
};
|
|
25
|
+
}>> & Readonly<{}>, {
|
|
26
|
+
text: string;
|
|
27
|
+
kp: string;
|
|
28
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
29
|
+
export default _default;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { inline as e } from "../lib/markdown/inline.js";
|
|
2
|
+
import { defineComponent as t } from "vue";
|
|
3
|
+
//#region src/components/InlineText.ts
|
|
4
|
+
var n = t({
|
|
5
|
+
name: "InlineText",
|
|
6
|
+
props: {
|
|
7
|
+
text: {
|
|
8
|
+
type: String,
|
|
9
|
+
default: ""
|
|
10
|
+
},
|
|
11
|
+
kp: {
|
|
12
|
+
type: String,
|
|
13
|
+
default: "i"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
setup(t) {
|
|
17
|
+
return () => e(t.text, t.kp);
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { n as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./JksViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/JksViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-4e87fe75"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer for keystores. Fetches the BYTES itself (binary-safe) and sniffs the format:
|
|
3
|
+
* - JKS / JCEKS (magic 0xFEEDFEED / 0xCECECECE): the Sun binary format (see lib/jks.ts). Certificates are
|
|
4
|
+
* plaintext, so the whole inventory shows immediately; a password verifies the store MAC and decrypts JKS
|
|
5
|
+
* private keys.
|
|
6
|
+
* - PKCS#12 / PFX (`.p12`/`.pfx`, and the very common `.jks`-that-is-actually-PKCS#12 — keytool defaults to
|
|
7
|
+
* PKCS12 since JDK 9): everything is encrypted (see lib/pkcs12.ts), so nothing shows until the password
|
|
8
|
+
* unlocks it; then certs + private keys appear and the integrity MAC is verified.
|
|
9
|
+
*
|
|
10
|
+
* Both render the same cards: per entry the alias / kind / (JKS) creation date, the private-key algorithm once
|
|
11
|
+
* decrypted, and each certificate's X.509 fields (subject/issuer, validity + expiry badge, key + signature
|
|
12
|
+
* algorithm, SANs, SHA-256 fingerprint — reusing lib/x509.ts). All parsing/decryption is in-browser; the
|
|
13
|
+
* password and key material never leave the page.
|
|
14
|
+
*/
|
|
15
|
+
type __VLS_Props = {
|
|
16
|
+
url?: string;
|
|
17
|
+
name: string;
|
|
18
|
+
size?: number;
|
|
19
|
+
};
|
|
20
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
21
|
+
declare const _default: typeof __VLS_export;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,353 @@
|
|
|
1
|
+
import { formatBytes as e } from "../lib/format.js";
|
|
2
|
+
import t from "./icons/Icon.js";
|
|
3
|
+
import { parseCertificate as n, sha256Hex as r } from "../lib/x509.js";
|
|
4
|
+
import { JksError as i, decryptPrivateKey as a, readJks as o, verifyStorePassword as s } from "../lib/jks.js";
|
|
5
|
+
import { looksLikePkcs12 as ee, readPkcs12 as te } from "../lib/pkcs12.js";
|
|
6
|
+
import { Fragment as c, computed as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, onBeforeUnmount as ne, openBlock as g, reactive as _, ref as v, renderList as y, shallowRef as b, toDisplayString as x, unref as re, vModelText as ie, watch as ae, withDirectives as oe, withKeys as se } from "vue";
|
|
7
|
+
//#region src/components/JksViewer.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
+
var ce = { class: "jks" }, le = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "jks__msg"
|
|
11
|
+
}, ue = {
|
|
12
|
+
key: 1,
|
|
13
|
+
class: "jks__msg jks__gate"
|
|
14
|
+
}, de = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "jks__msg jks__msg--error"
|
|
17
|
+
}, fe = {
|
|
18
|
+
key: 3,
|
|
19
|
+
class: "jks__scroll"
|
|
20
|
+
}, pe = { class: "jks__store" }, me = { class: "jks__storehead" }, he = { class: "jks__badge jks__badge--type" }, ge = { class: "jks__storetitle" }, _e = { class: "jks__storemeta" }, ve = ["placeholder"], ye = {
|
|
21
|
+
key: 1,
|
|
22
|
+
class: "jks__warn"
|
|
23
|
+
}, be = {
|
|
24
|
+
key: 2,
|
|
25
|
+
class: "jks__warn"
|
|
26
|
+
}, xe = {
|
|
27
|
+
key: 0,
|
|
28
|
+
class: "jks__locked"
|
|
29
|
+
}, Se = { class: "jks__entryhead" }, Ce = ["title"], we = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "jks__date"
|
|
32
|
+
}, Te = {
|
|
33
|
+
key: 0,
|
|
34
|
+
class: "jks__key"
|
|
35
|
+
}, Ee = { class: "jks__keytext jks__keytext--ok" }, S = { class: "jks__keytext" }, C = {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: "jks__note"
|
|
38
|
+
}, w = {
|
|
39
|
+
key: 2,
|
|
40
|
+
class: "jks__chain"
|
|
41
|
+
}, T = {
|
|
42
|
+
key: 0,
|
|
43
|
+
class: "jks__chainlabel"
|
|
44
|
+
}, E = { class: "jks__certhead" }, D = { class: "jks__certcn" }, De = {
|
|
45
|
+
key: 0,
|
|
46
|
+
class: "jks__note"
|
|
47
|
+
}, Oe = { class: "jks__dl" }, ke = { class: "jks__mono" }, Ae = { class: "jks__mono jks__fp" }, je = 8 * 1024 * 1024, O = /*@__PURE__*/ m({
|
|
48
|
+
__name: "JksViewer",
|
|
49
|
+
props: {
|
|
50
|
+
url: {},
|
|
51
|
+
name: {},
|
|
52
|
+
size: {}
|
|
53
|
+
},
|
|
54
|
+
setup(m) {
|
|
55
|
+
let O = m, k = v("loading"), A = v(""), j = v(null), M = b(null), N = b(null), P = b([]), F = _({}), I = v(""), L = v(!1), R = v("unknown"), z = v(!1), B = _({}), V = b(null), H = v(""), U = l(() => j.value === "pkcs12"), Me = l(() => j.value === "pkcs12" ? "PKCS#12" : j.value === "jceks" ? "JCEKS" : "JKS"), Ne = l(() => P.value.some((e) => e.entry.type === "privateKey")), Pe = l(() => {
|
|
56
|
+
let e = N.value;
|
|
57
|
+
if (j.value === "pkcs12") {
|
|
58
|
+
let e = V.value;
|
|
59
|
+
return e ? [...e.encryptionAlgos, e.macAlgorithm].filter(Boolean).join(" · ") : "证书与私钥均加密,输入密码解密";
|
|
60
|
+
}
|
|
61
|
+
return e ? `版本 ${e.version} · ${e.entries.length} 个条目` : "";
|
|
62
|
+
});
|
|
63
|
+
function W() {
|
|
64
|
+
for (let e of P.value) for (let t of e.certs) t.summary.ok && r(t.summary.der).then((e) => {
|
|
65
|
+
F[t.id] = e;
|
|
66
|
+
}).catch(() => {});
|
|
67
|
+
}
|
|
68
|
+
function Fe(e) {
|
|
69
|
+
P.value = e.entries.map((e, t) => ({
|
|
70
|
+
entry: e,
|
|
71
|
+
index: t,
|
|
72
|
+
certs: e.certs.map((e, r) => ({
|
|
73
|
+
summary: n(e.der),
|
|
74
|
+
id: `${t}.${r}`
|
|
75
|
+
}))
|
|
76
|
+
}));
|
|
77
|
+
}
|
|
78
|
+
function Ie(e) {
|
|
79
|
+
let t = new Uint8Array(e), n = t.length >= 4 ? (t[0] << 24 | t[1] << 16 | t[2] << 8 | t[3]) >>> 0 : 0;
|
|
80
|
+
if (n === 4277010157 || n === 3469659854) {
|
|
81
|
+
let t = o(e);
|
|
82
|
+
j.value = t.storeType, N.value = t, Fe(t), W();
|
|
83
|
+
} else if (ee(t)) j.value = "pkcs12", M.value = e;
|
|
84
|
+
else throw new i(`文件头不匹配(magic=0x${n.toString(16).padStart(8, "0")})—— 不是 JKS/JCEKS/PKCS#12 密钥库`);
|
|
85
|
+
k.value = "ready";
|
|
86
|
+
}
|
|
87
|
+
function Le() {
|
|
88
|
+
A.value = "", j.value = null, M.value = null, N.value = null, P.value = [], I.value = "", L.value = !1, R.value = "unknown", z.value = !1, V.value = null, H.value = "";
|
|
89
|
+
for (let e of Object.keys(F)) delete F[e];
|
|
90
|
+
for (let e of Object.keys(B)) delete B[Number(e)];
|
|
91
|
+
}
|
|
92
|
+
async function G() {
|
|
93
|
+
if (O.url) {
|
|
94
|
+
k.value = "loading", Le();
|
|
95
|
+
try {
|
|
96
|
+
let e = await fetch(O.url);
|
|
97
|
+
if (!e.ok) throw Error(`HTTP ${e.status}`);
|
|
98
|
+
Ie(await e.arrayBuffer());
|
|
99
|
+
} catch (e) {
|
|
100
|
+
A.value = e instanceof i || e instanceof Error ? e.message : String(e), k.value = "error";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function Re() {
|
|
105
|
+
if (O.size && O.size > je) {
|
|
106
|
+
k.value = "gate";
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
109
|
+
G();
|
|
110
|
+
}
|
|
111
|
+
function ze(e) {
|
|
112
|
+
R.value = s(e, I.value) ? "ok" : "bad";
|
|
113
|
+
for (let e of P.value) e.entry.type === "privateKey" && e.entry.encryptedKey && (B[e.index] = a(e.entry.encryptedKey, I.value));
|
|
114
|
+
}
|
|
115
|
+
function Be(e) {
|
|
116
|
+
let t = [], r = /* @__PURE__ */ new Set(), i = 0;
|
|
117
|
+
for (let a of e.keys) {
|
|
118
|
+
let o = e.certs.filter((e, t) => {
|
|
119
|
+
let n = !!a.localKeyId && e.localKeyId === a.localKeyId;
|
|
120
|
+
return n && r.add(t), n;
|
|
121
|
+
}), s = {
|
|
122
|
+
type: "privateKey",
|
|
123
|
+
alias: a.friendlyName || a.localKeyId || `私钥 ${i + 1}`,
|
|
124
|
+
createdMs: 0,
|
|
125
|
+
certs: o.map((e) => ({
|
|
126
|
+
type: "X.509",
|
|
127
|
+
der: e.der
|
|
128
|
+
}))
|
|
129
|
+
};
|
|
130
|
+
t.push({
|
|
131
|
+
entry: s,
|
|
132
|
+
index: i,
|
|
133
|
+
certs: s.certs.map((e, t) => ({
|
|
134
|
+
summary: n(e.der),
|
|
135
|
+
id: `${i}.${t}`
|
|
136
|
+
}))
|
|
137
|
+
}), B[i] = {
|
|
138
|
+
ok: !0,
|
|
139
|
+
key: {
|
|
140
|
+
pkcs8: a.pkcs8,
|
|
141
|
+
algorithm: a.algorithm,
|
|
142
|
+
bits: a.bits,
|
|
143
|
+
curve: a.curve
|
|
144
|
+
}
|
|
145
|
+
}, i++;
|
|
146
|
+
}
|
|
147
|
+
e.certs.forEach((e, a) => {
|
|
148
|
+
if (r.has(a)) return;
|
|
149
|
+
let o = {
|
|
150
|
+
type: "trustedCert",
|
|
151
|
+
alias: e.friendlyName || `证书 ${i + 1}`,
|
|
152
|
+
createdMs: 0,
|
|
153
|
+
certs: [{
|
|
154
|
+
type: "X.509",
|
|
155
|
+
der: e.der
|
|
156
|
+
}]
|
|
157
|
+
};
|
|
158
|
+
t.push({
|
|
159
|
+
entry: o,
|
|
160
|
+
index: i,
|
|
161
|
+
certs: [{
|
|
162
|
+
summary: n(e.der),
|
|
163
|
+
id: `${i}.0`
|
|
164
|
+
}]
|
|
165
|
+
}), i++;
|
|
166
|
+
}), P.value = t;
|
|
167
|
+
}
|
|
168
|
+
function Ve(e) {
|
|
169
|
+
let t = te(e, I.value);
|
|
170
|
+
if (!t.ok) {
|
|
171
|
+
z.value = !1, P.value = [];
|
|
172
|
+
for (let e of Object.keys(B)) delete B[Number(e)];
|
|
173
|
+
t.reason === "wrong-password" ? (R.value = "bad", H.value = "") : (R.value = "unknown", H.value = (t.reason === "unsupported" ? "暂不支持的加密方式:" : "解析失败:") + (t.detail ?? ""));
|
|
174
|
+
return;
|
|
175
|
+
}
|
|
176
|
+
H.value = "", V.value = t.result, Be(t.result), R.value = t.result.macVerified === !0 ? "ok" : "unknown", z.value = !0, W();
|
|
177
|
+
}
|
|
178
|
+
function K() {
|
|
179
|
+
I.value && (L.value = !0, j.value === "pkcs12" ? M.value && Ve(M.value) : N.value && ze(N.value));
|
|
180
|
+
}
|
|
181
|
+
function q(e) {
|
|
182
|
+
return e.map((e) => `${e.name}=${e.value}`).join(", ");
|
|
183
|
+
}
|
|
184
|
+
let He = {
|
|
185
|
+
privateKey: "私钥条目",
|
|
186
|
+
trustedCert: "受信任证书",
|
|
187
|
+
secretKey: "密钥条目"
|
|
188
|
+
}, J = {
|
|
189
|
+
privateKey: "jks__badge--key",
|
|
190
|
+
trustedCert: "jks__badge--cert",
|
|
191
|
+
secretKey: "jks__badge--secret"
|
|
192
|
+
};
|
|
193
|
+
function Ue(e) {
|
|
194
|
+
if (!e) return "";
|
|
195
|
+
try {
|
|
196
|
+
return new Date(e).toLocaleString("zh-CN", { hour12: !1 });
|
|
197
|
+
} catch {
|
|
198
|
+
return "";
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
function Y(e) {
|
|
202
|
+
let t = [];
|
|
203
|
+
return e.pubKeyAlg && t.push(e.pubKeyAlg), e.pubKeyBits && t.push(`${e.pubKeyBits} 位`), e.pubKeyCurve && e.pubKeyCurve !== e.pubKeyAlg && t.push(e.pubKeyCurve), t.join(" · ");
|
|
204
|
+
}
|
|
205
|
+
function X(e) {
|
|
206
|
+
if (e.notAfterMs == null) return null;
|
|
207
|
+
let t = Date.now();
|
|
208
|
+
if (e.notBeforeMs != null && t < e.notBeforeMs) return {
|
|
209
|
+
text: "尚未生效",
|
|
210
|
+
cls: "jks__cbadge--warn"
|
|
211
|
+
};
|
|
212
|
+
if (t > e.notAfterMs) return {
|
|
213
|
+
text: "已过期",
|
|
214
|
+
cls: "jks__cbadge--bad"
|
|
215
|
+
};
|
|
216
|
+
let n = Math.floor((e.notAfterMs - t) / 864e5);
|
|
217
|
+
return n <= 30 ? {
|
|
218
|
+
text: `${n} 天后过期`,
|
|
219
|
+
cls: "jks__cbadge--warn"
|
|
220
|
+
} : {
|
|
221
|
+
text: `有效(剩 ${n} 天)`,
|
|
222
|
+
cls: "jks__cbadge--ok"
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function Z(e) {
|
|
226
|
+
let t = B[e];
|
|
227
|
+
if (!t) return { kind: "locked" };
|
|
228
|
+
if (t.ok) {
|
|
229
|
+
let e = [t.key.algorithm];
|
|
230
|
+
return t.key.bits && e.push(`${t.key.bits} 位`), t.key.curve && t.key.curve !== t.key.algorithm && e.push(t.key.curve), {
|
|
231
|
+
kind: "ok",
|
|
232
|
+
text: e.join(" · ")
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
return t.reason === "wrong-password" ? { kind: "wrong" } : t.reason === "unsupported" ? {
|
|
236
|
+
kind: "unsupported",
|
|
237
|
+
detail: t.detail
|
|
238
|
+
} : { kind: "malformed" };
|
|
239
|
+
}
|
|
240
|
+
let We = l(() => U.value ? z.value ? "已解锁(可重新输入)" : "输入 PKCS#12 密码解密证书与私钥" : Ne.value ? "输入密码:解密私钥并校验完整性" : "输入库密码校验完整性(可选)"), Q = l(() => R.value === "bad" ? U.value ? "密码错误 —— 无法解密" : "完整性校验未通过 —— 密码错误或文件已被修改" : R.value === "ok" ? U.value ? `密码正确,完整性校验通过(${V.value?.macAlgorithm ?? "MAC"})` : "完整性校验通过 —— 密码正确,keystore 未被篡改" : U.value && z.value ? "已解密(该文件无 MAC 或摘要不支持,密码经解密验证)" : ""), $ = l(() => R.value === "ok" || U.value && z.value);
|
|
241
|
+
return ae(() => [O.url, O.name], Re, { immediate: !0 }), ne(() => {}), (n, r) => (g(), d("div", ce, [k.value === "loading" ? (g(), d("p", le, "正在解析 keystore…")) : k.value === "gate" ? (g(), d("div", ue, [f("p", null, "该文件较大(" + x(re(e)(O.size)) + "),将在浏览器内解析。是否继续?", 1), f("button", {
|
|
242
|
+
type: "button",
|
|
243
|
+
class: "jks__btn",
|
|
244
|
+
onClick: G
|
|
245
|
+
}, "解析并预览")])) : k.value === "error" ? (g(), d("div", de, [f("p", null, "无法解析:" + x(A.value), 1), f("button", {
|
|
246
|
+
type: "button",
|
|
247
|
+
class: "jks__btn",
|
|
248
|
+
onClick: G
|
|
249
|
+
}, "重试")])) : j.value ? (g(), d("div", fe, [
|
|
250
|
+
f("section", pe, [
|
|
251
|
+
f("header", me, [
|
|
252
|
+
f("span", he, x(Me.value), 1),
|
|
253
|
+
f("span", ge, x(U.value ? "PKCS#12 密钥库" : "Java KeyStore"), 1),
|
|
254
|
+
f("span", _e, x(Pe.value), 1)
|
|
255
|
+
]),
|
|
256
|
+
f("div", { class: h(["jks__pw", { "jks__pw--ok": $.value }]) }, [
|
|
257
|
+
p(t, {
|
|
258
|
+
name: "key",
|
|
259
|
+
size: 14
|
|
260
|
+
}),
|
|
261
|
+
oe(f("input", {
|
|
262
|
+
"onUpdate:modelValue": r[0] ||= (e) => I.value = e,
|
|
263
|
+
type: "password",
|
|
264
|
+
class: "jks__pwinput",
|
|
265
|
+
placeholder: We.value,
|
|
266
|
+
autocomplete: "off",
|
|
267
|
+
onKeyup: se(K, ["enter"])
|
|
268
|
+
}, null, 40, ve), [[ie, I.value]]),
|
|
269
|
+
f("button", {
|
|
270
|
+
type: "button",
|
|
271
|
+
class: "jks__pwbtn",
|
|
272
|
+
onClick: K
|
|
273
|
+
}, x(U.value && z.value ? "重新解锁" : "解锁"), 1)
|
|
274
|
+
], 2),
|
|
275
|
+
L.value && Q.value ? (g(), d("p", {
|
|
276
|
+
key: 0,
|
|
277
|
+
class: h(["jks__integrity", `jks__integrity--${R.value}`])
|
|
278
|
+
}, [p(t, {
|
|
279
|
+
name: $.value ? "check" : "close",
|
|
280
|
+
size: 13
|
|
281
|
+
}, null, 8, ["name"]), f("span", null, x(Q.value), 1)], 2)) : u("", !0),
|
|
282
|
+
r[1] ||= f("p", { class: "jks__hint" }, "全部解析与解密均在浏览器本地完成,密码与密钥不会上传。", -1),
|
|
283
|
+
N.value?.truncatedNote ? (g(), d("p", ye, x(N.value.truncatedNote), 1)) : u("", !0),
|
|
284
|
+
H.value ? (g(), d("p", be, x(H.value), 1)) : u("", !0),
|
|
285
|
+
(g(!0), d(c, null, y(V.value?.warnings ?? [], (e, t) => (g(), d("p", {
|
|
286
|
+
key: t,
|
|
287
|
+
class: "jks__warn"
|
|
288
|
+
}, x(e), 1))), 128))
|
|
289
|
+
]),
|
|
290
|
+
U.value && !z.value ? (g(), d("div", xe, [p(t, {
|
|
291
|
+
name: "key",
|
|
292
|
+
size: 26,
|
|
293
|
+
class: "jks__lockicon"
|
|
294
|
+
}), r[2] ||= f("p", null, "PKCS#12 密钥库的证书与私钥均已加密,输入上方密码后在此显示内容。", -1)])) : u("", !0),
|
|
295
|
+
(g(!0), d(c, null, y(P.value, (e) => (g(), d("section", {
|
|
296
|
+
key: e.index,
|
|
297
|
+
class: "jks__entry"
|
|
298
|
+
}, [
|
|
299
|
+
f("header", Se, [
|
|
300
|
+
f("span", { class: h(["jks__badge", J[e.entry.type]]) }, x(He[e.entry.type]), 3),
|
|
301
|
+
f("span", {
|
|
302
|
+
class: "jks__alias",
|
|
303
|
+
title: e.entry.alias
|
|
304
|
+
}, x(e.entry.alias), 9, Ce),
|
|
305
|
+
e.entry.createdMs ? (g(), d("span", we, x(Ue(e.entry.createdMs)), 1)) : u("", !0)
|
|
306
|
+
]),
|
|
307
|
+
e.entry.type === "privateKey" ? (g(), d("div", Te, [Z(e.index).kind === "locked" ? (g(), d(c, { key: 0 }, [p(t, {
|
|
308
|
+
name: "key",
|
|
309
|
+
size: 13,
|
|
310
|
+
class: "jks__keyicon"
|
|
311
|
+
}), r[3] ||= f("span", { class: "jks__keytext" }, "私钥已加密 —— 输入密码后在此显示密钥算法", -1)], 64)) : Z(e.index).kind === "ok" ? (g(), d(c, { key: 1 }, [p(t, {
|
|
312
|
+
name: "check",
|
|
313
|
+
size: 13,
|
|
314
|
+
class: "jks__keyicon jks__keyicon--ok"
|
|
315
|
+
}), f("span", Ee, "私钥已解密 · " + x(Z(e.index).text), 1)], 64)) : Z(e.index).kind === "wrong" ? (g(), d(c, { key: 2 }, [p(t, {
|
|
316
|
+
name: "close",
|
|
317
|
+
size: 13,
|
|
318
|
+
class: "jks__keyicon jks__keyicon--bad"
|
|
319
|
+
}), r[4] ||= f("span", { class: "jks__keytext jks__keytext--bad" }, "密码错误 —— 无法解密该私钥", -1)], 64)) : Z(e.index).kind === "unsupported" ? (g(), d(c, { key: 3 }, [p(t, {
|
|
320
|
+
name: "key",
|
|
321
|
+
size: 13,
|
|
322
|
+
class: "jks__keyicon"
|
|
323
|
+
}), f("span", S, "该私钥加密方式暂不支持浏览器内解密(" + x(Z(e.index).detail) + ")—— 证书链仍可查看", 1)], 64)) : (g(), d(c, { key: 4 }, [p(t, {
|
|
324
|
+
name: "close",
|
|
325
|
+
size: 13,
|
|
326
|
+
class: "jks__keyicon jks__keyicon--bad"
|
|
327
|
+
}), r[5] ||= f("span", { class: "jks__keytext jks__keytext--bad" }, "私钥数据无法解析", -1)], 64))])) : e.entry.type === "secretKey" ? (g(), d("p", C, " JCEKS 对称密钥条目(SecretKey)—— 以 Java 序列化对象存储,暂不解析。 ")) : u("", !0),
|
|
328
|
+
e.certs.length ? (g(), d("div", w, [e.entry.type === "privateKey" ? (g(), d("div", T, " 证书链(" + x(e.certs.length) + ") ", 1)) : u("", !0), (g(!0), d(c, null, y(e.certs, (e) => (g(), d("article", {
|
|
329
|
+
key: e.id,
|
|
330
|
+
class: "jks__cert"
|
|
331
|
+
}, [
|
|
332
|
+
f("div", E, [f("span", D, x(e.summary.subjectCN || e.summary.label), 1), X(e.summary) ? (g(), d("span", {
|
|
333
|
+
key: 0,
|
|
334
|
+
class: h(["jks__cbadge", X(e.summary)?.cls])
|
|
335
|
+
}, x(X(e.summary)?.text), 3)) : u("", !0)]),
|
|
336
|
+
e.summary.note && !e.summary.ok ? (g(), d("p", De, x(e.summary.note), 1)) : u("", !0),
|
|
337
|
+
f("dl", Oe, [
|
|
338
|
+
e.summary.subject.length ? (g(), d(c, { key: 0 }, [r[6] ||= f("dt", null, "主题", -1), f("dd", null, x(q(e.summary.subject)), 1)], 64)) : u("", !0),
|
|
339
|
+
e.summary.issuer.length ? (g(), d(c, { key: 1 }, [r[7] ||= f("dt", null, "颁发者", -1), f("dd", null, x(q(e.summary.issuer)), 1)], 64)) : u("", !0),
|
|
340
|
+
e.summary.notBefore || e.summary.notAfter ? (g(), d(c, { key: 2 }, [r[8] ||= f("dt", null, "有效期", -1), f("dd", null, x(e.summary.notBefore ?? "?") + " → " + x(e.summary.notAfter ?? "?"), 1)], 64)) : u("", !0),
|
|
341
|
+
Y(e.summary) ? (g(), d(c, { key: 3 }, [r[9] ||= f("dt", null, "公钥", -1), f("dd", null, x(Y(e.summary)), 1)], 64)) : u("", !0),
|
|
342
|
+
e.summary.sigAlg ? (g(), d(c, { key: 4 }, [r[10] ||= f("dt", null, "签名算法", -1), f("dd", null, x(e.summary.sigAlg), 1)], 64)) : u("", !0),
|
|
343
|
+
e.summary.serialHex ? (g(), d(c, { key: 5 }, [r[11] ||= f("dt", null, "序列号", -1), f("dd", ke, x(e.summary.serialHex), 1)], 64)) : u("", !0),
|
|
344
|
+
e.summary.sans.length ? (g(), d(c, { key: 6 }, [r[12] ||= f("dt", null, "备用名 (SAN)", -1), f("dd", null, x(e.summary.sans.join(",")), 1)], 64)) : u("", !0),
|
|
345
|
+
F[e.id] ? (g(), d(c, { key: 7 }, [r[13] ||= f("dt", null, "SHA-256", -1), f("dd", Ae, x(F[e.id]), 1)], 64)) : u("", !0)
|
|
346
|
+
])
|
|
347
|
+
]))), 128))])) : u("", !0)
|
|
348
|
+
]))), 128))
|
|
349
|
+
])) : u("", !0)]));
|
|
350
|
+
}
|
|
351
|
+
});
|
|
352
|
+
//#endregion
|
|
353
|
+
export { O as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./JsonlViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/JsonlViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-326ae959"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer JSON Lines (`.jsonl` / `.ndjson`) renderer (render mode). Receives the fetched text (the panel
|
|
3
|
+
* loads it, like CsvViewer / SubtitleViewer), parses it into per-line records (see lib/jsonl.ts), and shows a
|
|
4
|
+
* compact LIST — one truncated single-line preview per record. Clicking a row expands it to the pretty-printed,
|
|
5
|
+
* syntax-highlighted value. Big files stay responsive two ways: each row's preview is a short single line, and
|
|
6
|
+
* only an initial window of rows is in the DOM (a "load more" button grows it). The source toggle (header) shows
|
|
7
|
+
* the raw file highlighted as JSON.
|
|
8
|
+
*/
|
|
9
|
+
type __VLS_Props = {
|
|
10
|
+
text: string;
|
|
11
|
+
name: string;
|
|
12
|
+
};
|
|
13
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { highlightCode as e } from "../lib/highlight.js";
|
|
2
|
+
import t from "./icons/Icon.js";
|
|
3
|
+
import { parseJsonl as n } from "../lib/jsonl.js";
|
|
4
|
+
import { Fragment as r, computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, normalizeClass as u, onBeforeUnmount as d, openBlock as f, ref as p, renderList as m, toDisplayString as h, watch as g } from "vue";
|
|
5
|
+
//#region src/components/JsonlViewer.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _ = { class: "jl" }, v = { class: "jl__summary" }, y = { class: "jl__count" }, b = {
|
|
7
|
+
key: 0,
|
|
8
|
+
class: "jl__errtag"
|
|
9
|
+
}, x = { class: "jl__list" }, S = {
|
|
10
|
+
key: 0,
|
|
11
|
+
class: "jl__msg"
|
|
12
|
+
}, C = ["title", "onClick"], w = { class: "jl__ln" }, T = {
|
|
13
|
+
key: 0,
|
|
14
|
+
class: "jl__badge"
|
|
15
|
+
}, E = { class: "jl__preview" }, D = ["title", "onClick"], O = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "jl__full"
|
|
18
|
+
}, k = ["innerHTML"], A = 200, j = 200, M = 400, N = /*@__PURE__*/ l({
|
|
19
|
+
__name: "JsonlViewer",
|
|
20
|
+
props: {
|
|
21
|
+
text: {},
|
|
22
|
+
name: {}
|
|
23
|
+
},
|
|
24
|
+
setup(l) {
|
|
25
|
+
let N = l, P = i(() => n(N.text)), F = p(j), I = p(/* @__PURE__ */ new Set());
|
|
26
|
+
g(() => N.text, () => {
|
|
27
|
+
F.value = j, I.value = /* @__PURE__ */ new Set();
|
|
28
|
+
});
|
|
29
|
+
let L = i(() => P.value.records.slice(0, F.value)), R = i(() => Math.max(0, P.value.records.length - F.value));
|
|
30
|
+
function z() {
|
|
31
|
+
F.value += M;
|
|
32
|
+
}
|
|
33
|
+
function B(e) {
|
|
34
|
+
let t = new Set(I.value);
|
|
35
|
+
t.has(e) ? t.delete(e) : t.add(e), I.value = t;
|
|
36
|
+
}
|
|
37
|
+
let V = p(null), H;
|
|
38
|
+
async function U(e) {
|
|
39
|
+
try {
|
|
40
|
+
await navigator.clipboard?.writeText(e.raw);
|
|
41
|
+
} catch {}
|
|
42
|
+
V.value = e.line, clearTimeout(H), H = setTimeout(() => V.value = null, 1400);
|
|
43
|
+
}
|
|
44
|
+
d(() => clearTimeout(H));
|
|
45
|
+
function W(e) {
|
|
46
|
+
let t;
|
|
47
|
+
if (e.error) t = e.raw;
|
|
48
|
+
else try {
|
|
49
|
+
t = JSON.stringify(e.value) ?? String(e.value);
|
|
50
|
+
} catch {
|
|
51
|
+
t = e.raw;
|
|
52
|
+
}
|
|
53
|
+
return t = t.replace(/\s+/g, " ").trim(), t.length > A ? t.slice(0, A) + "…" : t;
|
|
54
|
+
}
|
|
55
|
+
function G(t) {
|
|
56
|
+
if (t.error) return e(t.raw, "json");
|
|
57
|
+
try {
|
|
58
|
+
return e(JSON.stringify(t.value, null, 2) ?? "", "json");
|
|
59
|
+
} catch {
|
|
60
|
+
return e(t.raw, "json");
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
return (e, n) => (f(), o("div", _, [s("div", v, [s("span", y, h(P.value.records.length) + " 条记录", 1), P.value.errorCount ? (f(), o("span", b, h(P.value.errorCount) + " 行无法解析", 1)) : a("", !0)]), s("div", x, [
|
|
64
|
+
P.value.records.length ? a("", !0) : (f(), o("p", S, "(空文件,无 JSON 记录)")),
|
|
65
|
+
(f(!0), o(r, null, m(L.value, (e) => (f(), o("div", {
|
|
66
|
+
key: e.line,
|
|
67
|
+
class: "jl__rowwrap"
|
|
68
|
+
}, [s("div", { class: u(["jl__rowhead", {
|
|
69
|
+
"jl__rowhead--open": I.value.has(e.line),
|
|
70
|
+
"jl__rowhead--err": e.error
|
|
71
|
+
}]) }, [s("button", {
|
|
72
|
+
type: "button",
|
|
73
|
+
class: "jl__row",
|
|
74
|
+
title: e.error ? `第 ${e.line} 行:JSON 无效` : `第 ${e.line} 行 —— 点击展开`,
|
|
75
|
+
onClick: (t) => B(e.line)
|
|
76
|
+
}, [
|
|
77
|
+
s("span", { class: u(["jl__caret", { "jl__caret--open": I.value.has(e.line) }]) }, "▶", 2),
|
|
78
|
+
s("span", w, h(e.line), 1),
|
|
79
|
+
e.error ? (f(), o("span", T, "无效")) : a("", !0),
|
|
80
|
+
s("span", E, h(W(e)), 1)
|
|
81
|
+
], 8, C), s("button", {
|
|
82
|
+
type: "button",
|
|
83
|
+
class: u(["jl__copy", { "jl__copy--done": V.value === e.line }]),
|
|
84
|
+
title: V.value === e.line ? "已复制" : "复制此行",
|
|
85
|
+
onClick: (t) => U(e)
|
|
86
|
+
}, [c(t, {
|
|
87
|
+
name: V.value === e.line ? "check" : "copy",
|
|
88
|
+
size: 13
|
|
89
|
+
}, null, 8, ["name"])], 10, D)], 2), I.value.has(e.line) ? (f(), o("pre", O, [s("code", {
|
|
90
|
+
class: "hljs",
|
|
91
|
+
innerHTML: G(e)
|
|
92
|
+
}, null, 8, k)])) : a("", !0)]))), 128)),
|
|
93
|
+
R.value ? (f(), o("button", {
|
|
94
|
+
key: 1,
|
|
95
|
+
type: "button",
|
|
96
|
+
class: "jl__more",
|
|
97
|
+
onClick: z
|
|
98
|
+
}, " 显示更多(还有 " + h(R.value) + " 条) ", 1)) : a("", !0)
|
|
99
|
+
])]));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
//#endregion
|
|
103
|
+
export { N as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import e from "../_virtual/_plugin-vue_export-helper.js";
|
|
2
|
+
import t from "./LogViewer.vue_vue_type_script_setup_true_lang.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
//#region src/components/LogViewer.vue
|
|
5
|
+
var n = /*#__PURE__*/ e(t, [["__scopeId", "data-v-b19d397d"]]);
|
|
6
|
+
//#endregion
|
|
7
|
+
export { n as default };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Side-viewer for large text / log files. Fetches the bytes, splits into lines, and renders them with a
|
|
3
|
+
* fixed-height VIRTUAL list — only the visible window (plus a little overscan) is ever in the DOM, so a
|
|
4
|
+
* multi-hundred-MB log scrolls smoothly instead of locking the page (the plain source view would mount one
|
|
5
|
+
* huge highlighted block). No syntax highlight (logs don't need it, and tokenizing 500k lines is infeasible).
|
|
6
|
+
*
|
|
7
|
+
* Routed here for any `.log`, and for any large text file (see FileChip's size gate) so a 50MB `.txt`/`.csv`
|
|
8
|
+
* doesn't freeze the normal viewer. Tools: a sticky line-number gutter, substring search (highlight, match
|
|
9
|
+
* count, prev/next, optional filter-to-matches), go-to-line, plus three log-specific aids:
|
|
10
|
+
*
|
|
11
|
+
* 1. Call-stack folding — error logs from common languages (Java/Kotlin/Scala, JS/Node, Python, C#/.NET,
|
|
12
|
+
* Ruby) are one header line ("Exception in thread…", "Traceback…", "Caused by:") followed by a run of
|
|
13
|
+
* indented frame lines (" at …", ' File "…"', …). We detect those runs, hang a chevron off the header,
|
|
14
|
+
* and collapse the frames behind a "N 帧" badge (collapsed by DEFAULT). A live search force-expands any
|
|
15
|
+
* stack with a hit; filter mode pulls a matched frame's WHOLE stack in (see {@link filtered}).
|
|
16
|
+
* 2. Context expansion (filter mode) — between filtered chunks sits a "⋯ N 行" expander bar; click it to
|
|
17
|
+
* progressively reveal hidden lines around a match (a chunk from the top, from the bottom, or all), the
|
|
18
|
+
* way JetBrains' diff reveals collapsed unchanged regions. Revealed lines are tracked in {@link revealed}.
|
|
19
|
+
* 3. Color rules — user-defined substring/regex rules paint matching lines' background/text (see
|
|
20
|
+
* {@link useLogRules}); applied to visible rows only via {@link styleFor}.
|
|
21
|
+
*/
|
|
22
|
+
type __VLS_Props = {
|
|
23
|
+
url?: string;
|
|
24
|
+
name: string;
|
|
25
|
+
size?: number;
|
|
26
|
+
};
|
|
27
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|