file-viewer3 1.0.26 → 2.0.1
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/README.en.md +7 -377
- package/README.md +8 -352
- package/dist/file-viewer3.css +1 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/package.json +27 -129
- package/dist/components/3MFLoader.js +0 -527
- package/dist/components/AMFLoader.js +0 -188
- package/dist/components/ArchiveViewer.js +0 -526
- package/dist/components/AudioViewer.js +0 -66
- package/dist/components/CadViewer.js +0 -9040
- package/dist/components/CodeViewer.js +0 -151
- package/dist/components/ColladaLoader.js +0 -2282
- package/dist/components/DrawingViewer.js +0 -295
- package/dist/components/EdaViewer.js +0 -630
- package/dist/components/EmailViewer.js +0 -276
- package/dist/components/EpubViewer.js +0 -172
- package/dist/components/FBXLoader.js +0 -1574
- package/dist/components/GLTFLoader.js +0 -1383
- package/dist/components/ImageViewer.js +0 -1519
- package/dist/components/KMZLoader.js +0 -45
- package/dist/components/MarkdownViewer.js +0 -1476
- package/dist/components/ModelViewer.js +0 -797
- package/dist/components/OBJLoader.js +0 -287
- package/dist/components/OfdViewer.js +0 -133
- package/dist/components/PCDLoader.js +0 -141
- package/dist/components/PLYLoader.js +0 -305
- package/dist/components/PdfView.js +0 -27667
- package/dist/components/PptxRender.js +0 -11217
- package/dist/components/STLLoader.js +0 -83
- package/dist/components/TDSLoader.js +0 -228
- package/dist/components/TypstViewer.js +0 -1697
- package/dist/components/USDLoader.js +0 -2526
- package/dist/components/UmdViewer.js +0 -1873
- package/dist/components/VRMLLoader.js +0 -6422
- package/dist/components/VTKLoader.js +0 -337
- package/dist/components/XYZLoader.js +0 -30
- package/dist/components/XlsxTable.js +0 -7879
- package/dist/components/__vite-browser-external.js +0 -7
- package/dist/components/_plugin-vue_export-helper.js +0 -8
- package/dist/components/ar-SA-G6X2FPQ2.js +0 -523
- package/dist/components/arc.js +0 -79
- package/dist/components/architecture-7EHR7CIX.js +0 -3
- package/dist/components/architectureDiagram-3BPJPVTR.js +0 -4096
- package/dist/components/archive.js +0 -24
- package/dist/components/asyncToGenerator.js +0 -29
- package/dist/components/audio.js +0 -19
- package/dist/components/az-AZ-76LH7QW2.js +0 -523
- package/dist/components/bash.js +0 -169
- package/dist/components/bg-BG-XCXSNQG7.js +0 -523
- package/dist/components/blockDiagram-GPEHLZMM.js +0 -3357
- package/dist/components/bn-BD-2XOGV67Q.js +0 -523
- package/dist/components/c4Diagram-AAUBKEIU.js +0 -2957
- package/dist/components/ca-ES-6MX7JW3Y.js +0 -523
- package/dist/components/cad.js +0 -23
- package/dist/components/cfb.js +0 -1174
- package/dist/components/channel.js +0 -5
- package/dist/components/chunk-2J33WTMH.js +0 -26
- package/dist/components/chunk-3OPIFGDE.js +0 -4167
- package/dist/components/chunk-4BX2VUAB.js +0 -19
- package/dist/components/chunk-55IACEB6.js +0 -9
- package/dist/components/chunk-5ZQYHXKU.js +0 -669
- package/dist/components/chunk-6U3AYISY.js +0 -624
- package/dist/components/chunk-727SXJPM.js +0 -3356
- package/dist/components/chunk-AGHRB4JF.js +0 -324
- package/dist/components/chunk-AQP2D5EJ.js +0 -2055
- package/dist/components/chunk-BSJP7CBP.js +0 -83
- package/dist/components/chunk-CSCIHK7Q.js +0 -3500
- package/dist/components/chunk-EIO257PC.js +0 -1836
- package/dist/components/chunk-FMBD7UC4.js +0 -5
- package/dist/components/chunk-K2UTITRG.js +0 -17627
- package/dist/components/chunk-KSCS5N6A.js +0 -572
- package/dist/components/chunk-L5ZTLDWV.js +0 -40
- package/dist/components/chunk-LZXEDZCA.js +0 -60
- package/dist/components/chunk-ND2GUHAM.js +0 -61
- package/dist/components/chunk-NNHCCRGN.js +0 -20425
- package/dist/components/chunk-NZK2D7GU.js +0 -68
- package/dist/components/chunk-O5CBEL6O.js +0 -1894
- package/dist/components/chunk-QZHKN3VN.js +0 -12
- package/dist/components/chunk-SRAX5OIU.js +0 -22
- package/dist/components/chunk-WU5MYG2G.js +0 -14
- package/dist/components/chunk-XPW4576I.js +0 -1146
- package/dist/components/chunk-Z3N5DIM6.js +0 -59
- package/dist/components/chunk-ZUYEQ4TG.js +0 -22
- package/dist/components/chunk.js +0 -23
- package/dist/components/classDiagram-4FO5ZUOK.js +0 -29
- package/dist/components/classDiagram-v2-Q7XG4LA2.js +0 -29
- package/dist/components/compiler.js +0 -2
- package/dist/components/core.js +0 -845
- package/dist/components/cose-bilkent-S5V4N54A.js +0 -2268
- package/dist/components/cpp.js +0 -225
- package/dist/components/cs-CZ-2BRQDIVT.js +0 -523
- package/dist/components/csharp.js +0 -260
- package/dist/components/css.js +0 -140
- package/dist/components/cytoscape.esm.js +0 -18114
- package/dist/components/da-DK-5WZEPLOC.js +0 -523
- package/dist/components/dagre-BM42HDAG.js +0 -325
- package/dist/components/dagre.js +0 -1936
- package/dist/components/de-DE-XR44H4JA.js +0 -523
- package/dist/components/defaultLocale.js +0 -201
- package/dist/components/defineProperty.js +0 -50
- package/dist/components/diagram-2AECGRRQ.js +0 -229
- package/dist/components/diagram-5GNKFQAL.js +0 -108
- package/dist/components/diagram-KO2AKTUF.js +0 -443
- package/dist/components/diagram-LMA3HP47.js +0 -139
- package/dist/components/diagram-OG6HWLK6.js +0 -541
- package/dist/components/diff.js +0 -39
- package/dist/components/directory-open-01563666.js +0 -26
- package/dist/components/directory-open-4ed118d0.js +0 -83
- package/dist/components/dist.js +0 -50
- package/dist/components/dist2.js +0 -3291
- package/dist/components/dist3.js +0 -1593
- package/dist/components/documentSearch.js +0 -378
- package/dist/components/docx-preview.js +0 -3113
- package/dist/components/drawing.js +0 -19
- package/dist/components/ebook.js +0 -16
- package/dist/components/eda.js +0 -20
- package/dist/components/el-GR-BZB4AONW.js +0 -523
- package/dist/components/email.js +0 -21
- package/dist/components/en-B4ZKOASM.js +0 -3
- package/dist/components/erDiagram-TEJ5UH35.js +0 -1719
- package/dist/components/es-ES-U4NZUMDT.js +0 -523
- package/dist/components/eu-ES-A7QVB2H4.js +0 -523
- package/dist/components/eventmodeling-FCH6USID.js +0 -3
- package/dist/components/fa-IR-HGAKTJCU.js +0 -523
- package/dist/components/fflate.module.js +0 -323
- package/dist/components/fi-FI-Z5N7JZ37.js +0 -523
- package/dist/components/file-open-002ab408.js +0 -38
- package/dist/components/file-open-7c801643.js +0 -24
- package/dist/components/file-save-3189631c.js +0 -40
- package/dist/components/file-save-745eba88.js +0 -36
- package/dist/components/flowDiagram-I6XJVG4X.js +0 -4181
- package/dist/components/fr-FR-RHASNOE6.js +0 -523
- package/dist/components/ganttDiagram-6RSMTGT7.js +0 -2182
- package/dist/components/gitGraph-WXDBUCRP.js +0 -3
- package/dist/components/gitGraphDiagram-PVQCEYII.js +0 -788
- package/dist/components/gl-ES-HMX3MZ6V.js +0 -523
- package/dist/components/global-compiler.js +0 -23
- package/dist/components/global-renderer.js +0 -23
- package/dist/components/go.js +0 -140
- package/dist/components/graphlib.js +0 -1267
- package/dist/components/he-IL-6SHJWFNN.js +0 -523
- package/dist/components/hi-IN-IWLTKZ5I.js +0 -523
- package/dist/components/hu-HU-A5ZG7DT2.js +0 -523
- package/dist/components/id-ID-SAP4L64H.js +0 -523
- package/dist/components/image-GAAHSSAO.js +0 -3
- package/dist/components/image-blob-reduce.esm.js +0 -1429
- package/dist/components/image.js +0 -17
- package/dist/components/info-J43DQDTF.js +0 -3
- package/dist/components/infoDiagram-5YYISTIA.js +0 -26
- package/dist/components/ini.js +0 -88
- package/dist/components/init.js +0 -15
- package/dist/components/ishikawaDiagram-YF4QCWOH.js +0 -718
- package/dist/components/it-IT-JPQ66NNP.js +0 -523
- package/dist/components/ja-JP-DBVTYXUO.js +0 -523
- package/dist/components/java.js +0 -169
- package/dist/components/javascript.js +0 -436
- package/dist/components/journeyDiagram-JHISSGLW.js +0 -885
- package/dist/components/json.js +0 -36
- package/dist/components/jszip.min.js +0 -3033
- package/dist/components/kaa-6HZHGXH3.js +0 -523
- package/dist/components/kab-KAB-ZGHBKWFO.js +0 -523
- package/dist/components/kanban-definition-UN3LZRKU.js +0 -986
- package/dist/components/katex.js +0 -21979
- package/dist/components/kk-KZ-P5N5QNE5.js +0 -523
- package/dist/components/km-KH-HSX4SM5Z.js +0 -523
- package/dist/components/ko-KR-MTYHY66A.js +0 -523
- package/dist/components/ku-TR-6OUDTVRD.js +0 -523
- package/dist/components/lib.js +0 -4877
- package/dist/components/libarchive.js +0 -360
- package/dist/components/linear.js +0 -289
- package/dist/components/lt-LT-XHIRWOB4.js +0 -523
- package/dist/components/lv-LV-5QDEKY6T.js +0 -523
- package/dist/components/markdown.js +0 -181
- package/dist/components/md.js +0 -17
- package/dist/components/mermaid-parser.core.js +0 -328
- package/dist/components/mindmap-definition-RKZ34NQL.js +0 -1016
- package/dist/components/model.js +0 -21
- package/dist/components/mp4.js +0 -12
- package/dist/components/mr-IN-CRQNXWMA.js +0 -523
- package/dist/components/my-MM-5M5IBNSE.js +0 -523
- package/dist/components/nb-NO-T6EIAALU.js +0 -523
- package/dist/components/nestedRender.js +0 -158
- package/dist/components/nl-NL-IS3SIHDZ.js +0 -523
- package/dist/components/nn-NO-6E72VCQL.js +0 -523
- package/dist/components/objectSpread2.js +0 -29
- package/dist/components/objectWithoutProperties.js +0 -28
- package/dist/components/oc-FR-POXYY2M6.js +0 -523
- package/dist/components/ofd.js +0 -5261
- package/dist/components/ofd2.js +0 -16
- package/dist/components/ordinal.js +0 -65
- package/dist/components/pa-IN-N4M65BXN.js +0 -523
- package/dist/components/packet-YPE3B663.js +0 -3
- package/dist/components/pdf.js +0 -24
- package/dist/components/percentages-BXMCSKIN.js +0 -3
- package/dist/components/php.js +0 -294
- package/dist/components/pica.js +0 -1009
- package/dist/components/pie-LRSECV5Y.js +0 -3
- package/dist/components/pie.js +0 -47
- package/dist/components/pieDiagram-4H26LBE5.js +0 -130
- package/dist/components/pl-PL-T2D74RX3.js +0 -523
- package/dist/components/postal-mime.js +0 -3146
- package/dist/components/pptx.js +0 -15
- package/dist/components/printLayout.js +0 -42
- package/dist/components/prod.js +0 -21770
- package/dist/components/pt-BR-5N22H2LF.js +0 -523
- package/dist/components/pt-PT-UZXXM6DQ.js +0 -523
- package/dist/components/python.js +0 -238
- package/dist/components/quadrantDiagram-W4KKPZXB.js +0 -1988
- package/dist/components/radar-GUYGQ44K.js +0 -3
- package/dist/components/renderer.js +0 -2
- package/dist/components/requirementDiagram-4Y6WPE33.js +0 -2230
- package/dist/components/ro-RO-JPDTUUEW.js +0 -523
- package/dist/components/rough.esm.js +0 -1355
- package/dist/components/roundRect.js +0 -90
- package/dist/components/ru-RU-B4JR7IUQ.js +0 -523
- package/dist/components/rust.js +0 -169
- package/dist/components/sankeyDiagram-5OEKKPKP.js +0 -972
- package/dist/components/sequenceDiagram-3UESZ5HK.js +0 -4255
- package/dist/components/shared.js +0 -175
- package/dist/components/shared2.js +0 -4
- package/dist/components/si-LK-N5RQ5JYF.js +0 -523
- package/dist/components/sk-SK-C5VTKIMK.js +0 -523
- package/dist/components/sl-SI-NN7IZMDC.js +0 -523
- package/dist/components/sourceLoading.js +0 -134
- package/dist/components/sql.js +0 -118
- package/dist/components/src.js +0 -2664
- package/dist/components/src2.js +0 -10722
- package/dist/components/stateDiagram-AJRCARHV.js +0 -217
- package/dist/components/stateDiagram-v2-BHNVJYJU.js +0 -27
- package/dist/components/subset-shared.chunk.js +0 -3
- package/dist/components/subset-worker.chunk.js +0 -21
- package/dist/components/sv-SE-XGPEYMSR.js +0 -523
- package/dist/components/ta-IN-2NMHFXQM.js +0 -523
- package/dist/components/text.js +0 -20
- package/dist/components/th-TH-HPSO5L25.js +0 -523
- package/dist/components/three.module.js +0 -13134
- package/dist/components/time.js +0 -910
- package/dist/components/timeline-definition-PNZ67QCA.js +0 -1084
- package/dist/components/tr-TR-DEFEU3FU.js +0 -523
- package/dist/components/treeView-BLDUP644.js +0 -3
- package/dist/components/treemap-LRROVOQU.js +0 -3
- package/dist/components/typescript.js +0 -521
- package/dist/components/typst.js +0 -25
- package/dist/components/uk-UA-QMV73CPH.js +0 -523
- package/dist/components/umd.js +0 -16
- package/dist/components/use.js +0 -422
- package/dist/components/util.js +0 -49
- package/dist/components/vennDiagram-CIIHVFJN.js +0 -1880
- package/dist/components/vi-VN-M7AON7JQ.js +0 -523
- package/dist/components/viewerZoom.js +0 -92
- package/dist/components/wardley-L42UT6IY.js +0 -3
- package/dist/components/wardleyDiagram-YWT4CUSO.js +0 -656
- package/dist/components/wasm-pack-shim.js +0 -1711
- package/dist/components/wasm-pack-shim2.js +0 -934
- package/dist/components/wasm.js +0 -97
- package/dist/components/word.js +0 -3055
- package/dist/components/worker-ref.js +0 -16
- package/dist/components/xlsx.js +0 -21
- package/dist/components/xml.js +0 -166
- package/dist/components/xychartDiagram-2RQKCTM6.js +0 -2015
- package/dist/components/yaml.js +0 -144
- package/dist/components/zh-CN-LNUGB5OW.js +0 -523
- package/dist/components/zh-HK-E62DVLB3.js +0 -523
- package/dist/components/zh-TW-RAJ6MFWO.js +0 -523
- package/dist/index.mjs +0 -3293
- package/dist/src/App.vue.d.ts +0 -3
- package/dist/src/compare/CompareApp.vue.d.ts +0 -3
- package/dist/src/compare/main.d.ts +0 -0
- package/dist/src/compare/useSynchronizedScroll.d.ts +0 -7
- package/dist/src/components/HelloWorld.vue.d.ts +0 -3
- package/dist/src/components/utils.d.ts +0 -4
- package/dist/src/main.d.ts +0 -0
- package/dist/src/package/common/printCapability.d.ts +0 -27
- package/dist/src/package/common/printLayout.d.ts +0 -16
- package/dist/src/package/common/sourceLoading.d.ts +0 -10
- package/dist/src/package/common/type.d.ts +0 -544
- package/dist/src/package/common/util.d.ts +0 -5
- package/dist/src/package/common/worker-ref.d.ts +0 -12
- package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +0 -75
- package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +0 -9
- package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +0 -29
- package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +0 -21
- package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +0 -8
- package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +0 -34
- package/dist/src/package/components/FileViewer/index.d.ts +0 -2
- package/dist/src/package/components/FileViewer/util.d.ts +0 -3
- package/dist/src/package/index.d.ts +0 -22
- package/dist/src/package/use/documentLocation.d.ts +0 -15
- package/dist/src/package/use/documentSearch.d.ts +0 -234
- package/dist/src/package/use/index.d.ts +0 -5
- package/dist/src/package/use/loading.d.ts +0 -33
- package/dist/src/package/use/viewerZoom.d.ts +0 -42
- package/dist/src/package/use/worker.d.ts +0 -24
- package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/archive/cache.d.ts +0 -10
- package/dist/src/package/vendors/archive/fallback.d.ts +0 -9
- package/dist/src/package/vendors/archive/index.d.ts +0 -3
- package/dist/src/package/vendors/archive/shared.d.ts +0 -24
- package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/audio/index.d.ts +0 -7
- package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +0 -9
- package/dist/src/package/vendors/cad/index.d.ts +0 -8
- package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/drawing/index.d.ts +0 -7
- package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ebook/index.d.ts +0 -7
- package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/eda/index.d.ts +0 -2
- package/dist/src/package/vendors/eda/parser.d.ts +0 -77
- package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +0 -10
- package/dist/src/package/vendors/email/index.d.ts +0 -2
- package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/image/index.d.ts +0 -4
- package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/md/index.d.ts +0 -4
- package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +0 -8
- package/dist/src/package/vendors/model/index.d.ts +0 -3
- package/dist/src/package/vendors/model/shared.d.ts +0 -1
- package/dist/src/package/vendors/mp4/index.d.ts +0 -4
- package/dist/src/package/vendors/nestedRender.d.ts +0 -10
- package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/ofd/index.d.ts +0 -7
- package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +0 -10
- package/dist/src/package/vendors/pdf/index.d.ts +0 -2
- package/dist/src/package/vendors/pdf/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
- package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +0 -9
- package/dist/src/package/vendors/pptx/index.d.ts +0 -6
- package/dist/src/package/vendors/pptx/options.d.ts +0 -39
- package/dist/src/package/vendors/pptx/support/chart.d.ts +0 -4
- package/dist/src/package/vendors/pptx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/renders.d.ts +0 -3
- package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +0 -7
- package/dist/src/package/vendors/text/index.d.ts +0 -10
- package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +0 -15
- package/dist/src/package/vendors/typst/index.d.ts +0 -8
- package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +0 -6
- package/dist/src/package/vendors/umd/index.d.ts +0 -7
- package/dist/src/package/vendors/umd/parser.d.ts +0 -30
- package/dist/src/package/vendors/word/doc.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.d.ts +0 -5
- package/dist/src/package/vendors/word/docx.worker.d.ts +0 -1
- package/dist/src/package/vendors/word/index.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +0 -80
- package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +0 -25
- package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/index.d.ts +0 -6
- package/dist/src/package/vendors/xlsx/util.d.ts +0 -3
- package/dist/src/package/vendors/xlsx/worker/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +0 -73
- package/dist/src/package/vendors/xlsx/worker/sheetjs/color.d.ts +0 -2
- package/dist/src/package/vendors/xlsx/worker/sheetjs/index.d.ts +0 -4
- package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +0 -1
- package/dist/style.css +0 -1
- package/dist/wasm/cad/dwfv-render.wasm +0 -0
- package/dist/wasm/cad/dwg-worker.js +0 -24
- package/dist/wasm/cad/libredwg-web.js +0 -15
- package/dist/wasm/cad/libredwg-web.wasm +0 -0
|
@@ -1,378 +0,0 @@
|
|
|
1
|
-
import { n as e, t } from "./objectWithoutProperties.js";
|
|
2
|
-
import { n, t as r } from "./objectSpread2.js";
|
|
3
|
-
import { n as i, t as a } from "./asyncToGenerator.js";
|
|
4
|
-
import { computed as o, nextTick as s, onBeforeUnmount as c, reactive as l, shallowRef as u } from "vue";
|
|
5
|
-
//#region src/package/use/documentLocation.ts
|
|
6
|
-
var d = (/* @__PURE__ */ "[data-viewer-anchor-id],.pdfViewer .page,.docx-wrapper section,.docx p,.docx li,.docx table,.markdown-body h1,.markdown-body h2,.markdown-body h3,.markdown-body h4,.markdown-body h5,.markdown-body h6,.markdown-body p,.markdown-body li,.markdown-body pre,.markdown-body table,article h1,article h2,article h3,article h4,article h5,article h6,article p,article li,article pre,article table,pre code,p,li,tr,h1,h2,h3,h4,h5,h6,pre,table".split(",")).join(","), f = [
|
|
7
|
-
".viewer-actions",
|
|
8
|
-
".viewer-watermark",
|
|
9
|
-
".state-panel",
|
|
10
|
-
".pdf-toolbar",
|
|
11
|
-
".pdf-nav-pane",
|
|
12
|
-
".flyfish-search-match"
|
|
13
|
-
].join(","), p = 1200, m = 160, h = (e) => typeof CSS < "u" && typeof CSS.escape == "function" ? CSS.escape(e) : e.replace(/["\\]/g, "\\$&"), g = (e, t = 160) => {
|
|
14
|
-
let n = e.replace(/\s+/g, " ").trim();
|
|
15
|
-
return n.length > t ? `${n.slice(0, t - 1)}…` : n;
|
|
16
|
-
}, _ = (e) => {
|
|
17
|
-
let t = e.getBoundingClientRect();
|
|
18
|
-
return t.width > 0 || t.height > 0;
|
|
19
|
-
}, v = (e) => !!e.closest(f), y = (e) => {
|
|
20
|
-
let t = e.closest("[data-page-number], [data-page]"), n = (t == null ? void 0 : t.dataset.pageNumber) || (t == null ? void 0 : t.dataset.page), r = n ? Number.parseInt(n, 10) : NaN;
|
|
21
|
-
return Number.isFinite(r) ? r : void 0;
|
|
22
|
-
}, b = (e) => e.matches(".pdfViewer .page, [data-page-number], [data-page]") ? "page" : e.matches("p, li, tr, pre, code") ? "line" : "block", x = (e, t) => {
|
|
23
|
-
let n = e.parentElement;
|
|
24
|
-
for (; n;) {
|
|
25
|
-
if (t.has(n)) return !0;
|
|
26
|
-
n = n.parentElement;
|
|
27
|
-
}
|
|
28
|
-
return !1;
|
|
29
|
-
}, S = (e) => {
|
|
30
|
-
if (!e) return [];
|
|
31
|
-
let t = e.getBoundingClientRect(), n = /* @__PURE__ */ new Set(), r = [];
|
|
32
|
-
return Array.from(e.querySelectorAll(d)).forEach((i) => {
|
|
33
|
-
if (v(i) || !_(i)) return;
|
|
34
|
-
let a = g(i.textContent || "", 1e3);
|
|
35
|
-
if (!a || x(i, n) && !i.matches("p, li, tr, pre, code")) return;
|
|
36
|
-
n.add(i);
|
|
37
|
-
let o = i.dataset.viewerAnchorId || `viewer-anchor-${r.length + 1}`;
|
|
38
|
-
i.dataset.viewerAnchorId = o, i.dataset.viewerLine = String(r.length + 1);
|
|
39
|
-
let s = i.getBoundingClientRect();
|
|
40
|
-
r.push({
|
|
41
|
-
id: o,
|
|
42
|
-
index: r.length,
|
|
43
|
-
line: r.length + 1,
|
|
44
|
-
type: b(i),
|
|
45
|
-
label: g(a, 96),
|
|
46
|
-
text: a,
|
|
47
|
-
page: y(i),
|
|
48
|
-
top: s.top - t.top + e.scrollTop,
|
|
49
|
-
left: s.left - t.left + e.scrollLeft,
|
|
50
|
-
width: s.width,
|
|
51
|
-
height: s.height
|
|
52
|
-
});
|
|
53
|
-
}), r;
|
|
54
|
-
}, C = (e, t, n) => {
|
|
55
|
-
if (!e) return null;
|
|
56
|
-
let r = e.closest("[data-viewer-anchor-id]");
|
|
57
|
-
if (r != null && r.dataset.viewerAnchorId) {
|
|
58
|
-
let e = t.find((e) => e.id === r.dataset.viewerAnchorId);
|
|
59
|
-
if (e) return e;
|
|
60
|
-
}
|
|
61
|
-
if (!n) return null;
|
|
62
|
-
let i = n.getBoundingClientRect(), a = e.getBoundingClientRect().top - i.top + n.scrollTop, o = null;
|
|
63
|
-
for (let e of t) {
|
|
64
|
-
if (e.top <= a + 1) {
|
|
65
|
-
o = e;
|
|
66
|
-
continue;
|
|
67
|
-
}
|
|
68
|
-
break;
|
|
69
|
-
}
|
|
70
|
-
return o;
|
|
71
|
-
}, w = (e, t) => {
|
|
72
|
-
if (!e || !t.length) return null;
|
|
73
|
-
let n = e.scrollTop + e.clientHeight * .42, r = t[0];
|
|
74
|
-
for (let e of t) {
|
|
75
|
-
if (e.top <= n) {
|
|
76
|
-
r = e;
|
|
77
|
-
continue;
|
|
78
|
-
}
|
|
79
|
-
break;
|
|
80
|
-
}
|
|
81
|
-
return r;
|
|
82
|
-
}, T = (e, t) => {
|
|
83
|
-
if (!e || t == null) return !1;
|
|
84
|
-
let n = typeof t == "object" ? `[data-viewer-anchor-id="${h(t.id)}"]` : typeof t == "number" ? `[data-viewer-line="${t}"]` : `[data-viewer-anchor-id="${h(t)}"]`, r = e.querySelector(n);
|
|
85
|
-
return r ? (r.scrollIntoView({
|
|
86
|
-
block: "center",
|
|
87
|
-
inline: "nearest"
|
|
88
|
-
}), !0) : typeof t == "object" ? (e.scrollTo({
|
|
89
|
-
top: Math.max(0, t.top - e.clientHeight * .18),
|
|
90
|
-
left: Math.max(0, Math.min(t.left, e.scrollWidth - e.clientWidth)),
|
|
91
|
-
behavior: "smooth"
|
|
92
|
-
}), !0) : !1;
|
|
93
|
-
}, E = (e, t) => {
|
|
94
|
-
var n;
|
|
95
|
-
if (t === !1) return [];
|
|
96
|
-
let r = typeof t == "object" ? t : {};
|
|
97
|
-
if (r.enabled === !1 || r.collectText === !1) return [];
|
|
98
|
-
let i = Math.max(200, r.chunkSize || p), a = Math.max(0, Math.min(i - 1, (n = r.chunkOverlap) == null ? m : n)), o = Math.max(0, r.maxTextLength || 0), s = [];
|
|
99
|
-
return e.forEach((e) => {
|
|
100
|
-
let t = o ? e.text.slice(0, o) : e.text;
|
|
101
|
-
if (!t) return;
|
|
102
|
-
if (t.length <= i) {
|
|
103
|
-
s.push({
|
|
104
|
-
id: `${e.id}-chunk-1`,
|
|
105
|
-
text: t,
|
|
106
|
-
anchor: e,
|
|
107
|
-
startLine: e.line,
|
|
108
|
-
endLine: e.line
|
|
109
|
-
});
|
|
110
|
-
return;
|
|
111
|
-
}
|
|
112
|
-
let n = 0, r = 1;
|
|
113
|
-
for (; n < t.length;) {
|
|
114
|
-
let o = t.slice(n, n + i);
|
|
115
|
-
if (s.push({
|
|
116
|
-
id: `${e.id}-chunk-${r}`,
|
|
117
|
-
text: o,
|
|
118
|
-
anchor: e,
|
|
119
|
-
startLine: e.line,
|
|
120
|
-
endLine: e.line
|
|
121
|
-
}), n + i >= t.length) break;
|
|
122
|
-
n += i - a, r += 1;
|
|
123
|
-
}
|
|
124
|
-
}), s;
|
|
125
|
-
};
|
|
126
|
-
e(), n(), i();
|
|
127
|
-
var D = ["element"], O = "flyfish-search-match", k = "flyfish-search-match--active", A = 1e3, j = [
|
|
128
|
-
"script",
|
|
129
|
-
"style",
|
|
130
|
-
"textarea",
|
|
131
|
-
"input",
|
|
132
|
-
"select",
|
|
133
|
-
"button",
|
|
134
|
-
".viewer-actions",
|
|
135
|
-
".viewer-watermark",
|
|
136
|
-
".state-panel",
|
|
137
|
-
".pdf-toolbar",
|
|
138
|
-
".pdf-nav-pane",
|
|
139
|
-
".flyfish-search-match",
|
|
140
|
-
".textLayer",
|
|
141
|
-
".annotationLayer",
|
|
142
|
-
".xfaLayer",
|
|
143
|
-
"svg",
|
|
144
|
-
"canvas",
|
|
145
|
-
"iframe",
|
|
146
|
-
"video",
|
|
147
|
-
"audio"
|
|
148
|
-
].join(","), M = /* @__PURE__ */ new WeakMap(), N = (e, t) => {
|
|
149
|
-
M.set(e, t), e.__flyfishViewerSearchProvider = t;
|
|
150
|
-
}, P = (e) => {
|
|
151
|
-
e && (M.delete(e), delete e.__flyfishViewerSearchProvider);
|
|
152
|
-
}, F = (e) => e === !1 ? { enabled: !1 } : e === !0 || e === void 0 ? {} : e, I = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&"), L = (e) => e.replace(/\s+/g, " ").trim(), R = (e, t) => {
|
|
153
|
-
let n = t.wholeWord ? `\\b${I(e)}\\b` : I(e);
|
|
154
|
-
return new RegExp(n, t.caseSensitive ? "g" : "gi");
|
|
155
|
-
}, z = (e) => e.map((e) => {
|
|
156
|
-
let { element: n } = e;
|
|
157
|
-
return t(e, D);
|
|
158
|
-
}), B = (e = "") => ({
|
|
159
|
-
query: e,
|
|
160
|
-
total: 0,
|
|
161
|
-
currentIndex: -1,
|
|
162
|
-
current: null,
|
|
163
|
-
matches: []
|
|
164
|
-
}), V = (e) => {
|
|
165
|
-
let t = e.parentNode;
|
|
166
|
-
if (t) {
|
|
167
|
-
for (; e.firstChild;) t.insertBefore(e.firstChild, e);
|
|
168
|
-
t.removeChild(e), t.normalize();
|
|
169
|
-
}
|
|
170
|
-
}, H = (e, t) => {
|
|
171
|
-
let n = e.parentElement;
|
|
172
|
-
return !n || n.closest(j) ? !0 : !t.contains(n) || !e.data.trim();
|
|
173
|
-
}, U = (e) => {
|
|
174
|
-
let t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_TEXT, { acceptNode(t) {
|
|
175
|
-
return H(t, e) ? NodeFilter.FILTER_REJECT : NodeFilter.FILTER_ACCEPT;
|
|
176
|
-
} }), r = n.nextNode();
|
|
177
|
-
for (; r;) t.push(r), r = n.nextNode();
|
|
178
|
-
return t;
|
|
179
|
-
}, W = (e, t, n) => {
|
|
180
|
-
let i = o(() => F(t == null ? void 0 : t())), d = u([]), f = u([]), p = /* @__PURE__ */ new Set(), m = l({
|
|
181
|
-
query: "",
|
|
182
|
-
total: 0,
|
|
183
|
-
currentIndex: -1,
|
|
184
|
-
current: null,
|
|
185
|
-
matches: []
|
|
186
|
-
}), h = null, g = !1, _ = null, v = !1, y = () => {
|
|
187
|
-
let e = z(f.value);
|
|
188
|
-
m.total = e.length, m.currentIndex = e.length ? Math.max(0, Math.min(m.currentIndex, e.length - 1)) : -1, m.current = m.currentIndex >= 0 ? e[m.currentIndex] : null, m.matches = e;
|
|
189
|
-
}, b = (e) => (m.query = e.query, m.total = e.total, m.currentIndex = e.currentIndex, m.current = e.current ? r({}, e.current) : null, m.matches = e.matches.map((e) => r({}, e)), m), x = () => {
|
|
190
|
-
var t;
|
|
191
|
-
let n = (t = e.value) == null ? void 0 : t.querySelector("[data-viewer-search-provider]");
|
|
192
|
-
return n && (M.get(n) || n.__flyfishViewerSearchProvider) || null;
|
|
193
|
-
}, w = function() {
|
|
194
|
-
var e = a(function* (e, t = m.query) {
|
|
195
|
-
var n;
|
|
196
|
-
let r = x();
|
|
197
|
-
return r ? (T(), b((yield e(r)) || ((n = r.getState) == null ? void 0 : n.call(r)) || B(t))) : null;
|
|
198
|
-
});
|
|
199
|
-
return function(t) {
|
|
200
|
-
return e.apply(this, arguments);
|
|
201
|
-
};
|
|
202
|
-
}(), T = () => {
|
|
203
|
-
Array.from(p).forEach(V), p.clear(), f.value = [], m.total = 0, m.currentIndex = -1, m.current = null, m.matches = [];
|
|
204
|
-
}, E = () => {
|
|
205
|
-
h == null || h.disconnect(), h = null;
|
|
206
|
-
}, D = () => {
|
|
207
|
-
E(), !(!g || !e.value || typeof MutationObserver > "u") && (h = new MutationObserver(K), h.observe(e.value, {
|
|
208
|
-
childList: !0,
|
|
209
|
-
subtree: !0,
|
|
210
|
-
characterData: !0
|
|
211
|
-
}));
|
|
212
|
-
}, j = () => {
|
|
213
|
-
!g || typeof window > "u" || window.setTimeout(D, 0);
|
|
214
|
-
}, N = (e) => {
|
|
215
|
-
if (Math.max(0, e.scrollHeight - e.clientHeight) <= 2) return !1;
|
|
216
|
-
if (typeof window > "u") return !0;
|
|
217
|
-
let t = window.getComputedStyle(e), n = t.overflowY || t.overflow;
|
|
218
|
-
return [
|
|
219
|
-
"auto",
|
|
220
|
-
"scroll",
|
|
221
|
-
"overlay",
|
|
222
|
-
"visible"
|
|
223
|
-
].includes(n);
|
|
224
|
-
}, P = (t) => {
|
|
225
|
-
let r = e.value, i = n == null ? void 0 : n();
|
|
226
|
-
if (i && (i === t || i.contains(t))) return i;
|
|
227
|
-
let a = t.parentElement;
|
|
228
|
-
for (; a;) {
|
|
229
|
-
if (N(a)) return a;
|
|
230
|
-
if (a === r) break;
|
|
231
|
-
a = a.parentElement;
|
|
232
|
-
}
|
|
233
|
-
return r;
|
|
234
|
-
}, I = (e) => {
|
|
235
|
-
let t = P(e);
|
|
236
|
-
if (!t) {
|
|
237
|
-
e.scrollIntoView({
|
|
238
|
-
block: "center",
|
|
239
|
-
inline: "nearest"
|
|
240
|
-
});
|
|
241
|
-
return;
|
|
242
|
-
}
|
|
243
|
-
let n = t.scrollLeft, r = t.getBoundingClientRect(), i = e.getBoundingClientRect(), a = i.top - r.top + t.scrollTop - t.clientHeight / 2 + i.height / 2, o = Math.max(0, t.scrollHeight - t.clientHeight);
|
|
244
|
-
t.scrollTo({
|
|
245
|
-
top: Math.max(0, Math.min(a, o)),
|
|
246
|
-
left: n,
|
|
247
|
-
behavior: "auto"
|
|
248
|
-
}), t.scrollLeft = n;
|
|
249
|
-
}, H = (e, t = !0) => {
|
|
250
|
-
let n = f.value;
|
|
251
|
-
if (!n.length) return y(), m;
|
|
252
|
-
let r = (e % n.length + n.length) % n.length;
|
|
253
|
-
n.forEach((e) => {
|
|
254
|
-
e.element.classList.remove(i.value.activeClassName || k);
|
|
255
|
-
});
|
|
256
|
-
let a = n[r];
|
|
257
|
-
return a.element.classList.add(i.value.activeClassName || k), m.currentIndex = r, y(), t && I(a.element), m;
|
|
258
|
-
}, W = (t, n, r, a) => {
|
|
259
|
-
var o;
|
|
260
|
-
let s = t.data, c = 0, l, u = document.createDocumentFragment(), f = !1;
|
|
261
|
-
for (n.lastIndex = 0; (l = n.exec(s)) && a.length < r;) {
|
|
262
|
-
if (!l[0]) {
|
|
263
|
-
n.lastIndex += 1;
|
|
264
|
-
continue;
|
|
265
|
-
}
|
|
266
|
-
l.index > c && u.appendChild(document.createTextNode(s.slice(c, l.index)));
|
|
267
|
-
let r = document.createElement("mark");
|
|
268
|
-
r.className = i.value.className || O, r.textContent = l[0], r.dataset.searchMatchId = `viewer-search-match-${a.length + 1}`, p.add(r), u.appendChild(r), f = !0;
|
|
269
|
-
let o = C(t.parentElement, d.value, e.value);
|
|
270
|
-
a.push({
|
|
271
|
-
id: r.dataset.searchMatchId,
|
|
272
|
-
index: a.length,
|
|
273
|
-
text: l[0],
|
|
274
|
-
anchor: o,
|
|
275
|
-
line: o == null ? void 0 : o.line,
|
|
276
|
-
page: o == null ? void 0 : o.page,
|
|
277
|
-
element: r
|
|
278
|
-
}), c = l.index + l[0].length;
|
|
279
|
-
}
|
|
280
|
-
f && (c < s.length && u.appendChild(document.createTextNode(s.slice(c))), (o = t.parentNode) == null || o.replaceChild(u, t));
|
|
281
|
-
}, G = function() {
|
|
282
|
-
var t = a(function* (t, n = 0) {
|
|
283
|
-
let r = L(t);
|
|
284
|
-
m.query = r, E(), v = !0;
|
|
285
|
-
try {
|
|
286
|
-
if (T(), !r || i.value.enabled === !1 || !e.value) return (yield w((e) => {
|
|
287
|
-
var t;
|
|
288
|
-
return (t = e.clear) == null ? void 0 : t.call(e);
|
|
289
|
-
}, r)) || m;
|
|
290
|
-
let t = yield w((e) => e.search(r, i.value), r);
|
|
291
|
-
if (t) return t;
|
|
292
|
-
yield s(), d.value = S(e.value);
|
|
293
|
-
let a = R(r, i.value), o = Math.max(1, i.value.maxMatches || A), c = [], l = U(e.value);
|
|
294
|
-
for (let e of l) {
|
|
295
|
-
if (c.length >= o) break;
|
|
296
|
-
W(e, a, o, c);
|
|
297
|
-
}
|
|
298
|
-
f.value = c, y(), c.length && H(n, !0);
|
|
299
|
-
} finally {
|
|
300
|
-
v = !1, j();
|
|
301
|
-
}
|
|
302
|
-
return m;
|
|
303
|
-
});
|
|
304
|
-
return function(e) {
|
|
305
|
-
return t.apply(this, arguments);
|
|
306
|
-
};
|
|
307
|
-
}(), K = () => {
|
|
308
|
-
var e;
|
|
309
|
-
!m.query || v || i.value.enabled === !1 || (_ !== null && window.clearTimeout(_), _ = window.setTimeout(() => {
|
|
310
|
-
_ = null, G(m.query, Math.max(0, m.currentIndex));
|
|
311
|
-
}, (e = i.value.debounce) == null ? 180 : e));
|
|
312
|
-
}, q = () => {
|
|
313
|
-
g = !0, D();
|
|
314
|
-
}, J = function() {
|
|
315
|
-
var t = a(function* () {
|
|
316
|
-
return yield s(), d.value = S(e.value), d.value;
|
|
317
|
-
});
|
|
318
|
-
return function() {
|
|
319
|
-
return t.apply(this, arguments);
|
|
320
|
-
};
|
|
321
|
-
}(), Y = function() {
|
|
322
|
-
var e = a(function* (e) {
|
|
323
|
-
return G(e, 0);
|
|
324
|
-
});
|
|
325
|
-
return function(t) {
|
|
326
|
-
return e.apply(this, arguments);
|
|
327
|
-
};
|
|
328
|
-
}(), X = function() {
|
|
329
|
-
var e = a(function* () {
|
|
330
|
-
return (yield w((e) => {
|
|
331
|
-
var t, n;
|
|
332
|
-
return ((t = e.next) == null ? void 0 : t.call(e)) || ((n = e.getState) == null ? void 0 : n.call(e));
|
|
333
|
-
})) || H(m.currentIndex + 1);
|
|
334
|
-
});
|
|
335
|
-
return function() {
|
|
336
|
-
return e.apply(this, arguments);
|
|
337
|
-
};
|
|
338
|
-
}(), Z = function() {
|
|
339
|
-
var e = a(function* () {
|
|
340
|
-
return (yield w((e) => {
|
|
341
|
-
var t, n;
|
|
342
|
-
return ((t = e.previous) == null ? void 0 : t.call(e)) || ((n = e.getState) == null ? void 0 : n.call(e));
|
|
343
|
-
})) || H(m.currentIndex - 1);
|
|
344
|
-
});
|
|
345
|
-
return function() {
|
|
346
|
-
return e.apply(this, arguments);
|
|
347
|
-
};
|
|
348
|
-
}(), Q = function() {
|
|
349
|
-
var e = a(function* () {
|
|
350
|
-
m.query = "", E(), v = !0;
|
|
351
|
-
try {
|
|
352
|
-
return T(), (yield w((e) => {
|
|
353
|
-
var t;
|
|
354
|
-
return (t = e.clear) == null ? void 0 : t.call(e);
|
|
355
|
-
}, "")) || m;
|
|
356
|
-
} finally {
|
|
357
|
-
v = !1, j();
|
|
358
|
-
}
|
|
359
|
-
});
|
|
360
|
-
return function() {
|
|
361
|
-
return e.apply(this, arguments);
|
|
362
|
-
};
|
|
363
|
-
}();
|
|
364
|
-
return c(() => {
|
|
365
|
-
g = !1, E(), _ !== null && (window.clearTimeout(_), _ = null), T();
|
|
366
|
-
}), {
|
|
367
|
-
anchors: d,
|
|
368
|
-
state: m,
|
|
369
|
-
observe: q,
|
|
370
|
-
refreshAnchors: J,
|
|
371
|
-
search: Y,
|
|
372
|
-
next: X,
|
|
373
|
-
previous: Z,
|
|
374
|
-
clear: Q
|
|
375
|
-
};
|
|
376
|
-
};
|
|
377
|
-
//#endregion
|
|
378
|
-
export { w as a, E as i, P as n, T as o, W as r, N as t };
|