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,4167 @@
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 { A as o, B as s, M as c, T as l, b as u, g as d, x as f, z as p } from "./chunk-CSCIHK7Q.js";
5
+ import { Q as m } from "./src.js";
6
+ import { a as h, r as g, u as _ } from "./chunk-5ZQYHXKU.js";
7
+ import { n as v, t as y } from "./chunk-L5ZTLDWV.js";
8
+ import { a as b, i as x, r as S, t as C } from "./chunk-NZK2D7GU.js";
9
+ import { n as w, r as T } from "./chunk-O5CBEL6O.js";
10
+ import { t as E } from "./rough.esm.js";
11
+ n(), e();
12
+ var D = /* @__PURE__ */ i(function() {
13
+ var e = r(function* (e, t, n) {
14
+ var r, i, a;
15
+ let o, s = t.useHtmlLabels || d((r = f()) == null ? void 0 : r.htmlLabels);
16
+ o = n || "node default";
17
+ let c = e.insert("g").attr("class", o).attr("id", t.domId || t.id), l = c.insert("g").attr("class", "label").attr("style", _(t.labelStyle)), u;
18
+ u = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
19
+ let g = !!t.icon || !!t.img, v = t.labelType === "markdown", b = yield w(l, p(h(u), f()), {
20
+ useHtmlLabels: s,
21
+ width: t.width || ((i = f().flowchart) == null ? void 0 : i.wrappingWidth),
22
+ classes: v ? "markdown-node-label" : "",
23
+ style: t.labelStyle,
24
+ addSvgBackground: g,
25
+ markdown: v
26
+ }, f()), x = b.getBBox(), S = ((a = t == null ? void 0 : t.padding) == null ? 0 : a) / 2;
27
+ if (s) {
28
+ let e = b.children[0], t = m(b);
29
+ yield y(e, u), x = e.getBoundingClientRect(), t.attr("width", x.width), t.attr("height", x.height);
30
+ }
31
+ return s ? l.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")") : l.attr("transform", "translate(0, " + -x.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -x.width / 2 + ", " + -x.height / 2 + ")"), l.insert("rect", ":first-child"), {
32
+ shapeSvg: c,
33
+ bbox: x,
34
+ halfPadding: S,
35
+ label: l
36
+ };
37
+ });
38
+ return function(t, n, r) {
39
+ return e.apply(this, arguments);
40
+ };
41
+ }(), "labelHelper"), O = /* @__PURE__ */ i(function() {
42
+ var e = r(function* (e, t, n) {
43
+ var r, i;
44
+ let a = (r = n.useHtmlLabels) == null ? l(f()) : r, o = e.insert("g").attr("class", "label").attr("style", n.labelStyle || ""), s = yield w(o, p(h(t), f()), {
45
+ useHtmlLabels: a,
46
+ width: n.width || ((i = f()) == null || (i = i.flowchart) == null ? void 0 : i.wrappingWidth),
47
+ style: n.labelStyle,
48
+ addSvgBackground: !!n.icon || !!n.img
49
+ }), c = s.getBBox(), u = n.padding / 2;
50
+ if (l(f())) {
51
+ let e = s.children[0], t = m(s);
52
+ c = e.getBoundingClientRect(), t.attr("width", c.width), t.attr("height", c.height);
53
+ }
54
+ return a ? o.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")") : o.attr("transform", "translate(0, " + -c.height / 2 + ")"), n.centerLabel && o.attr("transform", "translate(" + -c.width / 2 + ", " + -c.height / 2 + ")"), o.insert("rect", ":first-child"), {
55
+ shapeSvg: e,
56
+ bbox: c,
57
+ halfPadding: u,
58
+ label: o
59
+ };
60
+ });
61
+ return function(t, n, r) {
62
+ return e.apply(this, arguments);
63
+ };
64
+ }(), "insertLabel"), k = /* @__PURE__ */ i((e, t) => {
65
+ let n = t.node().getBBox();
66
+ e.width = n.width, e.height = n.height;
67
+ }, "updateNodeBounds"), A = /* @__PURE__ */ i((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
68
+ function j(e) {
69
+ let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
70
+ return t.push("Z"), t.join(" ");
71
+ }
72
+ i(j, "createPathFromPoints");
73
+ function M(e, t, n, r, i, a) {
74
+ let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
75
+ for (let t = 0; t <= 50; t++) {
76
+ let n = e + t / 50 * s, r = d + i * Math.sin(u * (n - e));
77
+ o.push({
78
+ x: n,
79
+ y: r
80
+ });
81
+ }
82
+ return o;
83
+ }
84
+ i(M, "generateFullSineWavePoints");
85
+ function N(e, t, n, r, i, a) {
86
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
87
+ for (let i = 0; i < r; i++) {
88
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
89
+ o.push({
90
+ x: -a,
91
+ y: -l
92
+ });
93
+ }
94
+ return o;
95
+ }
96
+ i(N, "generateCirclePoints");
97
+ function P(e) {
98
+ let t = Array.from(e.childNodes).filter((e) => e.tagName === "path"), n = document.createElementNS("http://www.w3.org/2000/svg", "path"), r = t.map((e) => e.getAttribute("d")).filter((e) => e !== null).join(" ");
99
+ n.setAttribute("d", r);
100
+ let a = t.find((e) => e.getAttribute("fill") !== "none"), o = t.find((e) => e.getAttribute("stroke") !== "none"), s = /* @__PURE__ */ i((e, t) => {
101
+ var n;
102
+ return (n = e == null ? void 0 : e.getAttribute(t)) == null ? void 0 : n;
103
+ }, "getAttr");
104
+ if (a) {
105
+ var c;
106
+ let e = {
107
+ fill: s(a, "fill"),
108
+ "fill-opacity": (c = s(a, "fill-opacity")) == null ? "1" : c
109
+ };
110
+ Object.entries(e).forEach(([e, t]) => {
111
+ t && n.setAttribute(e, t);
112
+ });
113
+ }
114
+ if (o) {
115
+ var l, u;
116
+ let e = {
117
+ stroke: s(o, "stroke"),
118
+ "stroke-width": (l = s(o, "stroke-width")) == null ? "1" : l,
119
+ "stroke-opacity": (u = s(o, "stroke-opacity")) == null ? "1" : u
120
+ };
121
+ Object.entries(e).forEach(([e, t]) => {
122
+ t && n.setAttribute(e, t);
123
+ });
124
+ }
125
+ let d = document.createElementNS("http://www.w3.org/2000/svg", "g");
126
+ return d.appendChild(n), d;
127
+ }
128
+ i(P, "mergePaths");
129
+ var F = /* @__PURE__ */ i((e, t) => {
130
+ var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
131
+ return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
132
+ x: n + c,
133
+ y: r + l
134
+ };
135
+ }, "intersectRect"), I = /* @__PURE__ */ i(function() {
136
+ var e = r(function* (e, t, n, r = !1, i = !1) {
137
+ let a = t || "";
138
+ typeof a == "object" && (a = a[0]);
139
+ let o = f(), s = l(o);
140
+ return yield w(e, a, {
141
+ style: n,
142
+ isTitle: r,
143
+ useHtmlLabels: s,
144
+ markdown: !1,
145
+ isNode: i,
146
+ width: Infinity
147
+ }, o);
148
+ });
149
+ return function(t, n, r) {
150
+ return e.apply(this, arguments);
151
+ };
152
+ }(), "createLabel"), L = /* @__PURE__ */ i((e, t, n, r, i) => [
153
+ "M",
154
+ e + i,
155
+ t,
156
+ "H",
157
+ e + n - i,
158
+ "A",
159
+ i,
160
+ i,
161
+ 0,
162
+ 0,
163
+ 1,
164
+ e + n,
165
+ t + i,
166
+ "V",
167
+ t + r - i,
168
+ "A",
169
+ i,
170
+ i,
171
+ 0,
172
+ 0,
173
+ 1,
174
+ e + n - i,
175
+ t + r,
176
+ "H",
177
+ e + i,
178
+ "A",
179
+ i,
180
+ i,
181
+ 0,
182
+ 0,
183
+ 1,
184
+ e,
185
+ t + r - i,
186
+ "V",
187
+ t + i,
188
+ "A",
189
+ i,
190
+ i,
191
+ 0,
192
+ 0,
193
+ 1,
194
+ e + i,
195
+ t,
196
+ "Z"
197
+ ].join(" "), "createRoundedRectPathD"), R = /* @__PURE__ */ i(function() {
198
+ var e = r(function* (e, t) {
199
+ a.info("Creating subgraph rect for ", t.id, t);
200
+ let n = f(), { themeVariables: r, handDrawnSeed: i } = n, { clusterBkg: o, clusterBorder: s } = r, { labelStyles: c, nodeStyles: u, borderStyles: d, backgroundStyles: p } = x(t), h = e.insert("g").attr("class", "cluster " + t.cssClasses).attr("id", t.domId).attr("data-look", t.look), g = l(n), _ = h.insert("g").attr("class", "cluster-label "), y;
201
+ y = t.labelType === "markdown" ? yield w(_, t.label, {
202
+ style: t.labelStyle,
203
+ useHtmlLabels: g,
204
+ isNode: !0,
205
+ width: t.width
206
+ }) : yield I(_, t.label, t.labelStyle || "", !1, !0);
207
+ let S = y.getBBox();
208
+ if (l(n)) {
209
+ let e = y.children[0], t = m(y);
210
+ S = e.getBoundingClientRect(), t.attr("width", S.width), t.attr("height", S.height);
211
+ }
212
+ let C = t.width <= S.width + t.padding ? S.width + t.padding : t.width;
213
+ t.width <= S.width + t.padding ? t.diff = (C - t.width) / 2 - t.padding : t.diff = -t.padding;
214
+ let T = t.height, D = t.x - C / 2, O = t.y - T / 2;
215
+ a.trace("Data ", t, JSON.stringify(t));
216
+ let k;
217
+ if (t.look === "handDrawn") {
218
+ let e = E.svg(h), n = b(t, {
219
+ roughness: .7,
220
+ fill: o,
221
+ stroke: s,
222
+ fillWeight: 3,
223
+ seed: i
224
+ }), r = e.path(L(D, O, C, T, 0), n);
225
+ k = h.insert(() => (a.debug("Rough node insert CXC", r), r), ":first-child"), k.select("path:nth-child(2)").attr("style", d.join(";")), k.select("path").attr("style", p.join(";").replace("fill", "stroke"));
226
+ } else k = h.insert("rect", ":first-child"), k.attr("style", u).attr("rx", t.rx).attr("ry", t.ry).attr("x", D).attr("y", O).attr("width", C).attr("height", T);
227
+ let { subGraphTitleTopMargin: A } = v(n);
228
+ if (_.attr("transform", `translate(${t.x - S.width / 2}, ${t.y - t.height / 2 + A})`), c) {
229
+ let e = _.select("span");
230
+ e && e.attr("style", c);
231
+ }
232
+ let j = k.node().getBBox();
233
+ return t.offsetX = 0, t.width = j.width, t.height = j.height, t.offsetY = S.height - t.padding / 2, t.intersect = function(e) {
234
+ return F(t, e);
235
+ }, {
236
+ cluster: h,
237
+ labelBBox: S
238
+ };
239
+ });
240
+ return function(t, n) {
241
+ return e.apply(this, arguments);
242
+ };
243
+ }(), "rect"), z = /* @__PURE__ */ i((e, t) => {
244
+ let n = e.insert("g").attr("class", "note-cluster").attr("id", t.domId), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
245
+ r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
246
+ let o = r.node().getBBox();
247
+ return t.width = o.width, t.height = o.height, t.intersect = function(e) {
248
+ return F(t, e);
249
+ }, {
250
+ cluster: n,
251
+ labelBBox: {
252
+ width: 0,
253
+ height: 0
254
+ }
255
+ };
256
+ }, "noteGroup"), B = /* @__PURE__ */ i(function() {
257
+ var e = r(function* (e, t) {
258
+ let n = f(), { themeVariables: r, handDrawnSeed: i } = n, { altBackground: a, compositeBackground: o, compositeTitleBackground: s, nodeBorder: c } = r, u = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-id", t.id).attr("data-look", t.look), d = u.insert("g", ":first-child"), p = u.insert("g").attr("class", "cluster-label"), h = u.append("rect"), g = yield I(p, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
259
+ if (l(n)) {
260
+ let e = g.children[0], t = m(g);
261
+ _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
262
+ }
263
+ let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
264
+ t.width <= _.width + t.padding ? t.diff = (b - t.width) / 2 - t.padding : t.diff = -t.padding;
265
+ let x = t.height + v, S = t.height + v - _.height - 6, C = t.x - b / 2, w = t.y - x / 2;
266
+ t.width = b;
267
+ let T = t.y - t.height / 2 - y + _.height + 2, D;
268
+ if (t.look === "handDrawn") {
269
+ let e = t.cssClasses.includes("statediagram-cluster-alt"), n = E.svg(u), r = t.rx || t.ry ? n.path(L(C, w, b, x, 10), {
270
+ roughness: .7,
271
+ fill: s,
272
+ fillStyle: "solid",
273
+ stroke: c,
274
+ seed: i
275
+ }) : n.rectangle(C, w, b, x, { seed: i });
276
+ D = u.insert(() => r, ":first-child");
277
+ let l = n.rectangle(C, T, b, S, {
278
+ fill: e ? a : o,
279
+ fillStyle: e ? "hachure" : "solid",
280
+ stroke: c,
281
+ seed: i
282
+ });
283
+ D = u.insert(() => r, ":first-child"), h = u.insert(() => l);
284
+ } else D = d.insert("rect", ":first-child"), D.attr("class", "outer").attr("x", C).attr("y", w).attr("width", b).attr("height", x).attr("data-look", t.look), h.attr("class", "inner").attr("x", C).attr("y", T).attr("width", b).attr("height", S);
285
+ return p.attr("transform", `translate(${t.x - _.width / 2}, ${w + 1 - (l(n) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
286
+ return F(t, e);
287
+ }, {
288
+ cluster: u,
289
+ labelBBox: _
290
+ };
291
+ });
292
+ return function(t, n) {
293
+ return e.apply(this, arguments);
294
+ };
295
+ }(), "roundedWithTitle"), V = /* @__PURE__ */ i(function() {
296
+ var e = r(function* (e, t) {
297
+ a.info("Creating subgraph rect for ", t.id, t);
298
+ let n = f(), { themeVariables: r, handDrawnSeed: i } = n, { clusterBkg: o, clusterBorder: s } = r, { labelStyles: c, nodeStyles: u, borderStyles: d, backgroundStyles: p } = x(t), h = e.insert("g").attr("class", "cluster " + t.cssClasses).attr("id", t.domId).attr("data-look", t.look), g = l(n), _ = h.insert("g").attr("class", "cluster-label "), y = yield w(_, t.label, {
299
+ style: t.labelStyle,
300
+ useHtmlLabels: g,
301
+ isNode: !0,
302
+ width: t.width
303
+ }), S = y.getBBox();
304
+ if (l(n)) {
305
+ let e = y.children[0], t = m(y);
306
+ S = e.getBoundingClientRect(), t.attr("width", S.width), t.attr("height", S.height);
307
+ }
308
+ let C = t.width <= S.width + t.padding ? S.width + t.padding : t.width;
309
+ t.width <= S.width + t.padding ? t.diff = (C - t.width) / 2 - t.padding : t.diff = -t.padding;
310
+ let T = t.height, D = t.x - C / 2, O = t.y - T / 2;
311
+ a.trace("Data ", t, JSON.stringify(t));
312
+ let k;
313
+ if (t.look === "handDrawn") {
314
+ let e = E.svg(h), n = b(t, {
315
+ roughness: .7,
316
+ fill: o,
317
+ stroke: s,
318
+ fillWeight: 4,
319
+ seed: i
320
+ }), r = e.path(L(D, O, C, T, t.rx), n);
321
+ k = h.insert(() => (a.debug("Rough node insert CXC", r), r), ":first-child"), k.select("path:nth-child(2)").attr("style", d.join(";")), k.select("path").attr("style", p.join(";").replace("fill", "stroke"));
322
+ } else k = h.insert("rect", ":first-child"), k.attr("style", u).attr("rx", t.rx).attr("ry", t.ry).attr("x", D).attr("y", O).attr("width", C).attr("height", T);
323
+ let { subGraphTitleTopMargin: A } = v(n);
324
+ if (_.attr("transform", `translate(${t.x - S.width / 2}, ${t.y - t.height / 2 + A})`), c) {
325
+ let e = _.select("span");
326
+ e && e.attr("style", c);
327
+ }
328
+ let j = k.node().getBBox();
329
+ return t.offsetX = 0, t.width = j.width, t.height = j.height, t.offsetY = S.height - t.padding / 2, t.intersect = function(e) {
330
+ return F(t, e);
331
+ }, {
332
+ cluster: h,
333
+ labelBBox: S
334
+ };
335
+ });
336
+ return function(t, n) {
337
+ return e.apply(this, arguments);
338
+ };
339
+ }(), "kanbanSection"), H = {
340
+ rect: R,
341
+ squareRect: R,
342
+ roundedWithTitle: B,
343
+ noteGroup: z,
344
+ divider: /* @__PURE__ */ i((e, t) => {
345
+ let { themeVariables: n, handDrawnSeed: r } = f(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.domId).attr("data-look", t.look), o = a.insert("g", ":first-child"), s = 0 * t.padding, c = t.width + s;
346
+ t.diff = -t.padding;
347
+ let l = t.height + s, u = t.x - c / 2, d = t.y - l / 2;
348
+ t.width = c;
349
+ let p;
350
+ if (t.look === "handDrawn") {
351
+ let e = E.svg(a).rectangle(u, d, c, l, {
352
+ fill: "lightgrey",
353
+ roughness: .5,
354
+ strokeLineDash: [5],
355
+ stroke: i,
356
+ seed: r
357
+ });
358
+ p = a.insert(() => e, ":first-child");
359
+ } else {
360
+ p = o.insert("rect", ":first-child");
361
+ let e = "outer";
362
+ e = (t.look, "divider"), p.attr("class", e).attr("x", u).attr("y", d).attr("width", c).attr("height", l).attr("data-look", t.look);
363
+ }
364
+ return t.height = p.node().getBBox().height, t.offsetX = 0, t.offsetY = 0, t.intersect = function(e) {
365
+ return F(t, e);
366
+ }, {
367
+ cluster: a,
368
+ labelBBox: {}
369
+ };
370
+ }, "divider"),
371
+ kanbanSection: V
372
+ }, U = /* @__PURE__ */ new Map(), W = /* @__PURE__ */ i(function() {
373
+ var e = r(function* (e, t) {
374
+ let n = yield H[t.shape || "rect"](e, t);
375
+ return U.set(t.id, n), n;
376
+ });
377
+ return function(t, n) {
378
+ return e.apply(this, arguments);
379
+ };
380
+ }(), "insertCluster"), G = /* @__PURE__ */ i(() => {
381
+ U = /* @__PURE__ */ new Map();
382
+ }, "clear");
383
+ function ee(e, t) {
384
+ return e.intersect(t);
385
+ }
386
+ i(ee, "intersectNode");
387
+ var te = ee;
388
+ function ne(e, t, n, r) {
389
+ var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
390
+ r.x < i && (l = -l);
391
+ var u = Math.abs(t * n * s / c);
392
+ return r.y < a && (u = -u), {
393
+ x: i + l,
394
+ y: a + u
395
+ };
396
+ }
397
+ i(ne, "intersectEllipse");
398
+ var K = ne;
399
+ function re(e, t, n) {
400
+ return K(e, t, t, n);
401
+ }
402
+ i(re, "intersectCircle");
403
+ var ie = re;
404
+ function ae(e, t, n, r) {
405
+ {
406
+ let i = t.y - e.y, a = e.x - t.x, o = t.x * e.y - e.x * t.y, s = i * n.x + a * n.y + o, c = i * r.x + a * r.y + o, l = 1e-6;
407
+ if (s !== 0 && c !== 0 && q(s, c)) return;
408
+ let u = r.y - n.y, d = n.x - r.x, f = r.x * n.y - n.x * r.y, p = u * e.x + d * e.y + f, m = u * t.x + d * t.y + f;
409
+ if (Math.abs(p) < l && Math.abs(m) < l && q(p, m)) return;
410
+ let h = i * d - u * a;
411
+ if (h === 0) return;
412
+ let g = Math.abs(h / 2), _ = a * f - d * o, v = _ < 0 ? (_ - g) / h : (_ + g) / h;
413
+ return _ = u * o - i * f, {
414
+ x: v,
415
+ y: _ < 0 ? (_ - g) / h : (_ + g) / h
416
+ };
417
+ }
418
+ }
419
+ i(ae, "intersectLine");
420
+ function q(e, t) {
421
+ return e * t > 0;
422
+ }
423
+ i(q, "sameSign");
424
+ var J = ae;
425
+ function oe(e, t, n) {
426
+ let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
427
+ typeof t.forEach == "function" ? t.forEach(function(e) {
428
+ o = Math.min(o, e.x), s = Math.min(s, e.y);
429
+ }) : (o = Math.min(o, t.x), s = Math.min(s, t.y));
430
+ let c = r - e.width / 2 - o, l = i - e.height / 2 - s;
431
+ for (let r = 0; r < t.length; r++) {
432
+ let i = t[r], o = t[r < t.length - 1 ? r + 1 : 0], s = J(e, n, {
433
+ x: c + i.x,
434
+ y: l + i.y
435
+ }, {
436
+ x: c + o.x,
437
+ y: l + o.y
438
+ });
439
+ s && a.push(s);
440
+ }
441
+ return a.length ? (a.length > 1 && a.sort(function(e, t) {
442
+ let r = e.x - n.x, i = e.y - n.y, a = Math.sqrt(r * r + i * i), o = t.x - n.x, s = t.y - n.y, c = Math.sqrt(o * o + s * s);
443
+ return a < c ? -1 : a === c ? 0 : 1;
444
+ }), a[0]) : e;
445
+ }
446
+ i(oe, "intersectPolygon");
447
+ var Y = {
448
+ node: te,
449
+ circle: ie,
450
+ ellipse: K,
451
+ polygon: oe,
452
+ rect: F
453
+ };
454
+ function se(e, t) {
455
+ let { labelStyles: n } = x(t);
456
+ t.labelStyle = n;
457
+ let r = A(t), i = r;
458
+ r || (i = "anchor");
459
+ let o = e.insert("g").attr("class", i).attr("id", t.domId || t.id), { cssStyles: s } = t, c = E.svg(o), l = b(t, {
460
+ fill: "black",
461
+ stroke: "none",
462
+ fillStyle: "solid"
463
+ });
464
+ t.look !== "handDrawn" && (l.roughness = 0);
465
+ let u = c.circle(0, 0, 2, l), d = o.insert(() => u, ":first-child");
466
+ return d.attr("class", "anchor").attr("style", _(s)), k(t, d), t.intersect = function(e) {
467
+ return a.info("Circle intersect", t, 1, e), Y.circle(t, 1, e);
468
+ }, o;
469
+ }
470
+ i(se, "anchor");
471
+ function ce(e, t, n, r, i, a, o) {
472
+ let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(Math.pow(f, 2) + Math.pow(p, 2));
473
+ if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
474
+ let h = Math.sqrt(1 - Math.pow(m, 2)), g = s + h * a * Math.sin(l) * (o ? -1 : 1), _ = c - h * i * Math.cos(l) * (o ? -1 : 1), v = Math.atan2((t - _) / a, (e - g) / i), y = Math.atan2((r - _) / a, (n - g) / i) - v;
475
+ o && y < 0 && (y += 2 * Math.PI), !o && y > 0 && (y -= 2 * Math.PI);
476
+ let b = [];
477
+ for (let e = 0; e < 20; e++) {
478
+ let t = v + e / 19 * y, n = g + i * Math.cos(t), r = _ + a * Math.sin(t);
479
+ b.push({
480
+ x: n,
481
+ y: r
482
+ });
483
+ }
484
+ return b;
485
+ }
486
+ i(ce, "generateArcPoints");
487
+ function le(e, t, n) {
488
+ let [r, i] = [t, n].sort((e, t) => t - e);
489
+ return i * (1 - Math.sqrt(1 - Math.pow(e / r / 2, 2)));
490
+ }
491
+ i(le, "calculateArcSagitta");
492
+ function X(e, t) {
493
+ return Z.apply(this, arguments);
494
+ }
495
+ function Z() {
496
+ return Z = r(function* (e, t) {
497
+ var n;
498
+ let { labelStyles: r, nodeStyles: a } = x(t);
499
+ t.labelStyle = r;
500
+ let o = (n = t.padding) == null ? 0 : n, s = t.look === "neo" ? 16 : o, c = t.look === "neo" ? 12 : o, l = /* @__PURE__ */ i((e) => e + c, "calcTotalHeight"), u = /* @__PURE__ */ i((e) => {
501
+ let t = e / 2;
502
+ return [t / (2.5 + e / 50), t];
503
+ }, "calcEllipseRadius"), { shapeSvg: d, bbox: f } = yield D(e, t, A(t)), p = l(t != null && t.height ? t == null ? void 0 : t.height : f.height), [m, h] = u(p), g = le(p, m, h), _ = (t != null && t.width ? t == null ? void 0 : t.width : f.width) + s * 2 + g - g, v = p, { cssStyles: y } = t, S = [
504
+ {
505
+ x: _ / 2,
506
+ y: -v / 2
507
+ },
508
+ {
509
+ x: -_ / 2,
510
+ y: -v / 2
511
+ },
512
+ ...ce(-_ / 2, -v / 2, -_ / 2, v / 2, m, h, !1),
513
+ {
514
+ x: _ / 2,
515
+ y: v / 2
516
+ },
517
+ ...ce(_ / 2, v / 2, _ / 2, -v / 2, m, h, !0)
518
+ ], C = E.svg(d), w = b(t, {});
519
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
520
+ let T = j(S), O = C.path(T, w), M = d.insert(() => O, ":first-child");
521
+ return M.attr("class", "basic label-container outer-path"), y && t.look !== "handDrawn" && M.selectAll("path").attr("style", y), a && t.look !== "handDrawn" && M.selectAll("path").attr("style", a), M.attr("transform", `translate(${m / 2}, 0)`), k(t, M), t.intersect = function(e) {
522
+ return Y.polygon(t, S, e);
523
+ }, d;
524
+ }), Z.apply(this, arguments);
525
+ }
526
+ i(X, "bowTieRect");
527
+ function ue(e, t, n, r) {
528
+ return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
529
+ return e.x + "," + e.y;
530
+ }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
531
+ }
532
+ i(ue, "insertPolygonShape");
533
+ var de = 12;
534
+ function fe(e, t) {
535
+ return pe.apply(this, arguments);
536
+ }
537
+ function pe() {
538
+ return pe = r(function* (e, t) {
539
+ var n, r, i;
540
+ let { labelStyles: a, nodeStyles: o } = x(t);
541
+ t.labelStyle = a;
542
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 28 : s, l = t.look === "neo" ? 24 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = ((r = t == null ? void 0 : t.width) == null ? d.width : r) + (t.look === "neo" ? c * 2 : c + de), p = ((i = t == null ? void 0 : t.height) == null ? d.height : i) + (t.look === "neo" ? l * 2 : l), m = f, h = -p, g = [
543
+ {
544
+ x: 0 + de,
545
+ y: h
546
+ },
547
+ {
548
+ x: m,
549
+ y: h
550
+ },
551
+ {
552
+ x: m,
553
+ y: 0
554
+ },
555
+ {
556
+ x: 0,
557
+ y: 0
558
+ },
559
+ {
560
+ x: 0,
561
+ y: h + de
562
+ },
563
+ {
564
+ x: 0 + de,
565
+ y: h
566
+ }
567
+ ], _, { cssStyles: v } = t;
568
+ if (t.look === "handDrawn") {
569
+ let e = E.svg(u), n = b(t, {}), r = j(g), i = e.path(r, n);
570
+ _ = u.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${p / 2})`), v && _.attr("style", v);
571
+ } else _ = ue(u, f, p, g);
572
+ return o && _.attr("style", o), k(t, _), t.intersect = function(e) {
573
+ return Y.polygon(t, g, e);
574
+ }, u;
575
+ }), pe.apply(this, arguments);
576
+ }
577
+ i(fe, "card");
578
+ function me(e, t) {
579
+ var n, r;
580
+ let { nodeStyles: i } = x(t);
581
+ t.label = "";
582
+ let a = e.insert("g").attr("class", A(t)).attr("id", (n = t.domId) == null ? t.id : n), { cssStyles: o } = t, s = Math.max(28, (r = t.width) == null ? 0 : r), c = [
583
+ {
584
+ x: 0,
585
+ y: s / 2
586
+ },
587
+ {
588
+ x: s / 2,
589
+ y: 0
590
+ },
591
+ {
592
+ x: 0,
593
+ y: -s / 2
594
+ },
595
+ {
596
+ x: -s / 2,
597
+ y: 0
598
+ }
599
+ ], l = E.svg(a), u = b(t, {});
600
+ t.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
601
+ let d = j(c), f = l.path(d, u), p = a.insert(() => f, ":first-child");
602
+ return o && t.look !== "handDrawn" && p.selectAll("path").attr("style", o), i && t.look !== "handDrawn" && p.selectAll("path").attr("style", i), t.width = 28, t.height = 28, t.intersect = function(e) {
603
+ return Y.polygon(t, c, e);
604
+ }, a;
605
+ }
606
+ i(me, "choice");
607
+ function he(e, t, n) {
608
+ return ge.apply(this, arguments);
609
+ }
610
+ function ge() {
611
+ return ge = r(function* (e, t, n) {
612
+ var r;
613
+ let { labelStyles: i, nodeStyles: o } = x(t);
614
+ t.labelStyle = i;
615
+ let { shapeSvg: s, bbox: c, halfPadding: l } = yield D(e, t, A(t)), u = (r = n == null ? void 0 : n.padding) == null ? l : r, d = t.look === "neo" ? c.width / 2 + 32 : c.width / 2 + u, f, { cssStyles: p } = t;
616
+ if (t.look === "handDrawn") {
617
+ let e = E.svg(s), n = b(t, {}), r = e.circle(0, 0, d * 2, n);
618
+ f = s.insert(() => r, ":first-child"), f.attr("class", "basic label-container").attr("style", _(p));
619
+ } else f = s.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", o).attr("r", d).attr("cx", 0).attr("cy", 0);
620
+ return k(t, f), t.calcIntersect = function(e, t) {
621
+ let n = e.width / 2;
622
+ return Y.circle(e, n, t);
623
+ }, t.intersect = function(e) {
624
+ return a.info("Circle intersect", t, d, e), Y.circle(t, d, e);
625
+ }, s;
626
+ }), ge.apply(this, arguments);
627
+ }
628
+ i(he, "circle");
629
+ function _e(e) {
630
+ let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
631
+ x: r / 2 * t,
632
+ y: r / 2 * n
633
+ }, a = {
634
+ x: -(r / 2) * t,
635
+ y: r / 2 * n
636
+ }, o = {
637
+ x: -(r / 2) * t,
638
+ y: -(r / 2) * n
639
+ }, s = {
640
+ x: r / 2 * t,
641
+ y: -(r / 2) * n
642
+ };
643
+ return `M ${a.x},${a.y} L ${s.x},${s.y}
644
+ M ${i.x},${i.y} L ${o.x},${o.y}`;
645
+ }
646
+ i(_e, "createLine");
647
+ function ve(e, t) {
648
+ var n, r;
649
+ let { labelStyles: i, nodeStyles: o } = x(t);
650
+ t.labelStyle = i, t.label = "";
651
+ let s = e.insert("g").attr("class", A(t)).attr("id", (n = t.domId) == null ? t.id : n), c = Math.max(30, (r = t == null ? void 0 : t.width) == null ? 0 : r), { cssStyles: l } = t, u = E.svg(s), d = b(t, {});
652
+ t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
653
+ let f = u.circle(0, 0, c * 2, d), p = _e(c), m = u.path(p, d), h = s.insert(() => f, ":first-child");
654
+ return h.insert(() => m), h.attr("class", "outer-path"), l && t.look !== "handDrawn" && h.selectAll("path").attr("style", l), o && t.look !== "handDrawn" && h.selectAll("path").attr("style", o), k(t, h), t.intersect = function(e) {
655
+ return a.info("crossedCircle intersect", t, {
656
+ radius: c,
657
+ point: e
658
+ }), Y.circle(t, c, e);
659
+ }, s;
660
+ }
661
+ i(ve, "crossedCircle");
662
+ function ye(e, t, n, r = 100, i = 0, a = 180) {
663
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
664
+ for (let i = 0; i < r; i++) {
665
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
666
+ o.push({
667
+ x: -a,
668
+ y: -l
669
+ });
670
+ }
671
+ return o;
672
+ }
673
+ i(ye, "generateCirclePoints");
674
+ function be(e, t) {
675
+ return xe.apply(this, arguments);
676
+ }
677
+ function xe() {
678
+ return xe = r(function* (e, n) {
679
+ var r, i, a, o, s;
680
+ let { labelStyles: c, nodeStyles: l } = x(n);
681
+ n.labelStyle = c;
682
+ let { shapeSvg: u, bbox: d, label: f } = yield D(e, n, A(n)), p = n.look === "neo" ? 18 : (r = n.padding) == null ? 0 : r, m = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i, h = d.width + p, g = d.height + m, _ = Math.max(5, g * .1), { cssStyles: v } = n, y = [
683
+ ...ye(h / 2, -g / 2, _, 30, -90, 0),
684
+ {
685
+ x: -h / 2 - _,
686
+ y: _
687
+ },
688
+ ...ye(h / 2 + _ * 2, -_, _, 20, -180, -270),
689
+ ...ye(h / 2 + _ * 2, _, _, 20, -90, -180),
690
+ {
691
+ x: -h / 2 - _,
692
+ y: -g / 2
693
+ },
694
+ ...ye(h / 2, g / 2, _, 20, 0, 90)
695
+ ], S = [
696
+ {
697
+ x: h / 2,
698
+ y: -g / 2 - _
699
+ },
700
+ {
701
+ x: -h / 2,
702
+ y: -g / 2 - _
703
+ },
704
+ ...ye(h / 2, -g / 2, _, 20, -90, 0),
705
+ {
706
+ x: -h / 2 - _,
707
+ y: -_
708
+ },
709
+ ...ye(h / 2 + h * .1, -_, _, 20, -180, -270),
710
+ ...ye(h / 2 + h * .1, _, _, 20, -90, -180),
711
+ {
712
+ x: -h / 2 - _,
713
+ y: g / 2
714
+ },
715
+ ...ye(h / 2, g / 2, _, 20, 0, 90),
716
+ {
717
+ x: -h / 2,
718
+ y: g / 2 + _
719
+ },
720
+ {
721
+ x: h / 2,
722
+ y: g / 2 + _
723
+ }
724
+ ], C = E.svg(u), w = b(n, { fill: "none" });
725
+ n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
726
+ let T = j(y).replace("Z", ""), O = C.path(T, w), M = j(S), N = C.path(M, t({}, w)), P = u.insert("g", ":first-child");
727
+ return P.insert(() => N, ":first-child").attr("stroke-opacity", 0), P.insert(() => O, ":first-child"), P.attr("class", "text"), v && n.look !== "handDrawn" && P.selectAll("path").attr("style", v), l && n.look !== "handDrawn" && P.selectAll("path").attr("style", l), P.attr("transform", `translate(${_}, 0)`), f.attr("transform", `translate(${-h / 2 + _ - (d.x - ((a = d.left) == null ? 0 : a))},${-g / 2 + ((o = n.padding) == null ? 0 : o) / 2 - (d.y - ((s = d.top) == null ? 0 : s))})`), k(n, P), n.intersect = function(e) {
728
+ return Y.polygon(n, S, e);
729
+ }, u;
730
+ }), xe.apply(this, arguments);
731
+ }
732
+ i(be, "curlyBraceLeft");
733
+ function Se(e, t, n, r = 100, i = 0, a = 180) {
734
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
735
+ for (let i = 0; i < r; i++) {
736
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
737
+ o.push({
738
+ x: a,
739
+ y: l
740
+ });
741
+ }
742
+ return o;
743
+ }
744
+ i(Se, "generateCirclePoints");
745
+ function Ce(e, t) {
746
+ return we.apply(this, arguments);
747
+ }
748
+ function we() {
749
+ return we = r(function* (e, n) {
750
+ var r, i, a, o, s, c;
751
+ let { labelStyles: l, nodeStyles: u } = x(n);
752
+ n.labelStyle = l;
753
+ let { shapeSvg: d, bbox: f, label: p } = yield D(e, n, A(n)), m = n.look === "neo" ? 18 : (r = n.padding) == null ? 0 : r, h = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i, g = f.width + (n.look === "neo" ? m * 2 : m), _ = f.height + (n.look === "neo" ? h * 2 : h), v = Math.max(5, _ * .1), { cssStyles: y } = n, S = [
754
+ ...Se(g / 2, -_ / 2, v, 20, -90, 0),
755
+ {
756
+ x: g / 2 + v,
757
+ y: -v
758
+ },
759
+ ...Se(g / 2 + v * 2, -v, v, 20, -180, -270),
760
+ ...Se(g / 2 + v * 2, v, v, 20, -90, -180),
761
+ {
762
+ x: g / 2 + v,
763
+ y: _ / 2
764
+ },
765
+ ...Se(g / 2, _ / 2, v, 20, 0, 90)
766
+ ], C = [
767
+ {
768
+ x: -g / 2,
769
+ y: -_ / 2 - v
770
+ },
771
+ {
772
+ x: g / 2,
773
+ y: -_ / 2 - v
774
+ },
775
+ ...Se(g / 2, -_ / 2, v, 20, -90, 0),
776
+ {
777
+ x: g / 2 + v,
778
+ y: -v
779
+ },
780
+ ...Se(g / 2 + v * 2, -v, v, 20, -180, -270),
781
+ ...Se(g / 2 + v * 2, v, v, 20, -90, -180),
782
+ {
783
+ x: g / 2 + v,
784
+ y: _ / 2
785
+ },
786
+ ...Se(g / 2, _ / 2, v, 20, 0, 90),
787
+ {
788
+ x: g / 2,
789
+ y: _ / 2 + v
790
+ },
791
+ {
792
+ x: -g / 2,
793
+ y: _ / 2 + v
794
+ }
795
+ ], w = E.svg(d), T = b(n, { fill: "none" });
796
+ n.look !== "handDrawn" && (T.roughness = 0, T.fillStyle = "solid");
797
+ let O = j(S).replace("Z", ""), M = w.path(O, T), N = j(C), P = w.path(N, t({}, T)), F = d.insert("g", ":first-child");
798
+ return F.insert(() => P, ":first-child").attr("stroke-opacity", 0), F.insert(() => M, ":first-child"), F.attr("class", "text"), y && n.look !== "handDrawn" && F.selectAll("path").attr("style", y), u && n.look !== "handDrawn" && F.selectAll("path").attr("style", u), F.attr("transform", `translate(${-v}, 0)`), p.attr("transform", `translate(${-g / 2 + ((a = n.padding) == null ? 0 : a) / 2 - (f.x - ((o = f.left) == null ? 0 : o))},${-_ / 2 + ((s = n.padding) == null ? 0 : s) / 2 - (f.y - ((c = f.top) == null ? 0 : c))})`), k(n, F), n.intersect = function(e) {
799
+ return Y.polygon(n, C, e);
800
+ }, d;
801
+ }), we.apply(this, arguments);
802
+ }
803
+ i(Ce, "curlyBraceRight");
804
+ function Q(e, t, n, r = 100, i = 0, a = 180) {
805
+ let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
806
+ for (let i = 0; i < r; i++) {
807
+ let r = s + i * c, a = e + n * Math.cos(r), l = t + n * Math.sin(r);
808
+ o.push({
809
+ x: -a,
810
+ y: -l
811
+ });
812
+ }
813
+ return o;
814
+ }
815
+ i(Q, "generateCirclePoints");
816
+ function Te(e, t) {
817
+ return Ee.apply(this, arguments);
818
+ }
819
+ function Ee() {
820
+ return Ee = r(function* (e, n) {
821
+ var r, i, a, o, s, c;
822
+ let { labelStyles: l, nodeStyles: u } = x(n);
823
+ n.labelStyle = l;
824
+ let { shapeSvg: d, bbox: f, label: p } = yield D(e, n, A(n)), m = n.look === "neo" ? 18 : (r = n.padding) == null ? 0 : r, h = n.look === "neo" ? 12 : (i = n.padding) == null ? 0 : i, g = f.width + (n.look === "neo" ? m * 2 : m), _ = f.height + (n.look === "neo" ? h * 2 : h), v = Math.max(5, _ * .1), { cssStyles: y } = n, S = [
825
+ ...Q(g / 2, -_ / 2, v, 30, -90, 0),
826
+ {
827
+ x: -g / 2 - v,
828
+ y: v
829
+ },
830
+ ...Q(g / 2 + v * 2, -v, v, 20, -180, -270),
831
+ ...Q(g / 2 + v * 2, v, v, 20, -90, -180),
832
+ {
833
+ x: -g / 2 - v,
834
+ y: -_ / 2
835
+ },
836
+ ...Q(g / 2, _ / 2, v, 20, 0, 90)
837
+ ], C = [
838
+ ...Q(-g / 2 + v + v / 2, -_ / 2, v, 20, -90, -180),
839
+ {
840
+ x: g / 2 - v / 2,
841
+ y: v
842
+ },
843
+ ...Q(-g / 2 - v / 2, -v, v, 20, 0, 90),
844
+ ...Q(-g / 2 - v / 2, v, v, 20, -90, 0),
845
+ {
846
+ x: g / 2 - v / 2,
847
+ y: -v
848
+ },
849
+ ...Q(-g / 2 + v + v / 2, _ / 2, v, 30, -180, -270)
850
+ ], w = [
851
+ {
852
+ x: g / 2,
853
+ y: -_ / 2 - v
854
+ },
855
+ {
856
+ x: -g / 2,
857
+ y: -_ / 2 - v
858
+ },
859
+ ...Q(g / 2, -_ / 2, v, 20, -90, 0),
860
+ {
861
+ x: -g / 2 - v,
862
+ y: -v
863
+ },
864
+ ...Q(g / 2 + v * 2, -v, v, 20, -180, -270),
865
+ ...Q(g / 2 + v * 2, v, v, 20, -90, -180),
866
+ {
867
+ x: -g / 2 - v,
868
+ y: _ / 2
869
+ },
870
+ ...Q(g / 2, _ / 2, v, 20, 0, 90),
871
+ {
872
+ x: -g / 2,
873
+ y: _ / 2 + v
874
+ },
875
+ {
876
+ x: g / 2 - v - v / 2,
877
+ y: _ / 2 + v
878
+ },
879
+ ...Q(-g / 2 + v + v / 2, -_ / 2, v, 20, -90, -180),
880
+ {
881
+ x: g / 2 - v / 2,
882
+ y: v
883
+ },
884
+ ...Q(-g / 2 - v / 2, -v, v, 20, 0, 90),
885
+ ...Q(-g / 2 - v / 2, v, v, 20, -90, 0),
886
+ {
887
+ x: g / 2 - v / 2,
888
+ y: -v
889
+ },
890
+ ...Q(-g / 2 + v + v / 2, _ / 2, v, 30, -180, -270)
891
+ ], T = E.svg(d), O = b(n, { fill: "none" });
892
+ n.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
893
+ let M = j(S).replace("Z", ""), N = T.path(M, O), P = j(C).replace("Z", ""), F = T.path(P, O), I = j(w), L = T.path(I, t({}, O)), R = d.insert("g", ":first-child");
894
+ return R.insert(() => L, ":first-child").attr("stroke-opacity", 0), R.insert(() => N, ":first-child"), R.insert(() => F, ":first-child"), R.attr("class", "text"), y && n.look !== "handDrawn" && R.selectAll("path").attr("style", y), u && n.look !== "handDrawn" && R.selectAll("path").attr("style", u), R.attr("transform", `translate(${v - v / 4}, 0)`), p.attr("transform", `translate(${-g / 2 + ((a = n.padding) == null ? 0 : a) / 2 - (f.x - ((o = f.left) == null ? 0 : o))},${-_ / 2 + ((s = n.padding) == null ? 0 : s) / 2 - (f.y - ((c = f.top) == null ? 0 : c))})`), k(n, R), n.intersect = function(e) {
895
+ return Y.polygon(n, w, e);
896
+ }, d;
897
+ }), Ee.apply(this, arguments);
898
+ }
899
+ i(Te, "curlyBraces");
900
+ function De(e, t) {
901
+ return Oe.apply(this, arguments);
902
+ }
903
+ function Oe() {
904
+ return Oe = r(function* (e, t) {
905
+ var n, r, i;
906
+ let { labelStyles: a, nodeStyles: o } = x(t);
907
+ t.labelStyle = a;
908
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = Math.max(20, (d.width + c * 2) * 1.25, (r = t == null ? void 0 : t.width) == null ? 0 : r), p = Math.max(5, d.height + l * 2, (i = t == null ? void 0 : t.height) == null ? 0 : i), m = p / 2, { cssStyles: h } = t, g = E.svg(u), _ = b(t, {});
909
+ t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
910
+ let v = f, y = p, S = v - m, C = y / 4, w = [
911
+ {
912
+ x: S,
913
+ y: 0
914
+ },
915
+ {
916
+ x: C,
917
+ y: 0
918
+ },
919
+ {
920
+ x: 0,
921
+ y: y / 2
922
+ },
923
+ {
924
+ x: C,
925
+ y
926
+ },
927
+ {
928
+ x: S,
929
+ y
930
+ },
931
+ ...N(-S, -y / 2, m, 50, 270, 90)
932
+ ], T = j(w), O = g.path(T, _), M = u.insert(() => O, ":first-child");
933
+ return M.attr("class", "basic label-container outer-path"), h && t.look !== "handDrawn" && M.selectChildren("path").attr("style", h), o && t.look !== "handDrawn" && M.selectChildren("path").attr("style", o), M.attr("transform", `translate(${-f / 2}, ${-p / 2})`), k(t, M), t.intersect = function(e) {
934
+ return Y.polygon(t, w, e);
935
+ }, u;
936
+ }), Oe.apply(this, arguments);
937
+ }
938
+ i(De, "curvedTrapezoid");
939
+ var ke = /* @__PURE__ */ i((e, t, n, r, i, a) => [
940
+ `M${e},${t + a}`,
941
+ `a${i},${a} 0,0,0 ${n},0`,
942
+ `a${i},${a} 0,0,0 ${-n},0`,
943
+ `l0,${r}`,
944
+ `a${i},${a} 0,0,0 ${n},0`,
945
+ `l0,${-r}`
946
+ ].join(" "), "createCylinderPathD"), Ae = /* @__PURE__ */ i((e, t, n, r, i, a) => [
947
+ `M${e},${t + a}`,
948
+ `M${e + n},${t + a}`,
949
+ `a${i},${a} 0,0,0 ${-n},0`,
950
+ `l0,${r}`,
951
+ `a${i},${a} 0,0,0 ${n},0`,
952
+ `l0,${-r}`
953
+ ].join(" "), "createOuterCylinderPathD"), je = /* @__PURE__ */ i((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Me = 8, Ne = 8;
954
+ function Pe(e, t) {
955
+ return Fe.apply(this, arguments);
956
+ }
957
+ function Fe() {
958
+ return Fe = r(function* (e, t) {
959
+ var n, r, i, a;
960
+ let { labelStyles: o, nodeStyles: s } = x(t);
961
+ t.labelStyle = o;
962
+ let c = (n = t.padding) == null ? 0 : n, l = t.look === "neo" ? 24 : c, u = t.look === "neo" ? 24 : c;
963
+ if (t.width || t.height) {
964
+ var d, f, p;
965
+ let e = (d = t.width) == null ? 0 : d;
966
+ t.width = ((f = t.width) == null ? 0 : f) - u, t.width < Ne && (t.width = Ne);
967
+ let n = e / 2 / (2.5 + e / 50);
968
+ t.height = ((p = t.height) == null ? 0 : p) - l - n * 3, t.height < Me && (t.height = Me);
969
+ }
970
+ let { shapeSvg: m, bbox: h, label: g } = yield D(e, t, A(t)), v = (t.width ? t.width : h.width) + u, y = v / 2, S = y / (2.5 + v / 50), C = (t.height ? t.height : h.height) + l + S, w, { cssStyles: T } = t;
971
+ if (t.look === "handDrawn") {
972
+ let e = E.svg(m), n = Ae(0, 0, v, C, y, S), r = je(0, S, v, C, y, S), i = b(t, {}), a = e.path(n, i), o = e.path(r, b(t, { fill: "none" }));
973
+ w = m.insert(() => o, ":first-child"), w = m.insert(() => a, ":first-child"), w.attr("class", "basic label-container"), T && w.attr("style", T);
974
+ } else {
975
+ let e = ke(0, 0, v, C, y, S);
976
+ w = m.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", _(T)).attr("style", s);
977
+ }
978
+ return w.attr("label-offset-y", S), w.attr("transform", `translate(${-v / 2}, ${-(C / 2 + S)})`), k(t, w), g.attr("transform", `translate(${-(h.width / 2) - (h.x - ((r = h.left) == null ? 0 : r))}, ${-(h.height / 2) + ((i = t.padding) == null ? 0 : i) / 1.5 - (h.y - ((a = h.top) == null ? 0 : a))})`), t.intersect = function(e) {
979
+ var n, r, i, a, o;
980
+ let s = Y.rect(t, e), c = s.x - ((n = t.x) == null ? 0 : n);
981
+ if (y != 0 && (Math.abs(c) < ((r = t.width) == null ? 0 : r) / 2 || Math.abs(c) == ((i = t.width) == null ? 0 : i) / 2 && Math.abs(s.y - ((a = t.y) == null ? 0 : a)) > ((o = t.height) == null ? 0 : o) / 2 - S)) {
982
+ var l;
983
+ let n = S * S * (1 - c * c / (y * y));
984
+ n > 0 && (n = Math.sqrt(n)), n = S - n, e.y - ((l = t.y) == null ? 0 : l) > 0 && (n = -n), s.y += n;
985
+ }
986
+ return s;
987
+ }, m;
988
+ }), Fe.apply(this, arguments);
989
+ }
990
+ i(Pe, "cylinder");
991
+ function Ie(e, t, n) {
992
+ return Le.apply(this, arguments);
993
+ }
994
+ function Le() {
995
+ return Le = r(function* (e, t, n) {
996
+ let { labelStyles: r, nodeStyles: i } = x(t);
997
+ t.labelStyle = r;
998
+ let { shapeSvg: a, bbox: o } = yield D(e, t, A(t)), s = Math.max(o.width + n.labelPaddingX * 2, (t == null ? void 0 : t.width) || 0), c = Math.max(o.height + n.labelPaddingY * 2, (t == null ? void 0 : t.height) || 0), l = -s / 2, u = -c / 2, d, { rx: f, ry: p } = t, { cssStyles: m } = t;
999
+ if (n != null && n.rx && n.ry && (f = n.rx, p = n.ry), t.look === "handDrawn") {
1000
+ let e = E.svg(a), n = b(t, {}), r = f || p ? e.path(L(l, u, s, c, f || 0), n) : e.rectangle(l, u, s, c, n);
1001
+ d = a.insert(() => r, ":first-child"), d.attr("class", "basic label-container").attr("style", _(m));
1002
+ } else d = a.insert("rect", ":first-child"), d.attr("class", "basic label-container").attr("style", i).attr("rx", _(f)).attr("ry", _(p)).attr("x", l).attr("y", u).attr("width", s).attr("height", c);
1003
+ return k(t, d), t.calcIntersect = function(e, t) {
1004
+ return Y.rect(e, t);
1005
+ }, t.intersect = function(e) {
1006
+ return Y.rect(t, e);
1007
+ }, a;
1008
+ }), Le.apply(this, arguments);
1009
+ }
1010
+ i(Ie, "drawRect");
1011
+ function Re(e, t) {
1012
+ return ze.apply(this, arguments);
1013
+ }
1014
+ function ze() {
1015
+ return ze = r(function* (e, t) {
1016
+ var n, r, i;
1017
+ let { cssClasses: a, labelPaddingX: o, labelPaddingY: s, padding: c, width: l, height: u } = t, d = yield Ie(e, t, {
1018
+ rx: 0,
1019
+ ry: 0,
1020
+ classes: a == null ? "" : a,
1021
+ labelPaddingX: o == null ? (c == null ? 0 : c) * 2 : o,
1022
+ labelPaddingY: (n = s == null ? c : s) == null ? 0 : n
1023
+ });
1024
+ if (t.look === "handDrawn") {
1025
+ let e = E.svg(d), n = b(t, {}), r = d.select(".basic.label-container > path:nth-child(2)"), i = r.node();
1026
+ if (!i) return d;
1027
+ let a = null;
1028
+ if (i instanceof SVGGraphicsElement) a = i.getBBox();
1029
+ else return d;
1030
+ return d.insert(() => e.line(a.x, a.y, a.x + a.width, a.y, n), ".basic.label-container g.label"), d.insert(() => e.line(a.x, a.y + a.height, a.x + a.width, a.y + a.height, n), ".basic.label-container g.label"), r.remove(), d;
1031
+ }
1032
+ let f = d.select(".basic.label-container"), p = (r = Number(f.attr("width")) || l) == null ? 0 : r, m = (i = Number(f.attr("height")) || u) == null ? 0 : i;
1033
+ return p > 0 && m > 0 && f.attr("stroke-dasharray", `${p} ${m}`), d;
1034
+ }), ze.apply(this, arguments);
1035
+ }
1036
+ i(Re, "datastore");
1037
+ function Be(e, t) {
1038
+ return Ve.apply(this, arguments);
1039
+ }
1040
+ function Ve() {
1041
+ return Ve = r(function* (e, t) {
1042
+ var n, r, i, a, o, s;
1043
+ let { labelStyles: c, nodeStyles: l } = x(t);
1044
+ t.labelStyle = c;
1045
+ let u = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, d = t.look === "neo" ? 16 : (r = t.padding) == null ? 0 : r, { shapeSvg: f, bbox: p, label: m } = yield D(e, t, A(t)), h = p.width + u, g = p.height + d, _ = g * .2, v = -h / 2, y = -g / 2 - _ / 2, { cssStyles: S } = t, C = E.svg(f), w = b(t, {});
1046
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1047
+ let T = [
1048
+ {
1049
+ x: v,
1050
+ y: y + _
1051
+ },
1052
+ {
1053
+ x: -v,
1054
+ y: y + _
1055
+ },
1056
+ {
1057
+ x: -v,
1058
+ y: -y
1059
+ },
1060
+ {
1061
+ x: v,
1062
+ y: -y
1063
+ },
1064
+ {
1065
+ x: v,
1066
+ y
1067
+ },
1068
+ {
1069
+ x: -v,
1070
+ y
1071
+ },
1072
+ {
1073
+ x: -v,
1074
+ y: y + _
1075
+ }
1076
+ ], O = C.polygon(T.map((e) => [e.x, e.y]), w), j = f.insert(() => O, ":first-child");
1077
+ return j.attr("class", "basic label-container outer-path"), S && t.look !== "handDrawn" && j.selectAll("path").attr("style", S), l && t.look !== "handDrawn" && j.selectAll("path").attr("style", l), m.attr("transform", `translate(${v + ((i = t.padding) == null ? 0 : i) / 2 - (p.x - ((a = p.left) == null ? 0 : a))}, ${y + _ + ((o = t.padding) == null ? 0 : o) / 2 - (p.y - ((s = p.top) == null ? 0 : s))})`), k(t, j), t.intersect = function(e) {
1078
+ return Y.rect(t, e);
1079
+ }, f;
1080
+ }), Ve.apply(this, arguments);
1081
+ }
1082
+ i(Be, "dividedRectangle");
1083
+ function He(e, t) {
1084
+ return Ue.apply(this, arguments);
1085
+ }
1086
+ function Ue() {
1087
+ return Ue = r(function* (e, t) {
1088
+ var n;
1089
+ let { labelStyles: r, nodeStyles: i } = x(t), o = t.look === "neo" ? 12 : 5;
1090
+ t.labelStyle = r;
1091
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, { shapeSvg: l, bbox: u } = yield D(e, t, A(t)), d = (t != null && t.width ? (t == null ? void 0 : t.width) / 2 : u.width / 2) + (c == null ? 0 : c), f = d - o, p, { cssStyles: m } = t;
1092
+ if (t.look === "handDrawn") {
1093
+ var h, g;
1094
+ let e = E.svg(l), n = b(t, {
1095
+ roughness: .2,
1096
+ strokeWidth: 2.5
1097
+ }), r = b(t, {
1098
+ roughness: .2,
1099
+ strokeWidth: 1.5
1100
+ }), i = e.circle(0, 0, d * 2, n), a = e.circle(0, 0, f * 2, r);
1101
+ p = l.insert("g", ":first-child"), p.attr("class", _(t.cssClasses)).attr("style", _(m)), (h = p.node()) == null || h.appendChild(i), (g = p.node()) == null || g.appendChild(a);
1102
+ } else {
1103
+ p = l.insert("g", ":first-child");
1104
+ let e = p.insert("circle", ":first-child"), t = p.insert("circle");
1105
+ p.attr("class", "basic label-container").attr("style", i), e.attr("class", "outer-circle").attr("style", i).attr("r", d).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", i).attr("r", f).attr("cx", 0).attr("cy", 0);
1106
+ }
1107
+ return k(t, p), t.intersect = function(e) {
1108
+ return a.info("DoubleCircle intersect", t, d, e), Y.circle(t, d, e);
1109
+ }, l;
1110
+ }), Ue.apply(this, arguments);
1111
+ }
1112
+ i(He, "doublecircle");
1113
+ function We(e, t, { config: { themeVariables: n } }) {
1114
+ var r;
1115
+ let { labelStyles: i, nodeStyles: o } = x(t);
1116
+ t.label = "", t.labelStyle = i;
1117
+ let s = e.insert("g").attr("class", A(t)).attr("id", (r = t.domId) == null ? t.id : r), { cssStyles: c } = t, l = E.svg(s), { nodeBorder: u } = n, d = b(t, { fillStyle: "solid" });
1118
+ t.look !== "handDrawn" && (d.roughness = 0);
1119
+ let f = l.circle(0, 0, 14, d), p = s.insert(() => f, ":first-child");
1120
+ return p.selectAll("path").attr("style", `fill: ${u} !important;`), c && c.length > 0 && t.look !== "handDrawn" && p.selectAll("path").attr("style", c), o && t.look !== "handDrawn" && p.selectAll("path").attr("style", o), k(t, p), t.intersect = function(e) {
1121
+ return a.info("filledCircle intersect", t, {
1122
+ radius: 7,
1123
+ point: e
1124
+ }), Y.circle(t, 7, e);
1125
+ }, s;
1126
+ }
1127
+ i(We, "filledCircle");
1128
+ var Ge = 10, Ke = 10;
1129
+ function qe(e, t) {
1130
+ return Je.apply(this, arguments);
1131
+ }
1132
+ function Je() {
1133
+ return Je = r(function* (e, t) {
1134
+ var n, r, i, o;
1135
+ let { labelStyles: s, nodeStyles: c } = x(t);
1136
+ t.labelStyle = s;
1137
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? l * 2 : l;
1138
+ if (t.width || t.height) {
1139
+ var d, f;
1140
+ t.height = (d = t == null ? void 0 : t.height) == null ? 0 : d, t.height < Ge && (t.height = Ge), t.width = ((f = t == null ? void 0 : t.width) == null ? 0 : f) - u - u / 2, t.width < Ke && (t.width = Ke);
1141
+ }
1142
+ let { shapeSvg: p, bbox: m, label: h } = yield D(e, t, A(t)), g = (t != null && t.width ? t == null ? void 0 : t.width : m.width) + (u == null ? 0 : u), _ = t != null && t.height ? t == null ? void 0 : t.height : g + m.height, v = _, y = [
1143
+ {
1144
+ x: 0,
1145
+ y: -_
1146
+ },
1147
+ {
1148
+ x: v,
1149
+ y: -_
1150
+ },
1151
+ {
1152
+ x: v / 2,
1153
+ y: 0
1154
+ }
1155
+ ], { cssStyles: S } = t, C = E.svg(p), w = b(t, {});
1156
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1157
+ let T = j(y), O = C.path(T, w), M = p.insert(() => O, ":first-child").attr("transform", `translate(${-_ / 2}, ${_ / 2})`).attr("class", "outer-path");
1158
+ return S && t.look !== "handDrawn" && M.selectChildren("path").attr("style", S), c && t.look !== "handDrawn" && M.selectChildren("path").attr("style", c), t.width = g, t.height = _, k(t, M), h.attr("transform", `translate(${-m.width / 2 - (m.x - ((r = m.left) == null ? 0 : r))}, ${-_ / 2 + ((i = t.padding) == null ? 0 : i) / 2 + (m.y - ((o = m.top) == null ? 0 : o))})`), t.intersect = function(e) {
1159
+ return a.info("Triangle intersect", t, y, e), Y.polygon(t, y, e);
1160
+ }, p;
1161
+ }), Je.apply(this, arguments);
1162
+ }
1163
+ i(qe, "flippedTriangle");
1164
+ function Ye(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
1165
+ var a, o, s, c;
1166
+ let { nodeStyles: l } = x(t);
1167
+ t.label = "";
1168
+ let u = e.insert("g").attr("class", A(t)).attr("id", (a = t.domId) == null ? t.id : a), { cssStyles: d } = t, f = Math.max(70, (o = t == null ? void 0 : t.width) == null ? 0 : o), p = Math.max(10, (s = t == null ? void 0 : t.height) == null ? 0 : s);
1169
+ if (n === "LR") {
1170
+ var m, h;
1171
+ f = Math.max(10, (m = t == null ? void 0 : t.width) == null ? 0 : m), p = Math.max(70, (h = t == null ? void 0 : t.height) == null ? 0 : h);
1172
+ }
1173
+ let g = -1 * f / 2, _ = -1 * p / 2, v = E.svg(u), y = b(t, {
1174
+ stroke: i.lineColor,
1175
+ fill: i.lineColor
1176
+ });
1177
+ t.look !== "handDrawn" && (y.roughness = 0, y.fillStyle = "solid");
1178
+ let S = v.rectangle(g, _, f, p, y), C = u.insert(() => S, ":first-child");
1179
+ d && t.look !== "handDrawn" && C.selectAll("path").attr("style", d), l && t.look !== "handDrawn" && C.selectAll("path").attr("style", l), k(t, C);
1180
+ let w = (c = r == null ? void 0 : r.padding) == null ? 0 : c;
1181
+ return t.width && t.height && (t.width += w / 2 || 0, t.height += w / 2 || 0), t.intersect = function(e) {
1182
+ return Y.rect(t, e);
1183
+ }, u;
1184
+ }
1185
+ i(Ye, "forkJoin");
1186
+ function Xe(e, t) {
1187
+ return Ze.apply(this, arguments);
1188
+ }
1189
+ function Ze() {
1190
+ return Ze = r(function* (e, t) {
1191
+ var n, r;
1192
+ let { labelStyles: i, nodeStyles: o } = x(t);
1193
+ t.labelStyle = i;
1194
+ let s = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 12 : (r = t.padding) == null ? 0 : r;
1195
+ if (t.width || t.height) {
1196
+ var l, u;
1197
+ t.height = ((l = t == null ? void 0 : t.height) == null ? 0 : l) - c * 2, t.height < 10 && (t.height = 10), t.width = ((u = t == null ? void 0 : t.width) == null ? 0 : u) - s * 2, t.width < 15 && (t.width = 15);
1198
+ }
1199
+ let { shapeSvg: d, bbox: f } = yield D(e, t, A(t)), p = (t != null && t.width ? t == null ? void 0 : t.width : Math.max(15, f.width)) + s * 2, m = (t != null && t.height ? t == null ? void 0 : t.height : Math.max(10, f.height)) + c * 2, h = m / 2, { cssStyles: g } = t, _ = E.svg(d), v = b(t, {});
1200
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
1201
+ let y = [
1202
+ {
1203
+ x: -p / 2,
1204
+ y: -m / 2
1205
+ },
1206
+ {
1207
+ x: p / 2 - h,
1208
+ y: -m / 2
1209
+ },
1210
+ ...N(-p / 2 + h, 0, h, 50, 90, 270),
1211
+ {
1212
+ x: p / 2 - h,
1213
+ y: m / 2
1214
+ },
1215
+ {
1216
+ x: -p / 2,
1217
+ y: m / 2
1218
+ }
1219
+ ], S = j(y), C = _.path(S, v), w = d.insert(() => C, ":first-child");
1220
+ return w.attr("class", "basic label-container outer-path"), g && t.look !== "handDrawn" && w.selectChildren("path").attr("style", g), o && t.look !== "handDrawn" && w.selectChildren("path").attr("style", o), k(t, w), t.intersect = function(e) {
1221
+ return a.info("Pill intersect", t, {
1222
+ radius: h,
1223
+ point: e
1224
+ }), Y.polygon(t, y, e);
1225
+ }, d;
1226
+ }), Ze.apply(this, arguments);
1227
+ }
1228
+ i(Xe, "halfRoundedRectangle");
1229
+ var Qe = /* @__PURE__ */ i((e, t, n, r, i) => [
1230
+ `M${e + i},${t}`,
1231
+ `L${e + n - i},${t}`,
1232
+ `L${e + n},${t - r / 2}`,
1233
+ `L${e + n - i},${t - r}`,
1234
+ `L${e + i},${t - r}`,
1235
+ `L${e},${t - r / 2}`,
1236
+ "Z"
1237
+ ].join(" "), "createHexagonPathD");
1238
+ function $e(e, t) {
1239
+ return et.apply(this, arguments);
1240
+ }
1241
+ function et() {
1242
+ return et = r(function* (e, t) {
1243
+ var n;
1244
+ let { labelStyles: r, nodeStyles: i } = x(t), a = t.look === "neo" ? 3.5 : 4;
1245
+ t.labelStyle = r;
1246
+ let o = (n = t.padding) == null ? 0 : n, s = t.look === "neo" ? 70 : o, c = t.look === "neo" ? 32 : o;
1247
+ if (t.width || t.height) {
1248
+ var l, u, d;
1249
+ let e = ((l = t.height) == null ? 0 : l) / a;
1250
+ t.width = ((u = t == null ? void 0 : t.width) == null ? 0 : u) - 2 * e - c, t.height = ((d = t.height) == null ? 0 : d) - s;
1251
+ }
1252
+ let { shapeSvg: f, bbox: p } = yield D(e, t, A(t)), m = (t != null && t.height ? t == null ? void 0 : t.height : p.height) + s, h = m / a, g = (t != null && t.width ? t == null ? void 0 : t.width : p.width) + 2 * h + c, _ = [
1253
+ {
1254
+ x: h,
1255
+ y: 0
1256
+ },
1257
+ {
1258
+ x: g - h,
1259
+ y: 0
1260
+ },
1261
+ {
1262
+ x: g,
1263
+ y: -m / 2
1264
+ },
1265
+ {
1266
+ x: g - h,
1267
+ y: -m
1268
+ },
1269
+ {
1270
+ x: h,
1271
+ y: -m
1272
+ },
1273
+ {
1274
+ x: 0,
1275
+ y: -m / 2
1276
+ }
1277
+ ], v, { cssStyles: y } = t;
1278
+ if (t.look === "handDrawn") {
1279
+ let e = E.svg(f), n = b(t, {}), r = Qe(0, 0, g, m, h), i = e.path(r, n);
1280
+ v = f.insert(() => i, ":first-child").attr("transform", `translate(${-g / 2}, ${m / 2})`), y && v.attr("style", y);
1281
+ } else v = ue(f, g, m, _);
1282
+ return i && v.attr("style", i), t.width = g, t.height = m, k(t, v), t.intersect = function(e) {
1283
+ return Y.polygon(t, _, e);
1284
+ }, f;
1285
+ }), et.apply(this, arguments);
1286
+ }
1287
+ i($e, "hexagon");
1288
+ function tt(e, t) {
1289
+ return nt.apply(this, arguments);
1290
+ }
1291
+ function nt() {
1292
+ return nt = r(function* (e, t) {
1293
+ var n, r;
1294
+ let { labelStyles: i, nodeStyles: o } = x(t);
1295
+ t.label = "", t.labelStyle = i;
1296
+ let { shapeSvg: s } = yield D(e, t, A(t)), c = Math.max(30, (n = t == null ? void 0 : t.width) == null ? 0 : n), l = Math.max(30, (r = t == null ? void 0 : t.height) == null ? 0 : r), { cssStyles: u } = t, d = E.svg(s), f = b(t, {});
1297
+ t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
1298
+ let p = [
1299
+ {
1300
+ x: 0,
1301
+ y: 0
1302
+ },
1303
+ {
1304
+ x: c,
1305
+ y: 0
1306
+ },
1307
+ {
1308
+ x: 0,
1309
+ y: l
1310
+ },
1311
+ {
1312
+ x: c,
1313
+ y: l
1314
+ }
1315
+ ], m = j(p), h = d.path(m, f), g = s.insert(() => h, ":first-child");
1316
+ return g.attr("class", "basic label-container outer-path"), u && t.look !== "handDrawn" && g.selectChildren("path").attr("style", u), o && t.look !== "handDrawn" && g.selectChildren("path").attr("style", o), g.attr("transform", `translate(${-c / 2}, ${-l / 2})`), k(t, g), t.intersect = function(e) {
1317
+ return a.info("Pill intersect", t, { points: p }), Y.polygon(t, p, e);
1318
+ }, s;
1319
+ }), nt.apply(this, arguments);
1320
+ }
1321
+ i(tt, "hourglass");
1322
+ function rt(e, t, n) {
1323
+ return it.apply(this, arguments);
1324
+ }
1325
+ function it() {
1326
+ return it = r(function* (e, n, { config: { themeVariables: r, flowchart: i } }) {
1327
+ var o, s, c;
1328
+ let { labelStyles: l } = x(n);
1329
+ n.labelStyle = l;
1330
+ let u = (o = n.assetHeight) == null ? 48 : o, d = (s = n.assetWidth) == null ? 48 : s, f = Math.max(u, d), p = i == null ? void 0 : i.wrappingWidth;
1331
+ n.width = Math.max(f, p == null ? 0 : p);
1332
+ let { shapeSvg: m, bbox: h, label: g } = yield D(e, n, "icon-shape default"), _ = n.pos === "t", v = f, y = f, { nodeBorder: S } = r, { stylesMap: w } = C(n), O = -y / 2, A = -v / 2, j = n.label ? 8 : 0, M = E.svg(m), N = b(n, {
1333
+ stroke: "none",
1334
+ fill: "none"
1335
+ });
1336
+ n.look !== "handDrawn" && (N.roughness = 0, N.fillStyle = "solid");
1337
+ let P = M.rectangle(O, A, y, v, N), F = Math.max(y, h.width), I = v + h.height + j, L = M.rectangle(-F / 2, -I / 2, F, I, t(t({}, N), {}, {
1338
+ fill: "transparent",
1339
+ stroke: "none"
1340
+ })), R = m.insert(() => P, ":first-child"), z = m.insert(() => L);
1341
+ if (n.icon) {
1342
+ var B;
1343
+ let e = m.append("g");
1344
+ e.html(`<g>${yield T(n.icon, {
1345
+ height: f,
1346
+ width: f,
1347
+ fallbackPrefix: ""
1348
+ })}</g>`);
1349
+ let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1350
+ e.attr("transform", `translate(${-r / 2 - a},${_ ? h.height / 2 + j / 2 - i / 2 - o : -h.height / 2 - j / 2 - i / 2 - o})`), e.attr("style", `color: ${(B = w.get("stroke")) == null ? S : B};`);
1351
+ }
1352
+ return g.attr("transform", `translate(${-h.width / 2 - (h.x - ((c = h.left) == null ? 0 : c))},${_ ? -I / 2 : I / 2 - h.height})`), R.attr("transform", `translate(0,${_ ? h.height / 2 + j / 2 : -h.height / 2 - j / 2})`), k(n, z), n.intersect = function(e) {
1353
+ var t, r, i;
1354
+ if (a.info("iconSquare intersect", n, e), !n.label) return Y.rect(n, e);
1355
+ let o = (t = n.x) == null ? 0 : t, s = (r = n.y) == null ? 0 : r, c = (i = n.height) == null ? 0 : i, l = [];
1356
+ return l = _ ? [
1357
+ {
1358
+ x: o - h.width / 2,
1359
+ y: s - c / 2
1360
+ },
1361
+ {
1362
+ x: o + h.width / 2,
1363
+ y: s - c / 2
1364
+ },
1365
+ {
1366
+ x: o + h.width / 2,
1367
+ y: s - c / 2 + h.height + j
1368
+ },
1369
+ {
1370
+ x: o + y / 2,
1371
+ y: s - c / 2 + h.height + j
1372
+ },
1373
+ {
1374
+ x: o + y / 2,
1375
+ y: s + c / 2
1376
+ },
1377
+ {
1378
+ x: o - y / 2,
1379
+ y: s + c / 2
1380
+ },
1381
+ {
1382
+ x: o - y / 2,
1383
+ y: s - c / 2 + h.height + j
1384
+ },
1385
+ {
1386
+ x: o - h.width / 2,
1387
+ y: s - c / 2 + h.height + j
1388
+ }
1389
+ ] : [
1390
+ {
1391
+ x: o - y / 2,
1392
+ y: s - c / 2
1393
+ },
1394
+ {
1395
+ x: o + y / 2,
1396
+ y: s - c / 2
1397
+ },
1398
+ {
1399
+ x: o + y / 2,
1400
+ y: s - c / 2 + v
1401
+ },
1402
+ {
1403
+ x: o + h.width / 2,
1404
+ y: s - c / 2 + v
1405
+ },
1406
+ {
1407
+ x: o + h.width / 2 / 2,
1408
+ y: s + c / 2
1409
+ },
1410
+ {
1411
+ x: o - h.width / 2,
1412
+ y: s + c / 2
1413
+ },
1414
+ {
1415
+ x: o - h.width / 2,
1416
+ y: s - c / 2 + v
1417
+ },
1418
+ {
1419
+ x: o - y / 2,
1420
+ y: s - c / 2 + v
1421
+ }
1422
+ ], Y.polygon(n, l, e);
1423
+ }, m;
1424
+ }), it.apply(this, arguments);
1425
+ }
1426
+ i(rt, "icon");
1427
+ function at(e, t, n) {
1428
+ return ot.apply(this, arguments);
1429
+ }
1430
+ function ot() {
1431
+ return ot = r(function* (e, n, { config: { themeVariables: r, flowchart: i } }) {
1432
+ var o, s, c, l;
1433
+ let { labelStyles: u } = x(n);
1434
+ n.labelStyle = u;
1435
+ let d = (o = n.assetHeight) == null ? 48 : o, f = (s = n.assetWidth) == null ? 48 : s, p = Math.max(d, f), m = i == null ? void 0 : i.wrappingWidth;
1436
+ n.width = Math.max(p, m == null ? 0 : m);
1437
+ let { shapeSvg: h, bbox: g, label: _ } = yield D(e, n, "icon-shape default"), v = n.label ? 8 : 0, y = n.pos === "t", { nodeBorder: S, mainBkg: w } = r, { stylesMap: O } = C(n), A = E.svg(h), j = b(n, {});
1438
+ n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid");
1439
+ let M = O.get("fill");
1440
+ j.stroke = M == null ? w : M;
1441
+ let N = h.append("g");
1442
+ n.icon && N.html(`<g>${yield T(n.icon, {
1443
+ height: p,
1444
+ width: p,
1445
+ fallbackPrefix: ""
1446
+ })}</g>`);
1447
+ let P = N.node().getBBox(), F = P.width, I = P.height, L = P.x, R = P.y, z = Math.max(F, I) * Math.SQRT2 + 40, B = A.circle(0, 0, z, j), V = Math.max(z, g.width), H = z + g.height + v, U = A.rectangle(-V / 2, -H / 2, V, H, t(t({}, j), {}, {
1448
+ fill: "transparent",
1449
+ stroke: "none"
1450
+ })), W = h.insert(() => B, ":first-child"), G = h.insert(() => U);
1451
+ return N.attr("transform", `translate(${-F / 2 - L},${y ? g.height / 2 + v / 2 - I / 2 - R : -g.height / 2 - v / 2 - I / 2 - R})`), N.attr("style", `color: ${(c = O.get("stroke")) == null ? S : c};`), _.attr("transform", `translate(${-g.width / 2 - (g.x - ((l = g.left) == null ? 0 : l))},${y ? -H / 2 : H / 2 - g.height})`), W.attr("transform", `translate(0,${y ? g.height / 2 + v / 2 : -g.height / 2 - v / 2})`), k(n, G), n.intersect = function(e) {
1452
+ return a.info("iconSquare intersect", n, e), Y.rect(n, e);
1453
+ }, h;
1454
+ }), ot.apply(this, arguments);
1455
+ }
1456
+ i(at, "iconCircle");
1457
+ function st(e, t, n) {
1458
+ return ct.apply(this, arguments);
1459
+ }
1460
+ function ct() {
1461
+ return ct = r(function* (e, n, { config: { themeVariables: r, flowchart: i } }) {
1462
+ var o, s, c;
1463
+ let { labelStyles: l } = x(n);
1464
+ n.labelStyle = l;
1465
+ let u = (o = n.assetHeight) == null ? 48 : o, d = (s = n.assetWidth) == null ? 48 : s, f = Math.max(u, d), p = i == null ? void 0 : i.wrappingWidth;
1466
+ n.width = Math.max(f, p == null ? 0 : p);
1467
+ let { shapeSvg: m, bbox: h, halfPadding: g, label: _ } = yield D(e, n, "icon-shape default"), v = n.pos === "t", y = f + g * 2, S = f + g * 2, { nodeBorder: w, mainBkg: O } = r, { stylesMap: A } = C(n), j = -S / 2, M = -y / 2, N = n.label ? 8 : 0, P = E.svg(m), F = b(n, {});
1468
+ n.look !== "handDrawn" && (F.roughness = 0, F.fillStyle = "solid");
1469
+ let I = A.get("fill");
1470
+ F.stroke = I == null ? O : I;
1471
+ let R = P.path(L(j, M, S, y, 5), F), z = Math.max(S, h.width), B = y + h.height + N, V = P.rectangle(-z / 2, -B / 2, z, B, t(t({}, F), {}, {
1472
+ fill: "transparent",
1473
+ stroke: "none"
1474
+ })), H = m.insert(() => R, ":first-child").attr("class", "icon-shape2"), U = m.insert(() => V);
1475
+ if (n.icon) {
1476
+ var W;
1477
+ let e = m.append("g");
1478
+ e.html(`<g>${yield T(n.icon, {
1479
+ height: f,
1480
+ width: f,
1481
+ fallbackPrefix: ""
1482
+ })}</g>`);
1483
+ let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1484
+ e.attr("transform", `translate(${-r / 2 - a},${v ? h.height / 2 + N / 2 - i / 2 - o : -h.height / 2 - N / 2 - i / 2 - o})`), e.attr("style", `color: ${(W = A.get("stroke")) == null ? w : W};`);
1485
+ }
1486
+ return _.attr("transform", `translate(${-h.width / 2 - (h.x - ((c = h.left) == null ? 0 : c))},${v ? -B / 2 : B / 2 - h.height})`), H.attr("transform", `translate(0,${v ? h.height / 2 + N / 2 : -h.height / 2 - N / 2})`), k(n, U), n.intersect = function(e) {
1487
+ var t, r, i;
1488
+ if (a.info("iconSquare intersect", n, e), !n.label) return Y.rect(n, e);
1489
+ let o = (t = n.x) == null ? 0 : t, s = (r = n.y) == null ? 0 : r, c = (i = n.height) == null ? 0 : i, l = [];
1490
+ return l = v ? [
1491
+ {
1492
+ x: o - h.width / 2,
1493
+ y: s - c / 2
1494
+ },
1495
+ {
1496
+ x: o + h.width / 2,
1497
+ y: s - c / 2
1498
+ },
1499
+ {
1500
+ x: o + h.width / 2,
1501
+ y: s - c / 2 + h.height + N
1502
+ },
1503
+ {
1504
+ x: o + S / 2,
1505
+ y: s - c / 2 + h.height + N
1506
+ },
1507
+ {
1508
+ x: o + S / 2,
1509
+ y: s + c / 2
1510
+ },
1511
+ {
1512
+ x: o - S / 2,
1513
+ y: s + c / 2
1514
+ },
1515
+ {
1516
+ x: o - S / 2,
1517
+ y: s - c / 2 + h.height + N
1518
+ },
1519
+ {
1520
+ x: o - h.width / 2,
1521
+ y: s - c / 2 + h.height + N
1522
+ }
1523
+ ] : [
1524
+ {
1525
+ x: o - S / 2,
1526
+ y: s - c / 2
1527
+ },
1528
+ {
1529
+ x: o + S / 2,
1530
+ y: s - c / 2
1531
+ },
1532
+ {
1533
+ x: o + S / 2,
1534
+ y: s - c / 2 + y
1535
+ },
1536
+ {
1537
+ x: o + h.width / 2,
1538
+ y: s - c / 2 + y
1539
+ },
1540
+ {
1541
+ x: o + h.width / 2 / 2,
1542
+ y: s + c / 2
1543
+ },
1544
+ {
1545
+ x: o - h.width / 2,
1546
+ y: s + c / 2
1547
+ },
1548
+ {
1549
+ x: o - h.width / 2,
1550
+ y: s - c / 2 + y
1551
+ },
1552
+ {
1553
+ x: o - S / 2,
1554
+ y: s - c / 2 + y
1555
+ }
1556
+ ], Y.polygon(n, l, e);
1557
+ }, m;
1558
+ }), ct.apply(this, arguments);
1559
+ }
1560
+ i(st, "iconRounded");
1561
+ function lt(e, t, n) {
1562
+ return ut.apply(this, arguments);
1563
+ }
1564
+ function ut() {
1565
+ return ut = r(function* (e, n, { config: { themeVariables: r, flowchart: i } }) {
1566
+ var o, s, c;
1567
+ let { labelStyles: l } = x(n);
1568
+ n.labelStyle = l;
1569
+ let u = (o = n.assetHeight) == null ? 48 : o, d = (s = n.assetWidth) == null ? 48 : s, f = Math.max(u, d), p = i == null ? void 0 : i.wrappingWidth;
1570
+ n.width = Math.max(f, p == null ? 0 : p);
1571
+ let { shapeSvg: m, bbox: h, halfPadding: g, label: _ } = yield D(e, n, "icon-shape default"), v = n.pos === "t", y = f + g * 2, S = f + g * 2, { nodeBorder: w, mainBkg: O } = r, { stylesMap: A } = C(n), j = -S / 2, M = -y / 2, N = n.label ? 8 : 0, P = E.svg(m), F = b(n, {});
1572
+ n.look !== "handDrawn" && (F.roughness = 0, F.fillStyle = "solid");
1573
+ let I = A.get("fill");
1574
+ F.stroke = I == null ? O : I;
1575
+ let R = P.path(L(j, M, S, y, .1), F), z = Math.max(S, h.width), B = y + h.height + N, V = P.rectangle(-z / 2, -B / 2, z, B, t(t({}, F), {}, {
1576
+ fill: "transparent",
1577
+ stroke: "none"
1578
+ })), H = m.insert(() => R, ":first-child"), U = m.insert(() => V);
1579
+ if (n.icon) {
1580
+ var W;
1581
+ let e = m.append("g");
1582
+ e.html(`<g>${yield T(n.icon, {
1583
+ height: f,
1584
+ width: f,
1585
+ fallbackPrefix: ""
1586
+ })}</g>`);
1587
+ let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1588
+ e.attr("transform", `translate(${-r / 2 - a},${v ? h.height / 2 + N / 2 - i / 2 - o : -h.height / 2 - N / 2 - i / 2 - o})`), e.attr("style", `color: ${(W = A.get("stroke")) == null ? w : W};`);
1589
+ }
1590
+ return _.attr("transform", `translate(${-h.width / 2 - (h.x - ((c = h.left) == null ? 0 : c))},${v ? -B / 2 : B / 2 - h.height})`), H.attr("transform", `translate(0,${v ? h.height / 2 + N / 2 : -h.height / 2 - N / 2})`), k(n, U), n.intersect = function(e) {
1591
+ var t, r, i;
1592
+ if (a.info("iconSquare intersect", n, e), !n.label) return Y.rect(n, e);
1593
+ let o = (t = n.x) == null ? 0 : t, s = (r = n.y) == null ? 0 : r, c = (i = n.height) == null ? 0 : i, l = [];
1594
+ return l = v ? [
1595
+ {
1596
+ x: o - h.width / 2,
1597
+ y: s - c / 2
1598
+ },
1599
+ {
1600
+ x: o + h.width / 2,
1601
+ y: s - c / 2
1602
+ },
1603
+ {
1604
+ x: o + h.width / 2,
1605
+ y: s - c / 2 + h.height + N
1606
+ },
1607
+ {
1608
+ x: o + S / 2,
1609
+ y: s - c / 2 + h.height + N
1610
+ },
1611
+ {
1612
+ x: o + S / 2,
1613
+ y: s + c / 2
1614
+ },
1615
+ {
1616
+ x: o - S / 2,
1617
+ y: s + c / 2
1618
+ },
1619
+ {
1620
+ x: o - S / 2,
1621
+ y: s - c / 2 + h.height + N
1622
+ },
1623
+ {
1624
+ x: o - h.width / 2,
1625
+ y: s - c / 2 + h.height + N
1626
+ }
1627
+ ] : [
1628
+ {
1629
+ x: o - S / 2,
1630
+ y: s - c / 2
1631
+ },
1632
+ {
1633
+ x: o + S / 2,
1634
+ y: s - c / 2
1635
+ },
1636
+ {
1637
+ x: o + S / 2,
1638
+ y: s - c / 2 + y
1639
+ },
1640
+ {
1641
+ x: o + h.width / 2,
1642
+ y: s - c / 2 + y
1643
+ },
1644
+ {
1645
+ x: o + h.width / 2 / 2,
1646
+ y: s + c / 2
1647
+ },
1648
+ {
1649
+ x: o - h.width / 2,
1650
+ y: s + c / 2
1651
+ },
1652
+ {
1653
+ x: o - h.width / 2,
1654
+ y: s - c / 2 + y
1655
+ },
1656
+ {
1657
+ x: o - S / 2,
1658
+ y: s - c / 2 + y
1659
+ }
1660
+ ], Y.polygon(n, l, e);
1661
+ }, m;
1662
+ }), ut.apply(this, arguments);
1663
+ }
1664
+ i(lt, "iconSquare");
1665
+ function dt(e, t, n) {
1666
+ return ft.apply(this, arguments);
1667
+ }
1668
+ function ft() {
1669
+ return ft = r(function* (e, n, { config: { flowchart: r } }) {
1670
+ var i, o, s, c;
1671
+ let l = new Image();
1672
+ l.src = (i = n == null ? void 0 : n.img) == null ? "" : i, yield l.decode();
1673
+ let u = Number(l.naturalWidth.toString().replace("px", "")), d = Number(l.naturalHeight.toString().replace("px", ""));
1674
+ n.imageAspectRatio = u / d;
1675
+ let { labelStyles: f } = x(n);
1676
+ n.labelStyle = f;
1677
+ let p = r == null ? void 0 : r.wrappingWidth;
1678
+ n.defaultWidth = r == null ? void 0 : r.wrappingWidth;
1679
+ let m = Math.max(n.label ? p == null ? 0 : p : 0, (o = n == null ? void 0 : n.assetWidth) == null ? u : o), h = n.constraint === "on" && n != null && n.assetHeight ? n.assetHeight * n.imageAspectRatio : m, g = n.constraint === "on" ? h / n.imageAspectRatio : (s = n == null ? void 0 : n.assetHeight) == null ? d : s;
1680
+ n.width = Math.max(h, p == null ? 0 : p);
1681
+ let { shapeSvg: _, bbox: v, label: y } = yield D(e, n, "image-shape default"), S = n.pos === "t", C = -h / 2, w = -g / 2, T = n.label ? 8 : 0, O = E.svg(_), A = b(n, {});
1682
+ n.look !== "handDrawn" && (A.roughness = 0, A.fillStyle = "solid");
1683
+ let j = O.rectangle(C, w, h, g, A), M = Math.max(h, v.width), N = g + v.height + T, P = O.rectangle(-M / 2, -N / 2, M, N, t(t({}, A), {}, {
1684
+ fill: "none",
1685
+ stroke: "none"
1686
+ })), F = _.insert(() => j, ":first-child"), I = _.insert(() => P);
1687
+ if (n.img) {
1688
+ let e = _.append("image");
1689
+ e.attr("href", n.img), e.attr("width", h), e.attr("height", g), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-h / 2},${S ? N / 2 - g : -N / 2})`);
1690
+ }
1691
+ return y.attr("transform", `translate(${-v.width / 2 - (v.x - ((c = v.left) == null ? 0 : c))},${S ? -g / 2 - v.height / 2 - T / 2 : g / 2 - v.height / 2 + T / 2})`), F.attr("transform", `translate(0,${S ? v.height / 2 + T / 2 : -v.height / 2 - T / 2})`), k(n, I), n.intersect = function(e) {
1692
+ var t, r, i;
1693
+ if (a.info("iconSquare intersect", n, e), !n.label) return Y.rect(n, e);
1694
+ let o = (t = n.x) == null ? 0 : t, s = (r = n.y) == null ? 0 : r, c = (i = n.height) == null ? 0 : i, l = [];
1695
+ return l = S ? [
1696
+ {
1697
+ x: o - v.width / 2,
1698
+ y: s - c / 2
1699
+ },
1700
+ {
1701
+ x: o + v.width / 2,
1702
+ y: s - c / 2
1703
+ },
1704
+ {
1705
+ x: o + v.width / 2,
1706
+ y: s - c / 2 + v.height + T
1707
+ },
1708
+ {
1709
+ x: o + h / 2,
1710
+ y: s - c / 2 + v.height + T
1711
+ },
1712
+ {
1713
+ x: o + h / 2,
1714
+ y: s + c / 2
1715
+ },
1716
+ {
1717
+ x: o - h / 2,
1718
+ y: s + c / 2
1719
+ },
1720
+ {
1721
+ x: o - h / 2,
1722
+ y: s - c / 2 + v.height + T
1723
+ },
1724
+ {
1725
+ x: o - v.width / 2,
1726
+ y: s - c / 2 + v.height + T
1727
+ }
1728
+ ] : [
1729
+ {
1730
+ x: o - h / 2,
1731
+ y: s - c / 2
1732
+ },
1733
+ {
1734
+ x: o + h / 2,
1735
+ y: s - c / 2
1736
+ },
1737
+ {
1738
+ x: o + h / 2,
1739
+ y: s - c / 2 + g
1740
+ },
1741
+ {
1742
+ x: o + v.width / 2,
1743
+ y: s - c / 2 + g
1744
+ },
1745
+ {
1746
+ x: o + v.width / 2 / 2,
1747
+ y: s + c / 2
1748
+ },
1749
+ {
1750
+ x: o - v.width / 2,
1751
+ y: s + c / 2
1752
+ },
1753
+ {
1754
+ x: o - v.width / 2,
1755
+ y: s - c / 2 + g
1756
+ },
1757
+ {
1758
+ x: o - h / 2,
1759
+ y: s - c / 2 + g
1760
+ }
1761
+ ], Y.polygon(n, l, e);
1762
+ }, _;
1763
+ }), ft.apply(this, arguments);
1764
+ }
1765
+ i(dt, "imageSquare");
1766
+ function pt(e, t) {
1767
+ return mt.apply(this, arguments);
1768
+ }
1769
+ function mt() {
1770
+ return mt = r(function* (e, t) {
1771
+ var n, r, i;
1772
+ let { labelStyles: a, nodeStyles: o } = x(t);
1773
+ t.labelStyle = a;
1774
+ let s = (n = t.padding) == null ? 0 : n, c = s, l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = Math.max(d.width + (l == null ? 0 : l) * 2, (r = t == null ? void 0 : t.width) == null ? 0 : r), p = Math.max(d.height + (c == null ? 0 : c) * 2, (i = t == null ? void 0 : t.height) == null ? 0 : i), m = [
1775
+ {
1776
+ x: 0,
1777
+ y: 0
1778
+ },
1779
+ {
1780
+ x: f,
1781
+ y: 0
1782
+ },
1783
+ {
1784
+ x: f + 3 * p / 6,
1785
+ y: -p
1786
+ },
1787
+ {
1788
+ x: -3 * p / 6,
1789
+ y: -p
1790
+ }
1791
+ ], h, { cssStyles: g } = t;
1792
+ if (t.look === "handDrawn") {
1793
+ let e = E.svg(u), n = b(t, {}), r = j(m), i = e.path(r, n);
1794
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-f / 2}, ${p / 2})`), g && h.attr("style", g);
1795
+ } else h = ue(u, f, p, m);
1796
+ return o && h.attr("style", o), t.width = f, t.height = p, k(t, h), t.intersect = function(e) {
1797
+ return Y.polygon(t, m, e);
1798
+ }, u;
1799
+ }), mt.apply(this, arguments);
1800
+ }
1801
+ i(pt, "inv_trapezoid");
1802
+ function ht(e, t) {
1803
+ return gt.apply(this, arguments);
1804
+ }
1805
+ function gt() {
1806
+ return gt = r(function* (e, t) {
1807
+ var n, r;
1808
+ let { shapeSvg: i, bbox: a, label: o } = yield D(e, t, "label"), s = i.insert("rect", ":first-child");
1809
+ return s.attr("width", .1).attr("height", .1), i.attr("class", "label edgeLabel"), o.attr("transform", `translate(${-(a.width / 2) - (a.x - ((n = a.left) == null ? 0 : n))}, ${-(a.height / 2) - (a.y - ((r = a.top) == null ? 0 : r))})`), k(t, s), t.intersect = function(e) {
1810
+ return Y.rect(t, e);
1811
+ }, i;
1812
+ }), gt.apply(this, arguments);
1813
+ }
1814
+ i(ht, "labelRect");
1815
+ function _t(e, t) {
1816
+ return vt.apply(this, arguments);
1817
+ }
1818
+ function vt() {
1819
+ return vt = r(function* (e, t) {
1820
+ var n, r, i;
1821
+ let { labelStyles: a, nodeStyles: o } = x(t);
1822
+ t.labelStyle = a;
1823
+ let s = (n = t.padding) == null ? 0 : n, c = s, l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = ((r = t == null ? void 0 : t.height) == null ? d.height : r) + c, p = ((i = t == null ? void 0 : t.width) == null ? d.width : i) + l, m = [
1824
+ {
1825
+ x: 0,
1826
+ y: 0
1827
+ },
1828
+ {
1829
+ x: p + 3 * f / 6,
1830
+ y: 0
1831
+ },
1832
+ {
1833
+ x: p,
1834
+ y: -f
1835
+ },
1836
+ {
1837
+ x: -(3 * f) / 6,
1838
+ y: -f
1839
+ }
1840
+ ], h, { cssStyles: g } = t;
1841
+ if (t.look === "handDrawn") {
1842
+ let e = E.svg(u), n = b(t, {}), r = j(m), i = e.path(r, n);
1843
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-p / 2}, ${f / 2})`), g && h.attr("style", g);
1844
+ } else h = ue(u, p, f, m);
1845
+ return o && h.attr("style", o), t.width = p, t.height = f, k(t, h), t.intersect = function(e) {
1846
+ return Y.polygon(t, m, e);
1847
+ }, u;
1848
+ }), vt.apply(this, arguments);
1849
+ }
1850
+ i(_t, "lean_left");
1851
+ function yt(e, t) {
1852
+ return bt.apply(this, arguments);
1853
+ }
1854
+ function bt() {
1855
+ return bt = r(function* (e, t) {
1856
+ var n, r, i;
1857
+ let { labelStyles: a, nodeStyles: o } = x(t);
1858
+ t.labelStyle = a;
1859
+ let s = (n = t.padding) == null ? 0 : n, c = s, l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = ((r = t == null ? void 0 : t.height) == null ? d.height : r) + c, p = ((i = t == null ? void 0 : t.width) == null ? d.width : i) + l, m = [
1860
+ {
1861
+ x: -3 * f / 6,
1862
+ y: 0
1863
+ },
1864
+ {
1865
+ x: p,
1866
+ y: 0
1867
+ },
1868
+ {
1869
+ x: p + 3 * f / 6,
1870
+ y: -f
1871
+ },
1872
+ {
1873
+ x: 0,
1874
+ y: -f
1875
+ }
1876
+ ], h, { cssStyles: g } = t;
1877
+ if (t.look === "handDrawn") {
1878
+ let e = E.svg(u), n = b(t, {}), r = j(m), i = e.path(r, n);
1879
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-p / 2}, ${f / 2})`), g && h.attr("style", g);
1880
+ } else h = ue(u, p, f, m);
1881
+ return o && h.attr("style", o), t.width = p, t.height = f, k(t, h), t.intersect = function(e) {
1882
+ return Y.polygon(t, m, e);
1883
+ }, u;
1884
+ }), bt.apply(this, arguments);
1885
+ }
1886
+ i(yt, "lean_right");
1887
+ function xt(e, t) {
1888
+ var n, r, i;
1889
+ let { labelStyles: o, nodeStyles: s } = x(t);
1890
+ t.label = "", t.labelStyle = o;
1891
+ let c = e.insert("g").attr("class", A(t)).attr("id", (n = t.domId) == null ? t.id : n), { cssStyles: l } = t, u = Math.max(35, (r = t == null ? void 0 : t.width) == null ? 0 : r), d = Math.max(35, (i = t == null ? void 0 : t.height) == null ? 0 : i), f = [
1892
+ {
1893
+ x: u,
1894
+ y: 0
1895
+ },
1896
+ {
1897
+ x: 0,
1898
+ y: d + 7 / 2
1899
+ },
1900
+ {
1901
+ x: u - 14,
1902
+ y: d + 7 / 2
1903
+ },
1904
+ {
1905
+ x: 0,
1906
+ y: 2 * d
1907
+ },
1908
+ {
1909
+ x: u,
1910
+ y: d - 7 / 2
1911
+ },
1912
+ {
1913
+ x: 14,
1914
+ y: d - 7 / 2
1915
+ }
1916
+ ], p = E.svg(c), m = b(t, {});
1917
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
1918
+ let h = j(f), g = p.path(h, m), _ = c.insert(() => g, ":first-child");
1919
+ return _.attr("class", "outer-path"), l && t.look !== "handDrawn" && _.selectAll("path").attr("style", l), s && t.look !== "handDrawn" && _.selectAll("path").attr("style", s), _.attr("transform", `translate(-${u / 2},${-d})`), k(t, _), t.intersect = function(e) {
1920
+ return a.info("lightningBolt intersect", t, e), Y.polygon(t, f, e);
1921
+ }, c;
1922
+ }
1923
+ i(xt, "lightningBolt");
1924
+ var St = /* @__PURE__ */ i((e, t, n, r, i, a, o) => [
1925
+ `M${e},${t + a}`,
1926
+ `a${i},${a} 0,0,0 ${n},0`,
1927
+ `a${i},${a} 0,0,0 ${-n},0`,
1928
+ `l0,${r}`,
1929
+ `a${i},${a} 0,0,0 ${n},0`,
1930
+ `l0,${-r}`,
1931
+ `M${e},${t + a + o}`,
1932
+ `a${i},${a} 0,0,0 ${n},0`
1933
+ ].join(" "), "createCylinderPathD"), Ct = /* @__PURE__ */ i((e, t, n, r, i, a, o) => [
1934
+ `M${e},${t + a}`,
1935
+ `M${e + n},${t + a}`,
1936
+ `a${i},${a} 0,0,0 ${-n},0`,
1937
+ `l0,${r}`,
1938
+ `a${i},${a} 0,0,0 ${n},0`,
1939
+ `l0,${-r}`,
1940
+ `M${e},${t + a + o}`,
1941
+ `a${i},${a} 0,0,0 ${n},0`
1942
+ ].join(" "), "createOuterCylinderPathD"), wt = /* @__PURE__ */ i((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD"), Tt = 10, Et = 10;
1943
+ function Dt(e, t) {
1944
+ return Ot.apply(this, arguments);
1945
+ }
1946
+ function Ot() {
1947
+ return Ot = r(function* (e, t) {
1948
+ var n, r, i;
1949
+ let { labelStyles: a, nodeStyles: o } = x(t);
1950
+ t.labelStyle = a;
1951
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 24 : s;
1952
+ if (t.width || t.height) {
1953
+ var u, d, f;
1954
+ let e = (u = t.width) == null ? 0 : u;
1955
+ t.width = ((d = t.width) == null ? 0 : d) - c, t.width < Et && (t.width = Et);
1956
+ let n = e / 2 / (2.5 + e / 50);
1957
+ t.height = ((f = t.height) == null ? 0 : f) - l - n * 3, t.height < Tt && (t.height = Tt);
1958
+ }
1959
+ let { shapeSvg: p, bbox: m, label: h } = yield D(e, t, A(t)), g = (t != null && t.width ? t == null ? void 0 : t.width : m.width) + c * 2, v = g / 2, y = v / (2.5 + g / 50), S = (t != null && t.height ? t == null ? void 0 : t.height : m.height) + y + l * 2, C = S * .1, w, { cssStyles: T } = t;
1960
+ if (t.look === "handDrawn") {
1961
+ let e = E.svg(p), n = Ct(0, 0, g, S, v, y, C), r = wt(0, y, g, S, v, y), i = b(t, {}), a = e.path(n, i), o = e.path(r, i);
1962
+ p.insert(() => o, ":first-child").attr("class", "line"), w = p.insert(() => a, ":first-child"), w.attr("class", "basic label-container"), T && w.attr("style", T);
1963
+ } else {
1964
+ let e = St(0, 0, g, S, v, y, C);
1965
+ w = p.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container outer-path").attr("style", _(T)).attr("style", o);
1966
+ }
1967
+ return w.attr("label-offset-y", y), w.attr("transform", `translate(${-g / 2}, ${-(S / 2 + y)})`), k(t, w), h.attr("transform", `translate(${-(m.width / 2) - (m.x - ((r = m.left) == null ? 0 : r))}, ${-(m.height / 2) + y - (m.y - ((i = m.top) == null ? 0 : i))})`), t.intersect = function(e) {
1968
+ var n, r, i, a, o;
1969
+ let s = Y.rect(t, e), c = s.x - ((n = t.x) == null ? 0 : n);
1970
+ if (v != 0 && (Math.abs(c) < ((r = t.width) == null ? 0 : r) / 2 || Math.abs(c) == ((i = t.width) == null ? 0 : i) / 2 && Math.abs(s.y - ((a = t.y) == null ? 0 : a)) > ((o = t.height) == null ? 0 : o) / 2 - y)) {
1971
+ var l;
1972
+ let n = y * y * (1 - c * c / (v * v));
1973
+ n > 0 && (n = Math.sqrt(n)), n = y - n, e.y - ((l = t.y) == null ? 0 : l) > 0 && (n = -n), s.y += n;
1974
+ }
1975
+ return s;
1976
+ }, p;
1977
+ }), Ot.apply(this, arguments);
1978
+ }
1979
+ i(Dt, "linedCylinder");
1980
+ function kt(e, t) {
1981
+ return At.apply(this, arguments);
1982
+ }
1983
+ function At() {
1984
+ return At = r(function* (e, t) {
1985
+ var n, r, i, a, o;
1986
+ let { labelStyles: s, nodeStyles: c } = x(t);
1987
+ t.labelStyle = s;
1988
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 16 : l, d = t.look === "neo" ? 12 : l;
1989
+ if (t.width || t.height) {
1990
+ var f;
1991
+ let e = t.width;
1992
+ t.width = (e == null ? 0 : e) * 10 / 11 - u * 2, t.width < 10 && (t.width = 10), t.height = ((f = t == null ? void 0 : t.height) == null ? 0 : f) - d * 2, t.height < 10 && (t.height = 10);
1993
+ }
1994
+ let { shapeSvg: p, bbox: m, label: h } = yield D(e, t, A(t)), g = (t != null && t.width ? t == null ? void 0 : t.width : m.width) + (u == null ? 0 : u) * 2, _ = (t != null && t.height ? t == null ? void 0 : t.height : m.height) + (d == null ? 0 : d) * 2, v = t.look === "neo" ? _ / 4 : _ / 8, y = _ + v, { cssStyles: S } = t, C = E.svg(p), w = b(t, {});
1995
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1996
+ let T = [
1997
+ {
1998
+ x: -g / 2 - g / 2 * .1,
1999
+ y: -y / 2
2000
+ },
2001
+ {
2002
+ x: -g / 2 - g / 2 * .1,
2003
+ y: y / 2
2004
+ },
2005
+ ...M(-g / 2 - g / 2 * .1, y / 2, g / 2 + g / 2 * .1, y / 2, v, .8),
2006
+ {
2007
+ x: g / 2 + g / 2 * .1,
2008
+ y: -y / 2
2009
+ },
2010
+ {
2011
+ x: -g / 2 - g / 2 * .1,
2012
+ y: -y / 2
2013
+ },
2014
+ {
2015
+ x: -g / 2,
2016
+ y: -y / 2
2017
+ },
2018
+ {
2019
+ x: -g / 2,
2020
+ y: y / 2 * 1.1
2021
+ },
2022
+ {
2023
+ x: -g / 2,
2024
+ y: -y / 2
2025
+ }
2026
+ ], O = C.polygon(T.map((e) => [e.x, e.y]), w), j = p.insert(() => O, ":first-child");
2027
+ return j.attr("class", "basic label-container outer-path"), S && t.look !== "handDrawn" && j.selectAll("path").attr("style", S), c && t.look !== "handDrawn" && j.selectAll("path").attr("style", c), j.attr("transform", `translate(0,${-v / 2})`), h.attr("transform", `translate(${-g / 2 + ((r = t.padding) == null ? 0 : r) + g / 2 * .1 / 2 - (m.x - ((i = m.left) == null ? 0 : i))},${-_ / 2 + ((a = t.padding) == null ? 0 : a) - v / 2 - (m.y - ((o = m.top) == null ? 0 : o))})`), k(t, j), t.intersect = function(e) {
2028
+ return Y.polygon(t, T, e);
2029
+ }, p;
2030
+ }), At.apply(this, arguments);
2031
+ }
2032
+ i(kt, "linedWaveEdgedRect");
2033
+ function jt(e, t) {
2034
+ return Mt.apply(this, arguments);
2035
+ }
2036
+ function Mt() {
2037
+ return Mt = r(function* (e, t) {
2038
+ var n, r, i;
2039
+ let { labelStyles: a, nodeStyles: o } = x(t);
2040
+ t.labelStyle = a;
2041
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 16 : s, l = t.look === "neo" ? 12 : s, u = t.look === "neo" ? 10 : 5;
2042
+ if (t.width || t.height) {
2043
+ var d, f;
2044
+ t.width = Math.max(((d = t == null ? void 0 : t.width) == null ? 0 : d) - c * 2 - 2 * u, 10), t.height = Math.max(((f = t == null ? void 0 : t.height) == null ? 0 : f) - l * 2 - 2 * u, 10);
2045
+ }
2046
+ let { shapeSvg: p, bbox: m, label: h } = yield D(e, t, A(t)), g = (t != null && t.width ? t == null ? void 0 : t.width : m.width) + c * 2 + 2 * u, _ = (t != null && t.height ? t == null ? void 0 : t.height : m.height) + l * 2 + 2 * u, v = g - 2 * u, y = _ - 2 * u, S = -v / 2, C = -y / 2, { cssStyles: w } = t, T = E.svg(p), O = b(t, {}), M = [
2047
+ {
2048
+ x: S - u,
2049
+ y: C + u
2050
+ },
2051
+ {
2052
+ x: S - u,
2053
+ y: C + y + u
2054
+ },
2055
+ {
2056
+ x: S + v - u,
2057
+ y: C + y + u
2058
+ },
2059
+ {
2060
+ x: S + v - u,
2061
+ y: C + y
2062
+ },
2063
+ {
2064
+ x: S + v,
2065
+ y: C + y
2066
+ },
2067
+ {
2068
+ x: S + v,
2069
+ y: C + y - u
2070
+ },
2071
+ {
2072
+ x: S + v + u,
2073
+ y: C + y - u
2074
+ },
2075
+ {
2076
+ x: S + v + u,
2077
+ y: C - u
2078
+ },
2079
+ {
2080
+ x: S + u,
2081
+ y: C - u
2082
+ },
2083
+ {
2084
+ x: S + u,
2085
+ y: C
2086
+ },
2087
+ {
2088
+ x: S,
2089
+ y: C
2090
+ },
2091
+ {
2092
+ x: S,
2093
+ y: C + u
2094
+ }
2095
+ ], N = [
2096
+ {
2097
+ x: S,
2098
+ y: C + u
2099
+ },
2100
+ {
2101
+ x: S + v - u,
2102
+ y: C + u
2103
+ },
2104
+ {
2105
+ x: S + v - u,
2106
+ y: C + y
2107
+ },
2108
+ {
2109
+ x: S + v,
2110
+ y: C + y
2111
+ },
2112
+ {
2113
+ x: S + v,
2114
+ y: C
2115
+ },
2116
+ {
2117
+ x: S,
2118
+ y: C
2119
+ }
2120
+ ];
2121
+ t.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
2122
+ let F = j(M), I = T.path(F, O), L = j(N), R = T.path(L, O);
2123
+ t.look !== "handDrawn" && (I = P(I), R = P(R));
2124
+ let z = p.insert("g", ":first-child");
2125
+ return z.insert(() => I), z.insert(() => R), z.attr("class", "basic label-container outer-path"), w && t.look !== "handDrawn" && z.selectAll("path").attr("style", w), o && t.look !== "handDrawn" && z.selectAll("path").attr("style", o), h.attr("transform", `translate(${-(m.width / 2) - u - (m.x - ((r = m.left) == null ? 0 : r))}, ${-(m.height / 2) + u - (m.y - ((i = m.top) == null ? 0 : i))})`), k(t, z), t.intersect = function(e) {
2126
+ return Y.polygon(t, M, e);
2127
+ }, p;
2128
+ }), Mt.apply(this, arguments);
2129
+ }
2130
+ i(jt, "multiRect");
2131
+ function Nt(e, t) {
2132
+ return Pt.apply(this, arguments);
2133
+ }
2134
+ function Pt() {
2135
+ return Pt = r(function* (e, t) {
2136
+ var n, r, i, a, o;
2137
+ let { labelStyles: s, nodeStyles: c } = x(t);
2138
+ t.labelStyle = s;
2139
+ let { shapeSvg: l, bbox: u, label: d } = yield D(e, t, A(t)), f = (n = t.padding) == null ? 0 : n, p = t.look === "neo" ? 16 : f, m = t.look === "neo" ? 12 : f, h = !0;
2140
+ if (t.width || t.height) {
2141
+ var g, _;
2142
+ h = !1, t.width = ((g = t == null ? void 0 : t.width) == null ? 0 : g) - p * 2, t.height = ((_ = t == null ? void 0 : t.height) == null ? 0 : _) - m * 3;
2143
+ }
2144
+ let v = Math.max(u.width, (r = t == null ? void 0 : t.width) == null ? 0 : r) + p * 2, y = Math.max(u.height, (i = t == null ? void 0 : t.height) == null ? 0 : i) + m * 3, S = t.look === "neo" ? y / 4 : y / 8, C = y + (h ? S / 2 : -S / 2), w = -v / 2, T = -C / 2, { cssStyles: O } = t, N = M(w - 10, T + C + 10, w + v - 10, T + C + 10, S, .8), P = N == null ? void 0 : N[N.length - 1], F = [
2145
+ {
2146
+ x: w - 10,
2147
+ y: T + 10
2148
+ },
2149
+ {
2150
+ x: w - 10,
2151
+ y: T + C + 10
2152
+ },
2153
+ ...N,
2154
+ {
2155
+ x: w + v - 10,
2156
+ y: P.y - 10
2157
+ },
2158
+ {
2159
+ x: w + v,
2160
+ y: P.y - 10
2161
+ },
2162
+ {
2163
+ x: w + v,
2164
+ y: P.y - 20
2165
+ },
2166
+ {
2167
+ x: w + v + 10,
2168
+ y: P.y - 20
2169
+ },
2170
+ {
2171
+ x: w + v + 10,
2172
+ y: T - 10
2173
+ },
2174
+ {
2175
+ x: w + 10,
2176
+ y: T - 10
2177
+ },
2178
+ {
2179
+ x: w + 10,
2180
+ y: T
2181
+ },
2182
+ {
2183
+ x: w,
2184
+ y: T
2185
+ },
2186
+ {
2187
+ x: w,
2188
+ y: T + 10
2189
+ }
2190
+ ], I = [
2191
+ {
2192
+ x: w,
2193
+ y: T + 10
2194
+ },
2195
+ {
2196
+ x: w + v - 10,
2197
+ y: T + 10
2198
+ },
2199
+ {
2200
+ x: w + v - 10,
2201
+ y: P.y - 10
2202
+ },
2203
+ {
2204
+ x: w + v,
2205
+ y: P.y - 10
2206
+ },
2207
+ {
2208
+ x: w + v,
2209
+ y: T
2210
+ },
2211
+ {
2212
+ x: w,
2213
+ y: T
2214
+ }
2215
+ ], L = E.svg(l), R = b(t, {});
2216
+ t.look !== "handDrawn" && (R.roughness = 0, R.fillStyle = "solid");
2217
+ let z = j(F), B = L.path(z, R), V = j(I), H = L.path(V, R), U = l.insert(() => B, ":first-child");
2218
+ return U.insert(() => H), U.attr("class", "basic label-container outer-path"), O && t.look !== "handDrawn" && U.selectAll("path").attr("style", O), c && t.look !== "handDrawn" && U.selectAll("path").attr("style", c), U.attr("transform", `translate(0,${-S / 2})`), d.attr("transform", `translate(${-(u.width / 2) - 10 - (u.x - ((a = u.left) == null ? 0 : a))}, ${-(u.height / 2) + 10 - S / 2 - (u.y - ((o = u.top) == null ? 0 : o))})`), k(t, U), t.intersect = function(e) {
2219
+ return Y.polygon(t, F, e);
2220
+ }, l;
2221
+ }), Pt.apply(this, arguments);
2222
+ }
2223
+ i(Nt, "multiWaveEdgedRectangle");
2224
+ function Ft(e, t, n) {
2225
+ return It.apply(this, arguments);
2226
+ }
2227
+ function It() {
2228
+ return It = r(function* (e, t, { config: { themeVariables: n } }) {
2229
+ var r, i, a, o, s, c;
2230
+ let { labelStyles: d, nodeStyles: f } = x(t);
2231
+ t.labelStyle = d, t.useHtmlLabels || l(u()) || (t.centerLabel = !0);
2232
+ let { shapeSvg: p, bbox: m, label: h } = yield D(e, t, A(t)), g = Math.max(m.width + ((r = t.padding) == null ? 0 : r) * 2, (i = t == null ? void 0 : t.width) == null ? 0 : i), _ = Math.max(m.height + ((a = t.padding) == null ? 0 : a) * 2, (o = t == null ? void 0 : t.height) == null ? 0 : o), v = -g / 2, y = -_ / 2, { cssStyles: S } = t, C = E.svg(p), w = b(t, {
2233
+ fill: n.noteBkgColor,
2234
+ stroke: n.noteBorderColor
2235
+ });
2236
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
2237
+ let T = C.rectangle(v, y, g, _, w), O = p.insert(() => T, ":first-child");
2238
+ return O.attr("class", "basic label-container outer-path"), h.attr("class", "label noteLabel"), S && t.look !== "handDrawn" && O.selectAll("path").attr("style", S), f && t.look !== "handDrawn" && O.selectAll("path").attr("style", f), h.attr("transform", `translate(${-m.width / 2 - (m.x - ((s = m.left) == null ? 0 : s))}, ${-(m.height / 2) - (m.y - ((c = m.top) == null ? 0 : c))})`), k(t, O), t.intersect = function(e) {
2239
+ return Y.rect(t, e);
2240
+ }, p;
2241
+ }), It.apply(this, arguments);
2242
+ }
2243
+ i(Ft, "note");
2244
+ var Lt = /* @__PURE__ */ i((e, t, n) => [
2245
+ `M${e + n / 2},${t}`,
2246
+ `L${e + n},${t - n / 2}`,
2247
+ `L${e + n / 2},${t - n}`,
2248
+ `L${e},${t - n / 2}`,
2249
+ "Z"
2250
+ ].join(" "), "createDecisionBoxPathD");
2251
+ function Rt(e, t) {
2252
+ return zt.apply(this, arguments);
2253
+ }
2254
+ function zt() {
2255
+ return zt = r(function* (e, t) {
2256
+ var n, r;
2257
+ let { labelStyles: i, nodeStyles: a } = x(t);
2258
+ t.labelStyle = i;
2259
+ let { shapeSvg: o, bbox: s } = yield D(e, t, A(t)), c = s.width + ((n = t.padding) == null ? 0 : n) + (s.height + ((r = t.padding) == null ? 0 : r)), l = .5, u = [
2260
+ {
2261
+ x: c / 2,
2262
+ y: 0
2263
+ },
2264
+ {
2265
+ x: c,
2266
+ y: -c / 2
2267
+ },
2268
+ {
2269
+ x: c / 2,
2270
+ y: -c
2271
+ },
2272
+ {
2273
+ x: 0,
2274
+ y: -c / 2
2275
+ }
2276
+ ], d, { cssStyles: f } = t;
2277
+ if (t.look === "handDrawn") {
2278
+ let e = E.svg(o), n = b(t, {}), r = Lt(0, 0, c), i = e.path(r, n);
2279
+ d = o.insert(() => i, ":first-child").attr("transform", `translate(${-c / 2 + l}, ${c / 2})`), f && d.attr("style", f);
2280
+ } else d = ue(o, c, c, u), d.attr("transform", `translate(${-c / 2 + l}, ${c / 2})`);
2281
+ return a && d.attr("style", a), k(t, d), t.calcIntersect = function(e, t) {
2282
+ let n = e.width, r = [
2283
+ {
2284
+ x: n / 2,
2285
+ y: 0
2286
+ },
2287
+ {
2288
+ x: n,
2289
+ y: -n / 2
2290
+ },
2291
+ {
2292
+ x: n / 2,
2293
+ y: -n
2294
+ },
2295
+ {
2296
+ x: 0,
2297
+ y: -n / 2
2298
+ }
2299
+ ], i = Y.polygon(e, r, t);
2300
+ return {
2301
+ x: i.x - .5,
2302
+ y: i.y - .5
2303
+ };
2304
+ }, t.intersect = function(e) {
2305
+ return this.calcIntersect(t, e);
2306
+ }, o;
2307
+ }), zt.apply(this, arguments);
2308
+ }
2309
+ i(Rt, "question");
2310
+ function Bt(e, t) {
2311
+ return Vt.apply(this, arguments);
2312
+ }
2313
+ function Vt() {
2314
+ return Vt = r(function* (e, t) {
2315
+ var n, r, i, a, o;
2316
+ let { labelStyles: s, nodeStyles: c } = x(t);
2317
+ t.labelStyle = s;
2318
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 21 : l == null ? 0 : l, d = t.look === "neo" ? 12 : l == null ? 0 : l, { shapeSvg: f, bbox: p, label: m } = yield D(e, t, A(t)), h = ((r = t == null ? void 0 : t.width) == null ? p.width : r) + (t.look === "neo" ? u * 2 : u), g = ((i = t == null ? void 0 : t.height) == null ? p.height : i) + (t.look === "neo" ? d * 2 : d), _ = -h / 2, v = -g / 2, y = v / 2, S = [
2319
+ {
2320
+ x: _ + y,
2321
+ y: v
2322
+ },
2323
+ {
2324
+ x: _,
2325
+ y: 0
2326
+ },
2327
+ {
2328
+ x: _ + y,
2329
+ y: -v
2330
+ },
2331
+ {
2332
+ x: -_,
2333
+ y: -v
2334
+ },
2335
+ {
2336
+ x: -_,
2337
+ y: v
2338
+ }
2339
+ ], { cssStyles: C } = t, w = E.svg(f), T = b(t, {});
2340
+ t.look !== "handDrawn" && (T.roughness = 0, T.fillStyle = "solid");
2341
+ let O = j(S), M = w.path(O, T), N = f.insert(() => M, ":first-child");
2342
+ return N.attr("class", "basic label-container outer-path"), C && t.look !== "handDrawn" && N.selectAll("path").attr("style", C), c && t.look !== "handDrawn" && N.selectAll("path").attr("style", c), N.attr("transform", `translate(${-y / 2},0)`), m.attr("transform", `translate(${-y / 2 - p.width / 2 - (p.x - ((a = p.left) == null ? 0 : a))}, ${-(p.height / 2) - (p.y - ((o = p.top) == null ? 0 : o))})`), k(t, N), t.intersect = function(e) {
2343
+ return Y.polygon(t, S, e);
2344
+ }, f;
2345
+ }), Vt.apply(this, arguments);
2346
+ }
2347
+ i(Bt, "rect_left_inv_arrow");
2348
+ function Ht(e, t) {
2349
+ return Ut.apply(this, arguments);
2350
+ }
2351
+ function Ut() {
2352
+ return Ut = r(function* (e, t) {
2353
+ let { labelStyles: n, nodeStyles: r } = x(t);
2354
+ t.labelStyle = n;
2355
+ let i;
2356
+ i = t.cssClasses ? "node " + t.cssClasses : "node default";
2357
+ let o = e.insert("g").attr("class", i).attr("id", t.domId || t.id), s = o.insert("g"), c = o.insert("g").attr("class", "label").attr("style", r), u = t.description, d = t.label, p = yield I(c, d, t.labelStyle, !0, !0), h = {
2358
+ width: 0,
2359
+ height: 0
2360
+ };
2361
+ if (l(f())) {
2362
+ let e = p.children[0], t = m(p);
2363
+ h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
2364
+ }
2365
+ a.info("Text 2", u);
2366
+ let g = u || [], _ = p.getBBox(), v = yield I(c, Array.isArray(g) ? g.join("<br/>") : g, t.labelStyle, !0, !0), y = v.children[0], S = m(v);
2367
+ h = y.getBoundingClientRect(), S.attr("width", h.width), S.attr("height", h.height);
2368
+ let C = (t.padding || 0) / 2;
2369
+ m(v).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + C + 5) + ")"), m(p).attr("transform", "translate( " + (h.width < _.width ? 0 : -(_.width - h.width) / 2) + ", 0)"), h = c.node().getBBox(), c.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - C + 3) + ")");
2370
+ let w = h.width + (t.padding || 0), T = h.height + (t.padding || 0), D = -h.width / 2 - C, O = -h.height / 2 - C, A, j;
2371
+ if (t.look === "handDrawn") {
2372
+ let e = E.svg(o), n = b(t, {}), r = e.path(L(D, O, w, T, t.rx || 0), n), i = e.line(-h.width / 2 - C, -h.height / 2 - C + _.height + C, h.width / 2 + C, -h.height / 2 - C + _.height + C, n);
2373
+ j = o.insert(() => (a.debug("Rough node insert CXC", r), i), ":first-child"), A = o.insert(() => (a.debug("Rough node insert CXC", r), r), ":first-child");
2374
+ } else A = s.insert("rect", ":first-child"), j = s.insert("line"), A.attr("class", "outer title-state").attr("style", r).attr("x", -h.width / 2 - C).attr("y", -h.height / 2 - C).attr("width", h.width + (t.padding || 0)).attr("height", h.height + (t.padding || 0)), j.attr("class", "divider").attr("x1", -h.width / 2 - C).attr("x2", h.width / 2 + C).attr("y1", -h.height / 2 - C + _.height + C).attr("y2", -h.height / 2 - C + _.height + C);
2375
+ return k(t, A), t.intersect = function(e) {
2376
+ return Y.rect(t, e);
2377
+ }, o;
2378
+ }), Ut.apply(this, arguments);
2379
+ }
2380
+ i(Ht, "rectWithTitle");
2381
+ function Wt(e, t, n) {
2382
+ return Gt.apply(this, arguments);
2383
+ }
2384
+ function Gt() {
2385
+ return Gt = r(function* (e, t, { config: { themeVariables: n } }) {
2386
+ var r, i, a;
2387
+ let o = (r = n == null ? void 0 : n.radius) == null ? 5 : r;
2388
+ return Ie(e, t, {
2389
+ rx: o,
2390
+ ry: o,
2391
+ classes: "",
2392
+ labelPaddingX: ((i = t == null ? void 0 : t.padding) == null ? 0 : i) * 1,
2393
+ labelPaddingY: ((a = t == null ? void 0 : t.padding) == null ? 0 : a) * 1
2394
+ });
2395
+ }), Gt.apply(this, arguments);
2396
+ }
2397
+ i(Wt, "roundedRect");
2398
+ var Kt = 8;
2399
+ function qt(e, t) {
2400
+ return Jt.apply(this, arguments);
2401
+ }
2402
+ function Jt() {
2403
+ return Jt = r(function* (e, t) {
2404
+ var n, r, i, a, o, s;
2405
+ let { labelStyles: c, nodeStyles: l } = x(t);
2406
+ t.labelStyle = c;
2407
+ let u = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, d = t.look === "neo" ? 12 : (r = t.padding) == null ? 0 : r, { shapeSvg: f, bbox: p, label: m } = yield D(e, t, A(t)), h = ((i = t == null ? void 0 : t.width) == null ? p.width : i) + u * 2 + (t.look === "neo" ? Kt : Kt * 2), g = ((a = t == null ? void 0 : t.height) == null ? p.height : a) + d * 2, v = h - Kt, y = g, S = Kt - h / 2, C = -g / 2, { cssStyles: w } = t, T = E.svg(f), O = b(t, {});
2408
+ t.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
2409
+ let j = [
2410
+ {
2411
+ x: S,
2412
+ y: C
2413
+ },
2414
+ {
2415
+ x: S + v,
2416
+ y: C
2417
+ },
2418
+ {
2419
+ x: S + v,
2420
+ y: C + y
2421
+ },
2422
+ {
2423
+ x: S - Kt,
2424
+ y: C + y
2425
+ },
2426
+ {
2427
+ x: S - Kt,
2428
+ y: C
2429
+ },
2430
+ {
2431
+ x: S,
2432
+ y: C
2433
+ },
2434
+ {
2435
+ x: S,
2436
+ y: C + y
2437
+ }
2438
+ ], M = T.polygon(j.map((e) => [e.x, e.y]), O), N = f.insert(() => M, ":first-child");
2439
+ return N.attr("class", "basic label-container outer-path").attr("style", _(w)), l && t.look !== "handDrawn" && N.selectAll("path").attr("style", l), w && t.look !== "handDrawn" && N.selectAll("path").attr("style", l), m.attr("transform", `translate(${Kt / 2 - p.width / 2 - (p.x - ((o = p.left) == null ? 0 : o))}, ${-(p.height / 2) - (p.y - ((s = p.top) == null ? 0 : s))})`), k(t, N), t.intersect = function(e) {
2440
+ return Y.rect(t, e);
2441
+ }, f;
2442
+ }), Jt.apply(this, arguments);
2443
+ }
2444
+ i(qt, "shadedProcess");
2445
+ function Yt(e, t) {
2446
+ return Xt.apply(this, arguments);
2447
+ }
2448
+ function Xt() {
2449
+ return Xt = r(function* (e, t) {
2450
+ var n, r, i, a, o;
2451
+ let { labelStyles: s, nodeStyles: c } = x(t);
2452
+ t.labelStyle = s;
2453
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 16 : l, d = t.look === "neo" ? 12 : l;
2454
+ if (t.width || t.height) {
2455
+ var f, p;
2456
+ t.width = Math.max(((f = t == null ? void 0 : t.width) == null ? 0 : f) - u * 2, 10), t.height = Math.max(((p = t == null ? void 0 : t.height) == null ? 0 : p) / 1.5 - d * 2, 10);
2457
+ }
2458
+ let { shapeSvg: m, bbox: h, label: g } = yield D(e, t, A(t)), _ = (t != null && t.width ? t == null ? void 0 : t.width : h.width) + u * 2, v = ((t != null && t.height ? t == null ? void 0 : t.height : h.height) + d * 2) * 1.5, y = _, S = v / 1.5, C = -y / 2, w = -S / 2, { cssStyles: T } = t, O = E.svg(m), M = b(t, {});
2459
+ t.look !== "handDrawn" && (M.roughness = 0, M.fillStyle = "solid");
2460
+ let N = [
2461
+ {
2462
+ x: C,
2463
+ y: w
2464
+ },
2465
+ {
2466
+ x: C,
2467
+ y: w + S
2468
+ },
2469
+ {
2470
+ x: C + y,
2471
+ y: w + S
2472
+ },
2473
+ {
2474
+ x: C + y,
2475
+ y: w - S / 2
2476
+ }
2477
+ ], P = j(N), F = O.path(P, M), I = m.insert(() => F, ":first-child");
2478
+ return I.attr("class", "basic label-container outer-path"), T && t.look !== "handDrawn" && I.selectChildren("path").attr("style", T), c && t.look !== "handDrawn" && I.selectChildren("path").attr("style", c), I.attr("transform", `translate(0, ${S / 4})`), g.attr("transform", `translate(${-y / 2 + ((r = t.padding) == null ? 0 : r) - (h.x - ((i = h.left) == null ? 0 : i))}, ${-S / 4 + ((a = t.padding) == null ? 0 : a) - (h.y - ((o = h.top) == null ? 0 : o))})`), k(t, I), t.intersect = function(e) {
2479
+ return Y.polygon(t, N, e);
2480
+ }, m;
2481
+ }), Xt.apply(this, arguments);
2482
+ }
2483
+ i(Yt, "slopedRect");
2484
+ function Zt(e, t) {
2485
+ return Qt.apply(this, arguments);
2486
+ }
2487
+ function Qt() {
2488
+ return Qt = r(function* (e, t) {
2489
+ var n, r;
2490
+ let i = (n = t.padding) == null ? 0 : n, a = t.look === "neo" ? 16 : i * 2, o = t.look === "neo" ? 12 : i;
2491
+ return Ie(e, t, {
2492
+ rx: 0,
2493
+ ry: 0,
2494
+ classes: "",
2495
+ labelPaddingX: (r = t.labelPaddingX) == null ? a : r,
2496
+ labelPaddingY: o
2497
+ });
2498
+ }), Qt.apply(this, arguments);
2499
+ }
2500
+ i(Zt, "squareRect");
2501
+ function $t(e, t) {
2502
+ return en.apply(this, arguments);
2503
+ }
2504
+ function en() {
2505
+ return en = r(function* (e, t) {
2506
+ var n;
2507
+ let { labelStyles: r, nodeStyles: i } = x(t);
2508
+ t.labelStyle = r;
2509
+ let a = (n = t.padding) == null ? 0 : n, o = t.look === "neo" ? 20 : a, s = t.look === "neo" ? 12 : a, { shapeSvg: c, bbox: l } = yield D(e, t, A(t)), u = l.height + (t.look === "neo" ? s * 2 : s), d = l.width + u / 4 + (t.look === "neo" ? o * 2 : o), f = u / 2, { cssStyles: p } = t, m = E.svg(c), h = b(t, {});
2510
+ t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2511
+ let g = [
2512
+ {
2513
+ x: -d / 2 + f,
2514
+ y: -u / 2
2515
+ },
2516
+ {
2517
+ x: d / 2 - f,
2518
+ y: -u / 2
2519
+ },
2520
+ ...N(-d / 2 + f, 0, f, 50, 90, 270),
2521
+ {
2522
+ x: d / 2 - f,
2523
+ y: u / 2
2524
+ },
2525
+ ...N(d / 2 - f, 0, f, 50, 270, 450)
2526
+ ], _ = j(g), v = m.path(_, h), y = c.insert(() => v, ":first-child");
2527
+ return y.attr("class", "basic label-container outer-path"), p && t.look !== "handDrawn" && y.selectChildren("path").attr("style", p), i && t.look !== "handDrawn" && y.selectChildren("path").attr("style", i), k(t, y), t.intersect = function(e) {
2528
+ return Y.polygon(t, g, e);
2529
+ }, c;
2530
+ }), en.apply(this, arguments);
2531
+ }
2532
+ i($t, "stadium");
2533
+ function tn(e, t) {
2534
+ return nn.apply(this, arguments);
2535
+ }
2536
+ function nn() {
2537
+ return nn = r(function* (e, t) {
2538
+ return Ie(e, t, {
2539
+ rx: t.look === "neo" ? 3 : 5,
2540
+ ry: t.look === "neo" ? 3 : 5,
2541
+ classes: "flowchart-node"
2542
+ });
2543
+ }), nn.apply(this, arguments);
2544
+ }
2545
+ i(tn, "state");
2546
+ function rn(e, n, { config: { themeVariables: r } }) {
2547
+ var i, a;
2548
+ let { labelStyles: o, nodeStyles: s } = x(n);
2549
+ n.labelStyle = o;
2550
+ let { cssStyles: c } = n, { lineColor: l, stateBorder: u, nodeBorder: d, nodeShadow: f } = r;
2551
+ if (n.width || n.height) {
2552
+ var p, m;
2553
+ ((p = n.width) == null ? 0 : p) < 14 && (n.width = 14), ((m = n.height) == null ? 0 : m) < 14 && (n.height = 14);
2554
+ }
2555
+ n.width || (n.width = 14), n.height || (n.height = 14);
2556
+ let h = e.insert("g").attr("class", "node default").attr("id", (i = n.domId) == null ? n.id : i), g = E.svg(h), _ = b(n, {});
2557
+ n.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2558
+ let v = g.circle(0, 0, n.width, t(t({}, _), {}, {
2559
+ stroke: l,
2560
+ strokeWidth: 2
2561
+ })), y = u == null ? d : u, S = ((a = n.width) == null ? 0 : a) * 5 / 14, C = g.circle(0, 0, S, t(t({}, _), {}, {
2562
+ fill: y,
2563
+ stroke: y,
2564
+ strokeWidth: 2,
2565
+ fillStyle: "solid"
2566
+ })), w = h.insert(() => v, ":first-child");
2567
+ if (w.insert(() => C), n.look !== "handDrawn" && w.attr("class", "outer-path"), c && w.selectAll("path").attr("style", c), s && w.selectAll("path").attr("style", s), n.width < 25 && f && n.look !== "handDrawn") {
2568
+ var T, D;
2569
+ let t = (T = (D = e.node()) == null || (D = D.ownerSVGElement) == null ? void 0 : D.id) == null ? "" : T, n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2570
+ w.attr("style", `filter:url(#${n})`);
2571
+ }
2572
+ return k(n, w), n.intersect = function(e) {
2573
+ var t;
2574
+ return Y.circle(n, ((t = n.width) == null ? 0 : t) / 2, e);
2575
+ }, h;
2576
+ }
2577
+ i(rn, "stateEnd");
2578
+ function an(e, t, { config: { themeVariables: n } }) {
2579
+ let { lineColor: r, nodeShadow: i } = n;
2580
+ if (t.width || t.height) {
2581
+ var a, o;
2582
+ ((a = t.width) == null ? 0 : a) < 14 && (t.width = 14), ((o = t.height) == null ? 0 : o) < 14 && (t.height = 14);
2583
+ }
2584
+ t.width || (t.width = 14), t.height || (t.height = 14);
2585
+ let s = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), c;
2586
+ if (t.look === "handDrawn") {
2587
+ var l, u, d;
2588
+ let e = E.svg(s).circle(0, 0, t.width, S(r));
2589
+ c = s.insert(() => e), c.attr("class", "state-start").attr("r", ((l = t.width) == null ? 7 : l) / 2).attr("width", (u = t.width) == null ? 14 : u).attr("height", (d = t.height) == null ? 14 : d);
2590
+ } else {
2591
+ var f, p, m;
2592
+ c = s.insert("circle", ":first-child"), c.attr("class", "state-start").attr("r", ((f = t.width) == null ? 7 : f) / 2).attr("width", (p = t.width) == null ? 14 : p).attr("height", (m = t.height) == null ? 14 : m);
2593
+ }
2594
+ if (t.width < 25 && i && t.look !== "handDrawn") {
2595
+ var h, g;
2596
+ let t = (h = (g = e.node()) == null || (g = g.ownerSVGElement) == null ? void 0 : g.id) == null ? "" : h, n = t ? `${t}-drop-shadow-small` : "drop-shadow-small";
2597
+ c.attr("style", `filter:url(#${n})`);
2598
+ }
2599
+ return k(t, c), t.intersect = function(e) {
2600
+ var n;
2601
+ return Y.circle(t, ((n = t.width) == null ? 7 : n) / 2, e);
2602
+ }, s;
2603
+ }
2604
+ i(an, "stateStart");
2605
+ var on = 8;
2606
+ function sn(e, t) {
2607
+ return cn.apply(this, arguments);
2608
+ }
2609
+ function cn() {
2610
+ return cn = r(function* (e, t) {
2611
+ var n, r, i;
2612
+ let { labelStyles: a, nodeStyles: o } = x(t);
2613
+ t.labelStyle = a;
2614
+ let s = (n = t == null ? void 0 : t.padding) == null ? 8 : n, c = t.look === "neo" ? 28 : s, l = t.look === "neo" ? 12 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = ((r = t == null ? void 0 : t.width) == null ? d.width : r) + 2 * on + c, p = ((i = t == null ? void 0 : t.height) == null ? d.height : i) + l, m = f - 2 * on, h = p, g = -f / 2, v = -p / 2, y = [
2615
+ {
2616
+ x: 0,
2617
+ y: 0
2618
+ },
2619
+ {
2620
+ x: m,
2621
+ y: 0
2622
+ },
2623
+ {
2624
+ x: m,
2625
+ y: -h
2626
+ },
2627
+ {
2628
+ x: 0,
2629
+ y: -h
2630
+ },
2631
+ {
2632
+ x: 0,
2633
+ y: 0
2634
+ },
2635
+ {
2636
+ x: -8,
2637
+ y: 0
2638
+ },
2639
+ {
2640
+ x: m + 8,
2641
+ y: 0
2642
+ },
2643
+ {
2644
+ x: m + 8,
2645
+ y: -h
2646
+ },
2647
+ {
2648
+ x: -8,
2649
+ y: -h
2650
+ },
2651
+ {
2652
+ x: -8,
2653
+ y: 0
2654
+ }
2655
+ ];
2656
+ if (t.look === "handDrawn") {
2657
+ let e = E.svg(u), n = b(t, {}), r = e.rectangle(g, v, m + 16, h, n), i = e.line(g + on, v, g + on, v + h, n), a = e.line(g + on + m, v, g + on + m, v + h, n);
2658
+ u.insert(() => i, ":first-child"), u.insert(() => a, ":first-child");
2659
+ let o = u.insert(() => r, ":first-child"), { cssStyles: s } = t;
2660
+ o.attr("class", "basic label-container").attr("style", _(s)), k(t, o);
2661
+ } else {
2662
+ let e = ue(u, m, h, y);
2663
+ o && e.attr("style", o), k(t, e);
2664
+ }
2665
+ return t.intersect = function(e) {
2666
+ return Y.polygon(t, y, e);
2667
+ }, u;
2668
+ }), cn.apply(this, arguments);
2669
+ }
2670
+ i(sn, "subroutine");
2671
+ var ln = .2;
2672
+ function un(e, t) {
2673
+ return dn.apply(this, arguments);
2674
+ }
2675
+ function dn() {
2676
+ return dn = r(function* (e, n) {
2677
+ var r;
2678
+ let { labelStyles: i, nodeStyles: a } = x(n);
2679
+ n.labelStyle = i;
2680
+ let o = (r = n.padding) == null ? 0 : r, s = n.look === "neo" ? 16 : o, c = n.look === "neo" ? 12 : o;
2681
+ if (n.width || n.height) {
2682
+ var l, u;
2683
+ n.height = Math.max(((l = n == null ? void 0 : n.height) == null ? 0 : l) - c * 2, 10), n.width = Math.max(((u = n == null ? void 0 : n.width) == null ? 0 : u) - s * 2 - ln * (n.height + c * 2), 10);
2684
+ }
2685
+ let { shapeSvg: d, bbox: f } = yield D(e, n, A(n)), p = (n != null && n.height ? n == null ? void 0 : n.height : f.height) + c * 2, m = ln * p, h = ln * p, g = (n != null && n.width ? n == null ? void 0 : n.width : f.width) + s * 2 + m - m, _ = p, v = -g / 2, y = -_ / 2, { cssStyles: S } = n, C = E.svg(d), w = b(n, {}), T = [
2686
+ {
2687
+ x: v - m / 2,
2688
+ y
2689
+ },
2690
+ {
2691
+ x: v + g + m / 2,
2692
+ y
2693
+ },
2694
+ {
2695
+ x: v + g + m / 2,
2696
+ y: y + _
2697
+ },
2698
+ {
2699
+ x: v - m / 2,
2700
+ y: y + _
2701
+ }
2702
+ ], O = [
2703
+ {
2704
+ x: v + g - m / 2,
2705
+ y: y + _
2706
+ },
2707
+ {
2708
+ x: v + g + m / 2,
2709
+ y: y + _
2710
+ },
2711
+ {
2712
+ x: v + g + m / 2,
2713
+ y: y + _ - h
2714
+ }
2715
+ ];
2716
+ n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
2717
+ let M = j(T), N = C.path(M, w), P = j(O), F = C.path(P, t(t({}, w), {}, { fillStyle: "solid" })), I = d.insert(() => F, ":first-child");
2718
+ return I.insert(() => N, ":first-child"), I.attr("class", "basic label-container outer-path"), S && n.look !== "handDrawn" && I.selectAll("path").attr("style", S), a && n.look !== "handDrawn" && I.selectAll("path").attr("style", a), k(n, I), n.intersect = function(e) {
2719
+ return Y.polygon(n, T, e);
2720
+ }, d;
2721
+ }), dn.apply(this, arguments);
2722
+ }
2723
+ i(un, "taggedRect");
2724
+ function fn(e, t) {
2725
+ return pn.apply(this, arguments);
2726
+ }
2727
+ function pn() {
2728
+ return pn = r(function* (e, n) {
2729
+ var r, i, a, o, s, c, l, u;
2730
+ let { labelStyles: d, nodeStyles: f } = x(n);
2731
+ n.labelStyle = d;
2732
+ let { shapeSvg: p, bbox: m, label: h } = yield D(e, n, A(n)), g = Math.max(m.width + ((r = n.padding) == null ? 0 : r) * 2, (i = n == null ? void 0 : n.width) == null ? 0 : i), _ = Math.max(m.height + ((a = n.padding) == null ? 0 : a) * 2, (o = n == null ? void 0 : n.height) == null ? 0 : o), v = _ / 8, y = .2 * g, S = .2 * _, C = _ + v, { cssStyles: w } = n, T = E.svg(p), O = b(n, {});
2733
+ n.look !== "handDrawn" && (O.roughness = 0, O.fillStyle = "solid");
2734
+ let N = [
2735
+ {
2736
+ x: -g / 2 - g / 2 * .1,
2737
+ y: C / 2
2738
+ },
2739
+ ...M(-g / 2 - g / 2 * .1, C / 2, g / 2 + g / 2 * .1, C / 2, v, .8),
2740
+ {
2741
+ x: g / 2 + g / 2 * .1,
2742
+ y: -C / 2
2743
+ },
2744
+ {
2745
+ x: -g / 2 - g / 2 * .1,
2746
+ y: -C / 2
2747
+ }
2748
+ ], P = -g / 2 + g / 2 * .1, F = -C / 2 - S * .4, I = [
2749
+ {
2750
+ x: P + g - y,
2751
+ y: (F + _) * 1.3
2752
+ },
2753
+ {
2754
+ x: P + g,
2755
+ y: F + _ - S
2756
+ },
2757
+ {
2758
+ x: P + g,
2759
+ y: (F + _) * .9
2760
+ },
2761
+ ...M(P + g, (F + _) * 1.25, P + g - y, (F + _) * 1.3, -_ * .02, .5)
2762
+ ], L = j(N), R = T.path(L, O), z = j(I), B = T.path(z, t(t({}, O), {}, { fillStyle: "solid" })), V = p.insert(() => B, ":first-child");
2763
+ return V.insert(() => R, ":first-child"), V.attr("class", "basic label-container outer-path"), w && n.look !== "handDrawn" && V.selectAll("path").attr("style", w), f && n.look !== "handDrawn" && V.selectAll("path").attr("style", f), V.attr("transform", `translate(0,${-v / 2})`), h.attr("transform", `translate(${-g / 2 + ((s = n.padding) == null ? 0 : s) - (m.x - ((c = m.left) == null ? 0 : c))},${-_ / 2 + ((l = n.padding) == null ? 0 : l) - v / 2 - (m.y - ((u = m.top) == null ? 0 : u))})`), k(n, V), n.intersect = function(e) {
2764
+ return Y.polygon(n, N, e);
2765
+ }, p;
2766
+ }), pn.apply(this, arguments);
2767
+ }
2768
+ i(fn, "taggedWaveEdgedRectangle");
2769
+ function mn(e, t) {
2770
+ return hn.apply(this, arguments);
2771
+ }
2772
+ function hn() {
2773
+ return hn = r(function* (e, t) {
2774
+ var n, r;
2775
+ let { labelStyles: i, nodeStyles: a } = x(t);
2776
+ t.labelStyle = i;
2777
+ let { shapeSvg: o, bbox: s } = yield D(e, t, A(t)), c = Math.max(s.width + ((n = t.padding) == null ? 0 : n), (t == null ? void 0 : t.width) || 0), l = Math.max(s.height + ((r = t.padding) == null ? 0 : r), (t == null ? void 0 : t.height) || 0), u = -c / 2, d = -l / 2, f = o.insert("rect", ":first-child");
2778
+ return f.attr("class", "text").attr("style", a).attr("rx", 0).attr("ry", 0).attr("x", u).attr("y", d).attr("width", c).attr("height", l), k(t, f), t.intersect = function(e) {
2779
+ return Y.rect(t, e);
2780
+ }, o;
2781
+ }), hn.apply(this, arguments);
2782
+ }
2783
+ i(mn, "text");
2784
+ var gn = /* @__PURE__ */ i((e, t, n, r, i, a) => `M${e},${t}
2785
+ a${i},${a} 0,0,1 0,${-r}
2786
+ l${n},0
2787
+ a${i},${a} 0,0,1 0,${r}
2788
+ M${n},${-r}
2789
+ a${i},${a} 0,0,0 0,${r}
2790
+ l${-n},0`, "createCylinderPathD"), _n = /* @__PURE__ */ i((e, t, n, r, i, a) => [
2791
+ `M${e},${t}`,
2792
+ `M${e + n},${t}`,
2793
+ `a${i},${a} 0,0,0 0,${-r}`,
2794
+ `l${-n},0`,
2795
+ `a${i},${a} 0,0,0 0,${r}`,
2796
+ `l${n},0`
2797
+ ].join(" "), "createOuterCylinderPathD"), vn = /* @__PURE__ */ i((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD"), yn = 5, bn = 10;
2798
+ function xn(e, t) {
2799
+ return Sn.apply(this, arguments);
2800
+ }
2801
+ function Sn() {
2802
+ return Sn = r(function* (e, t) {
2803
+ var n, r, i;
2804
+ let { labelStyles: a, nodeStyles: o } = x(t);
2805
+ t.labelStyle = a;
2806
+ let s = (n = t.padding) == null ? 0 : n, c = t.look === "neo" ? 12 : s / 2;
2807
+ if (t.width || t.height) {
2808
+ var l, u, d;
2809
+ let e = (l = t.height) == null ? 0 : l;
2810
+ t.height = ((u = t.height) == null ? 0 : u) - c, t.height < yn && (t.height = yn);
2811
+ let n = e / 2 / (2.5 + e / 50);
2812
+ t.width = ((d = t.width) == null ? 0 : d) - c - n * 3, t.width < bn && (t.width = bn);
2813
+ }
2814
+ let { shapeSvg: f, bbox: p, label: m } = yield D(e, t, A(t)), h = (t.height ? t.height : p.height) + c, g = h / 2, v = g / (2.5 + h / 50), y = (t.width ? t.width : p.width) + v + c, { cssStyles: S } = t, C;
2815
+ if (t.look === "handDrawn") {
2816
+ let e = E.svg(f), n = _n(0, 0, y, h, v, g), r = vn(0, 0, y, h, v, g), i = e.path(n, b(t, {})), a = e.path(r, b(t, { fill: "none" }));
2817
+ C = f.insert(() => a, ":first-child"), C = f.insert(() => i, ":first-child"), C.attr("class", "basic label-container"), S && C.attr("style", S);
2818
+ } else {
2819
+ let e = gn(0, 0, y, h, v, g);
2820
+ C = f.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", _(S)).attr("style", o), C.attr("class", "basic label-container outer-path"), S && C.selectAll("path").attr("style", S), o && C.selectAll("path").attr("style", o);
2821
+ }
2822
+ return C.attr("label-offset-x", v), C.attr("transform", `translate(${-y / 2}, ${h / 2} )`), m.attr("transform", `translate(${-(p.width / 2) - v - (p.x - ((r = p.left) == null ? 0 : r))}, ${-(p.height / 2) - (p.y - ((i = p.top) == null ? 0 : i))})`), k(t, C), t.intersect = function(e) {
2823
+ var n, r, i, a, o;
2824
+ let s = Y.rect(t, e), c = s.y - ((n = t.y) == null ? 0 : n);
2825
+ if (g != 0 && (Math.abs(c) < ((r = t.height) == null ? 0 : r) / 2 || Math.abs(c) == ((i = t.height) == null ? 0 : i) / 2 && Math.abs(s.x - ((a = t.x) == null ? 0 : a)) > ((o = t.width) == null ? 0 : o) / 2 - v)) {
2826
+ var l;
2827
+ let n = v * v * (1 - c * c / (g * g));
2828
+ n != 0 && (n = Math.sqrt(Math.abs(n))), n = v - n, e.x - ((l = t.x) == null ? 0 : l) > 0 && (n = -n), s.x += n;
2829
+ }
2830
+ return s;
2831
+ }, f;
2832
+ }), Sn.apply(this, arguments);
2833
+ }
2834
+ i(xn, "tiltedCylinder");
2835
+ function Cn(e, t) {
2836
+ return wn.apply(this, arguments);
2837
+ }
2838
+ function wn() {
2839
+ return wn = r(function* (e, t) {
2840
+ var n, r, i;
2841
+ let { labelStyles: a, nodeStyles: o } = x(t);
2842
+ t.labelStyle = a;
2843
+ let s = (n = t.padding) == null ? 0 : n, c = (t.look, s), l = t.look === "neo" ? s * 2 : s, { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = ((r = t == null ? void 0 : t.height) == null ? d.height : r) + c, p = ((i = t == null ? void 0 : t.width) == null ? d.width : i) + l, m = [
2844
+ {
2845
+ x: -3 * f / 6,
2846
+ y: 0
2847
+ },
2848
+ {
2849
+ x: p + 3 * f / 6,
2850
+ y: 0
2851
+ },
2852
+ {
2853
+ x: p,
2854
+ y: -f
2855
+ },
2856
+ {
2857
+ x: 0,
2858
+ y: -f
2859
+ }
2860
+ ], h, { cssStyles: g } = t;
2861
+ if (t.look === "handDrawn") {
2862
+ let e = E.svg(u), n = b(t, {}), r = j(m), i = e.path(r, n);
2863
+ h = u.insert(() => i, ":first-child").attr("transform", `translate(${-p / 2}, ${f / 2})`), g && h.attr("style", g);
2864
+ } else h = ue(u, p, f, m);
2865
+ return o && h.attr("style", o), t.width = p, t.height = f, k(t, h), t.intersect = function(e) {
2866
+ return Y.polygon(t, m, e);
2867
+ }, u;
2868
+ }), wn.apply(this, arguments);
2869
+ }
2870
+ i(Cn, "trapezoid");
2871
+ function Tn(e, t) {
2872
+ return En.apply(this, arguments);
2873
+ }
2874
+ function En() {
2875
+ return En = r(function* (e, t) {
2876
+ var n;
2877
+ let { labelStyles: r, nodeStyles: i } = x(t);
2878
+ t.labelStyle = r;
2879
+ let a = (n = t.padding) == null ? 0 : n, o = t.look === "neo" ? 16 : a, s = t.look === "neo" ? 12 : a;
2880
+ if (t.width || t.height) {
2881
+ var c, l;
2882
+ t.height = ((c = t.height) == null ? 0 : c) - s * 2, t.height < 5 && (t.height = 5), t.width = ((l = t.width) == null ? 0 : l) - o * 2, t.width < 15 && (t.width = 15);
2883
+ }
2884
+ let { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = (t != null && t.width ? t == null ? void 0 : t.width : d.width) + o * 2, p = (t != null && t.height ? t == null ? void 0 : t.height : d.height) + s * 2, { cssStyles: m } = t, h = E.svg(u), g = b(t, {});
2885
+ t.look !== "handDrawn" && (g.roughness = 0, g.fillStyle = "solid");
2886
+ let _ = [
2887
+ {
2888
+ x: -f / 2 * .8,
2889
+ y: -p / 2
2890
+ },
2891
+ {
2892
+ x: f / 2 * .8,
2893
+ y: -p / 2
2894
+ },
2895
+ {
2896
+ x: f / 2,
2897
+ y: -p / 2 * .6
2898
+ },
2899
+ {
2900
+ x: f / 2,
2901
+ y: p / 2
2902
+ },
2903
+ {
2904
+ x: -f / 2,
2905
+ y: p / 2
2906
+ },
2907
+ {
2908
+ x: -f / 2,
2909
+ y: -p / 2 * .6
2910
+ }
2911
+ ], v = j(_), y = h.path(v, g), S = u.insert(() => y, ":first-child");
2912
+ return S.attr("class", "basic label-container outer-path"), m && t.look !== "handDrawn" && S.selectChildren("path").attr("style", m), i && t.look !== "handDrawn" && S.selectChildren("path").attr("style", i), k(t, S), t.intersect = function(e) {
2913
+ return Y.polygon(t, _, e);
2914
+ }, u;
2915
+ }), En.apply(this, arguments);
2916
+ }
2917
+ i(Tn, "trapezoidalPentagon");
2918
+ var Dn = 10, On = 10;
2919
+ function kn(e, t) {
2920
+ return An.apply(this, arguments);
2921
+ }
2922
+ function An() {
2923
+ return An = r(function* (e, t) {
2924
+ var n, r, i, o, s;
2925
+ let { labelStyles: c, nodeStyles: l } = x(t);
2926
+ t.labelStyle = c;
2927
+ let u = (n = t.padding) == null ? 0 : n, p = t.look === "neo" ? u * 2 : u;
2928
+ if (t.width || t.height) {
2929
+ var m, h;
2930
+ t.width = (((m = t == null ? void 0 : t.width) == null ? 0 : m) - p) / 2, t.width < On && (t.width = On), t.height = (h = t == null ? void 0 : t.height) == null ? 0 : h, t.height < Dn && (t.height = Dn);
2931
+ }
2932
+ let { shapeSvg: g, bbox: _, label: v } = yield D(e, t, A(t)), y = d((r = f().flowchart) == null ? void 0 : r.htmlLabels), S = (t != null && t.width ? t == null ? void 0 : t.width : _.width) + p, C = t != null && t.height ? t == null ? void 0 : t.height : S + _.height, w = C, T = [
2933
+ {
2934
+ x: 0,
2935
+ y: 0
2936
+ },
2937
+ {
2938
+ x: w,
2939
+ y: 0
2940
+ },
2941
+ {
2942
+ x: w / 2,
2943
+ y: -C
2944
+ }
2945
+ ], { cssStyles: O } = t, M = E.svg(g), N = b(t, {});
2946
+ t.look !== "handDrawn" && (N.roughness = 0, N.fillStyle = "solid");
2947
+ let P = j(T), F = M.path(P, N), I = g.insert(() => F, ":first-child").attr("transform", `translate(${-C / 2}, ${C / 2})`).attr("class", "outer-path");
2948
+ return O && t.look !== "handDrawn" && I.selectChildren("path").attr("style", O), l && t.look !== "handDrawn" && I.selectChildren("path").attr("style", l), t.width = S, t.height = C, k(t, I), v.attr("transform", `translate(${-_.width / 2 - (_.x - ((i = _.left) == null ? 0 : i))}, ${C / 2 - (_.height + ((o = t.padding) == null ? 0 : o) / (y ? 2 : 1) - (_.y - ((s = _.top) == null ? 0 : s)))})`), t.intersect = function(e) {
2949
+ return a.info("Triangle intersect", t, T, e), Y.polygon(t, T, e);
2950
+ }, g;
2951
+ }), An.apply(this, arguments);
2952
+ }
2953
+ i(kn, "triangle");
2954
+ function jn(e, t) {
2955
+ return Mn.apply(this, arguments);
2956
+ }
2957
+ function Mn() {
2958
+ return Mn = r(function* (e, t) {
2959
+ var n, r, i, a, o;
2960
+ let { labelStyles: s, nodeStyles: c } = x(t);
2961
+ t.labelStyle = s;
2962
+ let l = (n = t.padding) == null ? 0 : n, u = t.look === "neo" ? 16 : l, d = t.look === "neo" ? 12 : l, f = !0;
2963
+ if (t.width || t.height) {
2964
+ var p, m;
2965
+ f = !1, t.width = ((p = t == null ? void 0 : t.width) == null ? 0 : p) - u * 2, t.width < 10 && (t.width = 10), t.height = ((m = t == null ? void 0 : t.height) == null ? 0 : m) - d * 2, t.height < 10 && (t.height = 10);
2966
+ }
2967
+ let { shapeSvg: h, bbox: g, label: _ } = yield D(e, t, A(t)), v = (t != null && t.width ? t == null ? void 0 : t.width : g.width) + (u == null ? 0 : u) * 2, y = (t != null && t.height ? t == null ? void 0 : t.height : g.height) + (d == null ? 0 : d) * 2, S = t.look === "neo" ? y / 4 : y / 8, C = y + (f ? S : -S), { cssStyles: w } = t, T = 14 - v, O = T > 0 ? T / 2 : 0, N = E.svg(h), P = b(t, {});
2968
+ t.look !== "handDrawn" && (P.roughness = 0, P.fillStyle = "solid");
2969
+ let F = [
2970
+ {
2971
+ x: -v / 2 - O,
2972
+ y: C / 2
2973
+ },
2974
+ ...M(-v / 2 - O, C / 2, v / 2 + O, C / 2, S, .8),
2975
+ {
2976
+ x: v / 2 + O,
2977
+ y: -C / 2
2978
+ },
2979
+ {
2980
+ x: -v / 2 - O,
2981
+ y: -C / 2
2982
+ }
2983
+ ], I = j(F), L = N.path(I, P), R = h.insert(() => L, ":first-child");
2984
+ return R.attr("class", "basic label-container outer-path"), w && t.look !== "handDrawn" && R.selectAll("path").attr("style", w), c && t.look !== "handDrawn" && R.selectAll("path").attr("style", c), R.attr("transform", `translate(0,${-S / 2})`), _.attr("transform", `translate(${-v / 2 + ((r = t.padding) == null ? 0 : r) - (g.x - ((i = g.left) == null ? 0 : i))},${-y / 2 + ((a = t.padding) == null ? 0 : a) - S - (g.y - ((o = g.top) == null ? 0 : o))})`), k(t, R), t.intersect = function(e) {
2985
+ return Y.polygon(t, F, e);
2986
+ }, h;
2987
+ }), Mn.apply(this, arguments);
2988
+ }
2989
+ i(jn, "waveEdgedRectangle");
2990
+ function Nn(e, t) {
2991
+ return Pn.apply(this, arguments);
2992
+ }
2993
+ function Pn() {
2994
+ return Pn = r(function* (e, t) {
2995
+ var n;
2996
+ let { labelStyles: r, nodeStyles: i } = x(t);
2997
+ t.labelStyle = r;
2998
+ let a = (n = t.padding) == null ? 0 : n, o = t.look === "neo" ? 16 : a, s = t.look === "neo" ? 20 : a;
2999
+ if (t.width || t.height) {
3000
+ var c, l;
3001
+ t.width = (c = t == null ? void 0 : t.width) == null ? 0 : c, t.width < 20 && (t.width = 20), t.height = (l = t == null ? void 0 : t.height) == null ? 0 : l, t.height < 10 && (t.height = 10);
3002
+ let e = Math.min(t.height * .2, t.height / 4);
3003
+ t.height = Math.ceil(t.height - s - 20 / 9 * e), t.width -= o * 2;
3004
+ }
3005
+ let { shapeSvg: u, bbox: d } = yield D(e, t, A(t)), f = (t != null && t.width ? t == null ? void 0 : t.width : d.width) + o * 2, p = (t != null && t.height ? t == null ? void 0 : t.height : d.height) + s, m = p / 8, h = p + m * 2, { cssStyles: g } = t, _ = E.svg(u), v = b(t, {});
3006
+ t.look !== "handDrawn" && (v.roughness = 0, v.fillStyle = "solid");
3007
+ let y = [
3008
+ {
3009
+ x: -f / 2,
3010
+ y: h / 2
3011
+ },
3012
+ ...M(-f / 2, h / 2, f / 2, h / 2, m, 1),
3013
+ {
3014
+ x: f / 2,
3015
+ y: -h / 2
3016
+ },
3017
+ ...M(f / 2, -h / 2, -f / 2, -h / 2, m, -1)
3018
+ ], S = j(y), C = _.path(S, v), w = u.insert(() => C, ":first-child");
3019
+ return w.attr("class", "basic label-container"), g && t.look !== "handDrawn" && w.selectAll("path").attr("style", g), i && t.look !== "handDrawn" && w.selectAll("path").attr("style", i), k(t, w), t.intersect = function(e) {
3020
+ return Y.polygon(t, y, e);
3021
+ }, u;
3022
+ }), Pn.apply(this, arguments);
3023
+ }
3024
+ i(Nn, "waveRectangle");
3025
+ var $ = 10;
3026
+ function Fn(e, t) {
3027
+ return In.apply(this, arguments);
3028
+ }
3029
+ function In() {
3030
+ return In = r(function* (e, t) {
3031
+ var n, r, i, a;
3032
+ let { labelStyles: o, nodeStyles: s } = x(t);
3033
+ t.labelStyle = o;
3034
+ let c = t.look === "neo" ? 16 : (n = t.padding) == null ? 0 : n, l = t.look === "neo" ? 12 : (r = t.padding) == null ? 0 : r;
3035
+ if (t.width || t.height) {
3036
+ var u, d;
3037
+ t.width = Math.max(((u = t == null ? void 0 : t.width) == null ? 0 : u) - c * 2 - $, 10), t.height = Math.max(((d = t == null ? void 0 : t.height) == null ? 0 : d) - l * 2 - $, 10);
3038
+ }
3039
+ let { shapeSvg: f, bbox: p, label: m } = yield D(e, t, A(t)), h = (t != null && t.width ? t == null ? void 0 : t.width : p.width) + c * 2 + $, g = (t != null && t.height ? t == null ? void 0 : t.height : p.height) + l * 2 + $, _ = h - $, v = g - $, y = -_ / 2, S = -v / 2, { cssStyles: C } = t, w = E.svg(f), T = b(t, {}), O = [
3040
+ {
3041
+ x: y - $,
3042
+ y: S - $
3043
+ },
3044
+ {
3045
+ x: y - $,
3046
+ y: S + v
3047
+ },
3048
+ {
3049
+ x: y + _,
3050
+ y: S + v
3051
+ },
3052
+ {
3053
+ x: y + _,
3054
+ y: S - $
3055
+ }
3056
+ ], j = `M${y - $},${S - $} L${y + _},${S - $} L${y + _},${S + v} L${y - $},${S + v} L${y - $},${S - $}
3057
+ M${y - $},${S} L${y + _},${S}
3058
+ M${y},${S - $} L${y},${S + v}`;
3059
+ t.look !== "handDrawn" && (T.roughness = 0, T.fillStyle = "solid");
3060
+ let M = w.path(j, T), N = f.insert(() => M, ":first-child");
3061
+ return N.attr("transform", `translate(${$ / 2}, ${$ / 2})`), N.attr("class", "basic label-container outer-path"), C && t.look !== "handDrawn" && N.selectAll("path").attr("style", C), s && t.look !== "handDrawn" && N.selectAll("path").attr("style", s), m.attr("transform", `translate(${-(p.width / 2) + $ / 2 - (p.x - ((i = p.left) == null ? 0 : i))}, ${-(p.height / 2) + $ / 2 - (p.y - ((a = p.top) == null ? 0 : a))})`), k(t, N), t.intersect = function(e) {
3062
+ return Y.polygon(t, O, e);
3063
+ }, f;
3064
+ }), In.apply(this, arguments);
3065
+ }
3066
+ i(Fn, "windowPane");
3067
+ var Ln = /* @__PURE__ */ new Set(["redux-color", "redux-dark-color"]), Rn = /* @__PURE__ */ new Set([
3068
+ "redux",
3069
+ "redux-dark",
3070
+ "redux-color",
3071
+ "redux-dark-color"
3072
+ ]);
3073
+ function zn(e, t) {
3074
+ return Bn.apply(this, arguments);
3075
+ }
3076
+ function Bn() {
3077
+ return Bn = r(function* (e, n) {
3078
+ var r, i, a, o, s, c;
3079
+ let l = n;
3080
+ l.alias && (n.label = l.alias);
3081
+ let { theme: f, themeVariables: p } = u(), { rowEven: h, rowOdd: _, nodeBorder: v, borderColorArray: y } = p;
3082
+ if (n.look === "handDrawn") {
3083
+ let { themeVariables: r } = u(), { background: i } = r;
3084
+ yield zn(e, t(t({}, n), {}, {
3085
+ id: n.id + "-background",
3086
+ domId: (n.domId || n.id) + "-background",
3087
+ look: "default",
3088
+ cssStyles: ["stroke: none", `fill: ${i}`]
3089
+ }));
3090
+ }
3091
+ let S = u();
3092
+ n.useHtmlLabels = S.htmlLabels;
3093
+ let C = (r = (i = S.er) == null ? void 0 : i.diagramPadding) == null ? 10 : r, w = (a = (o = S.er) == null ? void 0 : o.entityPadding) == null ? 6 : a, { cssStyles: T } = n, { labelStyles: D, nodeStyles: O } = x(n);
3094
+ if (l.attributes.length === 0 && n.label) {
3095
+ let t = {
3096
+ rx: 0,
3097
+ ry: 0,
3098
+ labelPaddingX: C,
3099
+ labelPaddingY: C * 1.5,
3100
+ classes: ""
3101
+ };
3102
+ g(n.label, S) + t.labelPaddingX * 2 < S.er.minEntityWidth && (n.width = S.er.minEntityWidth);
3103
+ let r = yield Ie(e, n, t);
3104
+ if (f != null && Ln.has(f)) {
3105
+ var j;
3106
+ let e = (j = l.colorIndex) == null ? 0 : j;
3107
+ r.attr("data-color-id", `color-${e % y.length}`);
3108
+ }
3109
+ if (!d(S.htmlLabels)) {
3110
+ var M;
3111
+ let e = r.select("text"), t = (M = e.node()) == null ? void 0 : M.getBBox();
3112
+ e.attr("transform", `translate(${-t.width / 2}, 0)`);
3113
+ }
3114
+ return r;
3115
+ }
3116
+ S.htmlLabels || (C *= 1.25, w *= 1.25);
3117
+ let N = A(n);
3118
+ N || (N = "node default");
3119
+ let P = e.insert("g").attr("class", N).attr("id", n.domId || n.id), F = yield Vn(P, (s = n.label) == null ? "" : s, S, 0, 0, ["name"], D);
3120
+ F.height += w;
3121
+ let I = 0, L = [], R = [], z = 0, B = 0, V = 0, H = 0, U = !0, W = !0;
3122
+ for (let e of l.attributes) {
3123
+ let t = yield Vn(P, e.type, S, 0, I, ["attribute-type"], D);
3124
+ z = Math.max(z, t.width + C);
3125
+ let n = yield Vn(P, e.name, S, 0, I, ["attribute-name"], D);
3126
+ B = Math.max(B, n.width + C);
3127
+ let r = yield Vn(P, e.keys.join(), S, 0, I, ["attribute-keys"], D);
3128
+ V = Math.max(V, r.width + C);
3129
+ let i = yield Vn(P, e.comment, S, 0, I, ["attribute-comment"], D);
3130
+ H = Math.max(H, i.width + C);
3131
+ let a = Math.max(t.height, n.height, r.height, i.height) + w;
3132
+ R.push({
3133
+ yOffset: I,
3134
+ rowHeight: a
3135
+ }), I += a;
3136
+ }
3137
+ let G = 4;
3138
+ V <= C && (U = !1, V = 0, G--), H <= C && (W = !1, H = 0, G--);
3139
+ let ee = P.node().getBBox();
3140
+ if (F.width + C * 2 - (z + B + V + H) > 0) {
3141
+ let e = F.width + C * 2 - (z + B + V + H);
3142
+ z += e / G, B += e / G, V > 0 && (V += e / G), H > 0 && (H += e / G);
3143
+ }
3144
+ let te = z + B + V + H, ne = E.svg(P), K = b(n, {});
3145
+ n.look !== "handDrawn" && (K.roughness = 0, K.fillStyle = "solid");
3146
+ let re = 0;
3147
+ R.length > 0 && (re = R.reduce((e, t) => {
3148
+ var n;
3149
+ return e + ((n = t == null ? void 0 : t.rowHeight) == null ? 0 : n);
3150
+ }, 0));
3151
+ let ie = Math.max(ee.width + C * 2, (n == null ? void 0 : n.width) || 0, te), ae = Math.max(((c = re) == null ? 0 : c) + F.height, (n == null ? void 0 : n.height) || 0), q = -ie / 2, J = -ae / 2;
3152
+ if (P.selectAll("g:not(:first-child)").each((e, t, n) => {
3153
+ let r = m(n[t]), i = r.attr("transform"), a = 0, o = 0;
3154
+ if (i) {
3155
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);
3156
+ e && (a = parseFloat(e[1]), o = parseFloat(e[2]), r.attr("class").includes("attribute-name") ? a += z : r.attr("class").includes("attribute-keys") ? a += z + B : r.attr("class").includes("attribute-comment") && (a += z + B + V));
3157
+ }
3158
+ r.attr("transform", `translate(${q + C / 2 + a}, ${o + J + F.height + w / 2})`);
3159
+ }), P.select(".name").attr("transform", "translate(" + -F.width / 2 + ", " + (J + w / 2) + ")"), f != null && Ln.has(f)) {
3160
+ var oe;
3161
+ let e = (oe = l.colorIndex) == null ? 0 : oe;
3162
+ P.attr("data-color-id", `color-${e % y.length}`);
3163
+ }
3164
+ let se = ne.rectangle(q, J, ie, ae, K), ce = P.insert(() => se, ":first-child").attr("class", "outer-path").attr("style", T.join(""));
3165
+ L.push(0);
3166
+ for (let [e, n] of R.entries()) {
3167
+ let r = (e + 1) % 2 == 0 && n.yOffset !== 0, i = ne.rectangle(q, F.height + J + (n == null ? void 0 : n.yOffset), ie, n == null ? void 0 : n.rowHeight, t(t({}, K), {}, {
3168
+ fill: r ? h : _,
3169
+ stroke: v
3170
+ }));
3171
+ P.insert(() => i, "g.label").attr("style", T.join("")).attr("class", `row-rect-${r ? "even" : "odd"}`);
3172
+ }
3173
+ let le = 1e-4, X = Un(q, F.height + J, ie + q, F.height + J, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K);
3174
+ if (P.insert(() => Z).attr("class", "divider"), X = Un(z + q, F.height + J, z + q, ae + J, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider"), U) {
3175
+ let e = z + B + q;
3176
+ X = Un(e, F.height + J, e, ae + J, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider");
3177
+ }
3178
+ if (W) {
3179
+ let e = z + B + V + q;
3180
+ X = Un(e, F.height + J, e, ae + J, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider");
3181
+ }
3182
+ for (let e of L) {
3183
+ let t = F.height + J + e;
3184
+ X = Un(q, t, ie + q, t, le), Z = ne.polygon(X.map((e) => [e.x, e.y]), K), P.insert(() => Z).attr("class", "divider");
3185
+ }
3186
+ if (k(n, ce), O && n.look !== "handDrawn") if (f != null && Rn.has(f)) P.selectAll("path").attr("style", O);
3187
+ else {
3188
+ var ue;
3189
+ let e = O.split(";"), t = e == null || (ue = e.filter((e) => e.includes("stroke"))) == null ? void 0 : ue.map((e) => `${e}`).join("; ");
3190
+ P.selectAll("path").attr("style", t == null ? "" : t), P.selectAll(".row-rect-even path").attr("style", O);
3191
+ }
3192
+ return n.intersect = function(e) {
3193
+ return Y.rect(n, e);
3194
+ }, P;
3195
+ }), Bn.apply(this, arguments);
3196
+ }
3197
+ i(zn, "erBox");
3198
+ function Vn(e, t, n) {
3199
+ return Hn.apply(this, arguments);
3200
+ }
3201
+ function Hn() {
3202
+ return Hn = r(function* (e, t, n, r = 0, i = 0, a = [], o = "") {
3203
+ let s = e.insert("g").attr("class", `label ${a.join(" ")}`).attr("transform", `translate(${r}, ${i})`).attr("style", o);
3204
+ t !== c(t) && (t = c(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
3205
+ let l = s.node().appendChild(yield w(s, t, {
3206
+ width: g(t, n) + 100,
3207
+ style: o,
3208
+ useHtmlLabels: n.htmlLabels
3209
+ }, n));
3210
+ if (t.includes("&lt;") || t.includes("&gt;")) {
3211
+ let e = l.children[0];
3212
+ for (e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">"); e.childNodes[0];) e = e.childNodes[0], e.textContent = e.textContent.replaceAll("&lt;", "<").replaceAll("&gt;", ">");
3213
+ }
3214
+ let u = l.getBBox();
3215
+ if (d(n.htmlLabels)) {
3216
+ let e = l.children[0];
3217
+ e.style.textAlign = "start";
3218
+ let t = m(l);
3219
+ u = e.getBoundingClientRect(), t.attr("width", u.width), t.attr("height", u.height);
3220
+ }
3221
+ return u;
3222
+ }), Hn.apply(this, arguments);
3223
+ }
3224
+ i(Vn, "addText");
3225
+ function Un(e, t, n, r, i) {
3226
+ return e === n ? [
3227
+ {
3228
+ x: e - i / 2,
3229
+ y: t
3230
+ },
3231
+ {
3232
+ x: e + i / 2,
3233
+ y: t
3234
+ },
3235
+ {
3236
+ x: n + i / 2,
3237
+ y: r
3238
+ },
3239
+ {
3240
+ x: n - i / 2,
3241
+ y: r
3242
+ }
3243
+ ] : [
3244
+ {
3245
+ x: e,
3246
+ y: t - i / 2
3247
+ },
3248
+ {
3249
+ x: e,
3250
+ y: t + i / 2
3251
+ },
3252
+ {
3253
+ x: n,
3254
+ y: r + i / 2
3255
+ },
3256
+ {
3257
+ x: n,
3258
+ y: r - i / 2
3259
+ }
3260
+ ];
3261
+ }
3262
+ i(Un, "lineToPolygon");
3263
+ function Wn(e, t, n, r) {
3264
+ return Gn.apply(this, arguments);
3265
+ }
3266
+ function Gn() {
3267
+ return Gn = r(function* (e, t, n, r, i = ((e) => (e = n.class.padding) == null ? 12 : e)()) {
3268
+ let a = r ? 0 : 3, o = e.insert("g").attr("class", A(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
3269
+ if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
3270
+ let e = t.annotations[0];
3271
+ yield Kn(s, { text: `\xAB${e}\xBB` }, 0), d = s.node().getBBox().height;
3272
+ }
3273
+ c = o.insert("g").attr("class", "label-group text"), yield Kn(c, t, 0, ["font-weight: bolder"]);
3274
+ let m = c.node().getBBox();
3275
+ f = m.height, l = o.insert("g").attr("class", "members-group text");
3276
+ let h = 0;
3277
+ for (let e of t.members) {
3278
+ let t = yield Kn(l, e, h, [e.parseClassifier()]);
3279
+ h += t + a;
3280
+ }
3281
+ p = l.node().getBBox().height, p <= 0 && (p = i / 2), u = o.insert("g").attr("class", "methods-group text");
3282
+ let g = 0;
3283
+ for (let e of t.methods) {
3284
+ let t = yield Kn(u, e, g, [e.parseClassifier()]);
3285
+ g += t + a;
3286
+ }
3287
+ let _ = o.node().getBBox();
3288
+ if (s !== null) {
3289
+ let e = s.node().getBBox();
3290
+ s.attr("transform", `translate(${-e.width / 2})`);
3291
+ }
3292
+ return c.attr("transform", `translate(${-m.width / 2}, ${d})`), _ = o.node().getBBox(), l.attr("transform", `translate(0, ${d + f + i * 2})`), _ = o.node().getBBox(), u.attr("transform", `translate(0, ${d + f + (p ? p + i * 4 : i * 2)})`), _ = o.node().getBBox(), {
3293
+ shapeSvg: o,
3294
+ bbox: _
3295
+ };
3296
+ }), Gn.apply(this, arguments);
3297
+ }
3298
+ i(Wn, "textHelper");
3299
+ function Kn(e, t, n) {
3300
+ return qn.apply(this, arguments);
3301
+ }
3302
+ function qn() {
3303
+ return qn = r(function* (e, t, n, r = []) {
3304
+ var a;
3305
+ let c = e.insert("g").attr("class", "label").attr("style", r.join("; ")), l = u(), f = "useHtmlLabels" in t ? t.useHtmlLabels : (a = d(l.htmlLabels)) == null ? !0 : a, p = "";
3306
+ p = "text" in t ? t.text : t.label, !f && p.startsWith("\\") && (p = p.substring(1)), o(p) && (f = !0);
3307
+ let _ = yield w(c, s(h(p)), {
3308
+ width: g(p, l) + 50,
3309
+ classes: "markdown-node-label",
3310
+ useHtmlLabels: f
3311
+ }, l), v, y = 1;
3312
+ if (f) {
3313
+ let e = _.children[0], t = m(_);
3314
+ y = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (y += e.innerHTML.split("<mrow>").length - 1);
3315
+ let n = e.getElementsByTagName("img");
3316
+ if (n) {
3317
+ let e = p.replace(/<img[^>]*>/g, "").trim() === "";
3318
+ yield Promise.all([...n].map((t) => new Promise((n) => {
3319
+ function r() {
3320
+ if (t.style.display = "flex", t.style.flexDirection = "column", e) {
3321
+ var r, i;
3322
+ let e = (r = (i = l.fontSize) == null ? void 0 : i.toString()) == null ? window.getComputedStyle(document.body).fontSize : r, n = parseInt(e, 10) * 5 + "px";
3323
+ t.style.minWidth = n, t.style.maxWidth = n;
3324
+ } else t.style.width = "100%";
3325
+ n(t);
3326
+ }
3327
+ i(r, "setupImage"), setTimeout(() => {
3328
+ t.complete && r();
3329
+ }), t.addEventListener("error", r), t.addEventListener("load", r);
3330
+ })));
3331
+ }
3332
+ v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
3333
+ } else {
3334
+ r.includes("font-weight: bolder") && m(_).selectAll("tspan").attr("font-weight", ""), y = _.children.length;
3335
+ let e = _.children[0];
3336
+ (_.textContent === "" || _.textContent.includes("&gt")) && (e.textContent = p[0] + p.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), p[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), v = _.getBBox();
3337
+ }
3338
+ return c.attr("transform", "translate(0," + (-v.height / (2 * y) + n) + ")"), v.height;
3339
+ }), qn.apply(this, arguments);
3340
+ }
3341
+ i(Kn, "addText");
3342
+ function Jn(e, t) {
3343
+ return Yn.apply(this, arguments);
3344
+ }
3345
+ function Yn() {
3346
+ return Yn = r(function* (e, t) {
3347
+ var n, r, i, a, o, s, c, l, u, p, h;
3348
+ let g = f(), { themeVariables: _ } = g, { useGradient: v } = _, y = (n = g.class.padding) == null ? 12 : n, S = y, C = (r = (i = t.useHtmlLabels) == null ? d(g.htmlLabels) : i) == null ? !0 : r, w = t;
3349
+ w.annotations = (a = w.annotations) == null ? [] : a, w.members = (o = w.members) == null ? [] : o, w.methods = (s = w.methods) == null ? [] : s;
3350
+ let { shapeSvg: T, bbox: D } = yield Wn(e, t, g, C, S), { labelStyles: O, nodeStyles: A } = x(t);
3351
+ t.labelStyle = O, t.cssStyles = w.styles || "";
3352
+ let j = ((c = w.styles) == null ? void 0 : c.join(";")) || A || "";
3353
+ t.cssStyles || (t.cssStyles = j.replaceAll("!important", "").split(";"));
3354
+ let M = w.members.length === 0 && w.methods.length === 0 && !((l = g.class) != null && l.hideEmptyMembersBox), N = E.svg(T), P = b(t, {});
3355
+ t.look !== "handDrawn" && (P.roughness = 0, P.fillStyle = "solid");
3356
+ let F = Math.max((u = t.width) == null ? 0 : u, D.width), I = Math.max((p = t.height) == null ? 0 : p, D.height), L = ((h = t.height) == null ? 0 : h) > D.height;
3357
+ w.members.length === 0 && w.methods.length === 0 ? I += S : w.members.length > 0 && w.methods.length === 0 && (I += S * 2);
3358
+ let R = -F / 2, z = -I / 2, B = M ? y * 2 : w.members.length === 0 && w.methods.length === 0 ? -y : 0;
3359
+ L && (B = y * 2);
3360
+ let V = N.rectangle(R - y, z - y - (M ? y : w.members.length === 0 && w.methods.length === 0 ? -y / 2 : 0), F + 2 * y, I + 2 * y + B, P), H = T.insert(() => V, ":first-child");
3361
+ H.attr("class", "basic label-container outer-path");
3362
+ let U = H.node().getBBox(), W = T.select(".annotation-group").node().getBBox().height - (M ? y / 2 : 0) || 0, G = T.select(".label-group").node().getBBox().height - (M ? y / 2 : 0) || 0, ee = T.select(".members-group").node().getBBox().height - (M ? y / 2 : 0) || 0, te = (W + G + z + y - (z - y - (M ? y : w.members.length === 0 && w.methods.length === 0 ? -y / 2 : 0))) / 2;
3363
+ if (T.selectAll(".text").each((e, t, n) => {
3364
+ var r;
3365
+ let i = m(n[t]), a = i.attr("transform"), o = 0;
3366
+ if (a) {
3367
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
3368
+ e && (o = parseFloat(e[2]));
3369
+ }
3370
+ let s = o + z + y - (M ? y : w.members.length === 0 && w.methods.length === 0 ? -y / 2 : 0);
3371
+ if (i.attr("class").includes("methods-group")) {
3372
+ let e = Math.max(ee, S / 2);
3373
+ s = L ? Math.max(te, W + G + e + z + S * 2 + y) + S * 2 : W + G + e + z + S * 4 + y;
3374
+ }
3375
+ w.members.length === 0 && w.methods.length === 0 && (r = g.class) != null && r.hideEmptyMembersBox && (s = w.annotations.length > 0 ? o - S : o), C || (s -= 4);
3376
+ let c = R;
3377
+ if (i.attr("class").includes("label-group") || i.attr("class").includes("annotation-group")) {
3378
+ var l;
3379
+ c = -((l = i.node()) == null ? void 0 : l.getBBox().width) / 2 || 0, T.selectAll("text").each(function(e, t, n) {
3380
+ window.getComputedStyle(n[t]).textAnchor === "middle" && (c = 0);
3381
+ });
3382
+ }
3383
+ i.attr("transform", `translate(${c}, ${s})`);
3384
+ }), w.members.length > 0 || w.methods.length > 0 || M) {
3385
+ let e = W + G + z + y, n = N.line(U.x, e, U.x + U.width, e + .001, P);
3386
+ T.insert(() => n).attr("class", `divider${t.look === "neo" && !v ? " neo-line" : ""}`).attr("style", j);
3387
+ }
3388
+ if (M || w.members.length > 0 || w.methods.length > 0) {
3389
+ let e = W + G + ee + z + S * 2 + y, n = N.line(U.x, L ? Math.max(te, e) : e, U.x + U.width, (L ? Math.max(te, e) : e) + .001, P);
3390
+ T.insert(() => n).attr("class", `divider${t.look === "neo" && !v ? " neo-line" : ""}`).attr("style", j);
3391
+ }
3392
+ if (w.look !== "handDrawn" && T.selectAll("path").attr("style", j), H.select(":nth-child(2)").attr("style", j), T.selectAll(".divider").select("path").attr("style", j), t.labelStyle ? T.selectAll("span").attr("style", t.labelStyle) : T.selectAll("span").attr("style", j), !C) {
3393
+ let e = RegExp(/color\s*:\s*([^;]*)/), t = e.exec(j);
3394
+ if (t) {
3395
+ let e = t[0].replace("color", "fill");
3396
+ T.selectAll("tspan").attr("style", e);
3397
+ } else if (O) {
3398
+ let t = e.exec(O);
3399
+ if (t) {
3400
+ let e = t[0].replace("color", "fill");
3401
+ T.selectAll("tspan").attr("style", e);
3402
+ }
3403
+ }
3404
+ }
3405
+ return k(t, H), t.intersect = function(e) {
3406
+ return Y.rect(t, e);
3407
+ }, T;
3408
+ }), Yn.apply(this, arguments);
3409
+ }
3410
+ i(Jn, "classBox");
3411
+ function Xn(e, t) {
3412
+ return Zn.apply(this, arguments);
3413
+ }
3414
+ function Zn() {
3415
+ return Zn = r(function* (e, t) {
3416
+ var n, r, i, a, o;
3417
+ let { labelStyles: s, nodeStyles: c } = x(t);
3418
+ t.labelStyle = s;
3419
+ let l = t, u = t, d = "verifyMethod" in t, p = A(t), { themeVariables: h } = f(), { borderColorArray: g, requirementEdgeLabelBackground: _ } = h, v = e.insert("g").attr("class", p).attr("id", (n = t.domId) == null ? t.id : n), y;
3420
+ y = d ? yield Qn(v, `&lt;&lt;${l.type}&gt;&gt;`, 0, t.labelStyle) : yield Qn(v, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
3421
+ let S = y, C = yield Qn(v, l.name, S, t.labelStyle + "; font-weight: bold;");
3422
+ if (S += C + 20, d) {
3423
+ let e = yield Qn(v, `${l.requirementId ? `ID: ${l.requirementId}` : ""}`, S, t.labelStyle);
3424
+ S += e;
3425
+ let n = yield Qn(v, `${l.text ? `Text: ${l.text}` : ""}`, S, t.labelStyle);
3426
+ S += n;
3427
+ let r = yield Qn(v, `${l.risk ? `Risk: ${l.risk}` : ""}`, S, t.labelStyle);
3428
+ S += r, yield Qn(v, `${l.verifyMethod ? `Verification: ${l.verifyMethod}` : ""}`, S, t.labelStyle);
3429
+ } else {
3430
+ let e = yield Qn(v, `${u.type ? `Type: ${u.type}` : ""}`, S, t.labelStyle);
3431
+ S += e, yield Qn(v, `${u.docRef ? `Doc Ref: ${u.docRef}` : ""}`, S, t.labelStyle);
3432
+ }
3433
+ let w = ((r = (i = v.node()) == null ? void 0 : i.getBBox().width) == null ? 200 : r) + 20, T = ((a = (o = v.node()) == null ? void 0 : o.getBBox().height) == null ? 200 : a) + 20, D = -w / 2, O = -T / 2, j = E.svg(v), M = b(t, {});
3434
+ t.look !== "handDrawn" && (M.roughness = 0, M.fillStyle = "solid");
3435
+ let N = j.rectangle(D, O, w, T, M), P = v.insert(() => N, ":first-child");
3436
+ if (P.attr("class", "basic label-container outer-path").attr("style", c), g != null && g.length) {
3437
+ var F;
3438
+ let e = (F = t.colorIndex) == null ? 0 : F;
3439
+ v.attr("data-color-id", `color-${e % g.length}`);
3440
+ }
3441
+ if (v.selectAll(".label").each((e, t, n) => {
3442
+ let r = m(n[t]), i = r.attr("transform"), a = 0, o = 0;
3443
+ if (i) {
3444
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);
3445
+ e && (a = parseFloat(e[1]), o = parseFloat(e[2]));
3446
+ }
3447
+ let s = o - T / 2, c = D + 20 / 2;
3448
+ (t === 0 || t === 1) && (c = a), r.attr("transform", `translate(${c}, ${s + 20})`);
3449
+ }), S > y + C + 20) {
3450
+ let e = O + y + C + 20, n;
3451
+ if (t.look === "neo") {
3452
+ let t = .001, r = [
3453
+ [D, e],
3454
+ [D + w, e],
3455
+ [D + w, e + t],
3456
+ [D, e + t]
3457
+ ];
3458
+ n = j.polygon(r, M);
3459
+ } else n = j.line(D, e, D + w, e, M);
3460
+ v.insert(() => n).attr("class", "divider");
3461
+ }
3462
+ return k(t, P), t.intersect = function(e) {
3463
+ return Y.rect(t, e);
3464
+ }, c && t.look !== "handDrawn" && (_ || g != null && g.length) && v.selectAll("path").attr("style", c), v;
3465
+ }), Zn.apply(this, arguments);
3466
+ }
3467
+ i(Xn, "requirementBox");
3468
+ function Qn(e, t, n) {
3469
+ return $n.apply(this, arguments);
3470
+ }
3471
+ function $n() {
3472
+ return $n = r(function* (e, t, n, r = "") {
3473
+ var i;
3474
+ if (t === "") return 0;
3475
+ let a = e.insert("g").attr("class", "label").attr("style", r), o = f(), c = (i = o.htmlLabels) == null ? !0 : i, l = yield w(a, s(h(t)), {
3476
+ width: g(t, o) + 50,
3477
+ classes: "markdown-node-label",
3478
+ useHtmlLabels: c,
3479
+ style: r
3480
+ }, o), u;
3481
+ if (c) {
3482
+ let e = l.children[0], t = m(l);
3483
+ u = e.getBoundingClientRect(), t.attr("width", u.width), t.attr("height", u.height);
3484
+ } else {
3485
+ let e = l.children[0];
3486
+ for (let t of e.children) r && t.setAttribute("style", r);
3487
+ u = l.getBBox(), u.height += 6;
3488
+ }
3489
+ return a.attr("transform", `translate(${-u.width / 2},${-u.height / 2 + n})`), u.height;
3490
+ }), $n.apply(this, arguments);
3491
+ }
3492
+ i(Qn, "addText");
3493
+ var er = /* @__PURE__ */ i((e) => {
3494
+ switch (e) {
3495
+ case "Very High": return "red";
3496
+ case "High": return "orange";
3497
+ case "Medium": return null;
3498
+ case "Low": return "blue";
3499
+ case "Very Low": return "lightblue";
3500
+ }
3501
+ }, "colorFromPriority");
3502
+ function tr(e, t, n) {
3503
+ return nr.apply(this, arguments);
3504
+ }
3505
+ function nr() {
3506
+ return nr = r(function* (e, t, { config: n }) {
3507
+ var r, i;
3508
+ let { labelStyles: a, nodeStyles: o } = x(t);
3509
+ t.labelStyle = a || "";
3510
+ let s = t.width;
3511
+ t.width = ((r = t.width) == null ? 200 : r) - 10;
3512
+ let { shapeSvg: c, bbox: l, label: u } = yield D(e, t, A(t)), d = t.padding || 10, f = "", p;
3513
+ if ("ticket" in t && t.ticket && !(n == null || (i = n.kanban) == null) && i.ticketBaseUrl) {
3514
+ var m;
3515
+ f = n == null || (m = n.kanban) == null ? void 0 : m.ticketBaseUrl.replace("#TICKET#", t.ticket), p = c.insert("svg:a", ":first-child").attr("class", "kanban-ticket-link").attr("xlink:href", f).attr("target", "_blank");
3516
+ }
3517
+ let h = {
3518
+ useHtmlLabels: t.useHtmlLabels,
3519
+ labelStyle: t.labelStyle || "",
3520
+ width: t.width,
3521
+ img: t.img,
3522
+ padding: t.padding || 8,
3523
+ centerLabel: !1
3524
+ }, g, _;
3525
+ p ? {label: g, bbox: _} = yield O(p, "ticket" in t && t.ticket || "", h) : {label: g, bbox: _} = yield O(c, "ticket" in t && t.ticket || "", h);
3526
+ let { label: v, bbox: y } = yield O(c, "assigned" in t && t.assigned || "", h);
3527
+ t.width = s;
3528
+ let S = (t == null ? void 0 : t.width) || 0, C = Math.max(_.height, y.height) / 2, w = Math.max(l.height + 20, (t == null ? void 0 : t.height) || 0) + C, T = -S / 2, j = -w / 2;
3529
+ u.attr("transform", "translate(" + (d - S / 2) + ", " + (-C - l.height / 2) + ")"), g.attr("transform", "translate(" + (d - S / 2) + ", " + (-C + l.height / 2) + ")"), v.attr("transform", "translate(" + (d + S / 2 - y.width - 20) + ", " + (-C + l.height / 2) + ")");
3530
+ let M, { rx: N, ry: P } = t, { cssStyles: F } = t;
3531
+ if (t.look === "handDrawn") {
3532
+ let e = E.svg(c), n = b(t, {}), r = N || P ? e.path(L(T, j, S, w, N || 0), n) : e.rectangle(T, j, S, w, n);
3533
+ M = c.insert(() => r, ":first-child"), M.attr("class", "basic label-container").attr("style", F || null);
3534
+ } else {
3535
+ M = c.insert("rect", ":first-child"), M.attr("class", "basic label-container __APA__").attr("style", o).attr("rx", N == null ? 5 : N).attr("ry", P == null ? 5 : P).attr("x", T).attr("y", j).attr("width", S).attr("height", w);
3536
+ let e = "priority" in t && t.priority;
3537
+ if (e) {
3538
+ let t = c.append("line"), n = T + 2, r = j + Math.floor((N == null ? 0 : N) / 2), i = j + w - Math.floor((N == null ? 0 : N) / 2);
3539
+ t.attr("x1", n).attr("y1", r).attr("x2", n).attr("y2", i).attr("stroke-width", "4").attr("stroke", er(e));
3540
+ }
3541
+ }
3542
+ return k(t, M), t.height = w, t.intersect = function(e) {
3543
+ return Y.rect(t, e);
3544
+ }, c;
3545
+ }), nr.apply(this, arguments);
3546
+ }
3547
+ i(tr, "kanbanItem");
3548
+ function rr(e, t) {
3549
+ return ir.apply(this, arguments);
3550
+ }
3551
+ function ir() {
3552
+ return ir = r(function* (e, t) {
3553
+ let { labelStyles: n, nodeStyles: r } = x(t);
3554
+ t.labelStyle = n;
3555
+ let { shapeSvg: i, bbox: o, halfPadding: s, label: c } = yield D(e, t, A(t)), l = o.width + 10 * s, u = o.height + 8 * s, d = .15 * l, { cssStyles: f } = t, p = o.width + 20, m = o.height + 20, h = Math.max(l, p), g = Math.max(u, m);
3556
+ c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`);
3557
+ let v, y = `M0 0
3558
+ a${d},${d} 1 0,0 ${h * .25},${-1 * g * .1}
3559
+ a${d},${d} 1 0,0 ${h * .25},0
3560
+ a${d},${d} 1 0,0 ${h * .25},0
3561
+ a${d},${d} 1 0,0 ${h * .25},${g * .1}
3562
+
3563
+ a${d},${d} 1 0,0 ${h * .15},${g * .33}
3564
+ a${d * .8},${d * .8} 1 0,0 0,${g * .34}
3565
+ a${d},${d} 1 0,0 ${-1 * h * .15},${g * .33}
3566
+
3567
+ a${d},${d} 1 0,0 ${-1 * h * .25},${g * .15}
3568
+ a${d},${d} 1 0,0 ${-1 * h * .25},0
3569
+ a${d},${d} 1 0,0 ${-1 * h * .25},0
3570
+ a${d},${d} 1 0,0 ${-1 * h * .25},${-1 * g * .15}
3571
+
3572
+ a${d},${d} 1 0,0 ${-1 * h * .1},${-1 * g * .33}
3573
+ a${d * .8},${d * .8} 1 0,0 0,${-1 * g * .34}
3574
+ a${d},${d} 1 0,0 ${h * .1},${-1 * g * .33}
3575
+ H0 V0 Z`;
3576
+ if (t.look === "handDrawn") {
3577
+ let e = E.svg(i), n = b(t, {}), r = e.path(y, n);
3578
+ v = i.insert(() => r, ":first-child"), v.attr("class", "basic label-container").attr("style", _(f));
3579
+ } else v = i.insert("path", ":first-child").attr("class", "basic label-container").attr("style", r).attr("d", y);
3580
+ return v.attr("transform", `translate(${-h / 2}, ${-g / 2})`), k(t, v), t.calcIntersect = function(e, t) {
3581
+ return Y.rect(e, t);
3582
+ }, t.intersect = function(e) {
3583
+ return a.info("Bang intersect", t, e), Y.rect(t, e);
3584
+ }, i;
3585
+ }), ir.apply(this, arguments);
3586
+ }
3587
+ i(rr, "bang");
3588
+ function ar(e, t) {
3589
+ return or.apply(this, arguments);
3590
+ }
3591
+ function or() {
3592
+ return or = r(function* (e, t) {
3593
+ let { labelStyles: n, nodeStyles: r } = x(t);
3594
+ t.labelStyle = n;
3595
+ let { shapeSvg: i, bbox: o, halfPadding: s, label: c } = yield D(e, t, A(t)), l = o.width + 2 * s, u = o.height + 2 * s, d = .15 * l, f = .25 * l, p = .35 * l, m = .2 * l, { cssStyles: h } = t, g, v = `M0 0
3596
+ a${d},${d} 0 0,1 ${l * .25},${-1 * l * .1}
3597
+ a${p},${p} 1 0,1 ${l * .4},${-1 * l * .1}
3598
+ a${f},${f} 1 0,1 ${l * .35},${l * .2}
3599
+
3600
+ a${d},${d} 1 0,1 ${l * .15},${u * .35}
3601
+ a${m},${m} 1 0,1 ${-1 * l * .15},${u * .65}
3602
+
3603
+ a${f},${d} 1 0,1 ${-1 * l * .25},${l * .15}
3604
+ a${p},${p} 1 0,1 ${-1 * l * .5},0
3605
+ a${d},${d} 1 0,1 ${-1 * l * .25},${-1 * l * .15}
3606
+
3607
+ a${d},${d} 1 0,1 ${-1 * l * .1},${-1 * u * .35}
3608
+ a${m},${m} 1 0,1 ${l * .1},${-1 * u * .65}
3609
+ H0 V0 Z`;
3610
+ if (t.look === "handDrawn") {
3611
+ let e = E.svg(i), n = b(t, {}), r = e.path(v, n);
3612
+ g = i.insert(() => r, ":first-child"), g.attr("class", "basic label-container").attr("style", _(h));
3613
+ } else g = i.insert("path", ":first-child").attr("class", "basic label-container").attr("style", r).attr("d", v);
3614
+ return c.attr("transform", `translate(${-o.width / 2}, ${-o.height / 2})`), g.attr("transform", `translate(${-l / 2}, ${-u / 2})`), k(t, g), t.calcIntersect = function(e, t) {
3615
+ return Y.rect(e, t);
3616
+ }, t.intersect = function(e) {
3617
+ return a.info("Cloud intersect", t, e), Y.rect(t, e);
3618
+ }, i;
3619
+ }), or.apply(this, arguments);
3620
+ }
3621
+ i(ar, "cloud");
3622
+ function sr(e, t) {
3623
+ return cr.apply(this, arguments);
3624
+ }
3625
+ function cr() {
3626
+ return cr = r(function* (e, t) {
3627
+ let { labelStyles: n, nodeStyles: r } = x(t);
3628
+ t.labelStyle = n;
3629
+ let { shapeSvg: i, bbox: a, halfPadding: o, label: s } = yield D(e, t, A(t)), c = a.width + 8 * o, l = a.height + 2 * o, u = t.look === "neo" ? `
3630
+ M${-c / 2} ${l / 2 - 5}
3631
+ v${-l + 10}
3632
+ q0,-5 5,-5
3633
+ h${c - 10}
3634
+ q5,0 5,5
3635
+ v${l - 5}
3636
+ H${-c / 2}
3637
+ Z
3638
+ ` : `
3639
+ M${-c / 2} ${l / 2 - 5}
3640
+ v${-l + 10}
3641
+ q0,-5 5,-5
3642
+ h${c - 10}
3643
+ q5,0 5,5
3644
+ v${l - 10}
3645
+ q0,5 -5,5
3646
+ h${-(c - 10)}
3647
+ q-5,0 -5,-5
3648
+ Z
3649
+ `;
3650
+ if (!t.domId) throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);
3651
+ let d = i.append("path").attr("id", t.domId).attr("class", "node-bkg node-" + t.type).attr("style", r).attr("d", u);
3652
+ return i.append("line").attr("class", "node-line-").attr("x1", -c / 2).attr("y1", l / 2).attr("x2", c / 2).attr("y2", l / 2), s.attr("transform", `translate(${-a.width / 2}, ${-a.height / 2})`), i.append(() => s.node()), k(t, d), t.calcIntersect = function(e, t) {
3653
+ return Y.rect(e, t);
3654
+ }, t.intersect = function(e) {
3655
+ return Y.rect(t, e);
3656
+ }, i;
3657
+ }), cr.apply(this, arguments);
3658
+ }
3659
+ i(sr, "defaultMindmapNode");
3660
+ function lr(e, t) {
3661
+ return ur.apply(this, arguments);
3662
+ }
3663
+ function ur() {
3664
+ return ur = r(function* (e, t) {
3665
+ var n;
3666
+ return he(e, t, { padding: (n = t.padding) == null ? 0 : n });
3667
+ }), ur.apply(this, arguments);
3668
+ }
3669
+ i(lr, "mindmapCircle");
3670
+ var dr = [
3671
+ {
3672
+ semanticName: "Process",
3673
+ name: "Rectangle",
3674
+ shortName: "rect",
3675
+ description: "Standard process shape",
3676
+ aliases: [
3677
+ "proc",
3678
+ "process",
3679
+ "rectangle"
3680
+ ],
3681
+ internalAliases: ["squareRect"],
3682
+ handler: Zt
3683
+ },
3684
+ {
3685
+ semanticName: "Event",
3686
+ name: "Rounded Rectangle",
3687
+ shortName: "rounded",
3688
+ description: "Represents an event",
3689
+ aliases: ["event"],
3690
+ internalAliases: ["roundedRect"],
3691
+ handler: Wt
3692
+ },
3693
+ {
3694
+ semanticName: "Terminal Point",
3695
+ name: "Stadium",
3696
+ shortName: "stadium",
3697
+ description: "Terminal point",
3698
+ aliases: ["terminal", "pill"],
3699
+ handler: $t
3700
+ },
3701
+ {
3702
+ semanticName: "Subprocess",
3703
+ name: "Framed Rectangle",
3704
+ shortName: "fr-rect",
3705
+ description: "Subprocess",
3706
+ aliases: [
3707
+ "subprocess",
3708
+ "subproc",
3709
+ "framed-rectangle",
3710
+ "subroutine"
3711
+ ],
3712
+ handler: sn
3713
+ },
3714
+ {
3715
+ semanticName: "Database",
3716
+ name: "Cylinder",
3717
+ shortName: "cyl",
3718
+ description: "Database storage",
3719
+ aliases: [
3720
+ "db",
3721
+ "database",
3722
+ "cylinder"
3723
+ ],
3724
+ handler: Pe
3725
+ },
3726
+ {
3727
+ semanticName: "Data Store",
3728
+ name: "Data Store",
3729
+ shortName: "datastore",
3730
+ description: "Data flow diagram data store",
3731
+ aliases: ["data-store"],
3732
+ handler: Re
3733
+ },
3734
+ {
3735
+ semanticName: "Start",
3736
+ name: "Circle",
3737
+ shortName: "circle",
3738
+ description: "Starting point",
3739
+ aliases: ["circ"],
3740
+ handler: he
3741
+ },
3742
+ {
3743
+ semanticName: "Bang",
3744
+ name: "Bang",
3745
+ shortName: "bang",
3746
+ description: "Bang",
3747
+ aliases: ["bang"],
3748
+ handler: rr
3749
+ },
3750
+ {
3751
+ semanticName: "Cloud",
3752
+ name: "Cloud",
3753
+ shortName: "cloud",
3754
+ description: "cloud",
3755
+ aliases: ["cloud"],
3756
+ handler: ar
3757
+ },
3758
+ {
3759
+ semanticName: "Decision",
3760
+ name: "Diamond",
3761
+ shortName: "diam",
3762
+ description: "Decision-making step",
3763
+ aliases: [
3764
+ "decision",
3765
+ "diamond",
3766
+ "question"
3767
+ ],
3768
+ handler: Rt
3769
+ },
3770
+ {
3771
+ semanticName: "Prepare Conditional",
3772
+ name: "Hexagon",
3773
+ shortName: "hex",
3774
+ description: "Preparation or condition step",
3775
+ aliases: ["hexagon", "prepare"],
3776
+ handler: $e
3777
+ },
3778
+ {
3779
+ semanticName: "Data Input/Output",
3780
+ name: "Lean Right",
3781
+ shortName: "lean-r",
3782
+ description: "Represents input or output",
3783
+ aliases: ["lean-right", "in-out"],
3784
+ internalAliases: ["lean_right"],
3785
+ handler: yt
3786
+ },
3787
+ {
3788
+ semanticName: "Data Input/Output",
3789
+ name: "Lean Left",
3790
+ shortName: "lean-l",
3791
+ description: "Represents output or input",
3792
+ aliases: ["lean-left", "out-in"],
3793
+ internalAliases: ["lean_left"],
3794
+ handler: _t
3795
+ },
3796
+ {
3797
+ semanticName: "Priority Action",
3798
+ name: "Trapezoid Base Bottom",
3799
+ shortName: "trap-b",
3800
+ description: "Priority action",
3801
+ aliases: [
3802
+ "priority",
3803
+ "trapezoid-bottom",
3804
+ "trapezoid"
3805
+ ],
3806
+ handler: Cn
3807
+ },
3808
+ {
3809
+ semanticName: "Manual Operation",
3810
+ name: "Trapezoid Base Top",
3811
+ shortName: "trap-t",
3812
+ description: "Represents a manual task",
3813
+ aliases: [
3814
+ "manual",
3815
+ "trapezoid-top",
3816
+ "inv-trapezoid"
3817
+ ],
3818
+ internalAliases: ["inv_trapezoid"],
3819
+ handler: pt
3820
+ },
3821
+ {
3822
+ semanticName: "Stop",
3823
+ name: "Double Circle",
3824
+ shortName: "dbl-circ",
3825
+ description: "Represents a stop point",
3826
+ aliases: ["double-circle"],
3827
+ internalAliases: ["doublecircle"],
3828
+ handler: He
3829
+ },
3830
+ {
3831
+ semanticName: "Text Block",
3832
+ name: "Text Block",
3833
+ shortName: "text",
3834
+ description: "Text block",
3835
+ handler: mn
3836
+ },
3837
+ {
3838
+ semanticName: "Card",
3839
+ name: "Notched Rectangle",
3840
+ shortName: "notch-rect",
3841
+ description: "Represents a card",
3842
+ aliases: ["card", "notched-rectangle"],
3843
+ handler: fe
3844
+ },
3845
+ {
3846
+ semanticName: "Lined/Shaded Process",
3847
+ name: "Lined Rectangle",
3848
+ shortName: "lin-rect",
3849
+ description: "Lined process shape",
3850
+ aliases: [
3851
+ "lined-rectangle",
3852
+ "lined-process",
3853
+ "lin-proc",
3854
+ "shaded-process"
3855
+ ],
3856
+ handler: qt
3857
+ },
3858
+ {
3859
+ semanticName: "Start",
3860
+ name: "Small Circle",
3861
+ shortName: "sm-circ",
3862
+ description: "Small starting point",
3863
+ aliases: ["start", "small-circle"],
3864
+ internalAliases: ["stateStart"],
3865
+ handler: an
3866
+ },
3867
+ {
3868
+ semanticName: "Stop",
3869
+ name: "Framed Circle",
3870
+ shortName: "fr-circ",
3871
+ description: "Stop point",
3872
+ aliases: ["stop", "framed-circle"],
3873
+ internalAliases: ["stateEnd"],
3874
+ handler: rn
3875
+ },
3876
+ {
3877
+ semanticName: "Fork/Join",
3878
+ name: "Filled Rectangle",
3879
+ shortName: "fork",
3880
+ description: "Fork or join in process flow",
3881
+ aliases: ["join"],
3882
+ internalAliases: ["forkJoin"],
3883
+ handler: Ye
3884
+ },
3885
+ {
3886
+ semanticName: "Collate",
3887
+ name: "Hourglass",
3888
+ shortName: "hourglass",
3889
+ description: "Represents a collate operation",
3890
+ aliases: ["hourglass", "collate"],
3891
+ handler: tt
3892
+ },
3893
+ {
3894
+ semanticName: "Comment",
3895
+ name: "Curly Brace",
3896
+ shortName: "brace",
3897
+ description: "Adds a comment",
3898
+ aliases: ["comment", "brace-l"],
3899
+ handler: be
3900
+ },
3901
+ {
3902
+ semanticName: "Comment Right",
3903
+ name: "Curly Brace",
3904
+ shortName: "brace-r",
3905
+ description: "Adds a comment",
3906
+ handler: Ce
3907
+ },
3908
+ {
3909
+ semanticName: "Comment with braces on both sides",
3910
+ name: "Curly Braces",
3911
+ shortName: "braces",
3912
+ description: "Adds a comment",
3913
+ handler: Te
3914
+ },
3915
+ {
3916
+ semanticName: "Com Link",
3917
+ name: "Lightning Bolt",
3918
+ shortName: "bolt",
3919
+ description: "Communication link",
3920
+ aliases: ["com-link", "lightning-bolt"],
3921
+ handler: xt
3922
+ },
3923
+ {
3924
+ semanticName: "Document",
3925
+ name: "Document",
3926
+ shortName: "doc",
3927
+ description: "Represents a document",
3928
+ aliases: ["doc", "document"],
3929
+ handler: jn
3930
+ },
3931
+ {
3932
+ semanticName: "Delay",
3933
+ name: "Half-Rounded Rectangle",
3934
+ shortName: "delay",
3935
+ description: "Represents a delay",
3936
+ aliases: ["half-rounded-rectangle"],
3937
+ handler: Xe
3938
+ },
3939
+ {
3940
+ semanticName: "Direct Access Storage",
3941
+ name: "Horizontal Cylinder",
3942
+ shortName: "h-cyl",
3943
+ description: "Direct access storage",
3944
+ aliases: ["das", "horizontal-cylinder"],
3945
+ handler: xn
3946
+ },
3947
+ {
3948
+ semanticName: "Disk Storage",
3949
+ name: "Lined Cylinder",
3950
+ shortName: "lin-cyl",
3951
+ description: "Disk storage",
3952
+ aliases: ["disk", "lined-cylinder"],
3953
+ handler: Dt
3954
+ },
3955
+ {
3956
+ semanticName: "Display",
3957
+ name: "Curved Trapezoid",
3958
+ shortName: "curv-trap",
3959
+ description: "Represents a display",
3960
+ aliases: ["curved-trapezoid", "display"],
3961
+ handler: De
3962
+ },
3963
+ {
3964
+ semanticName: "Divided Process",
3965
+ name: "Divided Rectangle",
3966
+ shortName: "div-rect",
3967
+ description: "Divided process shape",
3968
+ aliases: [
3969
+ "div-proc",
3970
+ "divided-rectangle",
3971
+ "divided-process"
3972
+ ],
3973
+ handler: Be
3974
+ },
3975
+ {
3976
+ semanticName: "Extract",
3977
+ name: "Triangle",
3978
+ shortName: "tri",
3979
+ description: "Extraction process",
3980
+ aliases: ["extract", "triangle"],
3981
+ handler: kn
3982
+ },
3983
+ {
3984
+ semanticName: "Internal Storage",
3985
+ name: "Window Pane",
3986
+ shortName: "win-pane",
3987
+ description: "Internal storage",
3988
+ aliases: ["internal-storage", "window-pane"],
3989
+ handler: Fn
3990
+ },
3991
+ {
3992
+ semanticName: "Junction",
3993
+ name: "Filled Circle",
3994
+ shortName: "f-circ",
3995
+ description: "Junction point",
3996
+ aliases: ["junction", "filled-circle"],
3997
+ handler: We
3998
+ },
3999
+ {
4000
+ semanticName: "Loop Limit",
4001
+ name: "Trapezoidal Pentagon",
4002
+ shortName: "notch-pent",
4003
+ description: "Loop limit step",
4004
+ aliases: ["loop-limit", "notched-pentagon"],
4005
+ handler: Tn
4006
+ },
4007
+ {
4008
+ semanticName: "Manual File",
4009
+ name: "Flipped Triangle",
4010
+ shortName: "flip-tri",
4011
+ description: "Manual file operation",
4012
+ aliases: ["manual-file", "flipped-triangle"],
4013
+ handler: qe
4014
+ },
4015
+ {
4016
+ semanticName: "Manual Input",
4017
+ name: "Sloped Rectangle",
4018
+ shortName: "sl-rect",
4019
+ description: "Manual input step",
4020
+ aliases: ["manual-input", "sloped-rectangle"],
4021
+ handler: Yt
4022
+ },
4023
+ {
4024
+ semanticName: "Multi-Document",
4025
+ name: "Stacked Document",
4026
+ shortName: "docs",
4027
+ description: "Multiple documents",
4028
+ aliases: [
4029
+ "documents",
4030
+ "st-doc",
4031
+ "stacked-document"
4032
+ ],
4033
+ handler: Nt
4034
+ },
4035
+ {
4036
+ semanticName: "Multi-Process",
4037
+ name: "Stacked Rectangle",
4038
+ shortName: "st-rect",
4039
+ description: "Multiple processes",
4040
+ aliases: [
4041
+ "procs",
4042
+ "processes",
4043
+ "stacked-rectangle"
4044
+ ],
4045
+ handler: jt
4046
+ },
4047
+ {
4048
+ semanticName: "Stored Data",
4049
+ name: "Bow Tie Rectangle",
4050
+ shortName: "bow-rect",
4051
+ description: "Stored data",
4052
+ aliases: ["stored-data", "bow-tie-rectangle"],
4053
+ handler: X
4054
+ },
4055
+ {
4056
+ semanticName: "Summary",
4057
+ name: "Crossed Circle",
4058
+ shortName: "cross-circ",
4059
+ description: "Summary",
4060
+ aliases: ["summary", "crossed-circle"],
4061
+ handler: ve
4062
+ },
4063
+ {
4064
+ semanticName: "Tagged Document",
4065
+ name: "Tagged Document",
4066
+ shortName: "tag-doc",
4067
+ description: "Tagged document",
4068
+ aliases: ["tag-doc", "tagged-document"],
4069
+ handler: fn
4070
+ },
4071
+ {
4072
+ semanticName: "Tagged Process",
4073
+ name: "Tagged Rectangle",
4074
+ shortName: "tag-rect",
4075
+ description: "Tagged process",
4076
+ aliases: [
4077
+ "tagged-rectangle",
4078
+ "tag-proc",
4079
+ "tagged-process"
4080
+ ],
4081
+ handler: un
4082
+ },
4083
+ {
4084
+ semanticName: "Paper Tape",
4085
+ name: "Flag",
4086
+ shortName: "flag",
4087
+ description: "Paper tape",
4088
+ aliases: ["paper-tape"],
4089
+ handler: Nn
4090
+ },
4091
+ {
4092
+ semanticName: "Odd",
4093
+ name: "Odd",
4094
+ shortName: "odd",
4095
+ description: "Odd shape",
4096
+ internalAliases: ["rect_left_inv_arrow"],
4097
+ handler: Bt
4098
+ },
4099
+ {
4100
+ semanticName: "Lined Document",
4101
+ name: "Lined Document",
4102
+ shortName: "lin-doc",
4103
+ description: "Lined document",
4104
+ aliases: ["lined-document"],
4105
+ handler: kt
4106
+ }
4107
+ ], fr = (/* @__PURE__ */ i(() => {
4108
+ let e = [...Object.entries({
4109
+ state: tn,
4110
+ choice: me,
4111
+ note: Ft,
4112
+ rectWithTitle: Ht,
4113
+ labelRect: ht,
4114
+ iconSquare: lt,
4115
+ iconCircle: at,
4116
+ icon: rt,
4117
+ iconRounded: st,
4118
+ imageSquare: dt,
4119
+ anchor: se,
4120
+ kanbanItem: tr,
4121
+ mindmapCircle: lr,
4122
+ defaultMindmapNode: sr,
4123
+ classBox: Jn,
4124
+ erBox: zn,
4125
+ requirementBox: Xn
4126
+ }), ...dr.flatMap((e) => [
4127
+ e.shortName,
4128
+ ..."aliases" in e ? e.aliases : [],
4129
+ ..."internalAliases" in e ? e.internalAliases : []
4130
+ ].map((t) => [t, e.handler]))];
4131
+ return Object.fromEntries(e);
4132
+ }, "generateShapeMap"))();
4133
+ function pr(e) {
4134
+ return e in fr;
4135
+ }
4136
+ i(pr, "isValidShape");
4137
+ var mr = /* @__PURE__ */ new Map();
4138
+ function hr(e, t, n) {
4139
+ return gr.apply(this, arguments);
4140
+ }
4141
+ function gr() {
4142
+ return gr = r(function* (e, t, n) {
4143
+ let r, i;
4144
+ t.shape === "rect" && (t.rx && t.ry ? t.shape = "roundedRect" : t.shape = "squareRect");
4145
+ let a = t.shape ? fr[t.shape] : void 0;
4146
+ if (!a) throw Error(`No such shape: ${t.shape}. Please check your syntax.`);
4147
+ if (t.link) {
4148
+ var o;
4149
+ let s;
4150
+ n.config.securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), r = e.insert("svg:a").attr("xlink:href", t.link).attr("target", (o = s) == null ? null : o), i = yield a(r, t, n);
4151
+ } else i = yield a(e, t, n), r = i;
4152
+ return r.attr("data-look", _(t.look)), t.tooltip && i.attr("title", t.tooltip), mr.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
4153
+ }), gr.apply(this, arguments);
4154
+ }
4155
+ i(hr, "insertNode");
4156
+ var _r = /* @__PURE__ */ i((e, t) => {
4157
+ mr.set(t.id, e);
4158
+ }, "setNodeElem"), vr = /* @__PURE__ */ i(() => {
4159
+ mr.clear();
4160
+ }, "clear"), yr = /* @__PURE__ */ i((e) => {
4161
+ let t = mr.get(e.id);
4162
+ a.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
4163
+ let n = e.diff || 0;
4164
+ return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
4165
+ }, "positionNode");
4166
+ //#endregion
4167
+ export { hr as a, yr as c, W as i, _r as l, vr as n, pr as o, I as r, D as s, G as t, k as u };