@aiquants/markdown 2.0.3 → 4.0.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 (216) hide show
  1. package/README.md +266 -14
  2. package/dist/{abnfDiagram-VRR7QNED-BBmog1I4.cjs → abnfDiagram-VRR7QNED-DL9JJfMF.cjs} +1 -1
  3. package/dist/{abnfDiagram-VRR7QNED-IjPsliMa.js → abnfDiagram-VRR7QNED-utxwo7Ri.js} +15 -15
  4. package/dist/{arc-DKsAswGe.cjs → arc-BY7loL0l.cjs} +1 -1
  5. package/dist/{arc-E1KzF_uD.js → arc-Byq9kr_0.js} +32 -32
  6. package/dist/{architectureDiagram-ZJ3FMSHR-BLhnaJyB.cjs → architectureDiagram-ZJ3FMSHR-CLLwinmD.cjs} +1 -1
  7. package/dist/{architectureDiagram-ZJ3FMSHR-u79eEnkY.js → architectureDiagram-ZJ3FMSHR-DpnBy_s1.js} +2 -2
  8. package/dist/{blockDiagram-677ZJIJ3-DcCNlY_i.js → blockDiagram-677ZJIJ3-C8dybZZU.js} +3 -3
  9. package/dist/{blockDiagram-677ZJIJ3-D72bpMhN.cjs → blockDiagram-677ZJIJ3-Cs5tpWQ-.cjs} +1 -1
  10. package/dist/{c4Diagram-LMCZKHZV-Bp9asujr.js → c4Diagram-LMCZKHZV-3aG0bDyP.js} +2 -2
  11. package/dist/{c4Diagram-LMCZKHZV-D3d1d4zO.cjs → c4Diagram-LMCZKHZV-B-rz2a3v.cjs} +1 -1
  12. package/dist/{channel-DpcrO3R2.js → channel-BoXFYC1g.js} +1 -1
  13. package/dist/{channel-DE5LXIMm.cjs → channel-Dn2hPSB8.cjs} +1 -1
  14. package/dist/{chunk-2Q5K7J3B-BrnUlAaZ.cjs → chunk-2Q5K7J3B-B7QkO_05.cjs} +1 -1
  15. package/dist/{chunk-2Q5K7J3B-OuVdfHE1.js → chunk-2Q5K7J3B-CYpyj9EA.js} +1 -1
  16. package/dist/{chunk-32BRIVSS-CDxbP_I9.cjs → chunk-32BRIVSS-BjI5igEa.cjs} +1 -1
  17. package/dist/{chunk-32BRIVSS-w8TMFT10.js → chunk-32BRIVSS-DcLe6F1l.js} +1 -1
  18. package/dist/{chunk-5VM5RSS4-BHG-YQpQ.js → chunk-5VM5RSS4-C4ILSCRb.js} +1 -1
  19. package/dist/{chunk-5VM5RSS4-C-cBAbST.cjs → chunk-5VM5RSS4-DafQyxAv.cjs} +1 -1
  20. package/dist/{chunk-EX3LRPZG-uKd75-FB.cjs → chunk-EX3LRPZG-BXZDK2R1.cjs} +1 -1
  21. package/dist/{chunk-EX3LRPZG-BNHa-x9z.js → chunk-EX3LRPZG-CTaiVHYY.js} +28 -28
  22. package/dist/{chunk-JWPE2WC7-DtFuVO4n.js → chunk-JWPE2WC7-B-nuuS4b.js} +1 -1
  23. package/dist/{chunk-JWPE2WC7-CNFRDah7.cjs → chunk-JWPE2WC7-CNZBI1Pb.cjs} +1 -1
  24. package/dist/{chunk-MOJQB5TN-DwJ5ntgS.js → chunk-MOJQB5TN-D1oF99aM.js} +9 -9
  25. package/dist/{chunk-MOJQB5TN-Bs5Jj3Zh.cjs → chunk-MOJQB5TN-Dh_1HfSC.cjs} +1 -1
  26. package/dist/{chunk-PUDLZKDR-DisfuynB.cjs → chunk-PUDLZKDR-CMFJFweY.cjs} +1 -1
  27. package/dist/{chunk-PUDLZKDR-CG9K3aEk.js → chunk-PUDLZKDR-CPadtN2C.js} +6 -6
  28. package/dist/{chunk-RYQCIY6F-xFTrTO6v.cjs → chunk-RYQCIY6F-C6453DQl.cjs} +1 -1
  29. package/dist/{chunk-RYQCIY6F-c2KNx-Ia.js → chunk-RYQCIY6F-DxuegR0d.js} +1 -1
  30. package/dist/{chunk-V7JOEXUC-BvkxRSjK.cjs → chunk-V7JOEXUC-l9PaMPOT.cjs} +1 -1
  31. package/dist/{chunk-V7JOEXUC-CA3ccBvd.js → chunk-V7JOEXUC-ziE5DrnY.js} +5 -5
  32. package/dist/{chunk-VR4S4FIN-Cn9aeq2_.js → chunk-VR4S4FIN-BiCYvwb8.js} +3 -3
  33. package/dist/{chunk-VR4S4FIN-DAwCjhU3.cjs → chunk-VR4S4FIN-CCCnXTuJ.cjs} +1 -1
  34. package/dist/{chunk-XXDRQBXY-pPF9BeL7.js → chunk-XXDRQBXY-BFKT7vFo.js} +1 -1
  35. package/dist/{chunk-XXDRQBXY-B7vX1DJv.cjs → chunk-XXDRQBXY-D5IbqpUM.cjs} +1 -1
  36. package/dist/{classDiagram-OUVF2IWQ-BxIt89EK.cjs → classDiagram-OUVF2IWQ-C1AZm4pB.cjs} +1 -1
  37. package/dist/{classDiagram-v2-EOCWNBFH-MQ0VQAsx.js → classDiagram-OUVF2IWQ-KA_F_TBQ.js} +2 -2
  38. package/dist/{classDiagram-v2-EOCWNBFH-BxIt89EK.cjs → classDiagram-v2-EOCWNBFH-C1AZm4pB.cjs} +1 -1
  39. package/dist/{classDiagram-OUVF2IWQ-MQ0VQAsx.js → classDiagram-v2-EOCWNBFH-KA_F_TBQ.js} +2 -2
  40. package/dist/components/MarkdownRenderer.d.ts +9 -2
  41. package/dist/components/MarkdownViewer.d.ts +19 -35
  42. package/dist/components/MermaidDiagram.d.ts +4 -0
  43. package/dist/components/NodesRenderer.d.ts +2 -1
  44. package/dist/components/TableOfContents.d.ts +14 -4
  45. package/dist/components/embeds.d.ts +30 -0
  46. package/dist/components/htmlSanitizer.d.ts +21 -0
  47. package/dist/components/labels.d.ts +12 -0
  48. package/dist/components/links.d.ts +18 -0
  49. package/dist/components/mathRendering.d.ts +11 -0
  50. package/dist/components/mdastNodes/HTMLBlockContainerNode.d.ts +3 -2
  51. package/dist/components/mdastNodes/HTMLNode.d.ts +1 -1
  52. package/dist/components/mdastNodes/MathNode.d.ts +10 -0
  53. package/dist/components/mdastNodes/TwitterEmbedNode.d.ts +3 -2
  54. package/dist/components/mdastNodes/YouTubeEmbedNode.d.ts +4 -2
  55. package/dist/components/mermaidInteraction.d.ts +1 -4
  56. package/dist/components/mermaidLabels.d.ts +19 -0
  57. package/dist/components/plugins/DifyIFramePlugin.d.ts +2 -6
  58. package/dist/components/plugins/IFramePluginRegistry.d.ts +6 -4
  59. package/dist/components/rawHtml.d.ts +13 -0
  60. package/dist/components/toolbarOverlap.d.ts +17 -0
  61. package/dist/components/viewerLabels.d.ts +31 -0
  62. package/dist/{cose-bilkent-JH36ORCC-BzL-a0Zv.cjs → cose-bilkent-JH36ORCC-BQ2K2GyI.cjs} +1 -1
  63. package/dist/{cose-bilkent-JH36ORCC-ukc_ZtcU.js → cose-bilkent-JH36ORCC-B_16TV-v.js} +1 -1
  64. package/dist/css/details.css +7 -0
  65. package/dist/css/fonts/KaTeX_AMS-Regular.ttf +0 -0
  66. package/dist/css/fonts/KaTeX_AMS-Regular.woff +0 -0
  67. package/dist/css/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  68. package/dist/css/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
  69. package/dist/css/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
  70. package/dist/css/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  71. package/dist/css/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
  72. package/dist/css/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
  73. package/dist/css/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  74. package/dist/css/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
  75. package/dist/css/fonts/KaTeX_Fraktur-Bold.woff +0 -0
  76. package/dist/css/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  77. package/dist/css/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
  78. package/dist/css/fonts/KaTeX_Fraktur-Regular.woff +0 -0
  79. package/dist/css/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  80. package/dist/css/fonts/KaTeX_Main-Bold.ttf +0 -0
  81. package/dist/css/fonts/KaTeX_Main-Bold.woff +0 -0
  82. package/dist/css/fonts/KaTeX_Main-Bold.woff2 +0 -0
  83. package/dist/css/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
  84. package/dist/css/fonts/KaTeX_Main-BoldItalic.woff +0 -0
  85. package/dist/css/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  86. package/dist/css/fonts/KaTeX_Main-Italic.ttf +0 -0
  87. package/dist/css/fonts/KaTeX_Main-Italic.woff +0 -0
  88. package/dist/css/fonts/KaTeX_Main-Italic.woff2 +0 -0
  89. package/dist/css/fonts/KaTeX_Main-Regular.ttf +0 -0
  90. package/dist/css/fonts/KaTeX_Main-Regular.woff +0 -0
  91. package/dist/css/fonts/KaTeX_Main-Regular.woff2 +0 -0
  92. package/dist/css/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
  93. package/dist/css/fonts/KaTeX_Math-BoldItalic.woff +0 -0
  94. package/dist/css/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  95. package/dist/css/fonts/KaTeX_Math-Italic.ttf +0 -0
  96. package/dist/css/fonts/KaTeX_Math-Italic.woff +0 -0
  97. package/dist/css/fonts/KaTeX_Math-Italic.woff2 +0 -0
  98. package/dist/css/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
  99. package/dist/css/fonts/KaTeX_SansSerif-Bold.woff +0 -0
  100. package/dist/css/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  101. package/dist/css/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
  102. package/dist/css/fonts/KaTeX_SansSerif-Italic.woff +0 -0
  103. package/dist/css/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  104. package/dist/css/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
  105. package/dist/css/fonts/KaTeX_SansSerif-Regular.woff +0 -0
  106. package/dist/css/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  107. package/dist/css/fonts/KaTeX_Script-Regular.ttf +0 -0
  108. package/dist/css/fonts/KaTeX_Script-Regular.woff +0 -0
  109. package/dist/css/fonts/KaTeX_Script-Regular.woff2 +0 -0
  110. package/dist/css/fonts/KaTeX_Size1-Regular.ttf +0 -0
  111. package/dist/css/fonts/KaTeX_Size1-Regular.woff +0 -0
  112. package/dist/css/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  113. package/dist/css/fonts/KaTeX_Size2-Regular.ttf +0 -0
  114. package/dist/css/fonts/KaTeX_Size2-Regular.woff +0 -0
  115. package/dist/css/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  116. package/dist/css/fonts/KaTeX_Size3-Regular.ttf +0 -0
  117. package/dist/css/fonts/KaTeX_Size3-Regular.woff +0 -0
  118. package/dist/css/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  119. package/dist/css/fonts/KaTeX_Size4-Regular.ttf +0 -0
  120. package/dist/css/fonts/KaTeX_Size4-Regular.woff +0 -0
  121. package/dist/css/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  122. package/dist/css/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
  123. package/dist/css/fonts/KaTeX_Typewriter-Regular.woff +0 -0
  124. package/dist/css/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  125. package/dist/css/github-markdown.css +23 -0
  126. package/dist/css/katex.min.css +1 -1129
  127. package/dist/css/message.css +2 -0
  128. package/dist/css/zenn-content.css +14 -0
  129. package/dist/{cynefinDiagram-TSTJHNR4-C1GqR9hq.js → cynefinDiagram-TSTJHNR4-DTV6ORFc.js} +23 -23
  130. package/dist/{cynefinDiagram-TSTJHNR4-B1lNDIu_.cjs → cynefinDiagram-TSTJHNR4-Dq7UoRYB.cjs} +1 -1
  131. package/dist/{dagre-VKFMJZFB-COYURQTh.cjs → dagre-VKFMJZFB-PCi8s-PP.cjs} +1 -1
  132. package/dist/{dagre-VKFMJZFB-DpiBVdXS.js → dagre-VKFMJZFB-kSrm5dp4.js} +12 -12
  133. package/dist/{diagram-FQU43EPY-CVw420ny.js → diagram-FQU43EPY-D3dKlAPv.js} +2 -2
  134. package/dist/{diagram-FQU43EPY-DkgdwwAT.cjs → diagram-FQU43EPY-wTUTIyQQ.cjs} +1 -1
  135. package/dist/{diagram-G47NLZAW-cr36B9DD.js → diagram-G47NLZAW-HJlhMCYj.js} +131 -131
  136. package/dist/{diagram-G47NLZAW-CcXcBx81.cjs → diagram-G47NLZAW-_4FrgCGJ.cjs} +1 -1
  137. package/dist/{diagram-NH7WQ7WH-BMYzS0pm.cjs → diagram-NH7WQ7WH-ByCeah-n.cjs} +1 -1
  138. package/dist/{diagram-NH7WQ7WH-CoL7cXmX.js → diagram-NH7WQ7WH-CgeHmdJL.js} +11 -11
  139. package/dist/{diagram-OA4YK3LP-DSeI6RLe.cjs → diagram-OA4YK3LP-C0IhePjD.cjs} +1 -1
  140. package/dist/{diagram-OA4YK3LP-DRAbN1oy.js → diagram-OA4YK3LP-CwJcZGHD.js} +57 -57
  141. package/dist/{diagram-WEI45ONY-CCJwQ42c.cjs → diagram-WEI45ONY-Cf-TVNEb.cjs} +1 -1
  142. package/dist/{diagram-WEI45ONY-CxkNlW0N.js → diagram-WEI45ONY-v1LUmWAx.js} +11 -11
  143. package/dist/{ebnfDiagram-CCIWWBDH-PADFa1z_.js → ebnfDiagram-CCIWWBDH-DqZtnwGP.js} +5 -5
  144. package/dist/{ebnfDiagram-CCIWWBDH-D_nz1FvR.cjs → ebnfDiagram-CCIWWBDH-k5XOUGml.cjs} +1 -1
  145. package/dist/{erDiagram-Q63AITRT-DFD27ud_.js → erDiagram-Q63AITRT-D6kP6d5J.js} +4 -4
  146. package/dist/{erDiagram-Q63AITRT-2r-lfgSt.cjs → erDiagram-Q63AITRT-DFet1VTy.cjs} +1 -1
  147. package/dist/{extractHeadings-BUHj1PcO.js → extractHeadings-B2I83li5.js} +6326 -5913
  148. package/dist/{extractHeadings-BrLI2qQF.cjs → extractHeadings-R7NxLZJP.cjs} +71 -71
  149. package/dist/flowDiagram-23GEKE2U-BTXvBdte.js +7 -0
  150. package/dist/flowDiagram-23GEKE2U-C81VZYM7.cjs +1 -0
  151. package/dist/{ganttDiagram-NO4QXBWP-CNhgpKSH.cjs → ganttDiagram-NO4QXBWP-CEQqLRYx.cjs} +1 -1
  152. package/dist/{ganttDiagram-NO4QXBWP-CmV2JOI4.js → ganttDiagram-NO4QXBWP-I9DxJwkX.js} +2 -2
  153. package/dist/gen/markdown/v1/markdown_pb.d.ts +14 -0
  154. package/dist/{gitGraphDiagram-IHSO6WYX-D6YozD-Z.js → gitGraphDiagram-IHSO6WYX-p_7WQssC.js} +3 -3
  155. package/dist/{gitGraphDiagram-IHSO6WYX-D5IYosEF.cjs → gitGraphDiagram-IHSO6WYX-yyEwsmHH.cjs} +1 -1
  156. package/dist/index.cjs +1 -1
  157. package/dist/index.client.cjs +1 -1
  158. package/dist/index.client.d.ts +6 -2
  159. package/dist/index.client.js +39 -35
  160. package/dist/index.js +39 -35
  161. package/dist/index.server.cjs +1 -1
  162. package/dist/index.server.d.ts +1 -1
  163. package/dist/index.server.js +258 -170
  164. package/dist/{infoDiagram-FWYZ7A6U-U2OiliOP.cjs → infoDiagram-FWYZ7A6U-BFCkTfAI.cjs} +1 -1
  165. package/dist/{infoDiagram-FWYZ7A6U-Jthjyrbt.js → infoDiagram-FWYZ7A6U-C9L5rIcg.js} +1 -1
  166. package/dist/{ishikawaDiagram-FXEZZL3T-DK3M6wrz.cjs → ishikawaDiagram-FXEZZL3T-B3TjOzka.cjs} +1 -1
  167. package/dist/{ishikawaDiagram-FXEZZL3T-CWrHeeTL.js → ishikawaDiagram-FXEZZL3T-uxcpJtLF.js} +20 -20
  168. package/dist/{journeyDiagram-5HDEW3XC-B-BfhPr4.cjs → journeyDiagram-5HDEW3XC-CvtPgaNR.cjs} +1 -1
  169. package/dist/{journeyDiagram-5HDEW3XC-GOWrusc2.js → journeyDiagram-5HDEW3XC-DMq3piuW.js} +4 -4
  170. package/dist/{kanban-definition-HUTT4EX6-BvnLv2HN.cjs → kanban-definition-HUTT4EX6-DJ9sXiRP.cjs} +1 -1
  171. package/dist/{kanban-definition-HUTT4EX6-BebMuVhZ.js → kanban-definition-HUTT4EX6-Dfal8jdL.js} +34 -34
  172. package/dist/{linear-B9JMAP1U.cjs → linear-CLykHvhQ.cjs} +1 -1
  173. package/dist/{linear-BdCaKB6J.js → linear-CvzPdVAO.js} +12 -12
  174. package/dist/markdown.css +1 -1
  175. package/dist/{mindmap-definition-LN4V7U3C-ChJ71VGh.js → mindmap-definition-LN4V7U3C-C8erO2Mh.js} +20 -20
  176. package/dist/{mindmap-definition-LN4V7U3C-asDDR5DU.cjs → mindmap-definition-LN4V7U3C-CErimIK1.cjs} +1 -1
  177. package/dist/{pegDiagram-2B236MQR-BO1fCXl7.js → pegDiagram-2B236MQR-CECcXaCN.js} +5 -5
  178. package/dist/{pegDiagram-2B236MQR-C3qJlDiV.cjs → pegDiagram-2B236MQR-DBL8X0k9.cjs} +1 -1
  179. package/dist/{pieDiagram-ENE6RG2P-D5-meW-_.cjs → pieDiagram-ENE6RG2P-B_-x0Nvj.cjs} +1 -1
  180. package/dist/{pieDiagram-ENE6RG2P-fYjP8dvh.js → pieDiagram-ENE6RG2P-CWlf16nv.js} +41 -41
  181. package/dist/{quadrantDiagram-ABIIQ3AL-CmqrHJ4C.cjs → quadrantDiagram-ABIIQ3AL-HKlopKX4.cjs} +1 -1
  182. package/dist/{quadrantDiagram-ABIIQ3AL-CKeeL3uz.js → quadrantDiagram-ABIIQ3AL-JpouSW89.js} +2 -2
  183. package/dist/{railroadDiagram-RFXS5EU6-a-pSoUg2.cjs → railroadDiagram-RFXS5EU6-B-v61EFn.cjs} +1 -1
  184. package/dist/{railroadDiagram-RFXS5EU6-D7OWpbvJ.js → railroadDiagram-RFXS5EU6-CLTBEsir.js} +3 -3
  185. package/dist/remarkProcessor.server.d.ts +11 -1
  186. package/dist/{requirementDiagram-TGXJPOKE-BaKLflmx.cjs → requirementDiagram-TGXJPOKE-4vCejkrF.cjs} +1 -1
  187. package/dist/{requirementDiagram-TGXJPOKE-C5_kJLGy.js → requirementDiagram-TGXJPOKE-DtoTpDLe.js} +3 -3
  188. package/dist/{sankeyDiagram-HTMAVEWB-DuUzdIP0.cjs → sankeyDiagram-HTMAVEWB-Bp8p_ojk.cjs} +1 -1
  189. package/dist/{sankeyDiagram-HTMAVEWB-IdJ3gjdw.js → sankeyDiagram-HTMAVEWB-WxnjUz1I.js} +20 -20
  190. package/dist/{sequenceDiagram-DBY2YBRQ-B29fl34a.cjs → sequenceDiagram-DBY2YBRQ-BUPaWSIG.cjs} +1 -1
  191. package/dist/{sequenceDiagram-DBY2YBRQ-B_lxtRfw.js → sequenceDiagram-DBY2YBRQ-DGJcC2MQ.js} +3 -3
  192. package/dist/{sizeCapture-X5ZJPWSS-Dc9QwSOp.js → sizeCapture-X5ZJPWSS-BmP0pJAx.js} +1 -1
  193. package/dist/{sizeCapture-X5ZJPWSS-DAiqtb_j.cjs → sizeCapture-X5ZJPWSS-Dk82fAT8.cjs} +1 -1
  194. package/dist/{stateDiagram-2N3HPSRC-BXIH2aOp.cjs → stateDiagram-2N3HPSRC-CL5Omkqs.cjs} +1 -1
  195. package/dist/{stateDiagram-2N3HPSRC-Wu5OaQhD.js → stateDiagram-2N3HPSRC-ZL_eFTbb.js} +9 -9
  196. package/dist/{stateDiagram-v2-6OUMAXLB-BfTH3hZ6.js → stateDiagram-v2-6OUMAXLB-BgOqjiSL.js} +2 -2
  197. package/dist/{stateDiagram-v2-6OUMAXLB-8XTokhrn.cjs → stateDiagram-v2-6OUMAXLB-D3Zgp8xl.cjs} +1 -1
  198. package/dist/styles/markdown.css +1 -1
  199. package/dist/{swimlanes-5IMT3BWC-BnT290KL.cjs → swimlanes-5IMT3BWC-CuW1KWfs.cjs} +1 -1
  200. package/dist/{swimlanes-5IMT3BWC-CcYHrJAC.js → swimlanes-5IMT3BWC-GB1p75ou.js} +3 -3
  201. package/dist/{swimlanesDiagram-G3AALYLV-CAEjADeH.cjs → swimlanesDiagram-G3AALYLV-Di_Nug7g.cjs} +1 -1
  202. package/dist/{swimlanesDiagram-G3AALYLV-CxHkefqm.js → swimlanesDiagram-G3AALYLV-Jr2ZWz3z.js} +2 -2
  203. package/dist/{timeline-definition-FHXFAJF6-BjbG4nbM.js → timeline-definition-FHXFAJF6-663e-yVA.js} +34 -34
  204. package/dist/{timeline-definition-FHXFAJF6-Dqdftl5b.cjs → timeline-definition-FHXFAJF6-BKVe7Qad.cjs} +1 -1
  205. package/dist/{vennDiagram-L72KCM5P-BxjgXNwH.cjs → vennDiagram-L72KCM5P-2NIIKtsl.cjs} +1 -1
  206. package/dist/{vennDiagram-L72KCM5P-DnlkQHn-.js → vennDiagram-L72KCM5P-BDGC8Vm3.js} +55 -55
  207. package/dist/viewer-settings.cjs +1 -0
  208. package/dist/viewer-settings.d.ts +9 -0
  209. package/dist/viewer-settings.js +7 -0
  210. package/dist/{wardleyDiagram-EHGQE667-CurWRCjn.cjs → wardleyDiagram-EHGQE667-BrTNZSmG.cjs} +1 -1
  211. package/dist/{wardleyDiagram-EHGQE667-2T71AdlP.js → wardleyDiagram-EHGQE667-IbGr9hGV.js} +27 -27
  212. package/dist/{xychartDiagram-FW5EYKEG-DZCKaSum.js → xychartDiagram-FW5EYKEG-CbxKOQYO.js} +23 -23
  213. package/dist/{xychartDiagram-FW5EYKEG-D0ltrZo8.cjs → xychartDiagram-FW5EYKEG-MCkmgF8g.cjs} +1 -1
  214. package/package.json +17 -11
  215. package/dist/flowDiagram-23GEKE2U-BVLgnxZW.js +0 -7
  216. package/dist/flowDiagram-23GEKE2U-D3w55eDA.cjs +0 -1
@@ -1,6 +1,6 @@
1
- import { p as ge } from "./chunk-JWPE2WC7-DtFuVO4n.js";
2
- import { _ as w, au as ye, ao as ae, aq as ee, at as Se, a1 as ve, a0 as te, b_ as B, $ as U, W as xe, V as be, ae as we, af as Ce, U as Te, Q as $e, ar as Le, b$ as Ae, ak as Fe } from "./extractHeadings-BUHj1PcO.js";
3
- import { s as Ne } from "./chunk-VR4S4FIN-Cn9aeq2_.js";
1
+ import { p as ge } from "./chunk-JWPE2WC7-B-nuuS4b.js";
2
+ import { _ as w, at as ye, an as ae, ap as ee, as as Se, a0 as ve, $ as te, bZ as B, X as U, V as xe, U as be, ad as we, ae as Ce, Q as Te, O as Le, aq as $e, b_ as Ae, aj as Fe } from "./extractHeadings-B2I83li5.js";
3
+ import { s as Ne } from "./chunk-VR4S4FIN-BiCYvwb8.js";
4
4
  import { p as _e } from "./cynefin-VYW2F7L2-Bkk-F_Js.js";
5
5
  import { b as O } from "./defaultLocale-BgPVtth8.js";
6
6
  import { o as K } from "./ordinal-B6-f3MAq.js";
@@ -20,18 +20,18 @@ function Ve(t, a) {
20
20
  return this;
21
21
  }
22
22
  function ze(t, a) {
23
- for (var l = this, n = [l], r, i, h = -1; l = n.pop(); )
24
- if (t.call(a, l, ++h, this), r = l.children)
25
- for (i = r.length - 1; i >= 0; --i)
26
- n.push(r[i]);
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
27
  return this;
28
28
  }
29
29
  function De(t, a) {
30
- for (var l = this, n = [l], r = [], i, h, d, g = -1; l = n.pop(); )
31
- if (r.push(l), i = l.children)
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
32
  for (h = 0, d = i.length; h < d; ++h)
33
33
  n.push(i[h]);
34
- for (; l = r.pop(); )
34
+ for (; l = s.pop(); )
35
35
  t.call(a, l, ++g, this);
36
36
  return this;
37
37
  }
@@ -43,28 +43,28 @@ function Pe(t, a) {
43
43
  }
44
44
  function Be(t) {
45
45
  return this.eachAfter(function(a) {
46
- for (var l = +t(a.data) || 0, n = a.children, r = n && n.length; --r >= 0; ) l += n[r].value;
46
+ for (var l = +t(a.data) || 0, n = a.children, s = n && n.length; --s >= 0; ) l += n[s].value;
47
47
  a.value = l;
48
48
  });
49
49
  }
50
- function We(t) {
50
+ function Ee(t) {
51
51
  return this.eachBefore(function(a) {
52
52
  a.children && a.children.sort(t);
53
53
  });
54
54
  }
55
- function Ee(t) {
56
- for (var a = this, l = Re(a, t), n = [a]; a !== l; )
55
+ function Re(t) {
56
+ for (var a = this, l = We(a, t), n = [a]; a !== l; )
57
57
  a = a.parent, n.push(a);
58
- for (var r = n.length; t !== l; )
59
- n.splice(r, 0, t), t = t.parent;
58
+ for (var s = n.length; t !== l; )
59
+ n.splice(s, 0, t), t = t.parent;
60
60
  return n;
61
61
  }
62
- function Re(t, a) {
62
+ function We(t, a) {
63
63
  if (t === a) return t;
64
- var l = t.ancestors(), n = a.ancestors(), r = null;
64
+ var l = t.ancestors(), n = a.ancestors(), s = null;
65
65
  for (t = l.pop(), a = n.pop(); t === a; )
66
- r = t, t = l.pop(), a = n.pop();
67
- return r;
66
+ s = t, t = l.pop(), a = n.pop();
67
+ return s;
68
68
  }
69
69
  function He() {
70
70
  for (var t = this, a = [t]; t = t.parent; )
@@ -87,53 +87,53 @@ function qe() {
87
87
  }), a;
88
88
  }
89
89
  function* Ge() {
90
- var t = this, a, l = [t], n, r, i;
90
+ var t = this, a, l = [t], n, s, i;
91
91
  do
92
92
  for (a = l.reverse(), l = []; t = a.pop(); )
93
93
  if (yield t, n = t.children)
94
- for (r = 0, i = n.length; r < i; ++r)
95
- l.push(n[r]);
94
+ for (s = 0, i = n.length; s < i; ++s)
95
+ l.push(n[s]);
96
96
  while (l.length);
97
97
  }
98
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 Q(t), n, r = [l], i, h, d, g; n = r.pop(); )
99
+ t instanceof Map ? (t = [void 0, t], a === void 0 && (a = Ye)) : a === void 0 && (a = je);
100
+ for (var l = new Z(t), n, s = [l], i, h, d, g; n = s.pop(); )
101
101
  if ((h = a(n.data)) && (g = (h = Array.from(h)).length))
102
102
  for (n.children = h, d = g - 1; d >= 0; --d)
103
- r.push(i = h[d] = new Q(h[d])), i.parent = n, i.depth = n.depth + 1;
104
- return l.eachBefore(Qe);
103
+ s.push(i = h[d] = new Z(h[d])), i.parent = n, i.depth = n.depth + 1;
104
+ return l.eachBefore(Ze);
105
105
  }
106
106
  function Xe() {
107
107
  return ne(this).eachBefore(Ue);
108
108
  }
109
- function Ye(t) {
109
+ function je(t) {
110
110
  return t.children;
111
111
  }
112
- function je(t) {
112
+ function Ye(t) {
113
113
  return Array.isArray(t) ? t[1] : null;
114
114
  }
115
115
  function Ue(t) {
116
116
  t.data.value !== void 0 && (t.value = t.data.value), t.data = t.data.data;
117
117
  }
118
- function Qe(t) {
118
+ function Ze(t) {
119
119
  var a = 0;
120
120
  do
121
121
  t.height = a;
122
122
  while ((t = t.parent) && t.height < ++a);
123
123
  }
124
- function Q(t) {
124
+ function Z(t) {
125
125
  this.data = t, this.depth = this.height = 0, this.parent = null;
126
126
  }
127
- Q.prototype = ne.prototype = {
128
- constructor: Q,
127
+ Z.prototype = ne.prototype = {
128
+ constructor: Z,
129
129
  count: ke,
130
130
  each: Ve,
131
131
  eachAfter: De,
132
132
  eachBefore: ze,
133
133
  find: Pe,
134
134
  sum: Be,
135
- sort: We,
136
- path: Ee,
135
+ sort: Ee,
136
+ path: Re,
137
137
  ancestors: He,
138
138
  descendants: Ie,
139
139
  leaves: Oe,
@@ -141,7 +141,7 @@ Q.prototype = ne.prototype = {
141
141
  copy: Xe,
142
142
  [Symbol.iterator]: Ge
143
143
  };
144
- function Ze(t) {
144
+ function Qe(t) {
145
145
  if (typeof t != "function") throw new Error();
146
146
  return t;
147
147
  }
@@ -156,80 +156,80 @@ function G(t) {
156
156
  function Je(t) {
157
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
158
  }
159
- function Ke(t, a, l, n, r) {
159
+ function Ke(t, a, l, n, s) {
160
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 = r, h.x0 = a, h.x1 = a += h.value * c;
161
+ h = i[d], h.y0 = l, h.y1 = s, h.x0 = a, h.x1 = a += h.value * c;
162
162
  }
163
- function et(t, a, l, n, r) {
164
- for (var i = t.children, h, d = -1, g = i.length, c = t.value && (r - l) / t.value; ++d < g; )
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
165
  h = i[d], h.x0 = a, h.x1 = n, h.y0 = l, h.y1 = l += h.value * c;
166
166
  }
167
167
  var tt = (1 + Math.sqrt(5)) / 2;
168
- function at(t, a, l, n, r, i) {
169
- for (var h = [], d = a.children, g, c, u = 0, b = 0, s = d.length, x, S, v = a.value, p, y, N, L, z, R, _; u < s; ) {
170
- x = r - l, S = i - n;
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, $, z, W, _; u < r; ) {
170
+ x = s - l, S = i - n;
171
171
  do
172
172
  p = d[b++].value;
173
- while (!p && b < s);
174
- for (y = N = p, R = Math.max(S / x, x / S) / (v * t), _ = p * p * R, z = Math.max(N / _, _ / y); b < s; ++b) {
175
- if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), _ = p * p * R, L = Math.max(N / _, _ / y), L > z) {
173
+ while (!p && b < r);
174
+ for (y = N = p, W = Math.max(S / x, x / S) / (v * t), _ = p * p * W, z = Math.max(N / _, _ / y); b < r; ++b) {
175
+ if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), _ = p * p * W, $ = Math.max(N / _, _ / y), $ > z) {
176
176
  p -= c;
177
177
  break;
178
178
  }
179
- z = L;
179
+ z = $;
180
180
  }
181
- h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ke(g, l, n, r, v ? n += S * p / v : i) : et(g, l, n, v ? l += x * p / v : r, i), v -= p, u = b;
181
+ h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ke(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
182
  }
183
183
  return h;
184
184
  }
185
185
  const nt = (function t(a) {
186
- function l(n, r, i, h, d) {
187
- at(a, n, r, i, h, d);
186
+ function l(n, s, i, h, d) {
187
+ at(a, n, s, i, h, d);
188
188
  }
189
189
  return l.ratio = function(n) {
190
190
  return t((n = +n) > 1 ? n : 1);
191
191
  }, l;
192
192
  })(tt);
193
193
  function lt() {
194
- var t = nt, a = !1, l = 1, n = 1, r = [0], i = q, h = q, d = q, g = q, c = q;
195
- function u(s) {
196
- return s.x0 = s.y0 = 0, s.x1 = l, s.y1 = n, s.eachBefore(b), r = [0], a && s.eachBefore(Je), s;
194
+ var t = nt, a = !1, l = 1, n = 1, s = [0], i = q, h = q, d = q, g = q, c = q;
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(Je), r;
197
197
  }
198
- function b(s) {
199
- var x = r[s.depth], S = s.x0 + x, v = s.y0 + x, p = s.x1 - x, y = s.y1 - x;
200
- p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), s.x0 = S, s.y0 = v, s.x1 = p, s.y1 = y, s.children && (x = r[s.depth + 1] = i(s) / 2, S += c(s) - x, v += h(s) - x, p -= d(s) - x, y -= g(s) - x, p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2), t(s, S, v, p, y));
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
201
  }
202
- return u.round = function(s) {
203
- return arguments.length ? (a = !!s, u) : a;
204
- }, u.size = function(s) {
205
- return arguments.length ? (l = +s[0], n = +s[1], u) : [l, n];
206
- }, u.tile = function(s) {
207
- return arguments.length ? (t = Ze(s), u) : t;
208
- }, u.padding = function(s) {
209
- return arguments.length ? u.paddingInner(s).paddingOuter(s) : u.paddingInner();
210
- }, u.paddingInner = function(s) {
211
- return arguments.length ? (i = typeof s == "function" ? s : G(+s), u) : i;
212
- }, u.paddingOuter = function(s) {
213
- return arguments.length ? u.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s) : u.paddingTop();
214
- }, u.paddingTop = function(s) {
215
- return arguments.length ? (h = typeof s == "function" ? s : G(+s), u) : h;
216
- }, u.paddingRight = function(s) {
217
- return arguments.length ? (d = typeof s == "function" ? s : G(+s), u) : d;
218
- }, u.paddingBottom = function(s) {
219
- return arguments.length ? (g = typeof s == "function" ? s : G(+s), u) : g;
220
- }, u.paddingLeft = function(s) {
221
- return arguments.length ? (c = typeof s == "function" ? s : G(+s), u) : c;
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 = Qe(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 : G(+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 : G(+r), u) : h;
216
+ }, u.paddingRight = function(r) {
217
+ return arguments.length ? (d = typeof r == "function" ? r : G(+r), u) : d;
218
+ }, u.paddingBottom = function(r) {
219
+ return arguments.length ? (g = typeof r == "function" ? r : G(+r), u) : g;
220
+ }, u.paddingLeft = function(r) {
221
+ return arguments.length ? (c = typeof r == "function" ? r : G(+r), u) : c;
222
222
  }, u;
223
223
  }
224
- var E, oe = (E = class {
224
+ var R, oe = (R = class {
225
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 = $e;
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
227
  }
228
228
  getNodes() {
229
229
  return this.nodes;
230
230
  }
231
231
  getConfig() {
232
- const a = Le, l = ae();
232
+ const a = $e, l = ae();
233
233
  return ee({
234
234
  ...a.treemap,
235
235
  ...l.treemap ?? {}
@@ -242,8 +242,8 @@ var E, oe = (E = class {
242
242
  return { name: "", children: this.outerNodes };
243
243
  }
244
244
  addClass(a, l) {
245
- const n = this.classes.get(a) ?? { id: a, styles: [], textStyles: [] }, r = l.replace(/\\,/g, "§§§").replace(/,/g, ";").replace(/§§§/g, ",").split(";");
246
- r && r.forEach((i) => {
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
247
  Ae(i) && (n?.textStyles ? n.textStyles.push(i) : n.textStyles = [i]), n?.styles ? n.styles.push(i) : n.styles = [i];
248
248
  }), this.classes.set(a, n);
249
249
  }
@@ -256,29 +256,29 @@ var E, oe = (E = class {
256
256
  clear() {
257
257
  Fe(), this.nodes = [], this.levels = /* @__PURE__ */ new Map(), this.outerNodes = [], this.classes = /* @__PURE__ */ new Map(), this.root = void 0;
258
258
  }
259
- }, w(E, "TreeMapDB"), E);
259
+ }, w(R, "TreeMapDB"), R);
260
260
  function ce(t) {
261
261
  if (!t.length)
262
262
  return [];
263
263
  const a = [], l = [];
264
264
  return t.forEach((n) => {
265
- const r = {
265
+ const s = {
266
266
  name: n.name,
267
267
  children: n.type === "Leaf" ? void 0 : []
268
268
  };
269
- for (r.classSelector = n?.classSelector, n?.cssCompiledStyles && (r.cssCompiledStyles = n.cssCompiledStyles), n.type === "Leaf" && n.value !== void 0 && (r.value = n.value); l.length > 0 && l[l.length - 1].level >= n.level; )
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
270
  l.pop();
271
271
  if (l.length === 0)
272
- a.push(r);
272
+ a.push(s);
273
273
  else {
274
274
  const i = l[l.length - 1].node;
275
- i.children ? i.children.push(r) : i.children = [r];
275
+ i.children ? i.children.push(s) : i.children = [s];
276
276
  }
277
- n.type !== "Leaf" && l.push({ node: r, level: n.level });
277
+ n.type !== "Leaf" && l.push({ node: s, level: n.level });
278
278
  }), a;
279
279
  }
280
280
  w(ce, "buildHierarchy");
281
- var rt = /* @__PURE__ */ w((t, a) => {
281
+ var st = /* @__PURE__ */ w((t, a) => {
282
282
  ge(t, a);
283
283
  const l = [];
284
284
  for (const i of t.TreemapRows ?? [])
@@ -287,7 +287,7 @@ var rt = /* @__PURE__ */ w((t, a) => {
287
287
  const h = i.item;
288
288
  if (!h)
289
289
  continue;
290
- const d = i.indent ? parseInt(i.indent) : 0, g = st(h), c = h.classSelector ? a.getStylesForClass(h.classSelector) : [], u = c.length > 0 ? c : void 0, b = {
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
291
  level: d,
292
292
  name: g,
293
293
  type: h.$type,
@@ -297,12 +297,12 @@ var rt = /* @__PURE__ */ w((t, a) => {
297
297
  };
298
298
  l.push(b);
299
299
  }
300
- const n = ce(l), r = /* @__PURE__ */ w((i, h) => {
300
+ const n = ce(l), s = /* @__PURE__ */ w((i, h) => {
301
301
  for (const d of i)
302
- a.addNode(d, h), d.children && d.children.length > 0 && r(d.children, h + 1);
302
+ a.addNode(d, h), d.children && d.children.length > 0 && s(d.children, h + 1);
303
303
  }, "addNodesRecursively");
304
- r(n, 0);
305
- }, "populate"), st = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), he = {
304
+ s(n, 0);
305
+ }, "populate"), rt = /* @__PURE__ */ w((t) => t.name ? String(t.name) : "", "getItemName"), he = {
306
306
  // @ts-expect-error - TreeMapDB is not assignable to DiagramDB
307
307
  parser: { yy: void 0 },
308
308
  parse: /* @__PURE__ */ w(async (t) => {
@@ -314,16 +314,16 @@ var rt = /* @__PURE__ */ w((t, a) => {
314
314
  throw new Error(
315
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
316
  );
317
- rt(l, n);
317
+ st(l, n);
318
318
  } catch (a) {
319
319
  throw te.error("Error parsing treemap:", a), a;
320
320
  }
321
321
  }, "parse")
322
- }, it = 10, W = 10, X = 25, ot = /* @__PURE__ */ w((t, a, l, n) => {
323
- const r = n.db, i = r.getConfig(), h = i.padding ?? it, d = r.getDiagramTitle(), g = r.getRoot(), { themeVariables: c } = ae();
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
324
  if (!g)
325
325
  return;
326
- const u = d ? 30 : 0, b = Se(a), s = i.nodeWidth ? i.nodeWidth * W : 960, x = i.nodeHeight ? i.nodeHeight * W : 500, S = s, v = x + u;
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
327
  b.attr("viewBox", `0 0 ${S} ${v}`), ve(b, v, S, i.useMaxWidth);
328
328
  let p;
329
329
  try {
@@ -369,7 +369,7 @@ var rt = /* @__PURE__ */ w((t, a) => {
369
369
  c.cScalePeer9,
370
370
  c.cScalePeer10,
371
371
  c.cScalePeer11
372
- ]), L = K().range([
372
+ ]), $ = K().range([
373
373
  c.cScaleLabel0,
374
374
  c.cScaleLabel1,
375
375
  c.cScaleLabel2,
@@ -384,9 +384,9 @@ var rt = /* @__PURE__ */ w((t, a) => {
384
384
  c.cScaleLabel11
385
385
  ]);
386
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 z = b.append("g").attr("transform", `translate(0, ${u})`).attr("class", "treemapContainer"), R = ne(g).sum((e) => e.value ?? 0).sort((e, o) => (o.value ?? 0) - (e.value ?? 0)), le = lt().size([s, x]).paddingTop(
388
- (e) => e.children && e.children.length > 0 ? X + W : 0
389
- ).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ? W : 0).paddingRight((e) => e.children && e.children.length > 0 ? W : 0).paddingBottom((e) => e.children && e.children.length > 0 ? W : 0).round(!0)(R), de = le.descendants().filter((e) => e.children && e.children.length > 0), H = z.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
387
+ const z = 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 = z.selectAll(".treemapSection").data(de).enter().append("g").attr("class", "treemapSection").attr("transform", (e) => `translate(${e.x0},${e.y0})`);
390
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
391
  if (e.depth === 0)
392
392
  return "display: none;";
@@ -395,16 +395,16 @@ var rt = /* @__PURE__ */ w((t, a) => {
395
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
396
  if (e.depth === 0)
397
397
  return "display: none;";
398
- const o = "dominant-baseline: middle; font-size: 12px; fill:" + L(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
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
399
  return o + f.labelStyles.replace("color:", "fill:");
400
400
  }).each(function(e) {
401
401
  if (e.depth === 0)
402
402
  return;
403
403
  const o = U(this), f = e.data.name;
404
404
  o.text(f);
405
- const C = e.x1 - e.x0, $ = 6;
405
+ const C = e.x1 - e.x0, L = 6;
406
406
  let T;
407
- i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - $ : T = C - $ - 6;
407
+ i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 - L : T = C - L - 6;
408
408
  const m = Math.max(15, T), M = o.node();
409
409
  if (M.getComputedTextLength() > m) {
410
410
  let V = f;
@@ -420,37 +420,37 @@ var rt = /* @__PURE__ */ w((t, a) => {
420
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
421
  if (e.depth === 0)
422
422
  return "display: none;";
423
- const o = "text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:" + L(e.data.name) + "; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
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
424
  return o + f.labelStyles.replace("color:", "fill:");
425
425
  });
426
- const re = le.leaves(), A = re.length > 20, ue = A ? 16 : 38, Y = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, Z = A ? 2 : 4, se = A ? 8 : 10, J = A ? 1 : 2, j = z.selectAll(".treemapLeafGroup").data(re).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:` + L(e.data.name) + ";", f = B({ cssCompiledStyles: e.data.cssCompiledStyles });
426
+ const se = le.leaves(), A = se.length > 20, ue = A ? 16 : 38, j = A ? 14 : 28, D = A ? 4 : 8, I = A ? 4 : 6, Q = A ? 2 : 4, re = A ? 8 : 10, J = A ? 1 : 2, Y = z.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
+ Y.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), Y.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)), Y.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
429
  return o + f.labelStyles.replace("color:", "fill:");
430
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, $ = o.node(), T = f - 2 * Z, P = C - 2 * Z;
432
- if (T < se || P < se) {
431
+ const o = U(this), f = e.x1 - e.x0, C = e.y1 - e.y0, L = o.node(), T = f - 2 * Q, P = C - 2 * Q;
432
+ if (T < re || P < re) {
433
433
  o.style("display", "none");
434
434
  return;
435
435
  }
436
436
  let m = parseInt(o.style("font-size"), 10);
437
437
  const M = 0.6;
438
- for (; $.getComputedTextLength() > T && m > D; )
438
+ for (; L.getComputedTextLength() > T && m > D; )
439
439
  m--, o.style("font-size", `${m}px`);
440
440
  let F = Math.max(
441
441
  I,
442
- Math.min(Y, Math.round(m * M))
442
+ Math.min(j, Math.round(m * M))
443
443
  ), k = m + J + F;
444
444
  for (; k > P && m > D && (m--, F = Math.max(
445
445
  I,
446
- Math.min(Y, Math.round(m * M))
446
+ Math.min(j, Math.round(m * M))
447
447
  ), !(F < I && m === D)); )
448
448
  o.style("font-size", `${m}px`), k = m + J + F;
449
- o.style("font-size", `${m}px`), A ? (m < D || P < D) && o.style("display", "none") : ($.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) {
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 && Y.append("text").attr("class", "treemapValue").attr("x", (o) => (o.x1 - o.x0) / 2).attr("y", function(o) {
451
451
  return (o.y1 - o.y0) / 2;
452
452
  }).attr("style", (o) => {
453
- const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${Y}px;fill:` + L(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
453
+ const f = `text-anchor: middle; dominant-baseline: hanging; font-size: ${j}px;fill:` + $(o.data.name) + ";", C = B({ cssCompiledStyles: o.data.cssCompiledStyles });
454
454
  return f + C.labelStyles.replace("color:", "fill:");
455
455
  }).attr("clip-path", (o, f) => `url(#clip-${a}-${f})`).text((o) => o.value ? p(o.value) : "").each(function(o) {
456
456
  const f = U(this), C = this.parentNode;
@@ -458,19 +458,19 @@ var rt = /* @__PURE__ */ w((t, a) => {
458
458
  f.style("display", "none");
459
459
  return;
460
460
  }
461
- const $ = U(C).select(".treemapLabel");
462
- if ($.empty() || $.style("display") === "none") {
461
+ const L = U(C).select(".treemapLabel");
462
+ if (L.empty() || L.style("display") === "none") {
463
463
  f.style("display", "none");
464
464
  return;
465
465
  }
466
- const T = parseFloat($.style("font-size")), m = Math.max(
466
+ const T = parseFloat(L.style("font-size")), m = Math.max(
467
467
  I,
468
- Math.min(Y, Math.round(T * 0.6))
468
+ Math.min(j, Math.round(T * 0.6))
469
469
  );
470
470
  f.style("font-size", `${m}px`);
471
471
  const F = (o.y1 - o.y0) / 2 + T / 2 + J;
472
472
  f.attr("y", F);
473
- const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * Z;
473
+ const k = o.x1 - o.x0, ie = o.y1 - o.y0 - 4, me = k - 2 * Q;
474
474
  f.node().getComputedTextLength() > me || F + m > ie || m < I ? f.style("display", "none") : f.style("display", null);
475
475
  });
476
476
  const pe = i.diagramPadding ?? 8;
@@ -490,29 +490,29 @@ var rt = /* @__PURE__ */ w((t, a) => {
490
490
  }, ut = /* @__PURE__ */ w(({
491
491
  treemap: t
492
492
  } = {}) => {
493
- const a = ye(), l = ae(), n = ee(a, l.themeVariables), r = ee(dt, t), i = r.titleColor ?? n.titleColor, h = r.labelColor ?? n.textColor, d = r.valueColor ?? n.textColor;
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
494
  return `
495
495
  .treemapNode.section {
496
- stroke: ${r.sectionStrokeColor};
497
- stroke-width: ${r.sectionStrokeWidth};
498
- fill: ${r.sectionFillColor};
496
+ stroke: ${s.sectionStrokeColor};
497
+ stroke-width: ${s.sectionStrokeWidth};
498
+ fill: ${s.sectionFillColor};
499
499
  }
500
500
  .treemapNode.leaf {
501
- stroke: ${r.leafStrokeColor};
502
- stroke-width: ${r.leafStrokeWidth};
503
- fill: ${r.leafFillColor};
501
+ stroke: ${s.leafStrokeColor};
502
+ stroke-width: ${s.leafStrokeWidth};
503
+ fill: ${s.leafFillColor};
504
504
  }
505
505
  .treemapLabel {
506
506
  fill: ${h};
507
- font-size: ${r.labelFontSize};
507
+ font-size: ${s.labelFontSize};
508
508
  }
509
509
  .treemapValue {
510
510
  fill: ${d};
511
- font-size: ${r.valueFontSize};
511
+ font-size: ${s.valueFontSize};
512
512
  }
513
513
  .treemapTitle {
514
514
  fill: ${i};
515
- font-size: ${r.titleFontSize};
515
+ font-size: ${s.titleFontSize};
516
516
  }
517
517
  `;
518
518
  }, "getStyles"), pt = ut, bt = {
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./chunk-JWPE2WC7-CNFRDah7.cjs"),h=require("./extractHeadings-BrLI2qQF.cjs"),ue=require("./chunk-VR4S4FIN-DAwCjhU3.cjs"),pe=require("./cynefin-VYW2F7L2-MpAliYy9.cjs"),I=require("./defaultLocale-C4wbwF1n.cjs"),Z=require("./ordinal-CagbB1m8.cjs");function fe(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ge(){return this.eachAfter(fe)}function me(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function ye(t,a){for(var l=this,n=[l],r,i,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function Se(t,a){for(var l=this,n=[l],r=[],i,d,u,y=-1;l=n.pop();)if(r.push(l),i=l.children)for(d=0,u=i.length;d<u;++d)n.push(i[d]);for(;l=r.pop();)t.call(a,l,++y,this);return this}function ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function xe(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function be(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function we(t){for(var a=this,l=Ce(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Ce(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Te(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function _e(){return Array.from(this)}function Le(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function $e(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ae(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function K(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ne)):a===void 0&&(a=Me);for(var l=new j(t),n,r=[l],i,d,u,y;n=r.pop();)if((d=a(n.data))&&(y=(d=Array.from(d)).length))for(n.children=d,u=y-1;u>=0;--u)r.push(i=d[u]=new j(d[u])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ve)}function Fe(){return K(this).eachBefore(ke)}function Me(t){return t.children}function Ne(t){return Array.isArray(t)?t[1]:null}function ke(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ve(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function j(t){this.data=t,this.depth=this.height=0,this.parent=null}j.prototype=K.prototype={constructor:j,count:ge,each:me,eachAfter:Se,eachBefore:ye,find:ve,sum:xe,sort:be,path:we,ancestors:Te,descendants:_e,leaves:Le,links:$e,copy:Fe,[Symbol.iterator]:Ae};function ze(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function O(t){return function(){return t}}function Pe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function De(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(n-a)/t.value;++u<y;)d=i[u],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Be(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(r-l)/t.value;++u<y;)d=i[u],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var We=(1+Math.sqrt(5))/2;function Ee(t,a,l,n,r,i){for(var d=[],u=a.children,y,c,p=0,w=0,s=u.length,b,v,x=a.value,f,S,F,L,z,E,M;p<s;){b=r-l,v=i-n;do f=u[w++].value;while(!f&&w<s);for(S=F=f,E=Math.max(v/b,b/v)/(x*t),M=f*f*E,z=Math.max(F/M,M/S);w<s;++w){if(f+=c=u[w].value,c<S&&(S=c),c>F&&(F=c),M=f*f*E,L=Math.max(F/M,M/S),L>z){f-=c;break}z=L}d.push(y={value:f,dice:b<v,children:u.slice(p,w)}),y.dice?De(y,l,n,r,x?n+=v*f/x:i):Be(y,l,n,x?l+=b*f/x:r,i),x-=f,p=w}return d}const Re=(function t(a){function l(n,r,i,d,u){Ee(a,n,r,i,d,u)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(We);function He(){var t=Re,a=!1,l=1,n=1,r=[0],i=q,d=q,u=q,y=q,c=q;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(w),r=[0],a&&s.eachBefore(Pe),s}function w(s){var b=r[s.depth],v=s.x0+b,x=s.y0+b,f=s.x1-b,S=s.y1-b;f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),s.x0=v,s.y0=x,s.x1=f,s.y1=S,s.children&&(b=r[s.depth+1]=i(s)/2,v+=c(s)-b,x+=d(s)-b,f-=u(s)-b,S-=y(s)-b,f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),t(s,v,x,f,S))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=ze(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:O(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(d=typeof s=="function"?s:O(+s),p):d},p.paddingRight=function(s){return arguments.length?(u=typeof s=="function"?s:O(+s),p):u},p.paddingBottom=function(s){return arguments.length?(y=typeof s=="function"?s:O(+s),p):y},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:O(+s),p):c},p}var W,ne=(W=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=h.setAccTitle,this.getAccTitle=h.getAccTitle,this.setDiagramTitle=h.setDiagramTitle,this.getDiagramTitle=h.getDiagramTitle,this.getAccDescription=h.getAccDescription,this.setAccDescription=h.setAccDescription}getNodes(){return this.nodes}getConfig(){const a=h.defaultConfig_default,l=h.getConfig();return h.cleanAndMerge({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{h.isLabelStyle(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){h.clear(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h.__name(W,"TreeMapDB"),W);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}h.__name(le,"buildHierarchy");var Ie=h.__name((t,a)=>{he.populateCommonDb(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const d=i.item;if(!d)continue;const u=i.indent?parseInt(i.indent):0,y=qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c:void 0,w={level:u,name:y,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(w)}const n=le(l),r=h.__name((i,d)=>{for(const u of i)a.addNode(u,d),u.children&&u.children.length>0&&r(u.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),qe=h.__name(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:h.__name(async t=>{try{const a=pe.parse,l=await a("treemap",t);h.log.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("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.");Ie(l,n)}catch(a){throw h.log.error("Error parsing treemap:",a),a}},"parse")},Oe=10,B=10,G=25,Ge=h.__name((t,a,l,n)=>{const r=n.db,i=r.getConfig(),d=i.padding??Oe,u=r.getDiagramTitle(),y=r.getRoot(),{themeVariables:c}=h.getConfig();if(!y)return;const p=u?30:0,w=h.selectSvgElement(a),s=i.nodeWidth?i.nodeWidth*B:960,b=i.nodeHeight?i.nodeHeight*B:500,v=s,x=b+p;w.attr("viewBox",`0 0 ${v} ${x}`),h.configureSvgSize(w,x,v,i.useMaxWidth);let f;try{const e=i.valueFormat||",";if(e==="$0,0")f=h.__name(o=>"$"+I.format(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),g=o?o[0]:"";f=h.__name(C=>"$"+I.format(","+g)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);f=h.__name(g=>"$"+I.format(o||"")(g),"valueFormat")}else f=I.format(e)}catch(e){h.log.error("Error creating format function:",e),f=I.format(",")}const S=Z.ordinal().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),F=Z.ordinal().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),L=Z.ordinal().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);u&&w.append("text").attr("x",v/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);const z=w.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=K(y).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),Q=He().size([s,b]).paddingTop(e=>e.children&&e.children.length>0?G+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=Q.descendants().filter(e=>e.children&&e.children.length>0),R=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);R.append("rect").attr("width",e=>e.x1-e.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),R.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",G),R.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=>S(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>F(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/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=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=h.select(this),g=e.data.name;o.text(g);const C=e.x1-e.x0,_=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-_:T=C-_-6;const m=Math.max(15,T),N=o.node();if(N.getComputedTextLength()>m){let V=g;for(;V.length>0;){if(V=g.substring(0,V.length-1),V.length===0){o.text("..."),N.getComputedTextLength()>m&&o.text("");break}if(o.text(V+"..."),N.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?f(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")});const ee=Q.leaves(),$=ee.length>20,ie=$?16:38,X=$?14:28,P=$?4:8,H=$?4:6,J=$?2:4,te=$?8:10,U=$?1:2,Y=z.selectAll(".treemapLeafGroup").data(ee).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})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("style",e=>h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("stroke-width",3),Y.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)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ie}px;fill:`+L(e.data.name)+";",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=h.select(this),g=e.x1-e.x0,C=e.y1-e.y0,_=o.node(),T=g-2*J,D=C-2*J;if(T<te||D<te){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const N=.6;for(;_.getComputedTextLength()>T&&m>P;)m--,o.style("font-size",`${m}px`);let A=Math.max(H,Math.min(X,Math.round(m*N))),k=m+U+A;for(;k>D&&m>P&&(m--,A=Math.max(H,Math.min(X,Math.round(m*N))),!(A<H&&m===P));)o.style("font-size",`${m}px`),k=m+U+A;o.style("font-size",`${m}px`),$?(m<P||D<P)&&o.style("display","none"):(_.getComputedTextLength()>T||m<P||D<m)&&o.style("display","none")}),i.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+L(o.data.name)+";",C=h.styles2String({cssCompiledStyles:o.data.cssCompiledStyles});return g+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,g)=>`url(#clip-${a}-${g})`).text(o=>o.value?f(o.value):"").each(function(o){const g=h.select(this),C=this.parentNode;if(!C){g.style("display","none");return}const _=h.select(C).select(".treemapLabel");if(_.empty()||_.style("display")==="none"){g.style("display","none");return}const T=parseFloat(_.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));g.style("font-size",`${m}px`);const A=(o.y1-o.y0)/2+T/2+U;g.attr("y",A);const k=o.x1-o.x0,ae=o.y1-o.y0-4,de=k-2*J;g.node().getComputedTextLength()>de||A+m>ae||m<H?g.style("display","none"):g.style("display",null)});const oe=i.diagramPadding??8;ue.setupViewPortForSVG(w,oe,"flowchart",i?.useMaxWidth||!1)},"draw"),Xe=h.__name(function(t,a){return a.db.getClasses()},"getClasses"),Ye={draw:Ge,getClasses:Xe},je={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Je=h.__name(({treemap:t}={})=>{const a=h.getThemeVariables3(),l=h.getConfig(),n=h.cleanAndMerge(a,l.themeVariables),r=h.cleanAndMerge(je,t),i=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,u=r.valueColor??n.textColor;return`
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const he=require("./chunk-JWPE2WC7-CNZBI1Pb.cjs"),h=require("./extractHeadings-R7NxLZJP.cjs"),ue=require("./chunk-VR4S4FIN-CCCnXTuJ.cjs"),pe=require("./cynefin-VYW2F7L2-MpAliYy9.cjs"),I=require("./defaultLocale-C4wbwF1n.cjs"),Z=require("./ordinal-CagbB1m8.cjs");function fe(t){var a=0,l=t.children,n=l&&l.length;if(!n)a=1;else for(;--n>=0;)a+=l[n].value;t.value=a}function ge(){return this.eachAfter(fe)}function me(t,a){let l=-1;for(const n of this)t.call(a,n,++l,this);return this}function ye(t,a){for(var l=this,n=[l],r,i,d=-1;l=n.pop();)if(t.call(a,l,++d,this),r=l.children)for(i=r.length-1;i>=0;--i)n.push(r[i]);return this}function Se(t,a){for(var l=this,n=[l],r=[],i,d,u,y=-1;l=n.pop();)if(r.push(l),i=l.children)for(d=0,u=i.length;d<u;++d)n.push(i[d]);for(;l=r.pop();)t.call(a,l,++y,this);return this}function ve(t,a){let l=-1;for(const n of this)if(t.call(a,n,++l,this))return n}function xe(t){return this.eachAfter(function(a){for(var l=+t(a.data)||0,n=a.children,r=n&&n.length;--r>=0;)l+=n[r].value;a.value=l})}function be(t){return this.eachBefore(function(a){a.children&&a.children.sort(t)})}function we(t){for(var a=this,l=Ce(a,t),n=[a];a!==l;)a=a.parent,n.push(a);for(var r=n.length;t!==l;)n.splice(r,0,t),t=t.parent;return n}function Ce(t,a){if(t===a)return t;var l=t.ancestors(),n=a.ancestors(),r=null;for(t=l.pop(),a=n.pop();t===a;)r=t,t=l.pop(),a=n.pop();return r}function Te(){for(var t=this,a=[t];t=t.parent;)a.push(t);return a}function _e(){return Array.from(this)}function Le(){var t=[];return this.eachBefore(function(a){a.children||t.push(a)}),t}function $e(){var t=this,a=[];return t.each(function(l){l!==t&&a.push({source:l.parent,target:l})}),a}function*Ae(){var t=this,a,l=[t],n,r,i;do for(a=l.reverse(),l=[];t=a.pop();)if(yield t,n=t.children)for(r=0,i=n.length;r<i;++r)l.push(n[r]);while(l.length)}function K(t,a){t instanceof Map?(t=[void 0,t],a===void 0&&(a=Ne)):a===void 0&&(a=Me);for(var l=new j(t),n,r=[l],i,d,u,y;n=r.pop();)if((d=a(n.data))&&(y=(d=Array.from(d)).length))for(n.children=d,u=y-1;u>=0;--u)r.push(i=d[u]=new j(d[u])),i.parent=n,i.depth=n.depth+1;return l.eachBefore(Ve)}function Fe(){return K(this).eachBefore(ke)}function Me(t){return t.children}function Ne(t){return Array.isArray(t)?t[1]:null}function ke(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function Ve(t){var a=0;do t.height=a;while((t=t.parent)&&t.height<++a)}function j(t){this.data=t,this.depth=this.height=0,this.parent=null}j.prototype=K.prototype={constructor:j,count:ge,each:me,eachAfter:Se,eachBefore:ye,find:ve,sum:xe,sort:be,path:we,ancestors:Te,descendants:_e,leaves:Le,links:$e,copy:Fe,[Symbol.iterator]:Ae};function ze(t){if(typeof t!="function")throw new Error;return t}function q(){return 0}function O(t){return function(){return t}}function Pe(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function De(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(n-a)/t.value;++u<y;)d=i[u],d.y0=l,d.y1=r,d.x0=a,d.x1=a+=d.value*c}function Be(t,a,l,n,r){for(var i=t.children,d,u=-1,y=i.length,c=t.value&&(r-l)/t.value;++u<y;)d=i[u],d.x0=a,d.x1=n,d.y0=l,d.y1=l+=d.value*c}var We=(1+Math.sqrt(5))/2;function Ee(t,a,l,n,r,i){for(var d=[],u=a.children,y,c,p=0,w=0,s=u.length,b,v,x=a.value,f,S,F,L,z,E,M;p<s;){b=r-l,v=i-n;do f=u[w++].value;while(!f&&w<s);for(S=F=f,E=Math.max(v/b,b/v)/(x*t),M=f*f*E,z=Math.max(F/M,M/S);w<s;++w){if(f+=c=u[w].value,c<S&&(S=c),c>F&&(F=c),M=f*f*E,L=Math.max(F/M,M/S),L>z){f-=c;break}z=L}d.push(y={value:f,dice:b<v,children:u.slice(p,w)}),y.dice?De(y,l,n,r,x?n+=v*f/x:i):Be(y,l,n,x?l+=b*f/x:r,i),x-=f,p=w}return d}const Re=(function t(a){function l(n,r,i,d,u){Ee(a,n,r,i,d,u)}return l.ratio=function(n){return t((n=+n)>1?n:1)},l})(We);function He(){var t=Re,a=!1,l=1,n=1,r=[0],i=q,d=q,u=q,y=q,c=q;function p(s){return s.x0=s.y0=0,s.x1=l,s.y1=n,s.eachBefore(w),r=[0],a&&s.eachBefore(Pe),s}function w(s){var b=r[s.depth],v=s.x0+b,x=s.y0+b,f=s.x1-b,S=s.y1-b;f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),s.x0=v,s.y0=x,s.x1=f,s.y1=S,s.children&&(b=r[s.depth+1]=i(s)/2,v+=c(s)-b,x+=d(s)-b,f-=u(s)-b,S-=y(s)-b,f<v&&(v=f=(v+f)/2),S<x&&(x=S=(x+S)/2),t(s,v,x,f,S))}return p.round=function(s){return arguments.length?(a=!!s,p):a},p.size=function(s){return arguments.length?(l=+s[0],n=+s[1],p):[l,n]},p.tile=function(s){return arguments.length?(t=ze(s),p):t},p.padding=function(s){return arguments.length?p.paddingInner(s).paddingOuter(s):p.paddingInner()},p.paddingInner=function(s){return arguments.length?(i=typeof s=="function"?s:O(+s),p):i},p.paddingOuter=function(s){return arguments.length?p.paddingTop(s).paddingRight(s).paddingBottom(s).paddingLeft(s):p.paddingTop()},p.paddingTop=function(s){return arguments.length?(d=typeof s=="function"?s:O(+s),p):d},p.paddingRight=function(s){return arguments.length?(u=typeof s=="function"?s:O(+s),p):u},p.paddingBottom=function(s){return arguments.length?(y=typeof s=="function"?s:O(+s),p):y},p.paddingLeft=function(s){return arguments.length?(c=typeof s=="function"?s:O(+s),p):c},p}var W,ne=(W=class{constructor(){this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.setAccTitle=h.setAccTitle,this.getAccTitle=h.getAccTitle,this.setDiagramTitle=h.setDiagramTitle,this.getDiagramTitle=h.getDiagramTitle,this.getAccDescription=h.getAccDescription,this.setAccDescription=h.setAccDescription}getNodes(){return this.nodes}getConfig(){const a=h.defaultConfig_default,l=h.getConfig();return h.cleanAndMerge({...a.treemap,...l.treemap??{}})}addNode(a,l){this.nodes.push(a),this.levels.set(a,l),l===0&&(this.outerNodes.push(a),this.root??=a)}getRoot(){return{name:"",children:this.outerNodes}}addClass(a,l){const n=this.classes.get(a)??{id:a,styles:[],textStyles:[]},r=l.replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");r&&r.forEach(i=>{h.isLabelStyle(i)&&(n?.textStyles?n.textStyles.push(i):n.textStyles=[i]),n?.styles?n.styles.push(i):n.styles=[i]}),this.classes.set(a,n)}getClasses(){return this.classes}getStylesForClass(a){return this.classes.get(a)?.styles??[]}clear(){h.clear(),this.nodes=[],this.levels=new Map,this.outerNodes=[],this.classes=new Map,this.root=void 0}},h.__name(W,"TreeMapDB"),W);function le(t){if(!t.length)return[];const a=[],l=[];return t.forEach(n=>{const r={name:n.name,children:n.type==="Leaf"?void 0:[]};for(r.classSelector=n?.classSelector,n?.cssCompiledStyles&&(r.cssCompiledStyles=n.cssCompiledStyles),n.type==="Leaf"&&n.value!==void 0&&(r.value=n.value);l.length>0&&l[l.length-1].level>=n.level;)l.pop();if(l.length===0)a.push(r);else{const i=l[l.length-1].node;i.children?i.children.push(r):i.children=[r]}n.type!=="Leaf"&&l.push({node:r,level:n.level})}),a}h.__name(le,"buildHierarchy");var Ie=h.__name((t,a)=>{he.populateCommonDb(t,a);const l=[];for(const i of t.TreemapRows??[])i.$type==="ClassDefStatement"&&a.addClass(i.className??"",i.styleText??"");for(const i of t.TreemapRows??[]){const d=i.item;if(!d)continue;const u=i.indent?parseInt(i.indent):0,y=qe(d),c=d.classSelector?a.getStylesForClass(d.classSelector):[],p=c.length>0?c:void 0,w={level:u,name:y,type:d.$type,value:d.value,classSelector:d.classSelector,cssCompiledStyles:p};l.push(w)}const n=le(l),r=h.__name((i,d)=>{for(const u of i)a.addNode(u,d),u.children&&u.children.length>0&&r(u.children,d+1)},"addNodesRecursively");r(n,0)},"populate"),qe=h.__name(t=>t.name?String(t.name):"","getItemName"),re={parser:{yy:void 0},parse:h.__name(async t=>{try{const a=pe.parse,l=await a("treemap",t);h.log.debug("Treemap AST:",l);const n=re.parser?.yy;if(!(n instanceof ne))throw new Error("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.");Ie(l,n)}catch(a){throw h.log.error("Error parsing treemap:",a),a}},"parse")},Oe=10,B=10,G=25,Ge=h.__name((t,a,l,n)=>{const r=n.db,i=r.getConfig(),d=i.padding??Oe,u=r.getDiagramTitle(),y=r.getRoot(),{themeVariables:c}=h.getConfig();if(!y)return;const p=u?30:0,w=h.selectSvgElement(a),s=i.nodeWidth?i.nodeWidth*B:960,b=i.nodeHeight?i.nodeHeight*B:500,v=s,x=b+p;w.attr("viewBox",`0 0 ${v} ${x}`),h.configureSvgSize(w,x,v,i.useMaxWidth);let f;try{const e=i.valueFormat||",";if(e==="$0,0")f=h.__name(o=>"$"+I.format(",")(o),"valueFormat");else if(e.startsWith("$")&&e.includes(",")){const o=/\.\d+/.exec(e),g=o?o[0]:"";f=h.__name(C=>"$"+I.format(","+g)(C),"valueFormat")}else if(e.startsWith("$")){const o=e.substring(1);f=h.__name(g=>"$"+I.format(o||"")(g),"valueFormat")}else f=I.format(e)}catch(e){h.log.error("Error creating format function:",e),f=I.format(",")}const S=Z.ordinal().range(["transparent",c.cScale0,c.cScale1,c.cScale2,c.cScale3,c.cScale4,c.cScale5,c.cScale6,c.cScale7,c.cScale8,c.cScale9,c.cScale10,c.cScale11]),F=Z.ordinal().range(["transparent",c.cScalePeer0,c.cScalePeer1,c.cScalePeer2,c.cScalePeer3,c.cScalePeer4,c.cScalePeer5,c.cScalePeer6,c.cScalePeer7,c.cScalePeer8,c.cScalePeer9,c.cScalePeer10,c.cScalePeer11]),L=Z.ordinal().range([c.cScaleLabel0,c.cScaleLabel1,c.cScaleLabel2,c.cScaleLabel3,c.cScaleLabel4,c.cScaleLabel5,c.cScaleLabel6,c.cScaleLabel7,c.cScaleLabel8,c.cScaleLabel9,c.cScaleLabel10,c.cScaleLabel11]);u&&w.append("text").attr("x",v/2).attr("y",p/2).attr("class","treemapTitle").attr("text-anchor","middle").attr("dominant-baseline","middle").text(u);const z=w.append("g").attr("transform",`translate(0, ${p})`).attr("class","treemapContainer"),E=K(y).sum(e=>e.value??0).sort((e,o)=>(o.value??0)-(e.value??0)),Q=He().size([s,b]).paddingTop(e=>e.children&&e.children.length>0?G+B:0).paddingInner(d).paddingLeft(e=>e.children&&e.children.length>0?B:0).paddingRight(e=>e.children&&e.children.length>0?B:0).paddingBottom(e=>e.children&&e.children.length>0?B:0).round(!0)(E),se=Q.descendants().filter(e=>e.children&&e.children.length>0),R=z.selectAll(".treemapSection").data(se).enter().append("g").attr("class","treemapSection").attr("transform",e=>`translate(${e.x0},${e.y0})`);R.append("rect").attr("width",e=>e.x1-e.x0).attr("height",G).attr("class","treemapSectionHeader").attr("fill","none").attr("fill-opacity",.6).attr("stroke-width",.6).attr("style",e=>e.depth===0?"display: none;":""),R.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",G),R.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=>S(e.data.name)).attr("fill-opacity",.6).attr("stroke",e=>F(e.data.name)).attr("stroke-width",2).attr("stroke-opacity",.4).attr("style",e=>{if(e.depth===0)return"display: none;";const o=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o.nodeStyles+";"+o.borderStyles.join(";")}),R.append("text").attr("class","treemapSectionLabel").attr("x",6).attr("y",G/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=>{if(e.depth===0)return"display: none;";const o="dominant-baseline: middle; font-size: 12px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).each(function(e){if(e.depth===0)return;const o=h.select(this),g=e.data.name;o.text(g);const C=e.x1-e.x0,_=6;let T;i.showValues!==!1&&e.value?T=C-10-30-10-_:T=C-_-6;const m=Math.max(15,T),N=o.node();if(N.getComputedTextLength()>m){let V=g;for(;V.length>0;){if(V=g.substring(0,V.length-1),V.length===0){o.text("..."),N.getComputedTextLength()>m&&o.text("");break}if(o.text(V+"..."),N.getComputedTextLength()<=m)break}}}),i.showValues!==!1&&R.append("text").attr("class","treemapSectionValue").attr("x",e=>e.x1-e.x0-10).attr("y",G/2).attr("text-anchor","end").attr("dominant-baseline","middle").text(e=>e.value?f(e.value):"").attr("font-style","italic").attr("style",e=>{if(e.depth===0)return"display: none;";const o="text-anchor: end; dominant-baseline: middle; font-size: 10px; fill:"+L(e.data.name)+"; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")});const ee=Q.leaves(),$=ee.length>20,ie=$?16:38,X=$?14:28,P=$?4:8,H=$?4:6,J=$?2:4,te=$?8:10,U=$?1:2,Y=z.selectAll(".treemapLeafGroup").data(ee).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})`);Y.append("rect").attr("width",e=>e.x1-e.x0).attr("height",e=>e.y1-e.y0).attr("class","treemapLeaf").attr("fill",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("style",e=>h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles}).nodeStyles).attr("fill-opacity",.3).attr("stroke",e=>e.parent?S(e.parent.data.name):S(e.data.name)).attr("stroke-width",3),Y.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)),Y.append("text").attr("class","treemapLabel").attr("x",e=>(e.x1-e.x0)/2).attr("y",e=>(e.y1-e.y0)/2).attr("style",e=>{const o=`text-anchor: middle; dominant-baseline: middle; font-size: ${ie}px;fill:`+L(e.data.name)+";",g=h.styles2String({cssCompiledStyles:e.data.cssCompiledStyles});return o+g.labelStyles.replace("color:","fill:")}).attr("clip-path",(e,o)=>`url(#clip-${a}-${o})`).text(e=>e.data.name).each(function(e){const o=h.select(this),g=e.x1-e.x0,C=e.y1-e.y0,_=o.node(),T=g-2*J,D=C-2*J;if(T<te||D<te){o.style("display","none");return}let m=parseInt(o.style("font-size"),10);const N=.6;for(;_.getComputedTextLength()>T&&m>P;)m--,o.style("font-size",`${m}px`);let A=Math.max(H,Math.min(X,Math.round(m*N))),k=m+U+A;for(;k>D&&m>P&&(m--,A=Math.max(H,Math.min(X,Math.round(m*N))),!(A<H&&m===P));)o.style("font-size",`${m}px`),k=m+U+A;o.style("font-size",`${m}px`),$?(m<P||D<P)&&o.style("display","none"):(_.getComputedTextLength()>T||m<P||D<m)&&o.style("display","none")}),i.showValues!==!1&&Y.append("text").attr("class","treemapValue").attr("x",o=>(o.x1-o.x0)/2).attr("y",function(o){return(o.y1-o.y0)/2}).attr("style",o=>{const g=`text-anchor: middle; dominant-baseline: hanging; font-size: ${X}px;fill:`+L(o.data.name)+";",C=h.styles2String({cssCompiledStyles:o.data.cssCompiledStyles});return g+C.labelStyles.replace("color:","fill:")}).attr("clip-path",(o,g)=>`url(#clip-${a}-${g})`).text(o=>o.value?f(o.value):"").each(function(o){const g=h.select(this),C=this.parentNode;if(!C){g.style("display","none");return}const _=h.select(C).select(".treemapLabel");if(_.empty()||_.style("display")==="none"){g.style("display","none");return}const T=parseFloat(_.style("font-size")),m=Math.max(H,Math.min(X,Math.round(T*.6)));g.style("font-size",`${m}px`);const A=(o.y1-o.y0)/2+T/2+U;g.attr("y",A);const k=o.x1-o.x0,ae=o.y1-o.y0-4,de=k-2*J;g.node().getComputedTextLength()>de||A+m>ae||m<H?g.style("display","none"):g.style("display",null)});const oe=i.diagramPadding??8;ue.setupViewPortForSVG(w,oe,"flowchart",i?.useMaxWidth||!1)},"draw"),Xe=h.__name(function(t,a){return a.db.getClasses()},"getClasses"),Ye={draw:Ge,getClasses:Xe},je={sectionStrokeColor:"black",sectionStrokeWidth:"1",sectionFillColor:"#efefef",leafStrokeColor:"black",leafStrokeWidth:"1",leafFillColor:"#efefef",labelFontSize:"12px",valueFontSize:"10px",titleFontSize:"14px"},Je=h.__name(({treemap:t}={})=>{const a=h.getThemeVariables3(),l=h.getConfig(),n=h.cleanAndMerge(a,l.themeVariables),r=h.cleanAndMerge(je,t),i=r.titleColor??n.titleColor,d=r.labelColor??n.textColor,u=r.valueColor??n.textColor;return`
2
2
  .treemapNode.section {
3
3
  stroke: ${r.sectionStrokeColor};
4
4
  stroke-width: ${r.sectionStrokeWidth};