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.
Files changed (370) hide show
  1. package/LICENSE +160 -0
  2. package/README.en.md +390 -0
  3. package/README.md +306 -89
  4. package/dist/components/3MFLoader.js +527 -0
  5. package/dist/components/AMFLoader.js +188 -0
  6. package/dist/components/ArchiveViewer.js +526 -0
  7. package/dist/components/AudioViewer.js +66 -0
  8. package/dist/components/CadViewer.js +9040 -0
  9. package/dist/components/CodeViewer.js +151 -0
  10. package/dist/components/ColladaLoader.js +2282 -0
  11. package/dist/components/DrawingViewer.js +295 -0
  12. package/dist/components/EdaViewer.js +630 -0
  13. package/dist/components/EmailViewer.js +276 -0
  14. package/dist/components/EpubViewer.js +172 -0
  15. package/dist/components/FBXLoader.js +1574 -0
  16. package/dist/components/GLTFLoader.js +1383 -0
  17. package/dist/components/ImageViewer.js +1516 -1895
  18. package/dist/components/KMZLoader.js +45 -0
  19. package/dist/components/MarkdownViewer.js +1456 -1557
  20. package/dist/components/ModelViewer.js +797 -0
  21. package/dist/components/OBJLoader.js +287 -0
  22. package/dist/components/OfdViewer.js +133 -0
  23. package/dist/components/PCDLoader.js +141 -0
  24. package/dist/components/PLYLoader.js +305 -0
  25. package/dist/components/PdfView.js +27662 -21655
  26. package/dist/components/PptxRender.js +11170 -21118
  27. package/dist/components/STLLoader.js +83 -0
  28. package/dist/components/TDSLoader.js +228 -0
  29. package/dist/components/TypstViewer.js +1697 -0
  30. package/dist/components/USDLoader.js +2526 -0
  31. package/dist/components/UmdViewer.js +1873 -0
  32. package/dist/components/VRMLLoader.js +6422 -0
  33. package/dist/components/VTKLoader.js +337 -0
  34. package/dist/components/XYZLoader.js +30 -0
  35. package/dist/components/XlsxTable.js +7871 -69873
  36. package/dist/components/__vite-browser-external.js +7 -0
  37. package/dist/components/_plugin-vue_export-helper.js +8 -0
  38. package/dist/components/ar-SA-G6X2FPQ2.js +523 -0
  39. package/dist/components/arc.js +79 -0
  40. package/dist/components/architecture-7EHR7CIX.js +3 -0
  41. package/dist/components/architectureDiagram-3BPJPVTR.js +4096 -0
  42. package/dist/components/archive.js +24 -0
  43. package/dist/components/asyncToGenerator.js +29 -0
  44. package/dist/components/audio.js +19 -0
  45. package/dist/components/az-AZ-76LH7QW2.js +523 -0
  46. package/dist/components/bash.js +169 -0
  47. package/dist/components/bg-BG-XCXSNQG7.js +523 -0
  48. package/dist/components/blockDiagram-GPEHLZMM.js +3357 -0
  49. package/dist/components/bn-BD-2XOGV67Q.js +523 -0
  50. package/dist/components/c4Diagram-AAUBKEIU.js +2957 -0
  51. package/dist/components/ca-ES-6MX7JW3Y.js +523 -0
  52. package/dist/components/cad.js +23 -0
  53. package/dist/components/cfb.js +1174 -0
  54. package/dist/components/channel.js +5 -0
  55. package/dist/components/chunk-2J33WTMH.js +26 -0
  56. package/dist/components/chunk-3OPIFGDE.js +4167 -0
  57. package/dist/components/chunk-4BX2VUAB.js +19 -0
  58. package/dist/components/chunk-55IACEB6.js +9 -0
  59. package/dist/components/chunk-5ZQYHXKU.js +669 -0
  60. package/dist/components/chunk-6U3AYISY.js +624 -0
  61. package/dist/components/chunk-727SXJPM.js +3356 -0
  62. package/dist/components/chunk-AGHRB4JF.js +324 -0
  63. package/dist/components/chunk-AQP2D5EJ.js +2055 -0
  64. package/dist/components/chunk-BSJP7CBP.js +83 -0
  65. package/dist/components/chunk-CSCIHK7Q.js +3500 -0
  66. package/dist/components/chunk-EIO257PC.js +1836 -0
  67. package/dist/components/chunk-FMBD7UC4.js +5 -0
  68. package/dist/components/chunk-K2UTITRG.js +17627 -0
  69. package/dist/components/chunk-KSCS5N6A.js +572 -0
  70. package/dist/components/chunk-L5ZTLDWV.js +40 -0
  71. package/dist/components/chunk-LZXEDZCA.js +60 -0
  72. package/dist/components/chunk-ND2GUHAM.js +61 -0
  73. package/dist/components/chunk-NNHCCRGN.js +20425 -0
  74. package/dist/components/chunk-NZK2D7GU.js +68 -0
  75. package/dist/components/chunk-O5CBEL6O.js +1894 -0
  76. package/dist/components/chunk-QZHKN3VN.js +12 -0
  77. package/dist/components/chunk-SRAX5OIU.js +22 -0
  78. package/dist/components/chunk-WU5MYG2G.js +14 -0
  79. package/dist/components/chunk-XPW4576I.js +1146 -0
  80. package/dist/components/chunk-Z3N5DIM6.js +59 -0
  81. package/dist/components/chunk-ZUYEQ4TG.js +22 -0
  82. package/dist/components/chunk.js +23 -0
  83. package/dist/components/classDiagram-4FO5ZUOK.js +29 -0
  84. package/dist/components/classDiagram-v2-Q7XG4LA2.js +29 -0
  85. package/dist/components/compiler.js +2 -0
  86. package/dist/components/core.js +845 -0
  87. package/dist/components/cose-bilkent-S5V4N54A.js +2268 -0
  88. package/dist/components/cpp.js +225 -0
  89. package/dist/components/cs-CZ-2BRQDIVT.js +523 -0
  90. package/dist/components/csharp.js +260 -0
  91. package/dist/components/css.js +140 -0
  92. package/dist/components/cytoscape.esm.js +18114 -0
  93. package/dist/components/da-DK-5WZEPLOC.js +523 -0
  94. package/dist/components/dagre-BM42HDAG.js +325 -0
  95. package/dist/components/dagre.js +1936 -0
  96. package/dist/components/de-DE-XR44H4JA.js +523 -0
  97. package/dist/components/defaultLocale.js +201 -0
  98. package/dist/components/defineProperty.js +50 -0
  99. package/dist/components/diagram-2AECGRRQ.js +229 -0
  100. package/dist/components/diagram-5GNKFQAL.js +108 -0
  101. package/dist/components/diagram-KO2AKTUF.js +443 -0
  102. package/dist/components/diagram-LMA3HP47.js +139 -0
  103. package/dist/components/diagram-OG6HWLK6.js +541 -0
  104. package/dist/components/diff.js +39 -0
  105. package/dist/components/directory-open-01563666.js +26 -0
  106. package/dist/components/directory-open-4ed118d0.js +83 -0
  107. package/dist/components/dist.js +50 -0
  108. package/dist/components/dist2.js +3291 -0
  109. package/dist/components/dist3.js +1593 -0
  110. package/dist/components/documentSearch.js +378 -0
  111. package/dist/components/docx-preview.js +3113 -0
  112. package/dist/components/drawing.js +19 -0
  113. package/dist/components/ebook.js +16 -0
  114. package/dist/components/eda.js +20 -0
  115. package/dist/components/el-GR-BZB4AONW.js +523 -0
  116. package/dist/components/email.js +21 -0
  117. package/dist/components/en-B4ZKOASM.js +3 -0
  118. package/dist/components/erDiagram-TEJ5UH35.js +1719 -0
  119. package/dist/components/es-ES-U4NZUMDT.js +523 -0
  120. package/dist/components/eu-ES-A7QVB2H4.js +523 -0
  121. package/dist/components/eventmodeling-FCH6USID.js +3 -0
  122. package/dist/components/fa-IR-HGAKTJCU.js +523 -0
  123. package/dist/components/fflate.module.js +323 -0
  124. package/dist/components/fi-FI-Z5N7JZ37.js +523 -0
  125. package/dist/components/file-open-002ab408.js +38 -0
  126. package/dist/components/file-open-7c801643.js +24 -0
  127. package/dist/components/file-save-3189631c.js +40 -0
  128. package/dist/components/file-save-745eba88.js +36 -0
  129. package/dist/components/flowDiagram-I6XJVG4X.js +4181 -0
  130. package/dist/components/fr-FR-RHASNOE6.js +523 -0
  131. package/dist/components/ganttDiagram-6RSMTGT7.js +2182 -0
  132. package/dist/components/gitGraph-WXDBUCRP.js +3 -0
  133. package/dist/components/gitGraphDiagram-PVQCEYII.js +788 -0
  134. package/dist/components/gl-ES-HMX3MZ6V.js +523 -0
  135. package/dist/components/global-compiler.js +23 -0
  136. package/dist/components/global-renderer.js +23 -0
  137. package/dist/components/go.js +140 -0
  138. package/dist/components/graphlib.js +1267 -0
  139. package/dist/components/he-IL-6SHJWFNN.js +523 -0
  140. package/dist/components/hi-IN-IWLTKZ5I.js +523 -0
  141. package/dist/components/hu-HU-A5ZG7DT2.js +523 -0
  142. package/dist/components/id-ID-SAP4L64H.js +523 -0
  143. package/dist/components/image-GAAHSSAO.js +3 -0
  144. package/dist/components/image-blob-reduce.esm.js +1429 -0
  145. package/dist/components/image.js +17 -0
  146. package/dist/components/info-J43DQDTF.js +3 -0
  147. package/dist/components/infoDiagram-5YYISTIA.js +26 -0
  148. package/dist/components/ini.js +88 -0
  149. package/dist/components/init.js +15 -0
  150. package/dist/components/ishikawaDiagram-YF4QCWOH.js +718 -0
  151. package/dist/components/it-IT-JPQ66NNP.js +523 -0
  152. package/dist/components/ja-JP-DBVTYXUO.js +523 -0
  153. package/dist/components/java.js +169 -0
  154. package/dist/components/javascript.js +436 -0
  155. package/dist/components/journeyDiagram-JHISSGLW.js +885 -0
  156. package/dist/components/json.js +36 -0
  157. package/dist/components/jszip.min.js +3033 -0
  158. package/dist/components/kaa-6HZHGXH3.js +523 -0
  159. package/dist/components/kab-KAB-ZGHBKWFO.js +523 -0
  160. package/dist/components/kanban-definition-UN3LZRKU.js +986 -0
  161. package/dist/components/katex.js +21979 -0
  162. package/dist/components/kk-KZ-P5N5QNE5.js +523 -0
  163. package/dist/components/km-KH-HSX4SM5Z.js +523 -0
  164. package/dist/components/ko-KR-MTYHY66A.js +523 -0
  165. package/dist/components/ku-TR-6OUDTVRD.js +523 -0
  166. package/dist/components/lib.js +4877 -0
  167. package/dist/components/libarchive.js +360 -0
  168. package/dist/components/linear.js +289 -0
  169. package/dist/components/lt-LT-XHIRWOB4.js +523 -0
  170. package/dist/components/lv-LV-5QDEKY6T.js +523 -0
  171. package/dist/components/markdown.js +181 -0
  172. package/dist/components/md.js +17 -0
  173. package/dist/components/mermaid-parser.core.js +328 -0
  174. package/dist/components/mindmap-definition-RKZ34NQL.js +1016 -0
  175. package/dist/components/model.js +21 -0
  176. package/dist/components/mp4.js +12 -0
  177. package/dist/components/mr-IN-CRQNXWMA.js +523 -0
  178. package/dist/components/my-MM-5M5IBNSE.js +523 -0
  179. package/dist/components/nb-NO-T6EIAALU.js +523 -0
  180. package/dist/components/nestedRender.js +158 -0
  181. package/dist/components/nl-NL-IS3SIHDZ.js +523 -0
  182. package/dist/components/nn-NO-6E72VCQL.js +523 -0
  183. package/dist/components/objectSpread2.js +29 -0
  184. package/dist/components/objectWithoutProperties.js +28 -0
  185. package/dist/components/oc-FR-POXYY2M6.js +523 -0
  186. package/dist/components/ofd.js +5261 -0
  187. package/dist/components/ofd2.js +16 -0
  188. package/dist/components/ordinal.js +65 -0
  189. package/dist/components/pa-IN-N4M65BXN.js +523 -0
  190. package/dist/components/packet-YPE3B663.js +3 -0
  191. package/dist/components/pdf.js +24 -0
  192. package/dist/components/percentages-BXMCSKIN.js +3 -0
  193. package/dist/components/php.js +294 -0
  194. package/dist/components/pica.js +1009 -0
  195. package/dist/components/pie-LRSECV5Y.js +3 -0
  196. package/dist/components/pie.js +47 -0
  197. package/dist/components/pieDiagram-4H26LBE5.js +130 -0
  198. package/dist/components/pl-PL-T2D74RX3.js +523 -0
  199. package/dist/components/postal-mime.js +3146 -0
  200. package/dist/components/pptx.js +15 -0
  201. package/dist/components/printLayout.js +42 -0
  202. package/dist/components/prod.js +21770 -0
  203. package/dist/components/pt-BR-5N22H2LF.js +523 -0
  204. package/dist/components/pt-PT-UZXXM6DQ.js +523 -0
  205. package/dist/components/python.js +238 -0
  206. package/dist/components/quadrantDiagram-W4KKPZXB.js +1988 -0
  207. package/dist/components/radar-GUYGQ44K.js +3 -0
  208. package/dist/components/renderer.js +2 -0
  209. package/dist/components/requirementDiagram-4Y6WPE33.js +2230 -0
  210. package/dist/components/ro-RO-JPDTUUEW.js +523 -0
  211. package/dist/components/rough.esm.js +1355 -0
  212. package/dist/components/roundRect.js +90 -0
  213. package/dist/components/ru-RU-B4JR7IUQ.js +523 -0
  214. package/dist/components/rust.js +169 -0
  215. package/dist/components/sankeyDiagram-5OEKKPKP.js +972 -0
  216. package/dist/components/sequenceDiagram-3UESZ5HK.js +4255 -0
  217. package/dist/components/shared.js +175 -0
  218. package/dist/components/shared2.js +4 -0
  219. package/dist/components/si-LK-N5RQ5JYF.js +523 -0
  220. package/dist/components/sk-SK-C5VTKIMK.js +523 -0
  221. package/dist/components/sl-SI-NN7IZMDC.js +523 -0
  222. package/dist/components/sourceLoading.js +134 -0
  223. package/dist/components/sql.js +118 -0
  224. package/dist/components/src.js +2664 -0
  225. package/dist/components/src2.js +10722 -0
  226. package/dist/components/stateDiagram-AJRCARHV.js +217 -0
  227. package/dist/components/stateDiagram-v2-BHNVJYJU.js +27 -0
  228. package/dist/components/subset-shared.chunk.js +3 -0
  229. package/dist/components/subset-worker.chunk.js +21 -0
  230. package/dist/components/sv-SE-XGPEYMSR.js +523 -0
  231. package/dist/components/ta-IN-2NMHFXQM.js +523 -0
  232. package/dist/components/text.js +20 -0
  233. package/dist/components/th-TH-HPSO5L25.js +523 -0
  234. package/dist/components/three.module.js +13134 -0
  235. package/dist/components/time.js +910 -0
  236. package/dist/components/timeline-definition-PNZ67QCA.js +1084 -0
  237. package/dist/components/tr-TR-DEFEU3FU.js +523 -0
  238. package/dist/components/treeView-BLDUP644.js +3 -0
  239. package/dist/components/treemap-LRROVOQU.js +3 -0
  240. package/dist/components/typescript.js +521 -0
  241. package/dist/components/typst.js +25 -0
  242. package/dist/components/uk-UA-QMV73CPH.js +523 -0
  243. package/dist/components/umd.js +16 -0
  244. package/dist/components/use.js +422 -0
  245. package/dist/components/util.js +49 -0
  246. package/dist/components/vennDiagram-CIIHVFJN.js +1880 -0
  247. package/dist/components/vi-VN-M7AON7JQ.js +523 -0
  248. package/dist/components/viewerZoom.js +92 -0
  249. package/dist/components/wardley-L42UT6IY.js +3 -0
  250. package/dist/components/wardleyDiagram-YWT4CUSO.js +656 -0
  251. package/dist/components/wasm-pack-shim.js +1711 -0
  252. package/dist/components/wasm-pack-shim2.js +934 -0
  253. package/dist/components/wasm.js +97 -0
  254. package/dist/components/word.js +3055 -0
  255. package/dist/components/worker-ref.js +15 -20
  256. package/dist/components/xlsx.js +21 -0
  257. package/dist/components/xml.js +166 -0
  258. package/dist/components/xychartDiagram-2RQKCTM6.js +2015 -0
  259. package/dist/components/yaml.js +144 -0
  260. package/dist/components/zh-CN-LNUGB5OW.js +523 -0
  261. package/dist/components/zh-HK-E62DVLB3.js +523 -0
  262. package/dist/components/zh-TW-RAJ6MFWO.js +523 -0
  263. package/dist/file-viewer3.css +2 -0
  264. package/dist/index.mjs +3292 -5
  265. package/dist/src/App.vue.d.ts +3 -0
  266. package/dist/src/compare/CompareApp.vue.d.ts +3 -0
  267. package/dist/src/compare/main.d.ts +0 -0
  268. package/dist/src/compare/useSynchronizedScroll.d.ts +7 -0
  269. package/dist/src/components/HelloWorld.vue.d.ts +3 -0
  270. package/dist/src/components/utils.d.ts +4 -0
  271. package/dist/src/main.d.ts +0 -0
  272. package/dist/src/package/common/printCapability.d.ts +27 -0
  273. package/dist/src/package/common/printLayout.d.ts +16 -0
  274. package/dist/src/package/common/sourceLoading.d.ts +10 -0
  275. package/dist/src/package/common/type.d.ts +522 -8
  276. package/dist/src/package/common/worker-ref.d.ts +1 -1
  277. package/dist/src/package/components/FileViewer/FileViewer.vue.d.ts +74 -24
  278. package/dist/src/package/components/FileViewer/exportDocumentTemplate.d.ts +9 -0
  279. package/dist/src/package/components/FileViewer/hooks/useViewerDocumentFeatures.d.ts +29 -0
  280. package/dist/src/package/components/FileViewer/hooks/useViewerExport.d.ts +21 -0
  281. package/dist/src/package/components/FileViewer/hooks/useViewerWatermark.d.ts +8 -0
  282. package/dist/src/package/components/FileViewer/hooks/useViewerZoom.d.ts +34 -0
  283. package/dist/src/package/components/FileViewer/index.d.ts +1 -1
  284. package/dist/src/package/components/FileViewer/util.d.ts +2 -1
  285. package/dist/src/package/index.d.ts +14 -4
  286. package/dist/src/package/use/documentLocation.d.ts +15 -0
  287. package/dist/src/package/use/documentSearch.d.ts +234 -0
  288. package/dist/src/package/use/index.d.ts +4 -0
  289. package/dist/src/package/use/loading.d.ts +33 -0
  290. package/dist/src/package/use/viewerZoom.d.ts +42 -0
  291. package/dist/src/package/use/worker.d.ts +2 -2
  292. package/dist/src/package/vendors/archive/ArchiveViewer.vue.d.ts +9 -0
  293. package/dist/src/package/vendors/archive/cache.d.ts +10 -0
  294. package/dist/src/package/vendors/archive/fallback.d.ts +9 -0
  295. package/dist/src/package/vendors/archive/index.d.ts +3 -0
  296. package/dist/src/package/vendors/archive/shared.d.ts +24 -0
  297. package/dist/src/package/vendors/audio/AudioViewer.vue.d.ts +7 -0
  298. package/dist/src/package/vendors/audio/index.d.ts +7 -0
  299. package/dist/src/package/vendors/cad/CadViewer.vue.d.ts +9 -0
  300. package/dist/src/package/vendors/cad/index.d.ts +8 -0
  301. package/dist/src/package/vendors/drawing/DrawingViewer.vue.d.ts +15 -0
  302. package/dist/src/package/vendors/drawing/index.d.ts +7 -0
  303. package/dist/src/package/vendors/ebook/EpubViewer.vue.d.ts +6 -0
  304. package/dist/src/package/vendors/ebook/index.d.ts +7 -0
  305. package/dist/src/package/vendors/eda/EdaViewer.vue.d.ts +8 -0
  306. package/dist/src/package/vendors/eda/index.d.ts +2 -0
  307. package/dist/src/package/vendors/eda/parser.d.ts +77 -0
  308. package/dist/src/package/vendors/email/EmailViewer.vue.d.ts +10 -0
  309. package/dist/src/package/vendors/email/index.d.ts +2 -0
  310. package/dist/src/package/vendors/image/ImageViewer.vue.d.ts +6 -13
  311. package/dist/src/package/vendors/image/index.d.ts +1 -1
  312. package/dist/src/package/vendors/md/MarkdownViewer.vue.d.ts +6 -13
  313. package/dist/src/package/vendors/md/index.d.ts +1 -1
  314. package/dist/src/package/vendors/model/ModelViewer.vue.d.ts +8 -0
  315. package/dist/src/package/vendors/model/index.d.ts +3 -0
  316. package/dist/src/package/vendors/model/shared.d.ts +1 -0
  317. package/dist/src/package/vendors/nestedRender.d.ts +10 -0
  318. package/dist/src/package/vendors/ofd/OfdViewer.vue.d.ts +6 -0
  319. package/dist/src/package/vendors/ofd/index.d.ts +7 -0
  320. package/dist/src/package/vendors/pdf/PdfView.vue.d.ts +10 -13
  321. package/dist/src/package/vendors/pdf/index.d.ts +2 -1
  322. package/dist/src/package/vendors/pdf/worker/pdf.worker.d.ts +0 -0
  323. package/dist/src/package/vendors/pptx/PptxRender.vue.d.ts +9 -81
  324. package/dist/src/package/vendors/pptx/index.d.ts +1 -1
  325. package/dist/src/package/vendors/renders.d.ts +1 -1
  326. package/dist/src/package/vendors/text/CodeViewer.vue.d.ts +7 -13
  327. package/dist/src/package/vendors/text/index.d.ts +6 -2
  328. package/dist/src/package/vendors/typst/TypstViewer.vue.d.ts +15 -0
  329. package/dist/src/package/vendors/typst/index.d.ts +8 -0
  330. package/dist/src/package/vendors/umd/UmdViewer.vue.d.ts +6 -0
  331. package/dist/src/package/vendors/umd/index.d.ts +7 -0
  332. package/dist/src/package/vendors/umd/parser.d.ts +30 -0
  333. package/dist/src/package/vendors/word/doc.d.ts +5 -0
  334. package/dist/src/package/vendors/word/docx.d.ts +5 -0
  335. package/dist/src/package/vendors/word/docx.worker.d.ts +1 -0
  336. package/dist/src/package/vendors/word/index.d.ts +3 -0
  337. package/dist/src/package/vendors/xlsx/XlsxTable.state.d.ts +80 -0
  338. package/dist/src/package/vendors/xlsx/XlsxTable.view.d.ts +25 -0
  339. package/dist/src/package/vendors/xlsx/XlsxTable.vue.d.ts +6 -21
  340. package/dist/src/package/vendors/xlsx/index.d.ts +3 -2
  341. package/dist/src/package/vendors/xlsx/util.d.ts +0 -5
  342. package/dist/src/package/vendors/xlsx/worker/index.d.ts +4 -6
  343. package/dist/src/package/vendors/xlsx/worker/sheetjs/SheetJsModel.d.ts +73 -0
  344. package/dist/src/package/vendors/xlsx/worker/sheetjs/sheet.worker.d.ts +1 -0
  345. package/dist/style.css +1 -57
  346. package/dist/wasm/cad/dwfv-render.wasm +0 -0
  347. package/dist/wasm/cad/dwg-worker.js +24 -0
  348. package/dist/wasm/cad/libredwg-web.js +15 -0
  349. package/dist/wasm/cad/libredwg-web.wasm +0 -0
  350. package/package.json +118 -42
  351. package/.vscode/extensions.json +0 -3
  352. package/dist/components/_commonjs-dynamic-modules.js +0 -6
  353. package/dist/components/_commonjsHelpers.js +0 -36
  354. package/dist/components/docx-preview.min.js +0 -5287
  355. package/dist/components/index.js +0 -1717
  356. package/dist/favicon.ico +0 -0
  357. package/dist/index.umd.js +0 -436
  358. package/dist/src/package/vendors/docx/index.d.ts +0 -4
  359. package/dist/src/package/vendors/xlsx/render.d.ts +0 -6
  360. package/dist/src/package/vendors/xlsx/worker/xls/SheetJsModel.d.ts +0 -36
  361. package/dist/src/package/vendors/xlsx/worker/xlsx/ExcelJsModel.d.ts +0 -39
  362. package/dist/src/package/vendors/xlsx/worker/xlsx/context.d.ts +0 -7
  363. package/dist/src/package/vendors/xlsx/worker/xlsx/index.d.ts +0 -4
  364. package/dist/src/package/vendors/xlsx/worker/xlsx/util.d.ts +0 -10
  365. package/dist/worker/pdf.worker.js +0 -66
  366. package/dist/worker/pptx.worker.js +0 -21
  367. package/dist/worker/sheet.worker.js +0 -38
  368. package/dist/worker/xlsx.worker.js +0 -65
  369. /package/dist/src/package/vendors/xlsx/worker/{xlsx → sheetjs}/color.d.ts +0 -0
  370. /package/dist/src/package/vendors/xlsx/worker/{xls → sheetjs}/index.d.ts +0 -0
@@ -0,0 +1,656 @@
1
+ import { n as e, t } from "./objectSpread2.js";
2
+ import { n, t as r } from "./asyncToGenerator.js";
3
+ import { n as i, r as a } from "./chunk-AGHRB4JF.js";
4
+ import { D as o, H as s, K as c, U as l, a as u, b as d, c as f, v as p, w as m, x as h, y as g } from "./chunk-CSCIHK7Q.js";
5
+ import { i as _ } from "./chunk-5ZQYHXKU.js";
6
+ import { t as v } from "./chunk-WU5MYG2G.js";
7
+ import { t as y } from "./mermaid-parser.core.js";
8
+ import { t as b } from "./chunk-4BX2VUAB.js";
9
+ n(), e();
10
+ var x, S = /* @__PURE__ */ i((e, t) => {
11
+ let n = e <= 1 ? e * 100 : e;
12
+ if (n < 0 || n > 100) throw Error(`${t} must be between 0-1 (decimal) or 0-100 (percentage). Received: ${e}`);
13
+ return n;
14
+ }, "toPercent"), C = /* @__PURE__ */ i((e, t, n) => ({
15
+ x: S(t, `${n} evolution`),
16
+ y: S(e, `${n} visibility`)
17
+ }), "toCoordinates"), w = /* @__PURE__ */ i((e) => {
18
+ if (e) {
19
+ if (e === "+<>") return "bidirectional";
20
+ if (e === "+<") return "backward";
21
+ if (e === "+>") return "forward";
22
+ }
23
+ }, "getFlowFromPort"), T = /* @__PURE__ */ i((e) => {
24
+ if (!(e != null && e.startsWith("+"))) return {};
25
+ let t = /^\+'([^']*)'/.exec(e), n = t == null ? void 0 : t[1];
26
+ return e.includes("<>") ? {
27
+ flow: "bidirectional",
28
+ label: n
29
+ } : e.includes("<") ? {
30
+ flow: "backward",
31
+ label: n
32
+ } : e.includes(">") ? {
33
+ flow: "forward",
34
+ label: n
35
+ } : { label: n };
36
+ }, "extractFlowFromArrow"), E = /* @__PURE__ */ i((e, t) => {
37
+ if (b(e, t), e.size && t.setSize(e.size.width, e.size.height), e.evolution) {
38
+ let n = e.evolution.stages.map((e) => e.secondName ? `${e.name.trim()} / ${e.secondName.trim()}` : e.name.trim()), r = e.evolution.stages.filter((e) => e.boundary !== void 0).map((e) => e.boundary);
39
+ t.updateAxes({
40
+ stages: n,
41
+ stageBoundaries: r
42
+ });
43
+ }
44
+ if (e.anchors.forEach((e) => {
45
+ let n = C(e.visibility, e.evolution, `Anchor "${e.name}"`);
46
+ t.addNode(e.name, e.name, n.x, n.y, "anchor");
47
+ }), e.components.forEach((e) => {
48
+ var n;
49
+ let r = C(e.visibility, e.evolution, `Component "${e.name}"`), i = e.label ? (e.label.negX ? -1 : 1) * e.label.offsetX : void 0, a = e.label ? (e.label.negY ? -1 : 1) * e.label.offsetY : void 0, o = (n = e.decorator) == null ? void 0 : n.strategy;
50
+ t.addNode(e.name, e.name, r.x, r.y, "component", i, a, e.inertia, o);
51
+ }), e.notes.forEach((e) => {
52
+ let n = C(e.visibility, e.evolution, `Note "${e.text}"`);
53
+ t.addNote(e.text, n.x, n.y);
54
+ }), e.pipelines.forEach((e) => {
55
+ let n = t.getNode(e.parent);
56
+ if (!n || typeof n.y != "number") throw Error(`Pipeline "${e.parent}" must reference an existing component with coordinates.`);
57
+ let r = n.y;
58
+ t.startPipeline(e.parent), e.components.forEach((n) => {
59
+ let i = `${e.parent}_${n.name}`, a = n.label ? (n.label.negX ? -1 : 1) * n.label.offsetX : void 0, o = n.label ? (n.label.negY ? -1 : 1) * n.label.offsetY : void 0, s = S(n.evolution, `Pipeline component "${n.name}" evolution`);
60
+ t.addNode(i, n.name, s, r, "pipeline-component", a, o), t.addPipelineComponent(e.parent, i);
61
+ });
62
+ }), e.links.forEach((e) => {
63
+ var n;
64
+ let r = !!e.arrow && (e.arrow.includes("-.->") || e.arrow.includes(".-.")), i = (n = w(e.fromPort)) == null ? w(e.toPort) : n, { flow: a, label: o } = T(e.arrow);
65
+ !i && a && (i = a);
66
+ let s = e.linkLabel, c = o == null ? s : o;
67
+ t.addLink(t.resolveNodeId(e.from), t.resolveNodeId(e.to), r, c, i);
68
+ }), e.evolves.forEach((e) => {
69
+ let n = t.getNode(e.component);
70
+ if ((n == null ? void 0 : n.y) !== void 0) {
71
+ let r = S(e.target, `Evolve target for "${e.component}"`);
72
+ t.addTrend(e.component, r, n.y);
73
+ }
74
+ }), e.annotations.length > 0) {
75
+ let n = e.annotations[0], r = C(n.x, n.y, "Annotations box");
76
+ t.setAnnotationsBox(r.x, r.y);
77
+ }
78
+ e.annotation.forEach((e) => {
79
+ let n = C(e.x, e.y, `Annotation ${e.number}`);
80
+ t.addAnnotation(e.number, [{
81
+ x: n.x,
82
+ y: n.y
83
+ }], e.text);
84
+ }), e.accelerators.forEach((e) => {
85
+ let n = C(e.x, e.y, `Accelerator "${e.name}"`);
86
+ t.addAccelerator(e.name, n.x, n.y);
87
+ }), e.deaccelerators.forEach((e) => {
88
+ let n = C(e.x, e.y, `Deaccelerator "${e.name}"`);
89
+ t.addDeaccelerator(e.name, n.x, n.y);
90
+ });
91
+ }, "populateDb"), D = {
92
+ parser: { yy: void 0 },
93
+ parse: /* @__PURE__ */ i(function() {
94
+ var e = r(function* (e) {
95
+ var t;
96
+ let n = yield y("wardley", e);
97
+ a.debug(n);
98
+ let r = (t = D.parser) == null ? void 0 : t.yy;
99
+ if (!r || typeof r.addNode != "function") throw Error("parser.parser?.yy was not a WardleyDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
100
+ E(n, r);
101
+ });
102
+ return function(t) {
103
+ return e.apply(this, arguments);
104
+ };
105
+ }(), "parse")
106
+ }, O = new (x = class {
107
+ constructor() {
108
+ this.nodes = /* @__PURE__ */ new Map(), this.links = [], this.trends = /* @__PURE__ */ new Map(), this.pipelines = /* @__PURE__ */ new Map(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.axes = {};
109
+ }
110
+ addNode(e) {
111
+ var n, r, i, a;
112
+ let o = (n = this.nodes.get(e.id)) == null ? {
113
+ id: e.id,
114
+ label: e.label
115
+ } : n, s = t(t(t({}, o), e), {}, {
116
+ className: (r = e.className) == null ? o.className : r,
117
+ labelOffsetX: (i = e.labelOffsetX) == null ? o.labelOffsetX : i,
118
+ labelOffsetY: (a = e.labelOffsetY) == null ? o.labelOffsetY : a
119
+ });
120
+ this.nodes.set(e.id, s);
121
+ }
122
+ addLink(e) {
123
+ this.links.push(e);
124
+ }
125
+ addTrend(e) {
126
+ this.trends.set(e.nodeId, e);
127
+ }
128
+ startPipeline(e) {
129
+ this.pipelines.set(e, {
130
+ nodeId: e,
131
+ componentIds: []
132
+ });
133
+ let t = this.nodes.get(e);
134
+ t && (t.isPipelineParent = !0);
135
+ }
136
+ addPipelineComponent(e, t) {
137
+ let n = this.pipelines.get(e);
138
+ n && n.componentIds.push(t);
139
+ let r = this.nodes.get(t);
140
+ r && (r.inPipeline = !0);
141
+ }
142
+ addAnnotation(e) {
143
+ this.annotations.push(e);
144
+ }
145
+ addNote(e) {
146
+ this.notes.push(e);
147
+ }
148
+ addAccelerator(e) {
149
+ this.accelerators.push(e);
150
+ }
151
+ addDeaccelerator(e) {
152
+ this.deaccelerators.push(e);
153
+ }
154
+ setAnnotationsBox(e, t) {
155
+ this.annotationsBox = {
156
+ x: e,
157
+ y: t
158
+ };
159
+ }
160
+ setAxes(e) {
161
+ this.axes = t(t({}, this.axes), e);
162
+ }
163
+ setSize(e, t) {
164
+ this.size = {
165
+ width: e,
166
+ height: t
167
+ };
168
+ }
169
+ getNode(e) {
170
+ return this.nodes.get(e);
171
+ }
172
+ resolveNodeId(e) {
173
+ if (this.nodes.has(e)) return e;
174
+ for (let [t, n] of this.nodes) if (n.label === e) return t;
175
+ return e;
176
+ }
177
+ build() {
178
+ let e = [];
179
+ for (let t of this.nodes.values()) {
180
+ if (typeof t.x != "number" || typeof t.y != "number") throw Error(`Node "${t.label}" is missing coordinates`);
181
+ e.push(t);
182
+ }
183
+ return {
184
+ nodes: e,
185
+ links: [...this.links],
186
+ trends: [...this.trends.values()],
187
+ pipelines: [...this.pipelines.values()],
188
+ annotations: [...this.annotations],
189
+ notes: [...this.notes],
190
+ accelerators: [...this.accelerators],
191
+ deaccelerators: [...this.deaccelerators],
192
+ annotationsBox: this.annotationsBox,
193
+ axes: t({}, this.axes),
194
+ size: this.size
195
+ };
196
+ }
197
+ clear() {
198
+ this.nodes.clear(), this.links = [], this.trends.clear(), this.pipelines.clear(), this.annotations = [], this.notes = [], this.accelerators = [], this.deaccelerators = [], this.annotationsBox = void 0, this.axes = {}, this.size = void 0;
199
+ }
200
+ }, i(x, "WardleyBuilder"), x)();
201
+ function k() {
202
+ return h()["wardley-beta"];
203
+ }
204
+ i(k, "getConfig");
205
+ function A(e, t, n, r, i, a, o, s, c) {
206
+ O.addNode({
207
+ id: e,
208
+ label: t,
209
+ x: n,
210
+ y: r,
211
+ className: i,
212
+ labelOffsetX: a,
213
+ labelOffsetY: o,
214
+ inertia: s,
215
+ sourceStrategy: c
216
+ });
217
+ }
218
+ i(A, "addNode");
219
+ function j(e, t, n = !1, r, i) {
220
+ O.addLink({
221
+ source: e,
222
+ target: t,
223
+ dashed: n,
224
+ label: r,
225
+ flow: i
226
+ });
227
+ }
228
+ i(j, "addLink");
229
+ function M(e, t, n) {
230
+ O.addTrend({
231
+ nodeId: e,
232
+ targetX: t,
233
+ targetY: n
234
+ });
235
+ }
236
+ i(M, "addTrend");
237
+ function N(e, t, n) {
238
+ O.addAnnotation({
239
+ number: e,
240
+ coordinates: t,
241
+ text: n
242
+ });
243
+ }
244
+ i(N, "addAnnotation");
245
+ function P(e, t, n) {
246
+ O.addNote({
247
+ text: e,
248
+ x: t,
249
+ y: n
250
+ });
251
+ }
252
+ i(P, "addNote");
253
+ function F(e, t, n) {
254
+ O.addAccelerator({
255
+ name: e,
256
+ x: t,
257
+ y: n
258
+ });
259
+ }
260
+ i(F, "addAccelerator");
261
+ function I(e, t, n) {
262
+ O.addDeaccelerator({
263
+ name: e,
264
+ x: t,
265
+ y: n
266
+ });
267
+ }
268
+ i(I, "addDeaccelerator");
269
+ function L(e, t) {
270
+ O.setAnnotationsBox(e, t);
271
+ }
272
+ i(L, "setAnnotationsBox");
273
+ function R(e, t) {
274
+ O.setSize(e, t);
275
+ }
276
+ i(R, "setSize");
277
+ function z(e) {
278
+ O.startPipeline(e);
279
+ }
280
+ i(z, "startPipeline");
281
+ function B(e, t) {
282
+ O.addPipelineComponent(e, t);
283
+ }
284
+ i(B, "addPipelineComponent");
285
+ function V(e) {
286
+ O.setAxes(e);
287
+ }
288
+ i(V, "updateAxes");
289
+ function H(e) {
290
+ return O.getNode(e);
291
+ }
292
+ i(H, "getNode");
293
+ function U(e) {
294
+ return O.resolveNodeId(e);
295
+ }
296
+ i(U, "resolveNodeId");
297
+ function W() {
298
+ return O.build();
299
+ }
300
+ i(W, "getWardleyData");
301
+ function G() {
302
+ O.clear(), u();
303
+ }
304
+ i(G, "clear");
305
+ var K = {
306
+ getConfig: k,
307
+ addNode: A,
308
+ addLink: j,
309
+ addTrend: M,
310
+ addAnnotation: N,
311
+ addNote: P,
312
+ addAccelerator: F,
313
+ addDeaccelerator: I,
314
+ setAnnotationsBox: L,
315
+ setSize: R,
316
+ startPipeline: z,
317
+ addPipelineComponent: B,
318
+ updateAxes: V,
319
+ getNode: H,
320
+ resolveNodeId: U,
321
+ getWardleyData: W,
322
+ clear: G,
323
+ setAccTitle: l,
324
+ getAccTitle: g,
325
+ setDiagramTitle: c,
326
+ getDiagramTitle: m,
327
+ getAccDescription: p,
328
+ setAccDescription: s
329
+ }, q = [
330
+ "Genesis",
331
+ "Custom Built",
332
+ "Product",
333
+ "Commodity"
334
+ ], J = /* @__PURE__ */ i(() => {
335
+ var e, t, n, r, i, a, o, s, c, l, u, d, f, p, m, g, _, v, y, b, x, S, C, w, T, E, D, O, k;
336
+ let { themeVariables: A } = h();
337
+ return {
338
+ backgroundColor: (e = (t = (n = A.wardley) == null ? void 0 : n.backgroundColor) == null ? A.background : t) == null ? "#fff" : e,
339
+ axisColor: (r = (i = A.wardley) == null ? void 0 : i.axisColor) == null ? "#000" : r,
340
+ axisTextColor: (a = (o = (s = A.wardley) == null ? void 0 : s.axisTextColor) == null ? A.primaryTextColor : o) == null ? "#222" : a,
341
+ gridColor: (c = (l = A.wardley) == null ? void 0 : l.gridColor) == null ? "rgba(100, 100, 100, 0.2)" : c,
342
+ componentFill: (u = (d = A.wardley) == null ? void 0 : d.componentFill) == null ? "#fff" : u,
343
+ componentStroke: (f = (p = A.wardley) == null ? void 0 : p.componentStroke) == null ? "#000" : f,
344
+ componentLabelColor: (m = (g = (_ = A.wardley) == null ? void 0 : _.componentLabelColor) == null ? A.primaryTextColor : g) == null ? "#222" : m,
345
+ linkStroke: (v = (y = A.wardley) == null ? void 0 : y.linkStroke) == null ? "#000" : v,
346
+ evolutionStroke: (b = (x = A.wardley) == null ? void 0 : x.evolutionStroke) == null ? "#dc3545" : b,
347
+ annotationStroke: (S = (C = A.wardley) == null ? void 0 : C.annotationStroke) == null ? "#000" : S,
348
+ annotationTextColor: (w = (T = (E = A.wardley) == null ? void 0 : E.annotationTextColor) == null ? A.primaryTextColor : T) == null ? "#222" : w,
349
+ annotationFill: (D = (O = (k = A.wardley) == null ? void 0 : k.annotationFill) == null ? A.background : O) == null ? "#fff" : D
350
+ };
351
+ }, "getTheme"), Y = /* @__PURE__ */ i(() => {
352
+ var e, t, n, r, i, a, o, s, c;
353
+ let l = h()["wardley-beta"];
354
+ return {
355
+ width: (e = l == null ? void 0 : l.width) == null ? 900 : e,
356
+ height: (t = l == null ? void 0 : l.height) == null ? 600 : t,
357
+ padding: (n = l == null ? void 0 : l.padding) == null ? 48 : n,
358
+ nodeRadius: (r = l == null ? void 0 : l.nodeRadius) == null ? 6 : r,
359
+ nodeLabelOffset: (i = l == null ? void 0 : l.nodeLabelOffset) == null ? 8 : i,
360
+ axisFontSize: (a = l == null ? void 0 : l.axisFontSize) == null ? 12 : a,
361
+ labelFontSize: (o = l == null ? void 0 : l.labelFontSize) == null ? 10 : o,
362
+ showGrid: (s = l == null ? void 0 : l.showGrid) == null ? !1 : s,
363
+ useMaxWidth: (c = l == null ? void 0 : l.useMaxWidth) == null ? !0 : c
364
+ };
365
+ }, "getConfigValues"), X = {
366
+ parser: D,
367
+ db: K,
368
+ renderer: { draw: /* @__PURE__ */ i((e, t, n, r) => {
369
+ var o, s, c, l, u, d;
370
+ a.debug("Rendering Wardley map\n" + e);
371
+ let p = Y(), m = J(), h = p.nodeRadius * 1.6, g = r.db, _ = g.getWardleyData(), y = g.getDiagramTitle(), b = (o = (s = _.size) == null ? void 0 : s.width) == null ? p.width : o, x = (c = (l = _.size) == null ? void 0 : l.height) == null ? p.height : c, S = v(t);
372
+ S.selectAll("*").remove(), f(S, x, b, p.useMaxWidth), S.attr("viewBox", `0 0 ${b} ${x}`);
373
+ let C = S.append("g").attr("class", "wardley-map"), w = S.append("defs");
374
+ w.append("marker").attr("id", `arrow-${t}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 6).attr("markerHeight", 6).attr("orient", "auto-start-reverse").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", m.evolutionStroke).attr("stroke", "none"), w.append("marker").attr("id", `link-arrow-end-${t}`).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("fill", m.linkStroke).attr("stroke", "none"), w.append("marker").attr("id", `link-arrow-start-${t}`).attr("viewBox", "0 0 10 10").attr("refX", 1).attr("refY", 5).attr("markerWidth", 5).attr("markerHeight", 5).attr("orient", "auto").append("path").attr("d", "M 10 0 L 0 5 L 10 10 z").attr("fill", m.linkStroke).attr("stroke", "none"), C.append("rect").attr("class", "wardley-background").attr("width", b).attr("height", x).attr("fill", m.backgroundColor);
375
+ let T = b - p.padding * 2, E = x - p.padding * 2;
376
+ y && C.append("text").attr("class", "wardley-title").attr("x", b / 2).attr("y", p.padding / 2).attr("fill", m.axisTextColor).attr("font-size", p.axisFontSize * 1.05).attr("font-weight", "bold").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(y);
377
+ let D = /* @__PURE__ */ i((e) => p.padding + e / 100 * T, "projectX"), O = /* @__PURE__ */ i((e) => x - p.padding - e / 100 * E, "projectY"), k = C.append("g").attr("class", "wardley-axes");
378
+ k.append("line").attr("x1", p.padding).attr("x2", b - p.padding).attr("y1", x - p.padding).attr("y2", x - p.padding).attr("stroke", m.axisColor).attr("stroke-width", 1), k.append("line").attr("x1", p.padding).attr("x2", p.padding).attr("y1", p.padding).attr("y2", x - p.padding).attr("stroke", m.axisColor).attr("stroke-width", 1);
379
+ let A = (u = _.axes.xLabel) == null ? "Evolution" : u, j = (d = _.axes.yLabel) == null ? "Visibility" : d;
380
+ k.append("text").attr("class", "wardley-axis-label wardley-axis-label-x").attr("x", p.padding + T / 2).attr("y", x - p.padding / 4).attr("fill", m.axisTextColor).attr("font-size", p.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").text(A), k.append("text").attr("class", "wardley-axis-label wardley-axis-label-y").attr("x", p.padding / 3).attr("y", p.padding + E / 2).attr("fill", m.axisTextColor).attr("font-size", p.axisFontSize).attr("font-weight", "bold").attr("text-anchor", "middle").attr("transform", `rotate(-90 ${p.padding / 3} ${p.padding + E / 2})`).text(j);
381
+ let M = _.axes.stages && _.axes.stages.length > 0 ? _.axes.stages : q;
382
+ if (M.length > 0) {
383
+ let e = C.append("g").attr("class", "wardley-stages"), t = _.axes.stageBoundaries, n = [];
384
+ if (t && t.length === M.length) {
385
+ let e = 0;
386
+ t.forEach((t) => {
387
+ n.push({
388
+ start: e,
389
+ end: t
390
+ }), e = t;
391
+ });
392
+ } else {
393
+ let e = 1 / M.length;
394
+ M.forEach((t, r) => {
395
+ n.push({
396
+ start: r * e,
397
+ end: (r + 1) * e
398
+ });
399
+ });
400
+ }
401
+ M.forEach((t, r) => {
402
+ let i = n[r], a = p.padding + i.start * T, o = (a + (p.padding + i.end * T)) / 2;
403
+ r > 0 && e.append("line").attr("x1", a).attr("x2", a).attr("y1", p.padding).attr("y2", x - p.padding).attr("stroke", "#000").attr("stroke-width", 1).attr("stroke-dasharray", "5 5").attr("opacity", .8), e.append("text").attr("class", "wardley-stage-label").attr("x", o).attr("y", x - p.padding / 1.5).attr("fill", m.axisTextColor).attr("font-size", p.axisFontSize - 2).attr("text-anchor", "middle").text(t);
404
+ });
405
+ }
406
+ if (p.showGrid) {
407
+ let e = C.append("g").attr("class", "wardley-grid");
408
+ for (let t = 1; t < 4; t++) {
409
+ let n = t / 4, r = p.padding + T * n;
410
+ e.append("line").attr("x1", r).attr("x2", r).attr("y1", p.padding).attr("y2", x - p.padding).attr("stroke", m.gridColor).attr("stroke-dasharray", "2 6"), e.append("line").attr("x1", p.padding).attr("x2", b - p.padding).attr("y1", x - p.padding - E * n).attr("y2", x - p.padding - E * n).attr("stroke", m.gridColor).attr("stroke-dasharray", "2 6");
411
+ }
412
+ }
413
+ let N = /* @__PURE__ */ new Map();
414
+ if (_.nodes.forEach((e) => {
415
+ N.set(e.id, {
416
+ x: D(e.x),
417
+ y: O(e.y),
418
+ node: e
419
+ });
420
+ }), _.pipelines.length > 0) {
421
+ let e = C.append("g").attr("class", "wardley-pipelines"), t = C.append("g").attr("class", "wardley-pipeline-links");
422
+ _.pipelines.forEach((n) => {
423
+ if (n.componentIds.length === 0) return;
424
+ let r = n.componentIds.map((e) => ({
425
+ id: e,
426
+ pos: N.get(e),
427
+ node: _.nodes.find((t) => t.id === e)
428
+ })).filter((e) => e.pos && e.node).sort((e, t) => e.node.x - t.node.x);
429
+ for (let e = 0; e < r.length - 1; e++) {
430
+ let n = r[e], i = r[e + 1];
431
+ t.append("line").attr("class", "wardley-pipeline-evolution-link").attr("x1", n.pos.x).attr("y1", n.pos.y).attr("x2", i.pos.x).attr("y2", i.pos.y).attr("stroke", m.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4");
432
+ }
433
+ let i = Infinity, a = -Infinity, o = 0;
434
+ if (n.componentIds.forEach((e) => {
435
+ let t = N.get(e);
436
+ t && (i = Math.min(i, t.x), a = Math.max(a, t.x), o = t.y);
437
+ }), i !== Infinity && a !== -Infinity) {
438
+ let t = p.nodeRadius * 4, r = o - t / 2, s = N.get(n.nodeId);
439
+ s && (s.x = (i + a) / 2, s.y = r - h / 6), e.append("rect").attr("class", "wardley-pipeline-box").attr("x", i - 15).attr("y", r).attr("width", a - i + 30).attr("height", t).attr("fill", "none").attr("stroke", m.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
440
+ }
441
+ });
442
+ }
443
+ let P = C.append("g").attr("class", "wardley-links"), F = /* @__PURE__ */ new Map();
444
+ _.pipelines.forEach((e) => {
445
+ F.set(e.nodeId, new Set(e.componentIds));
446
+ });
447
+ let I = _.links.filter((e) => {
448
+ if (!N.has(e.source) || !N.has(e.target)) return !1;
449
+ let t = F.get(e.target);
450
+ return !(t != null && t.has(e.source));
451
+ });
452
+ P.selectAll("line").data(I).enter().append("line").attr("class", (e) => `wardley-link${e.dashed ? " wardley-link--dashed" : ""}`).attr("x1", (e) => {
453
+ let t = N.get(e.source), n = N.get(e.target), r = _.nodes.find((t) => t.id === e.source).isPipelineParent ? h / Math.sqrt(2) : p.nodeRadius, i = n.x - t.x, a = n.y - t.y, o = Math.sqrt(i * i + a * a);
454
+ return t.x + i / o * r;
455
+ }).attr("y1", (e) => {
456
+ let t = N.get(e.source), n = N.get(e.target), r = _.nodes.find((t) => t.id === e.source).isPipelineParent ? h / Math.sqrt(2) : p.nodeRadius, i = n.x - t.x, a = n.y - t.y, o = Math.sqrt(i * i + a * a);
457
+ return t.y + a / o * r;
458
+ }).attr("x2", (e) => {
459
+ let t = N.get(e.source), n = N.get(e.target), r = _.nodes.find((t) => t.id === e.target).isPipelineParent ? h / Math.sqrt(2) : p.nodeRadius, i = t.x - n.x, a = t.y - n.y, o = Math.sqrt(i * i + a * a);
460
+ return n.x + i / o * r;
461
+ }).attr("y2", (e) => {
462
+ let t = N.get(e.source), n = N.get(e.target), r = _.nodes.find((t) => t.id === e.target).isPipelineParent ? h / Math.sqrt(2) : p.nodeRadius, i = t.x - n.x, a = t.y - n.y, o = Math.sqrt(i * i + a * a);
463
+ return n.y + a / o * r;
464
+ }).attr("stroke", m.linkStroke).attr("stroke-width", 1).attr("stroke-dasharray", (e) => e.dashed ? "6 6" : null).attr("marker-end", (e) => e.flow === "forward" || e.flow === "bidirectional" ? `url(#link-arrow-end-${t})` : null).attr("marker-start", (e) => e.flow === "backward" || e.flow === "bidirectional" ? `url(#link-arrow-start-${t})` : null), P.selectAll("text").data(I.filter((e) => e.label)).enter().append("text").attr("class", "wardley-link-label").attr("x", (e) => {
465
+ let t = N.get(e.source), n = N.get(e.target), r = (t.x + n.x) / 2, i = n.y - t.y, a = n.x - t.x;
466
+ return r + i / Math.sqrt(a * a + i * i) * 8;
467
+ }).attr("y", (e) => {
468
+ let t = N.get(e.source), n = N.get(e.target), r = (t.y + n.y) / 2, i = n.x - t.x, a = n.y - t.y, o = Math.sqrt(i * i + a * a);
469
+ return r + -i / o * 8;
470
+ }).attr("fill", m.axisTextColor).attr("font-size", p.labelFontSize).attr("text-anchor", "middle").attr("dominant-baseline", "middle").attr("transform", (e) => {
471
+ let t = N.get(e.source), n = N.get(e.target), r = (t.x + n.x) / 2, i = (t.y + n.y) / 2, a = n.x - t.x, o = n.y - t.y, s = Math.sqrt(a * a + o * o), c = o / s, l = -a / s, u = r + c * 8, d = i + l * 8, f = Math.atan2(o, a) * 180 / Math.PI;
472
+ return (f > 90 || f < -90) && (f += 180), `rotate(${f} ${u} ${d})`;
473
+ }).text((e) => e.label);
474
+ let L = C.append("g").attr("class", "wardley-trends"), R = _.trends.map((e) => {
475
+ let t = N.get(e.nodeId);
476
+ if (!t) return null;
477
+ let n = D(e.targetX), r = O(e.targetY), i = n - t.x, a = r - t.y, o = Math.sqrt(i * i + a * a), s = p.nodeRadius + 2;
478
+ return {
479
+ origin: t,
480
+ targetX: n,
481
+ targetY: r,
482
+ adjustedX2: o > s ? n - i / o * s : n,
483
+ adjustedY2: o > s ? r - a / o * s : r
484
+ };
485
+ }).filter((e) => e !== null);
486
+ L.selectAll("line").data(R).enter().append("line").attr("class", "wardley-trend").attr("x1", (e) => e.origin.x).attr("y1", (e) => e.origin.y).attr("x2", (e) => e.adjustedX2).attr("y2", (e) => e.adjustedY2).attr("stroke", m.evolutionStroke).attr("stroke-width", 1).attr("stroke-dasharray", "4 4").attr("marker-end", `url(#arrow-${t})`);
487
+ let z = C.append("g").attr("class", "wardley-nodes").selectAll("g").data(_.nodes).enter().append("g").attr("class", (e) => ["wardley-node", e.className ? `wardley-node--${e.className}` : ""].filter(Boolean).join(" "));
488
+ z.filter((e) => e.sourceStrategy === "outsource").append("circle").attr("class", "wardley-outsource-overlay").attr("cx", (e) => N.get(e.id).x).attr("cy", (e) => N.get(e.id).y).attr("r", p.nodeRadius * 2).attr("fill", "#666").attr("stroke", m.componentStroke).attr("stroke-width", 1), z.filter((e) => e.sourceStrategy === "buy").append("circle").attr("class", "wardley-buy-overlay").attr("cx", (e) => N.get(e.id).x).attr("cy", (e) => N.get(e.id).y).attr("r", p.nodeRadius * 2).attr("fill", "#ccc").attr("stroke", m.componentStroke).attr("stroke-width", 1), z.filter((e) => e.sourceStrategy === "build").append("circle").attr("class", "wardley-build-overlay").attr("cx", (e) => N.get(e.id).x).attr("cy", (e) => N.get(e.id).y).attr("r", p.nodeRadius * 2).attr("fill", "#eee").attr("stroke", "#000").attr("stroke-width", 1);
489
+ let B = z.filter((e) => e.sourceStrategy === "market");
490
+ B.append("circle").attr("class", "wardley-market-overlay").attr("cx", (e) => N.get(e.id).x).attr("cy", (e) => N.get(e.id).y).attr("r", p.nodeRadius * 2).attr("fill", "white").attr("stroke", m.componentStroke).attr("stroke-width", 1), z.filter((e) => !e.isPipelineParent && e.sourceStrategy !== "market" && e.className !== "anchor").append("circle").attr("cx", (e) => N.get(e.id).x).attr("cy", (e) => N.get(e.id).y).attr("r", p.nodeRadius).attr("fill", m.componentFill).attr("stroke", m.componentStroke).attr("stroke-width", 1);
491
+ let V = p.nodeRadius * .7, H = p.nodeRadius * 1.2;
492
+ if (B.append("line").attr("class", "wardley-market-line").attr("x1", (e) => N.get(e.id).x).attr("y1", (e) => N.get(e.id).y - H).attr("x2", (e) => N.get(e.id).x - H * Math.cos(Math.PI / 6)).attr("y2", (e) => N.get(e.id).y + H * Math.sin(Math.PI / 6)).attr("stroke", m.componentStroke).attr("stroke-width", 1), B.append("line").attr("class", "wardley-market-line").attr("x1", (e) => N.get(e.id).x - H * Math.cos(Math.PI / 6)).attr("y1", (e) => N.get(e.id).y + H * Math.sin(Math.PI / 6)).attr("x2", (e) => N.get(e.id).x + H * Math.cos(Math.PI / 6)).attr("y2", (e) => N.get(e.id).y + H * Math.sin(Math.PI / 6)).attr("stroke", m.componentStroke).attr("stroke-width", 1), B.append("line").attr("class", "wardley-market-line").attr("x1", (e) => N.get(e.id).x + H * Math.cos(Math.PI / 6)).attr("y1", (e) => N.get(e.id).y + H * Math.sin(Math.PI / 6)).attr("x2", (e) => N.get(e.id).x).attr("y2", (e) => N.get(e.id).y - H).attr("stroke", m.componentStroke).attr("stroke-width", 1), B.append("circle").attr("class", "wardley-market-dot").attr("cx", (e) => N.get(e.id).x).attr("cy", (e) => N.get(e.id).y - H).attr("r", V).attr("fill", "white").attr("stroke", m.componentStroke).attr("stroke-width", 2), B.append("circle").attr("class", "wardley-market-dot").attr("cx", (e) => N.get(e.id).x - H * Math.cos(Math.PI / 6)).attr("cy", (e) => N.get(e.id).y + H * Math.sin(Math.PI / 6)).attr("r", V).attr("fill", "white").attr("stroke", m.componentStroke).attr("stroke-width", 2), B.append("circle").attr("class", "wardley-market-dot").attr("cx", (e) => N.get(e.id).x + H * Math.cos(Math.PI / 6)).attr("cy", (e) => N.get(e.id).y + H * Math.sin(Math.PI / 6)).attr("r", V).attr("fill", "white").attr("stroke", m.componentStroke).attr("stroke-width", 2), z.filter((e) => e.isPipelineParent === !0).append("rect").attr("x", (e) => N.get(e.id).x - h / 2).attr("y", (e) => N.get(e.id).y - h / 2).attr("width", h).attr("height", h).attr("fill", m.componentFill).attr("stroke", m.componentStroke).attr("stroke-width", 1), z.filter((e) => e.inertia === !0).append("line").attr("class", "wardley-inertia").attr("x1", (e) => {
493
+ let t = N.get(e.id), n = e.isPipelineParent ? h / 2 + 15 : p.nodeRadius + 15;
494
+ return e.sourceStrategy && (n += p.nodeRadius + 10), t.x + n;
495
+ }).attr("y1", (e) => {
496
+ let t = N.get(e.id), n = e.isPipelineParent ? h : p.nodeRadius * 2;
497
+ return t.y - n / 2;
498
+ }).attr("x2", (e) => {
499
+ let t = N.get(e.id), n = e.isPipelineParent ? h / 2 + 15 : p.nodeRadius + 15;
500
+ return e.sourceStrategy && (n += p.nodeRadius + 10), t.x + n;
501
+ }).attr("y2", (e) => {
502
+ let t = N.get(e.id), n = e.isPipelineParent ? h : p.nodeRadius * 2;
503
+ return t.y + n / 2;
504
+ }).attr("stroke", m.componentStroke).attr("stroke-width", 6), z.append("text").attr("x", (e) => {
505
+ var t;
506
+ let n = N.get(e.id);
507
+ if (e.className === "anchor") return e.labelOffsetX === void 0 ? n.x : n.x + e.labelOffsetX;
508
+ let r = p.nodeLabelOffset;
509
+ e.sourceStrategy && e.labelOffsetX === void 0 && (r += 10);
510
+ let i = (t = e.labelOffsetX) == null ? r : t;
511
+ return n.x + i;
512
+ }).attr("y", (e) => {
513
+ var t;
514
+ let n = N.get(e.id);
515
+ if (e.className === "anchor") return e.labelOffsetY === void 0 ? n.y - 3 : n.y + e.labelOffsetY;
516
+ let r = -p.nodeLabelOffset;
517
+ e.sourceStrategy && e.labelOffsetY === void 0 && (r -= 10);
518
+ let i = (t = e.labelOffsetY) == null ? r : t;
519
+ return n.y + i;
520
+ }).attr("class", "wardley-node-label").attr("fill", (e) => e.className === "evolved" ? m.evolutionStroke : e.className === "anchor" ? "#000" : m.componentLabelColor).attr("font-size", p.labelFontSize).attr("font-weight", (e) => e.className === "anchor" ? "bold" : "normal").attr("text-anchor", (e) => e.className === "anchor" ? "middle" : "start").attr("dominant-baseline", (e) => e.className === "anchor" ? "middle" : "auto").text((e) => e.label), _.annotations.length > 0) {
521
+ let e = C.append("g").attr("class", "wardley-annotations");
522
+ if (_.annotations.forEach((t) => {
523
+ let n = t.coordinates.map((e) => ({
524
+ x: D(e.x),
525
+ y: O(e.y)
526
+ }));
527
+ if (n.length > 1) for (let t = 0; t < n.length - 1; t++) e.append("line").attr("class", "wardley-annotation-line").attr("x1", n[t].x).attr("y1", n[t].y).attr("x2", n[t + 1].x).attr("y2", n[t + 1].y).attr("stroke", m.axisColor).attr("stroke-width", 1.5).attr("stroke-dasharray", "4 4");
528
+ n.forEach((n) => {
529
+ let r = e.append("g").attr("class", "wardley-annotation");
530
+ r.append("circle").attr("cx", n.x).attr("cy", n.y).attr("r", 10).attr("fill", "white").attr("stroke", m.axisColor).attr("stroke-width", 1.5), r.append("text").attr("x", n.x).attr("y", n.y).attr("text-anchor", "middle").attr("dominant-baseline", "central").attr("font-size", 10).attr("fill", m.axisTextColor).attr("font-weight", "bold").text(t.number);
531
+ });
532
+ }), _.annotationsBox) {
533
+ let t = D(_.annotationsBox.x), n = O(_.annotationsBox.y), r = e.append("g").attr("class", "wardley-annotations-box"), i = [..._.annotations].filter((e) => e.text).sort((e, t) => e.number - t.number), a = [];
534
+ if (i.forEach((e, i) => {
535
+ let o = r.append("text").attr("x", t + 10).attr("y", n + 10 + (i + 1) * 16).attr("font-size", 11).attr("fill", m.axisTextColor).attr("text-anchor", "start").attr("dominant-baseline", "middle").text(`${e.number}. ${e.text}`);
536
+ a.push(o);
537
+ }), a.length > 0) {
538
+ let e = 0, o = 0;
539
+ a.forEach((t) => {
540
+ let n = t.node(), r = n.getComputedTextLength();
541
+ e = Math.max(e, r);
542
+ let i = n.getBBox();
543
+ o = Math.max(o, i.height);
544
+ });
545
+ let s = e + 20 + 105, c = i.length * 16 + 20 + o / 2, l = p.padding, u = b - p.padding - s, d = p.padding, f = x - p.padding - c;
546
+ t = Math.max(l, Math.min(t, u)), n = Math.max(d, Math.min(n, f)), a.forEach((e, r) => {
547
+ e.attr("x", t + 10).attr("y", n + 10 + (r + 1) * 16);
548
+ }), r.insert("rect", "text").attr("x", t).attr("y", n).attr("width", s).attr("height", c).attr("fill", "white").attr("stroke", m.axisColor).attr("stroke-width", 1.5).attr("rx", 4).attr("ry", 4);
549
+ }
550
+ }
551
+ }
552
+ if (_.notes.length > 0) {
553
+ let e = C.append("g").attr("class", "wardley-notes");
554
+ _.notes.forEach((t) => {
555
+ let n = D(t.x), r = O(t.y);
556
+ e.append("text").attr("x", n).attr("y", r).attr("text-anchor", "start").attr("font-size", 11).attr("fill", m.axisTextColor).attr("font-weight", "bold").text(t.text);
557
+ });
558
+ }
559
+ if (_.accelerators.length > 0) {
560
+ let e = C.append("g").attr("class", "wardley-accelerators");
561
+ _.accelerators.forEach((t) => {
562
+ let n = D(t.x), r = O(t.y), i = `
563
+ M ${n} ${r - 30 / 2}
564
+ L ${n + 60 - 20} ${r - 30 / 2}
565
+ L ${n + 60 - 20} ${r - 30 / 2 - 8}
566
+ L ${n + 60} ${r}
567
+ L ${n + 60 - 20} ${r + 30 / 2 + 8}
568
+ L ${n + 60 - 20} ${r + 30 / 2}
569
+ L ${n} ${r + 30 / 2}
570
+ Z
571
+ `;
572
+ e.append("path").attr("d", i).attr("fill", "white").attr("stroke", m.componentStroke).attr("stroke-width", 1), e.append("text").attr("x", n + 60 / 2).attr("y", r + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", m.axisTextColor).attr("font-weight", "bold").text(t.name);
573
+ });
574
+ }
575
+ if (_.deaccelerators.length > 0) {
576
+ let e = C.append("g").attr("class", "wardley-deaccelerators");
577
+ _.deaccelerators.forEach((t) => {
578
+ let n = D(t.x), r = O(t.y), i = `
579
+ M ${n + 60} ${r - 30 / 2}
580
+ L ${n + 20} ${r - 30 / 2}
581
+ L ${n + 20} ${r - 30 / 2 - 8}
582
+ L ${n} ${r}
583
+ L ${n + 20} ${r + 30 / 2 + 8}
584
+ L ${n + 20} ${r + 30 / 2}
585
+ L ${n + 60} ${r + 30 / 2}
586
+ Z
587
+ `;
588
+ e.append("path").attr("d", i).attr("fill", "white").attr("stroke", m.componentStroke).attr("stroke-width", 1), e.append("text").attr("x", n + 60 / 2).attr("y", r + 30 / 2 + 15).attr("text-anchor", "middle").attr("font-size", 10).attr("fill", m.axisTextColor).attr("font-weight", "bold").text(t.name);
589
+ });
590
+ }
591
+ }, "draw") },
592
+ styles: /* @__PURE__ */ i(({ wardley: e } = {}) => {
593
+ let t = _(_(o(), d().themeVariables).wardley, e);
594
+ return `
595
+ .wardley-background {
596
+ fill: ${t.backgroundColor};
597
+ }
598
+ .wardley-axes line, .wardley-axes path {
599
+ stroke: ${t.axisColor};
600
+ }
601
+ .wardley-axis-label {
602
+ fill: ${t.axisTextColor};
603
+ }
604
+ .wardley-stage-label {
605
+ fill: ${t.axisTextColor};
606
+ }
607
+ .wardley-grid line {
608
+ stroke: ${t.gridColor};
609
+ }
610
+ .wardley-node circle {
611
+ fill: ${t.componentFill};
612
+ stroke: ${t.componentStroke};
613
+ }
614
+ .wardley-node-label {
615
+ fill: ${t.componentLabelColor};
616
+ }
617
+ .wardley-link {
618
+ stroke: ${t.linkStroke};
619
+ }
620
+ .wardley-link--dashed {
621
+ stroke-dasharray: 4 4;
622
+ }
623
+ .wardley-link-label {
624
+ fill: ${t.axisTextColor};
625
+ }
626
+ .wardley-trend line {
627
+ stroke: ${t.evolutionStroke};
628
+ }
629
+ .wardley-annotation-line {
630
+ stroke: ${t.annotationStroke};
631
+ }
632
+ .wardley-annotation circle {
633
+ fill: ${t.annotationFill};
634
+ stroke: ${t.annotationStroke};
635
+ }
636
+ .wardley-annotation text {
637
+ fill: ${t.annotationTextColor};
638
+ }
639
+ .wardley-annotations-box rect {
640
+ fill: ${t.annotationFill};
641
+ stroke: ${t.annotationStroke};
642
+ }
643
+ .wardley-annotations-box text {
644
+ fill: ${t.annotationTextColor};
645
+ }
646
+ .wardley-pipeline-box {
647
+ stroke: ${t.componentStroke};
648
+ }
649
+ .wardley-notes text {
650
+ fill: ${t.axisTextColor};
651
+ }
652
+ `;
653
+ }, "styles")
654
+ };
655
+ //#endregion
656
+ export { X as diagram };