@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.
- package/README.md +266 -14
- package/dist/{abnfDiagram-VRR7QNED-BBmog1I4.cjs → abnfDiagram-VRR7QNED-DL9JJfMF.cjs} +1 -1
- package/dist/{abnfDiagram-VRR7QNED-IjPsliMa.js → abnfDiagram-VRR7QNED-utxwo7Ri.js} +15 -15
- package/dist/{arc-DKsAswGe.cjs → arc-BY7loL0l.cjs} +1 -1
- package/dist/{arc-E1KzF_uD.js → arc-Byq9kr_0.js} +32 -32
- package/dist/{architectureDiagram-ZJ3FMSHR-BLhnaJyB.cjs → architectureDiagram-ZJ3FMSHR-CLLwinmD.cjs} +1 -1
- package/dist/{architectureDiagram-ZJ3FMSHR-u79eEnkY.js → architectureDiagram-ZJ3FMSHR-DpnBy_s1.js} +2 -2
- package/dist/{blockDiagram-677ZJIJ3-DcCNlY_i.js → blockDiagram-677ZJIJ3-C8dybZZU.js} +3 -3
- package/dist/{blockDiagram-677ZJIJ3-D72bpMhN.cjs → blockDiagram-677ZJIJ3-Cs5tpWQ-.cjs} +1 -1
- package/dist/{c4Diagram-LMCZKHZV-Bp9asujr.js → c4Diagram-LMCZKHZV-3aG0bDyP.js} +2 -2
- package/dist/{c4Diagram-LMCZKHZV-D3d1d4zO.cjs → c4Diagram-LMCZKHZV-B-rz2a3v.cjs} +1 -1
- package/dist/{channel-DpcrO3R2.js → channel-BoXFYC1g.js} +1 -1
- package/dist/{channel-DE5LXIMm.cjs → channel-Dn2hPSB8.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-BrnUlAaZ.cjs → chunk-2Q5K7J3B-B7QkO_05.cjs} +1 -1
- package/dist/{chunk-2Q5K7J3B-OuVdfHE1.js → chunk-2Q5K7J3B-CYpyj9EA.js} +1 -1
- package/dist/{chunk-32BRIVSS-CDxbP_I9.cjs → chunk-32BRIVSS-BjI5igEa.cjs} +1 -1
- package/dist/{chunk-32BRIVSS-w8TMFT10.js → chunk-32BRIVSS-DcLe6F1l.js} +1 -1
- package/dist/{chunk-5VM5RSS4-BHG-YQpQ.js → chunk-5VM5RSS4-C4ILSCRb.js} +1 -1
- package/dist/{chunk-5VM5RSS4-C-cBAbST.cjs → chunk-5VM5RSS4-DafQyxAv.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-uKd75-FB.cjs → chunk-EX3LRPZG-BXZDK2R1.cjs} +1 -1
- package/dist/{chunk-EX3LRPZG-BNHa-x9z.js → chunk-EX3LRPZG-CTaiVHYY.js} +28 -28
- package/dist/{chunk-JWPE2WC7-DtFuVO4n.js → chunk-JWPE2WC7-B-nuuS4b.js} +1 -1
- package/dist/{chunk-JWPE2WC7-CNFRDah7.cjs → chunk-JWPE2WC7-CNZBI1Pb.cjs} +1 -1
- package/dist/{chunk-MOJQB5TN-DwJ5ntgS.js → chunk-MOJQB5TN-D1oF99aM.js} +9 -9
- package/dist/{chunk-MOJQB5TN-Bs5Jj3Zh.cjs → chunk-MOJQB5TN-Dh_1HfSC.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-DisfuynB.cjs → chunk-PUDLZKDR-CMFJFweY.cjs} +1 -1
- package/dist/{chunk-PUDLZKDR-CG9K3aEk.js → chunk-PUDLZKDR-CPadtN2C.js} +6 -6
- package/dist/{chunk-RYQCIY6F-xFTrTO6v.cjs → chunk-RYQCIY6F-C6453DQl.cjs} +1 -1
- package/dist/{chunk-RYQCIY6F-c2KNx-Ia.js → chunk-RYQCIY6F-DxuegR0d.js} +1 -1
- package/dist/{chunk-V7JOEXUC-BvkxRSjK.cjs → chunk-V7JOEXUC-l9PaMPOT.cjs} +1 -1
- package/dist/{chunk-V7JOEXUC-CA3ccBvd.js → chunk-V7JOEXUC-ziE5DrnY.js} +5 -5
- package/dist/{chunk-VR4S4FIN-Cn9aeq2_.js → chunk-VR4S4FIN-BiCYvwb8.js} +3 -3
- package/dist/{chunk-VR4S4FIN-DAwCjhU3.cjs → chunk-VR4S4FIN-CCCnXTuJ.cjs} +1 -1
- package/dist/{chunk-XXDRQBXY-pPF9BeL7.js → chunk-XXDRQBXY-BFKT7vFo.js} +1 -1
- package/dist/{chunk-XXDRQBXY-B7vX1DJv.cjs → chunk-XXDRQBXY-D5IbqpUM.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-BxIt89EK.cjs → classDiagram-OUVF2IWQ-C1AZm4pB.cjs} +1 -1
- package/dist/{classDiagram-v2-EOCWNBFH-MQ0VQAsx.js → classDiagram-OUVF2IWQ-KA_F_TBQ.js} +2 -2
- package/dist/{classDiagram-v2-EOCWNBFH-BxIt89EK.cjs → classDiagram-v2-EOCWNBFH-C1AZm4pB.cjs} +1 -1
- package/dist/{classDiagram-OUVF2IWQ-MQ0VQAsx.js → classDiagram-v2-EOCWNBFH-KA_F_TBQ.js} +2 -2
- package/dist/components/MarkdownRenderer.d.ts +9 -2
- package/dist/components/MarkdownViewer.d.ts +19 -35
- package/dist/components/MermaidDiagram.d.ts +4 -0
- package/dist/components/NodesRenderer.d.ts +2 -1
- package/dist/components/TableOfContents.d.ts +14 -4
- package/dist/components/embeds.d.ts +30 -0
- package/dist/components/htmlSanitizer.d.ts +21 -0
- package/dist/components/labels.d.ts +12 -0
- package/dist/components/links.d.ts +18 -0
- package/dist/components/mathRendering.d.ts +11 -0
- package/dist/components/mdastNodes/HTMLBlockContainerNode.d.ts +3 -2
- package/dist/components/mdastNodes/HTMLNode.d.ts +1 -1
- package/dist/components/mdastNodes/MathNode.d.ts +10 -0
- package/dist/components/mdastNodes/TwitterEmbedNode.d.ts +3 -2
- package/dist/components/mdastNodes/YouTubeEmbedNode.d.ts +4 -2
- package/dist/components/mermaidInteraction.d.ts +1 -4
- package/dist/components/mermaidLabels.d.ts +19 -0
- package/dist/components/plugins/DifyIFramePlugin.d.ts +2 -6
- package/dist/components/plugins/IFramePluginRegistry.d.ts +6 -4
- package/dist/components/rawHtml.d.ts +13 -0
- package/dist/components/toolbarOverlap.d.ts +17 -0
- package/dist/components/viewerLabels.d.ts +31 -0
- package/dist/{cose-bilkent-JH36ORCC-BzL-a0Zv.cjs → cose-bilkent-JH36ORCC-BQ2K2GyI.cjs} +1 -1
- package/dist/{cose-bilkent-JH36ORCC-ukc_ZtcU.js → cose-bilkent-JH36ORCC-B_16TV-v.js} +1 -1
- package/dist/css/details.css +7 -0
- package/dist/css/fonts/KaTeX_AMS-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_AMS-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-BoldItalic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-BoldItalic.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-Italic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-Italic.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Main-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Main-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Math-BoldItalic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Math-BoldItalic.woff +0 -0
- package/dist/css/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Math-Italic.ttf +0 -0
- package/dist/css/fonts/KaTeX_Math-Italic.woff +0 -0
- package/dist/css/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Bold.ttf +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Bold.woff +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Italic.ttf +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Italic.woff +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Script-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Script-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size1-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size1-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size2-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size2-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size3-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size3-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Size4-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Size4-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/css/fonts/KaTeX_Typewriter-Regular.ttf +0 -0
- package/dist/css/fonts/KaTeX_Typewriter-Regular.woff +0 -0
- package/dist/css/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/css/github-markdown.css +23 -0
- package/dist/css/katex.min.css +1 -1129
- package/dist/css/message.css +2 -0
- package/dist/css/zenn-content.css +14 -0
- package/dist/{cynefinDiagram-TSTJHNR4-C1GqR9hq.js → cynefinDiagram-TSTJHNR4-DTV6ORFc.js} +23 -23
- package/dist/{cynefinDiagram-TSTJHNR4-B1lNDIu_.cjs → cynefinDiagram-TSTJHNR4-Dq7UoRYB.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-COYURQTh.cjs → dagre-VKFMJZFB-PCi8s-PP.cjs} +1 -1
- package/dist/{dagre-VKFMJZFB-DpiBVdXS.js → dagre-VKFMJZFB-kSrm5dp4.js} +12 -12
- package/dist/{diagram-FQU43EPY-CVw420ny.js → diagram-FQU43EPY-D3dKlAPv.js} +2 -2
- package/dist/{diagram-FQU43EPY-DkgdwwAT.cjs → diagram-FQU43EPY-wTUTIyQQ.cjs} +1 -1
- package/dist/{diagram-G47NLZAW-cr36B9DD.js → diagram-G47NLZAW-HJlhMCYj.js} +131 -131
- package/dist/{diagram-G47NLZAW-CcXcBx81.cjs → diagram-G47NLZAW-_4FrgCGJ.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-BMYzS0pm.cjs → diagram-NH7WQ7WH-ByCeah-n.cjs} +1 -1
- package/dist/{diagram-NH7WQ7WH-CoL7cXmX.js → diagram-NH7WQ7WH-CgeHmdJL.js} +11 -11
- package/dist/{diagram-OA4YK3LP-DSeI6RLe.cjs → diagram-OA4YK3LP-C0IhePjD.cjs} +1 -1
- package/dist/{diagram-OA4YK3LP-DRAbN1oy.js → diagram-OA4YK3LP-CwJcZGHD.js} +57 -57
- package/dist/{diagram-WEI45ONY-CCJwQ42c.cjs → diagram-WEI45ONY-Cf-TVNEb.cjs} +1 -1
- package/dist/{diagram-WEI45ONY-CxkNlW0N.js → diagram-WEI45ONY-v1LUmWAx.js} +11 -11
- package/dist/{ebnfDiagram-CCIWWBDH-PADFa1z_.js → ebnfDiagram-CCIWWBDH-DqZtnwGP.js} +5 -5
- package/dist/{ebnfDiagram-CCIWWBDH-D_nz1FvR.cjs → ebnfDiagram-CCIWWBDH-k5XOUGml.cjs} +1 -1
- package/dist/{erDiagram-Q63AITRT-DFD27ud_.js → erDiagram-Q63AITRT-D6kP6d5J.js} +4 -4
- package/dist/{erDiagram-Q63AITRT-2r-lfgSt.cjs → erDiagram-Q63AITRT-DFet1VTy.cjs} +1 -1
- package/dist/{extractHeadings-BUHj1PcO.js → extractHeadings-B2I83li5.js} +6326 -5913
- package/dist/{extractHeadings-BrLI2qQF.cjs → extractHeadings-R7NxLZJP.cjs} +71 -71
- package/dist/flowDiagram-23GEKE2U-BTXvBdte.js +7 -0
- package/dist/flowDiagram-23GEKE2U-C81VZYM7.cjs +1 -0
- package/dist/{ganttDiagram-NO4QXBWP-CNhgpKSH.cjs → ganttDiagram-NO4QXBWP-CEQqLRYx.cjs} +1 -1
- package/dist/{ganttDiagram-NO4QXBWP-CmV2JOI4.js → ganttDiagram-NO4QXBWP-I9DxJwkX.js} +2 -2
- package/dist/gen/markdown/v1/markdown_pb.d.ts +14 -0
- package/dist/{gitGraphDiagram-IHSO6WYX-D6YozD-Z.js → gitGraphDiagram-IHSO6WYX-p_7WQssC.js} +3 -3
- package/dist/{gitGraphDiagram-IHSO6WYX-D5IYosEF.cjs → gitGraphDiagram-IHSO6WYX-yyEwsmHH.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.client.cjs +1 -1
- package/dist/index.client.d.ts +6 -2
- package/dist/index.client.js +39 -35
- package/dist/index.js +39 -35
- package/dist/index.server.cjs +1 -1
- package/dist/index.server.d.ts +1 -1
- package/dist/index.server.js +258 -170
- package/dist/{infoDiagram-FWYZ7A6U-U2OiliOP.cjs → infoDiagram-FWYZ7A6U-BFCkTfAI.cjs} +1 -1
- package/dist/{infoDiagram-FWYZ7A6U-Jthjyrbt.js → infoDiagram-FWYZ7A6U-C9L5rIcg.js} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-DK3M6wrz.cjs → ishikawaDiagram-FXEZZL3T-B3TjOzka.cjs} +1 -1
- package/dist/{ishikawaDiagram-FXEZZL3T-CWrHeeTL.js → ishikawaDiagram-FXEZZL3T-uxcpJtLF.js} +20 -20
- package/dist/{journeyDiagram-5HDEW3XC-B-BfhPr4.cjs → journeyDiagram-5HDEW3XC-CvtPgaNR.cjs} +1 -1
- package/dist/{journeyDiagram-5HDEW3XC-GOWrusc2.js → journeyDiagram-5HDEW3XC-DMq3piuW.js} +4 -4
- package/dist/{kanban-definition-HUTT4EX6-BvnLv2HN.cjs → kanban-definition-HUTT4EX6-DJ9sXiRP.cjs} +1 -1
- package/dist/{kanban-definition-HUTT4EX6-BebMuVhZ.js → kanban-definition-HUTT4EX6-Dfal8jdL.js} +34 -34
- package/dist/{linear-B9JMAP1U.cjs → linear-CLykHvhQ.cjs} +1 -1
- package/dist/{linear-BdCaKB6J.js → linear-CvzPdVAO.js} +12 -12
- package/dist/markdown.css +1 -1
- package/dist/{mindmap-definition-LN4V7U3C-ChJ71VGh.js → mindmap-definition-LN4V7U3C-C8erO2Mh.js} +20 -20
- package/dist/{mindmap-definition-LN4V7U3C-asDDR5DU.cjs → mindmap-definition-LN4V7U3C-CErimIK1.cjs} +1 -1
- package/dist/{pegDiagram-2B236MQR-BO1fCXl7.js → pegDiagram-2B236MQR-CECcXaCN.js} +5 -5
- package/dist/{pegDiagram-2B236MQR-C3qJlDiV.cjs → pegDiagram-2B236MQR-DBL8X0k9.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-D5-meW-_.cjs → pieDiagram-ENE6RG2P-B_-x0Nvj.cjs} +1 -1
- package/dist/{pieDiagram-ENE6RG2P-fYjP8dvh.js → pieDiagram-ENE6RG2P-CWlf16nv.js} +41 -41
- package/dist/{quadrantDiagram-ABIIQ3AL-CmqrHJ4C.cjs → quadrantDiagram-ABIIQ3AL-HKlopKX4.cjs} +1 -1
- package/dist/{quadrantDiagram-ABIIQ3AL-CKeeL3uz.js → quadrantDiagram-ABIIQ3AL-JpouSW89.js} +2 -2
- package/dist/{railroadDiagram-RFXS5EU6-a-pSoUg2.cjs → railroadDiagram-RFXS5EU6-B-v61EFn.cjs} +1 -1
- package/dist/{railroadDiagram-RFXS5EU6-D7OWpbvJ.js → railroadDiagram-RFXS5EU6-CLTBEsir.js} +3 -3
- package/dist/remarkProcessor.server.d.ts +11 -1
- package/dist/{requirementDiagram-TGXJPOKE-BaKLflmx.cjs → requirementDiagram-TGXJPOKE-4vCejkrF.cjs} +1 -1
- package/dist/{requirementDiagram-TGXJPOKE-C5_kJLGy.js → requirementDiagram-TGXJPOKE-DtoTpDLe.js} +3 -3
- package/dist/{sankeyDiagram-HTMAVEWB-DuUzdIP0.cjs → sankeyDiagram-HTMAVEWB-Bp8p_ojk.cjs} +1 -1
- package/dist/{sankeyDiagram-HTMAVEWB-IdJ3gjdw.js → sankeyDiagram-HTMAVEWB-WxnjUz1I.js} +20 -20
- package/dist/{sequenceDiagram-DBY2YBRQ-B29fl34a.cjs → sequenceDiagram-DBY2YBRQ-BUPaWSIG.cjs} +1 -1
- package/dist/{sequenceDiagram-DBY2YBRQ-B_lxtRfw.js → sequenceDiagram-DBY2YBRQ-DGJcC2MQ.js} +3 -3
- package/dist/{sizeCapture-X5ZJPWSS-Dc9QwSOp.js → sizeCapture-X5ZJPWSS-BmP0pJAx.js} +1 -1
- package/dist/{sizeCapture-X5ZJPWSS-DAiqtb_j.cjs → sizeCapture-X5ZJPWSS-Dk82fAT8.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-BXIH2aOp.cjs → stateDiagram-2N3HPSRC-CL5Omkqs.cjs} +1 -1
- package/dist/{stateDiagram-2N3HPSRC-Wu5OaQhD.js → stateDiagram-2N3HPSRC-ZL_eFTbb.js} +9 -9
- package/dist/{stateDiagram-v2-6OUMAXLB-BfTH3hZ6.js → stateDiagram-v2-6OUMAXLB-BgOqjiSL.js} +2 -2
- package/dist/{stateDiagram-v2-6OUMAXLB-8XTokhrn.cjs → stateDiagram-v2-6OUMAXLB-D3Zgp8xl.cjs} +1 -1
- package/dist/styles/markdown.css +1 -1
- package/dist/{swimlanes-5IMT3BWC-BnT290KL.cjs → swimlanes-5IMT3BWC-CuW1KWfs.cjs} +1 -1
- package/dist/{swimlanes-5IMT3BWC-CcYHrJAC.js → swimlanes-5IMT3BWC-GB1p75ou.js} +3 -3
- package/dist/{swimlanesDiagram-G3AALYLV-CAEjADeH.cjs → swimlanesDiagram-G3AALYLV-Di_Nug7g.cjs} +1 -1
- package/dist/{swimlanesDiagram-G3AALYLV-CxHkefqm.js → swimlanesDiagram-G3AALYLV-Jr2ZWz3z.js} +2 -2
- package/dist/{timeline-definition-FHXFAJF6-BjbG4nbM.js → timeline-definition-FHXFAJF6-663e-yVA.js} +34 -34
- package/dist/{timeline-definition-FHXFAJF6-Dqdftl5b.cjs → timeline-definition-FHXFAJF6-BKVe7Qad.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-BxjgXNwH.cjs → vennDiagram-L72KCM5P-2NIIKtsl.cjs} +1 -1
- package/dist/{vennDiagram-L72KCM5P-DnlkQHn-.js → vennDiagram-L72KCM5P-BDGC8Vm3.js} +55 -55
- package/dist/viewer-settings.cjs +1 -0
- package/dist/viewer-settings.d.ts +9 -0
- package/dist/viewer-settings.js +7 -0
- package/dist/{wardleyDiagram-EHGQE667-CurWRCjn.cjs → wardleyDiagram-EHGQE667-BrTNZSmG.cjs} +1 -1
- package/dist/{wardleyDiagram-EHGQE667-2T71AdlP.js → wardleyDiagram-EHGQE667-IbGr9hGV.js} +27 -27
- package/dist/{xychartDiagram-FW5EYKEG-DZCKaSum.js → xychartDiagram-FW5EYKEG-CbxKOQYO.js} +23 -23
- package/dist/{xychartDiagram-FW5EYKEG-D0ltrZo8.cjs → xychartDiagram-FW5EYKEG-MCkmgF8g.cjs} +1 -1
- package/package.json +17 -11
- package/dist/flowDiagram-23GEKE2U-BVLgnxZW.js +0 -7
- package/dist/flowDiagram-23GEKE2U-D3w55eDA.cjs +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { p as ge } from "./chunk-JWPE2WC7-
|
|
2
|
-
import { _ as w,
|
|
3
|
-
import { s as Ne } from "./chunk-VR4S4FIN-
|
|
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],
|
|
24
|
-
if (t.call(a, l, ++h, this),
|
|
25
|
-
for (i =
|
|
26
|
-
n.push(
|
|
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],
|
|
31
|
-
if (
|
|
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 =
|
|
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,
|
|
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
|
|
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
|
|
56
|
-
for (var a = this, 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
|
|
59
|
-
n.splice(
|
|
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
|
|
62
|
+
function We(t, a) {
|
|
63
63
|
if (t === a) return t;
|
|
64
|
-
var l = t.ancestors(), n = a.ancestors(),
|
|
64
|
+
var l = t.ancestors(), n = a.ancestors(), s = null;
|
|
65
65
|
for (t = l.pop(), a = n.pop(); t === a; )
|
|
66
|
-
|
|
67
|
-
return
|
|
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,
|
|
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 (
|
|
95
|
-
l.push(n[
|
|
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 =
|
|
100
|
-
for (var l = new
|
|
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
|
-
|
|
104
|
-
return l.eachBefore(
|
|
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
|
|
109
|
+
function je(t) {
|
|
110
110
|
return t.children;
|
|
111
111
|
}
|
|
112
|
-
function
|
|
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
|
|
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
|
|
124
|
+
function Z(t) {
|
|
125
125
|
this.data = t, this.depth = this.height = 0, this.parent = null;
|
|
126
126
|
}
|
|
127
|
-
|
|
128
|
-
constructor:
|
|
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:
|
|
136
|
-
path:
|
|
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
|
|
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,
|
|
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 =
|
|
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,
|
|
164
|
-
for (var i = t.children, h, d = -1, g = i.length, c = t.value && (
|
|
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,
|
|
169
|
-
for (var h = [], d = a.children, g, c, u = 0, b = 0,
|
|
170
|
-
x =
|
|
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 <
|
|
174
|
-
for (y = N = p,
|
|
175
|
-
if (p += c = d[b].value, c < y && (y = c), c > N && (N = c), _ = p * p *
|
|
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 =
|
|
179
|
+
z = $;
|
|
180
180
|
}
|
|
181
|
-
h.push(g = { value: p, dice: x < S, children: d.slice(u, b) }), g.dice ? Ke(g, l, n,
|
|
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,
|
|
187
|
-
at(a, n,
|
|
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,
|
|
195
|
-
function u(
|
|
196
|
-
return
|
|
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(
|
|
199
|
-
var x = r
|
|
200
|
-
p < S && (S = p = (S + p) / 2), y < v && (v = y = (v + y) / 2),
|
|
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(
|
|
203
|
-
return arguments.length ? (a = !!
|
|
204
|
-
}, u.size = function(
|
|
205
|
-
return arguments.length ? (l = +
|
|
206
|
-
}, u.tile = function(
|
|
207
|
-
return arguments.length ? (t =
|
|
208
|
-
}, u.padding = function(
|
|
209
|
-
return arguments.length ? u.paddingInner(
|
|
210
|
-
}, u.paddingInner = function(
|
|
211
|
-
return arguments.length ? (i = typeof
|
|
212
|
-
}, u.paddingOuter = function(
|
|
213
|
-
return arguments.length ? u.paddingTop(
|
|
214
|
-
}, u.paddingTop = function(
|
|
215
|
-
return arguments.length ? (h = typeof
|
|
216
|
-
}, u.paddingRight = function(
|
|
217
|
-
return arguments.length ? (d = typeof
|
|
218
|
-
}, u.paddingBottom = function(
|
|
219
|
-
return arguments.length ? (g = typeof
|
|
220
|
-
}, u.paddingLeft = function(
|
|
221
|
-
return arguments.length ? (c = typeof
|
|
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
|
|
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 =
|
|
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 =
|
|
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: [] },
|
|
246
|
-
|
|
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(
|
|
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
|
|
265
|
+
const s = {
|
|
266
266
|
name: n.name,
|
|
267
267
|
children: n.type === "Leaf" ? void 0 : []
|
|
268
268
|
};
|
|
269
|
-
for (
|
|
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(
|
|
272
|
+
a.push(s);
|
|
273
273
|
else {
|
|
274
274
|
const i = l[l.length - 1].node;
|
|
275
|
-
i.children ? i.children.push(
|
|
275
|
+
i.children ? i.children.push(s) : i.children = [s];
|
|
276
276
|
}
|
|
277
|
-
n.type !== "Leaf" && l.push({ node:
|
|
277
|
+
n.type !== "Leaf" && l.push({ node: s, level: n.level });
|
|
278
278
|
}), a;
|
|
279
279
|
}
|
|
280
280
|
w(ce, "buildHierarchy");
|
|
281
|
-
var
|
|
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 =
|
|
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),
|
|
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 &&
|
|
302
|
+
a.addNode(d, h), d.children && d.children.length > 0 && s(d.children, h + 1);
|
|
303
303
|
}, "addNodesRecursively");
|
|
304
|
-
|
|
305
|
-
}, "populate"),
|
|
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
|
-
|
|
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,
|
|
323
|
-
const
|
|
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),
|
|
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
|
-
]),
|
|
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"),
|
|
388
|
-
(e) => e.children && e.children.length > 0 ? X +
|
|
389
|
-
).paddingInner(h).paddingLeft((e) => e.children && e.children.length > 0 ?
|
|
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:" +
|
|
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,
|
|
405
|
+
const C = e.x1 - e.x0, L = 6;
|
|
406
406
|
let T;
|
|
407
|
-
i.showValues !== !1 && e.value ? T = C - 10 - 30 - 10 -
|
|
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:" +
|
|
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
|
|
427
|
-
|
|
428
|
-
const o = `text-anchor: middle; dominant-baseline: middle; font-size: ${ue}px;fill:` +
|
|
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,
|
|
432
|
-
if (T <
|
|
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 (;
|
|
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(
|
|
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(
|
|
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") : (
|
|
450
|
-
}), i.showValues !== !1 &&
|
|
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: ${
|
|
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
|
|
462
|
-
if (
|
|
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(
|
|
466
|
+
const T = parseFloat(L.style("font-size")), m = Math.max(
|
|
467
467
|
I,
|
|
468
|
-
Math.min(
|
|
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 *
|
|
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),
|
|
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: ${
|
|
497
|
-
stroke-width: ${
|
|
498
|
-
fill: ${
|
|
496
|
+
stroke: ${s.sectionStrokeColor};
|
|
497
|
+
stroke-width: ${s.sectionStrokeWidth};
|
|
498
|
+
fill: ${s.sectionFillColor};
|
|
499
499
|
}
|
|
500
500
|
.treemapNode.leaf {
|
|
501
|
-
stroke: ${
|
|
502
|
-
stroke-width: ${
|
|
503
|
-
fill: ${
|
|
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: ${
|
|
507
|
+
font-size: ${s.labelFontSize};
|
|
508
508
|
}
|
|
509
509
|
.treemapValue {
|
|
510
510
|
fill: ${d};
|
|
511
|
-
font-size: ${
|
|
511
|
+
font-size: ${s.valueFontSize};
|
|
512
512
|
}
|
|
513
513
|
.treemapTitle {
|
|
514
514
|
fill: ${i};
|
|
515
|
-
font-size: ${
|
|
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};
|