@cagent/chat-embedding-core 0.0.12 → 0.0.14
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/.env +6 -0
- package/README.md +213 -213
- package/bun.lock +1548 -1548
- package/dist/abnfDiagram-VRR7QNED-3cfb3856.js +1 -0
- package/dist/abnfDiagram-VRR7QNED-686410b0.js +1 -0
- package/dist/abnfDiagram-VRR7QNED-fb22812d.js +1 -0
- package/dist/api/chatRoom.d.ts.map +1 -0
- package/dist/arc-24dd4755.js +1 -0
- package/dist/arc-5d6257cf.js +1 -0
- package/dist/arc-90e71e7e.js +1 -0
- package/dist/architecture-TIHT7OUA-a997f441.js +1 -0
- package/dist/architecture-TIHT7OUA-faa1f9b3.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-87443299.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-93988e41.js +1 -0
- package/dist/architectureDiagram-ZJ3FMSHR-bde2dd21.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-25a94a47.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-88bd543c.js +1 -0
- package/dist/blockDiagram-677ZJIJ3-c769a3c8.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-763880d7.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-d7fc839e.js +1 -0
- package/dist/c4Diagram-LMCZKHZV-da04a76e.js +1 -0
- package/dist/channel-11d3f4bc.js +1 -0
- package/dist/channel-534c2e17.js +1 -0
- package/dist/channel-c3cf6060.js +1 -0
- package/dist/chunk-2Q5K7J3B-2892df89.js +1 -0
- package/dist/chunk-2Q5K7J3B-7960ff8e.js +1 -0
- package/dist/chunk-2Q5K7J3B-9497bf31.js +1 -0
- package/dist/chunk-32BRIVSS-10123eba.js +1 -0
- package/dist/chunk-32BRIVSS-10ac68f7.js +1 -0
- package/dist/chunk-32BRIVSS-8a8507a2.js +1 -0
- package/dist/chunk-5VM5RSS4-36b32f6e.js +1 -0
- package/dist/chunk-5VM5RSS4-4b2efd20.js +1 -0
- package/dist/chunk-5VM5RSS4-5fc85a49.js +1 -0
- package/dist/chunk-EX3LRPZG-36494b87.js +1 -0
- package/dist/chunk-EX3LRPZG-6cd1f2fa.js +1 -0
- package/dist/chunk-EX3LRPZG-7ac6d0d7.js +1 -0
- package/dist/chunk-JWPE2WC7-15a55950.js +1 -0
- package/dist/chunk-JWPE2WC7-84faee3d.js +1 -0
- package/dist/chunk-JWPE2WC7-e2521b1e.js +1 -0
- package/dist/chunk-MOJQB5TN-47f0392f.js +1 -0
- package/dist/chunk-MOJQB5TN-5cc2e61b.js +1 -0
- package/dist/chunk-MOJQB5TN-ea88675c.js +1 -0
- package/dist/chunk-PUDLZKDR-057ec46a.js +1 -0
- package/dist/chunk-PUDLZKDR-53309be9.js +1 -0
- package/dist/chunk-PUDLZKDR-6de50ada.js +1 -0
- package/dist/chunk-RYQCIY6F-06b096c5.js +1 -0
- package/dist/chunk-RYQCIY6F-453400cd.js +1 -0
- package/dist/chunk-RYQCIY6F-8de649c8.js +1 -0
- package/dist/chunk-V7JOEXUC-4083766f.js +1 -0
- package/dist/chunk-V7JOEXUC-4e8d7729.js +1 -0
- package/dist/chunk-V7JOEXUC-bb2df9b0.js +1 -0
- package/dist/chunk-VR4S4FIN-5feb7571.js +1 -0
- package/dist/chunk-VR4S4FIN-9df47127.js +1 -0
- package/dist/chunk-VR4S4FIN-c4f2681d.js +1 -0
- package/dist/chunk-XXDRQBXY-3c9d8bf9.js +1 -0
- package/dist/chunk-XXDRQBXY-de00e988.js +1 -0
- package/dist/chunk-XXDRQBXY-f923ffed.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-5cdf5fe6.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-d51bd736.js +1 -0
- package/dist/classDiagram-OUVF2IWQ-fc2b54d6.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-5cdf5fe6.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-d51bd736.js +1 -0
- package/dist/classDiagram-v2-EOCWNBFH-fc2b54d6.js +1 -0
- package/dist/components/Badge.d.ts.map +1 -0
- package/dist/components/Bot.d.ts.map +1 -0
- package/dist/components/FeedbackContentDialog.d.ts.map +1 -0
- package/dist/components/RoomReconnectAlert.d.ts.map +1 -0
- package/dist/components/Toast.d.ts.map +1 -0
- package/dist/components/TypingBubble.d.ts.map +1 -0
- package/dist/components/avatars/Avatar.d.ts.map +1 -0
- package/dist/components/avatars/DefaultAvatar.d.ts.map +1 -0
- package/dist/components/bubbles/AgentReasoningBubble.d.ts.map +1 -0
- package/dist/components/bubbles/BotBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartBubble.d.ts.map +1 -0
- package/dist/components/bubbles/ChartLoadingPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPlaceholder.d.ts.map +1 -0
- package/dist/components/bubbles/ChartPopupModal.d.ts.map +1 -0
- package/dist/components/bubbles/FollowUpPromptBubble.d.ts.map +1 -0
- package/dist/components/bubbles/GuestBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LeadCaptureBubble.d.ts.map +1 -0
- package/dist/components/bubbles/LoadingBubble.d.ts.map +1 -0
- package/dist/components/bubbles/SourceBubble.d.ts.map +1 -0
- package/dist/components/bubbles/StableChartWrapper.d.ts.map +1 -0
- package/dist/components/bubbles/StarterPromptBubble.d.ts.map +1 -0
- package/dist/components/buttons/AttachmentUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/CancelButton.d.ts.map +1 -0
- package/dist/components/buttons/CopyMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/EditMessageButton.d.ts.map +1 -0
- package/dist/components/buttons/FeedbackButtons.d.ts.map +1 -0
- package/dist/components/buttons/ImageUploadButton.d.ts.map +1 -0
- package/dist/components/buttons/LeadCaptureButtons.d.ts.map +1 -0
- package/dist/components/buttons/PopupToast.d.ts.map +1 -0
- package/dist/components/buttons/RecordAudioButton.d.ts.map +1 -0
- package/dist/components/buttons/SendButton.d.ts.map +1 -0
- package/dist/components/dialogs/EditMessageDialog.d.ts.map +1 -0
- package/dist/components/icons/AddImageIcon.d.ts.map +1 -0
- package/dist/components/icons/AttachmentIcon.d.ts.map +1 -0
- package/dist/components/icons/CheckIcon.d.ts.map +1 -0
- package/dist/components/icons/CircleDotIcon.d.ts.map +1 -0
- package/dist/components/icons/ClipboardIcon.d.ts.map +1 -0
- package/dist/components/icons/CopyIcon.d.ts.map +1 -0
- package/dist/components/icons/DeleteIcon.d.ts.map +1 -0
- package/dist/components/icons/EditIcon.d.ts.map +1 -0
- package/dist/components/icons/FullScreenIcon.d.ts.map +1 -0
- package/dist/components/icons/RecordIcon.d.ts.map +1 -0
- package/dist/components/icons/ResetZoomIcon.d.ts.map +1 -0
- package/dist/components/icons/SendIcon.d.ts.map +1 -0
- package/dist/components/icons/SparklesIcon.d.ts.map +1 -0
- package/dist/components/icons/StopIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsDownIcon.d.ts.map +1 -0
- package/dist/components/icons/ThumbsUpIcon.d.ts.map +1 -0
- package/dist/components/icons/TickIcon.d.ts.map +1 -0
- package/dist/components/icons/TrashIcon.d.ts.map +1 -0
- package/dist/components/icons/XIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomInIcon.d.ts.map +1 -0
- package/dist/components/icons/ZoomOutIcon.d.ts.map +1 -0
- package/dist/components/icons/index.d.ts.map +1 -0
- package/dist/components/image/PreviewImage.d.ts.map +1 -0
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/FilePreview.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/ShortTextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/components/TextInput.d.ts.map +1 -0
- package/dist/components/inputs/textInput/index.d.ts.map +1 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/cose-bilkent-JH36ORCC-ac4d2e28.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-c3560feb.js +1 -0
- package/dist/cose-bilkent-JH36ORCC-f0ddc3e7.js +1 -0
- package/dist/cynefin-VYW2F7L2-2458ad91.js +1 -0
- package/dist/cynefin-VYW2F7L2-a8648cf6.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-62a29383.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-910b3dfd.js +1 -0
- package/dist/cynefinDiagram-TSTJHNR4-deb0bb2c.js +1 -0
- package/dist/cytoscape.esm-56d2239f.js +1 -0
- package/dist/cytoscape.esm-c9352dc8.js +1 -0
- package/dist/dagre-VKFMJZFB-1467d0af.js +1 -0
- package/dist/dagre-VKFMJZFB-35daad97.js +1 -0
- package/dist/dagre-VKFMJZFB-c5b9a4a0.js +1 -0
- package/dist/defaultLocale-b4977250.js +1 -0
- package/dist/defaultLocale-e35a4def.js +1 -0
- package/dist/diagram-FQU43EPY-41eed431.js +1 -0
- package/dist/diagram-FQU43EPY-613e9e4e.js +1 -0
- package/dist/diagram-FQU43EPY-d256050e.js +1 -0
- package/dist/diagram-G47NLZAW-813bbb70.js +1 -0
- package/dist/diagram-G47NLZAW-8ef917d1.js +1 -0
- package/dist/diagram-G47NLZAW-aa02607c.js +1 -0
- package/dist/diagram-NH7WQ7WH-0af7a921.js +1 -0
- package/dist/diagram-NH7WQ7WH-0e4f7f17.js +1 -0
- package/dist/diagram-NH7WQ7WH-6f91f6aa.js +1 -0
- package/dist/diagram-OA4YK3LP-0fba2475.js +1 -0
- package/dist/diagram-OA4YK3LP-587273f4.js +1 -0
- package/dist/diagram-OA4YK3LP-6cbfc7a5.js +1 -0
- package/dist/diagram-WEI45ONY-0241463f.js +1 -0
- package/dist/diagram-WEI45ONY-dd634033.js +1 -0
- package/dist/diagram-WEI45ONY-e002e844.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-20ac4ba3.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-e9974165.js +1 -0
- package/dist/ebnfDiagram-CCIWWBDH-ead44055.js +1 -0
- package/dist/erDiagram-Q63AITRT-1febb8fc.js +1 -0
- package/dist/erDiagram-Q63AITRT-4ea4b93d.js +1 -0
- package/dist/erDiagram-Q63AITRT-bcb00855.js +1 -0
- package/dist/eventmodeling-45OFAUF4-a82f1f18.js +1 -0
- package/dist/eventmodeling-45OFAUF4-dcf667fc.js +1 -0
- package/dist/features/bubble/components/Bubble.d.ts.map +1 -0
- package/dist/features/bubble/components/BubbleButton.d.ts.map +1 -0
- package/dist/features/bubble/components/Tooltip.d.ts.map +1 -0
- package/dist/features/bubble/components/index.d.ts.map +1 -0
- package/dist/features/bubble/index.d.ts.map +1 -0
- package/dist/features/bubble/types.d.ts.map +1 -0
- package/dist/features/full/components/Full.d.ts.map +1 -0
- package/dist/features/full/components/index.d.ts.map +1 -0
- package/dist/features/full/index.d.ts.map +1 -0
- package/dist/features/popup/components/DisclaimerPopup.d.ts.map +1 -0
- package/dist/features/popup/components/Popup.d.ts.map +1 -0
- package/dist/features/popup/components/index.d.ts.map +1 -0
- package/dist/features/popup/index.d.ts.map +1 -0
- package/dist/features/popup/types.d.ts.map +1 -0
- package/dist/flowDiagram-23GEKE2U-14ee2b3c.js +1 -0
- package/dist/flowDiagram-23GEKE2U-7ab9c2e4.js +1 -0
- package/dist/flowDiagram-23GEKE2U-f7309569.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-249a167d.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-bd530d12.js +1 -0
- package/dist/ganttDiagram-NO4QXBWP-e5e495d6.js +1 -0
- package/dist/gitGraph-TEB2WS4Q-72ba3362.js +1 -0
- package/dist/gitGraph-TEB2WS4Q-d07b15b3.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-2964ff91.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-4d9324ad.js +1 -0
- package/dist/gitGraphDiagram-IHSO6WYX-97bf868b.js +1 -0
- package/dist/graph-0df36b9d.js +1 -0
- package/dist/graph-c6801890.js +1 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/info-DKCQHKI2-d8e8a901.js +1 -0
- package/dist/info-DKCQHKI2-dd69502c.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-1267309e.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-5b9d28af.js +1 -0
- package/dist/infoDiagram-FWYZ7A6U-cc33afe4.js +1 -0
- package/dist/init-b029a625.js +1 -0
- package/dist/init-cf76ae07.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-3f0977e8.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-89c1b2f4.js +1 -0
- package/dist/ishikawaDiagram-FXEZZL3T-9fef4653.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-563a68ff.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-c8c8d701.js +1 -0
- package/dist/journeyDiagram-5HDEW3XC-e6c5e84b.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-3719e367.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-7bc0cd1e.js +1 -0
- package/dist/kanban-definition-HUTT4EX6-d8b002e3.js +1 -0
- package/dist/katex-67456a45.js +1 -0
- package/dist/katex-b134d23c.js +1 -0
- package/dist/layout-e44354bf.js +1 -0
- package/dist/layout-ff5d33a1.js +1 -0
- package/dist/linear-7b1a23f3.js +1 -0
- package/dist/linear-d7ad6d25.js +1 -0
- package/dist/linear-e5c99c88.js +1 -0
- package/dist/map-05f0ff95.js +1 -0
- package/dist/map-d3292a5b.js +1 -0
- package/dist/mermaid-parser.core-6df0beec.js +1 -0
- package/dist/mermaid-parser.core-d8d1c2b9.js +1 -0
- package/dist/mermaid.core-2d237a1e.js +1 -0
- package/dist/mermaid.core-70d5aead.js +1 -0
- package/dist/mermaid.core-8797d6a9.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-04a12a88.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-86a890ce.js +1 -0
- package/dist/mindmap-definition-LN4V7U3C-f495948c.js +1 -0
- package/dist/ordinal-221e41d7.js +1 -0
- package/dist/ordinal-4a51e46c.js +1 -0
- package/dist/packet-7NZHBO7P-b4586e10.js +1 -0
- package/dist/packet-7NZHBO7P-f62750ff.js +1 -0
- package/dist/pegDiagram-2B236MQR-234fe6d1.js +1 -0
- package/dist/pegDiagram-2B236MQR-2826e278.js +1 -0
- package/dist/pegDiagram-2B236MQR-64eeb662.js +1 -0
- package/dist/pie-RZYD4A2V-106ba3d7.js +1 -0
- package/dist/pie-RZYD4A2V-752eda00.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-0c3b09b8.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-3fb5f734.js +1 -0
- package/dist/pieDiagram-ENE6RG2P-af928526.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-1a55c0f5.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-3d15c26d.js +1 -0
- package/dist/quadrantDiagram-ABIIQ3AL-9110fa9c.js +1 -0
- package/dist/queries/sendMessageQuery.d.ts.map +1 -0
- package/dist/radar-I7S5WNFK-53bde9ff.js +1 -0
- package/dist/radar-I7S5WNFK-87e8c5ba.js +1 -0
- package/dist/railroad-3IZDKUUU-99427b9f.js +1 -0
- package/dist/railroad-3IZDKUUU-9e29587d.js +1 -0
- package/dist/railroad-abnf-AHOZXSZD-1d11cb5b.js +1 -0
- package/dist/railroad-abnf-AHOZXSZD-c27db0bc.js +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-38dff87c.js +1 -0
- package/dist/railroad-ebnf-EBAXGLYW-6bb5de0c.js +1 -0
- package/dist/railroad-peg-LSFZ7HO6-c9f0aa71.js +1 -0
- package/dist/railroad-peg-LSFZ7HO6-efcb0a43.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-14373a87.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-ec9e696e.js +1 -0
- package/dist/railroadDiagram-RFXS5EU6-effa5611.js +1 -0
- package/dist/register.d.ts.map +1 -0
- package/dist/requirementDiagram-TGXJPOKE-3d199581.js +1 -0
- package/dist/requirementDiagram-TGXJPOKE-5a337f1a.js +1 -0
- package/dist/requirementDiagram-TGXJPOKE-a7960859.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-209eac30.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-3c852fda.js +1 -0
- package/dist/sankeyDiagram-HTMAVEWB-46aa1eb1.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-4121f7c2.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-7bad18e4.js +1 -0
- package/dist/sequenceDiagram-DBY2YBRQ-af96f48e.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-13826306.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-32e2eec7.js +1 -0
- package/dist/sizeCapture-X5ZJPWSS-a078176f.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-527374a2.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-8047e124.js +1 -0
- package/dist/stateDiagram-2N3HPSRC-ba344b5d.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-7580bf69.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-d4c58fd3.js +1 -0
- package/dist/stateDiagram-v2-6OUMAXLB-e5921044.js +1 -0
- package/dist/store/constant.d.ts.map +1 -0
- package/dist/swimlanes-5IMT3BWC-5834b232.js +1 -0
- package/dist/swimlanes-5IMT3BWC-791a3547.js +1 -0
- package/dist/swimlanes-5IMT3BWC-db2c593a.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-36c30eec.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-89220ddd.js +1 -0
- package/dist/swimlanesDiagram-G3AALYLV-b621330d.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-0482a67a.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-1d165a67.js +1 -0
- package/dist/timeline-definition-FHXFAJF6-f9600b97.js +1 -0
- package/dist/treeView-QDETBFTQ-0ecf20cd.js +1 -0
- package/dist/treeView-QDETBFTQ-96ed8e2f.js +1 -0
- package/dist/treemap-6X3UGDF4-0a7f19ca.js +1 -0
- package/dist/treemap-6X3UGDF4-9f498e0c.js +1 -0
- package/dist/types/chart.d.ts.map +1 -0
- package/dist/types.d.ts +1 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/utils/audioRecording.d.ts.map +1 -0
- package/dist/utils/chartInstanceManager.d.ts.map +1 -0
- package/dist/utils/chartTagParser.d.ts.map +1 -0
- package/dist/utils/chatInputHistory.d.ts.map +1 -0
- package/dist/utils/chatStreamHelper.d.ts.map +1 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/isMobileSignal.d.ts.map +1 -0
- package/dist/utils/transcriptApi.d.ts.map +1 -0
- package/dist/utils/ultimateJsonParser.d.ts.map +1 -0
- package/dist/vennDiagram-L72KCM5P-05176193.js +1 -0
- package/dist/vennDiagram-L72KCM5P-25a48393.js +1 -0
- package/dist/vennDiagram-L72KCM5P-28cffef7.js +1 -0
- package/dist/wardley-OPB4EBWU-08c5f013.js +1 -0
- package/dist/wardley-OPB4EBWU-9803a1d9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-052e6de9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-6a614fd9.js +1 -0
- package/dist/wardleyDiagram-EHGQE667-d11fe904.js +1 -0
- package/dist/web-25bb78b9.js +1 -0
- package/dist/web-753300e1.js +1 -0
- package/dist/web-c3ed22c4.js +1 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +1 -1
- package/dist/window.d.ts.map +1 -0
- package/dist/xychartDiagram-FW5EYKEG-43118b83.js +1 -0
- package/dist/xychartDiagram-FW5EYKEG-d77187fe.js +1 -0
- package/dist/xychartDiagram-FW5EYKEG-f2fac492.js +1 -0
- package/docs/chart-rendering-implementation-plan.md +565 -0
- package/package.json +86 -86
- package/server.js +477 -477
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as t}from"./chunk-5VM5RSS4-4b2efd20.js";import{aD as e,aE as r,aF as a,aG as i,aH as s,aI as n,aJ as o,aK as l,aL as c,aM as d,aN as h,aO as g,aP as y,aQ as u,aR as p,aS as x,aT as b,aU as f,aV as m,aW as w,aX as k,aY as S,aZ as L,a_ as _,a$ as v,_ as E,l as T,d as D,b0 as I,b1 as N,G as $,b2 as C,j as B,b3 as O,av as R,u as z,b4 as A,S as M,O as P,k as Y,v as j,C as F,T as W,e as X,i as H,b5 as U,b6 as K}from"./mermaid.core-8797d6a9.js";import{G as Z}from"./graph-c6801890.js";import{c as q}from"./channel-c3cf6060.js";import"./web-c3ed22c4.js";function V(t){if(e(t))return t;var E,T,D,I=r(t);if(!function(t){switch(r(t)){case v:case _:case L:case S:case k:case w:case m:case f:case b:case x:case p:case u:case y:case g:case h:case d:case c:case l:case o:case n:case s:case i:return!0;default:return!1}}(t))return{};if(function(t){return Array.isArray(t)}(t)){const e=Array.from(t);return 0<t.length&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}if(a(t))return new t.constructor(t.buffer,t.byteOffset,t.length);if("[object ArrayBuffer]"===I)return new ArrayBuffer(t.byteLength);if("[object DataView]"===I)return D=t.buffer,E=t.byteOffset,T=t.byteLength,N=new ArrayBuffer(T),D=new Uint8Array(D,E,T),new Uint8Array(N).set(D),new DataView(N);if("[object Boolean]"===I||"[object Number]"===I||"[object String]"===I)return("[object String]"===I?J:G)(E=new t.constructor(t.valueOf()),t),E;if("[object Date]"===I)return new Date(Number(t));if("[object RegExp]"===I)return T=t,(D=new RegExp(T.source,T.flags)).lastIndex=T.lastIndex,D;if("[object Symbol]"===I)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===I){const e=new Map;return t.forEach(((t,r)=>{e.set(r,t)})),e}if("[object Set]"===I){const e=new Set;return t.forEach((t=>{e.add(t)})),e}if("[object Arguments]"===I){var N=t;const e={};return G(e,N),e.length=N.length,e[Symbol.iterator]=N[Symbol.iterator],e}const $={};return function(t,e){var r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}($,t),G($,t),function(t,e){var r=Object.getOwnPropertySymbols(e);for(let i=0;i<r.length;i++){var a=r[i];Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}}($,t),$}function G(t,e){for(const r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}function J(t,e){var r=e.valueOf().length;for(const a in e)Object.hasOwn(e,a)&&(Number.isNaN(Number(a))||Number(a)>=r)&&(t[a]=e[a])}var Q=function(){var t=E((function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r}),"o"),e=[1,15],r=[1,7],a=[1,13],i=[1,14],s=[1,19],n=[1,16],o=[1,17],l=[1,18],c=[8,30],d=[8,10,21,28,29,30,31,39,43,46],h=[1,23],g=[1,24],y=[8,10,15,16,21,28,29,30,31,39,43,46],u=[8,10,15,16,21,27,28,29,30,31,39,43,46],p=[1,49];c={trace:E((function(){}),"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:E((function(t,e,r,a,i,s,n){var o=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[o-1]),a.setHierarchy(s[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:var l=parseInt(s[o]),c=a.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);c=a.edgeStrToEdgeData(s[o-1].edgeTypeStr),l=a.edgeStrToEdgeStartData(s[o-1].edgeTypeStr);var d=a.edgeStrToThickness(s[o-1].edgeTypeStr),h=a.edgeStrToPattern(s[o-1].edgeTypeStr);this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",thickness:d,pattern:h,directions:s[o].directions,arrowTypeEnd:c,arrowTypeStart:l},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this||"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]),a.generateId(),this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]),d=a.generateId(),this.$={id:d,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].trim()}}}),"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:e,11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{8:[1,20]},t(c,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:e,21:r,28:a,29:i,31:s,39:n,43:o,46:l}),t(d,[2,16],{14:22,15:h,16:g}),t(d,[2,17]),t(d,[2,18]),t(d,[2,19]),t(d,[2,20]),t(d,[2,21]),t(d,[2,22]),t(y,[2,25],{27:[1,25]}),t(d,[2,26]),{19:26,26:12,31:s},{10:e,11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(u,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(c,[2,13]),{26:35,31:s},{31:[2,14]},{17:[1,36]},t(y,[2,24]),{10:e,11:37,13:4,14:22,15:h,16:g,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:a,29:i,31:s,39:n,43:o,46:l},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(u,[2,30]),{18:[1,43]},{18:[1,44]},t(y,[2,23]),{18:[1,45]},{30:[1,46]},t(d,[2,28]),t(d,[2,35]),t(d,[2,36]),t(d,[2,37]),t(d,[2,38]),{36:[1,47]},{33:48,34:p},{15:[1,50]},t(d,[2,27]),t(u,[2,33]),{38:[1,51]},{33:52,34:p,38:[2,31]},{31:[2,15]},t(u,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:E((function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)}),"parseError"),parse:E((function(t){var e,r=this,a=[0],i=[],s=[null],n=[],o=this.table,l="",c=0,d=0,h=n.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(y.yy[e]=this.yy[e]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var u=g.yylloc,p=(n.push(u),g.options&&g.options.ranges);function x(){var t=i.pop()||g.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,E((function(t){a.length=a.length-2*t,s.length=s.length-t,n.length=n.length-t}),"popStack"),E(x,"lex");for(var b,f,m,w,k,S,L={};;){if(f=a[a.length-1],void 0===(m=this.defaultActions[f]||(null==b&&(b=x()),o[f]&&o[f][b]))||!m.length||!m[0]){var _,v=[];for(w in o[f])this.terminals_[w]&&2<w&&v.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:u,expected:v})}if(m[0]instanceof Array&&1<m.length)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+b);switch(m[0]){case 1:a.push(b),s.push(g.yytext),n.push(g.yylloc),a.push(m[1]),b=null,d=g.yyleng,l=g.yytext,c=g.yylineno,u=g.yylloc;break;case 2:if(k=this.productions_[m[1]][1],L.$=s[s.length-k],L._$={first_line:n[n.length-(k||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(k||1)].first_column,last_column:n[n.length-1].last_column},p&&(L._$.range=[n[n.length-(k||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(L,[l,d,c,y.yy,m[1],s,n].concat(h))))return S;k&&(a=a.slice(0,-1*k*2),s=s.slice(0,-1*k),n=n.slice(0,-1*k)),a.push(this.productions_[m[1]][0]),s.push(L.$),n.push(L._$),S=o[a[a.length-2]][a[a.length-1]],a.push(S);break;case 3:return!0}}return!0}),"parse")},e={EOF:1,parseError:E((function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)}),"parseError"),setInput:E((function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this}),"setInput"),input:E((function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t}),"input"),unput:E((function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),a=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this}),"unput"),more:E((function(){return this._more=!0,this}),"more"),reject:E((function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"reject"),less:E((function(t){this.unput(this.match.slice(t))}),"less"),pastInput:E((function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")}),"pastInput"),upcomingInput:E((function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")}),"upcomingInput"),showPosition:E((function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"}),"showPosition"),test_match:E((function(t,e){var r,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(a.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in a)this[i]=a[i];return!1}),"test_match"),next:E((function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length))if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}),"next"),lex:E((function(){return this.next()||this.lex()}),"lex"),begin:E((function(t){this.conditionStack.push(t)}),"begin"),popState:E((function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]}),"popState"),_currentRules:E((function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules}),"_currentRules"),topState:E((function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"}),"topState"),pushState:E((function(t){this.begin(t)}),"pushState"),stateStackSize:E((function(){return this.conditionStack.length}),"stateStackSize"),options:{},performAction:E((function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}}),"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};function x(){this.yy={}}return c.lexer=e,E(x,"Parser"),new((x.prototype=c).Parser=x)}(),tt=Q.parser=Q,et=new Map,rt=[],at=new Map,it="color",st="fill",nt=new Map,ot="",lt=E((t=>X.sanitizeText(t,D())),"sanitizeText"),ct=E((function(t,e=""){let r=nt.get(t);r||(r={id:t,styles:[],textStyles:[]},nt.set(t,r)),null!=e&&e.split(",").forEach((t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp(it).exec(t)&&(t=e.replace(st,"bgFill").replace(it,st),r.textStyles.push(t)),r.styles.push(e)}))}),"addStyleClass"),dt=E((function(t,e=""){t=et.get(t),null!=e&&(t.styles=e.split(","))}),"addStyle2Node"),ht=E((function(t,e){t.split(",").forEach((function(t){let r=et.get(t);void 0===r&&(r={id:t=t.trim(),type:"na",children:[]},et.set(t,r)),r.classes||(r.classes=[]),r.classes.push(e)}))}),"setCssClass"),gt=E(((t,e)=>{t=t.flat();var r=[],a=t.find((t=>"column-setting"===t?.type))?.columns??-1;for(const o of t)if("number"==typeof a&&0<a&&"column-setting"!==o.type&&"number"==typeof o.widthInColumns&&o.widthInColumns>a&&T.warn(`Block ${o.id} width ${o.widthInColumns} exceeds configured column width `+a),o.label&&(o.label=lt(o.label)),"classDef"===o.type)ct(o.id,o.css);else if("applyClass"===o.type)ht(o.id,o?.styleClass??"");else if("applyStyles"===o.type)o?.stylesStr&&dt(o.id,o?.stylesStr);else if("column-setting"===o.type)e.columns=o.columns??-1;else if("edge"===o.type){var i=(at.get(o.id)??0)+1;at.set(o.id,i),o.id=i+"-"+o.id,rt.push(o)}else if(o.label||("composite"===o.type?o.label="":o.label=o.id),void 0===(i=et.get(o.id))?et.set(o.id,o):("na"!==o.type&&(i.type=o.type),o.label!==o.id&&(i.label=o.label)),o.children&>(o.children,o),"space"===o.type){var s=o.width??1;for(let t=0;t<s;t++){var n=V(o);n.id=n.id+"-"+t,et.set(n.id,n),r.push(n)}}else void 0===i&&r.push(o);e.children=r}),"populateBlockDatabase"),yt=[],ut={id:"root",type:"composite",children:[],columns:-1},pt=E((()=>{T.debug("Clear called"),j(),ut={id:"root",type:"composite",children:[],columns:-1},et=new Map([["root",ut]]),yt=[],nt=new Map,rt=[],at=new Map,ot=""}),"clear");function xt(t){switch(T.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return T.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function bt(t){return T.debug("typeStr2Type",t),"=="!==t?"normal":"thick"}function ft(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function mt(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function wt(t){return t.includes("==")?"thick":"normal"}function kt(t){return t.includes(".-")?"dotted":"solid"}E(xt,"typeStr2Type"),E(bt,"edgeTypeStr2Type"),E(ft,"edgeStrToEdgeData"),E(mt,"edgeStrToEdgeStartData"),E(wt,"edgeStrToThickness"),E(kt,"edgeStrToPattern");var St=0,Lt=E((()=>(St++,"id-"+Math.random().toString(36).substr(2,12)+"-"+St)),"generateId"),_t=E((t=>{ut.children=t,gt(t,ut),yt=ut.children}),"setHierarchy"),vt=E((t=>(t=et.get(t))?t.columns||(t.children?t.children.length:-1):-1),"getColumns"),Et=E((()=>[...et.values()]),"getBlocksFlat"),Tt=E((()=>yt||[]),"getBlocks"),Dt=E((()=>rt),"getEdges"),It=E((t=>et.get(t)),"getBlock"),Nt=E((t=>{et.set(t.id,t)}),"setBlock"),$t=E((t=>{ot=t}),"setDiagramId"),Ct=E((()=>ot),"getDiagramId"),Bt=E((()=>T),"getLogger"),Ot=E((function(){return nt}),"getClasses"),Rt={getConfig:E((()=>$().block),"getConfig"),typeStr2Type:xt,edgeTypeStr2Type:bt,edgeStrToEdgeData:ft,edgeStrToEdgeStartData:mt,edgeStrToThickness:wt,edgeStrToPattern:kt,getLogger:Bt,getBlocksFlat:Et,getBlocks:Tt,getEdges:Dt,setHierarchy:_t,getBlock:It,setBlock:Nt,getColumns:vt,getClasses:Ot,clear:pt,generateId:Lt,setDiagramId:$t,getDiagramId:Ct},zt=E(((t,e)=>{var r=(i=q)(t,"r"),a=i(t,"g"),i=i(t,"b");return F(r,a,i,e)}),"fade"),At=E((e=>`.label {\n font-family: ${e.fontFamily};\n color: ${e.nodeTextColor||e.textColor};\n }\n .cluster-label text {\n fill: ${e.titleColor};\n }\n .cluster-label span,p {\n color: ${e.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${e.nodeTextColor||e.textColor};\n color: ${e.nodeTextColor||e.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${e.mainBkg};\n stroke: ${e.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${e.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${e.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${e.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${e.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${e.edgeLabelBackground};\n fill: ${e.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${e.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${zt(e.mainBkg,.5)};\n fill: ${zt(e.clusterBkg,.5)};\n stroke: ${zt(e.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${e.titleColor};\n }\n\n .cluster span,p {\n color: ${e.titleColor};\n }\n /* .cluster div {\n color: ${e.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${e.fontFamily};\n font-size: 12px;\n background: ${e.tertiaryColor};\n border: 1px solid ${e.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${e.textColor};\n }\n ${t()}\n`),"getStyles"),Mt=E(((t,e,r,a)=>{e.forEach((e=>{Pt[e](t,r,a)}))}),"insertMarkers"),Pt={extension:E(((t,e,r)=>{T.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")}),"extension"),composition:E(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"composition"),aggregation:E(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")}),"aggregation"),dependency:E(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")}),"dependency"),lollipop:E(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)}),"lollipop"),point:E(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"point"),circle:E(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")}),"circle"),cross:E(((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")}),"cross"),barb:E(((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}),"barb")},Yt=Mt;function jt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}E(jt,"calculateBlockPosition");var Ft=E((t=>{let e=0,r=0;for(const o of t.children){var{width:a,height:i,x:s,y:n}=o.size??{width:0,height:0,x:0,y:0};T.debug("getMaxChildSize abc95 child:",o.id,"width:",a,"height:",i,"x:",s,"y:",n,o.type),"space"!==o.type&&((s=a/(o.widthInColumns??1))>e&&(e=s),i>r)&&(r=i)}return{width:e,height:r}}),"getMaxChildSize");function Wt(t,e,r=0,a=0,i=8){if(T.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0}),0<t.children?.length){for(const r of t.children)Wt(r,e,0,0,i);var s=Ft(t),n=s.width,o=s.height;T.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",n,o);for(const e of t.children)e.size&&(T.debug(`abc95 Setting size of children of ${t.id} id=${e.id} ${n} ${o} `+JSON.stringify(e.size)),e.size.width=n*(e.widthInColumns??1)+i*((e.widthInColumns??1)-1),e.size.height=o,e.size.x=0,e.size.y=0,T.debug(`abc95 updating size of ${t.id} children child:${e.id} maxWidth:${n} maxHeight:`+o));for(const r of t.children)Wt(r,e,n,o,i);s=t.columns??-1;let g=0;for(const e of t.children)g+=e.widthInColumns??1;let y=t.children.length;0<s&&s<g&&(y=s);var l=Math.ceil(g/y);let u=y*(n+i)+i,p=l*(o+i)+i;if(u<r){T.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width `+u),u=r,p=a;var c=(r-y*i-i)/y,d=(a-l*i-i)/l;T.debug("Size indata abc88",t.id,"childWidth",c,"maxWidth",n),T.debug("Size indata abc88",t.id,"childHeight",d,"maxHeight",o),T.debug("Size indata abc88 xSize",y,"padding",i);for(const e of t.children)e.size&&(e.size.width=c,e.size.height=d,e.size.x=0,e.size.y=0)}if(T.debug(`abc95 (finale calc) ${t.id} xSize ${y} ySize ${l} columns ${s}${t.children.length} width=`+Math.max(u,t.size?.width||0)),u<(t?.size?.width||0)&&(u=t?.size?.width||0,0<(r=0<s?Math.min(t.children.length,s):t.children.length))){var h=(u-r*i-i)/r;T.debug("abc95 (growing to fit) width",t.id,u,t.size?.width,h);for(const e of t.children)e.size&&(e.size.width=h)}t.size={width:u,height:p,x:0,y:0}}T.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function Xt(t,e,r=8){T.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: `+t?.size?.width);var a=t.columns??-1;if(T.debug("layoutBlocks columns abc95",t.id,"=>",a,t),t.children&&0<t.children.length){var i=t?.children[0]?.size?.width??0,s=(i=t.children.length*i+(t.children.length-1)*r,T.debug("widthOfChildren 88",i,"posX"),new Map);{let e=0;for(const r of t.children)if(r.size){var n=jt(a,e).py,o=s.get(n)??0;r.size.height>o&&s.set(n,r.size.height);let t=r?.widthInColumns??1;0<a&&(t=Math.min(t,a-e%a)),e+=t}}var l=new Map;{let t=0;for(const e of[...s.keys()].sort(((t,e)=>t-e)))l.set(e,t),t+=(s.get(e)??0)+r}let p=0,x=(T.debug("abc91 block?.size?.x",t.id,t?.size?.x),t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r),b=0;for(const i of t.children){var c=t;if(i.size){var d,{width:h,height:g}=i.size,{px:y,py:u}=jt(a,p);u!=b&&(b=u,x=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,T.debug("New row in layout for block",t.id," and child ",i.id,b)),T.debug(`abc89 layout blocks (child) id: ${i.id} Pos: ${p} (px, py) ${y},${u} (${c?.size?.x},${c?.size?.y}) parent: ${c.id} width: `+h+r),c.size&&(y=h/2,i.size.x=x+r+y,T.debug(`abc91 layout blocks (calc) px, pyid:${i.id} startingPos=X${x} new startingPosX${i.size.x} ${y} padding=${r} width=${h} halfWidth=${y} => x:${i.size.x} y:${i.size.y} ${i.widthInColumns} (width * (child?.w || 1)) / 2 `+h*(i?.widthInColumns??1)/2),x=i.size.x+y,d=l.get(u)??0,u=s.get(u)??g,i.size.y=c.size.y-c.size.height/2+d+u/2+r,T.debug(`abc88 layout blocks (calc) px, pyid:${i.id}startingPosX${x}${r}${y}=>x:${i.size.x}y:${i.size.y}${i.widthInColumns}(width * (child?.w || 1)) / 2`+h*(i?.widthInColumns??1)/2)),i.children&&Xt(i,e,r);let n=i?.widthInColumns??1;0<a&&(n=Math.min(n,a-p%a)),p+=n,T.debug("abc88 columnsPos",i,p)}}}T.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: `+t?.size?.width)}function Ht(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var s,n,o,l;if(t.size&&"root"!==t.id&&(({x:s,y:n,width:o,height:l}=t.size),s-o/2<e&&(e=s-o/2),n-l/2<r&&(r=n-l/2),a<s+o/2&&(a=s+o/2),i<n+l/2)&&(i=n+l/2),t.children)for(const s of t.children)({minX:e,minY:r,maxX:a,maxY:i}=Ht(s,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function Ut(t){var e,r,a=t.getBlock("root");if(a)return({minX:t,minY:e,maxX:a,maxY:r}=(Wt(a,t,0,0,e=D()?.block?.padding??8),Xt(a,t,e),T.debug("getBlocks",JSON.stringify(a,null,2)),Ht(a))),{x:t,y:e,width:a-t,height:r-e}}E(Wt,"setBlockSizes"),E(Xt,"layoutBlocks"),E(Ht,"findBounds"),E(Ut,"layout");var Kt=E((async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);e=D();var n=I(e);return C(t,s,{style:r,isTitle:a,useHtmlLabels:n,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},e)}),"createLabel"),Zt=E(((t,e,r,a,i)=>{e.arrowTypeStart&&Vt(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&Vt(t,"end",e.arrowTypeEnd,r,a,i)}),"addEdgeMarkers"),qt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},Vt=E(((t,e,r,a,i,s)=>{var n=qt[r];n?t.attr("marker-"+e,`url(${a}#${i}_${s}-${n}${"start"===e?"Start":"End"})`):T.warn("Unknown arrow type: "+r)}),"addEdgeMarker"),Gt={},Jt={},Qt=E((async(t,e)=>{var r=D(),a=I(r),i=t.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label"),n="markdown"===e.labelType;n=await C(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:n,isNode:!1,markdown:n,width:n?void 0:Number.POSITIVE_INFINITY},r);s.node().appendChild(n);let o,l=n.getBBox(),c=l;if(a?(r=n.children[0],d=B(n),l=r.getBoundingClientRect(),c=l,d.attr("width",l.width),d.attr("height",l.height)):(r=B(n).select("text").node())&&"function"==typeof r.getBBox&&(c=r.getBBox()),s.attr("transform",O(c,a)),Gt[e.id]=i,e.width=l.width,e.height=l.height,e.startLabelLeft){var d=t.insert("g").attr("class","edgeTerminals");r=d.insert("g").attr("class","inner");let n=(o=s=await Kt(r,e.startLabelLeft,e.labelStyle)).getBBox();a&&(i=s.children[0],s=B(s),n=i.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height)),r.attr("transform",O(n,a)),Jt[e.id]||(Jt[e.id]={}),Jt[e.id].startLeft=d,te(o,e.startLabelLeft)}if(e.startLabelRight){s=(i=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let n=(o=r=await Kt(s,e.startLabelRight,e.labelStyle)).getBBox();a&&(d=r.children[0],r=B(r),n=d.getBoundingClientRect(),r.attr("width",n.width),r.attr("height",n.height)),s.attr("transform",O(n,a)),Jt[e.id]||(Jt[e.id]={}),Jt[e.id].startRight=i,te(o,e.startLabelRight)}if(e.endLabelLeft){r=(d=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let n=(o=s=await Kt(d,e.endLabelLeft,e.labelStyle)).getBBox();a&&(i=s.children[0],s=B(s),n=i.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height)),r.attr("transform",O(n,a)),Jt[e.id]||(Jt[e.id]={}),Jt[e.id].endLeft=d,te(o,e.endLabelLeft)}if(e.endLabelRight){s=(i=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let n=(o=r=await Kt(i,e.endLabelRight,e.labelStyle)).getBBox();a&&(d=r.children[0],t=B(r),n=d.getBoundingClientRect(),t.attr("width",n.width),t.attr("height",n.height)),s.attr("transform",O(n,a)),Jt[e.id]||(Jt[e.id]={}),Jt[e.id].endRight=i,te(o,e.endLabelRight)}return n}),"insertEdgeLabel");function te(t,e){I(D())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}E(te,"setTerminalWidth");var ee=E(((t,e)=>{T.debug("Moving label abc88 ",t.id,t.label,Gt[t.id],e);var r=e.updatedPath||e.originalPath,a=D();a=R(a).subGraphTitleTotalMargin;if(t.label){var i=Gt[t.id];let n=t.x,o=t.y;r&&(s=z.calcLabelPosition(r),T.debug("Moving label "+t.label+" from (",n,",",o,") to (",s.x,",",s.y,") abc88"),e.updatedPath)&&(n=s.x,o=s.y),i.attr("transform",`translate(${n}, ${o+a/2})`)}if(t.startLabelLeft){e=Jt[t.id].startLeft;let a=t.x,i=t.y;r&&(a=(s=z.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r)).x,i=s.y),e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){i=Jt[t.id].startRight;let e=t.x,s=t.y;r&&(e=(a=z.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r)).x,s=a.y),i.attr("transform",`translate(${e}, ${s})`)}if(t.endLabelLeft){var s=Jt[t.id].endLeft;let a=t.x,i=t.y;r&&(a=(e=z.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r)).x,i=e.y),s.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){a=Jt[t.id].endRight;let e=t.x,s=t.y;r&&(e=(i=z.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r)).x,s=i.y),a.attr("transform",`translate(${e}, ${s})`)}}),"positionEdgeLabel"),re=E(((t,e)=>{var r=t.x,a=t.y;r=Math.abs(e.x-r),e=Math.abs(e.y-a),a=t.width/2,t=t.height/2;return a<=r||t<=e}),"outsideNode"),ae=E(((t,e,r)=>{T.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);var a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2;let o=r.x<e.x?n-s:n+s;s=t.height/2,t=Math.abs(e.y-r.y);var l=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*s)return o=l*(i=r.y<e.y?e.y-s-i:i-s-e.y)/t,s={x:r.x<e.x?r.x+o:r.x-l+o,y:r.y<e.y?r.y+t-i:r.y-t+i},0===o&&(s.x=e.x,s.y=e.y),0===l&&(s.x=e.x),0===t&&(s.y=e.y),T.debug(`abc89 topp/bott calc, Q ${t}, q ${i}, R ${l}, r `+o,s),s;{i=t*(o=r.x<e.x?e.x-n-a:a-n-e.x)/l;let s=r.x<e.x?r.x+l-o:r.x-l+o,c=r.y<e.y?r.y+i:r.y-i;return T.debug(`sides calc abc89, Q ${t}, q ${i}, R ${l}, r `+o,{_x:s,_y:c}),0===o&&(s=e.x,c=e.y),0===l&&(s=e.x),0===t&&(c=e.y),{x:s,y:c}}}),"intersection"),ie=E(((t,e)=>{T.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach((t=>{if(re(e,t)||i)a=t,i||r.push(t);else{const s=ae(e,a,t);let n=!1;r.forEach((t=>{n=n||t.x===s.x&&t.y===s.y})),r.some((t=>t.x===s.x&&t.y===s.y))||r.push(s),i=!0}})),r}),"cutPathAtIntersect"),se=E((function(t,e,r,a,i,s,n){let o=r.points,l=(T.debug("abc88 InsertEdge: edge=",r,"e=",e),!1);var c=s.node(e.v);s=s.node(e.w),s?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(s.intersect(o[o.length-1]))),r.toCluster&&(T.debug("to cluster abc88",a[r.toCluster]),o=ie(r.points,a[r.toCluster].node),l=!0),r.fromCluster&&(T.debug("from cluster abc88",a[r.fromCluster]),o=ie(o.reverse(),a[r.fromCluster].node).reverse(),l=!0),e=o.filter((t=>!Number.isNaN(t.y)));let d=W;!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve);var{x:c,y:s}=A(r);a=M().x(c).y(s).curve(d);let h;switch(r.thickness){case"normal":h="edge-thickness-normal";break;case"thick":case"invisible":h="edge-thickness-thick";break;default:h=""}switch(r.pattern){case"solid":h+=" edge-pattern-solid";break;case"dotted":h+=" edge-pattern-dotted";break;case"dashed":h+=" edge-pattern-dashed"}c=t.append("path").attr("d",a(e)).attr("id",r.id).attr("class"," "+h+(r.classes?" "+r.classes:"")).attr("style",r.style);let g="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(g=P(!0)),Zt(c,r,g,n,i),s={},l&&(s.updatedPath=o),s.originalPath=r.points,s}),"insertEdge"),ne=E((t=>{var e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e}),"expandAndDeduplicateDirections"),oe=E(((t,e,r,a)=>{t=ne(t);var i=e.height+2*r.padding,s=i/2;a=a??e.width+2*s+r.padding,e=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:s,y:0},{x:a/2,y:2*e},{x:a-s,y:0},{x:a,y:0},{x:a,y:-i/3},{x:a+2*e,y:-i/2},{x:a,y:-2*i/3},{x:a,y:-i},{x:a-s,y:-i},{x:a/2,y:-i-2*e},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*e,y:-i/2},{x:0,y:-i/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:s,y:0},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:s,y:-i},{x:a-s,y:-i},{x:a,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:a,y:-s},{x:a,y:s-i},{x:0,y:-i}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:a,y:0},{x:0,y:-s},{x:0,y:s-i},{x:a,y:-i}]:t.has("right")&&t.has("left")?[{x:s,y:0},{x:s,y:-e},{x:a-s,y:-e},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:a-s,y:e-i},{x:s,y:e-i},{x:s,y:-i},{x:0,y:-i/2}]:t.has("up")&&t.has("down")?[{x:a/2,y:0},{x:0,y:-e},{x:s,y:-e},{x:s,y:e-i},{x:0,y:e-i},{x:a/2,y:-i},{x:a,y:e-i},{x:a-s,y:e-i},{x:a-s,y:-e},{x:a,y:-e}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:a,y:-s},{x:0,y:-i}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:a,y:0},{x:0,y:-i}]:t.has("left")&&t.has("up")?[{x:a,y:0},{x:0,y:-s},{x:a,y:-i}]:t.has("left")&&t.has("down")?[{x:a,y:0},{x:0,y:0},{x:a,y:-i}]:t.has("right")?[{x:s,y:-e},{x:s,y:-e},{x:a-s,y:-e},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:a-s,y:e-i},{x:s,y:e-i},{x:s,y:e-i}]:t.has("left")?[{x:s,y:0},{x:s,y:-e},{x:a-s,y:-e},{x:a-s,y:e-i},{x:s,y:e-i},{x:s,y:-i},{x:0,y:-i/2}]:t.has("up")?[{x:s,y:-e},{x:s,y:e-i},{x:0,y:e-i},{x:a/2,y:-i},{x:a,y:e-i},{x:a-s,y:e-i},{x:a-s,y:-e}]:t.has("down")?[{x:a/2,y:0},{x:0,y:-e},{x:s,y:-e},{x:s,y:e-i},{x:a-s,y:e-i},{x:a-s,y:-e},{x:a,y:-e}]:[{x:0,y:0}]}),"getArrowPoints");function le(t,e){return t.intersect(e)}E(le,"intersectNode");var ce=le;function de(t,e,r,a){var i=t.x,s=(t=t.y,i-a.x),n=t-a.y,o=Math.sqrt(e*e*n*n+r*r*s*s);s=Math.abs(e*r*s/o),a.x<i&&(s=-s),e=Math.abs(e*r*n/o);return{x:i+s,y:t+(e=a.y<t?-e:e)}}E(de,"intersectEllipse");var he=de;function ge(t,e,r){return he(t,e,e,r)}E(ge,"intersectCircle");var ye=ge;function ue(t,e,r,a){var i,s=e.y-t.y,n=t.x-e.x,o=e.x*t.y-t.x*e.y,l=s*r.x+n*r.y+o,c=s*a.x+n*a.y+o;if(!(0!=l&&0!=c&&pe(l,c)||(l=a.y-r.y,c=r.x-a.x,r=a.x*r.y-r.x*a.y,a=l*t.x+c*t.y+r,t=l*e.x+c*e.y+r,0!=a&&0!=t&&pe(a,t))||0==(i=s*c-l*n)))return e=Math.abs(i/2),{x:(a=n*r-c*o)<0?(a-e)/i:(a+e)/i,y:(a=l*o-s*r)<0?(a-e)/i:(a+e)/i}}function pe(t,e){return 0<t*e}E(ue,"intersectLine"),E(pe,"sameSign");var xe=ue,be=fe;function fe(t,e,r){for(var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=("function"==typeof e.forEach?e.forEach((function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)})):(n=Math.min(n,e.x),o=Math.min(o,e.y)),a-t.width/2-n),c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0];(h=xe(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y}))&&s.push(h)}return s.length?(1<s.length&&s.sort((function(t,e){var a=t.x-r.x;t=t.y-r.y,a=Math.sqrt(a*a+t*t),t=e.x-r.x,e=e.y-r.y;return a<(t=Math.sqrt(t*t+e*e))?-1:a===t?0:1})),s[0]):t}E(fe,"intersectPolygon");var me=E(((t,e)=>{var r,a=t.x,i=t.y,s=e.x-a,n=(e=e.y-i,t.width/2);t=t.height/2,t=Math.abs(e)*n>Math.abs(s)*t?(e<0&&(t=-t),r=0==e?0:t*s/e,t):(r=n=s<0?-n:n,0==s?0:n*e/s);return{x:a+r,y:i+t}}),"intersectRect"),we={node:ce,circle:ye,ellipse:he,polygon:be,rect:me},ke=E((async(t,e,r,a)=>{var i=D();let s;var n=e.useHtmlLabels||I(i);t=(r=(s=r||"node default",t.insert("g").attr("class",s).attr("id",e.domId||e.id))).insert("g").attr("class","label").attr("style",e.labelStyle);let o;o=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let l,c=(l="markdown"===e.labelType?C(t,H(U(o),i),{useHtmlLabels:n,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await Kt(t,H(U(o),i),e.labelStyle,!1,a)).getBBox();var d;a=e.padding/2;return I(i)&&(i=l.children[0],d=B(l),await K(i,o),c=i.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)),n?t.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):t.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&t.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),t.insert("rect",":first-child"),{shapeSvg:r,bbox:c,halfPadding:a,label:t}}),"labelHelper"),Se=E(((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height}),"updateNodeBounds");function Le(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}E(Le,"insertPolygonShape");var _e=E((async(t,e)=>{e.useHtmlLabels||I(D())||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:a}=await ke(t,e,"node "+e.classes,!0),i=(T.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-a).attr("y",-r.height/2-a).attr("width",r.width+e.padding).attr("height",r.height+e.padding),Se(e,i),e.intersect=function(t){return we.rect(e,t)},t}),"note"),ve=E((t=>t?" "+t:""),"formatClass"),Ee=E(((t,e)=>`${e||"node default"}${ve(t.classes)} `+ve(t.class)),"getClassesFromNode"),Te=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0);const a=[{x:(r=r.width+e.padding+(r.height+e.padding))/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];return T.info("Question main (Circle)"),(r=Le(t,r,r,a)).attr("style",e.style),Se(e,r),e.intersect=function(t){return T.warn("Intersect called"),we.polygon(e,a,t)},t}),"question"),De=E(((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map((function(t){return t.x+","+t.y})).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return we.circle(e,14,t)},t)),"choice"),Ie=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=e.positioned?e.height:r.height+e.padding,i=a/4;const s=[{x:i,y:0},{x:(r=e.positioned?e.width:r.width+2*i+e.padding)-i,y:0},{x:r,y:-a/2},{x:r-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}];return(i=Le(t,r,a,s)).attr("style",e.style),Se(e,i),e.intersect=function(t){return we.polygon(e,s,t)},t}),"hexagon"),Ne=E((async(t,e)=>{var{shapeSvg:t,bbox:r}=await ke(t,e,void 0,!0),a=r.height+2*e.padding,i=r.width+a/2*2+e.padding;i=e.positioned&&1<(e.widthInColumns??1)&&e.width>i?e.width:i;const s=oe(e.directions,r,e,i);return(r=Le(t,i,a,s)).attr("style",e.style),Se(e,r),e.intersect=function(t){return we.polygon(e,s,t)},t}),"block_arrow"),$e=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=[{x:-(r=r.height+e.padding)/2,y:0},{x:a,y:0},{x:a,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return Le(t,a,r,i).attr("style",e.style),e.width=a+r,e.height=r,e.intersect=function(t){return we.polygon(e,i,t)},t}),"rect_left_inv_arrow"),Ce=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e),!0),a=r.width+e.padding;const i=[{x:-2*(r=r.height+e.padding)/6,y:0},{x:a-r/6,y:0},{x:a+2*r/6,y:-r},{x:r/6,y:-r}];return(a=Le(t,a,r,i)).attr("style",e.style),Se(e,a),e.intersect=function(t){return we.polygon(e,i,t)},t}),"lean_right"),Be=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=[{x:2*(r=r.height+e.padding)/6,y:0},{x:a+r/6,y:0},{x:a-2*r/6,y:-r},{x:-r/6,y:-r}];return(a=Le(t,a,r,i)).attr("style",e.style),Se(e,a),e.intersect=function(t){return we.polygon(e,i,t)},t}),"lean_left"),Oe=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=[{x:-2*(r=r.height+e.padding)/6,y:0},{x:a+2*r/6,y:0},{x:a-r/6,y:-r},{x:r/6,y:-r}];return(a=Le(t,a,r,i)).attr("style",e.style),Se(e,a),e.intersect=function(t){return we.polygon(e,i,t)},t}),"trapezoid"),Re=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=[{x:(r=r.height+e.padding)/6,y:0},{x:a-r/6,y:0},{x:a+2*r/6,y:-r},{x:-2*r/6,y:-r}];return(a=Le(t,a,r,i)).attr("style",e.style),Se(e,a),e.intersect=function(t){return we.polygon(e,i,t)},t}),"inv_trapezoid"),ze=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=[{x:0,y:0},{x:a+(r=r.height+e.padding)/2,y:0},{x:a,y:-r/2},{x:a+r/2,y:-r},{x:0,y:-r}];return(a=Le(t,a,r,i)).attr("style",e.style),Se(e,a),e.intersect=function(t){return we.polygon(e,i,t)},t}),"rect_right_inv_arrow"),Ae=E((async(t,e)=>{var{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=a/2,s=i/(2.5+a/50);var r=r.height+s+e.padding,n="M 0,"+s+" a "+i+","+s+" 0,0,0 "+a+" 0 a "+i+","+s+" 0,0,0 "+-a+" 0 l 0,"+r+" a "+i+","+s+" 0,0,0 "+a+" 0 l 0,"+-r;n=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",n).attr("transform","translate("+-a/2+","+-(r/2+s)+")");return Se(e,n),e.intersect=function(t){var r=we.rect(e,t),a=r.x-e.x;if(0!=i&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let n=s*s*(1-a*a/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,0<t.y-e.y&&(n=-n),r.y+=n}return r},t}),"cylinder"),Me=E((async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:a}=await ke(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,n=e.positioned?e.height:r.height+e.padding,o=e.positioned?-s/2:-r.width/2-a,r=e.positioned?-n/2:-r.height/2-a;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",s).attr("height",n),e.props&&(a=new Set(Object.keys(e.props)),e.props.borders&&(je(i,e.props.borders,s,n),a.delete("borders")),a.forEach((t=>{T.warn("Unknown node property "+t)}))),Se(e,i),e.intersect=function(t){return we.rect(e,t)},t}),"rect"),Pe=E((async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:a}=await ke(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,n=e.positioned?e.height:r.height+e.padding,o=e.positioned?-s/2:-r.width/2-a,r=e.positioned?-n/2:-r.height/2-a;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",s).attr("height",n),e.props&&(a=new Set(Object.keys(e.props)),e.props.borders&&(je(i,e.props.borders,s,n),a.delete("borders")),a.forEach((t=>{T.warn("Unknown node property "+t)}))),Se(e,i),e.intersect=function(t){return we.rect(e,t)},t}),"composite"),Ye=E((async(t,e)=>{t=(await ke(t,e,"label",!0)).shapeSvg;var r,a=(T.trace("Classes = ",e.class),t.insert("rect",":first-child"));return a.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(je(a,e.props.borders,0,0),r.delete("borders")),r.forEach((t=>{T.warn("Unknown node property "+t)}))),Se(e,a),e.intersect=function(t){return we.rect(e,t)},t}),"labelRect");function je(t,e,r,a){const i=[];var s=E((t=>{i.push(t,0)}),"addBorder"),n=E((t=>{i.push(0,t)}),"skipBorder");(e.includes("t")?(T.debug("add top border"),s):n)(r),(e.includes("r")?(T.debug("add right border"),s):n)(a),(e.includes("b")?(T.debug("add bottom border"),s):n)(r),(e.includes("l")?(T.debug("add left border"),s):n)(a),t.attr("stroke-dasharray",i.join(" "))}E(je,"applyNodePropertyBorders");var Fe=E((async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";var a=(t=t.insert("g").attr("class",r).attr("id",e.domId||e.id)).insert("rect",":first-child"),i=t.insert("line"),s=t.insert("g").attr("class","label");let n="";n="object"==typeof(g=e.labelText.flat?e.labelText.flat():e.labelText)?g[0]:g,T.info("Label text abc79",n,g,"object"==typeof g);var o=await Kt(s,n,e.labelStyle,!0,!0);let l={width:0,height:0};I(D())&&(d=o.children[0],h=B(o),l=d.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)),T.info("Text 2",g);var c,d=g.slice(1,g.length),h=o.getBBox(),g=await Kt(s,d.join?d.join("<br/>"):d,e.labelStyle,!0,!0);I(D())&&(d=g.children[0],c=B(g),l=d.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)),d=e.padding/2;return B(g).attr("transform","translate( "+(l.width>h.width?0:(h.width-l.width)/2)+", "+(h.height+d+5)+")"),B(o).attr("transform","translate( "+(l.width<h.width?0:-(h.width-l.width)/2)+", 0)"),l=s.node().getBBox(),s.attr("transform","translate("+-l.width/2+", "+(-l.height/2-d+3)+")"),a.attr("class","outer title-state").attr("x",-l.width/2-d).attr("y",-l.height/2-d).attr("width",l.width+e.padding).attr("height",l.height+e.padding),i.attr("class","divider").attr("x1",-l.width/2-d).attr("x2",l.width/2+d).attr("y1",-l.height/2-d+h.height+d).attr("y2",-l.height/2-d+h.height+d),Se(e,a),e.intersect=function(t){return we.rect(e,t)},t}),"rectWithTitle"),We=E((async(t,e)=>{var{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.height+e.padding,r=(r=r.width+a/4+e.padding,t.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-r/2).attr("y",-a/2).attr("width",r).attr("height",a));return Se(e,r),e.intersect=function(t){return we.rect(e,t)},t}),"stadium"),Xe=E((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await ke(t,e,Ee(e,void 0),!0);return(t=r.insert("circle",":first-child")).attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),T.info("Circle main"),Se(e,t),e.intersect=function(t){return T.info("Circle intersect",e,a.width/2+i,t),we.circle(e,a.width/2+i,t)},r}),"circle"),He=E((async(t,e)=>{const{shapeSvg:r,bbox:a,halfPadding:i}=await ke(t,e,Ee(e,void 0),!0);var s=(t=r.insert("g",":first-child")).insert("circle"),n=t.insert("circle");return t.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),T.info("DoubleCircle main"),Se(e,s),e.intersect=function(t){return T.info("DoubleCircle intersect",e,a.width/2+i+5,t),we.circle(e,a.width/2+i+5,t)},r}),"doublecircle"),Ue=E((async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await ke(t,e,Ee(e,void 0),!0),a=r.width+e.padding;const i=[{x:0,y:0},{x:a,y:0},{x:a,y:-(r=r.height+e.padding)},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-r},{x:-8,y:-r},{x:-8,y:0}];return(a=Le(t,a,r,i)).attr("style",e.style),Se(e,a),e.intersect=function(t){return we.polygon(e,i,t)},t}),"subroutine"),Ke=E(((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Se(e,r),e.intersect=function(t){return we.circle(e,7,t)},t}),"start"),Ze=E(((t,e,r)=>{let a=70,i=10;return"LR"===r&&(a=10,i=70),r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join"),Se(e,r),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return we.rect(e,t)},t}),"forkJoin"),qe={rhombus:Te,composite:Pe,question:Te,rect:Me,labelRect:Ye,rectWithTitle:Fe,choice:De,circle:Xe,doublecircle:He,stadium:We,hexagon:Ie,block_arrow:Ne,rect_left_inv_arrow:$e,lean_right:Ce,lean_left:Be,trapezoid:Oe,inv_trapezoid:Re,rect_right_inv_arrow:ze,cylinder:Ae,start:Ke,end:E(((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),a=t.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Se(e,a),e.intersect=function(t){return we.circle(e,7,t)},t}),"end"),note:_e,subroutine:Ue,fork:Ze,join:Ze,class_box:E((async(t,e)=>{var r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";var i=(t=t.insert("g").attr("class",a).attr("id",e.domId||e.id)).insert("rect",":first-child"),s=t.insert("line"),n=t.insert("line");let o=0,l=4;const c=t.insert("g").attr("class","label");let d=0;var h=e.classData.annotations?.[0],g=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"";let y=(g=await Kt(c,g,e.labelStyle,!0,!0)).getBBox(),u=(I(D())&&(x=g.children[0],p=B(g),y=x.getBoundingClientRect(),p.attr("width",y.width),p.attr("height",y.height)),e.classData.annotations[0]&&(l+=y.height+4,o+=y.width),e.classData.label);void 0!==e.classData.type&&""!==e.classData.type&&(I(D())?u+="<"+e.classData.type+">":u+="<"+e.classData.type+">");var p,x=await Kt(c,u,e.labelStyle,!0,!0);B(x).attr("class","classTitle");let b=x.getBBox();I(D())&&(p=x.children[0],w=B(x),b=p.getBoundingClientRect(),w.attr("width",b.width),w.attr("height",b.height)),l+=b.height+4,b.width>o&&(o=b.width);const f=[],m=(e.classData.members.forEach((async t=>{let r=(t=t.getDisplayDetails()).displayText;var a,i;I(D())&&(r=r.replace(/</g,"<").replace(/>/g,">"));let s=(t=await Kt(c,r,t.cssStyle||e.labelStyle,!0,!0)).getBBox();I(D())&&(a=t.children[0],i=B(t),s=a.getBoundingClientRect(),i.attr("width",s.width),i.attr("height",s.height)),s.width>o&&(o=s.width),l+=s.height+4,f.push(t)})),l+=8,[]);e.classData.methods.forEach((async t=>{let r=(t=t.getDisplayDetails()).displayText;var a,i;I(D())&&(r=r.replace(/</g,"<").replace(/>/g,">"));let s=(t=await Kt(c,r,t.cssStyle||e.labelStyle,!0,!0)).getBBox();I(D())&&(a=t.children[0],i=B(t),s=a.getBoundingClientRect(),i.attr("width",s.width),i.attr("height",s.height)),s.width>o&&(o=s.width),l+=s.height+4,m.push(t)})),l+=8,h&&(p=(o-y.width)/2,B(g).attr("transform","translate( "+(-1*o/2+p)+", "+-1*l/2+")"),d=y.height+4);var w=(o-b.width)/2;return B(x).attr("transform","translate( "+(-1*o/2+w)+", "+(-1*l/2+d)+")"),d+=b.height+4,s.attr("class","divider").attr("x1",-o/2-r).attr("x2",o/2+r).attr("y1",-l/2-r+8+d).attr("y2",-l/2-r+8+d),d+=8,f.forEach((t=>{B(t).attr("transform","translate( "+-o/2+", "+(-1*l/2+d+4)+")"),t=t?.getBBox(),d+=(t?.height??0)+4})),d+=8,n.attr("class","divider").attr("x1",-o/2-r).attr("x2",o/2+r).attr("y1",-l/2-r+8+d).attr("y2",-l/2-r+8+d),d+=8,m.forEach((t=>{B(t).attr("transform","translate( "+-o/2+", "+(-1*l/2+d)+")"),t=t?.getBBox(),d+=(t?.height??0)+4})),i.attr("style",e.style).attr("class","outer title-state").attr("x",-o/2-r).attr("y",-l/2-r).attr("width",o+e.padding).attr("height",l+e.padding),Se(e,i),e.intersect=function(t){return we.rect(e,t)},t}),"class_box")},Ve={},Ge=E((async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===D().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await qe[e.shape](a,e,r)}else i=await qe[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),Ve[e.id]=a,e.haveCallback&&Ve[e.id].attr("class",Ve[e.id].attr("class")+" clickable"),a}),"insertNode"),Je=E((t=>{var e=Ve[t.id],r=(T.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r}),"positionNode");function Qe(t,e,r=!1){let a,i="default",s=(0<(t?.classes?.length||0)&&(i=(t?.classes??[]).join(" ")),i+=" flowchart-label",0),n="";switch(t.type){case"round":s=5,n="rect";break;case"composite":s=0,n="composite",a=0;break;case"square":case"group":default:n="rect";break;case"diamond":n="question";break;case"hexagon":n="hexagon";break;case"block_arrow":n="block_arrow";break;case"odd":case"rect_left_inv_arrow":n="rect_left_inv_arrow";break;case"lean_right":n="lean_right";break;case"lean_left":n="lean_left";break;case"trapezoid":n="trapezoid";break;case"inv_trapezoid":n="inv_trapezoid";break;case"circle":n="circle";break;case"ellipse":n="ellipse";break;case"stadium":n="stadium";break;case"subroutine":n="subroutine";break;case"cylinder":n="cylinder";break;case"doublecircle":n="doublecircle"}var o=N(t?.styles??[]),l=t.label,c=t.size??{width:0,height:0,x:0,y:0};e=e.getDiagramId();return{labelStyle:o.labelStyle,shape:n,labelText:l,rx:s,ry:s,class:i,style:o.style,id:t.id,domId:e?e+"-"+t.id:t.id,directions:t.directions,width:c.width,height:c.height,x:c.x,y:c.y,positioned:r,intersect:void 0,type:t.type,padding:a??$()?.block?.padding??0,widthInColumns:t.widthInColumns??1}}async function tr(t,e,r){var a;"group"!==(e=Qe(e,r,!1)).type&&(a=$(),a=(t=await Ge(t,e,{config:a})).node().getBBox(),(e=r.getBlock(e.id)).size={width:a.width,height:a.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function er(t,e,r){var a=Qe(e,r,!0);"space"!==r.getBlock(a.id).type&&(r=$(),await Ge(t,a,{config:r}),e.intersect=a?.intersect,Je(a))}async function rr(t,e,r,a){for(const i of e)await a(t,i,r),i.children&&await rr(t,i.children,r,a)}async function ar(t,e,r){await rr(t,e,r,tr)}async function ir(t,e,r){await rr(t,e,r,er)}async function sr(t,e,r,a,i){var s,n,o,l=new Z({multigraph:!0,compound:!0});l.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(const t of r)t.size&&l.setNode(t.id,{width:t.size.width,height:t.size.height,intersect:t.intersect});for(const r of e)r.start&&r.end&&(s=a.getBlock(r.start),n=a.getBlock(r.end),s?.size)&&n?.size&&(s=s.size,n=n.size,s=[{x:s.x,y:s.y},{x:s.x+(n.x-s.x)/2,y:s.y+(n.y-s.y)/2},{x:n.x,y:n.y}],n=i?i+"-"+r.id:r.id,o=("thick"===r.thickness?"edge-thickness-thick":"edge-thickness-normal")+` ${"dotted"===r.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`,se(t,{v:r.start,w:r.end,name:n},{...r,id:n,arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:s,classes:o},void 0,"block",l,i),r.label)&&(await Qt(t,{...r,label:r.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:r.arrowTypeEnd,arrowTypeStart:r.arrowTypeStart,points:s,classes:o}),ee({...r,x:s[1].x,y:s[1].y},{originalPath:s}))}E(Qe,"getNodeFromBlock"),E(tr,"calculateBlockSize"),E(er,"insertBlockPositioned"),E(rr,"performOperations"),E(ar,"calculateBlockSizes"),E(ir,"insertBlocks"),E(sr,"insertEdges");var nr=E((function(t,e){return e.db.getClasses()}),"getClasses"),or={parser:tt,db:Rt,renderer:{draw:E((async function(t,e,r,a){var{securityLevel:i,block:s}=$(),n=a.db;let o;n.setDiagramId(e),"sandbox"===i&&(o=B("#i"+e));var l=B("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),i="sandbox"===i?l.select(`[id="${e}"]`):B(`[id="${e}"]`),c=(l=(Yt(i,["point","circle","cross"],a.type,e),n.getBlocks()),a=n.getBlocksFlat(),n.getEdges()),d=i.insert("g").attr("class","block"),h=(await ar(d,l,n),Ut(n));await ir(d,l,n),await sr(d,c,a,n,e),h&&(l=h,d=Math.max(1,Math.round(l.width/l.height*.125)),c=l.height+d+10,a=l.width+10,n=s.useMaxWidth,Y(i,c,a,!!n),T.debug("Here Bounds",h,l),i.attr("viewBox",`${l.x-5} ${l.y-5} ${l.width+10} `+(l.height+10)))}),"draw"),getClasses:nr},styles:At};export{or as diagram};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t,e;(t=self.document)&&!t.getElementById("livereloadscript")&&((e=t.createElement("script")).async=1,e.src="//"+(self.location.host||"localhost").split(":")[0]+":35729/livereload.js?snipver=1",e.id="livereloadscript",t.getElementsByTagName("head")[0].appendChild(e));import{g as r}from"./chunk-5VM5RSS4-36b32f6e.js";import{aD as a,aE as i,aF as s,aG as n,aH as o,aI as l,aJ as c,aK as d,aL as h,aM as g,aN as y,aO as u,aP as p,aQ as x,aR as b,aS as f,aT as m,aU as w,aV as k,aW as S,aX as L,aY as _,aZ as v,a_ as E,a$ as T,_ as D,l as I,d as N,b0 as $,b1 as C,G as B,b2 as O,j as R,b3 as z,av as A,u as M,b4 as P,S as Y,O as j,k as F,v as W,C as X,T as H,e as U,i as K,b5 as Z,b6 as q}from"./mermaid.core-2d237a1e.js";import{G as V}from"./graph-0df36b9d.js";import{c as G}from"./channel-11d3f4bc.js";import"./web-753300e1.js";function J(t){if(a(t))return t;var e,r,D,I=i(t);if(!function(t){switch(i(t)){case T:case E:case v:case _:case L:case S:case k:case w:case m:case f:case b:case x:case p:case u:case y:case g:case h:case d:case c:case l:case o:case n:return!0;default:return!1}}(t))return{};if(function(t){return Array.isArray(t)}(t)){let e=Array.from(t);return 0<t.length&&"string"==typeof t[0]&&Object.hasOwn(t,"index")&&(e.index=t.index,e.input=t.input),e}if(s(t))return new t.constructor(t.buffer,t.byteOffset,t.length);if("[object ArrayBuffer]"===I)return new ArrayBuffer(t.byteLength);if("[object DataView]"===I)return D=t.buffer,e=t.byteOffset,r=t.byteLength,N=new ArrayBuffer(r),D=new Uint8Array(D,e,r),new Uint8Array(N).set(D),new DataView(N);if("[object Boolean]"===I||"[object Number]"===I||"[object String]"===I)return("[object String]"===I?tt:Q)(e=new t.constructor(t.valueOf()),t),e;if("[object Date]"===I)return new Date(Number(t));if("[object RegExp]"===I)return r=t,(D=new RegExp(r.source,r.flags)).lastIndex=r.lastIndex,D;if("[object Symbol]"===I)return Object(Symbol.prototype.valueOf.call(t));if("[object Map]"===I){let e=new Map;return t.forEach((t,r)=>{e.set(r,t)}),e}if("[object Set]"===I){let e=new Set;return t.forEach(t=>{e.add(t)}),e}if("[object Arguments]"===I){var N=t;let e={};return Q(e,N),e.length=N.length,e[Symbol.iterator]=N[Symbol.iterator],e}let $={};return function(t,e){var r=Object.getPrototypeOf(e);null!==r&&"function"==typeof e.constructor&&Object.setPrototypeOf(t,r)}($,t),Q($,t),function(t,e){var r=Object.getOwnPropertySymbols(e);for(let i=0;i<r.length;i++){var a=r[i];Object.prototype.propertyIsEnumerable.call(e,a)&&(t[a]=e[a])}}($,t),$}function Q(t,e){for(var r in e)Object.hasOwn(e,r)&&(t[r]=e[r])}function tt(t,e){var r,a=e.valueOf().length;for(r in e)Object.hasOwn(e,r)&&(Number.isNaN(Number(r))||Number(r)>=a)&&(t[r]=e[r])}var et=(()=>{var t=D(function(t,e,r,a){for(r=r||{},a=t.length;a--;r[t[a]]=e);return r},"o"),e=[1,7],r=[1,13],a=[1,14],i=[1,19],s=[1,16],n=[1,17],o=[1,18],l=[8,10,21,28,29,30,31,39,43,46],c=[1,23],d=[1,24],h=[8,10,15,16,21,28,29,30,31,39,43,46],g=[8,10,15,16,21,27,28,29,30,31,39,43,46],y=[1,49],u={trace:D(function(){},"trace"),yy:{},symbols_:{error:2,spaceLines:3,SPACELINE:4,NL:5,separator:6,SPACE:7,EOF:8,start:9,BLOCK_DIAGRAM_KEY:10,document:11,stop:12,statement:13,link:14,LINK:15,START_LINK:16,LINK_LABEL:17,STR:18,nodeStatement:19,columnsStatement:20,SPACE_BLOCK:21,blockStatement:22,classDefStatement:23,cssClassStatement:24,styleStatement:25,node:26,SIZE:27,COLUMNS:28,"id-block":29,end:30,NODE_ID:31,nodeShapeNLabel:32,dirList:33,DIR:34,NODE_DSTART:35,NODE_DEND:36,BLOCK_ARROW_START:37,BLOCK_ARROW_END:38,classDef:39,CLASSDEF_ID:40,CLASSDEF_STYLEOPTS:41,DEFAULT:42,class:43,CLASSENTITY_IDS:44,STYLECLASS:45,style:46,STYLE_ENTITY_IDS:47,STYLE_DEFINITION_DATA:48,$accept:0,$end:1},terminals_:{2:"error",4:"SPACELINE",5:"NL",7:"SPACE",8:"EOF",10:"BLOCK_DIAGRAM_KEY",15:"LINK",16:"START_LINK",17:"LINK_LABEL",18:"STR",21:"SPACE_BLOCK",27:"SIZE",28:"COLUMNS",29:"id-block",30:"end",31:"NODE_ID",34:"DIR",35:"NODE_DSTART",36:"NODE_DEND",37:"BLOCK_ARROW_START",38:"BLOCK_ARROW_END",39:"classDef",40:"CLASSDEF_ID",41:"CLASSDEF_STYLEOPTS",42:"DEFAULT",43:"class",44:"CLASSENTITY_IDS",45:"STYLECLASS",46:"style",47:"STYLE_ENTITY_IDS",48:"STYLE_DEFINITION_DATA"},productions_:[0,[3,1],[3,2],[3,2],[6,1],[6,1],[6,1],[9,3],[12,1],[12,1],[12,2],[12,2],[11,1],[11,2],[14,1],[14,4],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[13,1],[19,3],[19,2],[19,1],[20,1],[22,4],[22,3],[26,1],[26,2],[33,1],[33,2],[32,3],[32,4],[23,3],[23,3],[24,3],[25,3]],performAction:D(function(t,e,r,a,i,s,n){var o=s.length-1;switch(i){case 4:a.getLogger().debug("Rule: separator (NL) ");break;case 5:a.getLogger().debug("Rule: separator (Space) ");break;case 6:a.getLogger().debug("Rule: separator (EOF) ");break;case 7:a.getLogger().debug("Rule: hierarchy: ",s[o-1]),a.setHierarchy(s[o-1]);break;case 8:a.getLogger().debug("Stop NL ");break;case 9:a.getLogger().debug("Stop EOF ");break;case 10:a.getLogger().debug("Stop NL2 ");break;case 11:a.getLogger().debug("Stop EOF2 ");break;case 12:a.getLogger().debug("Rule: statement: ",s[o]),"number"==typeof s[o].length?this.$=s[o]:this.$=[s[o]];break;case 13:a.getLogger().debug("Rule: statement #2: ",s[o-1]),this.$=[s[o-1]].concat(s[o]);break;case 14:a.getLogger().debug("Rule: link: ",s[o],t),this.$={edgeTypeStr:s[o],label:""};break;case 15:a.getLogger().debug("Rule: LABEL link: ",s[o-3],s[o-1],s[o]),this.$={edgeTypeStr:s[o],label:s[o-1]};break;case 18:var l=parseInt(s[o]),c=a.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:a.getLogger().debug("Rule: (nodeStatement link node) ",s[o-2],s[o-1],s[o]," typestr: ",s[o-1].edgeTypeStr);c=a.edgeStrToEdgeData(s[o-1].edgeTypeStr),l=a.edgeStrToEdgeStartData(s[o-1].edgeTypeStr);var d=a.edgeStrToThickness(s[o-1].edgeTypeStr),h=a.edgeStrToPattern(s[o-1].edgeTypeStr);this.$=[{id:s[o-2].id,label:s[o-2].label,type:s[o-2].type,directions:s[o-2].directions},{id:s[o-2].id+"-"+s[o].id,start:s[o-2].id,end:s[o].id,label:s[o-1].label,type:"edge",thickness:d,pattern:h,directions:s[o].directions,arrowTypeEnd:c,arrowTypeStart:l},{id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions}];break;case 24:a.getLogger().debug("Rule: nodeStatement (abc88 node size) ",s[o-1],s[o]),this.$={id:s[o-1].id,label:s[o-1].label,type:a.typeStr2Type(s[o-1].typeStr),directions:s[o-1].directions,widthInColumns:parseInt(s[o],10)};break;case 25:a.getLogger().debug("Rule: nodeStatement (node) ",s[o]),this.$={id:s[o].id,label:s[o].label,type:a.typeStr2Type(s[o].typeStr),directions:s[o].directions,widthInColumns:1};break;case 26:a.getLogger().debug("APA123",this||"na"),a.getLogger().debug("COLUMNS: ",s[o]),this.$={type:"column-setting",columns:"auto"===s[o]?-1:parseInt(s[o])};break;case 27:a.getLogger().debug("Rule: id-block statement : ",s[o-2],s[o-1]),a.generateId(),this.$={...s[o-2],type:"composite",children:s[o-1]};break;case 28:a.getLogger().debug("Rule: blockStatement : ",s[o-2],s[o-1],s[o]),d=a.generateId(),this.$={id:d,type:"composite",label:"",children:s[o-1]};break;case 29:a.getLogger().debug("Rule: node (NODE_ID separator): ",s[o]),this.$={id:s[o]};break;case 30:a.getLogger().debug("Rule: node (NODE_ID nodeShapeNLabel separator): ",s[o-1],s[o]),this.$={id:s[o-1],label:s[o].label,typeStr:s[o].typeStr,directions:s[o].directions};break;case 31:a.getLogger().debug("Rule: dirList: ",s[o]),this.$=[s[o]];break;case 32:a.getLogger().debug("Rule: dirList: ",s[o-1],s[o]),this.$=[s[o-1]].concat(s[o]);break;case 33:a.getLogger().debug("Rule: nodeShapeNLabel: ",s[o-2],s[o-1],s[o]),this.$={typeStr:s[o-2]+s[o],label:s[o-1]};break;case 34:a.getLogger().debug("Rule: BLOCK_ARROW nodeShapeNLabel: ",s[o-3],s[o-2]," #3:",s[o-1],s[o]),this.$={typeStr:s[o-3]+s[o],label:s[o-2],directions:s[o-1]};break;case 35:case 36:this.$={type:"classDef",id:s[o-1].trim(),css:s[o].trim()};break;case 37:this.$={type:"applyClass",id:s[o-1].trim(),styleClass:s[o].trim()};break;case 38:this.$={type:"applyStyles",id:s[o-1].trim(),stylesStr:s[o].trim()}}},"anonymous"),table:[{9:1,10:[1,2]},{1:[3]},{10:p=[1,15],11:3,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:a,31:i,39:s,43:n,46:o},{8:[1,20]},t(u=[8,30],[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,10:p,21:e,28:r,29:a,31:i,39:s,43:n,46:o}),t(l,[2,16],{14:22,15:c,16:d}),t(l,[2,17]),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),t(l,[2,21]),t(l,[2,22]),t(h,[2,25],{27:[1,25]}),t(l,[2,26]),{19:26,26:12,31:i},{10:p,11:27,13:4,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:a,31:i,39:s,43:n,46:o},{40:[1,28],42:[1,29]},{44:[1,30]},{47:[1,31]},t(g,[2,29],{32:32,35:[1,33],37:[1,34]}),{1:[2,7]},t(u,[2,13]),{26:35,31:i},{31:[2,14]},{17:[1,36]},t(h,[2,24]),{10:p,11:37,13:4,14:22,15:c,16:d,19:5,20:6,21:e,22:8,23:9,24:10,25:11,26:12,28:r,29:a,31:i,39:s,43:n,46:o},{30:[1,38]},{41:[1,39]},{41:[1,40]},{45:[1,41]},{48:[1,42]},t(g,[2,30]),{18:[1,43]},{18:[1,44]},t(h,[2,23]),{18:[1,45]},{30:[1,46]},t(l,[2,28]),t(l,[2,35]),t(l,[2,36]),t(l,[2,37]),t(l,[2,38]),{36:[1,47]},{33:48,34:y},{15:[1,50]},t(l,[2,27]),t(g,[2,33]),{38:[1,51]},{33:52,34:y,38:[2,31]},{31:[2,15]},t(g,[2,34]),{38:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:D(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:D(function(t){var e,r=this,a=[0],i=[],s=[null],n=[],o=this.table,l="",c=0,d=0,h=n.slice.call(arguments,1),g=Object.create(this.lexer),y={yy:{}};for(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(y.yy[e]=this.yy[e]);g.setInput(t,y.yy),y.yy.lexer=g,y.yy.parser=this,void 0===g.yylloc&&(g.yylloc={});var u=g.yylloc,p=(n.push(u),g.options&&g.options.ranges);function x(){var t=i.pop()||g.lex()||1;return"number"!=typeof t&&(t instanceof Array&&(t=(i=t).pop()),t=r.symbols_[t]||t),t}"function"==typeof y.yy.parseError?this.parseError=y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError,D(function(t){a.length=a.length-2*t,s.length=s.length-t,n.length=n.length-t},"popStack"),D(x,"lex");for(var b,f,m,w,k,S,L={};;){if(f=a[a.length-1],void 0===(m=this.defaultActions[f]||(null==b&&(b=x()),o[f]&&o[f][b]))||!m.length||!m[0]){var _,v=[];for(w in o[f])this.terminals_[w]&&2<w&&v.push("'"+this.terminals_[w]+"'");_=g.showPosition?"Parse error on line "+(c+1)+":\n"+g.showPosition()+"\nExpecting "+v.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(1==b?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[b]||b,line:g.yylineno,loc:u,expected:v})}if(m[0]instanceof Array&&1<m.length)throw new Error("Parse Error: multiple actions possible at state: "+f+", token: "+b);switch(m[0]){case 1:a.push(b),s.push(g.yytext),n.push(g.yylloc),a.push(m[1]),b=null,d=g.yyleng,l=g.yytext,c=g.yylineno,u=g.yylloc;break;case 2:if(k=this.productions_[m[1]][1],L.$=s[s.length-k],L._$={first_line:n[n.length-(k||1)].first_line,last_line:n[n.length-1].last_line,first_column:n[n.length-(k||1)].first_column,last_column:n[n.length-1].last_column},p&&(L._$.range=[n[n.length-(k||1)].range[0],n[n.length-1].range[1]]),void 0!==(S=this.performAction.apply(L,[l,d,c,y.yy,m[1],s,n].concat(h))))return S;k&&(a=a.slice(0,-1*k*2),s=s.slice(0,-1*k),n=n.slice(0,-1*k)),a.push(this.productions_[m[1]][0]),s.push(L.$),n.push(L._$),S=o[a[a.length-2]][a[a.length-1]],a.push(S);break;case 3:return!0}}return!0},"parse")},p={EOF:1,parseError:D(function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},"parseError"),setInput:D(function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},"setInput"),input:D(function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},"input"),unput:D(function(t){var e=t.length,r=t.split(/(?:\r\n?|\n)/g),a=(this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e,t=this.match.split(/(?:\r\n?|\n)/g),this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),r.length-1&&(this.yylineno-=r.length-1),this.yylloc.range);return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:r?(r.length===t.length?this.yylloc.first_column:0)+t[t.length-r.length].length-r[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[a[0],a[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},"unput"),more:D(function(){return this._more=!0,this},"more"),reject:D(function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"reject"),less:D(function(t){this.unput(this.match.slice(t))},"less"),pastInput:D(function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(20<t.length?"...":"")+t.substr(-20).replace(/\n/g,"")},"pastInput"),upcomingInput:D(function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(20<t.length?"...":"")).replace(/\n/g,"")},"upcomingInput"),showPosition:D(function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},"showPosition"),test_match:D(function(t,e){var r,a;if(this.options.backtrack_lexer&&(a={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges)&&(a.yylloc.range=this.yylloc.range.slice(0)),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],r=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),r)return r;if(this._backtrack)for(var i in a)this[i]=a[i];return!1},"test_match"),next:D(function(){if(this.done)return this.EOF;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var t,e,r,a,i=this._currentRules(),s=0;s<i.length;s++)if((r=this._input.match(this.rules[i[s]]))&&(!e||r[0].length>e[0].length))if(e=r,a=s,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[s])))return t;if(!this._backtrack)return!1;e=!1}else if(!this.options.flex)break;return e?!1!==(t=this.test_match(e,i[a]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},"next"),lex:D(function(){return this.next()||this.lex()},"lex"),begin:D(function(t){this.conditionStack.push(t)},"begin"),popState:D(function(){return 0<this.conditionStack.length-1?this.conditionStack.pop():this.conditionStack[0]},"popState"),_currentRules:D(function(){return(this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]]:this.conditions.INITIAL).rules},"_currentRules"),topState:D(function(t){return 0<=(t=this.conditionStack.length-1-Math.abs(t||0))?this.conditionStack[t]:"INITIAL"},"topState"),pushState:D(function(t){this.begin(t)},"pushState"),stateStackSize:D(function(){return this.conditionStack.length},"stateStackSize"),options:{},performAction:D(function(t,e,r,a){switch(r){case 0:return t.getLogger().debug("Found block-beta"),10;case 1:return t.getLogger().debug("Found id-block"),29;case 2:return t.getLogger().debug("Found block"),10;case 3:t.getLogger().debug(".",e.yytext);break;case 4:t.getLogger().debug("_",e.yytext);break;case 5:return 5;case 6:return e.yytext=-1,28;case 7:return e.yytext=e.yytext.replace(/columns\s+/,""),t.getLogger().debug("COLUMNS (LEX)",e.yytext),28;case 8:case 76:case 77:case 99:this.pushState("md_string");break;case 9:return"MD_STR";case 10:case 34:case 79:this.popState();break;case 11:this.pushState("string");break;case 12:t.getLogger().debug("LEX: POPPING STR:",e.yytext),this.popState();break;case 13:return t.getLogger().debug("LEX: STR end:",e.yytext),"STR";case 14:return e.yytext=e.yytext.replace(/space\:/,""),t.getLogger().debug("SPACE NUM (LEX)",e.yytext),21;case 15:return e.yytext="1",t.getLogger().debug("COLUMNS (LEX)",e.yytext),21;case 16:return 42;case 17:return"LINKSTYLE";case 18:return"INTERPOLATE";case 19:return this.pushState("CLASSDEF"),39;case 20:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 21:return this.popState(),this.pushState("CLASSDEFID"),40;case 22:return this.popState(),41;case 23:return this.pushState("CLASS"),43;case 24:return this.popState(),this.pushState("CLASS_STYLE"),44;case 25:return this.popState(),45;case 26:return this.pushState("STYLE_STMNT"),46;case 27:return this.popState(),this.pushState("STYLE_DEFINITION"),47;case 28:return this.popState(),48;case 29:return this.pushState("acc_title"),"acc_title";case 30:return this.popState(),"acc_title_value";case 31:return this.pushState("acc_descr"),"acc_descr";case 32:return this.popState(),"acc_descr_value";case 33:this.pushState("acc_descr_multiline");break;case 35:return"acc_descr_multiline_value";case 36:return 30;case 37:case 38:case 40:case 41:case 44:return this.popState(),t.getLogger().debug("Lex: (("),"NODE_DEND";case 39:return this.popState(),t.getLogger().debug("Lex: ))"),"NODE_DEND";case 42:return this.popState(),t.getLogger().debug("Lex: (-"),"NODE_DEND";case 43:return this.popState(),t.getLogger().debug("Lex: -)"),"NODE_DEND";case 45:return this.popState(),t.getLogger().debug("Lex: ]]"),"NODE_DEND";case 46:return this.popState(),t.getLogger().debug("Lex: ("),"NODE_DEND";case 47:return this.popState(),t.getLogger().debug("Lex: ])"),"NODE_DEND";case 48:case 49:return this.popState(),t.getLogger().debug("Lex: /]"),"NODE_DEND";case 50:return this.popState(),t.getLogger().debug("Lex: )]"),"NODE_DEND";case 51:return this.popState(),t.getLogger().debug("Lex: )"),"NODE_DEND";case 52:return this.popState(),t.getLogger().debug("Lex: ]>"),"NODE_DEND";case 53:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 54:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),35;case 55:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),35;case 56:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),35;case 57:case 59:case 60:case 61:case 64:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),35;case 58:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),35;case 62:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),35;case 63:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),35;case 65:case 66:case 67:case 68:case 69:case 70:case 71:return this.pushState("NODE"),35;case 72:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),35;case 73:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),37;case 74:return t.getLogger().debug("Lex: NODE_ID",e.yytext),31;case 75:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 78:return"NODE_DESCR";case 80:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 81:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 82:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 83:t.getLogger().debug("LEX POPPING"),this.popState();break;case 84:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 85:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 91:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 92:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 93:case 94:case 95:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 96:case 97:case 98:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 101:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 102:case 103:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 104:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block:)/,/^(?:block\b)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:=]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[28],inclusive:!1},STYLE_STMNT:{rules:[27],inclusive:!1},CLASSDEFID:{rules:[22],inclusive:!1},CLASSDEF:{rules:[20,21],inclusive:!1},CLASS_STYLE:{rules:[25],inclusive:!1},CLASS:{rules:[24],inclusive:!1},LLABEL:{rules:[99,100,101,102,103],inclusive:!1},ARROW_DIR:{rules:[85,86,87,88,89,90,91],inclusive:!1},BLOCK_ARROW:{rules:[76,81,84],inclusive:!1},NODE:{rules:[37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,77,80],inclusive:!1},md_string:{rules:[9,10,78,79],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[12,13,82,83],inclusive:!1},acc_descr_multiline:{rules:[34,35],inclusive:!1},acc_descr:{rules:[32],inclusive:!1},acc_title:{rules:[30],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,11,14,15,16,17,18,19,23,26,29,31,33,36,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,92,93,94,95,96,97,98,104],inclusive:!0}}};function x(){this.yy={}}return u.lexer=p,D(x,"Parser"),new((x.prototype=u).Parser=x)})(),rt=et.parser=et,at=new Map,it=[],st=new Map,nt="color",ot="fill",lt=new Map,ct="",dt=D(t=>U.sanitizeText(t,N()),"sanitizeText"),ht=D(function(t,e=""){let r=lt.get(t);r||(r={id:t,styles:[],textStyles:[]},lt.set(t,r)),null!=e&&e.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp(nt).exec(t)&&(t=e.replace(ot,"bgFill").replace(nt,ot),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),gt=D(function(t,e=""){t=at.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),yt=D(function(t,e){t.split(",").forEach(function(t){let r=at.get(t);void 0===r&&(r={id:t=t.trim(),type:"na",children:[]},at.set(t,r)),r.classes||(r.classes=[]),r.classes.push(e)})},"setCssClass"),ut=D((t,e)=>{t=t.flat();var r,a=[],i=t.find(t=>"column-setting"===t?.type)?.columns??-1;for(r of t)if("number"==typeof i&&0<i&&"column-setting"!==r.type&&"number"==typeof r.widthInColumns&&r.widthInColumns>i&&I.warn(`Block ${r.id} width ${r.widthInColumns} exceeds configured column width `+i),r.label&&(r.label=dt(r.label)),"classDef"===r.type)ht(r.id,r.css);else if("applyClass"===r.type)yt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&>(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var s=(st.get(r.id)??0)+1;st.set(r.id,s),r.id=s+"-"+r.id,it.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(s=at.get(r.id))?at.set(r.id,r):("na"!==r.type&&(s.type=r.type),r.label!==r.id&&(s.label=r.label)),r.children&&ut(r.children,r),"space"===r.type){var n=r.width??1;for(let t=0;t<n;t++){var o=J(r);o.id=o.id+"-"+t,at.set(o.id,o),a.push(o)}}else void 0===s&&a.push(r);e.children=a},"populateBlockDatabase"),pt=[],xt={id:"root",type:"composite",children:[],columns:-1},bt=D(()=>{I.debug("Clear called"),W(),xt={id:"root",type:"composite",children:[],columns:-1},at=new Map([["root",xt]]),pt=[],lt=new Map,it=[],st=new Map,ct=""},"clear");function ft(t){switch(I.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return I.debug("we have a round"),"round";case"(())":return"circle";case">]":return"rect_left_inv_arrow";case"{}":return"diamond";case"{{}}":return"hexagon";case"([])":return"stadium";case"[[]]":return"subroutine";case"[()]":return"cylinder";case"((()))":return"doublecircle";case"[//]":return"lean_right";case"[\\\\]":return"lean_left";case"[/\\]":return"trapezoid";case"[\\/]":return"inv_trapezoid";case"<[]>":return"block_arrow";default:return"na"}}function mt(t){return I.debug("typeStr2Type",t),"=="!==t?"normal":"thick"}function wt(t){switch(t.trim().slice(-1)){case"x":return"arrow_cross";case"o":return"arrow_circle";case">":return"arrow_point";default:return""}}function kt(t){switch(t.trim().charAt(0)){case"x":return"arrow_cross";case"o":return"arrow_circle";case"<":return"arrow_point";default:return"arrow_open"}}function St(t){return t.includes("==")?"thick":"normal"}function Lt(t){return t.includes(".-")?"dotted":"solid"}D(ft,"typeStr2Type"),D(mt,"edgeTypeStr2Type"),D(wt,"edgeStrToEdgeData"),D(kt,"edgeStrToEdgeStartData"),D(St,"edgeStrToThickness"),D(Lt,"edgeStrToPattern");var _t=0,vt=D(()=>(_t++,"id-"+Math.random().toString(36).substr(2,12)+"-"+_t),"generateId"),Et=D(t=>{xt.children=t,ut(t,xt),pt=xt.children},"setHierarchy"),Tt=D(t=>(t=at.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),Dt=D(()=>[...at.values()],"getBlocksFlat"),It=D(()=>pt||[],"getBlocks"),Nt=D(()=>it,"getEdges"),$t=D(t=>at.get(t),"getBlock"),Ct=D(t=>{at.set(t.id,t)},"setBlock"),Bt=D(t=>{ct=t},"setDiagramId"),Ot=D(()=>ct,"getDiagramId"),Rt=D(()=>I,"getLogger"),zt=D(function(){return lt},"getClasses"),At={getConfig:D(()=>B().block,"getConfig"),typeStr2Type:ft,edgeTypeStr2Type:mt,edgeStrToEdgeData:wt,edgeStrToEdgeStartData:kt,edgeStrToThickness:St,edgeStrToPattern:Lt,getLogger:Rt,getBlocksFlat:Dt,getBlocks:It,getEdges:Nt,setHierarchy:Et,getBlock:$t,setBlock:Ct,getColumns:Tt,getClasses:zt,clear:bt,generateId:vt,setDiagramId:Bt,getDiagramId:Ot},Mt=D((t,e)=>{var r=(i=G)(t,"r"),a=i(t,"g"),i=i(t,"b");return X(r,a,i,e)},"fade"),Pt=D(t=>`.label {\n font-family: ${t.fontFamily};\n color: ${t.nodeTextColor||t.textColor};\n }\n .cluster-label text {\n fill: ${t.titleColor};\n }\n .cluster-label span,p {\n color: ${t.titleColor};\n }\n\n\n\n .label text,span,p {\n fill: ${t.nodeTextColor||t.textColor};\n color: ${t.nodeTextColor||t.textColor};\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ${t.mainBkg};\n stroke: ${t.nodeBorder};\n stroke-width: 1px;\n }\n .flowchart-label text {\n text-anchor: middle;\n }\n // .flowchart-label .text-outer-tspan {\n // text-anchor: middle;\n // }\n // .flowchart-label .text-inner-tspan {\n // text-anchor: start;\n // }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ${t.arrowheadColor};\n }\n\n .edgePath .path {\n stroke: ${t.lineColor};\n stroke-width: 2.0px;\n }\n\n .flowchart-link {\n stroke: ${t.lineColor};\n fill: none;\n }\n\n .edgeLabel {\n background-color: ${t.edgeLabelBackground};\n /*\n * This is for backward compatibility with existing code that didn't\n * add a \`<p>\` around edge labels.\n *\n * TODO: We should probably remove this in a future release.\n */\n p {\n margin: 0;\n padding: 0;\n display: inline;\n }\n rect {\n opacity: 0.5;\n background-color: ${t.edgeLabelBackground};\n fill: ${t.edgeLabelBackground};\n }\n text-align: center;\n }\n\n /* For html labels only */\n .labelBkg {\n background-color: ${t.edgeLabelBackground};\n }\n\n .node .cluster {\n // fill: ${Mt(t.mainBkg,.5)};\n fill: ${Mt(t.clusterBkg,.5)};\n stroke: ${Mt(t.clusterBorder,.2)};\n box-shadow: rgba(50, 50, 93, 0.25) 0px 13px 27px -5px, rgba(0, 0, 0, 0.3) 0px 8px 16px -8px;\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ${t.titleColor};\n }\n\n .cluster span,p {\n color: ${t.titleColor};\n }\n /* .cluster div {\n color: ${t.titleColor};\n } */\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ${t.fontFamily};\n font-size: 12px;\n background: ${t.tertiaryColor};\n border: 1px solid ${t.border2};\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .flowchartTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n ${r()}\n`,"getStyles"),Yt=Pt,jt=D((t,e,r,a)=>{e.forEach(e=>{Gt[e](t,r,a)})},"insertMarkers"),Ft=D((t,e,r)=>{I.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),Wt=D((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),Xt=D((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),Ht=D((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),Ut=D((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),Kt=D((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),Zt=D((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),qt=D((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),Vt=D((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),Gt={extension:Ft,composition:Wt,aggregation:Xt,dependency:Ht,lollipop:Ut,point:Kt,circle:Zt,cross:qt,barb:Vt},Jt=jt;function Qt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}D(Qt,"calculateBlockPosition");var te=D(t=>{let e=0,r=0;for(var a of t.children){var{width:i,height:s,x:n,y:o}=a.size??{width:0,height:0,x:0,y:0};I.debug("getMaxChildSize abc95 child:",a.id,"width:",i,"height:",s,"x:",n,"y:",o,a.type),"space"!==a.type&&((n=i/(a.widthInColumns??1))>e&&(e=n),s>r)&&(r=s)}return{width:e,height:r}},"getMaxChildSize");function ee(t,e,r=0,a=0,i=8){if(I.debug("setBlockSizes abc95 (start)",t.id,t?.size?.x,"block width =",t?.size,"siblingWidth",r),t?.size?.width||(t.size={width:r,height:a,x:0,y:0}),0<t.children?.length){for(var s of t.children)ee(s,e,0,0,i);var n,o,l,c=(h=te(t)).width;for(o of(I.debug("setBlockSizes abc95 maxWidth of",t.id,":s children is ",c,n=h.height),t.children))o.size&&(I.debug(`abc95 Setting size of children of ${t.id} id=${o.id} ${c} ${n} `+JSON.stringify(o.size)),o.size.width=c*(o.widthInColumns??1)+i*((o.widthInColumns??1)-1),o.size.height=n,o.size.x=0,o.size.y=0,I.debug(`abc95 updating size of ${t.id} children child:${o.id} maxWidth:${c} maxHeight:`+n));for(l of t.children)ee(l,e,c,n,i);var d,h=t.columns??-1;let f=0;for(d of t.children)f+=d.widthInColumns??1;let m=t.children.length;0<h&&h<f&&(m=h);var g=Math.ceil(f/m);let w=m*(c+i)+i,k=g*(n+i)+i;if(w<r){I.debug(`Detected to small sibling: abc95 ${t.id} siblingWidth ${r} siblingHeight ${a} width `+w),w=r,k=a;var y,u=(r-m*i-i)/m,p=(a-g*i-i)/g;for(y of(I.debug("Size indata abc88",t.id,"childWidth",u,"maxWidth",c),I.debug("Size indata abc88",t.id,"childHeight",p,"maxHeight",n),I.debug("Size indata abc88 xSize",m,"padding",i),t.children))y.size&&(y.size.width=u,y.size.height=p,y.size.x=0,y.size.y=0)}if(I.debug(`abc95 (finale calc) ${t.id} xSize ${m} ySize ${g} columns ${h}${t.children.length} width=`+Math.max(w,t.size?.width||0)),w<(t?.size?.width||0)&&(w=t?.size?.width||0,0<(r=0<h?Math.min(t.children.length,h):t.children.length))){var x,b=(w-r*i-i)/r;for(x of(I.debug("abc95 (growing to fit) width",t.id,w,t.size?.width,b),t.children))x.size&&(x.size.width=b)}t.size={width:w,height:k,x:0,y:0}}I.debug("setBlockSizes abc94 (done)",t.id,t?.size?.x,t?.size?.width,t?.size?.y,t?.size?.height)}function re(t,e,r=8){I.debug(`abc85 layout blocks (=>layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: `+t?.size?.width);var a=t.columns??-1;if(I.debug("layoutBlocks columns abc95",t.id,"=>",a,t),t.children&&0<t.children.length){var i=t?.children[0]?.size?.width??0,s=(i=t.children.length*i+(t.children.length-1)*r,I.debug("widthOfChildren 88",i,"posX"),new Map);{let e=0;for(var n of t.children)if(n.size){var o=Qt(a,e).py,l=s.get(o)??0;n.size.height>l&&s.set(o,n.size.height);let t=n?.widthInColumns??1;0<a&&(t=Math.min(t,a-e%a)),e+=t}}var c,d,h=new Map;{let t=0;for(c of[...s.keys()].sort((t,e)=>t-e))h.set(c,t),t+=(s.get(c)??0)+r}let f=0,m=(I.debug("abc91 block?.size?.x",t.id,t?.size?.x),t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r),w=0;for(d of t.children){var g=t;if(d.size){var y,{width:u,height:p}=d.size,{px:x,py:b}=Qt(a,f);b!=w&&(w=b,m=t?.size?.x?t?.size?.x+(-t?.size?.width/2||0):-r,I.debug("New row in layout for block",t.id," and child ",d.id,w)),I.debug(`abc89 layout blocks (child) id: ${d.id} Pos: ${f} (px, py) ${x},${b} (${g?.size?.x},${g?.size?.y}) parent: ${g.id} width: `+u+r),g.size&&(x=u/2,d.size.x=m+r+x,I.debug(`abc91 layout blocks (calc) px, pyid:${d.id} startingPos=X${m} new startingPosX${d.size.x} ${x} padding=${r} width=${u} halfWidth=${x} => x:${d.size.x} y:${d.size.y} ${d.widthInColumns} (width * (child?.w || 1)) / 2 `+u*(d?.widthInColumns??1)/2),m=d.size.x+x,y=h.get(b)??0,b=s.get(b)??p,d.size.y=g.size.y-g.size.height/2+y+b/2+r,I.debug(`abc88 layout blocks (calc) px, pyid:${d.id}startingPosX${m}${r}${x}=>x:${d.size.x}y:${d.size.y}${d.widthInColumns}(width * (child?.w || 1)) / 2`+u*(d?.widthInColumns??1)/2)),d.children&&re(d,e,r);let i=d?.widthInColumns??1;0<a&&(i=Math.min(i,a-f%a)),f+=i,I.debug("abc88 columnsPos",d,f)}}}I.debug(`layout blocks (<==layoutBlocks) ${t.id} x: ${t?.size?.x} y: ${t?.size?.y} width: `+t?.size?.width)}function ae(t,{minX:e,minY:r,maxX:a,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var s,n,o,l;if(t.size&&"root"!==t.id&&(({x:s,y:n,width:o,height:l}=t.size),s-o/2<e&&(e=s-o/2),n-l/2<r&&(r=n-l/2),a<s+o/2&&(a=s+o/2),i<n+l/2)&&(i=n+l/2),t.children)for(var c of t.children)({minX:e,minY:r,maxX:a,maxY:i}=ae(c,{minX:e,minY:r,maxX:a,maxY:i}));return{minX:e,minY:r,maxX:a,maxY:i}}function ie(t){var e,r,a=t.getBlock("root");if(a)return({minX:t,minY:e,maxX:a,maxY:r}=(ee(a,t,0,0,e=N()?.block?.padding??8),re(a,t,e),I.debug("getBlocks",JSON.stringify(a,null,2)),ae(a))),{x:t,y:e,width:a-t,height:r-e}}D(ee,"setBlockSizes"),D(re,"layoutBlocks"),D(ae,"findBounds"),D(ie,"layout");var se=D(async(t,e,r,a=!1,i=!1)=>{let s=e||"";"object"==typeof s&&(s=s[0]);e=N();var n=$(e);return O(t,s,{style:r,isTitle:a,useHtmlLabels:n,markdown:!1,isNode:i,width:Number.POSITIVE_INFINITY},e)},"createLabel"),ne=se,oe=D((t,e,r,a,i)=>{e.arrowTypeStart&&ce(t,"start",e.arrowTypeStart,r,a,i),e.arrowTypeEnd&&ce(t,"end",e.arrowTypeEnd,r,a,i)},"addEdgeMarkers"),le={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},ce=D((t,e,r,a,i,s)=>{var n=le[r];n?t.attr("marker-"+e,`url(${a}#${i}_${s}-${n}${"start"===e?"Start":"End"})`):I.warn("Unknown arrow type: "+r)},"addEdgeMarker"),de={},he={},ge=D(async(t,e)=>{var r=N(),a=$(r),i=t.insert("g").attr("class","edgeLabel"),s=i.insert("g").attr("class","label"),n="markdown"===e.labelType;n=await O(t,e.label,{style:e.labelStyle,useHtmlLabels:a,addSvgBackground:n,isNode:!1,markdown:n,width:n?void 0:Number.POSITIVE_INFINITY},r);s.node().appendChild(n);let o,l=n.getBBox(),c=l;if(a?(r=n.children[0],d=R(n),l=r.getBoundingClientRect(),c=l,d.attr("width",l.width),d.attr("height",l.height)):(r=R(n).select("text").node())&&"function"==typeof r.getBBox&&(c=r.getBBox()),s.attr("transform",z(c,a)),de[e.id]=i,e.width=l.width,e.height=l.height,e.startLabelLeft){var d=t.insert("g").attr("class","edgeTerminals");r=d.insert("g").attr("class","inner");let n=(o=s=await ne(r,e.startLabelLeft,e.labelStyle)).getBBox();a&&(i=s.children[0],s=R(s),n=i.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height)),r.attr("transform",z(n,a)),he[e.id]||(he[e.id]={}),he[e.id].startLeft=d,ye(o,e.startLabelLeft)}if(e.startLabelRight){s=(i=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let n=(o=r=await ne(s,e.startLabelRight,e.labelStyle)).getBBox();a&&(d=r.children[0],r=R(r),n=d.getBoundingClientRect(),r.attr("width",n.width),r.attr("height",n.height)),s.attr("transform",z(n,a)),he[e.id]||(he[e.id]={}),he[e.id].startRight=i,ye(o,e.startLabelRight)}if(e.endLabelLeft){r=(d=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let n=(o=s=await ne(d,e.endLabelLeft,e.labelStyle)).getBBox();a&&(i=s.children[0],s=R(s),n=i.getBoundingClientRect(),s.attr("width",n.width),s.attr("height",n.height)),r.attr("transform",z(n,a)),he[e.id]||(he[e.id]={}),he[e.id].endLeft=d,ye(o,e.endLabelLeft)}if(e.endLabelRight){s=(i=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner");let n=(o=r=await ne(i,e.endLabelRight,e.labelStyle)).getBBox();a&&(d=r.children[0],t=R(r),n=d.getBoundingClientRect(),t.attr("width",n.width),t.attr("height",n.height)),s.attr("transform",z(n,a)),he[e.id]||(he[e.id]={}),he[e.id].endRight=i,ye(o,e.endLabelRight)}return n},"insertEdgeLabel");function ye(t,e){$(N())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}D(ye,"setTerminalWidth");var ue=D((t,e)=>{I.debug("Moving label abc88 ",t.id,t.label,de[t.id],e);var r=e.updatedPath||e.originalPath,a=N();a=A(a).subGraphTitleTotalMargin;if(t.label){var i=de[t.id];let n=t.x,o=t.y;r&&(s=M.calcLabelPosition(r),I.debug("Moving label "+t.label+" from (",n,",",o,") to (",s.x,",",s.y,") abc88"),e.updatedPath)&&(n=s.x,o=s.y),i.attr("transform",`translate(${n}, ${o+a/2})`)}if(t.startLabelLeft){e=he[t.id].startLeft;let a=t.x,i=t.y;r&&(a=(s=M.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r)).x,i=s.y),e.attr("transform",`translate(${a}, ${i})`)}if(t.startLabelRight){i=he[t.id].startRight;let e=t.x,s=t.y;r&&(e=(a=M.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r)).x,s=a.y),i.attr("transform",`translate(${e}, ${s})`)}if(t.endLabelLeft){var s=he[t.id].endLeft;let a=t.x,i=t.y;r&&(a=(e=M.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r)).x,i=e.y),s.attr("transform",`translate(${a}, ${i})`)}if(t.endLabelRight){a=he[t.id].endRight;let e=t.x,s=t.y;r&&(e=(i=M.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r)).x,s=i.y),a.attr("transform",`translate(${e}, ${s})`)}},"positionEdgeLabel"),pe=D((t,e)=>{var r=t.x,a=t.y;r=Math.abs(e.x-r),e=Math.abs(e.y-a);return t.width/2<=r||t.height/2<=e},"outsideNode"),xe=D((t,e,r)=>{I.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);var a=t.x,i=t.y,s=Math.abs(a-r.x),n=t.width/2;let o=r.x<e.x?n-s:n+s;s=t.height/2,t=Math.abs(e.y-r.y);var l=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*n>Math.abs(a-e.x)*s)return o=l*(i=r.y<e.y?e.y-s-i:i-s-e.y)/t,s={x:r.x<e.x?r.x+o:r.x-l+o,y:r.y<e.y?r.y+t-i:r.y-t+i},0===o&&(s.x=e.x,s.y=e.y),0===l&&(s.x=e.x),0===t&&(s.y=e.y),I.debug(`abc89 topp/bott calc, Q ${t}, q ${i}, R ${l}, r `+o,s),s;{i=t*(o=r.x<e.x?e.x-n-a:a-n-e.x)/l;let s=r.x<e.x?r.x+l-o:r.x-l+o,c=r.y<e.y?r.y+i:r.y-i;return I.debug(`sides calc abc89, Q ${t}, q ${i}, R ${l}, r `+o,{_x:s,_y:c}),0===o&&(s=e.x,c=e.y),0===l&&(s=e.x),0===t&&(c=e.y),{x:s,y:c}}},"intersection"),be=D((t,e)=>{I.debug("abc88 cutPathAtIntersect",t,e);let r=[],a=t[0],i=!1;return t.forEach(t=>{if(pe(e,t)||i)a=t,i||r.push(t);else{let s=xe(e,a,t),n=!1;r.forEach(t=>{n=n||t.x===s.x&&t.y===s.y}),r.some(t=>t.x===s.x&&t.y===s.y)||r.push(s),i=!0}}),r},"cutPathAtIntersect"),fe=D(function(t,e,r,a,i,s,n){let o=r.points,l=(I.debug("abc88 InsertEdge: edge=",r,"e=",e),!1);var c=s.node(e.v);s=s.node(e.w),s?.intersect&&c?.intersect&&((o=o.slice(1,r.points.length-1)).unshift(c.intersect(o[0])),o.push(s.intersect(o[o.length-1]))),r.toCluster&&(I.debug("to cluster abc88",a[r.toCluster]),o=be(r.points,a[r.toCluster].node),l=!0),r.fromCluster&&(I.debug("from cluster abc88",a[r.fromCluster]),o=be(o.reverse(),a[r.fromCluster].node).reverse(),l=!0),e=o.filter(t=>!Number.isNaN(t.y));let d=H;!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve);var{x:c,y:s}=P(r);a=Y().x(c).y(s).curve(d);let h;switch(r.thickness){case"normal":h="edge-thickness-normal";break;case"thick":case"invisible":h="edge-thickness-thick";break;default:h=""}switch(r.pattern){case"solid":h+=" edge-pattern-solid";break;case"dotted":h+=" edge-pattern-dotted";break;case"dashed":h+=" edge-pattern-dashed"}c=t.append("path").attr("d",a(e)).attr("id",r.id).attr("class"," "+h+(r.classes?" "+r.classes:"")).attr("style",r.style);let g="";return(N().flowchart.arrowMarkerAbsolute||N().state.arrowMarkerAbsolute)&&(g=j(!0)),oe(c,r,g,n,i),s={},l&&(s.updatedPath=o),s.originalPath=r.points,s},"insertEdge"),me=D(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),we=D((t,e,r,a)=>{t=me(t);var i=e.height+2*r.padding,s=i/2;a=a??e.width+2*s+r.padding,e=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:s,y:0},{x:a/2,y:2*e},{x:a-s,y:0},{x:a,y:0},{x:a,y:-i/3},{x:a+2*e,y:-i/2},{x:a,y:-2*i/3},{x:a,y:-i},{x:a-s,y:-i},{x:a/2,y:-i-2*e},{x:s,y:-i},{x:0,y:-i},{x:0,y:-2*i/3},{x:-2*e,y:-i/2},{x:0,y:-i/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:s,y:0},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:s,y:-i},{x:0,y:-i/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:s,y:-i},{x:a-s,y:-i},{x:a,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:a,y:-s},{x:a,y:s-i},{x:0,y:-i}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:a,y:0},{x:0,y:-s},{x:0,y:s-i},{x:a,y:-i}]:t.has("right")&&t.has("left")?[{x:s,y:0},{x:s,y:-e},{x:a-s,y:-e},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:a-s,y:e-i},{x:s,y:e-i},{x:s,y:-i},{x:0,y:-i/2}]:t.has("up")&&t.has("down")?[{x:a/2,y:0},{x:0,y:-e},{x:s,y:-e},{x:s,y:e-i},{x:0,y:e-i},{x:a/2,y:-i},{x:a,y:e-i},{x:a-s,y:e-i},{x:a-s,y:-e},{x:a,y:-e}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:a,y:-s},{x:0,y:-i}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:a,y:0},{x:0,y:-i}]:t.has("left")&&t.has("up")?[{x:a,y:0},{x:0,y:-s},{x:a,y:-i}]:t.has("left")&&t.has("down")?[{x:a,y:0},{x:0,y:0},{x:a,y:-i}]:t.has("right")?[{x:s,y:-e},{x:s,y:-e},{x:a-s,y:-e},{x:a-s,y:0},{x:a,y:-i/2},{x:a-s,y:-i},{x:a-s,y:e-i},{x:s,y:e-i},{x:s,y:e-i}]:t.has("left")?[{x:s,y:0},{x:s,y:-e},{x:a-s,y:-e},{x:a-s,y:e-i},{x:s,y:e-i},{x:s,y:-i},{x:0,y:-i/2}]:t.has("up")?[{x:s,y:-e},{x:s,y:e-i},{x:0,y:e-i},{x:a/2,y:-i},{x:a,y:e-i},{x:a-s,y:e-i},{x:a-s,y:-e}]:t.has("down")?[{x:a/2,y:0},{x:0,y:-e},{x:s,y:-e},{x:s,y:e-i},{x:a-s,y:e-i},{x:a-s,y:-e},{x:a,y:-e}]:[{x:0,y:0}]},"getArrowPoints");function ke(t,e){return t.intersect(e)}D(ke,"intersectNode");var Se=ke;function Le(t,e,r,a){var i=t.x,s=(t=t.y,i-a.x),n=t-a.y,o=Math.sqrt(e*e*n*n+r*r*s*s);s=Math.abs(e*r*s/o),a.x<i&&(s=-s),e=Math.abs(e*r*n/o);return{x:i+s,y:t+(e=a.y<t?-e:e)}}D(Le,"intersectEllipse");var _e=Le;function ve(t,e,r){return _e(t,e,e,r)}D(ve,"intersectCircle");var Ee=ve;function Te(t,e,r,a){var i,s=e.y-t.y,n=t.x-e.x,o=e.x*t.y-t.x*e.y,l=s*r.x+n*r.y+o,c=s*a.x+n*a.y+o;if(!(0!=l&&0!=c&&De(l,c)||(r=(l=a.y-r.y)*e.x+(c=r.x-a.x)*e.y+(e=a.x*r.y-r.x*a.y),0!=(a=l*t.x+c*t.y+e)&&0!=r&&De(a,r))||0==(i=s*c-l*n)))return t=Math.abs(i/2),{x:(a=n*e-c*o)<0?(a-t)/i:(a+t)/i,y:(a=l*o-s*e)<0?(a-t)/i:(a+t)/i}}function De(t,e){return 0<t*e}D(Te,"intersectLine"),D(De,"sameSign");var Ie=Te,Ne=$e;function $e(t,e,r){for(var a=t.x,i=t.y,s=[],n=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY,l=("function"==typeof e.forEach?e.forEach(function(t){n=Math.min(n,t.x),o=Math.min(o,t.y)}):(n=Math.min(n,e.x),o=Math.min(o,e.y)),a-t.width/2-n),c=i-t.height/2-o,d=0;d<e.length;d++){var h=e[d],g=e[d<e.length-1?d+1:0];(h=Ie(t,r,{x:l+h.x,y:c+h.y},{x:l+g.x,y:c+g.y}))&&s.push(h)}return s.length?(1<s.length&&s.sort(function(t,e){var a=t.x-r.x;t=t.y-r.y,a=Math.sqrt(a*a+t*t),t=e.x-r.x,e=e.y-r.y;return a<(t=Math.sqrt(t*t+e*e))?-1:a===t?0:1}),s[0]):t}D($e,"intersectPolygon");var Ce=D((t,e)=>{var r,a=t.x,i=t.y,s=e.x-a,n=(e=e.y-i,t.width/2);t=t.height/2,t=Math.abs(e)*n>Math.abs(s)*t?(e<0&&(t=-t),r=0==e?0:t*s/e,t):(r=n=s<0?-n:n,0==s?0:n*e/s);return{x:a+r,y:i+t}},"intersectRect"),Be={node:Se,circle:Ee,ellipse:_e,polygon:Ne,rect:Ce},Oe=D(async(t,e,r,a)=>{var i=N();let s;var n=e.useHtmlLabels||$(i);t=(r=(s=r||"node default",t.insert("g").attr("class",s).attr("id",e.domId||e.id))).insert("g").attr("class","label").attr("style",e.labelStyle);let o;o=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0];let l,c=(l="markdown"===e.labelType?O(t,K(Z(o),i),{useHtmlLabels:n,width:e.width||i.flowchart.wrappingWidth,classes:"markdown-node-label"},i):await ne(t,K(Z(o),i),e.labelStyle,!1,a)).getBBox();var d;a=e.padding/2;return $(i)&&(i=l.children[0],d=R(l),await q(i,o),c=i.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)),n?t.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):t.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&t.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),t.insert("rect",":first-child"),{shapeSvg:r,bbox:c,halfPadding:a,label:t}},"labelHelper"),Re=D((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds");function ze(t,e,r,a){return t.insert("polygon",":first-child").attr("points",a.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}D(ze,"insertPolygonShape");var Ae=D(async(t,e)=>{e.useHtmlLabels||$(N())||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:a}=await Oe(t,e,"node "+e.classes,!0),i=(I.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-a).attr("y",-r.height/2-a).attr("width",r.width+e.padding).attr("height",r.height+e.padding),Re(e,i),e.intersect=function(t){return Be.rect(e,t)},t},"note"),Me=Ae,Pe=D(t=>t?" "+t:"","formatClass"),Ye=D((t,e)=>`${e||"node default"}${Pe(t.classes)} `+Pe(t.class),"getClassesFromNode"),je=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0);let a=[{x:(r=r.width+e.padding+(r.height+e.padding))/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}];return I.info("Question main (Circle)"),(r=ze(t,r,r,a)).attr("style",e.style),Re(e,r),e.intersect=function(t){return I.warn("Intersect called"),Be.polygon(e,a,t)},t},"question"),Fe=D((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("polygon",":first-child").attr("points",[{x:0,y:14},{x:14,y:0},{x:0,y:-14},{x:-14,y:0}].map(function(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return Be.circle(e,14,t)},t),"choice"),We=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=e.positioned?e.height:r.height+e.padding,i=a/4;let s=[{x:i,y:0},{x:(r=e.positioned?e.width:r.width+2*i+e.padding)-i,y:0},{x:r,y:-a/2},{x:r-i,y:-a},{x:i,y:-a},{x:0,y:-a/2}];return(i=ze(t,r,a,s)).attr("style",e.style),Re(e,i),e.intersect=function(t){return Be.polygon(e,s,t)},t},"hexagon"),Xe=D(async(t,e)=>{var{shapeSvg:t,bbox:r}=await Oe(t,e,void 0,!0),a=r.height+2*e.padding,i=r.width+a/2*2+e.padding;i=e.positioned&&1<(e.widthInColumns??1)&&e.width>i?e.width:i;let s=we(e.directions,r,e,i);return(r=ze(t,i,a,s)).attr("style",e.style),Re(e,r),e.intersect=function(t){return Be.polygon(e,s,t)},t},"block_arrow"),He=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=[{x:-(r=r.height+e.padding)/2,y:0},{x:a,y:0},{x:a,y:-r},{x:-r/2,y:-r},{x:0,y:-r/2}];return ze(t,a,r,i).attr("style",e.style),e.width=a+r,e.height=r,e.intersect=function(t){return Be.polygon(e,i,t)},t},"rect_left_inv_arrow"),Ue=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e),!0),a=r.width+e.padding;let i=[{x:-2*(r=r.height+e.padding)/6,y:0},{x:a-r/6,y:0},{x:a+2*r/6,y:-r},{x:r/6,y:-r}];return(a=ze(t,a,r,i)).attr("style",e.style),Re(e,a),e.intersect=function(t){return Be.polygon(e,i,t)},t},"lean_right"),Ke=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=[{x:2*(r=r.height+e.padding)/6,y:0},{x:a+r/6,y:0},{x:a-2*r/6,y:-r},{x:-r/6,y:-r}];return(a=ze(t,a,r,i)).attr("style",e.style),Re(e,a),e.intersect=function(t){return Be.polygon(e,i,t)},t},"lean_left"),Ze=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=[{x:-2*(r=r.height+e.padding)/6,y:0},{x:a+2*r/6,y:0},{x:a-r/6,y:-r},{x:r/6,y:-r}];return(a=ze(t,a,r,i)).attr("style",e.style),Re(e,a),e.intersect=function(t){return Be.polygon(e,i,t)},t},"trapezoid"),qe=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=[{x:(r=r.height+e.padding)/6,y:0},{x:a-r/6,y:0},{x:a+2*r/6,y:-r},{x:-2*r/6,y:-r}];return(a=ze(t,a,r,i)).attr("style",e.style),Re(e,a),e.intersect=function(t){return Be.polygon(e,i,t)},t},"inv_trapezoid"),Ve=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=[{x:0,y:0},{x:a+(r=r.height+e.padding)/2,y:0},{x:a,y:-r/2},{x:a+r/2,y:-r},{x:0,y:-r}];return(a=ze(t,a,r,i)).attr("style",e.style),Re(e,a),e.intersect=function(t){return Be.polygon(e,i,t)},t},"rect_right_inv_arrow"),Ge=D(async(t,e)=>{var{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=a/2,s=i/(2.5+a/50);var r=r.height+s+e.padding,n="M 0,"+s+" a "+i+","+s+" 0,0,0 "+a+" 0 a "+i+","+s+" 0,0,0 "+-a+" 0 l 0,"+r+" a "+i+","+s+" 0,0,0 "+a+" 0 l 0,"+-r;n=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",n).attr("transform","translate("+-a/2+","+-(r/2+s)+")");return Re(e,n),e.intersect=function(t){var r=Be.rect(e,t),a=r.x-e.x;if(0!=i&&(Math.abs(a)<e.width/2||Math.abs(a)==e.width/2&&Math.abs(r.y-e.y)>e.height/2-s)){let n=s*s*(1-a*a/(i*i));0!=n&&(n=Math.sqrt(n)),n=s-n,0<t.y-e.y&&(n=-n),r.y+=n}return r},t},"cylinder"),Je=D(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:a}=await Oe(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,n=e.positioned?e.height:r.height+e.padding,o=e.positioned?-s/2:-r.width/2-a,r=e.positioned?-n/2:-r.height/2-a;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",s).attr("height",n),e.props&&(a=new Set(Object.keys(e.props)),e.props.borders&&(er(i,e.props.borders,s,n),a.delete("borders")),a.forEach(t=>{I.warn("Unknown node property "+t)})),Re(e,i),e.intersect=function(t){return Be.rect(e,t)},t},"rect"),Qe=D(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:a}=await Oe(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),s=e.positioned?e.width:r.width+e.padding,n=e.positioned?e.height:r.height+e.padding,o=e.positioned?-s/2:-r.width/2-a,r=e.positioned?-n/2:-r.height/2-a;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",s).attr("height",n),e.props&&(a=new Set(Object.keys(e.props)),e.props.borders&&(er(i,e.props.borders,s,n),a.delete("borders")),a.forEach(t=>{I.warn("Unknown node property "+t)})),Re(e,i),e.intersect=function(t){return Be.rect(e,t)},t},"composite"),tr=D(async(t,e)=>{t=(await Oe(t,e,"label",!0)).shapeSvg;var r,a=(I.trace("Classes = ",e.class),t.insert("rect",":first-child"));return a.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(er(a,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{I.warn("Unknown node property "+t)})),Re(e,a),e.intersect=function(t){return Be.rect(e,t)},t},"labelRect");function er(t,e,r,a){let i=[];var s=D(t=>{i.push(t,0)},"addBorder"),n=D(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(I.debug("add top border"),s):n)(r),(e.includes("r")?(I.debug("add right border"),s):n)(a),(e.includes("b")?(I.debug("add bottom border"),s):n)(r),(e.includes("l")?(I.debug("add left border"),s):n)(a),t.attr("stroke-dasharray",i.join(" "))}D(er,"applyNodePropertyBorders");var rr=D(async(t,e)=>{let r;r=e.classes?"node "+e.classes:"node default";var a=(t=t.insert("g").attr("class",r).attr("id",e.domId||e.id)).insert("rect",":first-child"),i=t.insert("line"),s=t.insert("g").attr("class","label");let n="";n="object"==typeof(g=e.labelText.flat?e.labelText.flat():e.labelText)?g[0]:g,I.info("Label text abc79",n,g,"object"==typeof g);var o=await ne(s,n,e.labelStyle,!0,!0);let l={width:0,height:0};$(N())&&(d=o.children[0],h=R(o),l=d.getBoundingClientRect(),h.attr("width",l.width),h.attr("height",l.height)),I.info("Text 2",g);var c,d=g.slice(1,g.length),h=o.getBBox(),g=await ne(s,d.join?d.join("<br/>"):d,e.labelStyle,!0,!0);$(N())&&(d=g.children[0],c=R(g),l=d.getBoundingClientRect(),c.attr("width",l.width),c.attr("height",l.height)),d=e.padding/2;return R(g).attr("transform","translate( "+(l.width>h.width?0:(h.width-l.width)/2)+", "+(h.height+d+5)+")"),R(o).attr("transform","translate( "+(l.width<h.width?0:-(h.width-l.width)/2)+", 0)"),l=s.node().getBBox(),s.attr("transform","translate("+-l.width/2+", "+(-l.height/2-d+3)+")"),a.attr("class","outer title-state").attr("x",-l.width/2-d).attr("y",-l.height/2-d).attr("width",l.width+e.padding).attr("height",l.height+e.padding),i.attr("class","divider").attr("x1",-l.width/2-d).attr("x2",l.width/2+d).attr("y1",-l.height/2-d+h.height+d).attr("y2",-l.height/2-d+h.height+d),Re(e,a),e.intersect=function(t){return Be.rect(e,t)},t},"rectWithTitle"),ar=D(async(t,e)=>{var{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.height+e.padding,r=(r=r.width+a/4+e.padding,t.insert("rect",":first-child").attr("style",e.style).attr("rx",a/2).attr("ry",a/2).attr("x",-r/2).attr("y",-a/2).attr("width",r).attr("height",a));return Re(e,r),e.intersect=function(t){return Be.rect(e,t)},t},"stadium"),ir=D(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await Oe(t,e,Ye(e,void 0),!0);return(t=r.insert("circle",":first-child")).attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),I.info("Circle main"),Re(e,t),e.intersect=function(t){return I.info("Circle intersect",e,a.width/2+i,t),Be.circle(e,a.width/2+i,t)},r},"circle"),sr=D(async(t,e)=>{let{shapeSvg:r,bbox:a,halfPadding:i}=await Oe(t,e,Ye(e,void 0),!0);var s=(t=r.insert("g",":first-child")).insert("circle"),n=t.insert("circle");return t.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i+5).attr("width",a.width+e.padding+10).attr("height",a.height+e.padding+10),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",a.width/2+i).attr("width",a.width+e.padding).attr("height",a.height+e.padding),I.info("DoubleCircle main"),Re(e,s),e.intersect=function(t){return I.info("DoubleCircle intersect",e,a.width/2+i+5,t),Be.circle(e,a.width/2+i+5,t)},r},"doublecircle"),nr=D(async(t,e)=>{var r,{shapeSvg:t,bbox:r}=await Oe(t,e,Ye(e,void 0),!0),a=r.width+e.padding;let i=[{x:0,y:0},{x:a,y:0},{x:a,y:-(r=r.height+e.padding)},{x:0,y:-r},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-r},{x:-8,y:-r},{x:-8,y:0}];return(a=ze(t,a,r,i)).attr("style",e.style),Re(e,a),e.intersect=function(t){return Be.polygon(e,i,t)},t},"subroutine"),or=D((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Re(e,r),e.intersect=function(t){return Be.circle(e,7,t)},t},"start"),lr=D((t,e,r)=>{let a=70,i=10;return"LR"===r&&(a=10,i=70),r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).append("rect").attr("x",-1*a/2).attr("y",-1*i/2).attr("width",a).attr("height",i).attr("class","fork-join"),Re(e,r),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Be.rect(e,t)},t},"forkJoin"),cr=D((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),a=t.insert("circle",":first-child");return a.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Re(e,a),e.intersect=function(t){return Be.circle(e,7,t)},t},"end"),dr=D(async(t,e)=>{var r=e.padding/2;let a;a=e.classes?"node "+e.classes:"node default";var i=(t=t.insert("g").attr("class",a).attr("id",e.domId||e.id)).insert("rect",":first-child"),s=t.insert("line"),n=t.insert("line");let o=0,l=4,c=t.insert("g").attr("class","label"),d=0;var h=e.classData.annotations?.[0],g=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"";let y=(g=await ne(c,g,e.labelStyle,!0,!0)).getBBox(),u=($(N())&&(x=g.children[0],p=R(g),y=x.getBoundingClientRect(),p.attr("width",y.width),p.attr("height",y.height)),e.classData.annotations[0]&&(l+=y.height+4,o+=y.width),e.classData.label);void 0!==e.classData.type&&""!==e.classData.type&&($(N())?u+="<"+e.classData.type+">":u+="<"+e.classData.type+">");var p,x=await ne(c,u,e.labelStyle,!0,!0);R(x).attr("class","classTitle");let b=x.getBBox(),f=($(N())&&(p=x.children[0],w=R(x),b=p.getBoundingClientRect(),w.attr("width",b.width),w.attr("height",b.height)),l+=b.height+4,b.width>o&&(o=b.width),[]),m=(e.classData.members.forEach(async t=>{let r=(t=t.getDisplayDetails()).displayText;var a,i;$(N())&&(r=r.replace(/</g,"<").replace(/>/g,">"));let s=(t=await ne(c,r,t.cssStyle||e.labelStyle,!0,!0)).getBBox();$(N())&&(a=t.children[0],i=R(t),s=a.getBoundingClientRect(),i.attr("width",s.width),i.attr("height",s.height)),s.width>o&&(o=s.width),l+=s.height+4,f.push(t)}),l+=8,[]);e.classData.methods.forEach(async t=>{let r=(t=t.getDisplayDetails()).displayText;var a,i;$(N())&&(r=r.replace(/</g,"<").replace(/>/g,">"));let s=(t=await ne(c,r,t.cssStyle||e.labelStyle,!0,!0)).getBBox();$(N())&&(a=t.children[0],i=R(t),s=a.getBoundingClientRect(),i.attr("width",s.width),i.attr("height",s.height)),s.width>o&&(o=s.width),l+=s.height+4,m.push(t)}),l+=8,h&&(p=(o-y.width)/2,R(g).attr("transform","translate( "+(-1*o/2+p)+", "+-1*l/2+")"),d=y.height+4);var w=(o-b.width)/2;return R(x).attr("transform","translate( "+(-1*o/2+w)+", "+(-1*l/2+d)+")"),d+=b.height+4,s.attr("class","divider").attr("x1",-o/2-r).attr("x2",o/2+r).attr("y1",-l/2-r+8+d).attr("y2",-l/2-r+8+d),d+=8,f.forEach(t=>{R(t).attr("transform","translate( "+-o/2+", "+(-1*l/2+d+4)+")"),t=t?.getBBox(),d+=(t?.height??0)+4}),d+=8,n.attr("class","divider").attr("x1",-o/2-r).attr("x2",o/2+r).attr("y1",-l/2-r+8+d).attr("y2",-l/2-r+8+d),d+=8,m.forEach(t=>{R(t).attr("transform","translate( "+-o/2+", "+(-1*l/2+d)+")"),t=t?.getBBox(),d+=(t?.height??0)+4}),i.attr("style",e.style).attr("class","outer title-state").attr("x",-o/2-r).attr("y",-l/2-r).attr("width",o+e.padding).attr("height",l+e.padding),Re(e,i),e.intersect=function(t){return Be.rect(e,t)},t},"class_box"),hr={rhombus:je,composite:Qe,question:je,rect:Je,labelRect:tr,rectWithTitle:rr,choice:Fe,circle:ir,doublecircle:sr,stadium:ar,hexagon:We,block_arrow:Xe,rect_left_inv_arrow:He,lean_right:Ue,lean_left:Ke,trapezoid:Ze,inv_trapezoid:qe,rect_right_inv_arrow:Ve,cylinder:Ge,start:or,end:cr,note:Me,subroutine:nr,fork:lr,join:lr,class_box:dr},gr={},yr=D(async(t,e,r)=>{let a,i;if(e.link){let s;"sandbox"===N().securityLevel?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),a=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),i=await hr[e.shape](a,e,r)}else i=await hr[e.shape](t,e,r),a=i;return e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),gr[e.id]=a,e.haveCallback&&gr[e.id].attr("class",gr[e.id].attr("class")+" clickable"),a},"insertNode"),ur=D(t=>{var e=gr[t.id],r=(I.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode");function pr(t,e,r=!1){let a,i="default",s=(0<(t?.classes?.length||0)&&(i=(t?.classes??[]).join(" ")),i+=" flowchart-label",0),n="";switch(t.type){case"round":s=5,n="rect";break;case"composite":s=0,n="composite",a=0;break;case"square":case"group":default:n="rect";break;case"diamond":n="question";break;case"hexagon":n="hexagon";break;case"block_arrow":n="block_arrow";break;case"odd":case"rect_left_inv_arrow":n="rect_left_inv_arrow";break;case"lean_right":n="lean_right";break;case"lean_left":n="lean_left";break;case"trapezoid":n="trapezoid";break;case"inv_trapezoid":n="inv_trapezoid";break;case"circle":n="circle";break;case"ellipse":n="ellipse";break;case"stadium":n="stadium";break;case"subroutine":n="subroutine";break;case"cylinder":n="cylinder";break;case"doublecircle":n="doublecircle"}var o=C(t?.styles??[]),l=t.label,c=t.size??{width:0,height:0,x:0,y:0};e=e.getDiagramId();return{labelStyle:o.labelStyle,shape:n,labelText:l,rx:s,ry:s,class:i,style:o.style,id:t.id,domId:e?e+"-"+t.id:t.id,directions:t.directions,width:c.width,height:c.height,x:c.x,y:c.y,positioned:r,intersect:void 0,type:t.type,padding:a??B()?.block?.padding??0,widthInColumns:t.widthInColumns??1}}async function xr(t,e,r){var a;"group"!==(e=pr(e,r,!1)).type&&(a=B(),a=(t=await yr(t,e,{config:a})).node().getBBox(),(e=r.getBlock(e.id)).size={width:a.width,height:a.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function br(t,e,r){var a=pr(e,r,!0);"space"!==r.getBlock(a.id).type&&(r=B(),await yr(t,a,{config:r}),e.intersect=a?.intersect,ur(a))}async function fr(t,e,r,a){for(var i of e)await a(t,i,r),i.children&&await fr(t,i.children,r,a)}async function mr(t,e,r){await fr(t,e,r,xr)}async function wr(t,e,r){await fr(t,e,r,br)}async function kr(t,e,r,a,i){var s,n,o,l,c,d=new V({multigraph:!0,compound:!0});for(s of(d.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8}),r))s.size&&d.setNode(s.id,{width:s.size.width,height:s.size.height,intersect:s.intersect});for(n of e)n.start&&n.end&&(o=a.getBlock(n.start),l=a.getBlock(n.end),o?.size)&&l?.size&&(o=o.size,l=l.size,o=[{x:o.x,y:o.y},{x:o.x+(l.x-o.x)/2,y:o.y+(l.y-o.y)/2},{x:l.x,y:l.y}],l=i?i+"-"+n.id:n.id,c=("thick"===n.thickness?"edge-thickness-thick":"edge-thickness-normal")+` ${"dotted"===n.pattern?"edge-pattern-dotted":"edge-pattern-solid"} flowchart-link LS-a1 LE-b1`,fe(t,{v:n.start,w:n.end,name:l},{...n,id:l,arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:o,classes:c},void 0,"block",d,i),n.label)&&(await ge(t,{...n,label:n.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:n.arrowTypeEnd,arrowTypeStart:n.arrowTypeStart,points:o,classes:c}),ue({...n,x:o[1].x,y:o[1].y},{originalPath:o}))}D(pr,"getNodeFromBlock"),D(xr,"calculateBlockSize"),D(br,"insertBlockPositioned"),D(fr,"performOperations"),D(mr,"calculateBlockSizes"),D(wr,"insertBlocks"),D(kr,"insertEdges");var Sr=D(function(t,e){return e.db.getClasses()},"getClasses"),Lr=D(async function(t,e,r,a){var{securityLevel:i,block:s}=B(),n=a.db;let o;n.setDiagramId(e),"sandbox"===i&&(o=R("#i"+e));var l=R("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),i="sandbox"===i?l.select(`[id="${e}"]`):R(`[id="${e}"]`),c=(l=(Jt(i,["point","circle","cross"],a.type,e),n.getBlocks()),a=n.getBlocksFlat(),n.getEdges()),d=i.insert("g").attr("class","block"),h=(await mr(d,l,n),ie(n));await wr(d,l,n),await kr(d,c,a,n,e),h&&(l=h,d=Math.max(1,Math.round(l.width/l.height*.125)),c=l.height+d+10,a=l.width+10,n=s.useMaxWidth,F(i,c,a,!!n),I.debug("Here Bounds",h,l),i.attr("viewBox",`${l.x-5} ${l.y-5} ${l.width+10} `+(l.height+10)))},"draw"),_r={parser:rt,db:At,renderer:{draw:Lr,getClasses:Sr},styles:Yt};export{_r as diagram};
|