hexagon-editor 0.1.0-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (308) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +105 -0
  3. package/THIRD_PARTY_NOTICES.md +29 -0
  4. package/dist/MarkdownEditor.vue.d.ts +926 -0
  5. package/dist/MarkdownEditor.vue.d.ts.map +1 -0
  6. package/dist/MarkdownEditorLinkForm-mq-BVYM_.js +338 -0
  7. package/dist/MarkdownEditorLinkForm.css +1 -0
  8. package/dist/abnfDiagram-N423BO3Z-DCf6sPky.js +87 -0
  9. package/dist/arc-y6UeoJpJ.js +83 -0
  10. package/dist/architectureDiagram-T3A2C74G-Cc3_3-cI.js +4778 -0
  11. package/dist/base-Bnv2-Te4.js +13338 -0
  12. package/dist/base.css +1 -0
  13. package/dist/blockDiagram-VBNYF7ZC-DWVLZwXY.js +2419 -0
  14. package/dist/c4Diagram-5PPSVZJV-CaIN7qay.js +1577 -0
  15. package/dist/channel-BwXGcavV.js +5 -0
  16. package/dist/chunk-2GRJ4B5K-O75udjPr.js +68 -0
  17. package/dist/chunk-2Q5K7J3B-CySL0lOA.js +15 -0
  18. package/dist/chunk-5RXB4S5H-BKPnLCOJ.js +1408 -0
  19. package/dist/chunk-5VM5RSS4--it1VJIv.js +19 -0
  20. package/dist/chunk-6Q2QTUOP-DNiML-50.js +664 -0
  21. package/dist/chunk-GF5L2VYU-z7A-k0-V.js +1533 -0
  22. package/dist/chunk-JWPE2WC7-DAjx3Kjr.js +8 -0
  23. package/dist/chunk-KBJHAD2P-D4R1VW0r.js +19 -0
  24. package/dist/chunk-RYQCIY6F-DmJAYxq8.js +313 -0
  25. package/dist/chunk-XXDRQBXY-CK913N-t.js +8 -0
  26. package/dist/classDiagram-JCYQIIEL-Djipq_HJ.js +16 -0
  27. package/dist/classDiagram-v2-OCEON4UE-Djipq_HJ.js +16 -0
  28. package/dist/classname.d.ts +13 -0
  29. package/dist/classname.d.ts.map +1 -0
  30. package/dist/classname.js +17 -0
  31. package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts +48 -0
  32. package/dist/components/MarkdownEditorFloatingMenus.vue.d.ts.map +1 -0
  33. package/dist/components/MarkdownEditorImageActions.vue.d.ts +20 -0
  34. package/dist/components/MarkdownEditorImageActions.vue.d.ts.map +1 -0
  35. package/dist/components/MarkdownEditorToolbar.vue.d.ts +62 -0
  36. package/dist/components/MarkdownEditorToolbar.vue.d.ts.map +1 -0
  37. package/dist/components/MarkdownEditorToolbarIcon.vue.d.ts +26 -0
  38. package/dist/components/MarkdownEditorToolbarIcon.vue.d.ts.map +1 -0
  39. package/dist/composables/useFloatingPanel.d.ts +13 -0
  40. package/dist/composables/useFloatingPanel.d.ts.map +1 -0
  41. package/dist/composables/useMarkdownEditorValue.d.ts +19 -0
  42. package/dist/composables/useMarkdownEditorValue.d.ts.map +1 -0
  43. package/dist/configure.d.ts +15 -0
  44. package/dist/configure.d.ts.map +1 -0
  45. package/dist/configure.js +19 -0
  46. package/dist/core/actions.d.ts +16 -0
  47. package/dist/core/actions.d.ts.map +1 -0
  48. package/dist/core/basic-editor-atomic-source.d.ts +9 -0
  49. package/dist/core/basic-editor-atomic-source.d.ts.map +1 -0
  50. package/dist/core/basic-editor-command-helpers.d.ts +11 -0
  51. package/dist/core/basic-editor-command-helpers.d.ts.map +1 -0
  52. package/dist/core/basic-editor-markdown.d.ts +7 -0
  53. package/dist/core/basic-editor-markdown.d.ts.map +1 -0
  54. package/dist/core/basic-editor-renderers.d.ts +6 -0
  55. package/dist/core/basic-editor-renderers.d.ts.map +1 -0
  56. package/dist/core/basic-editor-runtime-plugins.d.ts +7 -0
  57. package/dist/core/basic-editor-runtime-plugins.d.ts.map +1 -0
  58. package/dist/core/basic-editor-selection.d.ts +6 -0
  59. package/dist/core/basic-editor-selection.d.ts.map +1 -0
  60. package/dist/core/basic-editor-table-controls.d.ts +3 -0
  61. package/dist/core/basic-editor-table-controls.d.ts.map +1 -0
  62. package/dist/core/basic-editor-table-popover.d.ts +5 -0
  63. package/dist/core/basic-editor-table-popover.d.ts.map +1 -0
  64. package/dist/core/basic-editor-types.d.ts +96 -0
  65. package/dist/core/basic-editor-types.d.ts.map +1 -0
  66. package/dist/core/basic-editor.d.ts +14 -0
  67. package/dist/core/basic-editor.d.ts.map +1 -0
  68. package/dist/core/content-handler.d.ts +21 -0
  69. package/dist/core/content-handler.d.ts.map +1 -0
  70. package/dist/core/editor-instance.d.ts +38 -0
  71. package/dist/core/editor-instance.d.ts.map +1 -0
  72. package/dist/core/events.d.ts +22 -0
  73. package/dist/core/events.d.ts.map +1 -0
  74. package/dist/core/extension-builder.d.ts +86 -0
  75. package/dist/core/extension-builder.d.ts.map +1 -0
  76. package/dist/core/extensions-manager.d.ts +36 -0
  77. package/dist/core/extensions-manager.d.ts.map +1 -0
  78. package/dist/core/index.d.ts +30 -0
  79. package/dist/core/index.d.ts.map +1 -0
  80. package/dist/core/lists.d.ts +18 -0
  81. package/dist/core/lists.d.ts.map +1 -0
  82. package/dist/core/logger.d.ts +46 -0
  83. package/dist/core/logger.d.ts.map +1 -0
  84. package/dist/core/markdown-parser.d.ts +60 -0
  85. package/dist/core/markdown-parser.d.ts.map +1 -0
  86. package/dist/core/markdown.d.ts +23 -0
  87. package/dist/core/markdown.d.ts.map +1 -0
  88. package/dist/core/markup-editor.d.ts +22 -0
  89. package/dist/core/markup-editor.d.ts.map +1 -0
  90. package/dist/core/optional-renderers.d.ts +9 -0
  91. package/dist/core/optional-renderers.d.ts.map +1 -0
  92. package/dist/core/registries.d.ts +50 -0
  93. package/dist/core/registries.d.ts.map +1 -0
  94. package/dist/core/schema-dynamic-modifier.d.ts +13 -0
  95. package/dist/core/schema-dynamic-modifier.d.ts.map +1 -0
  96. package/dist/core/vue-renderer.d.ts +40 -0
  97. package/dist/core/vue-renderer.d.ts.map +1 -0
  98. package/dist/core.js +46 -0
  99. package/dist/cose-bilkent-JH36ORCC-CXuKFbXy.js +2608 -0
  100. package/dist/cynefin-VYW2F7L2-Bkk-F_Js.js +23766 -0
  101. package/dist/cynefinDiagram-MW4NZA55-DwOK40hm.js +299 -0
  102. package/dist/cytoscape.esm-3W4EOjxC.js +18756 -0
  103. package/dist/dagre-VZM6K2ZE-0VsGm8Ag.js +340 -0
  104. package/dist/defaultLocale-BgPVtth8.js +171 -0
  105. package/dist/diagram-7IWD3JNH-BrApu1hz.js +350 -0
  106. package/dist/diagram-B4RE2ZJO-CVXoBg2r.js +461 -0
  107. package/dist/diagram-LBJQPF4R-Dp0eSz2L.js +142 -0
  108. package/dist/diagram-Q27KOJAE-DWIltqIH.js +528 -0
  109. package/dist/diagram-UB23O5K3-B7z2Lj3K.js +219 -0
  110. package/dist/directives.d.ts +10 -0
  111. package/dist/directives.d.ts.map +1 -0
  112. package/dist/ebnfDiagram-BXEA7PRR-CYgE6z_2.js +109 -0
  113. package/dist/erDiagram-JOGREHBK-D3QWrPo-.js +910 -0
  114. package/dist/extensions/additional/folding-heading.d.ts +11 -0
  115. package/dist/extensions/additional/folding-heading.d.ts.map +1 -0
  116. package/dist/extensions/additional/math.d.ts +36 -0
  117. package/dist/extensions/additional/math.d.ts.map +1 -0
  118. package/dist/extensions/additional/mermaid.d.ts +21 -0
  119. package/dist/extensions/additional/mermaid.d.ts.map +1 -0
  120. package/dist/extensions/additional/quote-link.d.ts +19 -0
  121. package/dist/extensions/additional/quote-link.d.ts.map +1 -0
  122. package/dist/extensions/additional/yfm-html-block.d.ts +21 -0
  123. package/dist/extensions/additional/yfm-html-block.d.ts.map +1 -0
  124. package/dist/extensions/base.d.ts +9 -0
  125. package/dist/extensions/base.d.ts.map +1 -0
  126. package/dist/extensions/behavior/clicks-on-edges.d.ts +12 -0
  127. package/dist/extensions/behavior/clicks-on-edges.d.ts.map +1 -0
  128. package/dist/extensions/behavior/clipboard.d.ts +6 -0
  129. package/dist/extensions/behavior/clipboard.d.ts.map +1 -0
  130. package/dist/extensions/behavior/cursor.d.ts +29 -0
  131. package/dist/extensions/behavior/cursor.d.ts.map +1 -0
  132. package/dist/extensions/behavior/editor-mode-keymap.d.ts +8 -0
  133. package/dist/extensions/behavior/editor-mode-keymap.d.ts.map +1 -0
  134. package/dist/extensions/behavior/history.d.ts +21 -0
  135. package/dist/extensions/behavior/history.d.ts.map +1 -0
  136. package/dist/extensions/behavior/placeholder.d.ts +11 -0
  137. package/dist/extensions/behavior/placeholder.d.ts.map +1 -0
  138. package/dist/extensions/behavior/resizable.d.ts +4 -0
  139. package/dist/extensions/behavior/resizable.d.ts.map +1 -0
  140. package/dist/extensions/behavior/selection-commands.d.ts +24 -0
  141. package/dist/extensions/behavior/selection-commands.d.ts.map +1 -0
  142. package/dist/extensions/behavior/selection-context.d.ts +9 -0
  143. package/dist/extensions/behavior/selection-context.d.ts.map +1 -0
  144. package/dist/extensions/behavior/selection.d.ts +12 -0
  145. package/dist/extensions/behavior/selection.d.ts.map +1 -0
  146. package/dist/extensions/index.d.ts +34 -0
  147. package/dist/extensions/index.d.ts.map +1 -0
  148. package/dist/extensions/markdown/blockquote-specs.d.ts +15 -0
  149. package/dist/extensions/markdown/blockquote-specs.d.ts.map +1 -0
  150. package/dist/extensions/markdown/blockquote.d.ts +14 -0
  151. package/dist/extensions/markdown/blockquote.d.ts.map +1 -0
  152. package/dist/extensions/markdown/bold-specs.d.ts +12 -0
  153. package/dist/extensions/markdown/bold-specs.d.ts.map +1 -0
  154. package/dist/extensions/markdown/bold.d.ts +17 -0
  155. package/dist/extensions/markdown/bold.d.ts.map +1 -0
  156. package/dist/extensions/markdown/breaks-specs.d.ts +22 -0
  157. package/dist/extensions/markdown/breaks-specs.d.ts.map +1 -0
  158. package/dist/extensions/markdown/breaks.d.ts +11 -0
  159. package/dist/extensions/markdown/breaks.d.ts.map +1 -0
  160. package/dist/extensions/markdown/code-block-specs.d.ts +14 -0
  161. package/dist/extensions/markdown/code-block-specs.d.ts.map +1 -0
  162. package/dist/extensions/markdown/code-block.d.ts +14 -0
  163. package/dist/extensions/markdown/code-block.d.ts.map +1 -0
  164. package/dist/extensions/markdown/code-specs.d.ts +9 -0
  165. package/dist/extensions/markdown/code-specs.d.ts.map +1 -0
  166. package/dist/extensions/markdown/code.d.ts +11 -0
  167. package/dist/extensions/markdown/code.d.ts.map +1 -0
  168. package/dist/extensions/markdown/deflist-specs.d.ts +16 -0
  169. package/dist/extensions/markdown/deflist-specs.d.ts.map +1 -0
  170. package/dist/extensions/markdown/deflist.d.ts +14 -0
  171. package/dist/extensions/markdown/deflist.d.ts.map +1 -0
  172. package/dist/extensions/markdown/heading-specs.d.ts +11 -0
  173. package/dist/extensions/markdown/heading-specs.d.ts.map +1 -0
  174. package/dist/extensions/markdown/heading.d.ts +17 -0
  175. package/dist/extensions/markdown/heading.d.ts.map +1 -0
  176. package/dist/extensions/markdown/horizontal-rule-specs.d.ts +10 -0
  177. package/dist/extensions/markdown/horizontal-rule-specs.d.ts.map +1 -0
  178. package/dist/extensions/markdown/horizontal-rule.d.ts +8 -0
  179. package/dist/extensions/markdown/horizontal-rule.d.ts.map +1 -0
  180. package/dist/extensions/markdown/html.d.ts +15 -0
  181. package/dist/extensions/markdown/html.d.ts.map +1 -0
  182. package/dist/extensions/markdown/image.d.ts +39 -0
  183. package/dist/extensions/markdown/image.d.ts.map +1 -0
  184. package/dist/extensions/markdown/italic-specs.d.ts +12 -0
  185. package/dist/extensions/markdown/italic-specs.d.ts.map +1 -0
  186. package/dist/extensions/markdown/italic.d.ts +11 -0
  187. package/dist/extensions/markdown/italic.d.ts.map +1 -0
  188. package/dist/extensions/markdown/link-specs.d.ts +19 -0
  189. package/dist/extensions/markdown/link-specs.d.ts.map +1 -0
  190. package/dist/extensions/markdown/link.d.ts +21 -0
  191. package/dist/extensions/markdown/link.d.ts.map +1 -0
  192. package/dist/extensions/markdown/list-specs.d.ts +6 -0
  193. package/dist/extensions/markdown/list-specs.d.ts.map +1 -0
  194. package/dist/extensions/markdown/lists.d.ts +18 -0
  195. package/dist/extensions/markdown/lists.d.ts.map +1 -0
  196. package/dist/extensions/markdown/mark.d.ts +12 -0
  197. package/dist/extensions/markdown/mark.d.ts.map +1 -0
  198. package/dist/extensions/markdown/strike.d.ts +12 -0
  199. package/dist/extensions/markdown/strike.d.ts.map +1 -0
  200. package/dist/extensions/markdown/subscript.d.ts +12 -0
  201. package/dist/extensions/markdown/subscript.d.ts.map +1 -0
  202. package/dist/extensions/markdown/table-actions.d.ts +14 -0
  203. package/dist/extensions/markdown/table-actions.d.ts.map +1 -0
  204. package/dist/extensions/markdown/table-specs.d.ts +25 -0
  205. package/dist/extensions/markdown/table-specs.d.ts.map +1 -0
  206. package/dist/extensions/markdown/table.d.ts +6 -0
  207. package/dist/extensions/markdown/table.d.ts.map +1 -0
  208. package/dist/extensions/markdown/underline.d.ts +12 -0
  209. package/dist/extensions/markdown/underline.d.ts.map +1 -0
  210. package/dist/extensions/specs.d.ts +13 -0
  211. package/dist/extensions/specs.d.ts.map +1 -0
  212. package/dist/extensions.js +247 -0
  213. package/dist/flowDiagram-UKHOOZJN-CfjPcHNW.js +1638 -0
  214. package/dist/forms/MarkdownEditorForm.vue.d.ts +37 -0
  215. package/dist/forms/MarkdownEditorForm.vue.d.ts.map +1 -0
  216. package/dist/forms/MarkdownEditorImageForm.vue.d.ts +131 -0
  217. package/dist/forms/MarkdownEditorImageForm.vue.d.ts.map +1 -0
  218. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts +119 -0
  219. package/dist/forms/MarkdownEditorLinkForm.vue.d.ts.map +1 -0
  220. package/dist/forms/MarkdownEditorTextInput.vue.d.ts +39 -0
  221. package/dist/forms/MarkdownEditorTextInput.vue.d.ts.map +1 -0
  222. package/dist/forms/index.d.ts +7 -0
  223. package/dist/forms/index.d.ts.map +1 -0
  224. package/dist/forms.js +7 -0
  225. package/dist/full-C-o2lPBX.js +16 -0
  226. package/dist/full-specs-Cl-ODShc.js +10 -0
  227. package/dist/ganttDiagram-PKOTCBZU-ECmaWI-9.js +2711 -0
  228. package/dist/gitGraphDiagram-DS77QQ5N-DgG1RGJ8.js +815 -0
  229. package/dist/graph-DAHC4kPm.js +1545 -0
  230. package/dist/heading-specs-D7Bj4aIM.js +489 -0
  231. package/dist/i18n/index.d.ts +70 -0
  232. package/dist/i18n/index.d.ts.map +1 -0
  233. package/dist/i18n.js +132 -0
  234. package/dist/index-CqpK5VVw.js +149 -0
  235. package/dist/index-uerphigI.js +82 -0
  236. package/dist/index.css +1 -0
  237. package/dist/index.d.ts +87 -0
  238. package/dist/index.d.ts.map +1 -0
  239. package/dist/index.js +1293 -0
  240. package/dist/infoDiagram-6WML65LV-B1Yl3nZV.js +24 -0
  241. package/dist/init-DjUOC4st.js +16 -0
  242. package/dist/ishikawaDiagram-WSZJBQD7-4sngaB5o.js +621 -0
  243. package/dist/journeyDiagram-NVQOT4AX-B_6AmR_j.js +834 -0
  244. package/dist/kanban-definition-27J2QSJJ-B8BO9o8J.js +724 -0
  245. package/dist/katex-ByXcxnHy.js +14436 -0
  246. package/dist/katex-DoRnZ_sp.js +11682 -0
  247. package/dist/layout-DBbo_M5I.js +1519 -0
  248. package/dist/linear-BEdRfKba.js +259 -0
  249. package/dist/map-DRdzG8Ho.js +224 -0
  250. package/dist/mermaid.core-CR0bA2Wa.js +16496 -0
  251. package/dist/mindmap-definition-FAOFIHXS-DnPz807N.js +827 -0
  252. package/dist/optional-renderers-BalvqqvY.js +11 -0
  253. package/dist/ordinal-B6-f3MAq.js +61 -0
  254. package/dist/pegDiagram-VL7TDLO6-csGWlzs8.js +95 -0
  255. package/dist/pieDiagram-7S7Q4E2Y-Bqs8j5FX.js +207 -0
  256. package/dist/presets/commonmark-specs.d.ts +9 -0
  257. package/dist/presets/commonmark-specs.d.ts.map +1 -0
  258. package/dist/presets/commonmark.d.ts +26 -0
  259. package/dist/presets/commonmark.d.ts.map +1 -0
  260. package/dist/presets/default.d.ts +6 -0
  261. package/dist/presets/default.d.ts.map +1 -0
  262. package/dist/presets/full-specs.d.ts +6 -0
  263. package/dist/presets/full-specs.d.ts.map +1 -0
  264. package/dist/presets/full.d.ts +17 -0
  265. package/dist/presets/full.d.ts.map +1 -0
  266. package/dist/presets/index.d.ts +13 -0
  267. package/dist/presets/index.d.ts.map +1 -0
  268. package/dist/presets/zero.d.ts +8 -0
  269. package/dist/presets/zero.d.ts.map +1 -0
  270. package/dist/presets.js +10 -0
  271. package/dist/public-types.d.ts +96 -0
  272. package/dist/public-types.d.ts.map +1 -0
  273. package/dist/quadrantDiagram-CIZ2JOQS-jzP4lRrY.js +1023 -0
  274. package/dist/railroadDiagram-AXF67PYL-BSCyR24u.js +77 -0
  275. package/dist/renderer/MarkdownRenderer.vue.d.ts +10 -0
  276. package/dist/renderer/MarkdownRenderer.vue.d.ts.map +1 -0
  277. package/dist/renderer/index.d.ts +3 -0
  278. package/dist/renderer/index.d.ts.map +1 -0
  279. package/dist/renderer/markdown.d.ts +2 -0
  280. package/dist/renderer/markdown.d.ts.map +1 -0
  281. package/dist/renderer/mermaid-runtime.d.ts +4 -0
  282. package/dist/renderer/mermaid-runtime.d.ts.map +1 -0
  283. package/dist/renderer.js +258 -0
  284. package/dist/requirementDiagram-LRYGKXZP-DmEkLYqX.js +882 -0
  285. package/dist/sankeyDiagram-W5VNT64P-CYvRYMTh.js +847 -0
  286. package/dist/schema-dynamic-modifier-Dhf0m6tE.js +21514 -0
  287. package/dist/schema-dynamic-modifier.css +1 -0
  288. package/dist/sequenceDiagram-SI44F4Z6-CyWbDtPA.js +2888 -0
  289. package/dist/sizeCapture-X5ZJPWSS-xKhYCY84.js +46 -0
  290. package/dist/specs.js +127 -0
  291. package/dist/stateDiagram-OKZ733FA-DP44R2Dd.js +263 -0
  292. package/dist/stateDiagram-v2-UEYNNEHI-BvlOisND.js +16 -0
  293. package/dist/swimlanes-SLNWSIFB-BKFp8twH.js +5332 -0
  294. package/dist/swimlanesDiagram-ULZ7WXOC-CTvIFuHq.js +13 -0
  295. package/dist/timeline-definition-Z64GVDOM-B4137uIl.js +1055 -0
  296. package/dist/toolbar/config.d.ts +45 -0
  297. package/dist/toolbar/config.d.ts.map +1 -0
  298. package/dist/toolbar/index.d.ts +3 -0
  299. package/dist/toolbar/index.d.ts.map +1 -0
  300. package/dist/toolbar.js +100 -0
  301. package/dist/use-markdown-editor.d.ts +14 -0
  302. package/dist/use-markdown-editor.d.ts.map +1 -0
  303. package/dist/vennDiagram-T6HMQDX7-CPs8gXjx.js +1578 -0
  304. package/dist/version.d.ts +3 -0
  305. package/dist/version.d.ts.map +1 -0
  306. package/dist/wardleyDiagram-T6FBY63Y-BYp13hbI.js +675 -0
  307. package/dist/xychartDiagram-ELKLHX3M-DTT37K2u.js +1388 -0
  308. package/package.json +110 -0
@@ -0,0 +1,528 @@
1
+ import { p as ge } from "./chunk-JWPE2WC7-DAjx3Kjr.js";
2
+ import { _ as w, E as ye, y as ae, A as ee, D as Se, e as ve, l as te, bf as B, d as U, b as xe, a as be, n as we, o as Ce, g as Te, s as Le, B as $e, bg as Ae, p as Fe } from "./mermaid.core-CR0bA2Wa.js";
3
+ import { s as Ne } from "./chunk-KBJHAD2P-D4R1VW0r.js";
4
+ import { p as Me } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
5
+ import { b as O } from "./defaultLocale-BgPVtth8.js";
6
+ import { o as Q } from "./ordinal-B6-f3MAq.js";
7
+ function _e(t) {
8
+ var a = 0, l = t.children, n = l && l.length;
9
+ if (!n) a = 1;
10
+ else for (; --n >= 0; ) a += l[n].value;
11
+ t.value = a;
12
+ }
13
+ function ke() {
14
+ return this.eachAfter(_e);
15
+ }
16
+ function ze(t, a) {
17
+ let l = -1;
18
+ for (const n of this)
19
+ t.call(a, n, ++l, this);
20
+ return this;
21
+ }
22
+ function Ve(t, a) {
23
+ for (var l = this, n = [l], s, i, h = -1; l = n.pop(); )
24
+ if (t.call(a, l, ++h, this), s = l.children)
25
+ for (i = s.length - 1; i >= 0; --i)
26
+ n.push(s[i]);
27
+ return this;
28
+ }
29
+ function De(t, a) {
30
+ for (var l = this, n = [l], s = [], i, h, d, g = -1; l = n.pop(); )
31
+ if (s.push(l), i = l.children)
32
+ for (h = 0, d = i.length; h < d; ++h)
33
+ n.push(i[h]);
34
+ for (; l = s.pop(); )
35
+ t.call(a, l, ++g, this);
36
+ return this;
37
+ }
38
+ function Pe(t, a) {
39
+ let l = -1;
40
+ for (const n of this)
41
+ if (t.call(a, n, ++l, this))
42
+ return n;
43
+ }
44
+ function Be(t) {
45
+ return this.eachAfter(function(a) {
46
+ for (var l = +t(a.data) || 0, n = a.children, s = n && n.length; --s >= 0; ) l += n[s].value;
47
+ a.value = l;
48
+ });
49
+ }
50
+ function Ee(t) {
51
+ return this.eachBefore(function(a) {
52
+ a.children && a.children.sort(t);
53
+ });
54
+ }
55
+ function Re(t) {
56
+ for (var a = this, l = We(a, t), n = [a]; a !== l; )
57
+ a = a.parent, n.push(a);
58
+ for (var s = n.length; t !== l; )
59
+ n.splice(s, 0, t), t = t.parent;
60
+ return n;
61
+ }
62
+ function We(t, a) {
63
+ if (t === a) return t;
64
+ var l = t.ancestors(), n = a.ancestors(), s = null;
65
+ for (t = l.pop(), a = n.pop(); t === a; )
66
+ s = t, t = l.pop(), a = n.pop();
67
+ return s;
68
+ }
69
+ function He() {
70
+ for (var t = this, a = [t]; t = t.parent; )
71
+ a.push(t);
72
+ return a;
73
+ }
74
+ function Ie() {
75
+ return Array.from(this);
76
+ }
77
+ function Oe() {
78
+ var t = [];
79
+ return this.eachBefore(function(a) {
80
+ a.children || t.push(a);
81
+ }), t;
82
+ }
83
+ function Ge() {
84
+ var t = this, a = [];
85
+ return t.each(function(l) {
86
+ l !== t && a.push({ source: l.parent, target: l });
87
+ }), a;
88
+ }
89
+ function* qe() {
90
+ var t = this, a, l = [t], n, s, i;
91
+ do
92
+ for (a = l.reverse(), l = []; t = a.pop(); )
93
+ if (yield t, n = t.children)
94
+ for (s = 0, i = n.length; s < i; ++s)
95
+ l.push(n[s]);
96
+ while (l.length);
97
+ }
98
+ function ne(t, a) {
99
+ t instanceof Map ? (t = [void 0, t], a === void 0 && (a = je)) : a === void 0 && (a = Ye);
100
+ for (var l = new Z(t), n, s = [l], i, h, d, g; n = s.pop(); )
101
+ if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
102
+ for (n.children = h, d = g - 1; d >= 0; --d)
103
+ s.push(i = h[d] = new Z(h[d])), i.parent = n, i.depth = n.depth + 1;
104
+ return l.eachBefore(Ze);
105
+ }
106
+ function Xe() {
107
+ return ne(this).eachBefore(Ue);
108
+ }
109
+ function Ye(t) {
110
+ return t.children;
111
+ }
112
+ function je(t) {
113
+ return Array.isArray(t) ? t[1] : null;
114
+ }
115
+ function Ue(t) {
116
+ t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
117
+ }
118
+ function Ze(t) {
119
+ var a = 0;
120
+ do
121
+ t.height = a;
122
+ while ((t = t.parent) && t.height < ++a);
123
+ }
124
+ function Z(t) {
125
+ this.data = t, this.depth = this.height = 0, this.parent = null;
126
+ }
127
+ Z.prototype = ne.prototype = {
128
+ constructor: Z,
129
+ count: ke,
130
+ each: ze,
131
+ eachAfter: De,
132
+ eachBefore: Ve,
133
+ find: Pe,
134
+ sum: Be,
135
+ sort: Ee,
136
+ path: Re,
137
+ ancestors: He,
138
+ descendants: Ie,
139
+ leaves: Oe,
140
+ links: Ge,
141
+ copy: Xe,
142
+ [Symbol.iterator]: qe
143
+ };
144
+ function Je(t) {
145
+ if (typeof t != "function") throw new Error();
146
+ return t;
147
+ }
148
+ function G() {
149
+ return 0;
150
+ }
151
+ function q(t) {
152
+ return function() {
153
+ return t;
154
+ };
155
+ }
156
+ function Ke(t) {
157
+ t.x0 = Math.round(t.x0), t.y0 = Math.round(t.y0), t.x1 = Math.round(t.x1), t.y1 = Math.round(t.y1);
158
+ }
159
+ function Qe(t, a, l, n, s) {
160
+ for (var i = t.children, h, d = -1, g = i.length, c = t.value && (n - a) / t.value; ++d < g; )
161
+ h = i[d], h.y0 = l, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
162
+ }
163
+ function et(t, a, l, n, s) {
164
+ for (var i = t.children, h, d = -1, g = i.length, c = t.value && (s - l) / t.value; ++d < g; )
165
+ h = i[d], h.x0 = a, h.x1 = n, h.y0 = l, h.y1 = l += h.value * c;
166
+ }
167
+ var tt = (1 + Math.sqrt(5)) / 2;
168
+ function at(t, a, l, n, s, i) {
169
+ for (var h = [], d = a.children, g, c, u = 0, b = 0, r = d.length, x, S, v = a.value, p, y, N, $, V, W, M; u < r; ) {
170
+ x = s - l, S = i - n;
171
+ do
172
+ p = d[b++].value;
173
+ while (!p && b < r);
174
+ for (y = N = p, W = Math.max(S / x, x / S) / (v * t), M = p * p * W, V = Math.max(N / M, M / y); b < r; ++b) {
175
+ if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), M = p * p * W, $ = Math.max(N / M, M / y), $ > V) {
176
+ p -= c;
177
+ break;
178
+ }
179
+ V = $;
180
+ }
181
+ h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Qe(g, l, n, s, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : s, i), v -= p, u = b;
182
+ }
183
+ return h;
184
+ }
185
+ const nt = (function t(a) {
186
+ function l(n, s, i, h, d) {
187
+ at(a, n, s, i, h, d);
188
+ }
189
+ return l.ratio = function(n) {
190
+ return t((n = +n) > 1 ? n : 1);
191
+ }, l;
192
+ })(tt);
193
+ function lt() {
194
+ var t = nt, a = !1, l = 1, n = 1, s = [0], i = G, h = G, d = G, g = G, c = G;
195
+ function u(r) {
196
+ return r.x0 = r.y0 = 0, r.x1 = l, r.y1 = n, r.eachBefore(b), s = [0], a && r.eachBefore(Ke), r;
197
+ }
198
+ function b(r) {
199
+ var x = s[r.depth], S = r.x0 + x, v = r.y0 + x, p = r.x1 - x, y = r.y1 - x;
200
+ p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), r.x0 = S, r.y0 = v, r.x1 = p, r.y1 = y, r.children && (x = s[r.depth + 1] = i(r) / 2, S += c(r) - x, v += h(r) - x, p -= d(r) - x, y -= g(r) - x, p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), t(r, S, v, p, y));
201
+ }
202
+ return u.round = function(r) {
203
+ return arguments.length ? (a = !!r, u) : a;
204
+ }, u.size = function(r) {
205
+ return arguments.length ? (l = +r[0], n = +r[1], u) : [l, n];
206
+ }, u.tile = function(r) {
207
+ return arguments.length ? (t = Je(r), u) : t;
208
+ }, u.padding = function(r) {
209
+ return arguments.length ? u.paddingInner(r).paddingOuter(r) : u.paddingInner();
210
+ }, u.paddingInner = function(r) {
211
+ return arguments.length ? (i = typeof r == "function" ? r : q(+r), u) : i;
212
+ }, u.paddingOuter = function(r) {
213
+ return arguments.length ? u.paddingTop(r).paddingRight(r).paddingBottom(r).paddingLeft(r) : u.paddingTop();
214
+ }, u.paddingTop = function(r) {
215
+ return arguments.length ? (h = typeof r == "function" ? r : q(+r), u) : h;
216
+ }, u.paddingRight = function(r) {
217
+ return arguments.length ? (d = typeof r == "function" ? r : q(+r), u) : d;
218
+ }, u.paddingBottom = function(r) {
219
+ return arguments.length ? (g = typeof r == "function" ? r : q(+r), u) : g;
220
+ }, u.paddingLeft = function(r) {
221
+ return arguments.length ? (c = typeof r == "function" ? r : q(+r), u) : c;
222
+ }, u;
223
+ }
224
+ var R, oe = (R = class {
225
+ constructor() {
226
+ this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.setAccTitle = xe, this.getAccTitle = be, this.setDiagramTitle = we, this.getDiagramTitle = Ce, this.getAccDescription = Te, this.setAccDescription = Le;
227
+ }
228
+ getNodes() {
229
+ return this.nodes;
230
+ }
231
+ getConfig() {
232
+ const a = $e, l = ae();
233
+ return ee({
234
+ ...a.treemap,
235
+ ...l.treemap ?? {}
236
+ });
237
+ }
238
+ addNode(a, l) {
239
+ this.nodes.push(a), this.levels.set(a, l), l === 0 && (this.outerNodes.push(a), this.root ??= a);
240
+ }
241
+ getRoot() {
242
+ return { name: "", children: this.outerNodes };
243
+ }
244
+ addClass(a, l) {
245
+ const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, s = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
246
+ s && s.forEach((i) => {
247
+ Ae(i) && (n?.textStyles ? n.textStyles.push(i) : n.textStyles = [i]), n?.styles ? n.styles.push(i) : n.styles = [i];
248
+ }), this.classes.set(a, n);
249
+ }
250
+ getClasses() {
251
+ return this.classes;
252
+ }
253
+ getStylesForClass(a) {
254
+ return this.classes.get(a)?.styles ?? [];
255
+ }
256
+ clear() {
257
+ Fe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
258
+ }
259
+ }, w(R, "TreeMapDB"), R);
260
+ function ce(t) {
261
+ if (!t.length)
262
+ return [];
263
+ const a = [], l = [];
264
+ return t.forEach((n) => {
265
+ const s = {
266
+ name: n.name,
267
+ children: n.type === "Leaf" ? void 0 : []
268
+ };
269
+ for (s.classSelector = n?.classSelector, n?.cssCompiledStyles && (s.cssCompiledStyles = n.cssCompiledStyles), n.type === "Leaf" && n.value !== void 0 && (s.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
270
+ l.pop();
271
+ if (l.length === 0)
272
+ a.push(s);
273
+ else {
274
+ const i = l[l.length - 1].node;
275
+ i.children ? i.children.push(s) : i.children = [s];
276
+ }
277
+ n.type !== "Leaf" && l.push({ node: s, level: n.level });
278
+ }), a;
279
+ }
280
+ w(ce, "buildHierarchy");
281
+ var st = /* @__PURE__ */ w((t, a) => {
282
+ ge(t, a);
283
+ const l = [];
284
+ for (const i of t.TreemapRows ?? [])
285
+ i.$type === "ClassDefStatement" && a.addClass(i.className ?? "", i.styleText ?? "");
286
+ for (const i of t.TreemapRows ?? []) {
287
+ const h = i.item;
288
+ if (!h)
289
+ continue;
290
+ const d = i.indent ? parseInt(i.indent) : 0, g = rt(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], u = c.length > 0 ? c : void 0, b = {
291
+ level: d,
292
+ name: g,
293
+ type: h.$type,
294
+ value: h.value,
295
+ classSelector: h.classSelector,
296
+ cssCompiledStyles: u
297
+ };
298
+ l.push(b);
299
+ }
300
+ const n = ce(l), s = /* @__PURE__ */ w((i, h) => {
301
+ for (const d of i)
302
+ a.addNode(d, h), d.children && d.children.length > 0 && s(d.children, h + 1);
303
+ }, "addNodesRecursively");
304
+ s(n, 0);
305
+ }, "populate"), rt = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), he = {
306
+ // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
307
+ parser: { yy: void 0 },
308
+ parse: /* @__PURE__ */ w(async (t) => {
309
+ try {
310
+ const l = await Me("treemap", t);
311
+ te.debug("Treemap AST:", l);
312
+ const n = he.parser?.yy;
313
+ if (!(n instanceof oe))
314
+ throw new Error(
315
+ "parser.parser?.yy was not a TreemapDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues."
316
+ );
317
+ st(l, n);
318
+ } catch (a) {
319
+ throw te.error("Error parsing treemap:", a), a;
320
+ }
321
+ }, "parse")
322
+ }, it = 10, E = 10, X = 25, ot = /* @__PURE__ */ w((t, a, l, n) => {
323
+ const s = n.db, i = s.getConfig(), h = i.padding ?? it, d = s.getDiagramTitle(), g = s.getRoot(), { themeVariables: c } = ae();
324
+ if (!g)
325
+ return;
326
+ const u = d ? 30 : 0, b = Se(a), r = i.nodeWidth ? i.nodeWidth * E : 960, x = i.nodeHeight ? i.nodeHeight * E : 500, S = r, v = x + u;
327
+ b.attr("viewBox", `0 0 ${S} ${v}`), ve(b, v, S, i.useMaxWidth);
328
+ let p;
329
+ try {
330
+ const e = i.valueFormat || ",";
331
+ if (e === "$0,0")
332
+ p = /* @__PURE__ */ w((o) => "$" + O(",")(o), "valueFormat");
333
+ else if (e.startsWith("$") && e.includes(",")) {
334
+ const o = /\.\d+/.exec(e), f = o ? o[0] : "";
335
+ p = /* @__PURE__ */ w((C) => "$" + O("," + f)(C), "valueFormat");
336
+ } else if (e.startsWith("$")) {
337
+ const o = e.substring(1);
338
+ p = /* @__PURE__ */ w((f) => "$" + O(o || "")(f), "valueFormat");
339
+ } else
340
+ p = O(e);
341
+ } catch (e) {
342
+ te.error("Error creating format function:", e), p = O(",");
343
+ }
344
+ const y = Q().range([
345
+ "transparent",
346
+ c.cScale0,
347
+ c.cScale1,
348
+ c.cScale2,
349
+ c.cScale3,
350
+ c.cScale4,
351
+ c.cScale5,
352
+ c.cScale6,
353
+ c.cScale7,
354
+ c.cScale8,
355
+ c.cScale9,
356
+ c.cScale10,
357
+ c.cScale11
358
+ ]), N = Q().range([
359
+ "transparent",
360
+ c.cScalePeer0,
361
+ c.cScalePeer1,
362
+ c.cScalePeer2,
363
+ c.cScalePeer3,
364
+ c.cScalePeer4,
365
+ c.cScalePeer5,
366
+ c.cScalePeer6,
367
+ c.cScalePeer7,
368
+ c.cScalePeer8,
369
+ c.cScalePeer9,
370
+ c.cScalePeer10,
371
+ c.cScalePeer11
372
+ ]), $ = Q().range([
373
+ c.cScaleLabel0,
374
+ c.cScaleLabel1,
375
+ c.cScaleLabel2,
376
+ c.cScaleLabel3,
377
+ c.cScaleLabel4,
378
+ c.cScaleLabel5,
379
+ c.cScaleLabel6,
380
+ c.cScaleLabel7,
381
+ c.cScaleLabel8,
382
+ c.cScaleLabel9,
383
+ c.cScaleLabel10,
384
+ c.cScaleLabel11
385
+ ]);
386
+ d && b.append("text").attr("x", S / 2).attr("y", u / 2).attr("class", "treemapTitle").attr("text-anchor", "middle").attr("dominant-baseline", "middle").text(d);
387
+ const V = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), W = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([r, x]).paddingTop(
388
+ (e) => e.children && e.children.length > 0 ? X + E : 0
389
+ ).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? E : 0).paddingRight((e) => e.children && e.children.length > 0 ? E : 0).paddingBottom((e) => e.children && e.children.length > 0 ? E : 0).round(!0)(W), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = V.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
390
+ H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", X).attr("class", "treemapSectionHeader").attr("fill", "none").attr("fill-opacity", 0.6).attr("stroke-width", 0.6).attr("style", (e) => e.depth === 0 ? "display: none;" : ""), H.append("clipPath").attr("id", (e, o) => `clip-section-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 12)).attr("height", X), H.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", (e, o) => `treemapSection section${o}`).attr("fill", (e) => y(e.data.name)).attr("fill-opacity", 0.6).attr("stroke", (e) => N(e.data.name)).attr("stroke-width", 2).attr("stroke-opacity", 0.4).attr("style", (e) => {
391
+ if (e.depth === 0)
392
+ return "display: none;";
393
+ const o = B({ cssCompiledStyles: e.data.cssCompiledStyles });
394
+ return o.nodeStyles + ";" + o.borderStyles.join(";");
395
+ }), H.append("text").attr("class", "treemapSectionLabel").attr("x", 6).attr("y", X / 2).attr("dominant-baseline", "middle").text((e) => e.depth === 0 ? "" : e.data.name).attr("font-weight", "bold").attr("clip-path", (e, o) => `url(#clip-section-${a}-${o})`).attr("style", (e) => {
396
+ if (e.depth === 0)
397
+ return "display: none;";
398
+ const o = "dominant-baseline: middle; font-size: 12px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
399
+ return o + f.labelStyles.replace("color:", "fill:");
400
+ }).each(function(e) {
401
+ if (e.depth === 0)
402
+ return;
403
+ const o = U(this), f = e.data.name;
404
+ o.text(f);
405
+ const C = e.x1 - e.x0, L = 6;
406
+ let T;
407
+ i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
408
+ const m = Math.max(15, T), _ = o.node();
409
+ if (_.getComputedTextLength() > m) {
410
+ let z = f;
411
+ for (; z.length > 0; ) {
412
+ if (z = f.substring(0, z.length - 1), z.length === 0) {
413
+ o.text("..."), _.getComputedTextLength() > m && o.text("");
414
+ break;
415
+ }
416
+ if (o.text(z + "..."), _.getComputedTextLength() <= m)
417
+ break;
418
+ }
419
+ }
420
+ }), i.showValues !== !1 && H.append("text").attr("class", "treemapSectionValue").attr("x", (e) => e.x1 - e.x0 - 10).attr("y", X / 2).attr("text-anchor", "end").attr("dominant-baseline", "middle").text((e) => e.value ? p(e.value) : "").attr("font-style", "italic").attr("style", (e) => {
421
+ if (e.depth === 0)
422
+ return "display: none;";
423
+ const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + $(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
424
+ return o + f.labelStyles.replace("color:", "fill:");
425
+ });
426
+ const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, Y = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, J = A ? 2 : 4, re = A ? 8 : 10, K = A ? 1 : 2, j = V.selectAll(".treemapLeafGroup").data(se).enter().append("g").attr("class", (e, o) => `treemapNode treemapLeafGroup leaf${o}${e.data.classSelector ? ` ${e.data.classSelector}` : ""}x`).attr("transform", (e) => `translate(${e.x0},${e.y0})`);
427
+ j.append("rect").attr("width", (e) => e.x1 - e.x0).attr("height", (e) => e.y1 - e.y0).attr("class", "treemapLeaf").attr("fill", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("style", (e) => B({ cssCompiledStyles: e.data.cssCompiledStyles }).nodeStyles).attr("fill-opacity", 0.3).attr("stroke", (e) => e.parent ? y(e.parent.data.name) : y(e.data.name)).attr("stroke-width", 3), j.append("clipPath").attr("id", (e, o) => `clip-${a}-${o}`).append("rect").attr("width", (e) => Math.max(0, e.x1 - e.x0 - 4)).attr("height", (e) => Math.max(0, e.y1 - e.y0 - 4)), j.append("text").attr("class", "treemapLabel").attr("x", (e) => (e.x1 - e.x0) / 2).attr("y", (e) => (e.y1 - e.y0) / 2).attr("style", (e) => {
428
+ const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` + $(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
429
+ return o + f.labelStyles.replace("color:", "fill:");
430
+ }).attr("clip-path", (e, o) => `url(#clip-${a}-${o})`).text((e) => e.data.name).each(function(e) {
431
+ const o = U(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * J, P = C - 2 * J;
432
+ if (T < re || P < re) {
433
+ o.style("display", "none");
434
+ return;
435
+ }
436
+ let m = parseInt(o.style("font-size"), 10);
437
+ const _ = 0.6;
438
+ for (; L.getComputedTextLength() > T && m > D; )
439
+ m--, o.style("font-size", `${m}px`);
440
+ let F = Math.max(
441
+ I,
442
+ Math.min(Y, Math.round(m * _))
443
+ ), k = m + K + F;
444
+ for (; k > P && m > D && (m--, F = Math.max(
445
+ I,
446
+ Math.min(Y, Math.round(m * _))
447
+ ), !(F < I && m === D)); )
448
+ o.style("font-size", `${m}px`), k = m + K + F;
449
+ o.style("font-size", `${m}px`), A ? (m < D || P < D) && o.style("display", "none") : (L.getComputedTextLength() > T || m < D || P < m) && o.style("display", "none");
450
+ }), i.showValues !== !1 && j.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
451
+ return (o.y1 - o.y0) / 2;
452
+ }).attr("style", (o) => {
453
+ const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
454
+ return f + C.labelStyles.replace("color:", "fill:");
455
+ }).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
456
+ const f = U(this), C = this.parentNode;
457
+ if (!C) {
458
+ f.style("display", "none");
459
+ return;
460
+ }
461
+ const L = U(C).select(".treemapLabel");
462
+ if (L.empty() || L.style("display") === "none") {
463
+ f.style("display", "none");
464
+ return;
465
+ }
466
+ const T = parseFloat(L.style("font-size")), m = Math.max(
467
+ I,
468
+ Math.min(Y, Math.round(T * 0.6))
469
+ );
470
+ f.style("font-size", `${m}px`);
471
+ const F = (o.y1 - o.y0) / 2 + T / 2 + K;
472
+ f.attr("y", F);
473
+ const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * J;
474
+ f.node().getComputedTextLength() > me || F + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
475
+ });
476
+ const pe = i.diagramPadding ?? 8;
477
+ Ne(b, pe, "flowchart", i?.useMaxWidth || !1);
478
+ }, "draw"), ct = /* @__PURE__ */ w(function(t, a) {
479
+ return a.db.getClasses();
480
+ }, "getClasses"), ht = { draw: ot, getClasses: ct }, dt = {
481
+ sectionStrokeColor: "black",
482
+ sectionStrokeWidth: "1",
483
+ sectionFillColor: "#efefef",
484
+ leafStrokeColor: "black",
485
+ leafStrokeWidth: "1",
486
+ leafFillColor: "#efefef",
487
+ labelFontSize: "12px",
488
+ valueFontSize: "10px",
489
+ titleFontSize: "14px"
490
+ }, ut = /* @__PURE__ */ w(({
491
+ treemap: t
492
+ } = {}) => {
493
+ const a = ye(), l = ae(), n = ee(a, l.themeVariables), s = ee(dt, t), i = s.titleColor ?? n.titleColor, h = s.labelColor ?? n.textColor, d = s.valueColor ?? n.textColor;
494
+ return `
495
+ .treemapNode.section {
496
+ stroke: ${s.sectionStrokeColor};
497
+ stroke-width: ${s.sectionStrokeWidth};
498
+ fill: ${s.sectionFillColor};
499
+ }
500
+ .treemapNode.leaf {
501
+ stroke: ${s.leafStrokeColor};
502
+ stroke-width: ${s.leafStrokeWidth};
503
+ fill: ${s.leafFillColor};
504
+ }
505
+ .treemapLabel {
506
+ fill: ${h};
507
+ font-size: ${s.labelFontSize};
508
+ }
509
+ .treemapValue {
510
+ fill: ${d};
511
+ font-size: ${s.valueFontSize};
512
+ }
513
+ .treemapTitle {
514
+ fill: ${i};
515
+ font-size: ${s.titleFontSize};
516
+ }
517
+ `;
518
+ }, "getStyles"), pt = ut, bt = {
519
+ parser: he,
520
+ get db() {
521
+ return new oe();
522
+ },
523
+ renderer: ht,
524
+ styles: pt
525
+ };
526
+ export {
527
+ bt as diagram
528
+ };