@kingsoftcloud/ksadk-web 0.3.0 → 0.3.2
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/CHANGELOG.md +138 -0
- package/RELEASE_PROVENANCE.json +7 -0
- package/dist-ksadk/assets/{ArtifactsPanel-Cjnqt-8W.js → ArtifactsPanel-DSU1sWD_.js} +1 -1
- package/dist-ksadk/assets/{CodeBlock-BqyqZfuB.js → CodeBlock-DOH6MVcn.js} +4 -4
- package/dist-ksadk/assets/{MathMessageMarkdown-BpH7jiFM.js → MathMessageMarkdown-BL8my1R2.js} +4 -4
- package/dist-ksadk/assets/MathMessageMarkdown-BorAY7qD.css +1 -0
- package/dist-ksadk/assets/MermaidBlock-Dz4IP-Tx.js +312 -0
- package/dist-ksadk/assets/NativeTerminalPanel-DUrK0JpZ.js +1 -0
- package/dist-ksadk/assets/abnfDiagram-VCTEODGH-g20pFzNV.js +1 -0
- package/dist-ksadk/assets/arc-C4FzinUA.js +1 -0
- package/dist-ksadk/assets/architecture-7GRP2DOG-DjKratdf.js +1 -0
- package/dist-ksadk/assets/architectureDiagram-5GKGNRK7-DpIqL5h4.js +36 -0
- package/dist-ksadk/assets/blockDiagram-NRAW4CY4-BjkljTNz.js +129 -0
- package/dist-ksadk/assets/c4Diagram-UCG6FXSJ-Dk_ieq2X.js +38 -0
- package/dist-ksadk/assets/channel-4cQHKtx1.js +1 -0
- package/dist-ksadk/assets/chunk-2Q5K7J3B-DmgWkESh.js +1 -0
- package/dist-ksadk/assets/{chunk-FMBD7UC4-BGhvzDYt.js → chunk-5VM5RSS4-BVHAchFb.js} +1 -1
- package/dist-ksadk/assets/{chunk-ND2GUHAM-D98vPd-E.js → chunk-F27PBJKO-C-ipQzuS.js} +1 -1
- package/dist-ksadk/assets/chunk-G27WJ6UU-C2EyJbIK.js +231 -0
- package/dist-ksadk/assets/{chunk-4BX2VUAB-CsWIQRhc.js → chunk-JWPE2WC7-vYvVJb_M.js} +1 -1
- package/dist-ksadk/assets/chunk-LCL6LL3I-BcI6ysPT.js +206 -0
- package/dist-ksadk/assets/chunk-POPQ4Y6H-C030x_Z1.js +1 -0
- package/dist-ksadk/assets/chunk-RHFEMEQ7-yyGpsz4n.js +168 -0
- package/dist-ksadk/assets/chunk-SVP7TREG-BLTlmMU7.js +88 -0
- package/dist-ksadk/assets/chunk-XXDRQBXY-C_32ArgP.js +1 -0
- package/dist-ksadk/assets/classDiagram-DTDB5LWJ-DLFd9Xi0.js +1 -0
- package/dist-ksadk/assets/classDiagram-v2-JRS7N3AN-DLFd9Xi0.js +1 -0
- package/dist-ksadk/assets/{cose-bilkent-S5V4N54A-CX3yotHq.js → cose-bilkent-JH36ORCC-9YQYwdl0.js} +1 -1
- package/dist-ksadk/assets/cynefin-OW5HDTMX-DjEM48Qp.js +1 -0
- package/dist-ksadk/assets/cynefinDiagram-5FMLGOSQ-ErLF5N13.js +62 -0
- package/dist-ksadk/assets/cytoscape.esm-CyCl8rPi.js +321 -0
- package/dist-ksadk/assets/dagre-3AP2YEHR-DFiQF-6f.js +4 -0
- package/dist-ksadk/assets/dagre-BuhGnRI1.js +1 -0
- package/dist-ksadk/assets/diagram-S7CK7UJ4-Bt1v8-GC.js +30 -0
- package/dist-ksadk/assets/diagram-UQ7AKVKN-DSCxJdBK.js +41 -0
- package/dist-ksadk/assets/diagram-VSXAHHWV-DHfYwp_9.js +3 -0
- package/dist-ksadk/assets/diagram-VX7I27RA-DdzD-4Le.js +24 -0
- package/dist-ksadk/assets/diagram-Z3DM3KII-Du-nAJ9F.js +24 -0
- package/dist-ksadk/assets/{dist-D82mtD2s.js → dist-8hqcx0sU.js} +1 -1
- package/dist-ksadk/assets/dist-B7seoj3d.js +1 -0
- package/dist-ksadk/assets/{dist-DHn6nBzr.js → dist-BE7bu-DL.js} +1 -1
- package/dist-ksadk/assets/{dist-eoW6tZXA.js → dist-BVDffZ0U.js} +1 -1
- package/dist-ksadk/assets/{dist-C2xjE7cO.js → dist-BX8z72IC.js} +1 -1
- package/dist-ksadk/assets/{dist-CgF3fj15.js → dist-Bf2M8m3N.js} +1 -1
- package/dist-ksadk/assets/{dist-Bs-jQcRX.js → dist-BjU6y-A2.js} +1 -1
- package/dist-ksadk/assets/{dist-Djgl2wVZ.js → dist-BytlxIDT.js} +1 -1
- package/dist-ksadk/assets/{dist-CVQRZjPu.js → dist-CSh_DE14.js} +1 -1
- package/dist-ksadk/assets/{dist-6CVKuTAe.js → dist-CXYYBw3_.js} +1 -1
- package/dist-ksadk/assets/{dist-DlzCRy0S.js → dist-C_wsv-Qd.js} +1 -1
- package/dist-ksadk/assets/{dist-DF06ORQo.js → dist-ClxGviKw.js} +1 -1
- package/dist-ksadk/assets/{dist-Cf23NY4L.js → dist-CttYUqzS.js} +1 -1
- package/dist-ksadk/assets/{dist-ivOya1LD.js → dist-DNp6rLRA.js} +1 -1
- package/dist-ksadk/assets/{dist-BibcG1V9.js → dist-DUX-id_F.js} +1 -1
- package/dist-ksadk/assets/{dist-BUHRxvDG.js → dist-DmldrHd_.js} +1 -1
- package/dist-ksadk/assets/{dist-BZ9n9AjO.js → dist-DnfXs8Vn.js} +2 -2
- package/dist-ksadk/assets/{dist-DqNnNFrw.js → dist-Dq9gLD7L.js} +1 -1
- package/dist-ksadk/assets/{dist-CGcp2ex8.js → dist-W-TIVntx.js} +1 -1
- package/dist-ksadk/assets/{dist-Cwt7koer.js → dist-dDdADKFA.js} +1 -1
- package/dist-ksadk/assets/{dist-C7-3jInC.js → dist-dydu68Fl.js} +1 -1
- package/dist-ksadk/assets/{dist-C99THtIA.js → dist-ngtN0DJB.js} +1 -1
- package/dist-ksadk/assets/ebnfDiagram-PWID7BFC-Da9C9NO1.js +1 -0
- package/dist-ksadk/assets/erDiagram-SSCWMZ5O-EAGqqR79.js +99 -0
- package/dist-ksadk/assets/eventmodeling-NTZA5JFV-CMgMaJrC.js +1 -0
- package/dist-ksadk/assets/flowDiagram-A5DVABFB-BBKL0x3P.js +1 -0
- package/dist-ksadk/assets/ganttDiagram-EL5Y4UJY-DqJsKb59.js +292 -0
- package/dist-ksadk/assets/gitGraph-4MIJSDKK-Dw63mrhw.js +1 -0
- package/dist-ksadk/assets/gitGraphDiagram-WWUBYQGX-B6g4dtDi.js +106 -0
- package/dist-ksadk/assets/index-8ipRcQ-M.js +240 -0
- package/dist-ksadk/assets/index-ByFCqjlh.css +2 -0
- package/dist-ksadk/assets/info-A6RAGUB7-B6iAblII.js +1 -0
- package/dist-ksadk/assets/infoDiagram-RXCK75RN-Djm_nbd5.js +2 -0
- package/dist-ksadk/assets/{ishikawaDiagram-YF4QCWOH-DLOHGvWw.js → ishikawaDiagram-5VMMS53U-DWya9SG2.js} +6 -6
- package/dist-ksadk/assets/{journeyDiagram-JHISSGLW-BIzKeejT.js → journeyDiagram-EYS64GPL-DutxhSNI.js} +6 -6
- package/dist-ksadk/assets/{kanban-definition-UN3LZRKU-BWHoFSw2.js → kanban-definition-3QL26DDD-DJdOF8Fm.js} +10 -10
- package/dist-ksadk/assets/katex-vFWytM5c.js +257 -0
- package/dist-ksadk/assets/{linear-CvMBw9cA.js → linear-BHjG8b-J.js} +1 -1
- package/dist-ksadk/assets/mermaid-parser.core-KGSy4jWT.js +166 -0
- package/dist-ksadk/assets/{mindmap-definition-RKZ34NQL-CSAQxEAe.js → mindmap-definition-FBJOCRG2-9-HC88D4.js} +29 -29
- package/dist-ksadk/assets/packet-AYTQ26CC-BOYAipuq.js +1 -0
- package/dist-ksadk/assets/pegDiagram-XKGWAZYB-DrEZd4fD.js +1 -0
- package/dist-ksadk/assets/pie-WAS4IAKB-Ctq0Kbku.js +1 -0
- package/dist-ksadk/assets/pieDiagram-E7YTZNPT-DpjqOFFp.js +39 -0
- package/dist-ksadk/assets/{quadrantDiagram-W4KKPZXB-CxIR4JXI.js → quadrantDiagram-AXDQQJYC-BiNhgOXX.js} +6 -6
- package/dist-ksadk/assets/radar-RG4KPBEZ-DN0-ul_0.js +1 -0
- package/dist-ksadk/assets/railroad-74A4TZTK-C6cC_to0.js +1 -0
- package/dist-ksadk/assets/railroad-abnf-HS5TGJTU-BimjIuRc.js +1 -0
- package/dist-ksadk/assets/railroad-ebnf-LZEXJU2U-CvY65ABq.js +1 -0
- package/dist-ksadk/assets/railroad-peg-WCYAUIDC-D72Iq_Tv.js +1 -0
- package/dist-ksadk/assets/railroadDiagram-O6MQD6OU-_Y3Ojg6G.js +1 -0
- package/dist-ksadk/assets/requirementDiagram-EFPCY7ZU-DeCFdg9K.js +84 -0
- package/dist-ksadk/assets/{sankeyDiagram-5OEKKPKP-DpGa6EAV.js → sankeyDiagram-P5KCCOFB-CPH75rhw.js} +7 -7
- package/dist-ksadk/assets/{sequenceDiagram-3UESZ5HK-NTKNGGe5.js → sequenceDiagram-WJ2MYXX4-OEpQQdr4.js} +10 -10
- package/dist-ksadk/assets/sizeCapture-X5ZJPWSS-heUErzhI.js +1 -0
- package/dist-ksadk/assets/stateDiagram-HBIQ2CUA-DvA3jSMB.js +1 -0
- package/dist-ksadk/assets/stateDiagram-v2-4QOOHH4V-BgQY03nz.js +1 -0
- package/dist-ksadk/assets/swimlanes-XN3QIQJK-CR-dfN_t.js +1 -0
- package/dist-ksadk/assets/swimlanesDiagram-VK2B7HYN-DLVw3q5Q.js +8 -0
- package/dist-ksadk/assets/{timeline-definition-PNZ67QCA-jqoYs3jQ.js → timeline-definition-24CTP7MA-DAVJf1TX.js} +7 -7
- package/dist-ksadk/assets/treeView-Q6P3EWNA-BMpO0wsB.js +1 -0
- package/dist-ksadk/assets/treemap-WGGIJYW6-Et0aqzU3.js +1 -0
- package/dist-ksadk/assets/vennDiagram-4TSXK5OY-DwM8eDkh.js +34 -0
- package/dist-ksadk/assets/wardley-WFR3VGLG-CbY0mhpl.js +1 -0
- package/dist-ksadk/assets/wardleyDiagram-VM6X3IG4-DZL-Zz2t.js +78 -0
- package/dist-ksadk/assets/xychartDiagram-S5SC5T6Z-Dy6Yh_hu.js +7 -0
- package/dist-ksadk/index.html +2 -2
- package/dist-lib/App.d.ts.map +1 -1
- package/dist-lib/{ArtifactsPanel-BAfHt4bC.js → ArtifactsPanel-DDCKcvaL.js} +1 -1
- package/dist-lib/{CodeBlock-Cbl6cxYC.js → CodeBlock-BS9DcS5a.js} +3 -3
- package/dist-lib/{MathMessageMarkdown-DbMSeHQa.js → MathMessageMarkdown-CpCcJFjZ.js} +2 -2
- package/dist-lib/{NativeTerminalPanel-BTPHqbvY.js → NativeTerminalPanel-CDqCdIly.js} +14 -6
- package/dist-lib/{WorkspacePanelContainer-Iy0LhhgG.js → WorkspacePanelContainer-DzbAkIfx.js} +1746 -913
- package/dist-lib/api/client.d.ts.map +1 -1
- package/dist-lib/api/events.d.ts +7 -0
- package/dist-lib/api/events.d.ts.map +1 -1
- package/dist-lib/api/run.d.ts +32 -0
- package/dist-lib/api/run.d.ts.map +1 -1
- package/dist-lib/api/session.d.ts +10 -1
- package/dist-lib/api/session.d.ts.map +1 -1
- package/dist-lib/capabilities-njdklP3r.js +200 -0
- package/dist-lib/capabilities.js +1 -1
- package/dist-lib/components/chat/ChatComposer.d.ts +9 -1
- package/dist-lib/components/chat/ChatComposer.d.ts.map +1 -1
- package/dist-lib/components/chat/ChatMessageList.d.ts +4 -1
- package/dist-lib/components/chat/ChatMessageList.d.ts.map +1 -1
- package/dist-lib/components/chat/ChatSidebar.d.ts.map +1 -1
- package/dist-lib/components/chat/ConnectedComposer.d.ts +13 -2
- package/dist-lib/components/chat/ConnectedComposer.d.ts.map +1 -1
- package/dist-lib/components/chat/ConnectedMessageList.d.ts +2 -1
- package/dist-lib/components/chat/ConnectedMessageList.d.ts.map +1 -1
- package/dist-lib/components/chat/ExecutionModeMenu.d.ts +12 -0
- package/dist-lib/components/chat/ExecutionModeMenu.d.ts.map +1 -0
- package/dist-lib/components/chat/InteractionA2uiSurface.d.ts +14 -0
- package/dist-lib/components/chat/InteractionA2uiSurface.d.ts.map +1 -0
- package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts +12 -0
- package/dist-lib/components/chat/InteractionHistoryAnchor.d.ts.map +1 -0
- package/dist-lib/components/chat/InteractionSchemaForm.d.ts +14 -0
- package/dist-lib/components/chat/InteractionSchemaForm.d.ts.map +1 -0
- package/dist-lib/components/chat/InteractionTray.d.ts +23 -0
- package/dist-lib/components/chat/InteractionTray.d.ts.map +1 -0
- package/dist-lib/components/chat/ModelSettingsMenu.d.ts +13 -0
- package/dist-lib/components/chat/ModelSettingsMenu.d.ts.map +1 -0
- package/dist-lib/components/chat/PermissionMenu.d.ts.map +1 -1
- package/dist-lib/components/chat/ProcessingBlocksView.d.ts +4 -1
- package/dist-lib/components/chat/ProcessingBlocksView.d.ts.map +1 -1
- package/dist-lib/components/chat/schema-fields.d.ts +13 -0
- package/dist-lib/components/chat/schema-fields.d.ts.map +1 -0
- package/dist-lib/components/chat/types.d.ts +8 -0
- package/dist-lib/components/chat/types.d.ts.map +1 -1
- package/dist-lib/components/native/NativeTerminalPanel.d.ts.map +1 -1
- package/dist-lib/components.js +3 -3
- package/dist-lib/core/api/facade.d.ts +26 -1
- package/dist-lib/core/api/facade.d.ts.map +1 -1
- package/dist-lib/core/api/types.d.ts +29 -1
- package/dist-lib/core/api/types.d.ts.map +1 -1
- package/dist-lib/core/interaction/a2ui-validate.d.ts +21 -0
- package/dist-lib/core/interaction/a2ui-validate.d.ts.map +1 -0
- package/dist-lib/core/interaction/adapters/agui.d.ts +23 -0
- package/dist-lib/core/interaction/adapters/agui.d.ts.map +1 -0
- package/dist-lib/core/interaction/adapters/normalize.d.ts +29 -0
- package/dist-lib/core/interaction/adapters/normalize.d.ts.map +1 -0
- package/dist-lib/core/interaction/adapters/responses.d.ts +25 -0
- package/dist-lib/core/interaction/adapters/responses.d.ts.map +1 -0
- package/dist-lib/core/interaction/adapters/session-events.d.ts +17 -0
- package/dist-lib/core/interaction/adapters/session-events.d.ts.map +1 -0
- package/dist-lib/core/interaction/client.d.ts +63 -0
- package/dist-lib/core/interaction/client.d.ts.map +1 -0
- package/dist-lib/core/interaction/index.d.ts +41 -0
- package/dist-lib/core/interaction/index.d.ts.map +1 -0
- package/dist-lib/core/interaction/store.d.ts +0 -0
- package/dist-lib/core/interaction/store.d.ts.map +1 -0
- package/dist-lib/core/interaction/types.d.ts +91 -0
- package/dist-lib/core/interaction/types.d.ts.map +1 -0
- package/dist-lib/core/run/dispatcher.d.ts.map +1 -1
- package/dist-lib/core/run/engine.d.ts +24 -1
- package/dist-lib/core/run/engine.d.ts.map +1 -1
- package/dist-lib/core/run/types.d.ts +32 -0
- package/dist-lib/core/run/types.d.ts.map +1 -1
- package/dist-lib/core/stream/index.d.ts +2 -0
- package/dist-lib/core/stream/index.d.ts.map +1 -1
- package/dist-lib/core/stream/kernel-events.d.ts +56 -0
- package/dist-lib/core/stream/kernel-events.d.ts.map +1 -0
- package/dist-lib/core/stream/responses-protocol.d.ts +7 -0
- package/dist-lib/core/stream/responses-protocol.d.ts.map +1 -1
- package/dist-lib/core/stream/runtime-items.d.ts +174 -0
- package/dist-lib/core/stream/runtime-items.d.ts.map +1 -0
- package/dist-lib/core/stream/types.d.ts +4 -0
- package/dist-lib/core/stream/types.d.ts.map +1 -1
- package/dist-lib/hooks/useBootstrap.d.ts +1 -0
- package/dist-lib/hooks/useBootstrap.d.ts.map +1 -1
- package/dist-lib/hooks/useInteractions.d.ts +34 -0
- package/dist-lib/hooks/useInteractions.d.ts.map +1 -0
- package/dist-lib/hooks/useRunAgent.d.ts +8 -6
- package/dist-lib/hooks/useRunAgent.d.ts.map +1 -1
- package/dist-lib/hooks/useSessionLifecycle.d.ts.map +1 -1
- package/dist-lib/public/runtime.d.ts +7 -0
- package/dist-lib/public/runtime.d.ts.map +1 -1
- package/dist-lib/runtime.js +2393 -1157
- package/dist-lib/stores/bootstrap.d.ts +4 -0
- package/dist-lib/stores/bootstrap.d.ts.map +1 -1
- package/dist-lib/stores/streaming.d.ts +8 -0
- package/dist-lib/stores/streaming.d.ts.map +1 -1
- package/dist-lib/stores/ui.d.ts +8 -14
- package/dist-lib/stores/ui.d.ts.map +1 -1
- package/dist-lib/styles.css +1 -1
- package/dist-lib/types/agent-control.d.ts +93 -0
- package/dist-lib/types/agent-control.d.ts.map +1 -0
- package/dist-lib/types/capabilities.d.ts +7 -0
- package/dist-lib/types/capabilities.d.ts.map +1 -1
- package/dist-lib/types/runtime-capability-matrix.d.ts +15 -0
- package/dist-lib/types/runtime-capability-matrix.d.ts.map +1 -0
- package/dist-lib/utils/capabilities.d.ts.map +1 -1
- package/dist-lib/utils/feedback.d.ts +0 -1
- package/dist-lib/utils/feedback.d.ts.map +1 -1
- package/dist-lib/utils/responses-stream.d.ts +2 -1
- package/dist-lib/utils/responses-stream.d.ts.map +1 -1
- package/dist-lib/utils/session-event-history.d.ts +54 -0
- package/dist-lib/utils/session-event-history.d.ts.map +1 -0
- package/dist-lib/utils/session-events.d.ts +8 -0
- package/dist-lib/utils/session-events.d.ts.map +1 -1
- package/dist-lib/utils/session-list.d.ts +1 -0
- package/dist-lib/utils/session-list.d.ts.map +1 -1
- package/package.json +4 -1
- package/dist-ksadk/assets/MathMessageMarkdown-DeYh8QPr.css +0 -1
- package/dist-ksadk/assets/MermaidBlock-DWuxETaJ.js +0 -303
- package/dist-ksadk/assets/NativeTerminalPanel-MDTopWMO.js +0 -1
- package/dist-ksadk/assets/arc-CFKwSk_B.js +0 -1
- package/dist-ksadk/assets/architecture-7EHR7CIX-CynqOWjZ.js +0 -1
- package/dist-ksadk/assets/architectureDiagram-3BPJPVTR-Dej8jX8c.js +0 -36
- package/dist-ksadk/assets/blockDiagram-GPEHLZMM-1F64jqvy.js +0 -132
- package/dist-ksadk/assets/c4Diagram-AAUBKEIU-9q7AUAKb.js +0 -10
- package/dist-ksadk/assets/channel-iUGv2N24.js +0 -1
- package/dist-ksadk/assets/chunk-2J33WTMH-6qgwJm7Q.js +0 -1
- package/dist-ksadk/assets/chunk-55IACEB6-BK8paA20.js +0 -1
- package/dist-ksadk/assets/chunk-727SXJPM-B-JEhy7h.js +0 -206
- package/dist-ksadk/assets/chunk-AQP2D5EJ-DYBvMHAa.js +0 -231
- package/dist-ksadk/assets/chunk-QZHKN3VN-YQIEXeF6.js +0 -1
- package/dist-ksadk/assets/classDiagram-4FO5ZUOK-CDAUuoXK.js +0 -1
- package/dist-ksadk/assets/classDiagram-v2-Q7XG4LA2-CDAUuoXK.js +0 -1
- package/dist-ksadk/assets/cytoscape.esm-DelgaX4f.js +0 -321
- package/dist-ksadk/assets/dagre-BM42HDAG-C7TguAWo.js +0 -4
- package/dist-ksadk/assets/dagre-Bx709z4p.js +0 -1
- package/dist-ksadk/assets/diagram-2AECGRRQ-Dd17_kws.js +0 -43
- package/dist-ksadk/assets/diagram-5GNKFQAL-DVIClIil.js +0 -10
- package/dist-ksadk/assets/diagram-KO2AKTUF-Df_3gYQa.js +0 -3
- package/dist-ksadk/assets/diagram-LMA3HP47-BhLk6ZtA.js +0 -24
- package/dist-ksadk/assets/diagram-OG6HWLK6-D4GNGvuu.js +0 -24
- package/dist-ksadk/assets/dist-DyvYLMW9.js +0 -1
- package/dist-ksadk/assets/erDiagram-TEJ5UH35-CnfRcY2M.js +0 -85
- package/dist-ksadk/assets/eventmodeling-FCH6USID-ChYO-ijM.js +0 -1
- package/dist-ksadk/assets/flowDiagram-I6XJVG4X-DGaJjGNJ.js +0 -162
- package/dist-ksadk/assets/ganttDiagram-6RSMTGT7-DpCoB2g9.js +0 -292
- package/dist-ksadk/assets/gitGraph-WXDBUCRP-BN_0Fk-j.js +0 -1
- package/dist-ksadk/assets/gitGraphDiagram-PVQCEYII-9IKVFBVT.js +0 -106
- package/dist-ksadk/assets/graphlib-B8gBHxth.js +0 -1
- package/dist-ksadk/assets/index-QSwCHuB8.js +0 -177
- package/dist-ksadk/assets/index-jOPmTOZH.css +0 -2
- package/dist-ksadk/assets/info-J43DQDTF-Cp6o3vId.js +0 -1
- package/dist-ksadk/assets/infoDiagram-5YYISTIA-CYIIsb8y.js +0 -2
- package/dist-ksadk/assets/katex-DATssjp1.js +0 -265
- package/dist-ksadk/assets/mermaid-parser.core-mGAcEwcq.js +0 -161
- package/dist-ksadk/assets/packet-YPE3B663-wQzct3cT.js +0 -1
- package/dist-ksadk/assets/pie-LRSECV5Y-BgTQiv-9.js +0 -1
- package/dist-ksadk/assets/pieDiagram-4H26LBE5-By-ra07M.js +0 -30
- package/dist-ksadk/assets/radar-GUYGQ44K-BIq5fXsn.js +0 -1
- package/dist-ksadk/assets/requirementDiagram-4Y6WPE33-DpW90iu3.js +0 -84
- package/dist-ksadk/assets/stateDiagram-AJRCARHV-DGpd9yFG.js +0 -1
- package/dist-ksadk/assets/stateDiagram-v2-BHNVJYJU-B3o579IQ.js +0 -1
- package/dist-ksadk/assets/treeView-BLDUP644-Dqi-E0EM.js +0 -1
- package/dist-ksadk/assets/treemap-LRROVOQU-ClQP9CJ9.js +0 -1
- package/dist-ksadk/assets/vennDiagram-CIIHVFJN-l3Z7-wbP.js +0 -34
- package/dist-ksadk/assets/wardley-L42UT6IY-8XLvnNIs.js +0 -1
- package/dist-ksadk/assets/wardleyDiagram-YWT4CUSO-BR54GPmr.js +0 -78
- package/dist-ksadk/assets/xychartDiagram-2RQKCTM6-SkiH8GsK.js +0 -7
- package/dist-lib/capabilities-CxHZ869f.js +0 -133
- package/dist-lib/components/chat/MenuChip.d.ts +0 -19
- package/dist-lib/components/chat/MenuChip.d.ts.map +0 -1
|
@@ -1,303 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./katex-DATssjp1.js","./index-QSwCHuB8.js","./index-jOPmTOZH.css","./dagre-BM42HDAG-C7TguAWo.js","./dagre-Bx709z4p.js","./graphlib-B8gBHxth.js","./cose-bilkent-S5V4N54A-CX3yotHq.js","./cytoscape.esm-DelgaX4f.js","./c4Diagram-AAUBKEIU-9q7AUAKb.js","./chunk-ND2GUHAM-D98vPd-E.js","./flowDiagram-I6XJVG4X-DGaJjGNJ.js","./channel-iUGv2N24.js","./chunk-2J33WTMH-6qgwJm7Q.js","./chunk-55IACEB6-BK8paA20.js","./chunk-FMBD7UC4-BGhvzDYt.js","./erDiagram-TEJ5UH35-CnfRcY2M.js","./gitGraphDiagram-PVQCEYII-9IKVFBVT.js","./mermaid-parser.core-mGAcEwcq.js","./chunk-4BX2VUAB-CsWIQRhc.js","./chunk-QZHKN3VN-YQIEXeF6.js","./ganttDiagram-6RSMTGT7-DpCoB2g9.js","./linear-CvMBw9cA.js","./defaultLocale-C8Fc0cco.js","./init-D6jRqBbL.js","./infoDiagram-5YYISTIA-CYIIsb8y.js","./pieDiagram-4H26LBE5-By-ra07M.js","./ordinal-hYBb2elL.js","./arc-CFKwSk_B.js","./quadrantDiagram-W4KKPZXB-CxIR4JXI.js","./xychartDiagram-2RQKCTM6-SkiH8GsK.js","./requirementDiagram-4Y6WPE33-DpW90iu3.js","./sequenceDiagram-3UESZ5HK-NTKNGGe5.js","./classDiagram-4FO5ZUOK-CDAUuoXK.js","./chunk-727SXJPM-B-JEhy7h.js","./classDiagram-v2-Q7XG4LA2-CDAUuoXK.js","./stateDiagram-AJRCARHV-DGpd9yFG.js","./chunk-AQP2D5EJ-DYBvMHAa.js","./stateDiagram-v2-BHNVJYJU-B3o579IQ.js","./journeyDiagram-JHISSGLW-BIzKeejT.js","./timeline-definition-PNZ67QCA-jqoYs3jQ.js","./mindmap-definition-RKZ34NQL-CSAQxEAe.js","./kanban-definition-UN3LZRKU-BWHoFSw2.js","./sankeyDiagram-5OEKKPKP-DpGa6EAV.js","./diagram-LMA3HP47-BhLk6ZtA.js","./diagram-2AECGRRQ-Dd17_kws.js","./blockDiagram-GPEHLZMM-1F64jqvy.js","./diagram-5GNKFQAL-DVIClIil.js","./architectureDiagram-3BPJPVTR-Dej8jX8c.js","./diagram-KO2AKTUF-Df_3gYQa.js","./diagram-OG6HWLK6-D4GNGvuu.js","./wardleyDiagram-YWT4CUSO-BR54GPmr.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{St as e,W as t,wt as n,xt as r,yt as i}from"./index-QSwCHuB8.js";var a=e(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs=r()})(e,(function(){var e=1e3,t=6e4,n=36e5,r=`millisecond`,i=`second`,a=`minute`,o=`hour`,s=`day`,c=`week`,l=`month`,u=`quarter`,d=`year`,f=`date`,p=`Invalid Date`,m=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,h=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:`en`,weekdays:`Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday`.split(`_`),months:`January_February_March_April_May_June_July_August_September_October_November_December`.split(`_`),ordinal:function(e){var t=[`th`,`st`,`nd`,`rd`],n=e%100;return`[`+e+(t[(n-20)%10]||t[n]||t[0])+`]`}},_=function(e,t,n){var r=String(e);return!r||r.length>=t?e:``+Array(t+1-r.length).join(n)+e},v={s:_,z:function(e){var t=-e.utcOffset(),n=Math.abs(t),r=Math.floor(n/60),i=n%60;return(t<=0?`+`:`-`)+_(r,2,`0`)+`:`+_(i,2,`0`)},m:function e(t,n){if(t.date()<n.date())return-e(n,t);var r=12*(n.year()-t.year())+(n.month()-t.month()),i=t.clone().add(r,l),a=n-i<0,o=t.clone().add(r+(a?-1:1),l);return+(-(r+(n-i)/(a?i-o:o-i))||0)},a:function(e){return e<0?Math.ceil(e)||0:Math.floor(e)},p:function(e){return{M:l,y:d,w:c,d:s,D:f,h:o,m:a,s:i,ms:r,Q:u}[e]||String(e||``).toLowerCase().replace(/s$/,``)},u:function(e){return e===void 0}},y=`en`,b={};b[y]=g;var x=`$isDayjsObject`,S=function(e){return e instanceof E||!(!e||!e[x])},C=function e(t,n,r){var i;if(!t)return y;if(typeof t==`string`){var a=t.toLowerCase();b[a]&&(i=a),n&&(b[a]=n,i=a);var o=t.split(`-`);if(!i&&o.length>1)return e(o[0])}else{var s=t.name;b[s]=t,i=s}return!r&&i&&(y=i),i||!r&&y},w=function(e,t){if(S(e))return e.clone();var n=typeof t==`object`?t:{};return n.date=e,n.args=arguments,new E(n)},T=v;T.l=C,T.i=S,T.w=function(e,t){return w(e,{locale:t.$L,utc:t.$u,x:t.$x,$offset:t.$offset})};var E=function(){function g(e){this.$L=C(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[x]=!0}var _=g.prototype;return _.parse=function(e){this.$d=function(e){var t=e.date,n=e.utc;if(t===null)return new Date(NaN);if(T.u(t))return new Date;if(t instanceof Date)return new Date(t);if(typeof t==`string`&&!/Z$/i.test(t)){var r=t.match(m);if(r){var i=r[2]-1||0,a=(r[7]||`0`).substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,a)}}return new Date(t)}(e),this.init()},_.init=function(){var e=this.$d;this.$y=e.getFullYear(),this.$M=e.getMonth(),this.$D=e.getDate(),this.$W=e.getDay(),this.$H=e.getHours(),this.$m=e.getMinutes(),this.$s=e.getSeconds(),this.$ms=e.getMilliseconds()},_.$utils=function(){return T},_.isValid=function(){return this.$d.toString()!==p},_.isSame=function(e,t){var n=w(e);return this.startOf(t)<=n&&n<=this.endOf(t)},_.isAfter=function(e,t){return w(e)<this.startOf(t)},_.isBefore=function(e,t){return this.endOf(t)<w(e)},_.$g=function(e,t,n){return T.u(e)?this[t]:this.set(n,e)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(e,t){var n=this,r=!!T.u(t)||t,u=T.p(e),p=function(e,t){var i=T.w(n.$u?Date.UTC(n.$y,t,e):new Date(n.$y,t,e),n);return r?i:i.endOf(s)},m=function(e,t){return T.w(n.toDate()[e].apply(n.toDate(`s`),(r?[0,0,0,0]:[23,59,59,999]).slice(t)),n)},h=this.$W,g=this.$M,_=this.$D,v=`set`+(this.$u?`UTC`:``);switch(u){case d:return r?p(1,0):p(31,11);case l:return r?p(1,g):p(0,g+1);case c:var y=this.$locale().weekStart||0,b=(h<y?h+7:h)-y;return p(r?_-b:_+(6-b),g);case s:case f:return m(v+`Hours`,0);case o:return m(v+`Minutes`,1);case a:return m(v+`Seconds`,2);case i:return m(v+`Milliseconds`,3);default:return this.clone()}},_.endOf=function(e){return this.startOf(e,!1)},_.$set=function(e,t){var n,c=T.p(e),u=`set`+(this.$u?`UTC`:``),p=(n={},n[s]=u+`Date`,n[f]=u+`Date`,n[l]=u+`Month`,n[d]=u+`FullYear`,n[o]=u+`Hours`,n[a]=u+`Minutes`,n[i]=u+`Seconds`,n[r]=u+`Milliseconds`,n)[c],m=c===s?this.$D+(t-this.$W):t;if(c===l||c===d){var h=this.clone().set(f,1);h.$d[p](m),h.init(),this.$d=h.set(f,Math.min(this.$D,h.daysInMonth())).$d}else p&&this.$d[p](m);return this.init(),this},_.set=function(e,t){return this.clone().$set(e,t)},_.get=function(e){return this[T.p(e)]()},_.add=function(r,u){var f,p=this;r=Number(r);var m=T.p(u),h=function(e){var t=w(p);return T.w(t.date(t.date()+Math.round(e*r)),p)};if(m===l)return this.set(l,this.$M+r);if(m===d)return this.set(d,this.$y+r);if(m===s)return h(1);if(m===c)return h(7);var g=(f={},f[a]=t,f[o]=n,f[i]=e,f)[m]||1,_=this.$d.getTime()+r*g;return T.w(_,this)},_.subtract=function(e,t){return this.add(-1*e,t)},_.format=function(e){var t=this,n=this.$locale();if(!this.isValid())return n.invalidDate||p;var r=e||`YYYY-MM-DDTHH:mm:ssZ`,i=T.z(this),a=this.$H,o=this.$m,s=this.$M,c=n.weekdays,l=n.months,u=n.meridiem,d=function(e,n,i,a){return e&&(e[n]||e(t,r))||i[n].slice(0,a)},f=function(e){return T.s(a%12||12,e,`0`)},m=u||function(e,t,n){var r=e<12?`AM`:`PM`;return n?r.toLowerCase():r};return r.replace(h,(function(e,r){return r||function(e){switch(e){case`YY`:return String(t.$y).slice(-2);case`YYYY`:return T.s(t.$y,4,`0`);case`M`:return s+1;case`MM`:return T.s(s+1,2,`0`);case`MMM`:return d(n.monthsShort,s,l,3);case`MMMM`:return d(l,s);case`D`:return t.$D;case`DD`:return T.s(t.$D,2,`0`);case`d`:return String(t.$W);case`dd`:return d(n.weekdaysMin,t.$W,c,2);case`ddd`:return d(n.weekdaysShort,t.$W,c,3);case`dddd`:return c[t.$W];case`H`:return String(a);case`HH`:return T.s(a,2,`0`);case`h`:return f(1);case`hh`:return f(2);case`a`:return m(a,o,!0);case`A`:return m(a,o,!1);case`m`:return String(o);case`mm`:return T.s(o,2,`0`);case`s`:return String(t.$s);case`ss`:return T.s(t.$s,2,`0`);case`SSS`:return T.s(t.$ms,3,`0`);case`Z`:return i}return null}(e)||i.replace(`:`,``)}))},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(r,f,p){var m,h=this,g=T.p(f),_=w(r),v=(_.utcOffset()-this.utcOffset())*t,y=this-_,b=function(){return T.m(h,_)};switch(g){case d:m=b()/12;break;case l:m=b();break;case u:m=b()/3;break;case c:m=(y-v)/6048e5;break;case s:m=(y-v)/864e5;break;case o:m=y/n;break;case a:m=y/t;break;case i:m=y/e;break;default:m=y}return p?m:T.a(m)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return b[this.$L]},_.locale=function(e,t){if(!e)return this.$L;var n=this.clone(),r=C(e,t,!0);return r&&(n.$L=r),n},_.clone=function(){return T.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},g}(),D=E.prototype;return w.prototype=D,[[`$ms`,r],[`$s`,i],[`$m`,a],[`$H`,o],[`$W`,s],[`$M`,l],[`$y`,d],[`$D`,f]].forEach((function(e){D[e[1]]=function(t){return this.$g(t,e[0],e[1])}})),w.extend=function(e,t){return e.$i||=(e(t,E,w),!0),w},w.locale=C,w.isDayjs=S,w.unix=function(e){return w(1e3*e)},w.en=b[y],w.Ls=b,w.p={},w}))})),o=n(r(),1),s=n(a(),1),c=Object.defineProperty,l=(e,t)=>c(e,`name`,{value:t,configurable:!0}),u=(e,t)=>{for(var n in t)c(e,n,{get:t[n],enumerable:!0})},d={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},f={trace:l((...e)=>{},`trace`),debug:l((...e)=>{},`debug`),info:l((...e)=>{},`info`),warn:l((...e)=>{},`warn`),error:l((...e)=>{},`error`),fatal:l((...e)=>{},`fatal`)},p=l(function(e=`fatal`){let t=d.fatal;typeof e==`string`?e.toLowerCase()in d&&(t=d[e]):typeof e==`number`&&(t=e),f.trace=()=>{},f.debug=()=>{},f.info=()=>{},f.warn=()=>{},f.error=()=>{},f.fatal=()=>{},t<=d.fatal&&(f.fatal=console.error?console.error.bind(console,m(`FATAL`),`color: orange`):console.log.bind(console,`\x1B[35m`,m(`FATAL`))),t<=d.error&&(f.error=console.error?console.error.bind(console,m(`ERROR`),`color: orange`):console.log.bind(console,`\x1B[31m`,m(`ERROR`))),t<=d.warn&&(f.warn=console.warn?console.warn.bind(console,m(`WARN`),`color: orange`):console.log.bind(console,`\x1B[33m`,m(`WARN`))),t<=d.info&&(f.info=console.info?console.info.bind(console,m(`INFO`),`color: lightblue`):console.log.bind(console,`\x1B[34m`,m(`INFO`))),t<=d.debug&&(f.debug=console.debug?console.debug.bind(console,m(`DEBUG`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,m(`DEBUG`))),t<=d.trace&&(f.trace=console.debug?console.debug.bind(console,m(`TRACE`),`color: lightgreen`):console.log.bind(console,`\x1B[32m`,m(`TRACE`)))},`setLogLevel`),m=l(e=>`%c${(0,s.default)().format(`ss.SSS`)} : ${e} : `,`format`),h={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:e=>e>=255?255:e<0?0:e,g:e=>e>=255?255:e<0?0:e,b:e=>e>=255?255:e<0?0:e,h:e=>e%360,s:e=>e>=100?100:e<0?0:e,l:e=>e>=100?100:e<0?0:e,a:e=>e>=1?1:e<0?0:e},toLinear:e=>{let t=e/255;return e>.03928?((t+.055)/1.055)**2.4:t/12.92},hue2rgb:(e,t,n)=>(n<0&&(n+=1),n>1&&--n,n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e),hsl2rgb:({h:e,s:t,l:n},r)=>{if(!t)return n*2.55;e/=360,t/=100,n/=100;let i=n<.5?n*(1+t):n+t-n*t,a=2*n-i;switch(r){case`r`:return h.hue2rgb(a,i,e+1/3)*255;case`g`:return h.hue2rgb(a,i,e)*255;case`b`:return h.hue2rgb(a,i,e-1/3)*255}},rgb2hsl:({r:e,g:t,b:n},r)=>{e/=255,t/=255,n/=255;let i=Math.max(e,t,n),a=Math.min(e,t,n),o=(i+a)/2;if(r===`l`)return o*100;if(i===a)return 0;let s=i-a,c=o>.5?s/(2-i-a):s/(i+a);if(r===`s`)return c*100;switch(i){case e:return((t-n)/s+(t<n?6:0))*60;case t:return((n-e)/s+2)*60;case n:return((e-t)/s+4)*60;default:return-1}}},g={channel:h,lang:{clamp:(e,t,n)=>t>n?Math.min(t,Math.max(n,e)):Math.min(n,Math.max(t,e)),round:e=>Math.round(e*1e10)/1e10},unit:{dec2hex:e=>{let t=Math.round(e).toString(16);return t.length>1?t:`0${t}`}}},_={};for(let e=0;e<=255;e++)_[e]=g.unit.dec2hex(e);var v={ALL:0,RGB:1,HSL:2},y=class{constructor(){this.type=v.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw Error(`Cannot change both RGB and HSL channels at the same time`);this.type=e}reset(){this.type=v.ALL}is(e){return this.type===e}},b=new class{constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new y}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=v.ALL,this}_ensureHSL(){let e=this.data,{h:t,s:n,l:r}=e;t===void 0&&(e.h=g.channel.rgb2hsl(e,`h`)),n===void 0&&(e.s=g.channel.rgb2hsl(e,`s`)),r===void 0&&(e.l=g.channel.rgb2hsl(e,`l`))}_ensureRGB(){let e=this.data,{r:t,g:n,b:r}=e;t===void 0&&(e.r=g.channel.hsl2rgb(e,`r`)),n===void 0&&(e.g=g.channel.hsl2rgb(e,`g`)),r===void 0&&(e.b=g.channel.hsl2rgb(e,`b`))}get r(){let e=this.data,t=e.r;return!this.type.is(v.HSL)&&t!==void 0?t:(this._ensureHSL(),g.channel.hsl2rgb(e,`r`))}get g(){let e=this.data,t=e.g;return!this.type.is(v.HSL)&&t!==void 0?t:(this._ensureHSL(),g.channel.hsl2rgb(e,`g`))}get b(){let e=this.data,t=e.b;return!this.type.is(v.HSL)&&t!==void 0?t:(this._ensureHSL(),g.channel.hsl2rgb(e,`b`))}get h(){let e=this.data,t=e.h;return!this.type.is(v.RGB)&&t!==void 0?t:(this._ensureRGB(),g.channel.rgb2hsl(e,`h`))}get s(){let e=this.data,t=e.s;return!this.type.is(v.RGB)&&t!==void 0?t:(this._ensureRGB(),g.channel.rgb2hsl(e,`s`))}get l(){let e=this.data,t=e.l;return!this.type.is(v.RGB)&&t!==void 0?t:(this._ensureRGB(),g.channel.rgb2hsl(e,`l`))}get a(){return this.data.a}set r(e){this.type.set(v.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(v.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(v.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(v.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(v.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(v.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}({r:0,g:0,b:0,a:0},`transparent`),x={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:e=>{if(e.charCodeAt(0)!==35)return;let t=e.match(x.re);if(!t)return;let n=t[1],r=parseInt(n,16),i=n.length,a=i%4==0,o=i>4,s=o?1:17,c=o?8:4,l=a?0:-1,u=o?255:15;return b.set({r:(r>>c*(l+3)&u)*s,g:(r>>c*(l+2)&u)*s,b:(r>>c*(l+1)&u)*s,a:a?(r&u)*s/255:1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`#${_[Math.round(t)]}${_[Math.round(n)]}${_[Math.round(r)]}${_[Math.round(i*255)]}`:`#${_[Math.round(t)]}${_[Math.round(n)]}${_[Math.round(r)]}`}},S={re:/^hsla?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(?:deg|grad|rad|turn)?)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?%)(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e-?\d+)?(%)?))?\s*?\)$/i,hueRe:/^(.+?)(deg|grad|rad|turn)$/i,_hue2deg:e=>{let t=e.match(S.hueRe);if(t){let[,e,n]=t;switch(n){case`grad`:return g.channel.clamp.h(parseFloat(e)*.9);case`rad`:return g.channel.clamp.h(parseFloat(e)*180/Math.PI);case`turn`:return g.channel.clamp.h(parseFloat(e)*360)}}return g.channel.clamp.h(parseFloat(e))},parse:e=>{let t=e.charCodeAt(0);if(t!==104&&t!==72)return;let n=e.match(S.re);if(!n)return;let[,r,i,a,o,s]=n;return b.set({h:S._hue2deg(r),s:g.channel.clamp.s(parseFloat(i)),l:g.channel.clamp.l(parseFloat(a)),a:o?g.channel.clamp.a(s?parseFloat(o)/100:parseFloat(o)):1},e)},stringify:e=>{let{h:t,s:n,l:r,a:i}=e;return i<1?`hsla(${g.lang.round(t)}, ${g.lang.round(n)}%, ${g.lang.round(r)}%, ${i})`:`hsl(${g.lang.round(t)}, ${g.lang.round(n)}%, ${g.lang.round(r)}%)`}},C={colors:{aliceblue:`#f0f8ff`,antiquewhite:`#faebd7`,aqua:`#00ffff`,aquamarine:`#7fffd4`,azure:`#f0ffff`,beige:`#f5f5dc`,bisque:`#ffe4c4`,black:`#000000`,blanchedalmond:`#ffebcd`,blue:`#0000ff`,blueviolet:`#8a2be2`,brown:`#a52a2a`,burlywood:`#deb887`,cadetblue:`#5f9ea0`,chartreuse:`#7fff00`,chocolate:`#d2691e`,coral:`#ff7f50`,cornflowerblue:`#6495ed`,cornsilk:`#fff8dc`,crimson:`#dc143c`,cyanaqua:`#00ffff`,darkblue:`#00008b`,darkcyan:`#008b8b`,darkgoldenrod:`#b8860b`,darkgray:`#a9a9a9`,darkgreen:`#006400`,darkgrey:`#a9a9a9`,darkkhaki:`#bdb76b`,darkmagenta:`#8b008b`,darkolivegreen:`#556b2f`,darkorange:`#ff8c00`,darkorchid:`#9932cc`,darkred:`#8b0000`,darksalmon:`#e9967a`,darkseagreen:`#8fbc8f`,darkslateblue:`#483d8b`,darkslategray:`#2f4f4f`,darkslategrey:`#2f4f4f`,darkturquoise:`#00ced1`,darkviolet:`#9400d3`,deeppink:`#ff1493`,deepskyblue:`#00bfff`,dimgray:`#696969`,dimgrey:`#696969`,dodgerblue:`#1e90ff`,firebrick:`#b22222`,floralwhite:`#fffaf0`,forestgreen:`#228b22`,fuchsia:`#ff00ff`,gainsboro:`#dcdcdc`,ghostwhite:`#f8f8ff`,gold:`#ffd700`,goldenrod:`#daa520`,gray:`#808080`,green:`#008000`,greenyellow:`#adff2f`,grey:`#808080`,honeydew:`#f0fff0`,hotpink:`#ff69b4`,indianred:`#cd5c5c`,indigo:`#4b0082`,ivory:`#fffff0`,khaki:`#f0e68c`,lavender:`#e6e6fa`,lavenderblush:`#fff0f5`,lawngreen:`#7cfc00`,lemonchiffon:`#fffacd`,lightblue:`#add8e6`,lightcoral:`#f08080`,lightcyan:`#e0ffff`,lightgoldenrodyellow:`#fafad2`,lightgray:`#d3d3d3`,lightgreen:`#90ee90`,lightgrey:`#d3d3d3`,lightpink:`#ffb6c1`,lightsalmon:`#ffa07a`,lightseagreen:`#20b2aa`,lightskyblue:`#87cefa`,lightslategray:`#778899`,lightslategrey:`#778899`,lightsteelblue:`#b0c4de`,lightyellow:`#ffffe0`,lime:`#00ff00`,limegreen:`#32cd32`,linen:`#faf0e6`,magenta:`#ff00ff`,maroon:`#800000`,mediumaquamarine:`#66cdaa`,mediumblue:`#0000cd`,mediumorchid:`#ba55d3`,mediumpurple:`#9370db`,mediumseagreen:`#3cb371`,mediumslateblue:`#7b68ee`,mediumspringgreen:`#00fa9a`,mediumturquoise:`#48d1cc`,mediumvioletred:`#c71585`,midnightblue:`#191970`,mintcream:`#f5fffa`,mistyrose:`#ffe4e1`,moccasin:`#ffe4b5`,navajowhite:`#ffdead`,navy:`#000080`,oldlace:`#fdf5e6`,olive:`#808000`,olivedrab:`#6b8e23`,orange:`#ffa500`,orangered:`#ff4500`,orchid:`#da70d6`,palegoldenrod:`#eee8aa`,palegreen:`#98fb98`,paleturquoise:`#afeeee`,palevioletred:`#db7093`,papayawhip:`#ffefd5`,peachpuff:`#ffdab9`,peru:`#cd853f`,pink:`#ffc0cb`,plum:`#dda0dd`,powderblue:`#b0e0e6`,purple:`#800080`,rebeccapurple:`#663399`,red:`#ff0000`,rosybrown:`#bc8f8f`,royalblue:`#4169e1`,saddlebrown:`#8b4513`,salmon:`#fa8072`,sandybrown:`#f4a460`,seagreen:`#2e8b57`,seashell:`#fff5ee`,sienna:`#a0522d`,silver:`#c0c0c0`,skyblue:`#87ceeb`,slateblue:`#6a5acd`,slategray:`#708090`,slategrey:`#708090`,snow:`#fffafa`,springgreen:`#00ff7f`,tan:`#d2b48c`,teal:`#008080`,thistle:`#d8bfd8`,transparent:`#00000000`,turquoise:`#40e0d0`,violet:`#ee82ee`,wheat:`#f5deb3`,white:`#ffffff`,whitesmoke:`#f5f5f5`,yellow:`#ffff00`,yellowgreen:`#9acd32`},parse:e=>{e=e.toLowerCase();let t=C.colors[e];if(t)return x.parse(t)},stringify:e=>{let t=x.stringify(e);for(let e in C.colors)if(C.colors[e]===t)return e}},w={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:e=>{let t=e.charCodeAt(0);if(t!==114&&t!==82)return;let n=e.match(w.re);if(!n)return;let[,r,i,a,o,s,c,l,u]=n;return b.set({r:g.channel.clamp.r(i?parseFloat(r)*2.55:parseFloat(r)),g:g.channel.clamp.g(o?parseFloat(a)*2.55:parseFloat(a)),b:g.channel.clamp.b(c?parseFloat(s)*2.55:parseFloat(s)),a:l?g.channel.clamp.a(u?parseFloat(l)/100:parseFloat(l)):1},e)},stringify:e=>{let{r:t,g:n,b:r,a:i}=e;return i<1?`rgba(${g.lang.round(t)}, ${g.lang.round(n)}, ${g.lang.round(r)}, ${g.lang.round(i)})`:`rgb(${g.lang.round(t)}, ${g.lang.round(n)}, ${g.lang.round(r)})`}},T={format:{keyword:C,hex:x,rgb:w,rgba:w,hsl:S,hsla:S},parse:e=>{if(typeof e!=`string`)return e;let t=x.parse(e)||w.parse(e)||S.parse(e)||C.parse(e);if(t)return t;throw Error(`Unsupported color format: "${e}"`)},stringify:e=>!e.changed&&e.color?e.color:e.type.is(v.HSL)||e.data.r===void 0?S.stringify(e):e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?w.stringify(e):x.stringify(e)},E=(e,t)=>{let n=T.parse(e);for(let e in t)n[e]=g.channel.clamp[e](t[e]);return T.stringify(n)},D=(e,t,n=0,r=1)=>{if(typeof e!=`number`)return E(e,{a:t});let i=b.set({r:g.channel.clamp.r(e),g:g.channel.clamp.g(t),b:g.channel.clamp.b(n),a:g.channel.clamp.a(r)});return T.stringify(i)},ee=e=>{let{r:t,g:n,b:r}=T.parse(e),i=.2126*g.channel.toLinear(t)+.7152*g.channel.toLinear(n)+.0722*g.channel.toLinear(r);return g.lang.round(i)},te=e=>ee(e)>=.5,O=e=>!te(e),ne=(e,t,n)=>{let r=T.parse(e),i=r[t],a=g.channel.clamp[t](i+n);return i!==a&&(r[t]=a),T.stringify(r)},k=(e,t)=>ne(e,`l`,t),A=(e,t)=>ne(e,`l`,-t),j=(e,t)=>{let n=T.parse(e),r={};for(let e in t)t[e]&&(r[e]=n[e]+t[e]);return E(e,r)},re=(e,t,n=50)=>{let{r,g:i,b:a,a:o}=T.parse(e),{r:s,g:c,b:l,a:u}=T.parse(t),d=n/100,f=d*2-1,p=o-u,m=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,h=1-m;return D(r*m+s*h,i*m+c*h,a*m+l*h,o*d+u*(1-d))},M=(e,t=100)=>{let n=T.parse(e);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,re(n,e,t)};function ie(e,t){(t==null||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ae(e){if(Array.isArray(e))return e}function oe(e,t){var n=e==null?null:typeof Symbol<`u`&&e[Symbol.iterator]||e[`@@iterator`];if(n!=null){var r,i,a,o,s=[],c=!0,l=!1;try{if(a=(n=n.call(e)).next,t!==0)for(;!(c=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);c=!0);}catch(e){l=!0,i=e}finally{try{if(!c&&n.return!=null&&(o=n.return(),Object(o)!==o))return}finally{if(l)throw i}}return s}}function se(){throw TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
3
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){return ae(e)||oe(e,t)||le(e,t)||se()}function le(e,t){if(e){if(typeof e==`string`)return ie(e,t);var n={}.toString.call(e).slice(8,-1);return n===`Object`&&e.constructor&&(n=e.constructor.name),n===`Map`||n===`Set`?Array.from(e):n===`Arguments`||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?ie(e,t):void 0}}var ue=Object.entries,de=Object.setPrototypeOf,fe=Object.isFrozen,pe=Object.getPrototypeOf,N=Object.getOwnPropertyDescriptor,me=Object.freeze,he=Object.seal,ge=Object.create,_e=typeof Reflect<`u`&&Reflect,P=_e.apply,ve=_e.construct;me||=function(e){return e},he||=function(e){return e},P||=function(e,t){var n=[...arguments].slice(2);return e.apply(t,n)},ve||=function(e){return new e(...[...arguments].slice(1))};var ye=ze(Array.prototype.forEach),be=ze(Array.prototype.lastIndexOf),xe=ze(Array.prototype.pop),Se=ze(Array.prototype.push),Ce=ze(Array.prototype.splice),we=Array.isArray,Te=ze(String.prototype.toLowerCase),Ee=ze(String.prototype.toString),De=ze(String.prototype.match),Oe=ze(String.prototype.replace),ke=ze(String.prototype.indexOf),Ae=ze(String.prototype.trim),je=ze(Number.prototype.toString),Me=ze(Boolean.prototype.toString),Ne=typeof BigInt>`u`?null:ze(BigInt.prototype.toString),Pe=typeof Symbol>`u`?null:ze(Symbol.prototype.toString),Fe=ze(Object.prototype.hasOwnProperty),Ie=ze(Object.prototype.toString),Le=ze(RegExp.prototype.test),Re=Be(TypeError);function ze(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);var n=[...arguments].slice(1);return P(e,t,n)}}function Be(e){return function(){return ve(e,[...arguments])}}function F(e,t){let n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Te;if(de&&de(e,null),!we(t))return e;let r=t.length;for(;r--;){let i=t[r];if(typeof i==`string`){let e=n(i);e!==i&&(fe(t)||(t[r]=e),i=e)}e[i]=!0}return e}function Ve(e){for(let t=0;t<e.length;t++)Fe(e,t)||(e[t]=null);return e}function He(e){let t=ge(null);for(let r of ue(e)){var n=ce(r,2);let i=n[0],a=n[1];Fe(e,i)&&(we(a)?t[i]=Ve(a):a&&typeof a==`object`&&a.constructor===Object?t[i]=He(a):t[i]=a)}return t}function Ue(e){switch(typeof e){case`string`:return e;case`number`:return je(e);case`boolean`:return Me(e);case`bigint`:return Ne?Ne(e):`0`;case`symbol`:return Pe?Pe(e):`Symbol()`;case`undefined`:return Ie(e);case`function`:case`object`:{if(e===null)return Ie(e);let t=e,n=We(t,`toString`);if(typeof n==`function`){let e=n(t);return typeof e==`string`?e:Ie(e)}return Ie(e)}default:return Ie(e)}}function We(e,t){for(;e!==null;){let n=N(e,t);if(n){if(n.get)return ze(n.get);if(typeof n.value==`function`)return ze(n.value)}e=pe(e)}function n(){return null}return n}function Ge(e){try{return Le(e,``),!0}catch{return!1}}var Ke=me(`a.abbr.acronym.address.area.article.aside.audio.b.bdi.bdo.big.blink.blockquote.body.br.button.canvas.caption.center.cite.code.col.colgroup.content.data.datalist.dd.decorator.del.details.dfn.dialog.dir.div.dl.dt.element.em.fieldset.figcaption.figure.font.footer.form.h1.h2.h3.h4.h5.h6.head.header.hgroup.hr.html.i.img.input.ins.kbd.label.legend.li.main.map.mark.marquee.menu.menuitem.meter.nav.nobr.ol.optgroup.option.output.p.picture.pre.progress.q.rp.rt.ruby.s.samp.search.section.select.shadow.slot.small.source.spacer.span.strike.strong.style.sub.summary.sup.table.tbody.td.template.textarea.tfoot.th.thead.time.tr.track.tt.u.ul.var.video.wbr`.split(`.`)),qe=me(`svg.a.altglyph.altglyphdef.altglyphitem.animatecolor.animatemotion.animatetransform.circle.clippath.defs.desc.ellipse.enterkeyhint.exportparts.filter.font.g.glyph.glyphref.hkern.image.inputmode.line.lineargradient.marker.mask.metadata.mpath.part.path.pattern.polygon.polyline.radialgradient.rect.stop.style.switch.symbol.text.textpath.title.tref.tspan.view.vkern`.split(`.`)),Je=me([`feBlend`,`feColorMatrix`,`feComponentTransfer`,`feComposite`,`feConvolveMatrix`,`feDiffuseLighting`,`feDisplacementMap`,`feDistantLight`,`feDropShadow`,`feFlood`,`feFuncA`,`feFuncB`,`feFuncG`,`feFuncR`,`feGaussianBlur`,`feImage`,`feMerge`,`feMergeNode`,`feMorphology`,`feOffset`,`fePointLight`,`feSpecularLighting`,`feSpotLight`,`feTile`,`feTurbulence`]),Ye=me([`animate`,`color-profile`,`cursor`,`discard`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`foreignobject`,`hatch`,`hatchpath`,`mesh`,`meshgradient`,`meshpatch`,`meshrow`,`missing-glyph`,`script`,`set`,`solidcolor`,`unknown`,`use`]),Xe=me(`math.menclose.merror.mfenced.mfrac.mglyph.mi.mlabeledtr.mmultiscripts.mn.mo.mover.mpadded.mphantom.mroot.mrow.ms.mspace.msqrt.mstyle.msub.msup.msubsup.mtable.mtd.mtext.mtr.munder.munderover.mprescripts`.split(`.`)),Ze=me([`maction`,`maligngroup`,`malignmark`,`mlongdiv`,`mscarries`,`mscarry`,`msgroup`,`mstack`,`msline`,`msrow`,`semantics`,`annotation`,`annotation-xml`,`mprescripts`,`none`]),Qe=me([`#text`]),$e=me(`accept.action.align.alt.autocapitalize.autocomplete.autopictureinpicture.autoplay.background.bgcolor.border.capture.cellpadding.cellspacing.checked.cite.class.clear.color.cols.colspan.command.commandfor.controls.controlslist.coords.crossorigin.datetime.decoding.default.dir.disabled.disablepictureinpicture.disableremoteplayback.download.draggable.enctype.enterkeyhint.exportparts.face.for.headers.height.hidden.high.href.hreflang.id.inert.inputmode.integrity.ismap.kind.label.lang.list.loading.loop.low.max.maxlength.media.method.min.minlength.multiple.muted.name.nonce.noshade.novalidate.nowrap.open.optimum.part.pattern.placeholder.playsinline.popover.popovertarget.popovertargetaction.poster.preload.pubdate.radiogroup.readonly.rel.required.rev.reversed.role.rows.rowspan.spellcheck.scope.selected.shape.size.sizes.slot.span.srclang.start.src.srcset.step.style.summary.tabindex.title.translate.type.usemap.valign.value.width.wrap.xmlns`.split(`.`)),et=me(`accent-height.accumulate.additive.alignment-baseline.amplitude.ascent.attributename.attributetype.azimuth.basefrequency.baseline-shift.begin.bias.by.class.clip.clippathunits.clip-path.clip-rule.color.color-interpolation.color-interpolation-filters.color-profile.color-rendering.cx.cy.d.dx.dy.diffuseconstant.direction.display.divisor.dominant-baseline.dur.edgemode.elevation.end.exponent.fill.fill-opacity.fill-rule.filter.filterunits.flood-color.flood-opacity.font-family.font-size.font-size-adjust.font-stretch.font-style.font-variant.font-weight.fx.fy.g1.g2.glyph-name.glyphref.gradientunits.gradienttransform.height.href.id.image-rendering.in.in2.intercept.k.k1.k2.k3.k4.kerning.keypoints.keysplines.keytimes.lang.lengthadjust.letter-spacing.kernelmatrix.kernelunitlength.lighting-color.local.marker-end.marker-mid.marker-start.markerheight.markerunits.markerwidth.maskcontentunits.maskunits.max.mask.mask-type.media.method.mode.min.name.numoctaves.offset.operator.opacity.order.orient.orientation.origin.overflow.paint-order.path.pathlength.patterncontentunits.patterntransform.patternunits.points.preservealpha.preserveaspectratio.primitiveunits.r.rx.ry.radius.refx.refy.repeatcount.repeatdur.restart.result.rotate.scale.seed.shape-rendering.slope.specularconstant.specularexponent.spreadmethod.startoffset.stddeviation.stitchtiles.stop-color.stop-opacity.stroke-dasharray.stroke-dashoffset.stroke-linecap.stroke-linejoin.stroke-miterlimit.stroke-opacity.stroke.stroke-width.style.surfacescale.systemlanguage.tabindex.tablevalues.targetx.targety.transform.transform-origin.text-anchor.text-decoration.text-orientation.text-rendering.textlength.type.u1.u2.unicode.values.viewbox.visibility.version.vert-adv-y.vert-origin-x.vert-origin-y.width.word-spacing.wrap.writing-mode.xchannelselector.ychannelselector.x.x1.x2.xmlns.y.y1.y2.z.zoomandpan`.split(`.`)),tt=me(`accent.accentunder.align.bevelled.close.columnalign.columnlines.columnspacing.columnspan.denomalign.depth.dir.display.displaystyle.encoding.fence.frame.height.href.id.largeop.length.linethickness.lquote.lspace.mathbackground.mathcolor.mathsize.mathvariant.maxsize.minsize.movablelimits.notation.numalign.open.rowalign.rowlines.rowspacing.rowspan.rspace.rquote.scriptlevel.scriptminsize.scriptsizemultiplier.selection.separator.separators.stretchy.subscriptshift.supscriptshift.symmetric.voffset.width.xmlns`.split(`.`)),nt=me([`xlink:href`,`xml:id`,`xlink:title`,`xml:space`,`xmlns:xlink`]),rt=he(/{{[\w\W]*|^[\w\W]*}}/g),it=he(/<%[\w\W]*|^[\w\W]*%>/g),at=he(/\${[\w\W]*/g),ot=he(/^data-[\-\w.\u00B7-\uFFFF]+$/),st=he(/^aria-[\-\w]+$/),ct=he(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),lt=he(/^(?:\w+script|data):/i),ut=he(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),dt=he(/^html$/i),ft=he(/^[a-z][.\w]*(-[.\w]+)+$/i),pt=he(/<[/\w!]/g),mt=he(/<[/\w]/g),ht=he(/<\/no(script|embed|frames)/i),gt=he(/\/>/i),_t={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},vt=function(){return typeof window>`u`?null:window},yt=function(e,t){if(typeof e!=`object`||typeof e.createPolicy!=`function`)return null;let n=null,r=`data-tt-policy-suffix`;t&&t.hasAttribute(r)&&(n=t.getAttribute(r));let i=`dompurify`+(n?`#`+n:``);try{return e.createPolicy(i,{createHTML(e){return e},createScriptURL(e){return e}})}catch{return console.warn(`TrustedTypes policy `+i+` could not be created.`),null}},bt=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},xt=function(e,t,n,r){return Fe(e,t)&&we(e[t])?F(r.base?He(r.base):{},e[t],r.transform):n};function St(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:vt(),t=e=>St(e);if(t.version=`3.4.12`,t.removed=[],!e||!e.document||e.document.nodeType!==_t.document||!e.Element)return t.isSupported=!1,t;let n=e.document,r=n,i=r.currentScript;e.DocumentFragment;let a=e.HTMLTemplateElement,o=e.Node,s=e.Element,c=e.NodeFilter;e.NamedNodeMap===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;let l=e.DOMParser,u=e.trustedTypes,d=s.prototype,f=We(d,`cloneNode`),p=We(d,`remove`),m=We(d,`nextSibling`),h=We(d,`childNodes`),g=We(d,`parentNode`),_=We(d,`shadowRoot`),v=We(d,`attributes`),y=o&&o.prototype?We(o.prototype,`nodeType`):null,b=o&&o.prototype?We(o.prototype,`nodeName`):null;if(typeof a==`function`){let e=n.createElement(`template`);e.content&&e.content.ownerDocument&&(n=e.content.ownerDocument)}let x,S=``,C,w=!1,T=0,E=function(){if(T>0)throw Re(`A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.`)},D=function(e){E(),T++;try{return x.createHTML(e)}finally{T--}},ee=function(e){E(),T++;try{return x.createScriptURL(e)}finally{T--}},te=function(){return w||=(C=yt(u,i),!0),C},O=n,ne=O.implementation,k=O.createNodeIterator,A=O.createDocumentFragment,j=O.getElementsByTagName,re=r.importNode,M=bt();t.isSupported=typeof ue==`function`&&typeof g==`function`&&ne&&ne.createHTMLDocument!==void 0;let ie=rt,ae=it,oe=at,se=ot,ce=st,le=lt,de=ut,fe=ft,pe=ct,N=null,_e=F({},[...Ke,...qe,...Je,...Xe,...Qe]),P=null,ve=F({},[...$e,...et,...tt,...nt]),je=Object.seal(ge(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),Me=null,Ne=null,Pe=Object.seal(ge(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}})),Ie=!0,ze=!0,Be=!1,Ve=!0,Ct=!1,wt=!0,Tt=!1,Et=!1,Dt=null,Ot=null,kt=!1,At=!1,jt=!1,Mt=!1,Nt=!0,Pt=!1,Ft=`user-content-`,It=!0,I=!1,Lt={},Rt=null,zt=F({},`annotation-xml.audio.colgroup.desc.foreignobject.head.iframe.math.mi.mn.mo.ms.mtext.noembed.noframes.noscript.plaintext.script.selectedcontent.style.svg.template.thead.title.video.xmp`.split(`.`)),Bt=null,Vt=F({},[`audio`,`video`,`img`,`source`,`image`,`track`]),Ht=null,Ut=F({},[`alt`,`class`,`for`,`id`,`label`,`name`,`pattern`,`placeholder`,`role`,`summary`,`title`,`value`,`style`,`xmlns`]),Wt=`http://www.w3.org/1998/Math/MathML`,Gt=`http://www.w3.org/2000/svg`,Kt=`http://www.w3.org/1999/xhtml`,qt=Kt,Jt=!1,Yt=null,Xt=F({},[Wt,Gt,Kt],Ee),Zt=me([`mi`,`mo`,`mn`,`ms`,`mtext`]),Qt=F({},Zt),$t=me([`annotation-xml`]),en=F({},$t),tn=F({},[`title`,`style`,`font`,`a`,`script`]),nn=null,rn=[`application/xhtml+xml`,`text/html`],L=null,an=null,on=n.createElement(`form`),sn=function(e){return e instanceof RegExp||e instanceof Function},cn=function(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(an&&an===e)return;(!e||typeof e!=`object`)&&(e={}),e=He(e),nn=rn.indexOf(e.PARSER_MEDIA_TYPE)===-1?`text/html`:e.PARSER_MEDIA_TYPE,L=nn===`application/xhtml+xml`?Ee:Te,N=xt(e,`ALLOWED_TAGS`,_e,{transform:L}),P=xt(e,`ALLOWED_ATTR`,ve,{transform:L}),Yt=xt(e,`ALLOWED_NAMESPACES`,Xt,{transform:Ee}),Ht=xt(e,`ADD_URI_SAFE_ATTR`,Ut,{transform:L,base:Ut}),Bt=xt(e,`ADD_DATA_URI_TAGS`,Vt,{transform:L,base:Vt}),Rt=xt(e,`FORBID_CONTENTS`,zt,{transform:L}),Me=xt(e,`FORBID_TAGS`,He({}),{transform:L}),Ne=xt(e,`FORBID_ATTR`,He({}),{transform:L}),Lt=Fe(e,`USE_PROFILES`)?e.USE_PROFILES&&typeof e.USE_PROFILES==`object`?He(e.USE_PROFILES):e.USE_PROFILES:!1,Ie=e.ALLOW_ARIA_ATTR!==!1,ze=e.ALLOW_DATA_ATTR!==!1,Be=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Ve=e.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Ct=e.SAFE_FOR_TEMPLATES||!1,wt=e.SAFE_FOR_XML!==!1,Tt=e.WHOLE_DOCUMENT||!1,At=e.RETURN_DOM||!1,jt=e.RETURN_DOM_FRAGMENT||!1,Mt=e.RETURN_TRUSTED_TYPE||!1,kt=e.FORCE_BODY||!1,Nt=e.SANITIZE_DOM!==!1,Pt=e.SANITIZE_NAMED_PROPS||!1,It=e.KEEP_CONTENT!==!1,I=e.IN_PLACE||!1,pe=Ge(e.ALLOWED_URI_REGEXP)?e.ALLOWED_URI_REGEXP:ct,qt=typeof e.NAMESPACE==`string`?e.NAMESPACE:Kt,Qt=Fe(e,`MATHML_TEXT_INTEGRATION_POINTS`)&&e.MATHML_TEXT_INTEGRATION_POINTS&&typeof e.MATHML_TEXT_INTEGRATION_POINTS==`object`?He(e.MATHML_TEXT_INTEGRATION_POINTS):F({},Zt),en=Fe(e,`HTML_INTEGRATION_POINTS`)&&e.HTML_INTEGRATION_POINTS&&typeof e.HTML_INTEGRATION_POINTS==`object`?He(e.HTML_INTEGRATION_POINTS):F({},$t);let t=Fe(e,`CUSTOM_ELEMENT_HANDLING`)&&e.CUSTOM_ELEMENT_HANDLING&&typeof e.CUSTOM_ELEMENT_HANDLING==`object`?He(e.CUSTOM_ELEMENT_HANDLING):ge(null);if(je=ge(null),Fe(t,`tagNameCheck`)&&sn(t.tagNameCheck)&&(je.tagNameCheck=t.tagNameCheck),Fe(t,`attributeNameCheck`)&&sn(t.attributeNameCheck)&&(je.attributeNameCheck=t.attributeNameCheck),Fe(t,`allowCustomizedBuiltInElements`)&&typeof t.allowCustomizedBuiltInElements==`boolean`&&(je.allowCustomizedBuiltInElements=t.allowCustomizedBuiltInElements),he(je),Ct&&(ze=!1),jt&&(At=!0),Lt&&(N=F({},Qe),P=ge(null),Lt.html===!0&&(F(N,Ke),F(P,$e)),Lt.svg===!0&&(F(N,qe),F(P,et),F(P,nt)),Lt.svgFilters===!0&&(F(N,Je),F(P,et),F(P,nt)),Lt.mathMl===!0&&(F(N,Xe),F(P,tt),F(P,nt))),Pe.tagCheck=null,Pe.attributeCheck=null,Fe(e,`ADD_TAGS`)&&(typeof e.ADD_TAGS==`function`?Pe.tagCheck=e.ADD_TAGS:we(e.ADD_TAGS)&&(N===_e&&(N=He(N)),F(N,e.ADD_TAGS,L))),Fe(e,`ADD_ATTR`)&&(typeof e.ADD_ATTR==`function`?Pe.attributeCheck=e.ADD_ATTR:we(e.ADD_ATTR)&&(P===ve&&(P=He(P)),F(P,e.ADD_ATTR,L))),Fe(e,`ADD_URI_SAFE_ATTR`)&&we(e.ADD_URI_SAFE_ATTR)&&F(Ht,e.ADD_URI_SAFE_ATTR,L),Fe(e,`FORBID_CONTENTS`)&&we(e.FORBID_CONTENTS)&&(Rt===zt&&(Rt=He(Rt)),F(Rt,e.FORBID_CONTENTS,L)),Fe(e,`ADD_FORBID_CONTENTS`)&&we(e.ADD_FORBID_CONTENTS)&&(Rt===zt&&(Rt=He(Rt)),F(Rt,e.ADD_FORBID_CONTENTS,L)),It&&(N[`#text`]=!0),Tt&&F(N,[`html`,`head`,`body`]),N.table&&(F(N,[`tbody`]),delete Me.tbody),e.TRUSTED_TYPES_POLICY){if(typeof e.TRUSTED_TYPES_POLICY.createHTML!=`function`)throw Re(`TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.`);if(typeof e.TRUSTED_TYPES_POLICY.createScriptURL!=`function`)throw Re(`TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.`);let t=x;x=e.TRUSTED_TYPES_POLICY;try{S=D(``)}catch(e){throw x=t,e}}else e.TRUSTED_TYPES_POLICY===null?(x=void 0,S=``):(x===void 0&&(x=te()),x&&typeof S==`string`&&(S=D(``)));me&&me(e),an=e},ln=F({},[...qe,...Je,...Ye]),un=F({},[...Xe,...Ze]),dn=function(e,t,n){return t.namespaceURI===Kt?e===`svg`:t.namespaceURI===Wt?e===`svg`&&(n===`annotation-xml`||Qt[n]):!!ln[e]},fn=function(e,t,n){return t.namespaceURI===Kt?e===`math`:t.namespaceURI===Gt?e===`math`&&en[n]:!!un[e]},pn=function(e,t,n){return t.namespaceURI===Gt&&!en[n]||t.namespaceURI===Wt&&!Qt[n]?!1:!un[e]&&(tn[e]||!ln[e])},mn=function(e){let t=g(e);(!t||!t.tagName)&&(t={namespaceURI:qt,tagName:`template`});let n=Te(e.tagName),r=Te(t.tagName);return Yt[e.namespaceURI]?e.namespaceURI===Gt?dn(n,t,r):e.namespaceURI===Wt?fn(n,t,r):e.namespaceURI===Kt?pn(n,t,r):!!(nn===`application/xhtml+xml`&&Yt[e.namespaceURI]):!1},hn=function(e){Se(t.removed,{element:e});try{g(e).removeChild(e)}catch{if(p(e),!g(e))throw Re(`a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place`)}},gn=function(e){yn(e);let t=h(e);if(t){let e=[];ye(t,t=>{Se(e,t)}),ye(e,e=>{try{p(e)}catch{}})}let n=v(e);if(n)for(let t=n.length-1;t>=0;--t){let r=n[t],i=r&&r.name;if(typeof i==`string`)try{e.removeAttribute(i)}catch{}}},_n=function(e,n){try{Se(t.removed,{attribute:n.getAttributeNode(e),from:n})}catch{Se(t.removed,{attribute:null,from:n})}if(n.removeAttribute(e),e===`is`)if(At||jt)try{hn(n)}catch{}else try{n.setAttribute(e,``)}catch{}},vn=function(e){let t=v(e);if(t)for(let n=t.length-1;n>=0;--n){let r=t[n],i=r&&r.name;if(!(typeof i!=`string`||P[L(i)]))try{e.removeAttribute(i)}catch{}}},yn=function(e){let t=[e];for(;t.length>0;){let e=t.pop();(y?y(e):e.nodeType)===_t.element&&vn(e);let n=h(e);if(n)for(let e=n.length-1;e>=0;--e)t.push(n[e])}},bn=function(e){if(!wt)return;let t=[e];for(;t.length>0;){let e=t.pop(),n=y?y(e):e.nodeType;if(n===_t.processingInstruction||n===_t.comment&&Le(mt,e.data)){try{p(e)}catch{}continue}if(n===_t.element){let t=e,n=L(b?b(e):e.nodeName);try{t.hasAttribute&&t.hasAttribute(`patchsrc`)&&t.removeAttribute(`patchsrc`),t.hasAttribute&&t.hasAttribute(`for`)&&n!==`label`&&n!==`output`&&t.removeAttribute(`for`)}catch{}}let r=h(e);if(r)for(let e=r.length-1;e>=0;--e)t.push(r[e])}},xn=function(e){let t=null,r=null;if(kt)e=`<remove></remove>`+e;else{let t=De(e,/^[\r\n\t ]+/);r=t&&t[0]}nn===`application/xhtml+xml`&&qt===Kt&&(e=`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>`+e+`</body></html>`);let i=x?D(e):e;if(qt===Kt)try{t=new l().parseFromString(i,nn)}catch{}if(!t||!t.documentElement){t=ne.createDocument(qt,`template`,null);try{t.documentElement.innerHTML=Jt?S:i}catch{}}let a=t.body||t.documentElement;return e&&r&&a.insertBefore(n.createTextNode(r),a.childNodes[0]||null),qt===Kt?j.call(t,Tt?`html`:`body`)[0]:Tt?t.documentElement:a},Sn=function(e){return k.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},Cn=function(e){return e=Oe(e,ie,` `),e=Oe(e,ae,` `),e=Oe(e,oe,` `),e},R=function(e){e.normalize();let t=k.call(e.ownerDocument||e,e,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null),n=t.nextNode();for(;n;)n.data=Cn(n.data),n=t.nextNode();let r=e.querySelectorAll?.call(e,`template`);r&&ye(r,e=>{Tn(e.content)&&R(e.content)})},wn=function(e){let t=b?b(e):null;return typeof t!=`string`||L(t)!==`form`?!1:typeof e.nodeName!=`string`||typeof e.textContent!=`string`||typeof e.removeChild!=`function`||e.attributes!==v(e)||typeof e.removeAttribute!=`function`||typeof e.setAttribute!=`function`||typeof e.namespaceURI!=`string`||typeof e.insertBefore!=`function`||typeof e.hasChildNodes!=`function`||e.nodeType!==y(e)||e.childNodes!==h(e)},Tn=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return y(e)===_t.documentFragment}catch{return!1}},En=function(e){if(!y||typeof e!=`object`||!e)return!1;try{return typeof y(e)==`number`}catch{return!1}};function Dn(e,n,r){e.length!==0&&ye(e,e=>{e.call(t,n,r,an)})}let On=function(e,t){return!!(wt&&e.hasChildNodes()&&!En(e.firstElementChild)&&Le(pt,e.textContent)&&Le(pt,e.innerHTML)||wt&&e.namespaceURI===Kt&&t===`style`&&En(e.firstElementChild)||e.nodeType===_t.processingInstruction||wt&&e.nodeType===_t.comment&&Le(mt,e.data))},kn=function(e,t){if(!Me[t]&&Nn(t)&&(je.tagNameCheck instanceof RegExp&&Le(je.tagNameCheck,t)||je.tagNameCheck instanceof Function&&je.tagNameCheck(t)))return!1;if(It&&!Rt[t]){let t=g(e),n=h(e);if(n&&t){let r=n.length;for(let i=r-1;i>=0;--i){let r=I?n[i]:f(n[i],!0);t.insertBefore(r,m(e))}}}return hn(e),!0},An=function(e,n){if(Dn(M.beforeSanitizeElements,e,null),e!==n&&g(e)===null)return!0;if(wn(e))return hn(e),!0;let r=L(b?b(e):e.nodeName);if(Dn(M.uponSanitizeElement,e,{tagName:r,allowedTags:N}),e!==n&&g(e)===null)return!0;if(On(e,r))return hn(e),!0;if(Me[r]||!(Pe.tagCheck instanceof Function&&Pe.tagCheck(r))&&!N[r]){let t=kn(e,r);return t===!1&&Dn(M.afterSanitizeElements,e,null),t}if((y?y(e):e.nodeType)===_t.element&&!mn(e)||(r===`noscript`||r===`noembed`||r===`noframes`)&&Le(ht,e.innerHTML))return hn(e),!0;if(Ct&&e.nodeType===_t.text){let n=Cn(e.textContent);e.textContent!==n&&(Se(t.removed,{element:e.cloneNode()}),e.textContent=n)}return Dn(M.afterSanitizeElements,e,null),!1},jn=function(e,t,r){if(Ne[t]||wt&&t===`patchsrc`||wt&&t===`for`&&e!==`label`&&e!==`output`||Nt&&(t===`id`||t===`name`)&&(r in n||r in on))return!1;let i=P[t]||Pe.attributeCheck instanceof Function&&Pe.attributeCheck(t,e);if(!(ze&&Le(se,t))&&!(Ie&&Le(ce,t))){if(!i){if(!(Nn(e)&&(je.tagNameCheck instanceof RegExp&&Le(je.tagNameCheck,e)||je.tagNameCheck instanceof Function&&je.tagNameCheck(e))&&(je.attributeNameCheck instanceof RegExp&&Le(je.attributeNameCheck,t)||je.attributeNameCheck instanceof Function&&je.attributeNameCheck(t,e))||t===`is`&&je.allowCustomizedBuiltInElements&&(je.tagNameCheck instanceof RegExp&&Le(je.tagNameCheck,r)||je.tagNameCheck instanceof Function&&je.tagNameCheck(r))))return!1}else if(!Ht[t]&&!Le(pe,Oe(r,de,``))&&!((t===`src`||t===`xlink:href`||t===`href`)&&e!==`script`&&ke(r,`data:`)===0&&Bt[e])&&!(Be&&!Le(le,Oe(r,de,``)))&&r)return!1}return!0},Mn=F({},[`annotation-xml`,`color-profile`,`font-face`,`font-face-format`,`font-face-name`,`font-face-src`,`font-face-uri`,`missing-glyph`]),Nn=function(e){return!Mn[Te(e)]&&Le(fe,e)},Pn=function(e,t,n,r){if(x&&typeof u==`object`&&typeof u.getAttributeType==`function`&&!n)switch(u.getAttributeType(e,t)){case`TrustedHTML`:return D(r);case`TrustedScriptURL`:return ee(r)}return r},Fn=function(e,n,r,i){try{r?e.setAttributeNS(r,n,i):e.setAttribute(n,i),wn(e)?hn(e):xe(t.removed)}catch{_n(n,e)}},In=function(e){Dn(M.beforeSanitizeAttributes,e,null);let t=e.attributes;if(!t||wn(e))return;let n={attrName:``,attrValue:``,keepAttr:!0,allowedAttributes:P,forceKeepAttr:void 0},r=t.length,i=L(e.nodeName);for(;r--;){let a=t[r],o=a.name,s=a.namespaceURI,c=a.value,l=L(o),u=c,d=o===`value`?u:Ae(u);if(n.attrName=l,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,Dn(M.uponSanitizeAttribute,e,n),d=n.attrValue,Pt&&(l===`id`||l===`name`)&&ke(d,Ft)!==0&&(_n(o,e),d=Ft+d),wt&&Le(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)){_n(o,e);continue}if(l===`attributename`&&De(d,`href`)){_n(o,e);continue}if(!n.forceKeepAttr){if(!n.keepAttr){_n(o,e);continue}if(!Ve&&Le(gt,d)){_n(o,e);continue}if(Ct&&(d=Cn(d)),!jn(i,l,d)){_n(o,e);continue}d=Pn(i,l,s,d),d!==u&&Fn(e,o,s,d)}}Dn(M.afterSanitizeAttributes,e,null)},Ln=function(e){let t=null,n=Sn(e);for(Dn(M.beforeSanitizeShadowDOM,e,null);t=n.nextNode();)if(Dn(M.uponSanitizeShadowNode,t,null),An(t,e),In(t),Tn(t.content)&&Ln(t.content),(y?y(t):t.nodeType)===_t.element){let e=_(t);Tn(e)&&(Rn(e),Ln(e))}Dn(M.afterSanitizeShadowDOM,e,null)},Rn=function(e){let t=[{node:e,shadow:null}];for(;t.length>0;){let e=t.pop();if(e.shadow){Ln(e.shadow);continue}let n=e.node,r=(y?y(n):n.nodeType)===_t.element,i=h(n);if(i)for(let e=i.length-1;e>=0;--e)t.push({node:i[e],shadow:null});if(r){let e=b?b(n):null;if(typeof e==`string`&&L(e)===`template`){let e=n.content;Tn(e)&&t.push({node:e,shadow:null})}}if(r){let e=_(n);Tn(e)&&t.push({node:null,shadow:e},{node:e,shadow:null})}}};return t.sanitize=function(e){let n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},i=null,a=null,o=null,s=null;if(Jt=!e,Jt&&(e=`<!-->`),typeof e!=`string`&&!En(e)&&(e=Ue(e),typeof e!=`string`))throw Re(`dirty is not a string, aborting`);if(!t.isSupported)return e;Et?(N=Dt,P=Ot):cn(n),(M.uponSanitizeElement.length>0||M.uponSanitizeAttribute.length>0)&&(N=He(N)),M.uponSanitizeAttribute.length>0&&(P=He(P)),t.removed=[];let c=I&&typeof e!=`string`&&En(e);if(c){bn(e);let t=b?b(e):e.nodeName;if(typeof t==`string`){let n=L(t);if(!N[n]||Me[n])throw gn(e),Re(`root node is forbidden and cannot be sanitized in-place`)}if(wn(e))throw gn(e),Re(`root node is clobbered and cannot be sanitized in-place`);try{Rn(e)}catch(t){throw gn(e),t}}else if(En(e))i=xn(`<!---->`),a=i.ownerDocument.importNode(e,!0),a.nodeType===_t.element&&a.nodeName===`BODY`||a.nodeName===`HTML`?i=a:i.appendChild(a),Rn(a);else{if(!At&&!Ct&&!Tt&&e.indexOf(`<`)===-1)return x&&Mt?D(e):e;if(i=xn(e),!i)return At?null:Mt?S:``}i&&kt&&hn(i.firstChild);let l=c?e:i,u=Sn(l);try{for(;o=u.nextNode();)An(o,l),In(o),Tn(o.content)&&Ln(o.content)}catch(n){throw c&&(gn(e),ye(t.removed,e=>{e.element&&yn(e.element)})),n}if(c)return ye(t.removed,e=>{e.element&&yn(e.element)}),Ct&&R(e),e;if(At){if(Ct&&R(i),jt)for(s=A.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(P.shadowroot||P.shadowrootmode)&&(s=re.call(r,s,!0)),s}let d=Tt?i.outerHTML:i.innerHTML;return Tt&&N[`!doctype`]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&Le(dt,i.ownerDocument.doctype.name)&&(d=`<!DOCTYPE `+i.ownerDocument.doctype.name+`>
|
|
4
|
-
`+d),Ct&&(d=Cn(d)),x&&Mt?D(d):d},t.setConfig=function(){cn(arguments.length>0&&arguments[0]!==void 0?arguments[0]:{}),Et=!0,Dt=N,Ot=P},t.clearConfig=function(){an=null,Et=!1,Dt=null,Ot=null,x=C,S=``},t.isValidAttribute=function(e,t,n){return an||cn({}),jn(L(e),L(t),n)},t.addHook=function(e,t){typeof t==`function`&&Fe(M,e)&&Se(M[e],t)},t.removeHook=function(e,t){if(Fe(M,e)){if(t!==void 0){let n=be(M[e],t);return n===-1?void 0:Ce(M[e],n,1)[0]}return xe(M[e])}},t.removeHooks=function(e){Fe(M,e)&&(M[e]=[])},t.removeAllHooks=function(){M=bt()},t}var Ct=St(),wt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Tt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Et=/\s*%%.*\n/gm,Dt=class extends Error{static{l(this,`UnknownDiagramError`)}constructor(e){super(e),this.name=`UnknownDiagramError`}},Ot={},kt=l(function(e,t){e=e.replace(wt,``).replace(Tt,``).replace(Et,`
|
|
5
|
-
`);for(let[n,{detector:r}]of Object.entries(Ot))if(r(e,t))return n;throw new Dt(`No diagram type detected matching given configuration for text: ${e}`)},`detectType`),At=l((...e)=>{for(let{id:t,detector:n,loader:r}of e)jt(t,n,r)},`registerLazyLoadedDiagrams`),jt=l((e,t,n)=>{Ot[e]&&f.warn(`Detector with key ${e} already exists. Overwriting.`),Ot[e]={detector:t,loader:n},f.debug(`Detector with key ${e} added${n?` with loader`:``}`)},`addDetector`),Mt=l(e=>Ot[e].loader,`getDiagramLoader`),Nt=l((e,t,{depth:n=2,clobber:r=!1}={})=>{let i={depth:n,clobber:r};return Array.isArray(t)&&!Array.isArray(e)?(t.forEach(t=>Nt(e,t,i)),e):Array.isArray(t)&&Array.isArray(e)?(t.forEach(t=>{e.includes(t)||e.push(t)}),e):e===void 0||n<=0?typeof e==`object`&&e&&typeof t==`object`?Object.assign(e,t):t:(t!==void 0&&typeof e==`object`&&typeof t==`object`&&Object.keys(t).forEach(i=>{typeof t[i]==`object`&&t[i]!==null&&(e[i]===void 0||typeof e[i]==`object`)?(e[i]===void 0&&(e[i]=Array.isArray(t[i])?[]:{}),e[i]=Nt(e[i],t[i],{depth:n-1,clobber:r})):(r||typeof e[i]!=`object`&&typeof t[i]!=`object`)&&(e[i]=t[i])}),e)},`assignWithDepth`),Pt=Nt,Ft=`#ffffff`,It=`#f2f2f2`,I=l((e,t)=>t?j(e,{s:-40,l:10}):j(e,{s:-40,l:-10}),`mkBorder`),Lt=class{static{l(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#fff4dd`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.useGradient=!0,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||k(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||`navy`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||A(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||A(this.mainBkg,10)):(this.rowOdd=this.rowOdd||k(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||k(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??j(this.primaryColor,{l:-30}),this.venn2=this.venn2??j(this.secondaryColor,{l:-30}),this.venn3=this.venn3??j(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??j(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??j(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??j(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??j(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??j(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||`#777`,this.archEdgeArrowColor=this.archEdgeArrowColor||`#777`,this.archEdgeWidth=this.archEdgeWidth||`3`,this.archGroupBorderColor=this.archGroupBorderColor||`#000`,this.archGroupBorderWidth=this.archGroupBorderWidth||`2px`,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Rt=l(e=>{let t=new Lt;return t.calculate(e),t},`getThemeVariables`),zt=class{static{l(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg=`#1f2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.lineColor=`calculated`,this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=`calculated`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#F9FFFE`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`calculated`,this.activationBkgColor=`calculated`,this.sequenceNumberColor=`black`,this.clusterBkg=`#302F3D`,this.sectionBkgColor=A(`#EAE8D9`,30),this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`#EAE8D9`,this.excludeBkgColor=A(this.sectionBkgColor,10),this.taskBorderColor=D(255,255,255,70),this.taskBkgColor=`calculated`,this.taskTextColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=D(255,255,255,50),this.activeTaskBkgColor=`#81B1DB`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#E83737`,this.critBkgColor=`#E83737`,this.taskTextDarkColor=`calculated`,this.todayLineColor=`#DB5757`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=this.rowOdd||k(this.mainBkg,5)||`#ffffff`,this.rowEven=this.rowEven||A(this.mainBkg,10),this.labelColor=`calculated`,this.errorBkgColor=`#a44141`,this.errorTextColor=`#ddd`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`}updateColors(){this.secondBkg=k(this.mainBkg,16),this.lineColor=this.mainContrastColor,this.arrowheadColor=this.mainContrastColor,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.edgeLabelBackground=k(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=k(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=M(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#555`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#f4f4f4`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.cScale1=this.cScale1||`#0b0000`,this.cScale2=this.cScale2||`#4d1037`,this.cScale3=this.cScale3||`#3f5258`,this.cScale4=this.cScale4||`#4f2f1b`,this.cScale5=this.cScale5||`#6e0a0a`,this.cScale6=this.cScale6||`#3b0048`,this.cScale7=this.cScale7||`#995a01`,this.cScale8=this.cScale8||`#154706`,this.cScale9=this.cScale9||`#161722`,this.cScale10=this.cScale10||`#00296f`,this.cScale11=this.cScale11||`#01629c`,this.cScale12=this.cScale12||`#010029`,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10);for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:30,s:-30,l:-(-10+e*4)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:30,s:-30,l:-(-7+e*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??k(this[`cScale`+e],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22`},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#ff6b6b`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=k(this.secondaryColor,20),this.git1=k(this.pie2||this.secondaryColor,20),this.git2=k(this.pie3||this.tertiaryColor,20),this.git3=k(this.pie4||j(this.primaryColor,{h:-30}),20),this.git4=k(this.pie5||j(this.primaryColor,{h:-60}),20),this.git5=k(this.pie6||j(this.primaryColor,{h:-90}),10),this.git6=k(this.pie7||j(this.primaryColor,{h:60}),10),this.git7=k(this.pie8||j(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`#2d2d2d`,this.emUiStroke=this.emUiStroke||`#555`,this.emProcessorFill=this.emProcessorFill||k(`#5a3d5c`,10),this.emProcessorStroke=this.emProcessorStroke||`#8a6d8c`,this.emReadModelFill=this.emReadModelFill||k(`#3d5a2d`,10),this.emReadModelStroke=this.emReadModelStroke||`#6d8c5c`,this.emCommandFill=this.emCommandFill||k(`#2d3d5a`,10),this.emCommandStroke=this.emCommandStroke||`#5c6d8c`,this.emEventFill=this.emEventFill||k(`#5a452d`,10),this.emEventStroke=this.emEventStroke||`#8c755c`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||k(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||k(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||k(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||k(this.background,2),this.nodeBorder=this.nodeBorder||`#999`}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Bt=l(e=>{let t=new zt;return t.calculate(e),t},`getThemeVariables`),Vt=class{static{l(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#ECECFF`,this.secondaryColor=j(this.primaryColor,{h:120}),this.secondaryColor=`#ffffde`,this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.primaryColor,this.darkMode),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.background=`white`,this.mainBkg=`#ECECFF`,this.secondBkg=`#ffffde`,this.lineColor=`#333333`,this.border1=`#9370DB`,this.primaryBorderColor=I(this.primaryColor,this.darkMode),this.border2=`#aaaa33`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.labelBackground=`rgba(232,232,232, 0.8)`,this.textColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`calculated`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.clusterBkg=`#FBFBFF`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`calculated`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`calculated`,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor=`calculated`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBorderColor=`calculated`,this.critBkgColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.sectionBkgColor=D(102,102,255,.49),this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#fff400`,this.taskBorderColor=`#534fbc`,this.taskBkgColor=`#8a90dd`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`#534fbc`,this.activeTaskBkgColor=`#bfc7ff`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`navy`,this.noteFontWeight=this.noteFontWeight||`normal`,this.fontWeight=this.fontWeight||`normal`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.rowOdd=`calculated`,this.rowEven=`calculated`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))`,this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||j(this[`cScale`+e],{h:180});for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:30,l:-(7+e*5)});if(this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!==`calculated`){this.cScaleLabel0=this.cScaleLabel0||M(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||M(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||k(this.primaryColor,75)||`#ffffff`,this.rowEven=this.rowEven||k(this.primaryColor,1),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||j(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-30}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||j(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??j(this.primaryColor,{l:-30}),this.venn2=this.venn2??j(this.secondaryColor,{l:-30}),this.venn3=this.venn3??j(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??j(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??j(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??j(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??j(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??j(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||A(M(this.git0),25),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(Object.keys(this).forEach(e=>{this[e]===`calculated`&&(this[e]=void 0)}),typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Ht=l(e=>{let t=new Vt;return t.calculate(e),t},`getThemeVariables`),Ut=class{static{l(this,`Theme`)}constructor(){this.background=`#f4f4f4`,this.primaryColor=`#cde498`,this.secondaryColor=`#cdffb2`,this.background=`white`,this.mainBkg=`#cde498`,this.secondBkg=`#cdffb2`,this.lineColor=`green`,this.border1=`#13540c`,this.border2=`#6eaa49`,this.arrowheadColor=`green`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.tertiaryColor=k(`#cde498`,10),this.primaryBorderColor=I(this.primaryColor,this.darkMode),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.primaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`#333`,this.edgeLabelBackground=`#e8e8e8`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`black`,this.actorLineColor=`calculated`,this.signalColor=`#333`,this.signalTextColor=`#333`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`#326932`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`#6eaa49`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`#6eaa49`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`#487e3a`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`black`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`lightgrey`,this.doneTaskBkgColor=`lightgrey`,this.doneTaskBorderColor=`grey`,this.critBorderColor=`#ff8888`,this.critBkgColor=`red`,this.todayLineColor=`red`,this.vertLineColor=`#00BFFF`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))`}updateColors(){this.actorBorder=A(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||A(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||A(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],10),this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||j(this[`cScale`+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!==`calculated`&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:30,s:-30,l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:30,s:-30,l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||k(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||k(this.mainBkg,20),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-30}),this.pie5=this.pie5||j(this.secondaryColor,{l:-30}),this.pie6=this.pie6||j(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.venn1=this.venn1??j(this.primaryColor,{l:-30}),this.venn2=this.venn2??j(this.secondaryColor,{l:-30}),this.venn3=this.venn3??j(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??j(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??j(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??j(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??j(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??j(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||M(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||M(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Wt=l(e=>{let t=new Ut;return t.calculate(e),t},`getThemeVariables`),Gt=class{static{l(this,`Theme`)}constructor(){this.primaryColor=`#eee`,this.contrast=`#707070`,this.secondaryColor=k(this.contrast,55),this.background=`#ffffff`,this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=I(this.primaryColor,this.darkMode),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.lineColor=M(this.background),this.textColor=M(this.background),this.mainBkg=`#eee`,this.secondBkg=`calculated`,this.lineColor=`#666`,this.border1=`#999`,this.border2=`calculated`,this.note=`#ffa`,this.text=`#333`,this.critical=`#d42`,this.done=`#bbb`,this.arrowheadColor=`#333333`,this.fontFamily=`"trebuchet ms", verdana, arial, sans-serif`,this.fontSize=`16px`,this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg=`calculated`,this.nodeBorder=`calculated`,this.clusterBkg=`calculated`,this.clusterBorder=`calculated`,this.defaultLinkColor=`calculated`,this.titleColor=`calculated`,this.edgeLabelBackground=`white`,this.actorBorder=`calculated`,this.actorBkg=`calculated`,this.actorTextColor=`calculated`,this.actorLineColor=this.actorBorder,this.signalColor=`calculated`,this.signalTextColor=`calculated`,this.labelBoxBkgColor=`calculated`,this.labelBoxBorderColor=`calculated`,this.labelTextColor=`calculated`,this.loopTextColor=`calculated`,this.noteBorderColor=`calculated`,this.noteBkgColor=`calculated`,this.noteTextColor=`calculated`,this.activationBorderColor=`#666`,this.activationBkgColor=`#f4f4f4`,this.sequenceNumberColor=`white`,this.sectionBkgColor=`calculated`,this.altSectionBkgColor=`white`,this.sectionBkgColor2=`calculated`,this.excludeBkgColor=`#eeeeee`,this.taskBorderColor=`calculated`,this.taskBkgColor=`calculated`,this.taskTextLightColor=`white`,this.taskTextColor=`calculated`,this.taskTextDarkColor=`calculated`,this.taskTextOutsideColor=`calculated`,this.taskTextClickableColor=`#003163`,this.activeTaskBorderColor=`calculated`,this.activeTaskBkgColor=`calculated`,this.gridColor=`calculated`,this.doneTaskBkgColor=`calculated`,this.doneTaskBorderColor=`calculated`,this.critBkgColor=`calculated`,this.critBorderColor=`calculated`,this.todayLineColor=`calculated`,this.vertLineColor=`calculated`,this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`,this.rowOdd=this.rowOdd||k(this.mainBkg,75)||`#ffffff`,this.rowEven=this.rowEven||`#f4f4f4`,this.labelColor=`black`,this.errorBkgColor=`#552222`,this.errorTextColor=`#552222`,this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,1))`}updateColors(){this.secondBkg=k(this.contrast,55),this.border2=this.contrast,this.actorBorder=k(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=`#999`,this.noteBkgColor=`#666`,this.noteTextColor=`#fff`,this.cScale0=this.cScale0||`#555`,this.cScale1=this.cScale1||`#F4F4F4`,this.cScale2=this.cScale2||`#555`,this.cScale3=this.cScale3||`#BBB`,this.cScale4=this.cScale4||`#777`,this.cScale5=this.cScale5||`#999`,this.cScale6=this.cScale6||`#DDD`,this.cScale7=this.cScale7||`#FFF`,this.cScale8=this.cScale8||`#DDD`,this.cScale9=this.cScale9||`#BBB`,this.cScale10=this.cScale10||`#999`,this.cScale11=this.cScale11||`#777`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?`black`:this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{l:-(5+e*5)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{l:-(8+e*5)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=k(this.contrast,30),this.sectionBkgColor2=k(this.contrast,30),this.taskBorderColor=A(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=k(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=A(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||`#000`,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f4f4f4`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||`#000`,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=`#222`,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=j(this.primaryColor,{h:64}),this.fillType3=j(this.secondaryColor,{h:64}),this.fillType4=j(this.primaryColor,{h:-64}),this.fillType5=j(this.secondaryColor,{h:-64}),this.fillType6=j(this.primaryColor,{h:128}),this.fillType7=j(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`pie`+e]=this[`cScale`+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`;for(let e=0;e<8;e++)this[`venn`+(e+1)]=this[`venn`+(e+1)]??this[`cScale`+e];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0`},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||`#DEDEDE`,graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||`#dc3545`,this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=A(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||j(this.primaryColor,{h:-30}),this.git4=this.pie5||j(this.primaryColor,{h:-60}),this.git5=this.pie6||j(this.primaryColor,{h:-90}),this.git6=this.pie7||j(this.primaryColor,{h:60}),this.git7=this.pie8||j(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1=`white`,this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3=`white`,this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.emUiFill=this.emUiFill||`white`,this.emUiStroke=this.emUiStroke||`#dbdada`,this.emProcessorFill=this.emProcessorFill||`#edb3f6`,this.emProcessorStroke=this.emProcessorStroke||`#b88cbf`,this.emReadModelFill=this.emReadModelFill||`#d3f1a2`,this.emReadModelStroke=this.emReadModelStroke||`#a3b732`,this.emCommandFill=this.emCommandFill||`#bcd6fe`,this.emCommandStroke=this.emCommandStroke||`#679ac3`,this.emEventFill=this.emEventFill||`#ffb778`,this.emEventStroke=this.emEventStroke||`#c19a0f`,this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||`rgb(250,250,250)`,this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||`rgb(240,240,240)`,this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Kt=l(e=>{let t=new Gt;return t.calculate(e),t},`getThemeVariables`),qt=class{static{l(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=I(this.primaryColor,this.darkMode),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#000000`,this.stateBorder=`#000000`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));`,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor);let e=`#ECECFE`,t=`#E9E9F1`,n=j(e,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||k(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||e,this.cScale1=this.cScale1||t,this.cScale2=this.cScale2||n,this.cScale3=this.cScale3||j(e,{h:30}),this.cScale4=this.cScale4||j(e,{h:60}),this.cScale5=this.cScale5||j(e,{h:90}),this.cScale6=this.cScale6||j(e,{h:120}),this.cScale7=this.cScale7||j(e,{h:150}),this.cScale8=this.cScale8||j(e,{h:210,l:150}),this.cScale9=this.cScale9||j(e,{h:270}),this.cScale10=this.cScale10||j(e,{h:300}),this.cScale11=this.cScale11||j(e,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||j(e,{h:64}),this.fillType3=this.fillType3||j(t,{h:64}),this.fillType4=this.fillType4||j(e,{h:-64}),this.fillType5=this.fillType5||j(t,{h:-64}),this.fillType6=this.fillType6||j(e,{h:128}),this.fillType7=this.fillType7||j(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||j(e,{l:-10}),this.pie5=this.pie5||j(t,{l:-10}),this.pie6=this.pie6||j(n,{l:-10}),this.pie7=this.pie7||j(e,{h:60,l:-10}),this.pie8=this.pie8||j(e,{h:-60,l:-10}),this.pie9=this.pie9||j(e,{h:120,l:0}),this.pie10=this.pie10||j(e,{h:60,l:-20}),this.pie11=this.pie11||j(e,{h:-60,l:-20}),this.pie12=this.pie12||j(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||j(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||j(e,{h:-30}),this.git4=this.git4||j(e,{h:-60}),this.git5=this.git5||j(e,{h:-90}),this.git6=this.git6||j(e,{h:60}),this.git7=this.git7||j(e,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Jt=l(e=>{let t=new qt;return t.calculate(e),t},`getThemeVariables`),Yt=class{static{l(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg=`#2a2020`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#181818`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#333`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`arial, sans-serif`,this.fontSize=`14px`,this.useGradient=!0,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.noteFontWeight=`normal`,this.fontWeight=`normal`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#333`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#333`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||k(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||`#0b0000`,this.git1=this.git1||`#4d1037`,this.git2=this.git2||`#3f5258`,this.git3=this.git3||`#4f2f1b`,this.git4=this.git4||`#6e0a0a`,this.git5=this.git5||`#3b0048`,this.git6=this.git6||`#995a01`,this.git7=this.git7||`#154706`,this.gitDarkMode=!0,this.gitDarkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Xt=l(e=>{let t=new Yt;return t.calculate(e),t},`getThemeVariables`),Zt=class{static{l(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=I(`#28253D`,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.clusterBkg=`#F9F9FB`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#FEF9C3`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor);let e=`#ECECFE`,t=`#E9E9F1`,n=j(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||k(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground=`#F9F9FB`,this.altBackground=`#F9F9FB`,this.stateEdgeLabelBackground=`#FFFFFF`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=this.mainBkg;if(this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||j(e,{h:64}),this.fillType3=this.fillType3||j(t,{h:64}),this.fillType4=this.fillType4||j(e,{h:-64}),this.fillType5=this.fillType5||j(t,{h:-64}),this.fillType6=this.fillType6||j(e,{h:128}),this.fillType7=this.fillType7||j(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||j(e,{l:-10}),this.pie5=this.pie5||j(t,{l:-10}),this.pie6=this.pie6||j(n,{l:-10}),this.pie7=this.pie7||j(e,{h:60,l:-10}),this.pie8=this.pie8||j(e,{h:-60,l:-10}),this.pie9=this.pie9||j(e,{h:120,l:0}),this.pie10=this.pie10||j(e,{h:60,l:-20}),this.pie11=this.pie11||j(e,{h:-60,l:-20}),this.pie12=this.pie12||j(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||j(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#FFFFFF`,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||j(e,{h:-30}),this.git4=this.git4||j(e,{h:-60}),this.git5=this.git5||j(e,{h:-90}),this.git6=this.git6||j(e,{h:60}),this.git7=this.git7||j(e,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},Qt=l(e=>{let t=new Zt;return t.calculate(e),t},`getThemeVariables`),$t=class{static{l(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.filterColor=`#FFFFFF`}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||k(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground=`#16141F`,this.altBackground=`#16141F`,this.compositeTitleBackground=`#16141F`,this.stateEdgeLabelBackground=`#16141F`,this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||j(this.primaryColor,{h:30}),this.cScale4=this.cScale4||j(this.primaryColor,{h:60}),this.cScale5=this.cScale5||j(this.primaryColor,{h:90}),this.cScale6=this.cScale6||j(this.primaryColor,{h:120}),this.cScale7=this.cScale7||j(this.primaryColor,{h:150}),this.cScale8=this.cScale8||j(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||j(this.primaryColor,{h:270}),this.cScale10=this.cScale10||j(this.primaryColor,{h:300}),this.cScale11=this.cScale11||j(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScale`+e]=A(this[`cScale`+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground=`#16141F`,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},en=l(e=>{let t=new $t;return t.calculate(e),t},`getThemeVariables`),tn=class{static{l(this,`Theme`)}constructor(){this.background=`#ffffff`,this.primaryColor=`#cccccc`,this.mainBkg=`#ffffff`,this.noteBkgColor=`#fff5ad`,this.noteTextColor=`#28253D`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=I(this.primaryColor,this.darkMode),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#28253D`,this.stateBorder=`#28253D`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.tertiaryColor=`#ffffff`,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.actorBorder=`#28253D`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[`#FDF4FF`,`#F0FDFA`,`#FFF7ED`,`#ECFEFF`,`#F0FDF4`,`#F5F3FF`,`#FEF2F2`,`#FEFCE8`,`#EEF2FF`,`#F7FEE7`,`#F0F9FF`,`#FFF1F2`],this.filterColor=`#000000`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#28253D`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#28253D`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor);let e=`#ECECFE`,t=`#E9E9F1`,n=j(e,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||n,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||t,this.sectionBkgColor2=this.sectionBkgColor2||e,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||e,this.activeTaskBorderColor=this.activeTaskBorderColor||e,this.activeTaskBkgColor=this.activeTaskBkgColor||k(e,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=this[`cScaleLabel`+e]||this.scaleLabelColor;let r=this.darkMode?-4:-1;for(let e=0;e<5;e++)this[`surface`+e]=this[`surface`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(5+e*3)}),this[`surfacePeer`+e]=this[`surfacePeer`+e]||j(this.mainBkg,{h:180,s:-15,l:r*(8+e*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||e,this.fillType1=this.fillType1||t,this.fillType2=this.fillType2||j(e,{h:64}),this.fillType3=this.fillType3||j(t,{h:64}),this.fillType4=this.fillType4||j(e,{h:-64}),this.fillType5=this.fillType5||j(t,{h:-64}),this.fillType6=this.fillType6||j(e,{h:128}),this.fillType7=this.fillType7||j(t,{h:128}),this.pie1=this.pie1||e,this.pie2=this.pie2||t,this.pie3=this.pie3||n,this.pie4=this.pie4||j(e,{l:-10}),this.pie5=this.pie5||j(t,{l:-10}),this.pie6=this.pie6||j(n,{l:-10}),this.pie7=this.pie7||j(e,{h:60,l:-10}),this.pie8=this.pie8||j(e,{h:-60,l:-10}),this.pie9=this.pie9||j(e,{h:120,l:0}),this.pie10=this.pie10||j(e,{h:60,l:-20}),this.pie11=this.pie11||j(e,{h:-60,l:-20}),this.pie12=this.pie12||j(e,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||e,this.quadrant2Fill=this.quadrant2Fill||j(e,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(e,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(e,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||e,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||e,this.git1=this.git1||t,this.git2=this.git2||n,this.git3=this.git3||j(e,{h:-30}),this.git4=this.git4||j(e,{h:-60}),this.git5=this.git5||j(e,{h:-90}),this.git6=this.git6||j(e,{h:60}),this.git7=this.git7||j(e,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.fontWeight=600,this.erEdgeLabelBackground=`#FFFFFF`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},nn=l(e=>{let t=new tn;return t.calculate(e),t},`getThemeVariables`),rn=class{static{l(this,`Theme`)}constructor(){this.background=`#333`,this.primaryColor=`#1f2020`,this.secondaryColor=k(this.primaryColor,16),this.tertiaryColor=j(this.primaryColor,{h:-160}),this.primaryBorderColor=M(this.background),this.secondaryBorderColor=I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=I(this.tertiaryColor,this.darkMode),this.primaryTextColor=M(this.primaryColor),this.secondaryTextColor=M(this.secondaryColor),this.tertiaryTextColor=M(this.tertiaryColor),this.mainBkg=`#111113`,this.secondBkg=`calculated`,this.mainContrastColor=`lightgrey`,this.darkTextColor=k(M(`#323D47`),10),this.border1=`#ccc`,this.border2=D(255,255,255,.25),this.arrowheadColor=M(this.background),this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.labelBackground=`#111113`,this.textColor=`#ccc`,this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??`#FEF9C3`,this.noteTextColor=this.noteTextColor??`#28253D`,this.THEME_COLOR_LIMIT=12,this.fontFamily=`"Recursive Variable", arial, sans-serif`,this.fontSize=`14px`,this.nodeBorder=`#FFFFFF`,this.stateBorder=`#FFFFFF`,this.useGradient=!1,this.gradientStart=`#0042eb`,this.gradientStop=`#eb0042`,this.dropShadow=`url(#drop-shadow)`,this.nodeShadow=!0,this.archEdgeColor=`calculated`,this.archEdgeArrowColor=`calculated`,this.archEdgeWidth=`3`,this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth=`2px`,this.clusterBkg=`#1E1A2E`,this.clusterBorder=`#BDBCCC`,this.noteBorderColor=`#FACC15`,this.noteFontWeight=600,this.borderColorArray=[`#E879F9`,`#2DD4BF`,`#FB923C`,`#22D3EE`,`#4ADE80`,`#A78BFA`,`#F87171`,`#FACC15`,`#818CF8`,`#A3E635 `,`#38BDF8`,`#FB7185`],this.bkgColorArray=[],this.filterColor=`#FFFFFF`}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?`#eee`:`#FFFFFF`),this.secondaryColor=this.secondaryColor||j(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||j(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||I(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||I(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||I(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||I(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||`#fff5ad`,this.noteTextColor=this.noteTextColor||`#FFFFFF`,this.secondaryTextColor=this.secondaryTextColor||M(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||M(this.tertiaryColor),this.lineColor=this.lineColor||M(this.background),this.arrowheadColor=this.arrowheadColor||M(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=`#FFFFFF`,this.signalColor=`#FFFFFF`,this.labelBoxBorderColor=`#BDBCCC`,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||A(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||M(this.lineColor),this.rootLabelColor=`#FFFFFF`,this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||`white`,this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||`#eeeeee`,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||k(this.primaryColor,23),this.gridColor=this.gridColor||`lightgrey`,this.doneTaskBkgColor=this.doneTaskBkgColor||`lightgrey`,this.doneTaskBorderColor=this.doneTaskBorderColor||`grey`,this.critBorderColor=this.critBorderColor||`#ff8888`,this.critBkgColor=this.critBkgColor||`red`,this.todayLineColor=this.todayLineColor||`red`,this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||`#003163`,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||`#f0f0f0`,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||`#f4a8ff`,this.cScale1=this.cScale1||`#46ecd5`,this.cScale2=this.cScale2||`#ffb86a`,this.cScale3=this.cScale3||`#dab2ff`,this.cScale4=this.cScale4||`#7bf1a8`,this.cScale5=this.cScale5||`#c4b4ff`,this.cScale6=this.cScale6||`#ffa2a2`,this.cScale7=this.cScale7||`#ffdf20`,this.cScale8=this.cScale8||`#a3b3ff`,this.cScale9=this.cScale9||`#bbf451`,this.cScale10=this.cScale10||`#74d4ff`,this.cScale11=this.cScale11||`#ffa1ad`;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleInv`+e]=this[`cScaleInv`+e]||M(this[`cScale`+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this[`cScalePeer`+e]=this[`cScalePeer`+e]||k(this[`cScale`+e],10):this[`cScalePeer`+e]=this[`cScalePeer`+e]||A(this[`cScale`+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this[`cScaleLabel`+e]=A(this[`cScale`+e],75);let e=this.darkMode?-4:-1;for(let t=0;t<5;t++)this[`surface`+t]=this[`surface`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(5+t*3)}),this[`surfacePeer`+t]=this[`surfacePeer`+t]||j(this.mainBkg,{h:180,s:-15,l:e*(8+t*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||j(this.primaryColor,{h:64}),this.fillType3=this.fillType3||j(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||j(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||j(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||j(this.primaryColor,{h:128}),this.fillType7=this.fillType7||j(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||j(this.primaryColor,{l:-10}),this.pie5=this.pie5||j(this.secondaryColor,{l:-10}),this.pie6=this.pie6||j(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||j(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||j(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||j(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||j(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||j(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||j(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||`25px`,this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||`17px`,this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||`17px`,this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||`black`,this.pieStrokeWidth=this.pieStrokeWidth||`2px`,this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||`2px`,this.pieOuterStrokeColor=this.pieOuterStrokeColor||`black`,this.pieOpacity=this.pieOpacity||`0.7`,this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||j(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||j(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||j(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||j(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||j(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||j(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||O(this.quadrant1Fill)?k(this.quadrant1Fill):A(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||`#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0`},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||`1`,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?A(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||j(this.primaryColor,{h:-30}),this.git4=this.git4||j(this.primaryColor,{h:-60}),this.git5=this.git5||j(this.primaryColor,{h:-90}),this.git6=this.git6||j(this.primaryColor,{h:60}),this.git7=this.git7||j(this.primaryColor,{h:120}),this.darkMode?(this.git0=k(this.git0,25),this.git1=k(this.git1,25),this.git2=k(this.git2,25),this.git3=k(this.git3,25),this.git4=k(this.git4,25),this.git5=k(this.git5,25),this.git6=k(this.git6,25),this.git7=k(this.git7,25)):(this.git0=A(this.git0,25),this.git1=A(this.git1,25),this.git2=A(this.git2,25),this.git3=A(this.git3,25),this.git4=A(this.git4,25),this.git5=A(this.git5,25),this.git6=A(this.git6,25),this.git7=A(this.git7,25)),this.gitInv0=this.gitInv0||M(this.git0),this.gitInv1=this.gitInv1||M(this.git1),this.gitInv2=this.gitInv2||M(this.git2),this.gitInv3=this.gitInv3||M(this.git3),this.gitInv4=this.gitInv4||M(this.git4),this.gitInv5=this.gitInv5||M(this.git5),this.gitInv6=this.gitInv6||M(this.git6),this.gitInv7=this.gitInv7||M(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?`black`:this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||`10px`,this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||`10px`,this.commitLineColor=this.commitLineColor??`#BDBCCC`,this.fontWeight=600,this.erEdgeLabelBackground=`#16141F`,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Ft,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||It}calculate(e){if(typeof e!=`object`){this.updateColors();return}let t=Object.keys(e);t.forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]})}},L={base:{getThemeVariables:Rt},dark:{getThemeVariables:Bt},default:{getThemeVariables:Ht},forest:{getThemeVariables:Wt},neutral:{getThemeVariables:Kt},neo:{getThemeVariables:Jt},"neo-dark":{getThemeVariables:Xt},redux:{getThemeVariables:Qt},"redux-dark":{getThemeVariables:en},"redux-color":{getThemeVariables:nn},"redux-dark-color":{getThemeVariables:l(e=>{let t=new rn;return t.calculate(e),t},`getThemeVariables`)}},an={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:`basis`,padding:15,defaultRenderer:`dagre-wrapper`,wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:`"Open Sans", sans-serif`,actorFontWeight:400,noteFontSize:14,noteFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,noteFontWeight:400,noteAlign:`center`,messageFontSize:16,messageFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:`%Y-%m-%d`,topAxis:!1,displayMode:``,weekday:`sunday`},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],titleColor:``,titleFontFamily:`"trebuchet ms", verdana, arial, sans-serif`,titleFontSize:`4ex`},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:`dagre-wrapper`,htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:`20`,compositTitleSize:35,radius:5,defaultRenderer:`dagre-wrapper`},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:`TB`,minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:`gray`,fill:`honeydew`,fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:`top`,yAxisPosition:`left`,quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,xAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:`#/$defs/XYChartAxisConfig`,showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:`vertical`,plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:`#f9f9f9`,text_color:`#333`,rect_border_size:`0.5px`,rect_border_color:`#bbb`,rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:`cose-bilkent`},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:``},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:`center`,bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:`"Open Sans", sans-serif`,taskMargin:50,activationWidth:10,textPlacement:`fo`,actorColours:[`#8FBC8F`,`#7CFC00`,`#00FFFF`,`#20B2AA`,`#B0E0E6`,`#FFFFE0`],sectionFills:[`#191970`,`#8B008B`,`#4B0082`,`#2F4F4F`,`#800000`,`#8B4513`,`#00008B`],sectionColours:[`#fff`],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:`main`,mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:`"Open Sans", sans-serif`,personFontWeight:`normal`,external_personFontSize:14,external_personFontFamily:`"Open Sans", sans-serif`,external_personFontWeight:`normal`,systemFontSize:14,systemFontFamily:`"Open Sans", sans-serif`,systemFontWeight:`normal`,external_systemFontSize:14,external_systemFontFamily:`"Open Sans", sans-serif`,external_systemFontWeight:`normal`,system_dbFontSize:14,system_dbFontFamily:`"Open Sans", sans-serif`,system_dbFontWeight:`normal`,external_system_dbFontSize:14,external_system_dbFontFamily:`"Open Sans", sans-serif`,external_system_dbFontWeight:`normal`,system_queueFontSize:14,system_queueFontFamily:`"Open Sans", sans-serif`,system_queueFontWeight:`normal`,external_system_queueFontSize:14,external_system_queueFontFamily:`"Open Sans", sans-serif`,external_system_queueFontWeight:`normal`,boundaryFontSize:14,boundaryFontFamily:`"Open Sans", sans-serif`,boundaryFontWeight:`normal`,messageFontSize:12,messageFontFamily:`"Open Sans", sans-serif`,messageFontWeight:`normal`,containerFontSize:14,containerFontFamily:`"Open Sans", sans-serif`,containerFontWeight:`normal`,external_containerFontSize:14,external_containerFontFamily:`"Open Sans", sans-serif`,external_containerFontWeight:`normal`,container_dbFontSize:14,container_dbFontFamily:`"Open Sans", sans-serif`,container_dbFontWeight:`normal`,external_container_dbFontSize:14,external_container_dbFontFamily:`"Open Sans", sans-serif`,external_container_dbFontWeight:`normal`,container_queueFontSize:14,container_queueFontFamily:`"Open Sans", sans-serif`,container_queueFontWeight:`normal`,external_container_queueFontSize:14,external_container_queueFontFamily:`"Open Sans", sans-serif`,external_container_queueFontWeight:`normal`,componentFontSize:14,componentFontFamily:`"Open Sans", sans-serif`,componentFontWeight:`normal`,external_componentFontSize:14,external_componentFontFamily:`"Open Sans", sans-serif`,external_componentFontWeight:`normal`,component_dbFontSize:14,component_dbFontFamily:`"Open Sans", sans-serif`,component_dbFontWeight:`normal`,external_component_dbFontSize:14,external_component_dbFontFamily:`"Open Sans", sans-serif`,external_component_dbFontWeight:`normal`,component_queueFontSize:14,component_queueFontFamily:`"Open Sans", sans-serif`,component_queueFontWeight:`normal`,external_component_queueFontSize:14,external_component_queueFontFamily:`"Open Sans", sans-serif`,external_component_queueFontWeight:`normal`,wrap:!0,wrapPadding:10,person_bg_color:`#08427B`,person_border_color:`#073B6F`,external_person_bg_color:`#686868`,external_person_border_color:`#8A8A8A`,system_bg_color:`#1168BD`,system_border_color:`#3C7FC0`,system_db_bg_color:`#1168BD`,system_db_border_color:`#3C7FC0`,system_queue_bg_color:`#1168BD`,system_queue_border_color:`#3C7FC0`,external_system_bg_color:`#999999`,external_system_border_color:`#8A8A8A`,external_system_db_bg_color:`#999999`,external_system_db_border_color:`#8A8A8A`,external_system_queue_bg_color:`#999999`,external_system_queue_border_color:`#8A8A8A`,container_bg_color:`#438DD5`,container_border_color:`#3C7FC0`,container_db_bg_color:`#438DD5`,container_db_border_color:`#3C7FC0`,container_queue_bg_color:`#438DD5`,container_queue_border_color:`#3C7FC0`,external_container_bg_color:`#B3B3B3`,external_container_border_color:`#A6A6A6`,external_container_db_bg_color:`#B3B3B3`,external_container_db_border_color:`#A6A6A6`,external_container_queue_bg_color:`#B3B3B3`,external_container_queue_border_color:`#A6A6A6`,component_bg_color:`#85BBF0`,component_border_color:`#78A8D8`,component_db_bg_color:`#85BBF0`,component_db_border_color:`#78A8D8`,component_queue_bg_color:`#85BBF0`,component_queue_border_color:`#78A8D8`,external_component_bg_color:`#CCCCCC`,external_component_border_color:`#BFBFBF`,external_component_db_bg_color:`#CCCCCC`,external_component_db_border_color:`#BFBFBF`,external_component_queue_bg_color:`#CCCCCC`,external_component_queue_border_color:`#BFBFBF`},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:`gradient`,nodeAlignment:`justify`,showValues:!0,prefix:``,suffix:``,nodeWidth:10,nodePadding:12,labelStyle:`legacy`},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},theme:`default`,look:`classic`,handDrawnSeed:0,layout:`dagre`,maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:`"trebuchet ms", verdana, arial, sans-serif;`,logLevel:5,securityLevel:`strict`,startOnLoad:!0,arrowMarkerAbsolute:!1,secure:[`secure`,`securityLevel`,`startOnLoad`,`maxTextSize`,`suppressErrorRendering`,`maxEdges`],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},on={...an,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:`BRANDES_KOEPF`,forceNodeModelOrder:!1,considerModelOrder:`NODES_AND_EDGES`},themeCSS:void 0,themeVariables:L.default.getThemeVariables(),sequence:{...an.sequence,messageFont:l(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`),noteFont:l(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},`noteFont`),actorFont:l(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},`actorFont`)},class:{hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...an.gantt,tickInterval:void 0,useWidth:void 0},c4:{...an.c4,useWidth:void 0,personFont:l(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},`personFont`),flowchart:{...an.flowchart,inheritDir:!1},external_personFont:l(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},`external_personFont`),systemFont:l(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},`systemFont`),external_systemFont:l(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},`external_systemFont`),system_dbFont:l(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},`system_dbFont`),external_system_dbFont:l(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},`external_system_dbFont`),system_queueFont:l(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},`system_queueFont`),external_system_queueFont:l(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},`external_system_queueFont`),containerFont:l(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},`containerFont`),external_containerFont:l(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},`external_containerFont`),container_dbFont:l(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},`container_dbFont`),external_container_dbFont:l(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},`external_container_dbFont`),container_queueFont:l(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},`container_queueFont`),external_container_queueFont:l(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},`external_container_queueFont`),componentFont:l(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},`componentFont`),external_componentFont:l(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},`external_componentFont`),component_dbFont:l(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},`component_dbFont`),external_component_dbFont:l(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},`external_component_dbFont`),component_queueFont:l(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},`component_queueFont`),external_component_queueFont:l(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},`external_component_queueFont`),boundaryFont:l(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},`boundaryFont`),messageFont:l(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},`messageFont`)},pie:{...an.pie,useWidth:984},xyChart:{...an.xyChart,useWidth:void 0},requirement:{...an.requirement,useWidth:void 0},packet:{...an.packet},eventmodeling:{...an.eventmodeling},treeView:{...an.treeView,useWidth:void 0},radar:{...an.radar},ishikawa:{...an.ishikawa},sankey:{...an.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:`,`},venn:{...an.venn}},sn=l((e,t=``)=>Object.keys(e).reduce((n,r)=>Array.isArray(e[r])?n:typeof e[r]==`object`&&e[r]!==null?[...n,t+r,...sn(e[r],``)]:[...n,t+r],[]),`keyify`),cn=new Set(sn(on,``)),ln=on,un=l(e=>{if(f.debug(`sanitizeDirective called with`,e),!(typeof e!=`object`||!e)){if(Array.isArray(e)){e.forEach(e=>un(e));return}for(let t of Object.keys(e)){if(f.debug(`Checking key`,t),t.startsWith(`__`)||t.includes(`proto`)||t.includes(`constr`)||!cn.has(t)||e[t]==null){f.debug(`sanitize deleting key: `,t),delete e[t];continue}if(typeof e[t]==`object`){if(t===`nodeColors`){let n=/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i;for(let r of Object.keys(e[t]))(typeof e[t][r]!=`string`||!n.test(e[t][r]))&&(f.debug(`sanitize deleting invalid color:`,r,e[t][r]),delete e[t][r])}else f.debug(`sanitizing object`,t),un(e[t]);continue}for(let n of[`themeCSS`,`fontFamily`,`altFontFamily`])t.includes(n)&&(f.debug(`sanitizing css option`,t),e[t]=dn(e[t]))}if(e.themeVariables)for(let t of Object.keys(e.themeVariables)){let n=e.themeVariables[t];n?.match&&!n.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]=``)}f.debug(`After sanitization`,e)}},`sanitizeDirective`),dn=l(e=>{let t=0,n=0;for(let r of e){if(t<n)return`{ /* ERROR: Unbalanced CSS */ }`;r===`{`?t++:r===`}`&&n++}return t===n?e:`{ /* ERROR: Unbalanced CSS */ }`},`sanitizeCss`),fn=Object.freeze(ln),pn=l(e=>!(e===!1||[`false`,`null`,`0`].includes(String(e).trim().toLowerCase())),`evaluate`),mn=Pt({},fn),hn,gn=[],_n=Pt({},fn),vn=l((e,t)=>{let n=Pt({},e),r={};for(let e of t)wn(e),r=Pt(r,e);if(n=Pt(n,r),r.theme&&r.theme in L){let e=Pt(Pt({},hn).themeVariables||{},r.themeVariables);n.theme&&n.theme in L&&(n.themeVariables=L[n.theme].getThemeVariables(e))}return _n=n,An(_n),_n},`updateCurrentConfig`),yn=l(e=>(mn=Pt({},fn),mn=Pt(mn,e),e.theme&&L[e.theme]&&(mn.themeVariables=L[e.theme].getThemeVariables(e.themeVariables)),vn(mn,gn),mn),`setSiteConfig`),bn=l(e=>{hn=Pt({},e)},`saveConfigFromInitialize`),xn=l(e=>(mn=Pt(mn,e),vn(mn,gn),mn),`updateSiteConfig`),Sn=l(()=>Pt({},mn),`getSiteConfig`),Cn=l(e=>(An(e),Pt(_n,e),R()),`setConfig`),R=l(()=>Pt({},_n),`getConfig`),wn=l(e=>{e&&([`secure`,...mn.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(f.debug(`Denied attempt to modify a secure key ${t}`,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith(`__`)&&delete e[t]}),Object.keys(e).forEach(t=>{typeof e[t]==`string`&&(e[t].includes(`<`)||e[t].includes(`>`)||e[t].includes(`url(data:`))&&delete e[t],typeof e[t]==`object`&&wn(e[t])}))},`sanitize`),Tn=l(e=>{un(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),gn.push(e),vn(mn,gn)},`addDirective`),En=l((e=mn)=>{gn=[],vn(e,gn)},`reset`),Dn={LAZY_LOAD_DEPRECATED:`The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.`,FLOWCHART_HTML_LABELS_DEPRECATED:`flowchart.htmlLabels is deprecated. Please use global htmlLabels instead.`},On={},kn=l(e=>{On[e]||(f.warn(Dn[e]),On[e]=!0)},`issueWarning`),An=l(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&kn(`LAZY_LOAD_DEPRECATED`)},`checkConfig`),jn=l(()=>{let e={};hn&&(e=Pt(e,hn));for(let t of gn)e=Pt(e,t);return e},`getUserDefinedConfig`),Mn=l(e=>(e.flowchart?.htmlLabels!=null&&kn(`FLOWCHART_HTML_LABELS_DEPRECATED`),pn(e.htmlLabels??e.flowchart?.htmlLabels??!0)),`getEffectiveHtmlLabels`),Nn=/<br\s*\/?>/gi,Pn=l(e=>e?Wn(e).replace(/\\n/g,`#br#`).split(`#br#`):[``],`getRows`),Fn=(()=>{let e=!1;return()=>{e||=(In(),!0)}})();function In(){let e=`data-temp-href-target`;Ct.addHook(`beforeSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(`target`)&&t.setAttribute(e,t.getAttribute(`target`)??``)}),Ct.addHook(`afterSanitizeAttributes`,t=>{t.tagName===`A`&&t.hasAttribute(e)&&(t.setAttribute(`target`,t.getAttribute(e)??``),t.removeAttribute(e),t.getAttribute(`target`)===`_blank`&&t.setAttribute(`rel`,`noopener`))})}l(In,`setupDompurifyHooks`);var Ln=l(e=>(Fn(),Ct.sanitize(e)),`removeScript`),Rn=l((e,t)=>{if(Mn(t)){let n=t.securityLevel;n===`antiscript`||n===`strict`||n===`sandbox`?e=Ln(e):n!==`loose`&&(e=Wn(e),e=e.replace(/</g,`<`).replace(/>/g,`>`),e=e.replace(/=/g,`=`),e=Un(e))}return e},`sanitizeMore`),zn=l((e,t)=>e&&(e=t.dompurifyConfig?Ct.sanitize(Rn(e,t),t.dompurifyConfig).toString():Ct.sanitize(Rn(e,t),{FORBID_TAGS:[`style`]}).toString(),e),`sanitizeText`),Bn=l((e,t)=>typeof e==`string`?zn(e,t):e.flat().map(e=>zn(e,t)),`sanitizeTextOrArray`),Vn=l(e=>Nn.test(e),`hasBreaks`),Hn=l(e=>e.split(Nn),`splitBreaks`),Un=l(e=>e.replace(/#br#/g,`<br/>`),`placeholderToBreak`),Wn=l(e=>e.replace(Nn,`#br#`),`breakToPlaceholder`),Gn=l(e=>{let t=``;return e&&(t=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},`getUrl`),Kn=l(function(...e){let t=e.filter(e=>!isNaN(e));return Math.max(...t)},`getMax`),qn=l(function(...e){let t=e.filter(e=>!isNaN(e));return Math.min(...t)},`getMin`),Jn=l(function(e){let t=e.split(/(,)/),n=[];for(let e=0;e<t.length;e++){let r=t[e];if(r===`,`&&e>0&&e+1<t.length){let i=t[e-1],a=t[e+1];Xn(i,a)&&(r=i+`,`+a,e++,n.pop())}n.push(Zn(r))}return n.join(``)},`parseGenericTypes`),Yn=l((e,t)=>Math.max(0,e.split(t).length-1),`countOccurrence`),Xn=l((e,t)=>{let n=Yn(e,`~`),r=Yn(t,`~`);return n===1&&r===1},`shouldCombineSets`),Zn=l(e=>{let t=Yn(e,`~`),n=!1;if(t<=1)return e;t%2!=0&&e.startsWith(`~`)&&(e=e.substring(1),n=!0);let r=[...e],i=r.indexOf(`~`),a=r.lastIndexOf(`~`);for(;i!==-1&&a!==-1&&i!==a;)r[i]=`<`,r[a]=`>`,i=r.indexOf(`~`),a=r.lastIndexOf(`~`);return n&&r.unshift(`~`),r.join(``)},`processSet`),Qn=l(()=>window.MathMLElement!==void 0,`isMathMLSupported`),$n=/\$\$(.*)\$\$/g,er=l(e=>(e.match($n)?.length??0)>0,`hasKatex`),tr=l(async(e,t)=>{let n=document.createElement(`div`);n.innerHTML=await rr(e,t),n.id=`katex-temp`,n.style.visibility=`hidden`,n.style.position=`absolute`,n.style.top=`0`,document.querySelector(`body`)?.insertAdjacentElement(`beforeend`,n);let r={width:n.clientWidth,height:n.clientHeight};return n.remove(),r},`calculateMathMLDimensions`),nr=l(async(e,n)=>{if(!er(e))return e;if(!(Qn()||n.legacyMathML||n.forceLegacyMathML))return e.replace($n,`MathML is unsupported in this environment.`);{let{default:r}=await t(async()=>{let{default:e}=await import(`./katex-DATssjp1.js`).then(e=>e.n);return{default:e}},__vite__mapDeps([0,1,2]),import.meta.url),i=n.forceLegacyMathML||!Qn()&&n.legacyMathML?`htmlAndMathml`:`mathml`;return e.split(Nn).map(e=>er(e)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${e}</div>`:`<div>${e}</div>`).join(``).replace($n,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g,` `).replace(/<annotation.*<\/annotation>/g,``))}return e.replace($n,`Katex is not supported in @mermaid-js/tiny. Please use the full mermaid library.`)},`renderKatexUnsanitized`),rr=l(async(e,t)=>zn(await nr(e,t),t),`renderKatexSanitized`),ir={getRows:Pn,sanitizeText:zn,sanitizeTextOrArray:Bn,hasBreaks:Vn,splitBreaks:Hn,lineBreakRegex:Nn,removeScript:Ln,getUrl:Gn,evaluate:pn,getMax:Kn,getMin:qn},ar=l(function(e,t){for(let n of t)e.attr(n[0],n[1])},`d3Attrs`),or=l(function(e,t,n){let r=new Map;return n?(r.set(`width`,`100%`),r.set(`style`,`max-width: ${t}px;`)):(r.set(`height`,e),r.set(`width`,t)),r},`calculateSvgSizeAttrs`),sr=l(function(e,t,n,r){ar(e,or(t,n,r))},`configureSvgSize`),cr=l(function(e,t,n,r){let i=t.node().getBBox(),a=i.width,o=i.height;f.info(`SVG bounds: ${a}x${o}`,i);let s=0,c=0;f.info(`Graph bounds: ${s}x${c}`,e),s=a+n*2,c=o+n*2,f.info(`Calculated bounds: ${s}x${c}`),sr(t,c,s,r);let l=`${i.x-n} ${i.y-n} ${i.width+2*n} ${i.height+2*n}`;t.attr(`viewBox`,l)},`setupGraphViewbox`),lr={};function ur(e){return[...e.cssRules].map(e=>e.cssText).join(`
|
|
6
|
-
`)}l(ur,`cssStyleSheetToString`);var dr=l((e,t,n,r)=>{let i=``;return e in lr&&lr[e]?i=lr[e]({...n,svgId:r}):f.warn(`No theme found for ${e}`),` & {
|
|
7
|
-
font-family: ${n.fontFamily};
|
|
8
|
-
font-size: ${n.fontSize};
|
|
9
|
-
fill: ${n.textColor}
|
|
10
|
-
}
|
|
11
|
-
@keyframes edge-animation-frame {
|
|
12
|
-
from {
|
|
13
|
-
stroke-dashoffset: 0;
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
@keyframes dash {
|
|
17
|
-
to {
|
|
18
|
-
stroke-dashoffset: 0;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
& .edge-animation-slow {
|
|
22
|
-
stroke-dasharray: 9,5 !important;
|
|
23
|
-
stroke-dashoffset: 900;
|
|
24
|
-
animation: dash 50s linear infinite;
|
|
25
|
-
stroke-linecap: round;
|
|
26
|
-
}
|
|
27
|
-
& .edge-animation-fast {
|
|
28
|
-
stroke-dasharray: 9,5 !important;
|
|
29
|
-
stroke-dashoffset: 900;
|
|
30
|
-
animation: dash 20s linear infinite;
|
|
31
|
-
stroke-linecap: round;
|
|
32
|
-
}
|
|
33
|
-
/* Classes common for multiple diagrams */
|
|
34
|
-
|
|
35
|
-
& .error-icon {
|
|
36
|
-
fill: ${n.errorBkgColor};
|
|
37
|
-
}
|
|
38
|
-
& .error-text {
|
|
39
|
-
fill: ${n.errorTextColor};
|
|
40
|
-
stroke: ${n.errorTextColor};
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
& .edge-thickness-normal {
|
|
44
|
-
stroke-width: ${n.strokeWidth??1}px;
|
|
45
|
-
}
|
|
46
|
-
& .edge-thickness-thick {
|
|
47
|
-
stroke-width: 3.5px
|
|
48
|
-
}
|
|
49
|
-
& .edge-pattern-solid {
|
|
50
|
-
stroke-dasharray: 0;
|
|
51
|
-
}
|
|
52
|
-
& .edge-thickness-invisible {
|
|
53
|
-
stroke-width: 0;
|
|
54
|
-
fill: none;
|
|
55
|
-
}
|
|
56
|
-
& .edge-pattern-dashed{
|
|
57
|
-
stroke-dasharray: 3;
|
|
58
|
-
}
|
|
59
|
-
.edge-pattern-dotted {
|
|
60
|
-
stroke-dasharray: 2;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
& .marker {
|
|
64
|
-
fill: ${n.lineColor};
|
|
65
|
-
stroke: ${n.lineColor};
|
|
66
|
-
}
|
|
67
|
-
& .marker.cross {
|
|
68
|
-
stroke: ${n.lineColor};
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
& svg {
|
|
72
|
-
font-family: ${n.fontFamily};
|
|
73
|
-
font-size: ${n.fontSize};
|
|
74
|
-
}
|
|
75
|
-
& p {
|
|
76
|
-
margin: 0
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
${i}
|
|
80
|
-
.node .neo-node {
|
|
81
|
-
stroke: ${n.nodeBorder};
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
85
|
-
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
86
|
-
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
[data-look="neo"].node path {
|
|
91
|
-
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
92
|
-
stroke-width: ${n.strokeWidth??1}px;
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
[data-look="neo"].node .outer-path {
|
|
96
|
-
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
[data-look="neo"].node .neo-line path {
|
|
100
|
-
stroke: ${n.nodeBorder};
|
|
101
|
-
filter: none;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
[data-look="neo"].node circle{
|
|
105
|
-
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
106
|
-
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
[data-look="neo"].node circle .state-start{
|
|
110
|
-
fill: #000000;
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
[data-look="neo"].icon-shape .icon {
|
|
114
|
-
fill: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
115
|
-
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
[data-look="neo"].icon-shape .icon-neo path {
|
|
119
|
-
stroke: ${n.useGradient?`url(`+r+`-gradient)`:n.nodeBorder};
|
|
120
|
-
filter: ${n.dropShadow?n.dropShadow.replace(`url(#drop-shadow)`,`url(${r}-drop-shadow)`):`none`};
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
${t}
|
|
124
|
-
`},`getStyles`),fr=l((e,t)=>{t!==void 0&&(lr[e]=t)},`addStylesForDiagram`),pr=dr,mr={};u(mr,{clear:()=>yr,getAccDescription:()=>Cr,getAccTitle:()=>xr,getDiagramTitle:()=>Tr,setAccDescription:()=>Sr,setAccTitle:()=>br,setDiagramTitle:()=>wr});var hr=``,gr=``,_r=``,vr=l(e=>zn(e,R()),`sanitizeText`),yr=l(()=>{hr=``,_r=``,gr=``},`clear`),br=l(e=>{hr=vr(e).replace(/^\s+/g,``)},`setAccTitle`),xr=l(()=>hr,`getAccTitle`),Sr=l(e=>{_r=vr(e).replace(/\n\s+/g,`
|
|
125
|
-
`)},`setAccDescription`),Cr=l(()=>_r,`getAccDescription`),wr=l(e=>{gr=vr(e)},`setDiagramTitle`),Tr=l(()=>gr,`getDiagramTitle`),Er=f,Dr=p,z=R,Or=Cn,kr=fn,Ar=l(e=>zn(e,z()),`sanitizeText`),jr=cr,Mr=l(()=>mr,`getCommonDb`),Nr={},Pr=l((e,t,n)=>{Nr[e]&&Er.warn(`Diagram with id ${e} already registered. Overwriting.`),Nr[e]=t,n&&jt(e,n),fr(e,t.styles),t.injectUtils?.(Er,Dr,z,Ar,jr,Mr(),()=>{})},`registerDiagram`),Fr=l(e=>{if(e in Nr)return Nr[e];throw new Ir(e)},`getDiagram`),Ir=class extends Error{static{l(this,`DiagramNotFoundError`)}constructor(e){super(`Diagram ${e} not found.`)}},Lr={value:()=>{}};function Rr(){for(var e=0,t=arguments.length,n={},r;e<t;++e){if(!(r=arguments[e]+``)||r in n||/[\s.]/.test(r))throw Error(`illegal type: `+r);n[r]=[]}return new zr(n)}function zr(e){this._=e}function Br(e,t){return e.trim().split(/^|\s+/).map(function(e){var n=``,r=e.indexOf(`.`);if(r>=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw Error(`unknown type: `+e);return{type:e,name:n}})}zr.prototype=Rr.prototype={constructor:zr,on:function(e,t){var n=this._,r=Br(e+``,n),i,a=-1,o=r.length;if(arguments.length<2){for(;++a<o;)if((i=(e=r[a]).type)&&(i=Vr(n[i],e.name)))return i;return}if(t!=null&&typeof t!=`function`)throw Error(`invalid callback: `+t);for(;++a<o;)if(i=(e=r[a]).type)n[i]=Hr(n[i],e.name,t);else if(t==null)for(i in n)n[i]=Hr(n[i],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new zr(e)},call:function(e,t){if((i=arguments.length-2)>0)for(var n=Array(i),r=0,i,a;r<i;++r)n[r]=arguments[r+2];if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(a=this._[e],r=0,i=a.length;r<i;++r)a[r].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw Error(`unknown type: `+e);for(var r=this._[e],i=0,a=r.length;i<a;++i)r[i].value.apply(t,n)}};function Vr(e,t){for(var n=0,r=e.length,i;n<r;++n)if((i=e[n]).name===t)return i.value}function Hr(e,t,n){for(var r=0,i=e.length;r<i;++r)if(e[r].name===t){e[r]=Lr,e=e.slice(0,r).concat(e.slice(r+1));break}return n!=null&&e.push({name:t,value:n}),e}var Ur={svg:`http://www.w3.org/2000/svg`,xhtml:`http://www.w3.org/1999/xhtml`,xlink:`http://www.w3.org/1999/xlink`,xml:`http://www.w3.org/XML/1998/namespace`,xmlns:`http://www.w3.org/2000/xmlns/`};function Wr(e){var t=e+=``,n=t.indexOf(`:`);return n>=0&&(t=e.slice(0,n))!==`xmlns`&&(e=e.slice(n+1)),Ur.hasOwnProperty(t)?{space:Ur[t],local:e}:e}function Gr(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===`http://www.w3.org/1999/xhtml`&&t.documentElement.namespaceURI===`http://www.w3.org/1999/xhtml`?t.createElement(e):t.createElementNS(n,e)}}function Kr(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function qr(e){var t=Wr(e);return(t.local?Kr:Gr)(t)}function Jr(){}function Yr(e){return e==null?Jr:function(){return this.querySelector(e)}}function Xr(e){typeof e!=`function`&&(e=Yr(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=Array(o),c,l,u=0;u<o;++u)(c=a[u])&&(l=e.call(c,c.__data__,u,a))&&(`__data__`in c&&(l.__data__=c.__data__),s[u]=l);return new Ra(r,this._parents)}function Zr(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function Qr(){return[]}function $r(e){return e==null?Qr:function(){return this.querySelectorAll(e)}}function ei(e){return function(){return Zr(e.apply(this,arguments))}}function ti(e){e=typeof e==`function`?ei(e):$r(e);for(var t=this._groups,n=t.length,r=[],i=[],a=0;a<n;++a)for(var o=t[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&(r.push(e.call(c,c.__data__,l,o)),i.push(c));return new Ra(r,i)}function ni(e){return function(){return this.matches(e)}}function ri(e){return function(t){return t.matches(e)}}var ii=Array.prototype.find;function ai(e){return function(){return ii.call(this.children,e)}}function oi(){return this.firstElementChild}function si(e){return this.select(e==null?oi:ai(typeof e==`function`?e:ri(e)))}var ci=Array.prototype.filter;function li(){return Array.from(this.children)}function ui(e){return function(){return ci.call(this.children,e)}}function di(e){return this.selectAll(e==null?li:ui(typeof e==`function`?e:ri(e)))}function fi(e){typeof e!=`function`&&(e=ni(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Ra(r,this._parents)}function pi(e){return Array(e.length)}function mi(){return new Ra(this._enter||this._groups.map(pi),this._parents)}function hi(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}hi.prototype={constructor:hi,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function gi(e){return function(){return e}}function _i(e,t,n,r,i,a){for(var o=0,s,c=t.length,l=a.length;o<l;++o)(s=t[o])?(s.__data__=a[o],r[o]=s):n[o]=new hi(e,a[o]);for(;o<c;++o)(s=t[o])&&(i[o]=s)}function vi(e,t,n,r,i,a,o){var s,c,l=new Map,u=t.length,d=a.length,f=Array(u),p;for(s=0;s<u;++s)(c=t[s])&&(f[s]=p=o.call(c,c.__data__,s,t)+``,l.has(p)?i[s]=c:l.set(p,c));for(s=0;s<d;++s)p=o.call(e,a[s],s,a)+``,(c=l.get(p))?(r[s]=c,c.__data__=a[s],l.delete(p)):n[s]=new hi(e,a[s]);for(s=0;s<u;++s)(c=t[s])&&l.get(f[s])===c&&(i[s]=c)}function yi(e){return e.__data__}function bi(e,t){if(!arguments.length)return Array.from(this,yi);var n=t?vi:_i,r=this._parents,i=this._groups;typeof e!=`function`&&(e=gi(e));for(var a=i.length,o=Array(a),s=Array(a),c=Array(a),l=0;l<a;++l){var u=r[l],d=i[l],f=d.length,p=xi(e.call(u,u&&u.__data__,l,r)),m=p.length,h=s[l]=Array(m),g=o[l]=Array(m);n(u,d,h,g,c[l]=Array(f),p,t);for(var _=0,v=0,y,b;_<m;++_)if(y=h[_]){for(_>=v&&(v=_+1);!(b=g[v])&&++v<m;);y._next=b||null}}return o=new Ra(o,r),o._enter=s,o._exit=c,o}function xi(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function Si(){return new Ra(this._exit||this._groups.map(pi),this._parents)}function Ci(e,t,n){var r=this.enter(),i=this,a=this.exit();return typeof e==`function`?(r=e(r),r&&=r.selection()):r=r.append(e+``),t!=null&&(i=t(i),i&&=i.selection()),n==null?a.remove():n(a),r&&i?r.merge(i).order():i}function wi(e){for(var t=e.selection?e.selection():e,n=this._groups,r=t._groups,i=n.length,a=r.length,o=Math.min(i,a),s=Array(i),c=0;c<o;++c)for(var l=n[c],u=r[c],d=l.length,f=s[c]=Array(d),p,m=0;m<d;++m)(p=l[m]||u[m])&&(f[m]=p);for(;c<i;++c)s[c]=n[c];return new Ra(s,this._parents)}function Ti(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var r=e[t],i=r.length-1,a=r[i],o;--i>=0;)(o=r[i])&&(a&&o.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(o,a),a=o);return this}function Ei(e){e||=Di;function t(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}for(var n=this._groups,r=n.length,i=Array(r),a=0;a<r;++a){for(var o=n[a],s=o.length,c=i[a]=Array(s),l,u=0;u<s;++u)(l=o[u])&&(c[u]=l);c.sort(t)}return new Ra(i,this._parents).order()}function Di(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function Oi(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function ki(){return Array.from(this)}function Ai(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null}function ji(){let e=0;for(let t of this)++e;return e}function Mi(){return!this.node()}function Ni(e){for(var t=this._groups,n=0,r=t.length;n<r;++n)for(var i=t[n],a=0,o=i.length,s;a<o;++a)(s=i[a])&&e.call(s,s.__data__,a,i);return this}function Pi(e){return function(){this.removeAttribute(e)}}function Fi(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ii(e,t){return function(){this.setAttribute(e,t)}}function Li(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function Ri(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function zi(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function Bi(e,t){var n=Wr(e);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((t==null?n.local?Fi:Pi:typeof t==`function`?n.local?zi:Ri:n.local?Li:Ii)(n,t))}function Vi(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function Hi(e){return function(){this.style.removeProperty(e)}}function Ui(e,t,n){return function(){this.style.setProperty(e,t,n)}}function Wi(e,t,n){return function(){var r=t.apply(this,arguments);r==null?this.style.removeProperty(e):this.style.setProperty(e,r,n)}}function Gi(e,t,n){return arguments.length>1?this.each((t==null?Hi:typeof t==`function`?Wi:Ui)(e,t,n??``)):Ki(this.node(),e)}function Ki(e,t){return e.style.getPropertyValue(t)||Vi(e).getComputedStyle(e,null).getPropertyValue(t)}function qi(e){return function(){delete this[e]}}function Ji(e,t){return function(){this[e]=t}}function Yi(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function Xi(e,t){return arguments.length>1?this.each((t==null?qi:typeof t==`function`?Yi:Ji)(e,t)):this.node()[e]}function Zi(e){return e.trim().split(/^|\s+/)}function Qi(e){return e.classList||new $i(e)}function $i(e){this._node=e,this._names=Zi(e.getAttribute(`class`)||``)}$i.prototype={add:function(e){this._names.indexOf(e)<0&&(this._names.push(e),this._node.setAttribute(`class`,this._names.join(` `)))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute(`class`,this._names.join(` `)))},contains:function(e){return this._names.indexOf(e)>=0}};function ea(e,t){for(var n=Qi(e),r=-1,i=t.length;++r<i;)n.add(t[r])}function ta(e,t){for(var n=Qi(e),r=-1,i=t.length;++r<i;)n.remove(t[r])}function na(e){return function(){ea(this,e)}}function ra(e){return function(){ta(this,e)}}function ia(e,t){return function(){(t.apply(this,arguments)?ea:ta)(this,e)}}function aa(e,t){var n=Zi(e+``);if(arguments.length<2){for(var r=Qi(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each((typeof t==`function`?ia:t?na:ra)(n,t))}function oa(){this.textContent=``}function sa(e){return function(){this.textContent=e}}function ca(e){return function(){var t=e.apply(this,arguments);this.textContent=t??``}}function la(e){return arguments.length?this.each(e==null?oa:(typeof e==`function`?ca:sa)(e)):this.node().textContent}function ua(){this.innerHTML=``}function da(e){return function(){this.innerHTML=e}}function fa(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??``}}function pa(e){return arguments.length?this.each(e==null?ua:(typeof e==`function`?fa:da)(e)):this.node().innerHTML}function ma(){this.nextSibling&&this.parentNode.appendChild(this)}function ha(){return this.each(ma)}function ga(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function _a(){return this.each(ga)}function va(e){var t=typeof e==`function`?e:qr(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function ya(){return null}function ba(e,t){var n=typeof e==`function`?e:qr(e),r=t==null?ya:typeof t==`function`?t:Yr(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)})}function xa(){var e=this.parentNode;e&&e.removeChild(this)}function Sa(){return this.each(xa)}function Ca(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function wa(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function Ta(e){return this.select(e?wa:Ca)}function Ea(e){return arguments.length?this.property(`__data__`,e):this.node().__data__}function Da(e){return function(t){e.call(this,t,this.__data__)}}function Oa(e){return e.trim().split(/^|\s+/).map(function(e){var t=``,n=e.indexOf(`.`);return n>=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function ka(e){return function(){var t=this.__on;if(t){for(var n=0,r=-1,i=t.length,a;n<i;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++r]=a;++r?t.length=r:delete this.__on}}}function Aa(e,t,n){return function(){var r=this.__on,i,a=Da(t);if(r){for(var o=0,s=r.length;o<s;++o)if((i=r[o]).type===e.type&&i.name===e.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=n),i.value=t;return}}this.addEventListener(e.type,a,n),i={type:e.type,name:e.name,value:t,listener:a,options:n},r?r.push(i):this.__on=[i]}}function ja(e,t,n){var r=Oa(e+``),i,a=r.length,o;if(arguments.length<2){var s=this.node().__on;if(s){for(var c=0,l=s.length,u;c<l;++c)for(i=0,u=s[c];i<a;++i)if((o=r[i]).type===u.type&&o.name===u.name)return u.value}return}for(s=t?Aa:ka,i=0;i<a;++i)this.each(s(r[i],t,n));return this}function Ma(e,t,n){var r=Vi(e),i=r.CustomEvent;typeof i==`function`?i=new i(t,n):(i=r.document.createEvent(`Event`),n?(i.initEvent(t,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function Na(e,t){return function(){return Ma(this,e,t)}}function Pa(e,t){return function(){return Ma(this,e,t.apply(this,arguments))}}function Fa(e,t){return this.each((typeof t==`function`?Pa:Na)(e,t))}function*Ia(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var r=e[t],i=0,a=r.length,o;i<a;++i)(o=r[i])&&(yield o)}var La=[null];function Ra(e,t){this._groups=e,this._parents=t}function za(){return new Ra([[document.documentElement]],La)}function Ba(){return this}Ra.prototype=za.prototype={constructor:Ra,select:Xr,selectAll:ti,selectChild:si,selectChildren:di,filter:fi,data:bi,enter:mi,exit:Si,join:Ci,merge:wi,selection:Ba,order:Ti,sort:Ei,call:Oi,nodes:ki,node:Ai,size:ji,empty:Mi,each:Ni,attr:Bi,style:Gi,property:Xi,classed:aa,text:la,html:pa,raise:ha,lower:_a,append:va,insert:ba,remove:Sa,clone:Ta,datum:Ea,on:ja,dispatch:Fa,[Symbol.iterator]:Ia};function B(e){return typeof e==`string`?new Ra([[document.querySelector(e)]],[document.documentElement]):new Ra([[e]],La)}function Va(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Ha(e,t){var n=Object.create(e.prototype);for(var r in t)n[r]=t[r];return n}function Ua(){}var Wa=.7,Ga=1/Wa,Ka=`\\s*([+-]?\\d+)\\s*`,qa=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*`,Ja=`\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*`,Ya=/^#([0-9a-f]{3,8})$/,Xa=RegExp(`^rgb\\(${Ka},${Ka},${Ka}\\)$`),Za=RegExp(`^rgb\\(${Ja},${Ja},${Ja}\\)$`),Qa=RegExp(`^rgba\\(${Ka},${Ka},${Ka},${qa}\\)$`),$a=RegExp(`^rgba\\(${Ja},${Ja},${Ja},${qa}\\)$`),eo=RegExp(`^hsl\\(${qa},${Ja},${Ja}\\)$`),to=RegExp(`^hsla\\(${qa},${Ja},${Ja},${qa}\\)$`),no={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Va(Ua,so,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:ro,formatHex:ro,formatHex8:io,formatHsl:ao,formatRgb:oo,toString:oo});function ro(){return this.rgb().formatHex()}function io(){return this.rgb().formatHex8()}function ao(){return xo(this).formatHsl()}function oo(){return this.rgb().formatRgb()}function so(e){var t,n;return e=(e+``).trim().toLowerCase(),(t=Ya.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?co(t):n===3?new po(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?lo(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?lo(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=Xa.exec(e))?new po(t[1],t[2],t[3],1):(t=Za.exec(e))?new po(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=Qa.exec(e))?lo(t[1],t[2],t[3],t[4]):(t=$a.exec(e))?lo(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=eo.exec(e))?bo(t[1],t[2]/100,t[3]/100,1):(t=to.exec(e))?bo(t[1],t[2]/100,t[3]/100,t[4]):no.hasOwnProperty(e)?co(no[e]):e===`transparent`?new po(NaN,NaN,NaN,0):null}function co(e){return new po(e>>16&255,e>>8&255,e&255,1)}function lo(e,t,n,r){return r<=0&&(e=t=n=NaN),new po(e,t,n,r)}function uo(e){return e instanceof Ua||(e=so(e)),e?(e=e.rgb(),new po(e.r,e.g,e.b,e.opacity)):new po}function fo(e,t,n,r){return arguments.length===1?uo(e):new po(e,t,n,r??1)}function po(e,t,n,r){this.r=+e,this.g=+t,this.b=+n,this.opacity=+r}Va(po,fo,Ha(Ua,{brighter(e){return e=e==null?Ga:Ga**+e,new po(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Wa:Wa**+e,new po(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new po(vo(this.r),vo(this.g),vo(this.b),_o(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:mo,formatHex:mo,formatHex8:ho,formatRgb:go,toString:go}));function mo(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}`}function ho(){return`#${yo(this.r)}${yo(this.g)}${yo(this.b)}${yo((isNaN(this.opacity)?1:this.opacity)*255)}`}function go(){let e=_o(this.opacity);return`${e===1?`rgb(`:`rgba(`}${vo(this.r)}, ${vo(this.g)}, ${vo(this.b)}${e===1?`)`:`, ${e})`}`}function _o(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function vo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function yo(e){return e=vo(e),(e<16?`0`:``)+e.toString(16)}function bo(e,t,n,r){return r<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new Co(e,t,n,r)}function xo(e){if(e instanceof Co)return new Co(e.h,e.s,e.l,e.opacity);if(e instanceof Ua||(e=so(e)),!e)return new Co;if(e instanceof Co)return e;e=e.rgb();var t=e.r/255,n=e.g/255,r=e.b/255,i=Math.min(t,n,r),a=Math.max(t,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=t===a?(n-r)/s+(n<r)*6:n===a?(r-t)/s+2:(t-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new Co(o,s,c,e.opacity)}function So(e,t,n,r){return arguments.length===1?xo(e):new Co(e,t,n,r??1)}function Co(e,t,n,r){this.h=+e,this.s=+t,this.l=+n,this.opacity=+r}Va(Co,So,Ha(Ua,{brighter(e){return e=e==null?Ga:Ga**+e,new Co(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Wa:Wa**+e,new Co(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*t,i=2*n-r;return new po(Eo(e>=240?e-240:e+120,i,r),Eo(e,i,r),Eo(e<120?e+240:e-120,i,r),this.opacity)},clamp(){return new Co(wo(this.h),To(this.s),To(this.l),_o(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=_o(this.opacity);return`${e===1?`hsl(`:`hsla(`}${wo(this.h)}, ${To(this.s)*100}%, ${To(this.l)*100}%${e===1?`)`:`, ${e})`}`}}));function wo(e){return e=(e||0)%360,e<0?e+360:e}function To(e){return Math.max(0,Math.min(1,e||0))}function Eo(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}var Do=e=>()=>e;function Oo(e,t){return function(n){return e+n*t}}function ko(e,t,n){return e**=+n,t=t**+n-e,n=1/n,function(r){return(e+r*t)**+n}}function Ao(e,t){var n=t-e;return n?Oo(e,n>180||n<-180?n-360*Math.round(n/360):n):Do(isNaN(e)?t:e)}function jo(e){return(e=+e)==1?Mo:function(t,n){return n-t?ko(t,n,e):Do(isNaN(t)?n:t)}}function Mo(e,t){var n=t-e;return n?Oo(e,n):Do(isNaN(e)?t:e)}var No=(function e(t){var n=jo(t);function r(e,t){var r=n((e=fo(e)).r,(t=fo(t)).r),i=n(e.g,t.g),a=n(e.b,t.b),o=Mo(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=i(t),e.b=a(t),e.opacity=o(t),e+``}}return r.gamma=e,r})(1);function Po(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Fo=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Io=new RegExp(Fo.source,`g`);function Lo(e){return function(){return e}}function Ro(e){return function(t){return e(t)+``}}function zo(e,t){var n=Fo.lastIndex=Io.lastIndex=0,r,i,a,o=-1,s=[],c=[];for(e+=``,t+=``;(r=Fo.exec(e))&&(i=Io.exec(t));)(a=i.index)>n&&(a=t.slice(n,a),s[o]?s[o]+=a:s[++o]=a),(r=r[0])===(i=i[0])?s[o]?s[o]+=i:s[++o]=i:(s[++o]=null,c.push({i:o,x:Po(r,i)})),n=Io.lastIndex;return n<t.length&&(a=t.slice(n),s[o]?s[o]+=a:s[++o]=a),s.length<2?c[0]?Ro(c[0].x):Lo(t):(t=c.length,function(e){for(var n=0,r;n<t;++n)s[(r=c[n]).i]=r.x(e);return s.join(``)})}var Bo=180/Math.PI,Vo={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Ho(e,t,n,r,i,a){var o,s,c;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(c=e*n+t*r)&&(n-=e*c,r-=t*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),e*r<t*n&&(e=-e,t=-t,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(t,e)*Bo,skewX:Math.atan(c)*Bo,scaleX:o,scaleY:s}}var Uo;function Wo(e){let t=new(typeof DOMMatrix==`function`?DOMMatrix:WebKitCSSMatrix)(e+``);return t.isIdentity?Vo:Ho(t.a,t.b,t.c,t.d,t.e,t.f)}function Go(e){return e==null||(Uo||=document.createElementNS(`http://www.w3.org/2000/svg`,`g`),Uo.setAttribute(`transform`,e),!(e=Uo.transform.baseVal.consolidate()))?Vo:(e=e.matrix,Ho(e.a,e.b,e.c,e.d,e.e,e.f))}function Ko(e,t,n,r){function i(e){return e.length?e.pop()+` `:``}function a(e,r,i,a,o,s){if(e!==i||r!==a){var c=o.push(`translate(`,null,t,null,n);s.push({i:c-4,x:Po(e,i)},{i:c-2,x:Po(r,a)})}else (i||a)&&o.push(`translate(`+i+t+a+n)}function o(e,t,n,a){e===t?t&&n.push(i(n)+`rotate(`+t+r):(e-t>180?t+=360:t-e>180&&(e+=360),a.push({i:n.push(i(n)+`rotate(`,null,r)-2,x:Po(e,t)}))}function s(e,t,n,a){e===t?t&&n.push(i(n)+`skewX(`+t+r):a.push({i:n.push(i(n)+`skewX(`,null,r)-2,x:Po(e,t)})}function c(e,t,n,r,a,o){if(e!==n||t!==r){var s=a.push(i(a)+`scale(`,null,`,`,null,`)`);o.push({i:s-4,x:Po(e,n)},{i:s-2,x:Po(t,r)})}else (n!==1||r!==1)&&a.push(i(a)+`scale(`+n+`,`+r+`)`)}return function(t,n){var r=[],i=[];return t=e(t),n=e(n),a(t.translateX,t.translateY,n.translateX,n.translateY,r,i),o(t.rotate,n.rotate,r,i),s(t.skewX,n.skewX,r,i),c(t.scaleX,t.scaleY,n.scaleX,n.scaleY,r,i),t=n=null,function(e){for(var t=-1,n=i.length,a;++t<n;)r[(a=i[t]).i]=a.x(e);return r.join(``)}}}var qo=Ko(Wo,`px, `,`px)`,`deg)`),Jo=Ko(Go,`, `,`)`,`)`),Yo=0,Xo=0,Zo=0,Qo=1e3,$o,es,ts=0,ns=0,rs=0,is=typeof performance==`object`&&performance.now?performance:Date,as=typeof window==`object`&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function os(){return ns||=(as(ss),is.now()+rs)}function ss(){ns=0}function cs(){this._call=this._time=this._next=null}cs.prototype=ls.prototype={constructor:cs,restart:function(e,t,n){if(typeof e!=`function`)throw TypeError(`callback is not a function`);n=(n==null?os():+n)+(t==null?0:+t),!this._next&&es!==this&&(es?es._next=this:$o=this,es=this),this._call=e,this._time=n,ms()},stop:function(){this._call&&(this._call=null,this._time=1/0,ms())}};function ls(e,t,n){var r=new cs;return r.restart(e,t,n),r}function us(){os(),++Yo;for(var e=$o,t;e;)(t=ns-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Yo}function ds(){ns=(ts=is.now())+rs,Yo=Xo=0;try{us()}finally{Yo=0,ps(),ns=0}}function fs(){var e=is.now(),t=e-ts;t>Qo&&(rs-=t,ts=e)}function ps(){for(var e,t=$o,n,r=1/0;t;)t._call?(r>t._time&&(r=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:$o=n);es=e,ms(r)}function ms(e){Yo||(Xo&&=clearTimeout(Xo),e-ns>24?(e<1/0&&(Xo=setTimeout(ds,e-is.now()-rs)),Zo&&=clearInterval(Zo)):(Zo||=(ts=is.now(),setInterval(fs,Qo)),Yo=1,as(ds)))}function hs(e,t,n){var r=new cs;return t=t==null?0:+t,r.restart(n=>{r.stop(),e(n+t)},t,n),r}var gs=Rr(`start`,`end`,`cancel`,`interrupt`),_s=[];function vs(e,t,n,r,i,a){var o=e.__transition;if(!o)e.__transition={};else if(n in o)return;Ss(e,n,{name:t,index:r,group:i,on:gs,tween:_s,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})}function ys(e,t){var n=xs(e,t);if(n.state>0)throw Error(`too late; already scheduled`);return n}function bs(e,t){var n=xs(e,t);if(n.state>3)throw Error(`too late; already running`);return n}function xs(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw Error(`transition not found`);return n}function Ss(e,t,n){var r=e.__transition,i;r[t]=n,n.timer=ls(a,0,n.time);function a(e){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=e&&o(e-n.delay)}function o(a){var l,u,d,f;if(n.state!==1)return c();for(l in r)if(f=r[l],f.name===n.name){if(f.state===3)return hs(o);f.state===4?(f.state=6,f.timer.stop(),f.on.call(`interrupt`,e,e.__data__,f.index,f.group),delete r[l]):+l<t&&(f.state=6,f.timer.stop(),f.on.call(`cancel`,e,e.__data__,f.index,f.group),delete r[l])}if(hs(function(){n.state===3&&(n.state=4,n.timer.restart(s,n.delay,n.time),s(a))}),n.state=2,n.on.call(`start`,e,e.__data__,n.index,n.group),n.state===2){for(n.state=3,i=Array(d=n.tween.length),l=0,u=-1;l<d;++l)(f=n.tween[l].value.call(e,e.__data__,n.index,n.group))&&(i[++u]=f);i.length=u+1}}function s(t){for(var r=t<n.duration?n.ease.call(null,t/n.duration):(n.timer.restart(c),n.state=5,1),a=-1,o=i.length;++a<o;)i[a].call(e,r);n.state===5&&(n.on.call(`end`,e,e.__data__,n.index,n.group),c())}function c(){for(var i in n.state=6,n.timer.stop(),delete r[t],r)return;delete e.__transition}}function Cs(e,t){var n=e.__transition,r,i,a=!0,o;if(n){for(o in t=t==null?null:t+``,n){if((r=n[o]).name!==t){a=!1;continue}i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?`interrupt`:`cancel`,e,e.__data__,r.index,r.group),delete n[o]}a&&delete e.__transition}}function ws(e){return this.each(function(){Cs(this,e)})}function Ts(e,t){var n,r;return function(){var i=bs(this,e),a=i.tween;if(a!==n){r=n=a;for(var o=0,s=r.length;o<s;++o)if(r[o].name===t){r=r.slice(),r.splice(o,1);break}}i.tween=r}}function Es(e,t,n){var r,i;if(typeof n!=`function`)throw Error();return function(){var a=bs(this,e),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:t,value:n},c=0,l=i.length;c<l;++c)if(i[c].name===t){i[c]=s;break}c===l&&i.push(s)}a.tween=i}}function Ds(e,t){var n=this._id;if(e+=``,arguments.length<2){for(var r=xs(this.node(),n).tween,i=0,a=r.length,o;i<a;++i)if((o=r[i]).name===e)return o.value;return null}return this.each((t==null?Ts:Es)(n,e,t))}function Os(e,t,n){var r=e._id;return e.each(function(){var e=bs(this,r);(e.value||={})[t]=n.apply(this,arguments)}),function(e){return xs(e,r).value[t]}}function ks(e,t){var n;return(typeof t==`number`?Po:t instanceof so?No:(n=so(t))?(t=n,No):zo)(e,t)}function As(e){return function(){this.removeAttribute(e)}}function js(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Ms(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttribute(e);return o===i?null:o===r?a:a=t(r=o,n)}}function Ns(e,t,n){var r,i=n+``,a;return function(){var o=this.getAttributeNS(e.space,e.local);return o===i?null:o===r?a:a=t(r=o,n)}}function Ps(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttribute(e):(o=this.getAttribute(e),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Fs(e,t,n){var r,i,a;return function(){var o,s=n(this),c;return s==null?void this.removeAttributeNS(e.space,e.local):(o=this.getAttributeNS(e.space,e.local),c=s+``,o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s)))}}function Is(e,t){var n=Wr(e),r=n===`transform`?Jo:ks;return this.attrTween(e,typeof t==`function`?(n.local?Fs:Ps)(n,r,Os(this,`attr.`+e,t)):t==null?(n.local?js:As)(n):(n.local?Ns:Ms)(n,r,t))}function Ls(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function Rs(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function zs(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Rs(e,i)),n}return i._value=t,i}function Bs(e,t){var n,r;function i(){var i=t.apply(this,arguments);return i!==r&&(n=(r=i)&&Ls(e,i)),n}return i._value=t,i}function Vs(e,t){var n=`attr.`+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!=`function`)throw Error();var r=Wr(e);return this.tween(n,(r.local?zs:Bs)(r,t))}function Hs(e,t){return function(){ys(this,e).delay=+t.apply(this,arguments)}}function Us(e,t){return t=+t,function(){ys(this,e).delay=t}}function Ws(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Hs:Us)(t,e)):xs(this.node(),t).delay}function Gs(e,t){return function(){bs(this,e).duration=+t.apply(this,arguments)}}function Ks(e,t){return t=+t,function(){bs(this,e).duration=t}}function qs(e){var t=this._id;return arguments.length?this.each((typeof e==`function`?Gs:Ks)(t,e)):xs(this.node(),t).duration}function Js(e,t){if(typeof t!=`function`)throw Error();return function(){bs(this,e).ease=t}}function Ys(e){var t=this._id;return arguments.length?this.each(Js(t,e)):xs(this.node(),t).ease}function Xs(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!=`function`)throw Error();bs(this,e).ease=n}}function Zs(e){if(typeof e!=`function`)throw Error();return this.each(Xs(this._id,e))}function Qs(e){typeof e!=`function`&&(e=ni(e));for(var t=this._groups,n=t.length,r=Array(n),i=0;i<n;++i)for(var a=t[i],o=a.length,s=r[i]=[],c,l=0;l<o;++l)(c=a[l])&&e.call(c,c.__data__,l,a)&&s.push(c);return new Dc(r,this._parents,this._name,this._id)}function $s(e){if(e._id!==this._id)throw Error();for(var t=this._groups,n=e._groups,r=t.length,i=n.length,a=Math.min(r,i),o=Array(r),s=0;s<a;++s)for(var c=t[s],l=n[s],u=c.length,d=o[s]=Array(u),f,p=0;p<u;++p)(f=c[p]||l[p])&&(d[p]=f);for(;s<r;++s)o[s]=t[s];return new Dc(o,this._parents,this._name,this._id)}function ec(e){return(e+``).trim().split(/^|\s+/).every(function(e){var t=e.indexOf(`.`);return t>=0&&(e=e.slice(0,t)),!e||e===`start`})}function tc(e,t,n){var r,i,a=ec(t)?ys:bs;return function(){var o=a(this,e),s=o.on;s!==r&&(i=(r=s).copy()).on(t,n),o.on=i}}function nc(e,t){var n=this._id;return arguments.length<2?xs(this.node(),n).on.on(e):this.each(tc(n,e,t))}function rc(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function ic(){return this.on(`end.remove`,rc(this._id))}function ac(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=Yr(e));for(var r=this._groups,i=r.length,a=Array(i),o=0;o<i;++o)for(var s=r[o],c=s.length,l=a[o]=Array(c),u,d,f=0;f<c;++f)(u=s[f])&&(d=e.call(u,u.__data__,f,s))&&(`__data__`in u&&(d.__data__=u.__data__),l[f]=d,vs(l[f],t,n,f,l,xs(u,n)));return new Dc(a,this._parents,t,n)}function oc(e){var t=this._name,n=this._id;typeof e!=`function`&&(e=$r(e));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c=r[s],l=c.length,u,d=0;d<l;++d)if(u=c[d]){for(var f=e.call(u,u.__data__,d,c),p,m=xs(u,n),h=0,g=f.length;h<g;++h)(p=f[h])&&vs(p,t,n,h,f,m);a.push(f),o.push(u)}return new Dc(a,o,t,n)}var sc=za.prototype.constructor;function cc(){return new sc(this._groups,this._parents)}function lc(e,t){var n,r,i;return function(){var a=Ki(this,e),o=(this.style.removeProperty(e),Ki(this,e));return a===o?null:a===n&&o===r?i:i=t(n=a,r=o)}}function uc(e){return function(){this.style.removeProperty(e)}}function dc(e,t,n){var r,i=n+``,a;return function(){var o=Ki(this,e);return o===i?null:o===r?a:a=t(r=o,n)}}function fc(e,t,n){var r,i,a;return function(){var o=Ki(this,e),s=n(this),c=s+``;return s??(c=s=(this.style.removeProperty(e),Ki(this,e))),o===c?null:o===r&&c===i?a:(i=c,a=t(r=o,s))}}function pc(e,t){var n,r,i,a=`style.`+t,o=`end.`+a,s;return function(){var c=bs(this,e),l=c.on,u=c.value[a]==null?s||=uc(t):void 0;(l!==n||i!==u)&&(r=(n=l).copy()).on(o,i=u),c.on=r}}function mc(e,t,n){var r=(e+=``)==`transform`?qo:ks;return t==null?this.styleTween(e,lc(e,r)).on(`end.style.`+e,uc(e)):typeof t==`function`?this.styleTween(e,fc(e,r,Os(this,`style.`+e,t))).each(pc(this._id,e)):this.styleTween(e,dc(e,r,t),n).on(`end.style.`+e,null)}function hc(e,t,n){return function(r){this.style.setProperty(e,t.call(this,r),n)}}function gc(e,t,n){var r,i;function a(){var a=t.apply(this,arguments);return a!==i&&(r=(i=a)&&hc(e,a,n)),r}return a._value=t,a}function _c(e,t,n){var r=`style.`+(e+=``);if(arguments.length<2)return(r=this.tween(r))&&r._value;if(t==null)return this.tween(r,null);if(typeof t!=`function`)throw Error();return this.tween(r,gc(e,t,n??``))}function vc(e){return function(){this.textContent=e}}function yc(e){return function(){var t=e(this);this.textContent=t??``}}function bc(e){return this.tween(`text`,typeof e==`function`?yc(Os(this,`text`,e)):vc(e==null?``:e+``))}function xc(e){return function(t){this.textContent=e.call(this,t)}}function Sc(e){var t,n;function r(){var r=e.apply(this,arguments);return r!==n&&(t=(n=r)&&xc(r)),t}return r._value=e,r}function Cc(e){var t=`text`;if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!=`function`)throw Error();return this.tween(t,Sc(e))}function wc(){for(var e=this._name,t=this._id,n=kc(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)if(c=o[l]){var u=xs(c,t);vs(c,e,n,l,o,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new Dc(r,this._parents,e,n)}function Tc(){var e,t,n=this,r=n._id,i=n.size();return new Promise(function(a,o){var s={value:o},c={value:function(){--i===0&&a()}};n.each(function(){var n=bs(this,r),i=n.on;i!==e&&(t=(e=i).copy(),t._.cancel.push(s),t._.interrupt.push(s),t._.end.push(c)),n.on=t}),i===0&&a()})}var Ec=0;function Dc(e,t,n,r){this._groups=e,this._parents=t,this._name=n,this._id=r}function Oc(e){return za().transition(e)}function kc(){return++Ec}var Ac=za.prototype;Dc.prototype=Oc.prototype={constructor:Dc,select:ac,selectAll:oc,selectChild:Ac.selectChild,selectChildren:Ac.selectChildren,filter:Qs,merge:$s,selection:cc,transition:wc,call:Ac.call,nodes:Ac.nodes,node:Ac.node,size:Ac.size,empty:Ac.empty,each:Ac.each,on:nc,attr:Is,attrTween:Vs,style:mc,styleTween:_c,text:bc,textTween:Cc,remove:ic,tween:Ds,delay:Ws,duration:qs,ease:Ys,easeVarying:Zs,end:Tc,[Symbol.iterator]:Ac[Symbol.iterator]};function jc(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var Mc={time:null,delay:0,duration:250,ease:jc};function Nc(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw Error(`transition ${t} not found`);return n}function Pc(e){var t,n;e instanceof Dc?(t=e._id,e=e._name):(t=kc(),(n=Mc).time=os(),e=e==null?null:e+``);for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o=r[a],s=o.length,c,l=0;l<s;++l)(c=o[l])&&vs(c,e,t,l,o,n||Nc(c,t));return new Dc(r,this._parents,e,t)}za.prototype.interrupt=ws,za.prototype.transition=Pc;var{abs:Fc,max:Ic,min:Lc}=Math;[`w`,`e`].map(Rc),[`n`,`s`].map(Rc),[`n`,`w`,`e`,`s`,`nw`,`ne`,`sw`,`se`].map(Rc);function Rc(e){return{type:e}}var zc=Math.PI,Bc=2*zc,Vc=1e-6,Hc=Bc-Vc;function Uc(e){this._+=e[0];for(let t=1,n=e.length;t<n;++t)this._+=arguments[t]+e[t]}function Wc(e){let t=Math.floor(e);if(!(t>=0))throw Error(`invalid digits: ${e}`);if(t>15)return Uc;let n=10**t;return function(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=Math.round(arguments[t]*n)/n+e[t]}}var Gc=class{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._=``,this._append=e==null?Uc:Wc(e)}moveTo(e,t){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,t){this._append`L${this._x1=+e},${this._y1=+t}`}quadraticCurveTo(e,t,n,r){this._append`Q${+e},${+t},${this._x1=+n},${this._y1=+r}`}bezierCurveTo(e,t,n,r,i,a){this._append`C${+e},${+t},${+n},${+r},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,n,r,i){if(e=+e,t=+t,n=+n,r=+r,i=+i,i<0)throw Error(`negative radius: ${i}`);let a=this._x1,o=this._y1,s=n-e,c=r-t,l=a-e,u=o-t,d=l*l+u*u;if(this._x1===null)this._append`M${this._x1=e},${this._y1=t}`;else if(d>Vc)if(!(Math.abs(u*s-c*l)>Vc)||!i)this._append`L${this._x1=e},${this._y1=t}`;else{let f=n-a,p=r-o,m=s*s+c*c,h=f*f+p*p,g=Math.sqrt(m),_=Math.sqrt(d),v=i*Math.tan((zc-Math.acos((m+d-h)/(2*g*_)))/2),y=v/_,b=v/g;Math.abs(y-1)>Vc&&this._append`L${e+y*l},${t+y*u}`,this._append`A${i},${i},0,0,${+(u*f>l*p)},${this._x1=e+b*s},${this._y1=t+b*c}`}}arc(e,t,n,r,i,a){if(e=+e,t=+t,n=+n,a=!!a,n<0)throw Error(`negative radius: ${n}`);let o=n*Math.cos(r),s=n*Math.sin(r),c=e+o,l=t+s,u=1^a,d=a?r-i:i-r;this._x1===null?this._append`M${c},${l}`:(Math.abs(this._x1-c)>Vc||Math.abs(this._y1-l)>Vc)&&this._append`L${c},${l}`,n&&(d<0&&(d=d%Bc+Bc),d>Hc?this._append`A${n},${n},0,1,${u},${e-o},${t-s}A${n},${n},0,1,${u},${this._x1=c},${this._y1=l}`:d>Vc&&this._append`A${n},${n},0,${+(d>=zc)},${u},${this._x1=e+n*Math.cos(i)},${this._y1=t+n*Math.sin(i)}`)}rect(e,t,n,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+t}h${n=+n}v${+r}h${-n}Z`}toString(){return this._}};function Kc(){return new Gc}Kc.prototype=Gc.prototype;function qc(e){return function(){return e}}var Jc=Math.abs,Yc=Math.atan2,Xc=Math.cos,Zc=Math.max,Qc=Math.min,$c=Math.sin,el=Math.sqrt,tl=1e-12,nl=Math.PI,rl=nl/2,il=2*nl;function al(e){return e>1?0:e<-1?nl:Math.acos(e)}function ol(e){return e>=1?rl:e<=-1?-rl:Math.asin(e)}function sl(e){let t=3;return e.digits=function(n){if(!arguments.length)return t;if(n==null)t=null;else{let e=Math.floor(n);if(!(e>=0))throw RangeError(`invalid digits: ${n}`);t=e}return e},()=>new Gc(t)}Array.prototype.slice;function cl(e){return typeof e==`object`&&`length`in e?e:Array.from(e)}function ll(e){this._context=e}ll.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function ul(e){return new ll(e)}function dl(e){return e[0]}function fl(e){return e[1]}function pl(e,t){var n=qc(!0),r=null,i=ul,a=null,o=sl(s);e=typeof e==`function`?e:e===void 0?dl:qc(e),t=typeof t==`function`?t:t===void 0?fl:qc(t);function s(s){var c,l=(s=cl(s)).length,u,d=!1,f;for(r??(a=i(f=o())),c=0;c<=l;++c)!(c<l&&n(u=s[c],c,s))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+e(u,c,s),+t(u,c,s));if(f)return a=null,f+``||null}return s.x=function(t){return arguments.length?(e=typeof t==`function`?t:qc(+t),s):e},s.y=function(e){return arguments.length?(t=typeof e==`function`?e:qc(+e),s):t},s.defined=function(e){return arguments.length?(n=typeof e==`function`?e:qc(!!e),s):n},s.curve=function(e){return arguments.length?(i=e,r!=null&&(a=i(r)),s):i},s.context=function(e){return arguments.length?(e==null?r=a=null:a=i(r=e),s):r},s}var ml=class{constructor(e,t){this._context=e,this._x=t}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,t,e,t):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+t)/2,e,this._y0,e,t);break}this._x0=e,this._y0=t}};function hl(e){return new ml(e,!0)}function gl(e){return new ml(e,!1)}function _l(){}function vl(e,t,n){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+n)/6)}function yl(e){this._context=e}yl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:vl(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:vl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function bl(e){return new yl(e)}function xl(e){this._context=e}xl.prototype={areaStart:_l,areaEnd:_l,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:vl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function Sl(e){return new xl(e)}function Cl(e){this._context=e}Cl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+e)/6,r=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:vl(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function wl(e){return new Cl(e)}function Tl(e,t){this._basis=new yl(e),this._beta=t}Tl.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var e=this._x,t=this._y,n=e.length-1;if(n>0)for(var r=e[0],i=t[0],a=e[n]-r,o=t[n]-i,s=-1,c;++s<=n;)c=s/n,this._basis.point(this._beta*e[s]+(1-this._beta)*(r+c*a),this._beta*t[s]+(1-this._beta)*(i+c*o));this._x=this._y=null,this._basis.lineEnd()},point:function(e,t){this._x.push(+e),this._y.push(+t)}};var El=(function e(t){function n(e){return t===1?new yl(e):new Tl(e,t)}return n.beta=function(t){return e(+t)},n})(.85);function Dl(e,t,n){e._context.bezierCurveTo(e._x1+e._k*(e._x2-e._x0),e._y1+e._k*(e._y2-e._y0),e._x2+e._k*(e._x1-t),e._y2+e._k*(e._y1-n),e._x2,e._y2)}function Ol(e,t){this._context=e,this._k=(1-t)/6}Ol.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:Dl(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2,this._x1=e,this._y1=t;break;case 2:this._point=3;default:Dl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var kl=(function e(t){function n(e){return new Ol(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Al(e,t){this._context=e,this._k=(1-t)/6}Al.prototype={areaStart:_l,areaEnd:_l,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Dl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var jl=(function e(t){function n(e){return new Al(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Ml(e,t){this._context=e,this._k=(1-t)/6}Ml.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Dl(this,e,t);break}this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Nl=(function e(t){function n(e){return new Ml(e,t)}return n.tension=function(t){return e(+t)},n})(0);function Pl(e,t,n){var r=e._x1,i=e._y1,a=e._x2,o=e._y2;if(e._l01_a>1e-12){var s=2*e._l01_2a+3*e._l01_a*e._l12_a+e._l12_2a,c=3*e._l01_a*(e._l01_a+e._l12_a);r=(r*s-e._x0*e._l12_2a+e._x2*e._l01_2a)/c,i=(i*s-e._y0*e._l12_2a+e._y2*e._l01_2a)/c}if(e._l23_a>1e-12){var l=2*e._l23_2a+3*e._l23_a*e._l12_a+e._l12_2a,u=3*e._l23_a*(e._l23_a+e._l12_a);a=(a*l+e._x1*e._l23_2a-t*e._l12_2a)/u,o=(o*l+e._y1*e._l23_2a-n*e._l12_2a)/u}e._context.bezierCurveTo(r,i,a,o,e._x2,e._y2)}function Fl(e,t){this._context=e,this._alpha=t}Fl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3;default:Pl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Il=(function e(t){function n(e){return t?new Fl(e,t):new Ol(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Ll(e,t){this._context=e,this._alpha=t}Ll.prototype={areaStart:_l,areaEnd:_l,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1,this._x3=e,this._y3=t;break;case 1:this._point=2,this._context.moveTo(this._x4=e,this._y4=t);break;case 2:this._point=3,this._x5=e,this._y5=t;break;default:Pl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Rl=(function e(t){function n(e){return t?new Ll(e,t):new Al(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function zl(e,t){this._context=e,this._alpha=t}zl.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){if(e=+e,t=+t,this._point){var n=this._x2-e,r=this._y2-t;this._l23_a=Math.sqrt(this._l23_2a=(n*n+r*r)**+this._alpha)}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pl(this,e,t);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=e,this._y0=this._y1,this._y1=this._y2,this._y2=t}};var Bl=(function e(t){function n(e){return t?new zl(e,t):new Ml(e,0)}return n.alpha=function(t){return e(+t)},n})(.5);function Vl(e){this._context=e}Vl.prototype={areaStart:_l,areaEnd:_l,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function Hl(e){return new Vl(e)}function Ul(e){return e<0?-1:1}function Wl(e,t,n){var r=e._x1-e._x0,i=t-e._x1,a=(e._y1-e._y0)/(r||i<0&&-0),o=(n-e._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(Ul(a)+Ul(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function Gl(e,t){var n=e._x1-e._x0;return n?(3*(e._y1-e._y0)/n-t)/2:t}function Kl(e,t,n){var r=e._x0,i=e._y0,a=e._x1,o=e._y1,s=(a-r)/3;e._context.bezierCurveTo(r+s,i+s*t,a-s,o-s*n,a,o)}function ql(e){this._context=e}ql.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Kl(this,this._t0,Gl(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var n=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,Kl(this,Gl(this,n=Wl(this,e,t)),n);break;default:Kl(this,this._t0,n=Wl(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=n}}};function Jl(e){this._context=new Yl(e)}(Jl.prototype=Object.create(ql.prototype)).point=function(e,t){ql.prototype.point.call(this,t,e)};function Yl(e){this._context=e}Yl.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,n,r,i,a){this._context.bezierCurveTo(t,e,r,n,a,i)}};function Xl(e){return new ql(e)}function Zl(e){return new Jl(e)}function Ql(e){this._context=e}Ql.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,n=e.length;if(n)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),n===2)this._context.lineTo(e[1],t[1]);else for(var r=$l(e),i=$l(t),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],e[o],t[o]);(this._line||this._line!==0&&n===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function $l(e){var t,n=e.length-1,r,i=Array(n),a=Array(n),o=Array(n);for(i[0]=0,a[0]=2,o[0]=e[0]+2*e[1],t=1;t<n-1;++t)i[t]=1,a[t]=4,o[t]=4*e[t]+2*e[t+1];for(i[n-1]=2,a[n-1]=7,o[n-1]=8*e[n-1]+e[n],t=1;t<n;++t)r=i[t]/a[t-1],a[t]-=r,o[t]-=r*o[t-1];for(i[n-1]=o[n-1]/a[n-1],t=n-2;t>=0;--t)i[t]=(o[t]-i[t+1])/a[t];for(a[n-1]=(e[n]+i[n-1])/2,t=0;t<n-1;++t)a[t]=2*e[t+1]-i[t+1];return[i,a]}function eu(e){return new Ql(e)}function tu(e,t){this._context=e,this._t=t}tu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var n=this._x*(1-this._t)+e*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,t)}break}this._x=e,this._y=t}};function nu(e){return new tu(e,.5)}function ru(e){return new tu(e,0)}function iu(e){return new tu(e,1)}function au(e,t,n){this.k=e,this.x=t,this.y=n}au.prototype={constructor:au,scale:function(e){return e===1?this:new au(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new au(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return`translate(`+this.x+`,`+this.y+`) scale(`+this.k+`)`}};var ou=new au(1,0,0);su.prototype=au.prototype;function su(e){for(;!e.__zoom;)if(!(e=e.parentNode))return ou;return e.__zoom}var cu=l(e=>{let{securityLevel:t}=z(),n=B(`body`);return t===`sandbox`&&(n=B((B(`#i${e}`).node()?.contentDocument??document).body)),n.select(`#${e}`)},`selectSvgElement`),lu=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[`.`,`/`],e.BLANK_URL=`about:blank`})),uu=e((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=o;var t=lu();function n(e){return t.relativeFirstCharacters.indexOf(e[0])>-1}function r(e){return e.replace(t.ctrlCharactersRegex,``).replace(t.htmlEntitiesRegex,function(e,t){return String.fromCharCode(t)})}function i(e){return URL.canParse(e)}function a(e){try{return decodeURIComponent(e)}catch{return e}}function o(e){if(!e)return t.BLANK_URL;var o,s=a(e.trim());do s=r(s).replace(t.htmlCtrlEntityRegex,``).replace(t.ctrlCharactersRegex,``).replace(t.whitespaceEscapeCharsRegex,``).trim(),s=a(s),o=s.match(t.ctrlCharactersRegex)||s.match(t.htmlEntitiesRegex)||s.match(t.htmlCtrlEntityRegex)||s.match(t.whitespaceEscapeCharsRegex);while(o&&o.length>0);var c=s;if(!c)return t.BLANK_URL;if(n(c))return c;var l=c.trimStart(),u=l.match(t.urlSchemeRegex);if(!u)return c;var d=u[0].toLowerCase().trim();if(t.invalidProtocolRegex.test(d))return t.BLANK_URL;var f=l.replace(/\\/g,`/`);if(d===`mailto:`||d.includes(`://`))return f;if(d===`http:`||d===`https:`){if(!i(f))return t.BLANK_URL;var p=new URL(f);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return f}}));function du(e){if(typeof e!=`object`||!e)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!==`[object Object]`){let t=e[Symbol.toStringTag];return t==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${t}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function fu(){}function pu(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function mu(e){return e==null?e===void 0?`[object Undefined]`:`[object Null]`:Object.prototype.toString.call(e)}var hu=`[object RegExp]`,gu=`[object String]`,_u=`[object Number]`,vu=`[object Boolean]`,yu=`[object Arguments]`,bu=`[object Symbol]`,xu=`[object Date]`,Su=`[object Map]`,Cu=`[object Set]`,wu=`[object Array]`,Tu=`[object ArrayBuffer]`,Eu=`[object Object]`,Du=`[object DataView]`,Ou=`[object Uint8Array]`,ku=`[object Uint8ClampedArray]`,Au=`[object Uint16Array]`,ju=`[object Uint32Array]`,Mu=`[object Int8Array]`,Nu=`[object Int16Array]`,Pu=`[object Int32Array]`,Fu=`[object Float32Array]`,Iu=`[object Float64Array]`,Lu=typeof globalThis==`object`&&globalThis||typeof window==`object`&&window||typeof self==`object`&&self||typeof global==`object`&&global||(function(){return this})()||Function(`return this`)();function Ru(e){return Lu.Buffer!==void 0&&Lu.Buffer.isBuffer(e)}function zu(e){return Number.isSafeInteger(e)&&e>=0}function Bu(e){return e!=null&&typeof e!=`function`&&zu(e.length)}function Vu(e){return e===`__proto__`}function Hu(e){return e==null||typeof e!=`object`&&typeof e!=`function`}function Uu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Wu(e,t){return Gu(e,void 0,e,new Map,t)}function Gu(e,t,n,r=new Map,i=void 0){let a=i?.(e,t,n,r);if(a!==void 0)return a;if(Hu(e))return e;if(r.has(e))return r.get(e);if(Array.isArray(e)){let t=Array(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Gu(e[a],a,n,r,i);return Object.hasOwn(e,`index`)&&(t.index=e.index),Object.hasOwn(e,`input`)&&(t.input=e.input),t}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let t=new RegExp(e.source,e.flags);return t.lastIndex=e.lastIndex,t}if(e instanceof Map){let t=new Map;r.set(e,t);for(let[a,o]of e)t.set(a,Gu(o,a,n,r,i));return t}if(e instanceof Set){let t=new Set;r.set(e,t);for(let a of e)t.add(Gu(a,void 0,n,r,i));return t}if(Ru(e))return e.subarray();if(Uu(e)){let t=new(Object.getPrototypeOf(e)).constructor(e.length);r.set(e,t);for(let a=0;a<e.length;a++)t[a]=Gu(e[a],a,n,r,i);return t}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let t=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return r.set(e,t),Ku(t,e,n,r,i),t}if(typeof File<`u`&&e instanceof File){let t=new File([e],e.name,{type:e.type});return r.set(e,t),Ku(t,e,n,r,i),t}if(typeof Blob<`u`&&e instanceof Blob){let t=new Blob([e],{type:e.type});return r.set(e,t),Ku(t,e,n,r,i),t}if(e instanceof Error){let t=structuredClone(e);return r.set(e,t),t.message=e.message,t.name=e.name,t.stack=e.stack,t.cause=e.cause,t.constructor=e.constructor,Ku(t,e,n,r,i),t}if(e instanceof Boolean){let t=new Boolean(e.valueOf());return r.set(e,t),Ku(t,e,n,r,i),t}if(e instanceof Number){let t=new Number(e.valueOf());return r.set(e,t),Ku(t,e,n,r,i),t}if(e instanceof String){let t=new String(e.valueOf());return r.set(e,t),Ku(t,e,n,r,i),t}if(typeof e==`object`&&qu(e)){let t=Object.create(Object.getPrototypeOf(e));return r.set(e,t),Ku(t,e,n,r,i),t}return e}function Ku(e,t,n=e,r,i){let a=[...Object.keys(t),...pu(t)];for(let o=0;o<a.length;o++){let s=a[o],c=Object.getOwnPropertyDescriptor(e,s);(c==null||c.writable)&&(e[s]=Gu(t[s],s,n,r,i))}}function qu(e){switch(mu(e)){case yu:case wu:case Tu:case Du:case vu:case xu:case Fu:case Iu:case Mu:case Nu:case Pu:case Su:case _u:case Eu:case hu:case Cu:case gu:case bu:case Ou:case ku:case Au:case ju:return!0;default:return!1}}function Ju(e,t){return Wu(e,(n,r,i,a)=>{let o=t?.(n,r,i,a);if(o!==void 0)return o;if(typeof e==`object`){if(mu(e)===`[object Object]`&&typeof e.constructor!=`function`){let t={};return a.set(e,t),Ku(t,e,i,a),t}switch(Object.prototype.toString.call(e)){case _u:case gu:case vu:{let t=new e.constructor(e?.valueOf());return Ku(t,e),t}case yu:{let t={};return Ku(t,e),t.length=e.length,t[Symbol.iterator]=e[Symbol.iterator],t}default:return}}})}function Yu(e){return Ju(e)}function Xu(e){return typeof e==`object`&&!!e&&mu(e)===`[object Arguments]`}function Zu(e){return typeof e==`object`&&!!e}function Qu(e){return Zu(e)&&Bu(e)}function $u(e,t){if(typeof e!=`function`||t!=null&&typeof t!=`function`)throw TypeError(`Expected a function`);let n=function(...r){let i=t?t.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);let o=e.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new($u.Cache||Map),n}$u.Cache=Map;function ed(e){return Uu(e)}function td(e){let t=e?.constructor;return e===(typeof t==`function`?t.prototype:Object.prototype)}function nd(e){if(Hu(e))return e;if(Array.isArray(e)||Uu(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<`u`&&e instanceof SharedArrayBuffer)return e.slice(0);let t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);let n=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new n(e);if(e instanceof RegExp){let t=new n(e);return t.lastIndex=e.lastIndex,t}if(e instanceof DataView)return new n(e.buffer.slice(0));if(e instanceof Error){let t;return t=e instanceof AggregateError?new n(e.errors,e.message,{cause:e.cause}):new n(e.message,{cause:e.cause}),t.stack=e.stack,Object.assign(t,e),t}return typeof File<`u`&&e instanceof File?new n([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e==`object`?Object.assign(Object.create(t),e):e}function rd(e,...t){let n=t.slice(0,-1),r=t[t.length-1],i=e;for(let e=0;e<n.length;e++){let t=n[e];i=id(i,t,r,new Map)}return i}function id(e,t,n,r){if(Hu(e)&&(e=Object(e)),typeof t!=`object`||!t)return e;if(r.has(t))return nd(r.get(t));if(r.set(t,e),Array.isArray(t)){t=t.slice();for(let e=0;e<t.length;e++)t[e]=t[e]??void 0}let i=[...Object.keys(t),...pu(t)];for(let a=0;a<i.length;a++){let o=i[a];if(Vu(o))continue;let s=t[o],c=e[o];if(Xu(s)&&(s={...s}),Xu(c)&&(c={...c}),Ru(s)&&(s=Yu(s)),Array.isArray(s))if(Array.isArray(c)){let e=[],t=Reflect.ownKeys(c);for(let n=0;n<t.length;n++){let r=t[n];e[r]=c[r]}c=e}else if(Qu(c)){let e=[];for(let t=0;t<c.length;t++)e[t]=c[t];c=e}else c=[];let l=n(c,s,o,e,t,r);l===void 0?Array.isArray(s)||Zu(c)&&Zu(s)&&(du(c)||du(s)||ed(c)||ed(s))?e[o]=id(c,s,n,r):c==null&&du(s)?e[o]=id({},s,n,r):c==null&&ed(s)?e[o]=Yu(s):(c===void 0||s!==void 0)&&(e[o]=s):e[o]=l}return e}function ad(e,...t){return rd(e,...t,fu)}function od(e){if(e==null)return!0;if(Bu(e))return typeof e.splice!=`function`&&typeof e!=`string`&&!Ru(e)&&!ed(e)&&!Xu(e)?!1:e.length===0;if(typeof e==`object`){if(e instanceof Map||e instanceof Set)return e.size===0;let t=Object.keys(e);return td(e)?t.filter(e=>e!==`constructor`).length===0:t.length===0}return!0}var sd=uu(),cd={curveBasis:bl,curveBasisClosed:Sl,curveBasisOpen:wl,curveBumpX:hl,curveBumpY:gl,curveBundle:El,curveCardinalClosed:jl,curveCardinalOpen:Nl,curveCardinal:kl,curveCatmullRomClosed:Rl,curveCatmullRomOpen:Bl,curveCatmullRom:Il,curveLinear:ul,curveLinearClosed:Hl,curveMonotoneX:Xl,curveMonotoneY:Zl,curveNatural:eu,curveStep:nu,curveStepAfter:iu,curveStepBefore:ru},ld=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ud=l(function(e,t){let n=dd(e,/(?:init\b)|(?:initialize\b)/),r={};if(Array.isArray(n)){let e=n.map(e=>e.args);un(e),r=Pt(r,[...e])}else r=n.args;if(!r)return;let i=kt(e,t),a=`config`;return r[a]!==void 0&&(i===`flowchart-v2`&&(i=`flowchart`),r[i]=r[a],delete r[a]),r},`detectInit`),dd=l(function(e,t=null){try{let n=RegExp(`[%]{2}(?![{]${ld.source})(?=[}][%]{2}).*
|
|
126
|
-
`,`ig`);e=e.trim().replace(n,``).replace(/'/gm,`"`),f.debug(`Detecting diagram directive${t===null?``:` type:`+t} based on the text:${e}`);let r,i=[];for(;(r=Tt.exec(e))!==null;)if(r.index===Tt.lastIndex&&Tt.lastIndex++,r&&!t||t&&r[1]?.match(t)||t&&r[2]?.match(t)){let e=r[1]?r[1]:r[2],t=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:e,args:t})}return i.length===0?{type:e,args:null}:i.length===1?i[0]:i}catch(n){return f.error(`ERROR: ${n.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},`detectDirective`),fd=l(function(e){return e.replace(Tt,``)},`removeDirectives`),pd=l(function(e,t){for(let[n,r]of t.entries())if(r.match(e))return n;return-1},`isSubstringInArray`);function md(e,t){return e?cd[`curve${e.charAt(0).toUpperCase()+e.slice(1)}`]??t:t}l(md,`interpolateToCurve`);function hd(e,t){let n=e.trim();if(n)return t.securityLevel===`loose`?n:(0,sd.sanitizeUrl)(n)}l(hd,`formatUrl`);var gd=l((e,...t)=>{let n=e.split(`.`),r=n.length-1,i=n[r],a=window;for(let t=0;t<r;t++)if(a=a[n[t]],!a){f.error(`Function name: ${e} not found in window`);return}a[i](...t)},`runFunc`);function _d(e,t){return!e||!t?0:Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2)}l(_d,`distance`);function vd(e){let t,n=0;return e.forEach(e=>{n+=_d(e,t),t=e}),xd(e,n/2)}l(vd,`traverseEdge`);function yd(e){return e.length===1?e[0]:vd(e)}l(yd,`calcLabelPosition`);var bd=l((e,t=2)=>{let n=10**t;return Math.round(e*n)/n},`roundNumber`),xd=l((e,t)=>{let n,r=t;for(let t of e){if(n){let e=_d(t,n);if(e===0)return n;if(e<r)r-=e;else{let i=r/e;if(i<=0)return n;if(i>=1)return{x:t.x,y:t.y};if(i>0&&i<1)return{x:bd((1-i)*n.x+i*t.x,5),y:bd((1-i)*n.y+i*t.y,5)}}}n=t}throw Error(`Could not find a suitable point for the given distance`)},`calculatePoint`),Sd=l((e,t,n)=>{f.info(`our points ${JSON.stringify(t)}`),t[0]!==n&&(t=t.reverse());let r=xd(t,25),i=e?10:5,a=Math.atan2(t[0].y-r.y,t[0].x-r.x),o={x:0,y:0};return o.x=Math.sin(a)*i+(t[0].x+r.x)/2,o.y=-Math.cos(a)*i+(t[0].y+r.y)/2,o},`calcCardinalityPosition`);function Cd(e,t,n){let r=structuredClone(n);f.info(`our points`,r),t!==`start_left`&&t!==`start_right`&&r.reverse();let i=xd(r,25+e),a=10+e*.5,o=Math.atan2(r[0].y-i.y,r[0].x-i.x),s={x:0,y:0};return t===`start_left`?(s.x=Math.sin(o+Math.PI)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o+Math.PI)*a+(r[0].y+i.y)/2):t===`end_right`?(s.x=Math.sin(o-Math.PI)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o-Math.PI)*a+(r[0].y+i.y)/2-5):t===`end_left`?(s.x=Math.sin(o)*a+(r[0].x+i.x)/2-5,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2-5):(s.x=Math.sin(o)*a+(r[0].x+i.x)/2,s.y=-Math.cos(o)*a+(r[0].y+i.y)/2),s}l(Cd,`calcTerminalLabelPosition`);function wd(e){let t=``,n=``;for(let r of e)r!==void 0&&(r.startsWith(`color:`)||r.startsWith(`text-align:`)?n=n+r+`;`:t=t+r+`;`);return{style:t,labelStyle:n}}l(wd,`getStylesFromArray`);var Td=0,Ed=l(()=>(Td++,`id-`+Math.random().toString(36).substr(2,12)+`-`+Td),`generateId`);function Dd(e){let t=``;for(let n=0;n<e;n++)t+=`0123456789abcdef`.charAt(Math.floor(Math.random()*16));return t}l(Dd,`makeRandomHex`);var Od=l(e=>Dd(e.length),`random`),kd=l(function(){return{x:0,y:0,fill:void 0,anchor:`start`,style:`#666`,width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:``}},`getTextObj`),Ad=l(function(e,t){let n=t.text.replace(ir.lineBreakRegex,` `),[,r]=Vd(t.fontSize),i=e.append(`text`);i.attr(`x`,t.x),i.attr(`y`,t.y),i.style(`text-anchor`,t.anchor),i.style(`font-family`,t.fontFamily),i.style(`font-size`,r),i.style(`font-weight`,t.fontWeight),i.attr(`fill`,t.fill),t.class!==void 0&&i.attr(`class`,t.class);let a=i.append(`tspan`);return a.attr(`x`,t.x+t.textMargin*2),a.attr(`fill`,t.fill),a.text(n),i},`drawSimpleText`),jd=$u((e,t,n)=>{if(!e||(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,joinWith:`<br/>`},n),ir.lineBreakRegex.test(e)))return e;let r=e.split(` `).filter(Boolean),i=[],a=``;return r.forEach((e,o)=>{let s=Pd(`${e} `,n),c=Pd(a,n);if(s>t){let{hyphenatedStrings:r,remainingWord:o}=Md(e,t,`-`,n);i.push(a,...r),a=o}else c+s>=t?(i.push(a),a=e):a=[a,e].filter(Boolean).join(` `);o+1===r.length&&i.push(a)}),i.filter(e=>e!==``).join(n.joinWith)},(e,t,n)=>`${e}${t}${n.fontSize}${n.fontWeight}${n.fontFamily}${n.joinWith}`),Md=$u((e,t,n=`-`,r)=>{r=Object.assign({fontSize:12,fontWeight:400,fontFamily:`Arial`,margin:0},r);let i=[...e],a=[],o=``;return i.forEach((e,s)=>{let c=`${o}${e}`;if(Pd(c,r)>=t){let e=s+1,t=i.length===e,r=`${c}${n}`;a.push(t?c:r),o=``}else o=c}),{hyphenatedStrings:a,remainingWord:o}},(e,t,n=`-`,r)=>`${e}${t}${n}${r.fontSize}${r.fontWeight}${r.fontFamily}`);function Nd(e,t){return Fd(e,t).height}l(Nd,`calculateTextHeight`);function Pd(e,t){return Fd(e,t).width}l(Pd,`calculateTextWidth`);var Fd=$u((e,t)=>{let{fontSize:n=12,fontFamily:r=`Arial`,fontWeight:i=400}=t;if(!e)return{width:0,height:0};let[,a]=Vd(n),o=[`sans-serif`,r],s=e.split(ir.lineBreakRegex),c=[],l=B(`body`);if(!l.remove)return{width:0,height:0,lineHeight:0};let u=l.append(`svg`);for(let e of o){let t=0,n={width:0,height:0,lineHeight:0};for(let r of s){let o=kd();o.text=r||``;let s=Ad(u,o).style(`font-size`,a).style(`font-weight`,i).style(`font-family`,e),c=(s._groups||s)[0][0].getBBox();if(c.width===0&&c.height===0)throw Error(`svg element not in render tree`);n.width=Math.round(Math.max(n.width,c.width)),t=Math.round(c.height),n.height+=t,n.lineHeight=Math.round(Math.max(n.lineHeight,t))}c.push(n)}return u.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),Id=class{constructor(e=!1,t){this.count=0,this.count=t?t.length:0,this.next=e?()=>this.count++:()=>Date.now()}static{l(this,`InitIDGenerator`)}},Ld,Rd=l(function(e){return Ld||=document.createElement(`div`),e=escape(e).replace(/%26/g,`&`).replace(/%23/g,`#`).replace(/%3B/g,`;`),Ld.innerHTML=e,unescape(Ld.textContent)},`entityDecode`);function zd(e){return`str`in e}l(zd,`isDetailedError`);var Bd=l((e,t,n,r)=>{if(!r)return;let i=e.node()?.getBBox();i&&e.append(`text`).text(r).attr(`text-anchor`,`middle`).attr(`x`,i.x+i.width/2).attr(`y`,-n).attr(`class`,t)},`insertTitle`),Vd=l(e=>{if(typeof e==`number`)return[e,e+`px`];let t=parseInt(e??``,10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+`px`]:[t,e]},`parseFontSize`);function Hd(e,t){return ad({},e,t)}l(Hd,`cleanAndMerge`);var Ud={assignWithDepth:Pt,wrapLabel:jd,calculateTextHeight:Nd,calculateTextWidth:Pd,calculateTextDimensions:Fd,cleanAndMerge:Hd,detectInit:ud,detectDirective:dd,isSubstringInArray:pd,interpolateToCurve:md,calcLabelPosition:yd,calcCardinalityPosition:Sd,calcTerminalLabelPosition:Cd,formatUrl:hd,getStylesFromArray:wd,generateId:Ed,random:Od,runFunc:gd,entityDecode:Rd,insertTitle:Bd,isLabelCoordinateInPath:Jd,parseFontSize:Vd,InitIDGenerator:Id},Wd=l(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(e){return e.substring(0,e.length-1)}),t=t.replace(/#\w+;/g,function(e){let t=e.substring(1,e.length-1);return/^\+?\d+$/.test(t)?`fl°°`+t+`¶ß`:`fl°`+t+`¶ß`}),t},`encodeEntities`),Gd=l(function(e){return e.replace(/fl°°/g,`&#`).replace(/fl°/g,`&`).replace(/¶ß/g,`;`)},`decodeEntities`),Kd=l((e,t,{counter:n=0,prefix:r,suffix:i},a)=>a||`${r?`${r}_`:``}${e}_${t}_${n}${i?`_${i}`:``}`,`getEdgeId`);function qd(e){return e??null}l(qd,`handleUndefinedAttr`);function Jd(e,t){let n=Math.round(e.x),r=Math.round(e.y),i=t.replace(/(\d+\.\d+)/g,e=>Math.round(parseFloat(e)).toString());return i.includes(n.toString())||i.includes(r.toString())}l(Jd,`isLabelCoordinateInPath`);var Yd=Object.freeze({left:0,top:0,width:16,height:16}),Xd=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Zd=Object.freeze({...Yd,...Xd}),Qd=Object.freeze({...Zd,body:``,hidden:!1}),$d=Object.freeze({width:null,height:null}),ef=Object.freeze({...$d,...Xd}),tf=(e,t,n,r=``)=>{let i=e.split(`:`);if(e.slice(0,1)===`@`){if(i.length<2||i.length>3)return null;r=i.shift().slice(1)}if(i.length>3||!i.length)return null;if(i.length>1){let e=i.pop(),n=i.pop(),a={provider:i.length>0?i[0]:r,prefix:n,name:e};return t&&!nf(a)?null:a}let a=i[0],o=a.split(`-`);if(o.length>1){let e={provider:r,prefix:o.shift(),name:o.join(`-`)};return t&&!nf(e)?null:e}if(n&&r===``){let e={provider:r,prefix:``,name:a};return t&&!nf(e,n)?null:e}return null},nf=(e,t)=>e?!!((t&&e.prefix===``||e.prefix)&&e.name):!1;function rf(e,t){let n={};!e.hFlip!=!t.hFlip&&(n.hFlip=!0),!e.vFlip!=!t.vFlip&&(n.vFlip=!0);let r=((e.rotate||0)+(t.rotate||0))%4;return r&&(n.rotate=r),n}function af(e,t){let n=rf(e,t);for(let r in Qd)r in Xd?r in e&&!(r in n)&&(n[r]=Xd[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}function of(e,t){let n=e.icons,r=e.aliases||Object.create(null),i=Object.create(null);function a(e){if(n[e])return i[e]=[];if(!(e in i)){i[e]=null;let t=r[e]&&r[e].parent,n=t&&a(t);n&&(i[e]=[t].concat(n))}return i[e]}return(t||Object.keys(n).concat(Object.keys(r))).forEach(a),i}function sf(e,t,n){let r=e.icons,i=e.aliases||Object.create(null),a={};function o(e){a=af(r[e]||i[e],a)}return o(t),n.forEach(o),af(e,a)}function cf(e,t){if(e.icons[t])return sf(e,t,[]);let n=of(e,[t])[t];return n?sf(e,t,n):null}var lf=/(-?[0-9.]*[0-9]+[0-9.]*)/g,uf=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function df(e,t,n){if(t===1)return e;if(n||=100,typeof e==`number`)return Math.ceil(e*t*n)/n;if(typeof e!=`string`)return e;let r=e.split(lf);if(r===null||!r.length)return e;let i=[],a=r.shift(),o=uf.test(a);for(;;){if(o){let e=parseFloat(a);isNaN(e)?i.push(a):i.push(Math.ceil(e*t*n)/n)}else i.push(a);if(a=r.shift(),a===void 0)return i.join(``);o=!o}}function ff(e,t=`defs`){let n=``,r=e.indexOf(`<`+t);for(;r>=0;){let i=e.indexOf(`>`,r),a=e.indexOf(`</`+t);if(i===-1||a===-1)break;let o=e.indexOf(`>`,a);if(o===-1)break;n+=e.slice(i+1,a).trim(),e=e.slice(0,r).trim()+e.slice(o+1)}return{defs:n,content:e}}function pf(e,t){return e?`<defs>`+e+`</defs>`+t:t}function mf(e,t,n){let r=ff(e);return pf(r.defs,t+r.content+n)}var hf=e=>e===`unset`||e===`undefined`||e===`none`;function gf(e,t){let n={...Zd,...e},r={...ef,...t},i={left:n.left,top:n.top,width:n.width,height:n.height},a=n.body;[n,r].forEach(e=>{let t=[],n=e.hFlip,r=e.vFlip,o=e.rotate;n?r?o+=2:(t.push(`translate(`+(i.width+i.left).toString()+` `+(0-i.top).toString()+`)`),t.push(`scale(-1 1)`),i.top=i.left=0):r&&(t.push(`translate(`+(0-i.left).toString()+` `+(i.height+i.top).toString()+`)`),t.push(`scale(1 -1)`),i.top=i.left=0);let s;switch(o<0&&(o-=Math.floor(o/4)*4),o%=4,o){case 1:s=i.height/2+i.top,t.unshift(`rotate(90 `+s.toString()+` `+s.toString()+`)`);break;case 2:t.unshift(`rotate(180 `+(i.width/2+i.left).toString()+` `+(i.height/2+i.top).toString()+`)`);break;case 3:s=i.width/2+i.left,t.unshift(`rotate(-90 `+s.toString()+` `+s.toString()+`)`);break}o%2==1&&(i.left!==i.top&&(s=i.left,i.left=i.top,i.top=s),i.width!==i.height&&(s=i.width,i.width=i.height,i.height=s)),t.length&&(a=mf(a,`<g transform="`+t.join(` `)+`">`,`</g>`))});let o=r.width,s=r.height,c=i.width,l=i.height,u,d;o===null?(d=s===null?`1em`:s===`auto`?l:s,u=df(d,c/l)):(u=o===`auto`?c:o,d=s===null?df(u,l/c):s===`auto`?l:s);let f={},p=(e,t)=>{hf(t)||(f[e]=t.toString())};p(`width`,u),p(`height`,d);let m=[i.left,i.top,c,l];return f.viewBox=m.join(` `),{attributes:f,viewBox:m,body:a}}var _f=/\sid="(\S+)"/g,vf=new Map;function yf(e){e=e.replace(/[0-9]+$/,``)||`a`;let t=vf.get(e)||0;return vf.set(e,t+1),t?`${e}${t}`:e}function bf(e){let t=[],n;for(;n=_f.exec(e);)t.push(n[1]);if(!t.length)return e;let r=`suffix`+(Math.random()*16777216|Date.now()).toString(16);return t.forEach(t=>{let n=yf(t),i=t.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`);e=e.replace(RegExp(`([#;"])(`+i+`)([")]|\\.[a-z])`,`g`),`$1`+n+r+`$3`)}),e=e.replace(new RegExp(r,`g`),``),e}function xf(e,t){let n=e.indexOf(`xlink:`)===-1?``:` xmlns:xlink="http://www.w3.org/1999/xlink"`;for(let e in t)n+=` `+e+`="`+t[e]+`"`;return`<svg xmlns="http://www.w3.org/2000/svg"`+n+`>`+e+`</svg>`}function Sf(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Cf=Sf();function wf(e){Cf=e}var Tf={exec:()=>null};function V(e,t=``){let n=typeof e==`string`?e:e.source,r={replace:(e,t)=>{let i=typeof t==`string`?t:t.source;return i=i.replace(Df.caret,`$1`),n=n.replace(e,i),r},getRegex:()=>new RegExp(n,t)};return r}var Ef=(()=>{try{return!0}catch{return!1}})(),Df={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,`i`)},Of=/^(?:[ \t]*(?:\n|$))+/,kf=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Af=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,jf=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Mf=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,Nf=/(?:[*+-]|\d{1,9}[.)])/,Pf=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Ff=V(Pf).replace(/bull/g,Nf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,``).getRegex(),If=V(Pf).replace(/bull/g,Nf).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),Lf=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,Rf=/^[^\n]+/,zf=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,Bf=V(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace(`label`,zf).replace(`title`,/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Vf=V(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,Nf).getRegex(),Hf=`address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul`,Uf=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Wf=V(`^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ ]*)+\\n|$))`,`i`).replace(`comment`,Uf).replace(`tag`,Hf).replace(`attribute`,/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Gf=V(Lf).replace(`hr`,jf).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Hf).getRegex(),Kf={blockquote:V(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace(`paragraph`,Gf).getRegex(),code:kf,def:Bf,fences:Af,heading:Mf,hr:jf,html:Wf,lheading:Ff,list:Vf,newline:Of,paragraph:Gf,table:Tf,text:Rf},qf=V(`^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)`).replace(`hr`,jf).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`blockquote`,` {0,3}>`).replace(`code`,`(?: {4}| {0,3} )[^\\n]`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Hf).getRegex(),Jf={...Kf,lheading:If,table:qf,paragraph:V(Lf).replace(`hr`,jf).replace(`heading`,` {0,3}#{1,6}(?:\\s|$)`).replace(`|lheading`,``).replace(`table`,qf).replace(`blockquote`,` {0,3}>`).replace(`fences`," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace(`list`,` {0,3}(?:[*+-]|1[.)]) `).replace(`html`,`</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)`).replace(`tag`,Hf).getRegex()},Yf={...Kf,html:V(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace(`comment`,Uf).replace(/tag/g,`(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b`).getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:Tf,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:V(Lf).replace(`hr`,jf).replace(`heading`,` *#{1,6} *[^
|
|
127
|
-
]`).replace(`lheading`,Ff).replace(`|table`,``).replace(`blockquote`,` {0,3}>`).replace(`|fences`,``).replace(`|list`,``).replace(`|html`,``).replace(`|tag`,``).getRegex()},Xf=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Zf=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Qf=/^( {2,}|\\)\n(?!\s*$)/,$f=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,ep=/[\p{P}\p{S}]/u,tp=/[\s\p{P}\p{S}]/u,np=/[^\s\p{P}\p{S}]/u,rp=V(/^((?![*_])punctSpace)/,`u`).replace(/punctSpace/g,tp).getRegex(),ip=/(?!~)[\p{P}\p{S}]/u,ap=/(?!~)[\s\p{P}\p{S}]/u,op=/(?:[^\s\p{P}\p{S}]|~)/u,sp=V(/link|precode-code|html/,`g`).replace(`link`,/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace(`precode-`,Ef?"(?<!`)()":"(^^|[^`])").replace(`code`,/(?<b>`+)[^`]+\k<b>(?!`)/).replace(`html`,/<(?! )[^<>]*?>/).getRegex(),cp=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,lp=V(cp,`u`).replace(/punct/g,ep).getRegex(),up=V(cp,`u`).replace(/punct/g,ip).getRegex(),dp=`^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)`,fp=V(dp,`gu`).replace(/notPunctSpace/g,np).replace(/punctSpace/g,tp).replace(/punct/g,ep).getRegex(),pp=V(dp,`gu`).replace(/notPunctSpace/g,op).replace(/punctSpace/g,ap).replace(/punct/g,ip).getRegex(),mp=V(`^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)`,`gu`).replace(/notPunctSpace/g,np).replace(/punctSpace/g,tp).replace(/punct/g,ep).getRegex(),hp=V(/\\(punct)/,`gu`).replace(/punct/g,ep).getRegex(),gp=V(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace(`scheme`,/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace(`email`,/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),_p=V(Uf).replace(`(?:-->|$)`,`-->`).getRegex(),vp=V(`^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>`).replace(`comment`,_p).replace(`attribute`,/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),yp=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,bp=V(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace(`label`,yp).replace(`href`,/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace(`title`,/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),xp=V(/^!?\[(label)\]\[(ref)\]/).replace(`label`,yp).replace(`ref`,zf).getRegex(),Sp=V(/^!?\[(ref)\](?:\[\])?/).replace(`ref`,zf).getRegex(),Cp=V(`reflink|nolink(?!\\()`,`g`).replace(`reflink`,xp).replace(`nolink`,Sp).getRegex(),wp=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,Tp={_backpedal:Tf,anyPunctuation:hp,autolink:gp,blockSkip:sp,br:Qf,code:Zf,del:Tf,emStrongLDelim:lp,emStrongRDelimAst:fp,emStrongRDelimUnd:mp,escape:Xf,link:bp,nolink:Sp,punctuation:rp,reflink:xp,reflinkSearch:Cp,tag:vp,text:$f,url:Tf},Ep={...Tp,link:V(/^!?\[(label)\]\((.*?)\)/).replace(`label`,yp).getRegex(),reflink:V(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace(`label`,yp).getRegex()},Dp={...Tp,emStrongRDelimAst:pp,emStrongLDelim:up,url:V(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace(`protocol`,wp).replace(`email`,/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:V(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace(`protocol`,wp).getRegex()},Op={...Dp,br:V(Qf).replace(`{2,}`,`*`).getRegex(),text:V(Dp.text).replace(`\\b_`,`\\b_| {2,}\\n`).replace(/\{2,\}/g,`*`).getRegex()},kp={normal:Kf,gfm:Jf,pedantic:Yf},Ap={normal:Tp,gfm:Dp,breaks:Op,pedantic:Ep},jp={"&":`&`,"<":`<`,">":`>`,'"':`"`,"'":`'`},Mp=e=>jp[e];function Np(e,t){if(t){if(Df.escapeTest.test(e))return e.replace(Df.escapeReplace,Mp)}else if(Df.escapeTestNoEncode.test(e))return e.replace(Df.escapeReplaceNoEncode,Mp);return e}function Pp(e){try{e=encodeURI(e).replace(Df.percentDecode,`%`)}catch{return null}return e}function Fp(e,t){let n=e.replace(Df.findPipe,(e,t,n)=>{let r=!1,i=t;for(;--i>=0&&n[i]===`\\`;)r=!r;return r?`|`:` |`}).split(Df.splitPipe),r=0;if(n[0].trim()||n.shift(),n.length>0&&!n.at(-1)?.trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length<t;)n.push(``);for(;r<n.length;r++)n[r]=n[r].trim().replace(Df.slashPipe,`|`);return n}function Ip(e,t,n){let r=e.length;if(r===0)return``;let i=0;for(;i<r;){let a=e.charAt(r-i-1);if(a===t&&!n)i++;else if(a!==t&&n)i++;else break}return e.slice(0,r-i)}function Lp(e,t){if(e.indexOf(t[1])===-1)return-1;let n=0;for(let r=0;r<e.length;r++)if(e[r]===`\\`)r++;else if(e[r]===t[0])n++;else if(e[r]===t[1]&&(n--,n<0))return r;return n>0?-2:-1}function Rp(e,t,n,r,i){let a=t.href,o=t.title||null,s=e[1].replace(i.other.outputLinkReplace,`$1`);r.state.inLink=!0;let c={type:e[0].charAt(0)===`!`?`image`:`link`,raw:n,href:a,title:o,text:s,tokens:r.inlineTokens(s)};return r.state.inLink=!1,c}function zp(e,t,n){let r=e.match(n.other.indentCodeCompensation);if(r===null)return t;let i=r[1];return t.split(`
|
|
128
|
-
`).map(e=>{let t=e.match(n.other.beginningSpace);if(t===null)return e;let[r]=t;return r.length>=i.length?e.slice(i.length):e}).join(`
|
|
129
|
-
`)}var Bp=class{options;rules;lexer;constructor(e){this.options=e||Cf}space(e){let t=this.rules.block.newline.exec(e);if(t&&t[0].length>0)return{type:`space`,raw:t[0]}}code(e){let t=this.rules.block.code.exec(e);if(t){let e=t[0].replace(this.rules.other.codeRemoveIndent,``);return{type:`code`,raw:t[0],codeBlockStyle:`indented`,text:this.options.pedantic?e:Ip(e,`
|
|
130
|
-
`)}}}fences(e){let t=this.rules.block.fences.exec(e);if(t){let e=t[0],n=zp(e,t[3]||``,this.rules);return{type:`code`,raw:e,lang:t[2]?t[2].trim().replace(this.rules.inline.anyPunctuation,`$1`):t[2],text:n}}}heading(e){let t=this.rules.block.heading.exec(e);if(t){let e=t[2].trim();if(this.rules.other.endingHash.test(e)){let t=Ip(e,`#`);(this.options.pedantic||!t||this.rules.other.endingSpaceChar.test(t))&&(e=t.trim())}return{type:`heading`,raw:t[0],depth:t[1].length,text:e,tokens:this.lexer.inline(e)}}}hr(e){let t=this.rules.block.hr.exec(e);if(t)return{type:`hr`,raw:Ip(t[0],`
|
|
131
|
-
`)}}blockquote(e){let t=this.rules.block.blockquote.exec(e);if(t){let e=Ip(t[0],`
|
|
132
|
-
`).split(`
|
|
133
|
-
`),n=``,r=``,i=[];for(;e.length>0;){let t=!1,a=[],o;for(o=0;o<e.length;o++)if(this.rules.other.blockquoteStart.test(e[o]))a.push(e[o]),t=!0;else if(!t)a.push(e[o]);else break;e=e.slice(o);let s=a.join(`
|
|
134
|
-
`),c=s.replace(this.rules.other.blockquoteSetextReplace,`
|
|
135
|
-
$1`).replace(this.rules.other.blockquoteSetextReplace2,``);n=n?`${n}
|
|
136
|
-
${s}`:s,r=r?`${r}
|
|
137
|
-
${c}`:c;let l=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(c,i,!0),this.lexer.state.top=l,e.length===0)break;let u=i.at(-1);if(u?.type===`code`)break;if(u?.type===`blockquote`){let t=u,a=t.raw+`
|
|
138
|
-
`+e.join(`
|
|
139
|
-
`),o=this.blockquote(a);i[i.length-1]=o,n=n.substring(0,n.length-t.raw.length)+o.raw,r=r.substring(0,r.length-t.text.length)+o.text;break}else if(u?.type===`list`){let t=u,a=t.raw+`
|
|
140
|
-
`+e.join(`
|
|
141
|
-
`),o=this.list(a);i[i.length-1]=o,n=n.substring(0,n.length-u.raw.length)+o.raw,r=r.substring(0,r.length-t.raw.length)+o.raw,e=a.substring(i.at(-1).raw.length).split(`
|
|
142
|
-
`);continue}}return{type:`blockquote`,raw:n,tokens:i,text:r}}}list(e){let t=this.rules.block.list.exec(e);if(t){let n=t[1].trim(),r=n.length>1,i={type:`list`,raw:``,ordered:r,start:r?+n.slice(0,-1):``,loose:!1,items:[]};n=r?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=r?n:`[*+-]`);let a=this.rules.other.listItemRegex(n),o=!1;for(;e;){let n=!1,r=``,s=``;if(!(t=a.exec(e))||this.rules.block.hr.test(e))break;r=t[0],e=e.substring(r.length);let c=t[2].split(`
|
|
143
|
-
`,1)[0].replace(this.rules.other.listReplaceTabs,e=>` `.repeat(3*e.length)),l=e.split(`
|
|
144
|
-
`,1)[0],u=!c.trim(),d=0;if(this.options.pedantic?(d=2,s=c.trimStart()):u?d=t[1].length+1:(d=t[2].search(this.rules.other.nonSpaceChar),d=d>4?1:d,s=c.slice(d),d+=t[1].length),u&&this.rules.other.blankLine.test(l)&&(r+=l+`
|
|
145
|
-
`,e=e.substring(l.length+1),n=!0),!n){let t=this.rules.other.nextBulletRegex(d),n=this.rules.other.hrRegex(d),i=this.rules.other.fencesBeginRegex(d),a=this.rules.other.headingBeginRegex(d),o=this.rules.other.htmlBeginRegex(d);for(;e;){let f=e.split(`
|
|
146
|
-
`,1)[0],p;if(l=f,this.options.pedantic?(l=l.replace(this.rules.other.listReplaceNesting,` `),p=l):p=l.replace(this.rules.other.tabCharGlobal,` `),i.test(l)||a.test(l)||o.test(l)||t.test(l)||n.test(l))break;if(p.search(this.rules.other.nonSpaceChar)>=d||!l.trim())s+=`
|
|
147
|
-
`+p.slice(d);else{if(u||c.replace(this.rules.other.tabCharGlobal,` `).search(this.rules.other.nonSpaceChar)>=4||i.test(c)||a.test(c)||n.test(c))break;s+=`
|
|
148
|
-
`+l}!u&&!l.trim()&&(u=!0),r+=f+`
|
|
149
|
-
`,e=e.substring(f.length+1),c=p.slice(d)}}i.loose||(o?i.loose=!0:this.rules.other.doubleBlankLine.test(r)&&(o=!0));let f=null,p;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(p=f[0]!==`[ ] `,s=s.replace(this.rules.other.listReplaceTask,``))),i.items.push({type:`list_item`,raw:r,task:!!f,checked:p,loose:!1,text:s,tokens:[]}),i.raw+=r}let s=i.items.at(-1);if(s)s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd();else return;i.raw=i.raw.trimEnd();for(let e=0;e<i.items.length;e++)if(this.lexer.state.top=!1,i.items[e].tokens=this.lexer.blockTokens(i.items[e].text,[]),!i.loose){let t=i.items[e].tokens.filter(e=>e.type===`space`);i.loose=t.length>0&&t.some(e=>this.rules.other.anyLine.test(e.raw))}if(i.loose)for(let e=0;e<i.items.length;e++)i.items[e].loose=!0;return i}}html(e){let t=this.rules.block.html.exec(e);if(t)return{type:`html`,block:!0,raw:t[0],pre:t[1]===`pre`||t[1]===`script`||t[1]===`style`,text:t[0]}}def(e){let t=this.rules.block.def.exec(e);if(t){let e=t[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal,` `),n=t[2]?t[2].replace(this.rules.other.hrefBrackets,`$1`).replace(this.rules.inline.anyPunctuation,`$1`):``,r=t[3]?t[3].substring(1,t[3].length-1).replace(this.rules.inline.anyPunctuation,`$1`):t[3];return{type:`def`,tag:e,raw:t[0],href:n,title:r}}}table(e){let t=this.rules.block.table.exec(e);if(!t||!this.rules.other.tableDelimiter.test(t[2]))return;let n=Fp(t[1]),r=t[2].replace(this.rules.other.tableAlignChars,``).split(`|`),i=t[3]?.trim()?t[3].replace(this.rules.other.tableRowBlankLine,``).split(`
|
|
150
|
-
`):[],a={type:`table`,raw:t[0],header:[],align:[],rows:[]};if(n.length===r.length){for(let e of r)this.rules.other.tableAlignRight.test(e)?a.align.push(`right`):this.rules.other.tableAlignCenter.test(e)?a.align.push(`center`):this.rules.other.tableAlignLeft.test(e)?a.align.push(`left`):a.align.push(null);for(let e=0;e<n.length;e++)a.header.push({text:n[e],tokens:this.lexer.inline(n[e]),header:!0,align:a.align[e]});for(let e of i)a.rows.push(Fp(e,a.header.length).map((e,t)=>({text:e,tokens:this.lexer.inline(e),header:!1,align:a.align[t]})));return a}}lheading(e){let t=this.rules.block.lheading.exec(e);if(t)return{type:`heading`,raw:t[0],depth:t[2].charAt(0)===`=`?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(e){let t=this.rules.block.paragraph.exec(e);if(t){let e=t[1].charAt(t[1].length-1)===`
|
|
151
|
-
`?t[1].slice(0,-1):t[1];return{type:`paragraph`,raw:t[0],text:e,tokens:this.lexer.inline(e)}}}text(e){let t=this.rules.block.text.exec(e);if(t)return{type:`text`,raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(e){let t=this.rules.inline.escape.exec(e);if(t)return{type:`escape`,raw:t[0],text:t[1]}}tag(e){let t=this.rules.inline.tag.exec(e);if(t)return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:`html`,raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(e){let t=this.rules.inline.link.exec(e);if(t){let e=t[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(e)){if(!this.rules.other.endAngleBracket.test(e))return;let t=Ip(e.slice(0,-1),`\\`);if((e.length-t.length)%2==0)return}else{let e=Lp(t[2],`()`);if(e===-2)return;if(e>-1){let n=(t[0].indexOf(`!`)===0?5:4)+t[1].length+e;t[2]=t[2].substring(0,e),t[0]=t[0].substring(0,n).trim(),t[3]=``}}let n=t[2],r=``;if(this.options.pedantic){let e=this.rules.other.pedanticHrefTitle.exec(n);e&&(n=e[1],r=e[3])}else r=t[3]?t[3].slice(1,-1):``;return n=n.trim(),this.rules.other.startAngleBracket.test(n)&&(n=this.options.pedantic&&!this.rules.other.endAngleBracket.test(e)?n.slice(1):n.slice(1,-1)),Rp(t,{href:n&&n.replace(this.rules.inline.anyPunctuation,`$1`),title:r&&r.replace(this.rules.inline.anyPunctuation,`$1`)},t[0],this.lexer,this.rules)}}reflink(e,t){let n;if((n=this.rules.inline.reflink.exec(e))||(n=this.rules.inline.nolink.exec(e))){let e=t[(n[2]||n[1]).replace(this.rules.other.multipleSpaceGlobal,` `).toLowerCase()];if(!e){let e=n[0].charAt(0);return{type:`text`,raw:e,text:e}}return Rp(n,e,n[0],this.lexer,this.rules)}}emStrong(e,t,n=``){let r=this.rules.inline.emStrongLDelim.exec(e);if(!(!r||r[3]&&n.match(this.rules.other.unicodeAlphaNumeric))&&(!(r[1]||r[2])||!n||this.rules.inline.punctuation.exec(n))){let n=[...r[0]].length-1,i,a,o=n,s=0,c=r[0][0]===`*`?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(c.lastIndex=0,t=t.slice(-1*e.length+n);(r=c.exec(t))!=null;){if(i=r[1]||r[2]||r[3]||r[4]||r[5]||r[6],!i)continue;if(a=[...i].length,r[3]||r[4]){o+=a;continue}else if((r[5]||r[6])&&n%3&&!((n+a)%3)){s+=a;continue}if(o-=a,o>0)continue;a=Math.min(a,a+o+s);let t=[...r[0]][0].length,c=e.slice(0,n+r.index+t+a);if(Math.min(n,a)%2){let e=c.slice(1,-1);return{type:`em`,raw:c,text:e,tokens:this.lexer.inlineTokens(e)}}let l=c.slice(2,-2);return{type:`strong`,raw:c,text:l,tokens:this.lexer.inlineTokens(l)}}}}codespan(e){let t=this.rules.inline.code.exec(e);if(t){let e=t[2].replace(this.rules.other.newLineCharGlobal,` `),n=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return n&&r&&(e=e.substring(1,e.length-1)),{type:`codespan`,raw:t[0],text:e}}}br(e){let t=this.rules.inline.br.exec(e);if(t)return{type:`br`,raw:t[0]}}del(e){let t=this.rules.inline.del.exec(e);if(t)return{type:`del`,raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(e){let t=this.rules.inline.autolink.exec(e);if(t){let e,n;return t[2]===`@`?(e=t[1],n=`mailto:`+e):(e=t[1],n=e),{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}url(e){let t;if(t=this.rules.inline.url.exec(e)){let e,n;if(t[2]===`@`)e=t[0],n=`mailto:`+e;else{let r;do r=t[0],t[0]=this.rules.inline._backpedal.exec(t[0])?.[0]??``;while(r!==t[0]);e=t[0],n=t[1]===`www.`?`http://`+t[0]:t[0]}return{type:`link`,raw:t[0],text:e,href:n,tokens:[{type:`text`,raw:e,text:e}]}}}inlineText(e){let t=this.rules.inline.text.exec(e);if(t){let e=this.lexer.state.inRawBlock;return{type:`text`,raw:t[0],text:t[0],escaped:e}}}},Vp=class e{tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||Cf,this.options.tokenizer=this.options.tokenizer||new Bp,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let t={other:Df,block:kp.normal,inline:Ap.normal};this.options.pedantic?(t.block=kp.pedantic,t.inline=Ap.pedantic):this.options.gfm&&(t.block=kp.gfm,this.options.breaks?t.inline=Ap.breaks:t.inline=Ap.gfm),this.tokenizer.rules=t}static get rules(){return{block:kp,inline:Ap}}static lex(t,n){return new e(n).lex(t)}static lexInline(t,n){return new e(n).inlineTokens(t)}lex(e){e=e.replace(Df.carriageReturn,`
|
|
152
|
-
`),this.blockTokens(e,this.tokens);for(let e=0;e<this.inlineQueue.length;e++){let t=this.inlineQueue[e];this.inlineTokens(t.src,t.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(e,t=[],n=!1){for(this.options.pedantic&&(e=e.replace(Df.tabCharGlobal,` `).replace(Df.spaceLine,``));e;){let r;if(this.options.extensions?.block?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.space(e)){e=e.substring(r.raw.length);let n=t.at(-1);r.raw.length===1&&n!==void 0?n.raw+=`
|
|
153
|
-
`:t.push(r);continue}if(r=this.tokenizer.code(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
154
|
-
`)?``:`
|
|
155
|
-
`)+r.raw,n.text+=`
|
|
156
|
-
`+r.text,this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(r=this.tokenizer.fences(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.heading(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.hr(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.blockquote(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.list(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.html(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.def(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`paragraph`||n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
157
|
-
`)?``:`
|
|
158
|
-
`)+r.raw,n.text+=`
|
|
159
|
-
`+r.raw,this.inlineQueue.at(-1).src=n.text):this.tokens.links[r.tag]||(this.tokens.links[r.tag]={href:r.href,title:r.title},t.push(r));continue}if(r=this.tokenizer.table(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.lheading(e)){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startBlock){let t=1/0,n=e.slice(1),r;this.options.extensions.startBlock.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(this.state.top&&(r=this.tokenizer.paragraph(i))){let a=t.at(-1);n&&a?.type===`paragraph`?(a.raw+=(a.raw.endsWith(`
|
|
160
|
-
`)?``:`
|
|
161
|
-
`)+r.raw,a.text+=`
|
|
162
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):t.push(r),n=i.length!==e.length,e=e.substring(r.raw.length);continue}if(r=this.tokenizer.text(e)){e=e.substring(r.raw.length);let n=t.at(-1);n?.type===`text`?(n.raw+=(n.raw.endsWith(`
|
|
163
|
-
`)?``:`
|
|
164
|
-
`)+r.raw,n.text+=`
|
|
165
|
-
`+r.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=n.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return this.state.top=!0,t}inline(e,t=[]){return this.inlineQueue.push({src:e,tokens:t}),t}inlineTokens(e,t=[]){let n=e,r=null;if(this.tokens.links){let e=Object.keys(this.tokens.links);if(e.length>0)for(;(r=this.tokenizer.rules.inline.reflinkSearch.exec(n))!=null;)e.includes(r[0].slice(r[0].lastIndexOf(`[`)+1,-1))&&(n=n.slice(0,r.index)+`[`+`a`.repeat(r[0].length-2)+`]`+n.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(r=this.tokenizer.rules.inline.anyPunctuation.exec(n))!=null;)n=n.slice(0,r.index)+`++`+n.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);let i;for(;(r=this.tokenizer.rules.inline.blockSkip.exec(n))!=null;)i=r[2]?r[2].length:0,n=n.slice(0,r.index+i)+`[`+`a`.repeat(r[0].length-i-2)+`]`+n.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);n=this.options.hooks?.emStrongMask?.call({lexer:this},n)??n;let a=!1,o=``;for(;e;){a||(o=``),a=!1;let r;if(this.options.extensions?.inline?.some(n=>(r=n.call({lexer:this},e,t))?(e=e.substring(r.raw.length),t.push(r),!0):!1))continue;if(r=this.tokenizer.escape(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.tag(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.link(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.reflink(e,this.tokens.links)){e=e.substring(r.raw.length);let n=t.at(-1);r.type===`text`&&n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(r=this.tokenizer.emStrong(e,n,o)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.codespan(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.br(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.del(e)){e=e.substring(r.raw.length),t.push(r);continue}if(r=this.tokenizer.autolink(e)){e=e.substring(r.raw.length),t.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(e))){e=e.substring(r.raw.length),t.push(r);continue}let i=e;if(this.options.extensions?.startInline){let t=1/0,n=e.slice(1),r;this.options.extensions.startInline.forEach(e=>{r=e.call({lexer:this},n),typeof r==`number`&&r>=0&&(t=Math.min(t,r))}),t<1/0&&t>=0&&(i=e.substring(0,t+1))}if(r=this.tokenizer.inlineText(i)){e=e.substring(r.raw.length),r.raw.slice(-1)!==`_`&&(o=r.raw.slice(-1)),a=!0;let n=t.at(-1);n?.type===`text`?(n.raw+=r.raw,n.text+=r.text):t.push(r);continue}if(e){let t=`Infinite loop on byte: `+e.charCodeAt(0);if(this.options.silent){console.error(t);break}else throw Error(t)}}return t}},Hp=class{options;parser;constructor(e){this.options=e||Cf}space(e){return``}code({text:e,lang:t,escaped:n}){let r=(t||``).match(Df.notSpaceStart)?.[0],i=e.replace(Df.endingNewline,``)+`
|
|
166
|
-
`;return r?`<pre><code class="language-`+Np(r)+`">`+(n?i:Np(i,!0))+`</code></pre>
|
|
167
|
-
`:`<pre><code>`+(n?i:Np(i,!0))+`</code></pre>
|
|
168
|
-
`}blockquote({tokens:e}){return`<blockquote>
|
|
169
|
-
${this.parser.parse(e)}</blockquote>
|
|
170
|
-
`}html({text:e}){return e}def(e){return``}heading({tokens:e,depth:t}){return`<h${t}>${this.parser.parseInline(e)}</h${t}>
|
|
171
|
-
`}hr(e){return`<hr>
|
|
172
|
-
`}list(e){let t=e.ordered,n=e.start,r=``;for(let t=0;t<e.items.length;t++){let n=e.items[t];r+=this.listitem(n)}let i=t?`ol`:`ul`,a=t&&n!==1?` start="`+n+`"`:``;return`<`+i+a+`>
|
|
173
|
-
`+r+`</`+i+`>
|
|
174
|
-
`}listitem(e){let t=``;if(e.task){let n=this.checkbox({checked:!!e.checked});e.loose?e.tokens[0]?.type===`paragraph`?(e.tokens[0].text=n+` `+e.tokens[0].text,e.tokens[0].tokens&&e.tokens[0].tokens.length>0&&e.tokens[0].tokens[0].type===`text`&&(e.tokens[0].tokens[0].text=n+` `+Np(e.tokens[0].tokens[0].text),e.tokens[0].tokens[0].escaped=!0)):e.tokens.unshift({type:`text`,raw:n+` `,text:n+` `,escaped:!0}):t+=n+` `}return t+=this.parser.parse(e.tokens,!!e.loose),`<li>${t}</li>
|
|
175
|
-
`}checkbox({checked:e}){return`<input `+(e?`checked="" `:``)+`disabled="" type="checkbox">`}paragraph({tokens:e}){return`<p>${this.parser.parseInline(e)}</p>
|
|
176
|
-
`}table(e){let t=``,n=``;for(let t=0;t<e.header.length;t++)n+=this.tablecell(e.header[t]);t+=this.tablerow({text:n});let r=``;for(let t=0;t<e.rows.length;t++){let i=e.rows[t];n=``;for(let e=0;e<i.length;e++)n+=this.tablecell(i[e]);r+=this.tablerow({text:n})}return r&&=`<tbody>${r}</tbody>`,`<table>
|
|
177
|
-
<thead>
|
|
178
|
-
`+t+`</thead>
|
|
179
|
-
`+r+`</table>
|
|
180
|
-
`}tablerow({text:e}){return`<tr>
|
|
181
|
-
${e}</tr>
|
|
182
|
-
`}tablecell(e){let t=this.parser.parseInline(e.tokens),n=e.header?`th`:`td`;return(e.align?`<${n} align="${e.align}">`:`<${n}>`)+t+`</${n}>
|
|
183
|
-
`}strong({tokens:e}){return`<strong>${this.parser.parseInline(e)}</strong>`}em({tokens:e}){return`<em>${this.parser.parseInline(e)}</em>`}codespan({text:e}){return`<code>${Np(e,!0)}</code>`}br(e){return`<br>`}del({tokens:e}){return`<del>${this.parser.parseInline(e)}</del>`}link({href:e,title:t,tokens:n}){let r=this.parser.parseInline(n),i=Pp(e);if(i===null)return r;e=i;let a=`<a href="`+e+`"`;return t&&(a+=` title="`+Np(t)+`"`),a+=`>`+r+`</a>`,a}image({href:e,title:t,text:n,tokens:r}){r&&(n=this.parser.parseInline(r,this.parser.textRenderer));let i=Pp(e);if(i===null)return Np(n);e=i;let a=`<img src="${e}" alt="${n}"`;return t&&(a+=` title="${Np(t)}"`),a+=`>`,a}text(e){return`tokens`in e&&e.tokens?this.parser.parseInline(e.tokens):`escaped`in e&&e.escaped?e.text:Np(e.text)}},Up=class{strong({text:e}){return e}em({text:e}){return e}codespan({text:e}){return e}del({text:e}){return e}html({text:e}){return e}text({text:e}){return e}link({text:e}){return``+e}image({text:e}){return``+e}br(){return``}},Wp=class e{options;renderer;textRenderer;constructor(e){this.options=e||Cf,this.options.renderer=this.options.renderer||new Hp,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Up}static parse(t,n){return new e(n).parse(t)}static parseInline(t,n){return new e(n).parseInline(t)}parse(e,t=!0){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=i,t=this.options.extensions.renderers[e.type].call({parser:this},e);if(t!==!1||![`space`,`hr`,`heading`,`code`,`table`,`blockquote`,`list`,`html`,`def`,`paragraph`,`text`].includes(e.type)){n+=t||``;continue}}let a=i;switch(a.type){case`space`:n+=this.renderer.space(a);continue;case`hr`:n+=this.renderer.hr(a);continue;case`heading`:n+=this.renderer.heading(a);continue;case`code`:n+=this.renderer.code(a);continue;case`table`:n+=this.renderer.table(a);continue;case`blockquote`:n+=this.renderer.blockquote(a);continue;case`list`:n+=this.renderer.list(a);continue;case`html`:n+=this.renderer.html(a);continue;case`def`:n+=this.renderer.def(a);continue;case`paragraph`:n+=this.renderer.paragraph(a);continue;case`text`:{let i=a,o=this.renderer.text(i);for(;r+1<e.length&&e[r+1].type===`text`;)i=e[++r],o+=`
|
|
184
|
-
`+this.renderer.text(i);t?n+=this.renderer.paragraph({type:`paragraph`,raw:o,text:o,tokens:[{type:`text`,raw:o,text:o,escaped:!0}]}):n+=o;continue}default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}parseInline(e,t=this.renderer){let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(this.options.extensions?.renderers?.[i.type]){let e=this.options.extensions.renderers[i.type].call({parser:this},i);if(e!==!1||![`escape`,`html`,`link`,`image`,`strong`,`em`,`codespan`,`br`,`del`,`text`].includes(i.type)){n+=e||``;continue}}let a=i;switch(a.type){case`escape`:n+=t.text(a);break;case`html`:n+=t.html(a);break;case`link`:n+=t.link(a);break;case`image`:n+=t.image(a);break;case`strong`:n+=t.strong(a);break;case`em`:n+=t.em(a);break;case`codespan`:n+=t.codespan(a);break;case`br`:n+=t.br(a);break;case`del`:n+=t.del(a);break;case`text`:n+=t.text(a);break;default:{let e=`Token with "`+a.type+`" type was not found.`;if(this.options.silent)return console.error(e),``;throw Error(e)}}}return n}},Gp=class{options;block;constructor(e){this.options=e||Cf}static passThroughHooks=new Set([`preprocess`,`postprocess`,`processAllTokens`,`emStrongMask`]);static passThroughHooksRespectAsync=new Set([`preprocess`,`postprocess`,`processAllTokens`]);preprocess(e){return e}postprocess(e){return e}processAllTokens(e){return e}emStrongMask(e){return e}provideLexer(){return this.block?Vp.lex:Vp.lexInline}provideParser(){return this.block?Wp.parse:Wp.parseInline}},Kp=new class{defaults=Sf();options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Wp;Renderer=Hp;TextRenderer=Up;Lexer=Vp;Tokenizer=Bp;Hooks=Gp;constructor(...e){this.use(...e)}walkTokens(e,t){let n=[];for(let r of e)switch(n=n.concat(t.call(this,r)),r.type){case`table`:{let e=r;for(let r of e.header)n=n.concat(this.walkTokens(r.tokens,t));for(let r of e.rows)for(let e of r)n=n.concat(this.walkTokens(e.tokens,t));break}case`list`:{let e=r;n=n.concat(this.walkTokens(e.items,t));break}default:{let e=r;this.defaults.extensions?.childTokens?.[e.type]?this.defaults.extensions.childTokens[e.type].forEach(r=>{let i=e[r].flat(1/0);n=n.concat(this.walkTokens(i,t))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,t)))}}return n}use(...e){let t=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(e=>{let n={...e};if(n.async=this.defaults.async||n.async||!1,e.extensions&&(e.extensions.forEach(e=>{if(!e.name)throw Error(`extension name required`);if(`renderer`in e){let n=t.renderers[e.name];n?t.renderers[e.name]=function(...t){let r=e.renderer.apply(this,t);return r===!1&&(r=n.apply(this,t)),r}:t.renderers[e.name]=e.renderer}if(`tokenizer`in e){if(!e.level||e.level!==`block`&&e.level!==`inline`)throw Error(`extension level must be 'block' or 'inline'`);let n=t[e.level];n?n.unshift(e.tokenizer):t[e.level]=[e.tokenizer],e.start&&(e.level===`block`?t.startBlock?t.startBlock.push(e.start):t.startBlock=[e.start]:e.level===`inline`&&(t.startInline?t.startInline.push(e.start):t.startInline=[e.start]))}`childTokens`in e&&e.childTokens&&(t.childTokens[e.name]=e.childTokens)}),n.extensions=t),e.renderer){let t=this.defaults.renderer||new Hp(this.defaults);for(let n in e.renderer){if(!(n in t))throw Error(`renderer '${n}' does not exist`);if([`options`,`parser`].includes(n))continue;let r=n,i=e.renderer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n||``}}n.renderer=t}if(e.tokenizer){let t=this.defaults.tokenizer||new Bp(this.defaults);for(let n in e.tokenizer){if(!(n in t))throw Error(`tokenizer '${n}' does not exist`);if([`options`,`rules`,`lexer`].includes(n))continue;let r=n,i=e.tokenizer[r],a=t[r];t[r]=(...e)=>{let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.tokenizer=t}if(e.hooks){let t=this.defaults.hooks||new Gp;for(let n in e.hooks){if(!(n in t))throw Error(`hook '${n}' does not exist`);if([`options`,`block`].includes(n))continue;let r=n,i=e.hooks[r],a=t[r];Gp.passThroughHooks.has(n)?t[r]=e=>{if(this.defaults.async&&Gp.passThroughHooksRespectAsync.has(n))return(async()=>{let n=await i.call(t,e);return a.call(t,n)})();let r=i.call(t,e);return a.call(t,r)}:t[r]=(...e)=>{if(this.defaults.async)return(async()=>{let n=await i.apply(t,e);return n===!1&&(n=await a.apply(t,e)),n})();let n=i.apply(t,e);return n===!1&&(n=a.apply(t,e)),n}}n.hooks=t}if(e.walkTokens){let t=this.defaults.walkTokens,r=e.walkTokens;n.walkTokens=function(e){let n=[];return n.push(r.call(this,e)),t&&(n=n.concat(t.call(this,e))),n}}this.defaults={...this.defaults,...n}}),this}setOptions(e){return this.defaults={...this.defaults,...e},this}lexer(e,t){return Vp.lex(e,t??this.defaults)}parser(e,t){return Wp.parse(e,t??this.defaults)}parseMarkdown(e){return(t,n)=>{let r={...n},i={...this.defaults,...r},a=this.onError(!!i.silent,!!i.async);if(this.defaults.async===!0&&r.async===!1)return a(Error(`marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise.`));if(typeof t>`u`||t===null)return a(Error(`marked(): input parameter is undefined or null`));if(typeof t!=`string`)return a(Error(`marked(): input parameter is of type `+Object.prototype.toString.call(t)+`, string expected`));if(i.hooks&&(i.hooks.options=i,i.hooks.block=e),i.async)return(async()=>{let n=i.hooks?await i.hooks.preprocess(t):t,r=await(i.hooks?await i.hooks.provideLexer():e?Vp.lex:Vp.lexInline)(n,i),a=i.hooks?await i.hooks.processAllTokens(r):r;i.walkTokens&&await Promise.all(this.walkTokens(a,i.walkTokens));let o=await(i.hooks?await i.hooks.provideParser():e?Wp.parse:Wp.parseInline)(a,i);return i.hooks?await i.hooks.postprocess(o):o})().catch(a);try{i.hooks&&(t=i.hooks.preprocess(t));let n=(i.hooks?i.hooks.provideLexer():e?Vp.lex:Vp.lexInline)(t,i);i.hooks&&(n=i.hooks.processAllTokens(n)),i.walkTokens&&this.walkTokens(n,i.walkTokens);let r=(i.hooks?i.hooks.provideParser():e?Wp.parse:Wp.parseInline)(n,i);return i.hooks&&(r=i.hooks.postprocess(r)),r}catch(e){return a(e)}}}onError(e,t){return n=>{if(n.message+=`
|
|
185
|
-
Please report this to https://github.com/markedjs/marked.`,e){let e=`<p>An error occurred:</p><pre>`+Np(n.message+``,!0)+`</pre>`;return t?Promise.resolve(e):e}if(t)return Promise.reject(n);throw n}}};function H(e,t){return Kp.parse(e,t)}H.options=H.setOptions=function(e){return Kp.setOptions(e),H.defaults=Kp.defaults,wf(H.defaults),H},H.getDefaults=Sf,H.defaults=Cf,H.use=function(...e){return Kp.use(...e),H.defaults=Kp.defaults,wf(H.defaults),H},H.walkTokens=function(e,t){return Kp.walkTokens(e,t)},H.parseInline=Kp.parseInline,H.Parser=Wp,H.parser=Wp.parse,H.Renderer=Hp,H.TextRenderer=Up,H.Lexer=Vp,H.lexer=Vp.lex,H.Tokenizer=Bp,H.Hooks=Gp,H.parse=H,H.options,H.setOptions,H.use,H.walkTokens,H.parseInline,Wp.parse,Vp.lex;function qp(e){var t=[...arguments].slice(1),n=Array.from(typeof e==`string`?[e]:e);n[n.length-1]=n[n.length-1].replace(/\r?\n([\t ]*)$/,``);var r=n.reduce(function(e,t){var n=t.match(/\n([\t ]+|(?!\s).)/g);return n?e.concat(n.map(function(e){return e.match(/[\t ]/g)?.length??0})):e},[]);if(r.length){var i=RegExp(`
|
|
186
|
-
[ ]{`+Math.min.apply(Math,r)+`}`,`g`);n=n.map(function(e){return e.replace(i,`
|
|
187
|
-
`)})}n[0]=n[0].replace(/^\r?\n/,``);var a=n[0];return t.forEach(function(e,t){var r=a.match(/(?:^|\n)( *)$/),i=r?r[1]:``,o=e;typeof e==`string`&&e.includes(`
|
|
188
|
-
`)&&(o=String(e).split(`
|
|
189
|
-
`).map(function(e,t){return t===0?e:``+i+e}).join(`
|
|
190
|
-
`)),a+=o+n[t+1]}),a}var Jp={body:`<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>`,height:80,width:80},Yp=new Map,Xp=new Map,Zp=l(e=>{for(let t of e){if(!t.name)throw Error(`Invalid icon loader. Must have a "name" property with non-empty string value.`);if(f.debug(`Registering icon pack:`,t.name),`loader`in t)Xp.set(t.name,t.loader);else if(`icons`in t)Yp.set(t.name,t.icons);else throw f.error(`Invalid icon loader:`,t),Error(`Invalid icon loader. Must have either "icons" or "loader" property.`)}},`registerIconPacks`),Qp=l(async(e,t)=>{let n=tf(e,!0,t!==void 0);if(!n)throw Error(`Invalid icon name: ${e}`);let r=n.prefix||t;if(!r)throw Error(`Icon name must contain a prefix: ${e}`);let i=Yp.get(r);if(!i){let e=Xp.get(r);if(!e)throw Error(`Icon set not found: ${n.prefix}`);try{i={...await e(),prefix:r},Yp.set(r,i)}catch(e){throw f.error(e),Error(`Failed to load icon set: ${n.prefix}`)}}let a=cf(i,n.name);if(!a)throw Error(`Icon not found: ${e}`);return a},`getRegisteredIconData`),$p=l(async e=>{try{return await Qp(e),!0}catch{return!1}},`isIconAvailable`),em=l(async(e,t,n)=>{let r;try{r=await Qp(e,t?.fallbackPrefix)}catch(e){f.error(e),r=Jp}let i=gf(r,t);return zn(xf(bf(i.body),{...i.attributes,...n}),R())},`getIconSVG`);function tm(e,{markdownAutoWrap:t}){return qp(e.replace(/<br\/>/g,`
|
|
191
|
-
`).replace(/\n{2,}/g,`
|
|
192
|
-
`))}l(tm,`preprocessMarkdown`);function nm(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(e=>e.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(e=>({content:e,type:`normal`}))??[])}l(nm,`nonMarkdownToLines`);function rm(e,t={}){let n=tm(e,t),r=H.lexer(n),i=[[]],a=0;function o(e,t=`normal`){e.type===`text`?e.text.split(`
|
|
193
|
-
`).forEach((e,n)=>{n!==0&&(a++,i.push([])),e.split(` `).forEach(e=>{e=e.replace(/'/g,`'`),e&&i[a].push({content:e,type:t})})}):e.type===`strong`||e.type===`em`?e.tokens.forEach(t=>{o(t,e.type)}):e.type===`html`&&i[a].push({content:e.text,type:`normal`})}return l(o,`processNode`),r.forEach(e=>{e.type===`paragraph`?e.tokens?.forEach(e=>{o(e)}):e.type===`html`?i[a].push({content:e.text,type:`normal`}):i[a].push({content:e.raw,type:`normal`})}),i}l(rm,`markdownToLines`);function im(e){return e?`<p>${e.replace(/\\n|\n/g,`<br />`)}</p>`:``}l(im,`nonMarkdownToHTML`);function am(e,{markdownAutoWrap:t}={}){let n=H.lexer(e);function r(e){return e.type===`text`?t===!1?e.text.replace(/\n */g,`<br/>`).replace(/ /g,` `):e.text.replace(/\n */g,`<br/>`):e.type===`strong`?`<strong>${e.tokens?.map(r).join(``)}</strong>`:e.type===`em`?`<em>${e.tokens?.map(r).join(``)}</em>`:e.type===`paragraph`?`<p>${e.tokens?.map(r).join(``)}</p>`:e.type===`space`?``:e.type===`html`?`${e.text}`:e.type===`escape`?e.text:(f.warn(`Unsupported markdown: ${e.type}`),e.raw)}return l(r,`output`),n.map(r).join(``)}l(am,`markdownToHTML`);function om(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(e=>e.segment):[...e]}l(om,`splitTextToChars`);function sm(e,t){return cm(e,[],om(t.content),t.type)}l(sm,`splitWordToFitWidth`);function cm(e,t,n,r){if(n.length===0)return[{content:t.join(``),type:r},{content:``,type:r}];let[i,...a]=n,o=[...t,i];return e([{content:o.join(``),type:r}])?cm(e,o,a,r):(t.length===0&&i&&(t.push(i),n.shift()),[{content:t.join(``),type:r},{content:n.join(``),type:r}])}l(cm,`splitWordToFitWidthRecursion`);function lm(e,t){if(e.some(({content:e})=>e.includes(`
|
|
194
|
-
`)))throw Error(`splitLineToFitWidth does not support newlines in the line`);return um(e,t)}l(lm,`splitLineToFitWidth`);function um(e,t,n=[],r=[]){if(e.length===0)return r.length>0&&n.push(r),n.length>0?n:[];let i=``;e[0].content===` `&&(i=` `,e.shift());let a=e.shift()??{content:` `,type:`normal`},o=[...r];if(i!==``&&o.push({content:i,type:`normal`}),o.push(a),t(o))return um(e,t,n,o);if(r.length>0)n.push(r),e.unshift(a);else if(a.content){let[r,i]=sm(t,a);n.push([r]),i.content&&e.unshift(i)}return um(e,t,n)}l(um,`splitLineToFitWidthRecursion`);function dm(e,t){t&&e.attr(`style`,t)}l(dm,`applyStyle`);var fm=16384;async function pm(e,t,n,r,i=!1,a=R()){let o=e.append(`foreignObject`);o.attr(`width`,`${Math.min(10*n,fm)}px`),o.attr(`height`,`${Math.min(10*n,fm)}px`);let s=o.append(`xhtml:div`),c=er(t.label)?await rr(t.label.replace(ir.lineBreakRegex,`
|
|
195
|
-
`),a):zn(t.label,a),l=t.isNode?`nodeLabel`:`edgeLabel`,u=s.append(`span`);u.html(c),dm(u,t.labelStyle),u.attr(`class`,`${l} ${r}`),dm(s,t.labelStyle),s.style(`display`,`table-cell`),s.style(`white-space`,`nowrap`),s.style(`line-height`,`1.5`),n!==1/0&&(s.style(`max-width`,n+`px`),s.style(`text-align`,`center`)),s.attr(`xmlns`,`http://www.w3.org/1999/xhtml`),i&&s.attr(`class`,`labelBkg`);let d=s.node().getBoundingClientRect();return d.width===n&&(s.style(`display`,`table`),s.style(`white-space`,`break-spaces`),s.style(`width`,n+`px`),d=s.node().getBoundingClientRect()),o.node()}l(pm,`addHtmlSpan`);function mm(e,t,n,r=!1){let i=e.append(`tspan`).attr(`class`,`text-outer-tspan`).attr(`x`,0).attr(`y`,t*n-.1+`em`).attr(`dy`,n+`em`);return r&&i.attr(`text-anchor`,`middle`),i}l(mm,`createTspan`);function hm(e,t,n){let r=e.append(`text`),i=mm(r,1,t);ym(i,n);let a=i.node().getComputedTextLength();return r.remove(),a}l(hm,`computeWidthOfText`);function gm(e,t,n){let r=e.append(`text`),i=mm(r,1,t);ym(i,[{content:n,type:`normal`}]);let a=i.node()?.getBoundingClientRect();return a&&r.remove(),a}l(gm,`computeDimensionOfText`);function _m(e,t,n,r=!1,i=!1){let a=1.1,o=t.append(`g`),s=o.insert(`rect`).attr(`class`,`background`).attr(`style`,`stroke: none`),c=o.append(`text`).attr(`y`,`-10.1`);i&&c.attr(`text-anchor`,`middle`);let u=0;for(let t of n){let n=l(t=>hm(o,a,t)<=e,`checkWidth`),r=n(t)?[t]:lm(t,n);for(let e of r)ym(mm(c,u,a,i),e),u++}if(r){let e=c.node().getBBox();return s.attr(`x`,e.x-2).attr(`y`,e.y-2).attr(`width`,e.width+4).attr(`height`,e.height+4),o.node()}else return c.node()}l(_m,`createFormattedText`);function vm(e){return e.replace(/&(amp|lt|gt);/g,(e,t)=>{switch(t){case`amp`:return`&`;case`lt`:return`<`;case`gt`:return`>`;default:return e}})}l(vm,`decodeHTMLEntities`);function ym(e,t){e.text(``),t.forEach((t,n)=>{let r=e.append(`tspan`).attr(`font-style`,t.type===`em`?`italic`:`normal`).attr(`class`,`text-inner-tspan`).attr(`font-weight`,t.type===`strong`?`bold`:`normal`);n===0?r.text(vm(t.content)):r.text(` `+vm(t.content))})}l(ym,`updateTextContentAndStyles`);async function bm(e,t={}){let n=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,i)=>(n.push((async()=>{let n=`${r}:${i}`;return await $p(n)?await em(n,void 0,{class:`label-icon`}):`<i class='${zn(e,t).replace(`:`,` `)}'></i>`})()),e));let r=await Promise.all(n);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>r.shift()??``)}l(bm,`replaceIconSubstring`);var xm=l(async(e,t=``,{style:n=``,isTitle:r=!1,classes:i=``,useHtmlLabels:a=!0,markdown:o=!0,isNode:s=!0,width:c=200,addSvgBackground:l=!1}={},u)=>{if(f.debug(`XYZ createText`,t,n,r,i,a,s,`addSvgBackground: `,l),a){let r=await bm(Gd(o?am(t,u):im(t)),u),a=t.replace(/\\\\/g,`\\`);return await pm(e,{isNode:s,label:er(t)?a:r,labelStyle:n.replace(`fill:`,`color:`)},c,i,l,u)}else{let i=Gd(t.replace(/<br\s*\/?>/g,`<br/>`)),a=_m(c,e,o?rm(i.replace(`<br>`,`<br/>`),u):nm(i),t?l:!1,!s);if(s){/stroke:/.exec(n)&&(n=n.replace(`stroke:`,`lineColor:`));let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);B(a).attr(`style`,e)}else{let e=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/background:/g,`fill:`);B(a).select(`rect`).attr(`style`,e.replace(/background:/g,`fill:`));let t=n.replace(/stroke:[^;]+;?/g,``).replace(/stroke-width:[^;]+;?/g,``).replace(/fill:[^;]+;?/g,``).replace(/color:/g,`fill:`);B(a).select(`text`).attr(`style`,t)}return r?B(a).selectAll(`tspan.text-outer-tspan`).classed(`title-row`,!0):B(a).selectAll(`tspan.text-outer-tspan`).classed(`row`,!0),a}},`createText`),Sm=l((e,t)=>{if(t)return`translate(`+-e.width/2+`, `+-e.height/2+`)`;let n=e.x??0,r=e.y??0;return`translate(`+-(n+e.width/2)+`, `+-(r+e.height/2)+`)`},`computeLabelTransform`),Cm={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},wm={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Tm(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=U(e),t=U(t);let[n,r]=[e.x,e.y],[i,a]=[t.x,t.y],o=i-n,s=a-r;return{angle:Math.atan(s/o),deltaX:o,deltaY:s}}l(Tm,`calculateDeltaAndAngle`);var U=l(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,`pointTransformer`),Em=l(e=>({x:l(function(t,n,r){let i=0,a=U(r[0]).x<U(r[r.length-1]).x?`left`:`right`;if(n===0&&Object.hasOwn(Cm,e.arrowTypeStart)){let{angle:t,deltaX:n}=Tm(r[0],r[1]);i=Cm[e.arrowTypeStart]*Math.cos(t)*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Cm,e.arrowTypeEnd)){let{angle:t,deltaX:n}=Tm(r[r.length-1],r[r.length-2]);i=Cm[e.arrowTypeEnd]*Math.cos(t)*(n>=0?1:-1)}let o=Math.abs(U(t).x-U(r[r.length-1]).x),s=Math.abs(U(t).y-U(r[r.length-1]).y),c=Math.abs(U(t).x-U(r[0]).x),l=Math.abs(U(t).y-U(r[0]).y),u=Cm[e.arrowTypeStart],d=Cm[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`right`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`right`?-1:1,i+=e}return U(t).x+i},`x`),y:l(function(t,n,r){let i=0,a=U(r[0]).y<U(r[r.length-1]).y?`down`:`up`;if(n===0&&Object.hasOwn(Cm,e.arrowTypeStart)){let{angle:t,deltaY:n}=Tm(r[0],r[1]);i=Cm[e.arrowTypeStart]*Math.abs(Math.sin(t))*(n>=0?1:-1)}else if(n===r.length-1&&Object.hasOwn(Cm,e.arrowTypeEnd)){let{angle:t,deltaY:n}=Tm(r[r.length-1],r[r.length-2]);i=Cm[e.arrowTypeEnd]*Math.abs(Math.sin(t))*(n>=0?1:-1)}let o=Math.abs(U(t).y-U(r[r.length-1]).y),s=Math.abs(U(t).x-U(r[r.length-1]).x),c=Math.abs(U(t).y-U(r[0]).y),l=Math.abs(U(t).x-U(r[0]).x),u=Cm[e.arrowTypeStart],d=Cm[e.arrowTypeEnd];if(o<d&&o>0&&s<d){let e=d+1-o;e*=a===`up`?-1:1,i-=e}if(c<u&&c>0&&l<u){let e=u+1-c;e*=a===`up`?-1:1,i+=e}return U(t).y+i},`y`)}),`getLineFunctionsWithOffset`),Dm=l(({flowchart:e})=>{let t=e?.subGraphTitleMargin?.top??0,n=e?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:n,subGraphTitleTotalMargin:t+n}},`getSubGraphTitleMargins`);async function Om(e,t){let n=e.getElementsByTagName(`img`);if(!n||n.length===0)return;let r=t.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...n].map(e=>new Promise(t=>{function n(){if(e.style.display=`flex`,e.style.flexDirection=`column`,r){let[t=ln.fontSize]=Vd(z().fontSize?z().fontSize:window.getComputedStyle(document.body).fontSize),n=t*5+`px`;e.style.minWidth=n,e.style.maxWidth=n}else e.style.width=`100%`;t(e)}l(n,`setupImage`),setTimeout(()=>{e.complete&&n()}),e.addEventListener(`error`,n),e.addEventListener(`load`,n)})))}l(Om,`configureLabelImages`);var km=l(e=>{let{handDrawnSeed:t}=z();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},`solidStateFill`),Am=l(e=>{let t=jm([...e.cssCompiledStyles||[],...e.cssStyles||[],...e.labelStyle||[]]);return{stylesMap:t,stylesArray:[...t]}},`compileStyles`),jm=l(e=>{let t=new Map;return e.forEach(e=>{let[n,r]=e.split(`:`);t.set(n.trim(),r?.trim())}),t},`styles2Map`),Mm=l(e=>e===`color`||e===`font-size`||e===`font-family`||e===`font-weight`||e===`font-style`||e===`text-decoration`||e===`text-align`||e===`text-transform`||e===`line-height`||e===`letter-spacing`||e===`word-spacing`||e===`text-shadow`||e===`text-overflow`||e===`white-space`||e===`word-wrap`||e===`word-break`||e===`overflow-wrap`||e===`hyphens`,`isLabelStyle`),W=l(e=>{let{stylesArray:t}=Am(e),n=[],r=[],i=[],a=[];return t.forEach(e=>{let t=e[0];Mm(t)?n.push(e.join(`:`)+` !important`):(r.push(e.join(`:`)+` !important`),t.includes(`stroke`)&&i.push(e.join(`:`)+` !important`),t===`fill`&&a.push(e.join(`:`)+` !important`))}),{labelStyles:n.join(`;`),nodeStyles:r.join(`;`),stylesArray:t,borderStyles:i,backgroundStyles:a}},`styles2String`),G=l((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=z(),{nodeBorder:i,mainBkg:a}=n,{stylesMap:o}=Am(e);return Object.assign({roughness:.7,fill:o.get(`fill`)||a,fillStyle:`hachure`,fillWeight:4,hachureGap:5.2,stroke:o.get(`stroke`)||i,seed:r,strokeWidth:o.get(`stroke-width`)?.replace(`px`,``)||1.3,fillLineDash:[0,0],strokeLineDash:Nm(o.get(`stroke-dasharray`))},t)},`userNodeOverrides`),Nm=l(e=>{if(!e)return[0,0];let t=e.trim().split(/\s+/).map(Number);if(t.length===1){let e=isNaN(t[0])?0:t[0];return[e,e]}return[isNaN(t[0])?0:t[0],isNaN(t[1])?0:t[1]]},`getStrokeDashArray`);function Pm(e,t,n){if(e&&e.length){let[r,i]=t,a=Math.PI/180*n,o=Math.cos(a),s=Math.sin(a);for(let t of e){let[e,n]=t;t[0]=(e-r)*o-(n-i)*s+r,t[1]=(e-r)*s+(n-i)*o+i}}}function Fm(e,t){return e[0]===t[0]&&e[1]===t[1]}function Im(e,t,n,r=1){let i=n,a=Math.max(t,.1),o=e[0]&&e[0][0]&&typeof e[0][0]==`number`?[e]:e,s=[0,0];if(i)for(let e of o)Pm(e,s,i);let c=function(e,t,n){let r=[];for(let t of e){let e=[...t];Fm(e[0],e[e.length-1])||e.push([e[0][0],e[0][1]]),e.length>2&&r.push(e)}let i=[];t=Math.max(t,.1);let a=[];for(let e of r)for(let t=0;t<e.length-1;t++){let n=e[t],r=e[t+1];if(n[1]!==r[1]){let e=Math.min(n[1],r[1]);a.push({ymin:e,ymax:Math.max(n[1],r[1]),x:e===n[1]?n[0]:r[0],islope:(r[0]-n[0])/(r[1]-n[1])})}}if(a.sort(((e,t)=>e.ymin<t.ymin?-1:e.ymin>t.ymin?1:e.x<t.x?-1:e.x>t.x?1:e.ymax===t.ymax?0:(e.ymax-t.ymax)/Math.abs(e.ymax-t.ymax))),!a.length)return i;let o=[],s=a[0].ymin,c=0;for(;o.length||a.length;){if(a.length){let e=-1;for(let t=0;t<a.length&&!(a[t].ymin>s);t++)e=t;a.splice(0,e+1).forEach((e=>{o.push({s,edge:e})}))}if(o=o.filter((e=>!(e.edge.ymax<=s))),o.sort(((e,t)=>e.edge.x===t.edge.x?0:(e.edge.x-t.edge.x)/Math.abs(e.edge.x-t.edge.x))),(n!==1||c%t==0)&&o.length>1)for(let e=0;e<o.length;e+=2){let t=e+1;if(t>=o.length)break;let n=o[e].edge,r=o[t].edge;i.push([[Math.round(n.x),s],[Math.round(r.x),s]])}s+=n,o.forEach((e=>{e.edge.x=e.edge.x+n*e.edge.islope})),c++}return i}(o,a,r);if(i){for(let e of o)Pm(e,s,-i);(function(e,t,n){let r=[];e.forEach((e=>r.push(...e))),Pm(r,t,n)})(c,s,-i)}return c}function Lm(e,t){let n=t.hachureAngle+90,r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.round(Math.max(r,.1));let i=1;return t.roughness>=1&&(t.randomizer?.next()||Math.random())>.7&&(i=r),Im(e,r,n,i||1)}var Rm=class{constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){let n=Lm(e,t);return{type:`fillSketch`,ops:this.renderLines(n,t)}}renderLines(e,t){let n=[];for(let r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}};function zm(e){let t=e[0],n=e[1];return Math.sqrt((t[0]-n[0])**2+(t[1]-n[1])**2)}var Bm=class extends Rm{fillPolygons(e,t){let n=t.hachureGap;n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1);let r=Lm(e,Object.assign({},t,{hachureGap:n})),i=Math.PI/180*t.hachureAngle,a=[],o=.5*n*Math.cos(i),s=.5*n*Math.sin(i);for(let[e,t]of r)zm([e,t])&&a.push([[e[0]-o,e[1]+s],[...t]],[[e[0]+o,e[1]-s],[...t]]);return{type:`fillSketch`,ops:this.renderLines(a,t)}}},Vm=class extends Rm{fillPolygons(e,t){let n=this._fillPolygons(e,t),r=Object.assign({},t,{hachureAngle:t.hachureAngle+90}),i=this._fillPolygons(e,r);return n.ops=n.ops.concat(i.ops),n}},Hm=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=Lm(e,t=Object.assign({},t,{hachureAngle:0}));return this.dotsOnLines(n,t)}dotsOnLines(e,t){let n=[],r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);let i=t.fillWeight;i<0&&(i=t.strokeWidth/2);let a=r/4;for(let o of e){let e=zm(o),s=e/r,c=Math.ceil(s)-1,l=e-c*r,u=(o[0][0]+o[1][0])/2-r/4,d=Math.min(o[0][1],o[1][1]);for(let e=0;e<c;e++){let o=d+l+e*r,s=u-a+2*Math.random()*a,c=o-a+2*Math.random()*a,f=this.helper.ellipse(s,c,i,i,t);n.push(...f.ops)}}return{type:`fillSketch`,ops:n}}},Um=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=Lm(e,t);return{type:`fillSketch`,ops:this.dashedLine(n,t)}}dashedLine(e,t){let n=t.dashOffset<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashOffset,r=t.dashGap<0?t.hachureGap<0?4*t.strokeWidth:t.hachureGap:t.dashGap,i=[];return e.forEach((e=>{let a=zm(e),o=Math.floor(a/(n+r)),s=(a+r-o*(n+r))/2,c=e[0],l=e[1];c[0]>l[0]&&(c=e[1],l=e[0]);let u=Math.atan((l[1]-c[1])/(l[0]-c[0]));for(let e=0;e<o;e++){let a=e*(n+r),o=a+n,l=[c[0]+a*Math.cos(u)+s*Math.cos(u),c[1]+a*Math.sin(u)+s*Math.sin(u)],d=[c[0]+o*Math.cos(u)+s*Math.cos(u),c[1]+o*Math.sin(u)+s*Math.sin(u)];i.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],t))}})),i}},Wm=class{constructor(e){this.helper=e}fillPolygons(e,t){let n=t.hachureGap<0?4*t.strokeWidth:t.hachureGap,r=t.zigzagOffset<0?n:t.zigzagOffset,i=Lm(e,t=Object.assign({},t,{hachureGap:n+r}));return{type:`fillSketch`,ops:this.zigzagLines(i,r,t)}}zigzagLines(e,t,n){let r=[];return e.forEach((e=>{let i=zm(e),a=Math.round(i/(2*t)),o=e[0],s=e[1];o[0]>s[0]&&(o=e[1],s=e[0]);let c=Math.atan((s[1]-o[1])/(s[0]-o[0]));for(let e=0;e<a;e++){let i=2*e*t,a=2*(e+1)*t,s=Math.sqrt(2*t**2),l=[o[0]+i*Math.cos(c),o[1]+i*Math.sin(c)],u=[o[0]+a*Math.cos(c),o[1]+a*Math.sin(c)],d=[l[0]+s*Math.cos(c+Math.PI/4),l[1]+s*Math.sin(c+Math.PI/4)];r.push(...this.helper.doubleLineOps(l[0],l[1],d[0],d[1],n),...this.helper.doubleLineOps(d[0],d[1],u[0],u[1],n))}})),r}},Gm={},Km=class{constructor(e){this.seed=e}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}},qm=0,Jm=1,Ym=2,Xm={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function Zm(e,t){return e.type===t}function Qm(e){let t=[],n=function(e){let t=[];for(;e!==``;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:qm,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:Jm,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:Ym,text:``},t}(e),r=`BOD`,i=0,a=n[i];for(;!Zm(a,Ym);){let o=0,s=[];if(r===`BOD`){if(a.text!==`M`&&a.text!==`m`)return Qm(`M0,0`+e);i++,o=Xm[a.text],r=a.text}else Zm(a,Jm)?o=Xm[r]:(i++,o=Xm[a.text],r=a.text);if(!(i+o<n.length))throw Error(`Path data ended short`);for(let e=i;e<i+o;e++){let t=n[e];if(!Zm(t,Jm))throw Error(`Param not a number: `+r+`,`+t.text);s[s.length]=+t.text}if(typeof Xm[r]!=`number`)throw Error(`Bad segment: `+r);{let e={key:r,data:s};t.push(e),i+=o,a=n[i],r===`M`&&(r=`L`),r===`m`&&(r=`l`)}}return t}function $m(e){let t=0,n=0,r=0,i=0,a=[];for(let{key:o,data:s}of e)switch(o){case`M`:a.push({key:`M`,data:[...s]}),[t,n]=s,[r,i]=s;break;case`m`:t+=s[0],n+=s[1],a.push({key:`M`,data:[t,n]}),r=t,i=n;break;case`L`:a.push({key:`L`,data:[...s]}),[t,n]=s;break;case`l`:t+=s[0],n+=s[1],a.push({key:`L`,data:[t,n]});break;case`C`:a.push({key:`C`,data:[...s]}),t=s[4],n=s[5];break;case`c`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`C`,data:e}),t=e[4],n=e[5];break}case`Q`:a.push({key:`Q`,data:[...s]}),t=s[2],n=s[3];break;case`q`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`Q`,data:e}),t=e[2],n=e[3];break}case`A`:a.push({key:`A`,data:[...s]}),t=s[5],n=s[6];break;case`a`:t+=s[5],n+=s[6],a.push({key:`A`,data:[s[0],s[1],s[2],s[3],s[4],t,n]});break;case`H`:a.push({key:`H`,data:[...s]}),t=s[0];break;case`h`:t+=s[0],a.push({key:`H`,data:[t]});break;case`V`:a.push({key:`V`,data:[...s]}),n=s[0];break;case`v`:n+=s[0],a.push({key:`V`,data:[n]});break;case`S`:a.push({key:`S`,data:[...s]}),t=s[2],n=s[3];break;case`s`:{let e=s.map(((e,r)=>r%2?e+n:e+t));a.push({key:`S`,data:e}),t=e[2],n=e[3];break}case`T`:a.push({key:`T`,data:[...s]}),t=s[0],n=s[1];break;case`t`:t+=s[0],n+=s[1],a.push({key:`T`,data:[t,n]});break;case`Z`:case`z`:a.push({key:`Z`,data:[]}),t=r,n=i}return a}function eh(e){let t=[],n=``,r=0,i=0,a=0,o=0,s=0,c=0;for(let{key:l,data:u}of e){switch(l){case`M`:t.push({key:`M`,data:[...u]}),[r,i]=u,[a,o]=u;break;case`C`:t.push({key:`C`,data:[...u]}),r=u[4],i=u[5],s=u[2],c=u[3];break;case`L`:t.push({key:`L`,data:[...u]}),[r,i]=u;break;case`H`:r=u[0],t.push({key:`L`,data:[r,i]});break;case`V`:i=u[0],t.push({key:`L`,data:[r,i]});break;case`S`:{let e=0,a=0;n===`C`||n===`S`?(e=r+(r-s),a=i+(i-c)):(e=r,a=i),t.push({key:`C`,data:[e,a,...u]}),s=u[0],c=u[1],r=u[2],i=u[3];break}case`T`:{let[e,a]=u,o=0,l=0;n===`Q`||n===`T`?(o=r+(r-s),l=i+(i-c)):(o=r,l=i);let d=r+2*(o-r)/3,f=i+2*(l-i)/3,p=e+2*(o-e)/3,m=a+2*(l-a)/3;t.push({key:`C`,data:[d,f,p,m,e,a]}),s=o,c=l,r=e,i=a;break}case`Q`:{let[e,n,a,o]=u,l=r+2*(e-r)/3,d=i+2*(n-i)/3,f=a+2*(e-a)/3,p=o+2*(n-o)/3;t.push({key:`C`,data:[l,d,f,p,a,o]}),s=e,c=n,r=a,i=o;break}case`A`:{let e=Math.abs(u[0]),n=Math.abs(u[1]),a=u[2],o=u[3],s=u[4],c=u[5],l=u[6];e===0||n===0?(t.push({key:`C`,data:[r,i,c,l,c,l]}),r=c,i=l):(r!==c||i!==l)&&(nh(r,i,c,l,e,n,a,o,s).forEach((function(e){t.push({key:`C`,data:e})})),r=c,i=l);break}case`Z`:t.push({key:`Z`,data:[]}),r=a,i=o}n=l}return t}function th(e,t,n){return[e*Math.cos(n)-t*Math.sin(n),e*Math.sin(n)+t*Math.cos(n)]}function nh(e,t,n,r,i,a,o,s,c,l){let u=(d=o,Math.PI*d/180);var d;let f=[],p=0,m=0,h=0,g=0;if(l)[p,m,h,g]=l;else{[e,t]=th(e,t,-u),[n,r]=th(n,r,-u);let o=(e-n)/2,l=(t-r)/2,d=o*o/(i*i)+l*l/(a*a);d>1&&(d=Math.sqrt(d),i*=d,a*=d);let f=i*i,_=a*a,v=f*_-f*l*l-_*o*o,y=f*l*l+_*o*o,b=(s===c?-1:1)*Math.sqrt(Math.abs(v/y));h=b*i*l/a+(e+n)/2,g=b*-a*o/i+(t+r)/2,p=Math.asin(parseFloat(((t-g)/a).toFixed(9))),m=Math.asin(parseFloat(((r-g)/a).toFixed(9))),e<h&&(p=Math.PI-p),n<h&&(m=Math.PI-m),p<0&&(p=2*Math.PI+p),m<0&&(m=2*Math.PI+m),c&&p>m&&(p-=2*Math.PI),!c&&m>p&&(m-=2*Math.PI)}let _=m-p;if(Math.abs(_)>120*Math.PI/180){let e=m,t=n,s=r;m=c&&m>p?p+120*Math.PI/180*1:p+120*Math.PI/180*-1,f=nh(n=h+i*Math.cos(m),r=g+a*Math.sin(m),t,s,i,a,o,0,c,[m,e,h,g])}_=m-p;let v=Math.cos(p),y=Math.sin(p),b=Math.cos(m),x=Math.sin(m),S=Math.tan(_/4),C=4/3*i*S,w=4/3*a*S,T=[e,t],E=[e+C*y,t-w*v],D=[n+C*x,r-w*b],ee=[n,r];if(E[0]=2*T[0]-E[0],E[1]=2*T[1]-E[1],l)return[E,D,ee].concat(f);{f=[E,D,ee].concat(f);let e=[];for(let t=0;t<f.length;t+=3){let n=th(f[t][0],f[t][1],u),r=th(f[t+1][0],f[t+1][1],u),i=th(f[t+2][0],f[t+2][1],u);e.push([n[0],n[1],r[0],r[1],i[0],i[1]])}return e}}var rh={randOffset:function(e,t){return K(e,t)},randOffsetWithRange:function(e,t,n){return gh(e,t,n)},ellipse:function(e,t,n,r,i){return lh(e,t,i,ch(n,r,i)).opset},doubleLineOps:function(e,t,n,r,i){return _h(e,t,n,r,i,!0)}};function ih(e,t,n,r,i){return{type:`path`,ops:_h(e,t,n,r,i)}}function ah(e,t,n){let r=(e||[]).length;if(r>2){let i=[];for(let t=0;t<r-1;t++)i.push(..._h(e[t][0],e[t][1],e[t+1][0],e[t+1][1],n));return t&&i.push(..._h(e[r-1][0],e[r-1][1],e[0][0],e[0][1],n)),{type:`path`,ops:i}}return r===2?ih(e[0][0],e[0][1],e[1][0],e[1][1],n):{type:`path`,ops:[]}}function oh(e,t,n,r,i){return function(e,t){return ah(e,!0,t)}([[e,t],[e+n,t],[e+n,t+r],[e,t+r]],i)}function sh(e,t){if(e.length){let n=typeof e[0][0]==`number`?[e]:e,r=yh(n[0],1*(1+.2*t.roughness),t),i=t.disableMultiStroke?[]:yh(n[0],1.5*(1+.22*t.roughness),mh(t));for(let e=1;e<n.length;e++){let a=n[e];if(a.length){let e=yh(a,1*(1+.2*t.roughness),t),n=t.disableMultiStroke?[]:yh(a,1.5*(1+.22*t.roughness),mh(t));for(let t of e)t.op!==`move`&&r.push(t);for(let e of n)e.op!==`move`&&i.push(e)}}return{type:`path`,ops:r.concat(i)}}return{type:`path`,ops:[]}}function ch(e,t,n){let r=Math.sqrt(2*Math.PI*Math.sqrt(((e/2)**2+(t/2)**2)/2)),i=Math.ceil(Math.max(n.curveStepCount,n.curveStepCount/Math.sqrt(200)*r)),a=2*Math.PI/i,o=Math.abs(e/2),s=Math.abs(t/2),c=1-n.curveFitting;return o+=K(o*c,n),s+=K(s*c,n),{increment:a,rx:o,ry:s}}function lh(e,t,n,r){let[i,a]=xh(r.increment,e,t,r.rx,r.ry,1,r.increment*gh(.1,gh(.4,1,n),n),n),o=bh(i,null,n);if(!n.disableMultiStroke&&n.roughness!==0){let[i]=xh(r.increment,e,t,r.rx,r.ry,1.5,0,n),a=bh(i,null,n);o=o.concat(a)}return{estimatedPoints:a,opset:{type:`path`,ops:o}}}function uh(e,t,n,r,i,a,o,s,c){let l=e,u=t,d=Math.abs(n/2),f=Math.abs(r/2);d+=K(.01*d,c),f+=K(.01*f,c);let p=i,m=a;for(;p<0;)p+=2*Math.PI,m+=2*Math.PI;m-p>2*Math.PI&&(p=0,m=2*Math.PI);let h=2*Math.PI/c.curveStepCount,g=Math.min(h/2,(m-p)/2),_=Sh(g,l,u,d,f,p,m,1,c);if(!c.disableMultiStroke){let e=Sh(g,l,u,d,f,p,m,1.5,c);_.push(...e)}return o&&(s?_.push(..._h(l,u,l+d*Math.cos(p),u+f*Math.sin(p),c),..._h(l,u,l+d*Math.cos(m),u+f*Math.sin(m),c)):_.push({op:`lineTo`,data:[l,u]},{op:`lineTo`,data:[l+d*Math.cos(p),u+f*Math.sin(p)]})),{type:`path`,ops:_}}function dh(e,t){let n=eh($m(Qm(e))),r=[],i=[0,0],a=[0,0];for(let{key:e,data:o}of n)switch(e){case`M`:a=[o[0],o[1]],i=[o[0],o[1]];break;case`L`:r.push(..._h(a[0],a[1],o[0],o[1],t)),a=[o[0],o[1]];break;case`C`:{let[e,n,i,s,c,l]=o;r.push(...Ch(e,n,i,s,c,l,a,t)),a=[c,l];break}case`Z`:r.push(..._h(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:`path`,ops:r}}function fh(e,t){let n=[];for(let r of e)if(r.length){let e=t.maxRandomnessOffset||0,i=r.length;if(i>2){n.push({op:`move`,data:[r[0][0]+K(e,t),r[0][1]+K(e,t)]});for(let a=1;a<i;a++)n.push({op:`lineTo`,data:[r[a][0]+K(e,t),r[a][1]+K(e,t)]})}}return{type:`fillPath`,ops:n}}function ph(e,t){return function(e,t){let n=e.fillStyle||`hachure`;if(!Gm[n])switch(n){case`zigzag`:Gm[n]||(Gm[n]=new Bm(t));break;case`cross-hatch`:Gm[n]||(Gm[n]=new Vm(t));break;case`dots`:Gm[n]||(Gm[n]=new Hm(t));break;case`dashed`:Gm[n]||(Gm[n]=new Um(t));break;case`zigzag-line`:Gm[n]||(Gm[n]=new Wm(t));break;default:n=`hachure`,Gm[n]||(Gm[n]=new Rm(t))}return Gm[n]}(t,rh).fillPolygons(e,t)}function mh(e){let t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function hh(e){return e.randomizer||=new Km(e.seed||0),e.randomizer.next()}function gh(e,t,n,r=1){return n.roughness*r*(hh(n)*(t-e)+e)}function K(e,t,n=1){return gh(-e,e,t,n)}function _h(e,t,n,r,i,a=!1){let o=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=vh(e,t,n,r,i,!0,!1);if(o)return s;let c=vh(e,t,n,r,i,!0,!0);return s.concat(c)}function vh(e,t,n,r,i,a,o){let s=(e-n)**2+(t-r)**2,c=Math.sqrt(s),l=1;l=c<200?1:c>500?.4:-.0016668*c+1.233334;let u=i.maxRandomnessOffset||0;u*u*100>s&&(u=c/10);let d=u/2,f=.2+.2*hh(i),p=i.bowing*i.maxRandomnessOffset*(r-t)/200,m=i.bowing*i.maxRandomnessOffset*(e-n)/200;p=K(p,i,l),m=K(m,i,l);let h=[],g=()=>K(d,i,l),_=()=>K(u,i,l),v=i.preserveVertices;return a&&(o?h.push({op:`move`,data:[e+(v?0:g()),t+(v?0:g())]}):h.push({op:`move`,data:[e+(v?0:K(u,i,l)),t+(v?0:K(u,i,l))]})),o?h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+g(),m+t+(r-t)*f+g(),p+e+2*(n-e)*f+g(),m+t+2*(r-t)*f+g(),n+(v?0:g()),r+(v?0:g())]}):h.push({op:`bcurveTo`,data:[p+e+(n-e)*f+_(),m+t+(r-t)*f+_(),p+e+2*(n-e)*f+_(),m+t+2*(r-t)*f+_(),n+(v?0:_()),r+(v?0:_())]}),h}function yh(e,t,n){if(!e.length)return[];let r=[];r.push([e[0][0]+K(t,n),e[0][1]+K(t,n)]),r.push([e[0][0]+K(t,n),e[0][1]+K(t,n)]);for(let i=1;i<e.length;i++)r.push([e[i][0]+K(t,n),e[i][1]+K(t,n)]),i===e.length-1&&r.push([e[i][0]+K(t,n),e[i][1]+K(t,n)]);return bh(r,null,n)}function bh(e,t,n){let r=e.length,i=[];if(r>3){let a=[],o=1-n.curveTightness;i.push({op:`move`,data:[e[1][0],e[1][1]]});for(let t=1;t+2<r;t++){let n=e[t];a[0]=[n[0],n[1]],a[1]=[n[0]+(o*e[t+1][0]-o*e[t-1][0])/6,n[1]+(o*e[t+1][1]-o*e[t-1][1])/6],a[2]=[e[t+1][0]+(o*e[t][0]-o*e[t+2][0])/6,e[t+1][1]+(o*e[t][1]-o*e[t+2][1])/6],a[3]=[e[t+1][0],e[t+1][1]],i.push({op:`bcurveTo`,data:[a[1][0],a[1][1],a[2][0],a[2][1],a[3][0],a[3][1]]})}if(t&&t.length===2){let e=n.maxRandomnessOffset;i.push({op:`lineTo`,data:[t[0]+K(e,n),t[1]+K(e,n)]})}}else r===3?(i.push({op:`move`,data:[e[1][0],e[1][1]]}),i.push({op:`bcurveTo`,data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):r===2&&i.push(...vh(e[0][0],e[0][1],e[1][0],e[1][1],n,!0,!0));return i}function xh(e,t,n,r,i,a,o,s){let c=[],l=[];if(s.roughness===0){e/=4,l.push([t+r*Math.cos(-e),n+i*Math.sin(-e)]);for(let a=0;a<=2*Math.PI;a+=e){let e=[t+r*Math.cos(a),n+i*Math.sin(a)];c.push(e),l.push(e)}l.push([t+r*Math.cos(0),n+i*Math.sin(0)]),l.push([t+r*Math.cos(e),n+i*Math.sin(e)])}else{let u=K(.5,s)-Math.PI/2;l.push([K(a,s)+t+.9*r*Math.cos(u-e),K(a,s)+n+.9*i*Math.sin(u-e)]);let d=2*Math.PI+u-.01;for(let o=u;o<d;o+=e){let e=[K(a,s)+t+r*Math.cos(o),K(a,s)+n+i*Math.sin(o)];c.push(e),l.push(e)}l.push([K(a,s)+t+r*Math.cos(u+2*Math.PI+.5*o),K(a,s)+n+i*Math.sin(u+2*Math.PI+.5*o)]),l.push([K(a,s)+t+.98*r*Math.cos(u+o),K(a,s)+n+.98*i*Math.sin(u+o)]),l.push([K(a,s)+t+.9*r*Math.cos(u+.5*o),K(a,s)+n+.9*i*Math.sin(u+.5*o)])}return[l,c]}function Sh(e,t,n,r,i,a,o,s,c){let l=a+K(.1,c),u=[];u.push([K(s,c)+t+.9*r*Math.cos(l-e),K(s,c)+n+.9*i*Math.sin(l-e)]);for(let a=l;a<=o;a+=e)u.push([K(s,c)+t+r*Math.cos(a),K(s,c)+n+i*Math.sin(a)]);return u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),u.push([t+r*Math.cos(o),n+i*Math.sin(o)]),bh(u,null,c)}function Ch(e,t,n,r,i,a,o,s){let c=[],l=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3],u=[0,0],d=s.disableMultiStroke?1:2,f=s.preserveVertices;for(let p=0;p<d;p++)p===0?c.push({op:`move`,data:[o[0],o[1]]}):c.push({op:`move`,data:[o[0]+(f?0:K(l[0],s)),o[1]+(f?0:K(l[0],s))]}),u=f?[i,a]:[i+K(l[p],s),a+K(l[p],s)],c.push({op:`bcurveTo`,data:[e+K(l[p],s),t+K(l[p],s),n+K(l[p],s),r+K(l[p],s),u[0],u[1]]});return c}function wh(e){return[...e]}function Th(e,t=0){let n=e.length;if(n<3)throw Error(`A curve must have at least three points.`);let r=[];if(n===3)r.push(wh(e[0]),wh(e[1]),wh(e[2]),wh(e[2]));else{let n=[];n.push(e[0],e[0]);for(let t=1;t<e.length;t++)n.push(e[t]),t===e.length-1&&n.push(e[t]);let i=[],a=1-t;r.push(wh(n[0]));for(let e=1;e+2<n.length;e++){let t=n[e];i[0]=[t[0],t[1]],i[1]=[t[0]+(a*n[e+1][0]-a*n[e-1][0])/6,t[1]+(a*n[e+1][1]-a*n[e-1][1])/6],i[2]=[n[e+1][0]+(a*n[e][0]-a*n[e+2][0])/6,n[e+1][1]+(a*n[e][1]-a*n[e+2][1])/6],i[3]=[n[e+1][0],n[e+1][1]],r.push(i[1],i[2],i[3])}}return r}function Eh(e,t){return(e[0]-t[0])**2+(e[1]-t[1])**2}function Dh(e,t,n){let r=Eh(t,n);if(r===0)return Eh(e,t);let i=((e[0]-t[0])*(n[0]-t[0])+(e[1]-t[1])*(n[1]-t[1]))/r;return i=Math.max(0,Math.min(1,i)),Eh(e,Oh(t,n,i))}function Oh(e,t,n){return[e[0]+(t[0]-e[0])*n,e[1]+(t[1]-e[1])*n]}function kh(e,t,n,r){let i=r||[];if(function(e,t){let n=e[t+0],r=e[t+1],i=e[t+2],a=e[t+3],o=3*r[0]-2*n[0]-a[0];o*=o;let s=3*r[1]-2*n[1]-a[1];s*=s;let c=3*i[0]-2*a[0]-n[0];c*=c;let l=3*i[1]-2*a[1]-n[1];return l*=l,o<c&&(o=c),s<l&&(s=l),o+s}(e,t)<n){let n=e[t+0];i.length?(a=i[i.length-1],o=n,Math.sqrt(Eh(a,o)))>1&&i.push(n):i.push(n),i.push(e[t+3])}else{let r=.5,a=e[t+0],o=e[t+1],s=e[t+2],c=e[t+3],l=Oh(a,o,r),u=Oh(o,s,r),d=Oh(s,c,r),f=Oh(l,u,r),p=Oh(u,d,r),m=Oh(f,p,r);kh([a,l,f,m],0,n,i),kh([m,p,d,c],0,n,i)}var a,o;return i}function Ah(e,t){return jh(e,0,e.length,t)}function jh(e,t,n,r,i){let a=i||[],o=e[t],s=e[n-1],c=0,l=1;for(let r=t+1;r<n-1;++r){let t=Dh(e[r],o,s);t>c&&(c=t,l=r)}return Math.sqrt(c)>r?(jh(e,t,l+1,r,a),jh(e,l,n,r,a)):(a.length||a.push(o),a.push(s)),a}function Mh(e,t=.15,n){let r=[],i=(e.length-1)/3;for(let n=0;n<i;n++)kh(e,3*n,t,r);return n&&n>0?jh(r,0,r.length,n):r}var Nh=`none`,Ph=class{constructor(e){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:`#000`,strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:`hachure`,fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=e||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(e){return e?Object.assign({},this.defaultOptions,e):this.defaultOptions}_d(e,t,n){return{shape:e,sets:t||[],options:n||this.defaultOptions}}line(e,t,n,r,i){let a=this._o(i);return this._d(`line`,[ih(e,t,n,r,a)],a)}rectangle(e,t,n,r,i){let a=this._o(i),o=[],s=oh(e,t,n,r,a);if(a.fill){let i=[[e,t],[e+n,t],[e+n,t+r],[e,t+r]];a.fillStyle===`solid`?o.push(fh([i],a)):o.push(ph([i],a))}return a.stroke!==Nh&&o.push(s),this._d(`rectangle`,o,a)}ellipse(e,t,n,r,i){let a=this._o(i),o=[],s=ch(n,r,a),c=lh(e,t,a,s);if(a.fill)if(a.fillStyle===`solid`){let n=lh(e,t,a,s).opset;n.type=`fillPath`,o.push(n)}else o.push(ph([c.estimatedPoints],a));return a.stroke!==Nh&&o.push(c.opset),this._d(`ellipse`,o,a)}circle(e,t,n,r){let i=this.ellipse(e,t,n,n,r);return i.shape=`circle`,i}linearPath(e,t){let n=this._o(t);return this._d(`linearPath`,[ah(e,!1,n)],n)}arc(e,t,n,r,i,a,o=!1,s){let c=this._o(s),l=[],u=uh(e,t,n,r,i,a,o,!0,c);if(o&&c.fill)if(c.fillStyle===`solid`){let o=Object.assign({},c);o.disableMultiStroke=!0;let s=uh(e,t,n,r,i,a,!0,!1,o);s.type=`fillPath`,l.push(s)}else l.push(function(e,t,n,r,i,a,o){let s=e,c=t,l=Math.abs(n/2),u=Math.abs(r/2);l+=K(.01*l,o),u+=K(.01*u,o);let d=i,f=a;for(;d<0;)d+=2*Math.PI,f+=2*Math.PI;f-d>2*Math.PI&&(d=0,f=2*Math.PI);let p=(f-d)/o.curveStepCount,m=[];for(let e=d;e<=f;e+=p)m.push([s+l*Math.cos(e),c+u*Math.sin(e)]);return m.push([s+l*Math.cos(f),c+u*Math.sin(f)]),m.push([s,c]),ph([m],o)}(e,t,n,r,i,a,c));return c.stroke!==Nh&&l.push(u),this._d(`arc`,l,c)}curve(e,t){let n=this._o(t),r=[],i=sh(e,n);if(n.fill&&n.fill!==Nh)if(n.fillStyle===`solid`){let t=sh(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else{let t=[],i=e;if(i.length){let e=typeof i[0][0]==`number`?[i]:i;for(let r of e)r.length<3?t.push(...r):r.length===3?t.push(...Mh(Th([r[0],r[0],r[1],r[2]]),10,(1+n.roughness)/2)):t.push(...Mh(Th(r),10,(1+n.roughness)/2))}t.length&&r.push(ph([t],n))}return n.stroke!==Nh&&r.push(i),this._d(`curve`,r,n)}polygon(e,t){let n=this._o(t),r=[],i=ah(e,!0,n);return n.fill&&(n.fillStyle===`solid`?r.push(fh([e],n)):r.push(ph([e],n))),n.stroke!==Nh&&r.push(i),this._d(`polygon`,r,n)}path(e,t){let n=this._o(t),r=[];if(!e)return this._d(`path`,r,n);e=(e||``).replace(/\n/g,` `).replace(/(-\s)/g,`-`).replace(`/(ss)/g`,` `);let i=n.fill&&n.fill!==`transparent`&&n.fill!==Nh,a=n.stroke!==Nh,o=!!(n.simplification&&n.simplification<1),s=function(e,t,n){let r=eh($m(Qm(e))),i=[],a=[],o=[0,0],s=[],c=()=>{s.length>=4&&a.push(...Mh(s,t)),s=[]},l=()=>{c(),a.length&&(i.push(a),a=[])};for(let{key:e,data:t}of r)switch(e){case`M`:l(),o=[t[0],t[1]],a.push(o);break;case`L`:c(),a.push([t[0],t[1]]);break;case`C`:if(!s.length){let e=a.length?a[a.length-1]:o;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case`Z`:c(),a.push([o[0],o[1]])}if(l(),!n)return i;let u=[];for(let e of i){let t=Ah(e,n);t.length&&u.push(t)}return u}(e,1,o?4-4*(n.simplification||1):(1+n.roughness)/2),c=dh(e,n);if(i)if(n.fillStyle===`solid`)if(s.length===1){let t=dh(e,Object.assign(Object.assign({},n),{disableMultiStroke:!0,roughness:n.roughness?n.roughness+n.fillShapeRoughnessGain:0}));r.push({type:`fillPath`,ops:this._mergedShape(t.ops)})}else r.push(fh(s,n));else r.push(ph(s,n));return a&&(o?s.forEach((e=>{r.push(ah(e,!1,n))})):r.push(c)),this._d(`path`,r,n)}opsToPath(e,t){let n=``;for(let r of e.ops){let e=typeof t==`number`&&t>=0?r.data.map((e=>+e.toFixed(t))):r.data;switch(r.op){case`move`:n+=`M${e[0]} ${e[1]} `;break;case`bcurveTo`:n+=`C${e[0]} ${e[1]}, ${e[2]} ${e[3]}, ${e[4]} ${e[5]} `;break;case`lineTo`:n+=`L${e[0]} ${e[1]} `}}return n.trim()}toPaths(e){let t=e.sets||[],n=e.options||this.defaultOptions,r=[];for(let e of t){let t=null;switch(e.type){case`path`:t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:Nh};break;case`fillPath`:t={d:this.opsToPath(e),stroke:Nh,strokeWidth:0,fill:n.fill||Nh};break;case`fillSketch`:t=this.fillSketch(e,n)}t&&r.push(t)}return r}fillSketch(e,t){let n=t.fillWeight;return n<0&&(n=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||Nh,strokeWidth:n,fill:Nh}}_mergedShape(e){return e.filter(((e,t)=>t===0||e.op!==`move`))}},Fh=class{constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext(`2d`),this.gen=new Ph(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.ctx,i=e.options.fixedDecimalPlaceDigits;for(let a of t)switch(a.type){case`path`:r.save(),r.strokeStyle=n.stroke===`none`?`transparent`:n.stroke,r.lineWidth=n.strokeWidth,n.strokeLineDash&&r.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(r.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(r,a,i),r.restore();break;case`fillPath`:{r.save(),r.fillStyle=n.fill||``;let t=e.shape===`curve`||e.shape===`polygon`||e.shape===`path`?`evenodd`:`nonzero`;this._drawToContext(r,a,i,t),r.restore();break}case`fillSketch`:this.fillSketch(r,a,n)}}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2),e.save(),n.fillLineDash&&e.setLineDash(n.fillLineDash),n.fillLineDashOffset&&(e.lineDashOffset=n.fillLineDashOffset),e.strokeStyle=n.fill||``,e.lineWidth=r,this._drawToContext(e,t,n.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,n,r=`nonzero`){e.beginPath();for(let r of t.ops){let t=typeof n==`number`&&n>=0?r.data.map((e=>+e.toFixed(n))):r.data;switch(r.op){case`move`:e.moveTo(t[0],t[1]);break;case`bcurveTo`:e.bezierCurveTo(t[0],t[1],t[2],t[3],t[4],t[5]);break;case`lineTo`:e.lineTo(t[0],t[1])}}t.type===`fillPath`?e.fill(r):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a),a}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a),a}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a),a}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i),i}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n),n}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n),n}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c),c}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n),n}path(e,t){let n=this.gen.path(e,t);return this.draw(n),n}},Ih=`http://www.w3.org/2000/svg`,Lh=class{constructor(e,t){this.svg=e,this.gen=new Ph(t)}draw(e){let t=e.sets||[],n=e.options||this.getDefaultOptions(),r=this.svg.ownerDocument||window.document,i=r.createElementNS(Ih,`g`),a=e.options.fixedDecimalPlaceDigits;for(let o of t){let t=null;switch(o.type){case`path`:t=r.createElementNS(Ih,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,n.stroke),t.setAttribute(`stroke-width`,n.strokeWidth+``),t.setAttribute(`fill`,`none`),n.strokeLineDash&&t.setAttribute(`stroke-dasharray`,n.strokeLineDash.join(` `).trim()),n.strokeLineDashOffset&&t.setAttribute(`stroke-dashoffset`,`${n.strokeLineDashOffset}`);break;case`fillPath`:t=r.createElementNS(Ih,`path`),t.setAttribute(`d`,this.opsToPath(o,a)),t.setAttribute(`stroke`,`none`),t.setAttribute(`stroke-width`,`0`),t.setAttribute(`fill`,n.fill||``),e.shape!==`curve`&&e.shape!==`polygon`||t.setAttribute(`fill-rule`,`evenodd`);break;case`fillSketch`:t=this.fillSketch(r,o,n)}t&&i.appendChild(t)}return i}fillSketch(e,t,n){let r=n.fillWeight;r<0&&(r=n.strokeWidth/2);let i=e.createElementNS(Ih,`path`);return i.setAttribute(`d`,this.opsToPath(t,n.fixedDecimalPlaceDigits)),i.setAttribute(`stroke`,n.fill||``),i.setAttribute(`stroke-width`,r+``),i.setAttribute(`fill`,`none`),n.fillLineDash&&i.setAttribute(`stroke-dasharray`,n.fillLineDash.join(` `).trim()),n.fillLineDashOffset&&i.setAttribute(`stroke-dashoffset`,`${n.fillLineDashOffset}`),i}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(e,t){return this.gen.opsToPath(e,t)}line(e,t,n,r,i){let a=this.gen.line(e,t,n,r,i);return this.draw(a)}rectangle(e,t,n,r,i){let a=this.gen.rectangle(e,t,n,r,i);return this.draw(a)}ellipse(e,t,n,r,i){let a=this.gen.ellipse(e,t,n,r,i);return this.draw(a)}circle(e,t,n,r){let i=this.gen.circle(e,t,n,r);return this.draw(i)}linearPath(e,t){let n=this.gen.linearPath(e,t);return this.draw(n)}polygon(e,t){let n=this.gen.polygon(e,t);return this.draw(n)}arc(e,t,n,r,i,a,o=!1,s){let c=this.gen.arc(e,t,n,r,i,a,o,s);return this.draw(c)}curve(e,t){let n=this.gen.curve(e,t);return this.draw(n)}path(e,t){let n=this.gen.path(e,t);return this.draw(n)}},q={canvas:(e,t)=>new Fh(e,t),svg:(e,t)=>new Lh(e,t),generator:e=>new Ph(e),newSeed:()=>Ph.newSeed()},J=l(async(e,t,n)=>{let r,i=t.useHtmlLabels||pn(z()?.htmlLabels);r=n||`node default`;let a=e.insert(`g`).attr(`class`,r).attr(`id`,t.domId||t.id),o=a.insert(`g`).attr(`class`,`label`).attr(`style`,qd(t.labelStyle)),s;s=t.label===void 0?``:typeof t.label==`string`?t.label:t.label[0];let c=!!t.icon||!!t.img,l=t.labelType===`markdown`,u=await xm(o,zn(Gd(s),z()),{useHtmlLabels:i,width:t.width||z().flowchart?.wrappingWidth,classes:l?`markdown-node-label`:``,style:t.labelStyle,addSvgBackground:c,markdown:l},z()),d=u.getBBox(),f=(t?.padding??0)/2;if(i){let e=u.children[0],t=B(u);await Om(e,s),d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}return i?o.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`):o.attr(`transform`,`translate(0, `+-d.height/2+`)`),t.centerLabel&&o.attr(`transform`,`translate(`+-d.width/2+`, `+-d.height/2+`)`),o.insert(`rect`,`:first-child`),{shapeSvg:a,bbox:d,halfPadding:f,label:o}},`labelHelper`),Rh=l(async(e,t,n)=>{let r=n.useHtmlLabels??Mn(z()),i=e.insert(`g`).attr(`class`,`label`).attr(`style`,n.labelStyle||``),a=await xm(i,zn(Gd(t),z()),{useHtmlLabels:r,width:n.width||z()?.flowchart?.wrappingWidth,style:n.labelStyle,addSvgBackground:!!n.icon||!!n.img}),o=a.getBBox(),s=n.padding/2;if(Mn(z())){let e=a.children[0],t=B(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}return r?i.attr(`transform`,`translate(`+-o.width/2+`, `+-o.height/2+`)`):i.attr(`transform`,`translate(0, `+-o.height/2+`)`),n.centerLabel&&i.attr(`transform`,`translate(`+-o.width/2+`, `+-o.height/2+`)`),i.insert(`rect`,`:first-child`),{shapeSvg:e,bbox:o,halfPadding:s,label:i}},`insertLabel`),Y=l((e,t)=>{let n=t.node().getBBox();e.width=n.width,e.height=n.height},`updateNodeBounds`),X=l((e,t)=>(e.look===`handDrawn`?`rough-node`:`node`)+` `+e.cssClasses+` `+(t||``),`getNodeClasses`);function Z(e){let t=e.map((e,t)=>`${t===0?`M`:`L`}${e.x},${e.y}`);return t.push(`Z`),t.join(` `)}l(Z,`createPathFromPoints`);function zh(e,t,n,r,i,a){let o=[],s=n-e,c=r-t,l=s/a,u=2*Math.PI/l,d=t+c/2;for(let t=0;t<=50;t++){let n=e+t/50*s,r=d+i*Math.sin(u*(n-e));o.push({x:n,y:r})}return o}l(zh,`generateFullSineWavePoints`);function Bh(e,t,n,r,i,a){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}l(Bh,`generateCirclePoints`);function Vh(e){let t=Array.from(e.childNodes).filter(e=>e.tagName===`path`),n=document.createElementNS(`http://www.w3.org/2000/svg`,`path`),r=t.map(e=>e.getAttribute(`d`)).filter(e=>e!==null).join(` `);n.setAttribute(`d`,r);let i=t.find(e=>e.getAttribute(`fill`)!==`none`),a=t.find(e=>e.getAttribute(`stroke`)!==`none`),o=l((e,t)=>e?.getAttribute(t)??void 0,`getAttr`);if(i){let e={fill:o(i,`fill`),"fill-opacity":o(i,`fill-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}if(a){let e={stroke:o(a,`stroke`),"stroke-width":o(a,`stroke-width`)??`1`,"stroke-opacity":o(a,`stroke-opacity`)??`1`};Object.entries(e).forEach(([e,t])=>{t&&n.setAttribute(e,t)})}let s=document.createElementNS(`http://www.w3.org/2000/svg`,`g`);return s.appendChild(n),s}l(Vh,`mergePaths`);var Hh=l((e,t)=>{var n=e.x,r=e.y,i=t.x-n,a=t.y-r,o=e.width/2,s=e.height/2,c,l;return Math.abs(a)*o>Math.abs(i)*s?(a<0&&(s=-s),c=a===0?0:s*i/a,l=s):(i<0&&(o=-o),c=o,l=i===0?0:o*a/i),{x:n+c,y:r+l}},`intersectRect`),Uh=l(async(e,t,n,r=!1,i=!1)=>{let a=t||``;typeof a==`object`&&(a=a[0]);let o=z(),s=Mn(o);return await xm(e,a,{style:n,isTitle:r,useHtmlLabels:s,markdown:!1,isNode:i,width:1/0},o)},`createLabel`),Wh=l((e,t,n,r,i)=>[`M`,e+i,t,`H`,e+n-i,`A`,i,i,0,0,1,e+n,t+i,`V`,t+r-i,`A`,i,i,0,0,1,e+n-i,t+r,`H`,e+i,`A`,i,i,0,0,1,e,t+r-i,`V`,t+i,`A`,i,i,0,0,1,e+i,t,`Z`].join(` `),`createRoundedRectPathD`),Gh=l(async(e,t)=>{f.info(`Creating subgraph rect for `,t.id,t);let n=z(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:u}=W(t),d=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=Mn(n),m=d.insert(`g`).attr(`class`,`cluster-label `),h;h=t.labelType===`markdown`?await xm(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}):await Uh(m,t.label,t.labelStyle||``,!1,!0);let g=h.getBBox();if(Mn(n)){let e=h.children[0],t=B(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;f.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=q.svg(d),n=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:3,seed:i}),r=e.path(Wh(y,b,_,v,0),n);x=d.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,l.join(`;`)),x.select(`path`).attr(`style`,u.join(`;`).replace(`fill`,`stroke`))}else x=d.insert(`rect`,`:first-child`),x.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=Dm(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return Hh(t,e)},{cluster:d,labelBBox:g}},`rect`),Kh={rect:Gh,squareRect:Gh,roundedWithTitle:l(async(e,t)=>{let n=z(),{themeVariables:r,handDrawnSeed:i}=n,{altBackground:a,compositeBackground:o,compositeTitleBackground:s,nodeBorder:c}=r,l=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-id`,t.id).attr(`data-look`,t.look),u=l.insert(`g`,`:first-child`),d=l.insert(`g`).attr(`class`,`cluster-label`),f=l.append(`rect`),p=await Uh(d,t.label,t.labelStyle,void 0,!0),m=p.getBBox();if(Mn(n)){let e=p.children[0],t=B(p);m=e.getBoundingClientRect(),t.attr(`width`,m.width),t.attr(`height`,m.height)}let h=0*t.padding,g=h/2,_=(t.width<=m.width+t.padding?m.width+t.padding:t.width)+h;t.width<=m.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height+h,y=t.height+h-m.height-6,b=t.x-_/2,x=t.y-v/2;t.width=_;let S=t.y-t.height/2-g+m.height+2,C;if(t.look===`handDrawn`){let e=t.cssClasses.includes(`statediagram-cluster-alt`),n=q.svg(l),r=t.rx||t.ry?n.path(Wh(b,x,_,v,10),{roughness:.7,fill:s,fillStyle:`solid`,stroke:c,seed:i}):n.rectangle(b,x,_,v,{seed:i});C=l.insert(()=>r,`:first-child`);let u=n.rectangle(b,S,_,y,{fill:e?a:o,fillStyle:e?`hachure`:`solid`,stroke:c,seed:i});C=l.insert(()=>r,`:first-child`),f=l.insert(()=>u)}else C=u.insert(`rect`,`:first-child`),C.attr(`class`,`outer`).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,v).attr(`data-look`,t.look),f.attr(`class`,`inner`).attr(`x`,b).attr(`y`,S).attr(`width`,_).attr(`height`,y);return d.attr(`transform`,`translate(${t.x-m.width/2}, ${x+1-(Mn(n)?0:3)})`),t.height=C.node().getBBox().height,t.offsetX=0,t.offsetY=m.height-t.padding/2,t.labelBBox=m,t.intersect=function(e){return Hh(t,e)},{cluster:l,labelBBox:m}},`roundedWithTitle`),noteGroup:l((e,t)=>{let n=e.insert(`g`).attr(`class`,`note-cluster`).attr(`id`,t.domId),r=n.insert(`rect`,`:first-child`),i=0*t.padding,a=i/2;r.attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,t.x-t.width/2-a).attr(`y`,t.y-t.height/2-a).attr(`width`,t.width+i).attr(`height`,t.height+i).attr(`fill`,`none`);let o=r.node().getBBox();return t.width=o.width,t.height=o.height,t.intersect=function(e){return Hh(t,e)},{cluster:n,labelBBox:{width:0,height:0}}},`noteGroup`),divider:l((e,t)=>{let{themeVariables:n,handDrawnSeed:r}=z(),{nodeBorder:i}=n,a=e.insert(`g`).attr(`class`,t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),o=a.insert(`g`,`:first-child`),s=0*t.padding,c=t.width+s;t.diff=-t.padding;let l=t.height+s,u=t.x-c/2,d=t.y-l/2;t.width=c;let f;if(t.look===`handDrawn`){let e=q.svg(a).rectangle(u,d,c,l,{fill:`lightgrey`,roughness:.5,strokeLineDash:[5],stroke:i,seed:r});f=a.insert(()=>e,`:first-child`)}else{f=o.insert(`rect`,`:first-child`);let e=`outer`;e=(t.look,`divider`),f.attr(`class`,e).attr(`x`,u).attr(`y`,d).attr(`width`,c).attr(`height`,l).attr(`data-look`,t.look)}return t.height=f.node().getBBox().height,t.offsetX=0,t.offsetY=0,t.intersect=function(e){return Hh(t,e)},{cluster:a,labelBBox:{}}},`divider`),kanbanSection:l(async(e,t)=>{f.info(`Creating subgraph rect for `,t.id,t);let n=z(),{themeVariables:r,handDrawnSeed:i}=n,{clusterBkg:a,clusterBorder:o}=r,{labelStyles:s,nodeStyles:c,borderStyles:l,backgroundStyles:u}=W(t),d=e.insert(`g`).attr(`class`,`cluster `+t.cssClasses).attr(`id`,t.domId).attr(`data-look`,t.look),p=Mn(n),m=d.insert(`g`).attr(`class`,`cluster-label `),h=await xm(m,t.label,{style:t.labelStyle,useHtmlLabels:p,isNode:!0,width:t.width}),g=h.getBBox();if(Mn(n)){let e=h.children[0],t=B(h);g=e.getBoundingClientRect(),t.attr(`width`,g.width),t.attr(`height`,g.height)}let _=t.width<=g.width+t.padding?g.width+t.padding:t.width;t.width<=g.width+t.padding?t.diff=(_-t.width)/2-t.padding:t.diff=-t.padding;let v=t.height,y=t.x-_/2,b=t.y-v/2;f.trace(`Data `,t,JSON.stringify(t));let x;if(t.look===`handDrawn`){let e=q.svg(d),n=G(t,{roughness:.7,fill:a,stroke:o,fillWeight:4,seed:i}),r=e.path(Wh(y,b,_,v,t.rx),n);x=d.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`),x.select(`path:nth-child(2)`).attr(`style`,l.join(`;`)),x.select(`path`).attr(`style`,u.join(`;`).replace(`fill`,`stroke`))}else x=d.insert(`rect`,`:first-child`),x.attr(`style`,c).attr(`rx`,t.rx).attr(`ry`,t.ry).attr(`x`,y).attr(`y`,b).attr(`width`,_).attr(`height`,v);let{subGraphTitleTopMargin:S}=Dm(n);if(m.attr(`transform`,`translate(${t.x-g.width/2}, ${t.y-t.height/2+S})`),s){let e=m.select(`span`);e&&e.attr(`style`,s)}let C=x.node().getBBox();return t.offsetX=0,t.width=C.width,t.height=C.height,t.offsetY=g.height-t.padding/2,t.intersect=function(e){return Hh(t,e)},{cluster:d,labelBBox:g}},`kanbanSection`)},qh=new Map,Jh=l(async(e,t)=>{let n=await Kh[t.shape||`rect`](e,t);return qh.set(t.id,n),n},`insertCluster`),Yh=l(()=>{qh=new Map},`clear`);function Xh(e,t){return e.intersect(t)}l(Xh,`intersectNode`);var Zh=Xh;function Qh(e,t,n,r){var i=e.x,a=e.y,o=i-r.x,s=a-r.y,c=Math.sqrt(t*t*s*s+n*n*o*o),l=Math.abs(t*n*o/c);r.x<i&&(l=-l);var u=Math.abs(t*n*s/c);return r.y<a&&(u=-u),{x:i+l,y:a+u}}l(Qh,`intersectEllipse`);var $h=Qh;function eg(e,t,n){return $h(e,t,t,n)}l(eg,`intersectCircle`);var tg=eg;function ng(e,t,n,r){{let i=t.y-e.y,a=e.x-t.x,o=t.x*e.y-e.x*t.y,s=i*n.x+a*n.y+o,c=i*r.x+a*r.y+o,l=1e-6;if(s!==0&&c!==0&&rg(s,c))return;let u=r.y-n.y,d=n.x-r.x,f=r.x*n.y-n.x*r.y,p=u*e.x+d*e.y+f,m=u*t.x+d*t.y+f;if(Math.abs(p)<l&&Math.abs(m)<l&&rg(p,m))return;let h=i*d-u*a;if(h===0)return;let g=Math.abs(h/2),_=a*f-d*o,v=_<0?(_-g)/h:(_+g)/h;return _=u*o-i*f,{x:v,y:_<0?(_-g)/h:(_+g)/h}}}l(ng,`intersectLine`);function rg(e,t){return e*t>0}l(rg,`sameSign`);var ig=ng;function ag(e,t,n){let r=e.x,i=e.y,a=[],o=1/0,s=1/0;typeof t.forEach==`function`?t.forEach(function(e){o=Math.min(o,e.x),s=Math.min(s,e.y)}):(o=Math.min(o,t.x),s=Math.min(s,t.y));let c=r-e.width/2-o,l=i-e.height/2-s;for(let r=0;r<t.length;r++){let i=t[r],o=t[r<t.length-1?r+1:0],s=ig(e,n,{x:c+i.x,y:l+i.y},{x:c+o.x,y:l+o.y});s&&a.push(s)}return a.length?(a.length>1&&a.sort(function(e,t){let r=e.x-n.x,i=e.y-n.y,a=Math.sqrt(r*r+i*i),o=t.x-n.x,s=t.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}),a[0]):e}l(ag,`intersectPolygon`);var Q={node:Zh,circle:tg,ellipse:$h,polygon:ag,rect:Hh};function og(e,t){let{labelStyles:n}=W(t);t.labelStyle=n;let r=X(t),i=r;r||(i=`anchor`);let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),{cssStyles:o}=t,s=q.svg(a),c=G(t,{fill:`black`,stroke:`none`,fillStyle:`solid`});t.look!==`handDrawn`&&(c.roughness=0);let l=s.circle(0,0,2,c),u=a.insert(()=>l,`:first-child`);return u.attr(`class`,`anchor`).attr(`style`,qd(o)),Y(t,u),t.intersect=function(e){return f.info(`Circle intersect`,t,1,e),Q.circle(t,1,e)},a}l(og,`anchor`);function sg(e,t,n,r,i,a,o){let s=(e+n)/2,c=(t+r)/2,l=Math.atan2(r-t,n-e),u=(n-e)/2,d=(r-t)/2,f=u/i,p=d/a,m=Math.sqrt(f**2+p**2);if(m>1)throw Error(`The given radii are too small to create an arc between the points.`);let h=Math.sqrt(1-m**2),g=s+h*a*Math.sin(l)*(o?-1:1),_=c-h*i*Math.cos(l)*(o?-1:1),v=Math.atan2((t-_)/a,(e-g)/i),y=Math.atan2((r-_)/a,(n-g)/i)-v;o&&y<0&&(y+=2*Math.PI),!o&&y>0&&(y-=2*Math.PI);let b=[];for(let e=0;e<20;e++){let t=v+e/19*y,n=g+i*Math.cos(t),r=_+a*Math.sin(t);b.push({x:n,y:r})}return b}l(sg,`generateArcPoints`);function cg(e,t,n){let[r,i]=[t,n].sort((e,t)=>t-e);return i*(1-Math.sqrt(1-(e/r/2)**2))}l(cg,`calculateArcSagitta`);async function lg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=l(e=>e+o,`calcTotalHeight`),c=l(e=>{let t=e/2;return[t/(2.5+e/50),t]},`calcEllipseRadius`),{shapeSvg:u,bbox:d}=await J(e,t,X(t)),f=s(t?.height?t?.height:d.height),[p,m]=c(f),h=cg(f,p,m),g=(t?.width?t?.width:d.width)+a*2+h-h,_=f,{cssStyles:v}=t,y=[{x:g/2,y:-_/2},{x:-g/2,y:-_/2},...sg(-g/2,-_/2,-g/2,_/2,p,m,!1),{x:g/2,y:_/2},...sg(g/2,_/2,g/2,-_/2,p,m,!0)],b=q.svg(u),x=G(t,{});t.look!==`handDrawn`&&(x.roughness=0,x.fillStyle=`solid`);let S=Z(y),C=b.path(S,x),w=u.insert(()=>C,`:first-child`);return w.attr(`class`,`basic label-container outer-path`),v&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,v),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${p/2}, 0)`),Y(t,w),t.intersect=function(e){return Q.polygon(t,y,e)},u}l(lg,`bowTieRect`);function ug(e,t,n,r){return e.insert(`polygon`,`:first-child`).attr(`points`,r.map(function(e){return e.x+`,`+e.y}).join(` `)).attr(`class`,`label-container`).attr(`transform`,`translate(`+-t/2+`,`+n/2+`)`)}l(ug,`insertPolygonShape`);var dg=12;async function fg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?28:i,o=t.look===`neo`?24:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width??c.width)+(t.look===`neo`?a*2:a+dg),u=(t?.height??c.height)+(t.look===`neo`?o*2:o),d=l,f=-u,p=[{x:0+dg,y:f},{x:d,y:f},{x:d,y:0},{x:0,y:0},{x:0,y:f+dg},{x:0+dg,y:f}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(p),i=e.path(r,n);m=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=ug(s,l,u,p);return r&&m.attr(`style`,r),Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},s}l(fg,`card`);function pg(e,t){let{nodeStyles:n}=W(t);t.label=``;let r=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:i}=t,a=Math.max(28,t.width??0),o=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],s=q.svg(r),c=G(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=Z(o),u=s.path(l,c),d=r.insert(()=>u,`:first-child`);return i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),n&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,n),t.width=28,t.height=28,t.intersect=function(e){return Q.polygon(t,o,e)},r}l(pg,`choice`);async function mg(e,t,n){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o,halfPadding:s}=await J(e,t,X(t)),c=n?.padding??s,l=t.look===`neo`?o.width/2+32:o.width/2+c,u,{cssStyles:d}=t;if(t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=e.circle(0,0,l*2,n);u=a.insert(()=>r,`:first-child`),u.attr(`class`,`basic label-container`).attr(`style`,qd(d))}else u=a.insert(`circle`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,i).attr(`r`,l).attr(`cx`,0).attr(`cy`,0);return Y(t,u),t.calcIntersect=function(e,t){let n=e.width/2;return Q.circle(e,n,t)},t.intersect=function(e){return f.info(`Circle intersect`,t,l,e),Q.circle(t,l,e)},a}l(mg,`circle`);function hg(e){let t=Math.cos(Math.PI/4),n=Math.sin(Math.PI/4),r=e*2,i={x:r/2*t,y:r/2*n},a={x:-(r/2)*t,y:r/2*n},o={x:-(r/2)*t,y:-(r/2)*n},s={x:r/2*t,y:-(r/2)*n};return`M ${a.x},${a.y} L ${s.x},${s.y}
|
|
196
|
-
M ${i.x},${i.y} L ${o.x},${o.y}`}l(hg,`createLine`);function gg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n,t.label=``;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),a=Math.max(30,t?.width??0),{cssStyles:o}=t,s=q.svg(i),c=G(t,{});t.look!==`handDrawn`&&(c.roughness=0,c.fillStyle=`solid`);let l=s.circle(0,0,a*2,c),u=hg(a),d=s.path(u,c),p=i.insert(()=>l,`:first-child`);return p.insert(()=>d),p.attr(`class`,`outer-path`),o&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,o),r&&t.look!==`handDrawn`&&p.selectAll(`path`).attr(`style`,r),Y(t,p),t.intersect=function(e){return f.info(`crossedCircle intersect`,t,{radius:a,point:e}),Q.circle(t,a,e)},i}l(gg,`crossedCircle`);function _g(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}l(_g,`generateCirclePoints`);async function vg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+s,u=a.height+c,d=Math.max(5,u*.1),{cssStyles:f}=t,p=[..._g(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},..._g(l/2+d*2,-d,d,20,-180,-270),..._g(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},..._g(l/2,u/2,d,20,0,90)],m=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},..._g(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},..._g(l/2+l*.1,-d,d,20,-180,-270),..._g(l/2+l*.1,d,d,20,-90,-180),{x:-l/2-d,y:u/2},..._g(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2,y:u/2+d}],h=q.svg(i),g=G(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p).replace(`Z`,``),v=h.path(_,g),y=Z(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${d}, 0)`),o.attr(`transform`,`translate(${-l/2+d-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}l(vg,`curlyBraceLeft`);function yg(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:a,y:l})}return o}l(yg,`generateCirclePoints`);async function bg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...yg(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...yg(l/2+d*2,-d,d,20,-180,-270),...yg(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...yg(l/2,u/2,d,20,0,90)],m=[{x:-l/2,y:-u/2-d},{x:l/2,y:-u/2-d},...yg(l/2,-u/2,d,20,-90,0),{x:l/2+d,y:-d},...yg(l/2+d*2,-d,d,20,-180,-270),...yg(l/2+d*2,d,d,20,-90,-180),{x:l/2+d,y:u/2},...yg(l/2,u/2,d,20,0,90),{x:l/2,y:u/2+d},{x:-l/2,y:u/2+d}],h=q.svg(i),g=G(t,{fill:`none`});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p).replace(`Z`,``),v=h.path(_,g),y=Z(m),b=h.path(y,{...g}),x=i.insert(`g`,`:first-child`);return x.insert(()=>b,`:first-child`).attr(`stroke-opacity`,0),x.insert(()=>v,`:first-child`),x.attr(`class`,`text`),f&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-d}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,m,e)},i}l(bg,`curlyBraceRight`);function xg(e,t,n,r=100,i=0,a=180){let o=[],s=i*Math.PI/180,c=(a*Math.PI/180-s)/(r-1);for(let i=0;i<r;i++){let r=s+i*c,a=e+n*Math.cos(r),l=t+n*Math.sin(r);o.push({x:-a,y:-l})}return o}l(xg,`generateCirclePoints`);async function Sg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.look===`neo`?18:t.padding??0,c=t.look===`neo`?12:t.padding??0,l=a.width+(t.look===`neo`?s*2:s),u=a.height+(t.look===`neo`?c*2:c),d=Math.max(5,u*.1),{cssStyles:f}=t,p=[...xg(l/2,-u/2,d,30,-90,0),{x:-l/2-d,y:d},...xg(l/2+d*2,-d,d,20,-180,-270),...xg(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:-u/2},...xg(l/2,u/2,d,20,0,90)],m=[...xg(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...xg(-l/2-d/2,-d,d,20,0,90),...xg(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...xg(-l/2+d+d/2,u/2,d,30,-180,-270)],h=[{x:l/2,y:-u/2-d},{x:-l/2,y:-u/2-d},...xg(l/2,-u/2,d,20,-90,0),{x:-l/2-d,y:-d},...xg(l/2+d*2,-d,d,20,-180,-270),...xg(l/2+d*2,d,d,20,-90,-180),{x:-l/2-d,y:u/2},...xg(l/2,u/2,d,20,0,90),{x:-l/2,y:u/2+d},{x:l/2-d-d/2,y:u/2+d},...xg(-l/2+d+d/2,-u/2,d,20,-90,-180),{x:l/2-d/2,y:d},...xg(-l/2-d/2,-d,d,20,0,90),...xg(-l/2-d/2,d,d,20,-90,0),{x:l/2-d/2,y:-d},...xg(-l/2+d+d/2,u/2,d,30,-180,-270)],g=q.svg(i),_=G(t,{fill:`none`});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Z(p).replace(`Z`,``),y=g.path(v,_),b=Z(m).replace(`Z`,``),x=g.path(b,_),S=Z(h),C=g.path(S,{..._}),w=i.insert(`g`,`:first-child`);return w.insert(()=>C,`:first-child`).attr(`stroke-opacity`,0),w.insert(()=>y,`:first-child`),w.insert(()=>x,`:first-child`),w.attr(`class`,`text`),f&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(${d-d/4}, 0)`),o.attr(`transform`,`translate(${-l/2+(t.padding??0)/2-(a.x-(a.left??0))},${-u/2+(t.padding??0)/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,h,e)},i}l(Sg,`curlyBraces`);async function Cg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(20,(c.width+a*2)*1.25,t?.width??0),u=Math.max(5,c.height+o*2,t?.height??0),d=u/2,{cssStyles:f}=t,p=q.svg(s),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=l,g=u,_=h-d,v=g/4,y=[{x:_,y:0},{x:v,y:0},{x:0,y:g/2},{x:v,y:g},{x:_,y:g},...Bh(-_,-g/2,d,50,270,90)],b=Z(y),x=p.path(b,m),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(${-l/2}, ${-u/2})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}l(Cg,`curvedTrapezoid`);var wg=l((e,t,n,r,i,a)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createCylinderPathD`),Tg=l((e,t,n,r,i,a)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`].join(` `),`createOuterCylinderPathD`),Eg=l((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),Dg=8,Og=8;async function kg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?24:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-o,t.width<Og&&(t.width=Og);let n=e/2/(2.5+e/50);t.height=(t.height??0)-a-n*3,t.height<Dg&&(t.height=Dg)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t.width?t.width:c.width)+o,d=u/2,f=d/(2.5+u/50),p=(t.height?t.height:c.height)+a+f,m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=Tg(0,0,u,p,d,f),r=Eg(0,f,u,p,d,f),i=G(t,{}),a=e.path(n,i),o=e.path(r,G(t,{fill:`none`}));m=s.insert(()=>o,`:first-child`),m=s.insert(()=>a,`:first-child`),m.attr(`class`,`basic label-container`),h&&m.attr(`style`,h)}else{let e=wg(0,0,u,p,d,f);m=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,qd(h)).attr(`style`,r)}return m.attr(`label-offset-y`,f),m.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Y(t,m),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+(t.padding??0)/1.5-(c.y-(c.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}l(kg,`cylinder`);async function Ag(e,t,n){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{shapeSvg:a,bbox:o}=await J(e,t,X(t)),s=Math.max(o.width+n.labelPaddingX*2,t?.width||0),c=Math.max(o.height+n.labelPaddingY*2,t?.height||0),l=-s/2,u=-c/2,d,{rx:f,ry:p}=t,{cssStyles:m}=t;if(n?.rx&&n.ry&&(f=n.rx,p=n.ry),t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=f||p?e.path(Wh(l,u,s,c,f||0),n):e.rectangle(l,u,s,c,n);d=a.insert(()=>r,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,qd(m))}else d=a.insert(`rect`,`:first-child`),d.attr(`class`,`basic label-container`).attr(`style`,i).attr(`rx`,qd(f)).attr(`ry`,qd(p)).attr(`x`,l).attr(`y`,u).attr(`width`,s).attr(`height`,c);return Y(t,d),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},a}l(Ag,`drawRect`);async function jg(e,t){let{cssClasses:n,labelPaddingX:r,labelPaddingY:i,padding:a,width:o,height:s}=t,c=await Ag(e,t,{rx:0,ry:0,classes:n??``,labelPaddingX:r??(a??0)*2,labelPaddingY:i??a??0});if(t.look===`handDrawn`){let e=q.svg(c),n=G(t,{}),r=c.select(`.basic.label-container > path:nth-child(2)`),i=r.node();if(!i)return c;let a=null;if(i instanceof SVGGraphicsElement)a=i.getBBox();else return c;return c.insert(()=>e.line(a.x,a.y,a.x+a.width,a.y,n),`.basic.label-container g.label`),c.insert(()=>e.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,n),`.basic.label-container g.label`),r.remove(),c}let l=c.select(`.basic.label-container`),u=(Number(l.attr(`width`))||o)??0,d=(Number(l.attr(`height`))||s)??0;return u>0&&d>0&&l.attr(`stroke-dasharray`,`${u} ${d}`),c}l(jg,`datastore`);async function Mg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?16:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=s.width+i,u=s.height+a,d=u*.2,f=-l/2,p=-u/2-d/2,{cssStyles:m}=t,h=q.svg(o),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:f,y:p+d},{x:-f,y:p+d},{x:-f,y:-p},{x:f,y:-p},{x:f,y:p},{x:-f,y:p},{x:-f,y:p+d}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=o.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${f+(t.padding??0)/2-(s.x-(s.left??0))}, ${p+d+(t.padding??0)/2-(s.y-(s.top??0))})`),Y(t,y),t.intersect=function(e){return Q.rect(t,e)},o}l(Mg,`dividedRectangle`);async function Ng(e,t){let{labelStyles:n,nodeStyles:r}=W(t),i=t.look===`neo`?12:5;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?16:a,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width/2:c.width/2)+(o??0),u=l-i,d,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{roughness:.2,strokeWidth:2.5}),r=G(t,{roughness:.2,strokeWidth:1.5}),i=e.circle(0,0,l*2,n),a=e.circle(0,0,u*2,r);d=s.insert(`g`,`:first-child`),d.attr(`class`,qd(t.cssClasses)).attr(`style`,qd(p)),d.node()?.appendChild(i),d.node()?.appendChild(a)}else{d=s.insert(`g`,`:first-child`);let e=d.insert(`circle`,`:first-child`),t=d.insert(`circle`);d.attr(`class`,`basic label-container`).attr(`style`,r),e.attr(`class`,`outer-circle`).attr(`style`,r).attr(`r`,l).attr(`cx`,0).attr(`cy`,0),t.attr(`class`,`inner-circle`).attr(`style`,r).attr(`r`,u).attr(`cx`,0).attr(`cy`,0)}return Y(t,d),t.intersect=function(e){return f.info(`DoubleCircle intersect`,t,l,e),Q.circle(t,l,e)},s}l(Ng,`doublecircle`);function Pg(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.label=``,t.labelStyle=r;let a=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:o}=t,s=q.svg(a),{nodeBorder:c}=n,l=G(t,{fillStyle:`solid`});t.look!==`handDrawn`&&(l.roughness=0);let u=s.circle(0,0,14,l),d=a.insert(()=>u,`:first-child`);return d.selectAll(`path`).attr(`style`,`fill: ${c} !important;`),o&&o.length>0&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,o),i&&t.look!==`handDrawn`&&d.selectAll(`path`).attr(`style`,i),Y(t,d),t.intersect=function(e){return f.info(`filledCircle intersect`,t,{radius:7,point:e}),Q.circle(t,7,e)},a}l(Pg,`filledCircle`);var Fg=10,Ig=10;async function Lg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.height=t?.height??0,t.height<Fg&&(t.height=Fg),t.width=(t?.width??0)-a-a/2,t.width<Ig&&(t.width=Ig));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width?t?.width:s.width)+(a??0),u=t?.height?t?.height:l+s.height,d=u,p=[{x:0,y:-u},{x:d,y:-u},{x:d/2,y:0}],{cssStyles:m}=t,h=q.svg(o),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Z(p),v=h.path(_,g),y=o.insert(()=>v,`:first-child`).attr(`transform`,`translate(${-u/2}, ${u/2})`).attr(`class`,`outer-path`);return m&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectChildren(`path`).attr(`style`,r),t.width=l,t.height=u,Y(t,y),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${-u/2+(t.padding??0)/2+(s.y-(s.top??0))})`),t.intersect=function(e){return f.info(`Triangle intersect`,t,p,e),Q.polygon(t,p,e)},o}l(Lg,`flippedTriangle`);function Rg(e,t,{dir:n,config:{state:r,themeVariables:i}}){let{nodeStyles:a}=W(t);t.label=``;let o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:s}=t,c=Math.max(70,t?.width??0),l=Math.max(10,t?.height??0);n===`LR`&&(c=Math.max(10,t?.width??0),l=Math.max(70,t?.height??0));let u=-1*c/2,d=-1*l/2,f=q.svg(o),p=G(t,{stroke:i.lineColor,fill:i.lineColor});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=f.rectangle(u,d,c,l,p),h=o.insert(()=>m,`:first-child`);s&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,s),a&&t.look!==`handDrawn`&&h.selectAll(`path`).attr(`style`,a),Y(t,h);let g=r?.padding??0;return t.width&&t.height&&(t.width+=g/2||0,t.height+=g/2||0),t.intersect=function(e){return Q.rect(t,e)},o}l(Rg,`forkJoin`);async function zg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.height=(t?.height??0)-a*2,t.height<10&&(t.height=10),t.width=(t?.width??0)-i*2,t.width<15&&(t.width=15));let{shapeSvg:o,bbox:s}=await J(e,t,X(t)),c=(t?.width?t?.width:Math.max(15,s.width))+i*2,l=(t?.height?t?.height:Math.max(10,s.height))+a*2,u=l/2,{cssStyles:d}=t,p=q.svg(o),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-c/2,y:-l/2},{x:c/2-u,y:-l/2},...Bh(-c/2+u,0,u,50,90,270),{x:c/2-u,y:l/2},{x:-c/2,y:l/2}],g=Z(h),_=p.path(g,m),v=o.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return f.info(`Pill intersect`,t,{radius:u,point:e}),Q.polygon(t,h,e)},o}l(zg,`halfRoundedRectangle`);var Bg=l((e,t,n,r,i)=>[`M${e+i},${t}`,`L${e+n-i},${t}`,`L${e+n},${t-r/2}`,`L${e+n-i},${t-r}`,`L${e+i},${t-r}`,`L${e},${t-r/2}`,`Z`].join(` `),`createHexagonPathD`);async function Vg(e,t){let{labelStyles:n,nodeStyles:r}=W(t),i=t.look===`neo`?3.5:4;t.labelStyle=n;let a=t.padding??0,o=t.look===`neo`?70:a,s=t.look===`neo`?32:a;if(t.width||t.height){let e=(t.height??0)/i;t.width=(t?.width??0)-2*e-s,t.height=(t.height??0)-o}let{shapeSvg:c,bbox:l}=await J(e,t,X(t)),u=(t?.height?t?.height:l.height)+o,d=u/i,f=(t?.width?t?.width:l.width)+2*d+s,p=[{x:d,y:0},{x:f-d,y:0},{x:f,y:-u/2},{x:f-d,y:-u},{x:d,y:-u},{x:0,y:-u/2}],m,{cssStyles:h}=t;if(t.look===`handDrawn`){let e=q.svg(c),n=G(t,{}),r=Bg(0,0,f,u,d),i=e.path(r,n);m=c.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-f/2}, ${u/2})`),h&&m.attr(`style`,h)}else m=ug(c,f,u,p);return r&&m.attr(`style`,r),t.width=f,t.height=u,Y(t,m),t.intersect=function(e){return Q.polygon(t,p,e)},c}l(Vg,`hexagon`);async function Hg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.label=``,t.labelStyle=n;let{shapeSvg:i}=await J(e,t,X(t)),a=Math.max(30,t?.width??0),o=Math.max(30,t?.height??0),{cssStyles:s}=t,c=q.svg(i),l=G(t,{});t.look!==`handDrawn`&&(l.roughness=0,l.fillStyle=`solid`);let u=[{x:0,y:0},{x:a,y:0},{x:0,y:o},{x:a,y:o}],d=Z(u),p=c.path(d,l),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`basic label-container outer-path`),s&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,s),r&&t.look!==`handDrawn`&&m.selectChildren(`path`).attr(`style`,r),m.attr(`transform`,`translate(${-a/2}, ${-o/2})`),Y(t,m),t.intersect=function(e){return f.info(`Pill intersect`,t,{points:u}),Q.polygon(t,u,e)},i}l(Hg,`hourglass`);async function Ug(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,label:d}=await J(e,t,`icon-shape default`),p=t.pos===`t`,m=s,h=s,{nodeBorder:g}=n,{stylesMap:_}=Am(t),v=-h/2,y=-m/2,b=t.label?8:0,x=q.svg(l),S=G(t,{stroke:`none`,fill:`none`});t.look!==`handDrawn`&&(S.roughness=0,S.fillStyle=`solid`);let C=x.rectangle(v,y,h,m,S),w=Math.max(h,u.width),T=m+u.height+b,E=x.rectangle(-w/2,-T/2,w,T,{...S,fill:`transparent`,stroke:`none`}),D=l.insert(()=>C,`:first-child`),ee=l.insert(()=>E);if(t.icon){let e=l.append(`g`);e.html(`<g>${await em(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${p?u.height/2+b/2-i/2-o:-u.height/2-b/2-i/2-o})`),e.attr(`style`,`color: ${_.get(`stroke`)??g};`)}return d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${p?-T/2:T/2-u.height})`),D.attr(`transform`,`translate(0,${p?u.height/2+b/2:-u.height/2-b/2})`),Y(t,ee),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=p?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+b},{x:n+h/2,y:r-i/2+u.height+b},{x:n+h/2,y:r+i/2},{x:n-h/2,y:r+i/2},{x:n-h/2,y:r-i/2+u.height+b},{x:n-u.width/2,y:r-i/2+u.height+b}]:[{x:n-h/2,y:r-i/2},{x:n+h/2,y:r-i/2},{x:n+h/2,y:r-i/2+m},{x:n+u.width/2,y:r-i/2+m},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+m},{x:n-h/2,y:r-i/2+m}],Q.polygon(t,a,e)},l}l(Ug,`icon`);async function Wg(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,label:d}=await J(e,t,`icon-shape default`),p=t.label?8:0,m=t.pos===`t`,{nodeBorder:h,mainBkg:g}=n,{stylesMap:_}=Am(t),v=q.svg(l),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`),y.stroke=_.get(`fill`)??g;let b=l.append(`g`);t.icon&&b.html(`<g>${await em(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let x=b.node().getBBox(),S=x.width,C=x.height,w=x.x,T=x.y,E=Math.max(S,C)*Math.SQRT2+40,D=v.circle(0,0,E,y),ee=Math.max(E,u.width),te=E+u.height+p,O=v.rectangle(-ee/2,-te/2,ee,te,{...y,fill:`transparent`,stroke:`none`}),ne=l.insert(()=>D,`:first-child`),k=l.insert(()=>O);return b.attr(`transform`,`translate(${-S/2-w},${m?u.height/2+p/2-C/2-T:-u.height/2-p/2-C/2-T})`),b.attr(`style`,`color: ${_.get(`stroke`)??h};`),d.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${m?-te/2:te/2-u.height})`),ne.attr(`transform`,`translate(0,${m?u.height/2+p/2:-u.height/2-p/2})`),Y(t,k),t.intersect=function(e){return f.info(`iconSquare intersect`,t,e),Q.rect(t,e)},l}l(Wg,`iconCircle`);async function Gg(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,halfPadding:d,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=s+d*2,g=s+d*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=Am(t),b=-g/2,x=-h/2,S=t.label?8:0,C=q.svg(l),w=G(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(Wh(b,x,g,h,5),w),E=Math.max(g,u.width),D=h+u.height+S,ee=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),te=l.insert(()=>T,`:first-child`).attr(`class`,`icon-shape2`),O=l.insert(()=>ee);if(t.icon){let e=l.append(`g`);e.html(`<g>${await em(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?u.height/2+S/2-i/2-o:-u.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${m?-D/2:D/2-u.height})`),te.attr(`transform`,`translate(0,${m?u.height/2+S/2:-u.height/2-S/2})`),Y(t,O),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+S},{x:n+g/2,y:r-i/2+u.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+u.height+S},{x:n-u.width/2,y:r-i/2+u.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+u.width/2,y:r-i/2+h},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},l}l(Gg,`iconRounded`);async function Kg(e,t,{config:{themeVariables:n,flowchart:r}}){let{labelStyles:i}=W(t);t.labelStyle=i;let a=t.assetHeight??48,o=t.assetWidth??48,s=Math.max(a,o),c=r?.wrappingWidth;t.width=Math.max(s,c??0);let{shapeSvg:l,bbox:u,halfPadding:d,label:p}=await J(e,t,`icon-shape default`),m=t.pos===`t`,h=s+d*2,g=s+d*2,{nodeBorder:_,mainBkg:v}=n,{stylesMap:y}=Am(t),b=-g/2,x=-h/2,S=t.label?8:0,C=q.svg(l),w=G(t,{});t.look!==`handDrawn`&&(w.roughness=0,w.fillStyle=`solid`),w.stroke=y.get(`fill`)??v;let T=C.path(Wh(b,x,g,h,.1),w),E=Math.max(g,u.width),D=h+u.height+S,ee=C.rectangle(-E/2,-D/2,E,D,{...w,fill:`transparent`,stroke:`none`}),te=l.insert(()=>T,`:first-child`),O=l.insert(()=>ee);if(t.icon){let e=l.append(`g`);e.html(`<g>${await em(t.icon,{height:s,width:s,fallbackPrefix:``})}</g>`);let n=e.node().getBBox(),r=n.width,i=n.height,a=n.x,o=n.y;e.attr(`transform`,`translate(${-r/2-a},${m?u.height/2+S/2-i/2-o:-u.height/2-S/2-i/2-o})`),e.attr(`style`,`color: ${y.get(`stroke`)??_};`)}return p.attr(`transform`,`translate(${-u.width/2-(u.x-(u.left??0))},${m?-D/2:D/2-u.height})`),te.attr(`transform`,`translate(0,${m?u.height/2+S/2:-u.height/2-S/2})`),Y(t,O),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=m?[{x:n-u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2},{x:n+u.width/2,y:r-i/2+u.height+S},{x:n+g/2,y:r-i/2+u.height+S},{x:n+g/2,y:r+i/2},{x:n-g/2,y:r+i/2},{x:n-g/2,y:r-i/2+u.height+S},{x:n-u.width/2,y:r-i/2+u.height+S}]:[{x:n-g/2,y:r-i/2},{x:n+g/2,y:r-i/2},{x:n+g/2,y:r-i/2+h},{x:n+u.width/2,y:r-i/2+h},{x:n+u.width/2/2,y:r+i/2},{x:n-u.width/2,y:r+i/2},{x:n-u.width/2,y:r-i/2+h},{x:n-g/2,y:r-i/2+h}],Q.polygon(t,a,e)},l}l(Kg,`iconSquare`);async function qg(e,t,{config:{flowchart:n}}){let r=new Image;r.src=t?.img??``,await r.decode();let i=Number(r.naturalWidth.toString().replace(`px`,``)),a=Number(r.naturalHeight.toString().replace(`px`,``));t.imageAspectRatio=i/a;let{labelStyles:o}=W(t);t.labelStyle=o;let s=n?.wrappingWidth;t.defaultWidth=n?.wrappingWidth;let c=Math.max(t.label?s??0:0,t?.assetWidth??i),l=t.constraint===`on`&&t?.assetHeight?t.assetHeight*t.imageAspectRatio:c,u=t.constraint===`on`?l/t.imageAspectRatio:t?.assetHeight??a;t.width=Math.max(l,s??0);let{shapeSvg:d,bbox:p,label:m}=await J(e,t,`image-shape default`),h=t.pos===`t`,g=-l/2,_=-u/2,v=t.label?8:0,y=q.svg(d),b=G(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(g,_,l,u,b),S=Math.max(l,p.width),C=u+p.height+v,w=y.rectangle(-S/2,-C/2,S,C,{...b,fill:`none`,stroke:`none`}),T=d.insert(()=>x,`:first-child`),E=d.insert(()=>w);if(t.img){let e=d.append(`image`);e.attr(`href`,t.img),e.attr(`width`,l),e.attr(`height`,u),e.attr(`preserveAspectRatio`,`none`),e.attr(`transform`,`translate(${-l/2},${h?C/2-u:-C/2})`)}return m.attr(`transform`,`translate(${-p.width/2-(p.x-(p.left??0))},${h?-u/2-p.height/2-v/2:u/2-p.height/2+v/2})`),T.attr(`transform`,`translate(0,${h?p.height/2+v/2:-p.height/2-v/2})`),Y(t,E),t.intersect=function(e){if(f.info(`iconSquare intersect`,t,e),!t.label)return Q.rect(t,e);let n=t.x??0,r=t.y??0,i=t.height??0,a=[];return a=h?[{x:n-p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2},{x:n+p.width/2,y:r-i/2+p.height+v},{x:n+l/2,y:r-i/2+p.height+v},{x:n+l/2,y:r+i/2},{x:n-l/2,y:r+i/2},{x:n-l/2,y:r-i/2+p.height+v},{x:n-p.width/2,y:r-i/2+p.height+v}]:[{x:n-l/2,y:r-i/2},{x:n+l/2,y:r-i/2},{x:n+l/2,y:r-i/2+u},{x:n+p.width/2,y:r-i/2+u},{x:n+p.width/2/2,y:r+i/2},{x:n-p.width/2,y:r+i/2},{x:n-p.width/2,y:r-i/2+u},{x:n-l/2,y:r-i/2+u}],Q.polygon(t,a,e)},d}l(qg,`imageSquare`);async function Jg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=Math.max(c.width+(o??0)*2,t?.width??0),u=Math.max(c.height+(a??0)*2,t?.height??0),d=[{x:0,y:0},{x:l,y:0},{x:l+3*u/6,y:-u},{x:-3*u/6,y:-u}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-l/2}, ${u/2})`),p&&f.attr(`style`,p)}else f=ug(s,l,u,d);return r&&f.attr(`style`,r),t.width=l,t.height=u,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}l(Jg,`inv_trapezoid`);async function Yg(e,t){let{shapeSvg:n,bbox:r,label:i}=await J(e,t,`label`),a=n.insert(`rect`,`:first-child`);return a.attr(`width`,.1).attr(`height`,.1),n.attr(`class`,`label edgeLabel`),i.attr(`transform`,`translate(${-(r.width/2)-(r.x-(r.left??0))}, ${-(r.height/2)-(r.y-(r.top??0))})`),Y(t,a),t.intersect=function(e){return Q.rect(t,e)},n}l(Yg,`labelRect`);async function Xg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:0,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:-(3*l)/6,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=ug(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}l(Xg,`lean_left`);async function Zg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=i,o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u,y:0},{x:u+3*l/6,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=ug(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}l(Zg,`lean_right`);function Qg(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.label=``,t.labelStyle=n;let i=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId??t.id),{cssStyles:a}=t,o=Math.max(35,t?.width??0),s=Math.max(35,t?.height??0),c=[{x:o,y:0},{x:0,y:s+7/2},{x:o-14,y:s+7/2},{x:0,y:2*s},{x:o,y:s-7/2},{x:14,y:s-7/2}],l=q.svg(i),u=G(t,{});t.look!==`handDrawn`&&(u.roughness=0,u.fillStyle=`solid`);let d=Z(c),p=l.path(d,u),m=i.insert(()=>p,`:first-child`);return m.attr(`class`,`outer-path`),a&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,a),r&&t.look!==`handDrawn`&&m.selectAll(`path`).attr(`style`,r),m.attr(`transform`,`translate(-${o/2},${-s})`),Y(t,m),t.intersect=function(e){return f.info(`lightningBolt intersect`,t,e),Q.polygon(t,c,e)},i}l(Qg,`lightningBolt`);var $g=l((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`a${i},${a} 0,0,0 ${n},0`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createCylinderPathD`),e_=l((e,t,n,r,i,a,o)=>[`M${e},${t+a}`,`M${e+n},${t+a}`,`a${i},${a} 0,0,0 ${-n},0`,`l0,${r}`,`a${i},${a} 0,0,0 ${n},0`,`l0,${-r}`,`M${e},${t+a+o}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createOuterCylinderPathD`),t_=l((e,t,n,r,i,a)=>[`M${e-n/2},${-r/2}`,`a${i},${a} 0,0,0 ${n},0`].join(` `),`createInnerCylinderPathD`),n_=10,r_=10;async function i_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?24:i;if(t.width||t.height){let e=t.width??0;t.width=(t.width??0)-a,t.width<r_&&(t.width=r_);let n=e/2/(2.5+e/50);t.height=(t.height??0)-o-n*3,t.height<n_&&(t.height=n_)}let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=u/2,f=d/(2.5+u/50),p=(t?.height?t?.height:c.height)+f+o*2,m=p*.1,h,{cssStyles:g}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=e_(0,0,u,p,d,f,m),r=t_(0,f,u,p,d,f),i=G(t,{}),a=e.path(n,i),o=e.path(r,i);s.insert(()=>o,`:first-child`).attr(`class`,`line`),h=s.insert(()=>a,`:first-child`),h.attr(`class`,`basic label-container`),g&&h.attr(`style`,g)}else{let e=$g(0,0,u,p,d,f,m);h=s.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container outer-path`).attr(`style`,qd(g)).attr(`style`,r)}return h.attr(`label-offset-y`,f),h.attr(`transform`,`translate(${-u/2}, ${-(p/2+f)})`),Y(t,h),l.attr(`transform`,`translate(${-(c.width/2)-(c.x-(c.left??0))}, ${-(c.height/2)+f-(c.y-(c.top??0))})`),t.intersect=function(e){let n=Q.rect(t,e),r=n.x-(t.x??0);if(d!=0&&(Math.abs(r)<(t.width??0)/2||Math.abs(r)==(t.width??0)/2&&Math.abs(n.y-(t.y??0))>(t.height??0)/2-f)){let i=f*f*(1-r*r/(d*d));i>0&&(i=Math.sqrt(i)),i=f-i,e.y-(t.y??0)>0&&(i=-i),n.y+=i}return n},s}l(i_,`linedCylinder`);async function a_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=(t.width??0)*10/11-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+(a??0)*2,d=(t?.height?t?.height:c.height)+(o??0)*2,f=t.look===`neo`?d/4:d/8,p=d+f,{cssStyles:m}=t,h=q.svg(s),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=[{x:-u/2-u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:p/2},...zh(-u/2-u/2*.1,p/2,u/2+u/2*.1,p/2,f,.8),{x:u/2+u/2*.1,y:-p/2},{x:-u/2-u/2*.1,y:-p/2},{x:-u/2,y:-p/2},{x:-u/2,y:p/2*1.1},{x:-u/2,y:-p/2}],v=h.polygon(_.map(e=>[e.x,e.y]),g),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container outer-path`),m&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,m),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),y.attr(`transform`,`translate(0,${-f/2})`),l.attr(`transform`,`translate(${-u/2+(t.padding??0)+u/2*.1/2-(c.x-(c.left??0))},${-d/2+(t.padding??0)-f/2-(c.y-(c.top??0))})`),Y(t,y),t.intersect=function(e){return Q.polygon(t,_,e)},s}l(a_,`linedWaveEdgedRect`);async function o_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=t.look===`neo`?10:5;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2-2*s,10),t.height=Math.max((t?.height??0)-o*2-2*s,10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+a*2+2*s,f=(t?.height?t?.height:l.height)+o*2+2*s,p=d-2*s,m=f-2*s,h=-p/2,g=-m/2,{cssStyles:_}=t,v=q.svg(c),y=G(t,{}),b=[{x:h-s,y:g+s},{x:h-s,y:g+m+s},{x:h+p-s,y:g+m+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g+m-s},{x:h+p+s,y:g+m-s},{x:h+p+s,y:g-s},{x:h+s,y:g-s},{x:h+s,y:g},{x:h,y:g},{x:h,y:g+s}],x=[{x:h,y:g+s},{x:h+p-s,y:g+s},{x:h+p-s,y:g+m},{x:h+p,y:g+m},{x:h+p,y:g},{x:h,y:g}];t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let S=Z(b),C=v.path(S,y),w=Z(x),T=v.path(w,y);t.look!==`handDrawn`&&(C=Vh(C),T=Vh(T));let E=c.insert(`g`,`:first-child`);return E.insert(()=>C),E.insert(()=>T),E.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&E.selectAll(`path`).attr(`style`,r),u.attr(`transform`,`translate(${-(l.width/2)-s-(l.x-(l.left??0))}, ${-(l.height/2)+s-(l.y-(l.top??0))})`),Y(t,E),t.intersect=function(e){return Q.polygon(t,b,e)},c}l(o_,`multiRect`);async function s_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=t.padding??0,c=t.look===`neo`?16:s,l=t.look===`neo`?12:s,u=!0;(t.width||t.height)&&(u=!1,t.width=(t?.width??0)-c*2,t.height=(t?.height??0)-l*3);let d=Math.max(a.width,t?.width??0)+c*2,f=Math.max(a.height,t?.height??0)+l*3,p=t.look===`neo`?f/4:f/8,m=f+(u?p/2:-p/2),h=-d/2,g=-m/2,{cssStyles:_}=t,v=zh(h-10,g+m+10,h+d-10,g+m+10,p,.8),y=v?.[v.length-1],b=[{x:h-10,y:g+10},{x:h-10,y:g+m+10},...v,{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:y.y-20},{x:h+d+10,y:y.y-20},{x:h+d+10,y:g-10},{x:h+10,y:g-10},{x:h+10,y:g},{x:h,y:g},{x:h,y:g+10}],x=[{x:h,y:g+10},{x:h+d-10,y:g+10},{x:h+d-10,y:y.y-10},{x:h+d,y:y.y-10},{x:h+d,y:g},{x:h,y:g}],S=q.svg(i),C=G(t,{});t.look!==`handDrawn`&&(C.roughness=0,C.fillStyle=`solid`);let w=Z(b),T=S.path(w,C),E=Z(x),D=S.path(E,C),ee=i.insert(()=>T,`:first-child`);return ee.insert(()=>D),ee.attr(`class`,`basic label-container outer-path`),_&&t.look!==`handDrawn`&&ee.selectAll(`path`).attr(`style`,_),r&&t.look!==`handDrawn`&&ee.selectAll(`path`).attr(`style`,r),ee.attr(`transform`,`translate(0,${-p/2})`),o.attr(`transform`,`translate(${-(a.width/2)-10-(a.x-(a.left??0))}, ${-(a.height/2)+10-p/2-(a.y-(a.top??0))})`),Y(t,ee),t.intersect=function(e){return Q.polygon(t,b,e)},i}l(s_,`multiWaveEdgedRectangle`);async function c_(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r,t.useHtmlLabels||Mn(R())||(t.centerLabel=!0);let{shapeSvg:a,bbox:o,label:s}=await J(e,t,X(t)),c=Math.max(o.width+(t.padding??0)*2,t?.width??0),l=Math.max(o.height+(t.padding??0)*2,t?.height??0),u=-c/2,d=-l/2,{cssStyles:f}=t,p=q.svg(a),m=G(t,{fill:n.noteBkgColor,stroke:n.noteBorderColor});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=p.rectangle(u,d,c,l,m),g=a.insert(()=>h,`:first-child`);return g.attr(`class`,`basic label-container outer-path`),s.attr(`class`,`label noteLabel`),f&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,f),i&&t.look!==`handDrawn`&&g.selectAll(`path`).attr(`style`,i),s.attr(`transform`,`translate(${-o.width/2-(o.x-(o.left??0))}, ${-(o.height/2)-(o.y-(o.top??0))})`),Y(t,g),t.intersect=function(e){return Q.rect(t,e)},a}l(c_,`note`);var l_=l((e,t,n)=>[`M${e+n/2},${t}`,`L${e+n},${t-n/2}`,`L${e+n/2},${t-n}`,`L${e},${t-n/2}`,`Z`].join(` `),`createDecisionBoxPathD`);async function u_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=a.width+(t.padding??0)+(a.height+(t.padding??0)),s=.5,c=[{x:o/2,y:0},{x:o,y:-o/2},{x:o/2,y:-o},{x:0,y:-o/2}],l,{cssStyles:u}=t;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=l_(0,0,o),a=e.path(r,n);l=i.insert(()=>a,`:first-child`).attr(`transform`,`translate(${-o/2+s}, ${o/2})`),u&&l.attr(`style`,u)}else l=ug(i,o,o,c),l.attr(`transform`,`translate(${-o/2+s}, ${o/2})`);return r&&l.attr(`style`,r),Y(t,l),t.calcIntersect=function(e,t){let n=e.width,r=[{x:n/2,y:0},{x:n,y:-n/2},{x:n/2,y:-n},{x:0,y:-n/2}],i=Q.polygon(e,r,t);return{x:i.x-.5,y:i.y-.5}},t.intersect=function(e){return this.calcIntersect(t,e)},i}l(u_,`question`);async function d_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?21:i??0,o=t.look===`neo`?12:i??0,{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width??c.width)+(t.look===`neo`?a*2:a),d=(t?.height??c.height)+(t.look===`neo`?o*2:o),f=-u/2,p=-d/2,m=p/2,h=[{x:f+m,y:p},{x:f,y:0},{x:f+m,y:-p},{x:-f,y:-p},{x:-f,y:p}],{cssStyles:g}=t,_=q.svg(s),v=G(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=Z(h),b=_.path(y,v),x=s.insert(()=>b,`:first-child`);return x.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),x.attr(`transform`,`translate(${-m/2},0)`),l.attr(`transform`,`translate(${-m/2-c.width/2-(c.x-(c.left??0))}, ${-(c.height/2)-(c.y-(c.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,h,e)},s}l(d_,`rect_left_inv_arrow`);async function f_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i;i=t.cssClasses?`node `+t.cssClasses:`node default`;let a=e.insert(`g`).attr(`class`,i).attr(`id`,t.domId||t.id),o=a.insert(`g`),s=a.insert(`g`).attr(`class`,`label`).attr(`style`,r),c=t.description,l=t.label,u=await Uh(s,l,t.labelStyle,!0,!0),d={width:0,height:0};if(Mn(z())){let e=u.children[0],t=B(u);d=e.getBoundingClientRect(),t.attr(`width`,d.width),t.attr(`height`,d.height)}f.info(`Text 2`,c);let p=c||[],m=u.getBBox(),h=await Uh(s,Array.isArray(p)?p.join(`<br/>`):p,t.labelStyle,!0,!0),g=h.children[0],_=B(h);d=g.getBoundingClientRect(),_.attr(`width`,d.width),_.attr(`height`,d.height);let v=(t.padding||0)/2;B(h).attr(`transform`,`translate( `+(d.width>m.width?0:(m.width-d.width)/2)+`, `+(m.height+v+5)+`)`),B(u).attr(`transform`,`translate( `+(d.width<m.width?0:-(m.width-d.width)/2)+`, 0)`),d=s.node().getBBox(),s.attr(`transform`,`translate(`+-d.width/2+`, `+(-d.height/2-v+3)+`)`);let y=d.width+(t.padding||0),b=d.height+(t.padding||0),x=-d.width/2-v,S=-d.height/2-v,C,w;if(t.look===`handDrawn`){let e=q.svg(a),n=G(t,{}),r=e.path(Wh(x,S,y,b,t.rx||0),n),i=e.line(-d.width/2-v,-d.height/2-v+m.height+v,d.width/2+v,-d.height/2-v+m.height+v,n);w=a.insert(()=>(f.debug(`Rough node insert CXC`,r),i),`:first-child`),C=a.insert(()=>(f.debug(`Rough node insert CXC`,r),r),`:first-child`)}else C=o.insert(`rect`,`:first-child`),w=o.insert(`line`),C.attr(`class`,`outer title-state`).attr(`style`,r).attr(`x`,-d.width/2-v).attr(`y`,-d.height/2-v).attr(`width`,d.width+(t.padding||0)).attr(`height`,d.height+(t.padding||0)),w.attr(`class`,`divider`).attr(`x1`,-d.width/2-v).attr(`x2`,d.width/2+v).attr(`y1`,-d.height/2-v+m.height+v).attr(`y2`,-d.height/2-v+m.height+v);return Y(t,C),t.intersect=function(e){return Q.rect(t,e)},a}l(f_,`rectWithTitle`);async function p_(e,t,{config:{themeVariables:n}}){let r=n?.radius??5;return Ag(e,t,{rx:r,ry:r,classes:``,labelPaddingX:(t?.padding??0)*1,labelPaddingY:(t?.padding??0)*1})}l(p_,`roundedRect`);var m_=8;async function h_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0,{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width??s.width)+i*2+(t.look===`neo`?m_:m_*2),u=(t?.height??s.height)+a*2,d=l-m_,f=u,p=m_-l/2,m=-u/2,{cssStyles:h}=t,g=q.svg(o),_=G(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=[{x:p,y:m},{x:p+d,y:m},{x:p+d,y:m+f},{x:p-m_,y:m+f},{x:p-m_,y:m},{x:p,y:m},{x:p,y:m+f}],y=g.polygon(v.map(e=>[e.x,e.y]),_),b=o.insert(()=>y,`:first-child`);return b.attr(`class`,`basic label-container outer-path`).attr(`style`,qd(h)),r&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),h&&t.look!==`handDrawn`&&b.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${m_/2-s.width/2-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,b),t.intersect=function(e){return Q.rect(t,e)},o}l(h_,`shadedProcess`);async function g_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-a*2,10),t.height=Math.max((t?.height??0)/1.5-o*2,10));let{shapeSvg:s,bbox:c,label:l}=await J(e,t,X(t)),u=(t?.width?t?.width:c.width)+a*2,d=((t?.height?t?.height:c.height)+o*2)*1.5,f=u,p=d/1.5,m=-f/2,h=-p/2,{cssStyles:g}=t,_=q.svg(s),v=G(t,{});t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let y=[{x:m,y:h},{x:m,y:h+p},{x:m+f,y:h+p},{x:m+f,y:h-p/2}],b=Z(y),x=_.path(b,v),S=s.insert(()=>x,`:first-child`);return S.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&S.selectChildren(`path`).attr(`style`,r),S.attr(`transform`,`translate(0, ${p/4})`),l.attr(`transform`,`translate(${-f/2+(t.padding??0)-(c.x-(c.left??0))}, ${-p/4+(t.padding??0)-(c.y-(c.top??0))})`),Y(t,S),t.intersect=function(e){return Q.polygon(t,y,e)},s}l(g_,`slopedRect`);async function __(e,t){let n=t.padding??0,r=t.look===`neo`?16:n*2,i=t.look===`neo`?12:n;return Ag(e,t,{rx:0,ry:0,classes:``,labelPaddingX:t.labelPaddingX??r,labelPaddingY:i})}l(__,`squareRect`);async function v_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?20:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=c.height+(t.look===`neo`?o*2:o),u=c.width+l/4+(t.look===`neo`?a*2:a),d=l/2,{cssStyles:f}=t,p=q.svg(s),m=G(t,{});t.look!==`handDrawn`&&(m.roughness=0,m.fillStyle=`solid`);let h=[{x:-u/2+d,y:-l/2},{x:u/2-d,y:-l/2},...Bh(-u/2+d,0,d,50,90,270),{x:u/2-d,y:l/2},...Bh(u/2-d,0,d,50,270,450)],g=Z(h),_=p.path(g,m),v=s.insert(()=>_,`:first-child`);return v.attr(`class`,`basic label-container outer-path`),f&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,f),r&&t.look!==`handDrawn`&&v.selectChildren(`path`).attr(`style`,r),Y(t,v),t.intersect=function(e){return Q.polygon(t,h,e)},s}l(v_,`stadium`);async function y_(e,t){return Ag(e,t,{rx:t.look===`neo`?3:5,ry:t.look===`neo`?3:5,classes:`flowchart-node`})}l(y_,`state`);function b_(e,t,{config:{themeVariables:n}}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r;let{cssStyles:a}=t,{lineColor:o,stateBorder:s,nodeBorder:c,nodeShadow:l}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let u=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId??t.id),d=q.svg(u),f=G(t,{});t.look!==`handDrawn`&&(f.roughness=0,f.fillStyle=`solid`);let p=d.circle(0,0,t.width,{...f,stroke:o,strokeWidth:2}),m=s??c,h=(t.width??0)*5/14,g=d.circle(0,0,h,{...f,fill:m,stroke:m,strokeWidth:2,fillStyle:`solid`}),_=u.insert(()=>p,`:first-child`);if(_.insert(()=>g),t.look!==`handDrawn`&&_.attr(`class`,`outer-path`),a&&_.selectAll(`path`).attr(`style`,a),i&&_.selectAll(`path`).attr(`style`,i),t.width<25&&l&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;_.attr(`style`,`filter:url(#${n})`)}return Y(t,_),t.intersect=function(e){return Q.circle(t,(t.width??0)/2,e)},u}l(b_,`stateEnd`);function x_(e,t,{config:{themeVariables:n}}){let{lineColor:r,nodeShadow:i}=n;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||=14,t.height||=14;let a=e.insert(`g`).attr(`class`,`node default`).attr(`id`,t.domId||t.id),o;if(t.look===`handDrawn`){let e=q.svg(a).circle(0,0,t.width,km(r));o=a.insert(()=>e),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14)}else o=a.insert(`circle`,`:first-child`),o.attr(`class`,`state-start`).attr(`r`,(t.width??7)/2).attr(`width`,t.width??14).attr(`height`,t.height??14);if(t.width<25&&i&&t.look!==`handDrawn`){let t=e.node()?.ownerSVGElement?.id??``,n=t?`${t}-drop-shadow-small`:`drop-shadow-small`;o.attr(`style`,`filter:url(#${n})`)}return Y(t,o),t.intersect=function(e){return Q.circle(t,(t.width??7)/2,e)},a}l(x_,`stateStart`);var S_=8;async function C_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t?.padding??8,a=t.look===`neo`?28:i,o=t.look===`neo`?12:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width??c.width)+2*S_+a,u=(t?.height??c.height)+o,d=l-2*S_,f=u,p=-l/2,m=-u/2,h=[{x:0,y:0},{x:d,y:0},{x:d,y:-f},{x:0,y:-f},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-f},{x:-8,y:-f},{x:-8,y:0}];if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=e.rectangle(p,m,d+16,f,n),i=e.line(p+S_,m,p+S_,m+f,n),a=e.line(p+S_+d,m,p+S_+d,m+f,n);s.insert(()=>i,`:first-child`),s.insert(()=>a,`:first-child`);let o=s.insert(()=>r,`:first-child`),{cssStyles:c}=t;o.attr(`class`,`basic label-container`).attr(`style`,qd(c)),Y(t,o)}else{let e=ug(s,d,f,h);r&&e.attr(`style`,r),Y(t,e)}return t.intersect=function(e){return Q.polygon(t,h,e)},s}l(C_,`subroutine`);var w_=.2;async function T_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=Math.max((t?.height??0)-o*2,10),t.width=Math.max((t?.width??0)-a*2-w_*(t.height+o*2),10));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height?t?.height:c.height)+o*2,u=w_*l,d=w_*l,f=(t?.width?t?.width:c.width)+a*2+u-u,p=l,m=-f/2,h=-p/2,{cssStyles:g}=t,_=q.svg(s),v=G(t,{}),y=[{x:m-u/2,y:h},{x:m+f+u/2,y:h},{x:m+f+u/2,y:h+p},{x:m-u/2,y:h+p}],b=[{x:m+f-u/2,y:h+p},{x:m+f+u/2,y:h+p},{x:m+f+u/2,y:h+p-d}];t.look!==`handDrawn`&&(v.roughness=0,v.fillStyle=`solid`);let x=Z(y),S=_.path(x,v),C=Z(b),w=_.path(C,{...v,fillStyle:`solid`}),T=s.insert(()=>w,`:first-child`);return T.insert(()=>S,`:first-child`),T.attr(`class`,`basic label-container outer-path`),g&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,g),r&&t.look!==`handDrawn`&&T.selectAll(`path`).attr(`style`,r),Y(t,T),t.intersect=function(e){return Q.polygon(t,y,e)},s}l(T_,`taggedRect`);async function E_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,label:o}=await J(e,t,X(t)),s=Math.max(a.width+(t.padding??0)*2,t?.width??0),c=Math.max(a.height+(t.padding??0)*2,t?.height??0),l=c/8,u=.2*s,d=.2*c,f=c+l,{cssStyles:p}=t,m=q.svg(i),h=G(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-s/2-s/2*.1,y:f/2},...zh(-s/2-s/2*.1,f/2,s/2+s/2*.1,f/2,l,.8),{x:s/2+s/2*.1,y:-f/2},{x:-s/2-s/2*.1,y:-f/2}],_=-s/2+s/2*.1,v=-f/2-d*.4,y=[{x:_+s-u,y:(v+c)*1.3},{x:_+s,y:v+c-d},{x:_+s,y:(v+c)*.9},...zh(_+s,(v+c)*1.25,_+s-u,(v+c)*1.3,-c*.02,.5)],b=Z(g),x=m.path(b,h),S=Z(y),C=m.path(S,{...h,fillStyle:`solid`}),w=i.insert(()=>C,`:first-child`);return w.insert(()=>x,`:first-child`),w.attr(`class`,`basic label-container outer-path`),p&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&w.selectAll(`path`).attr(`style`,r),w.attr(`transform`,`translate(0,${-l/2})`),o.attr(`transform`,`translate(${-s/2+(t.padding??0)-(a.x-(a.left??0))},${-c/2+(t.padding??0)-l/2-(a.y-(a.top??0))})`),Y(t,w),t.intersect=function(e){return Q.polygon(t,g,e)},i}l(E_,`taggedWaveEdgedRectangle`);async function D_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a}=await J(e,t,X(t)),o=Math.max(a.width+(t.padding??0),t?.width||0),s=Math.max(a.height+(t.padding??0),t?.height||0),c=-o/2,l=-s/2,u=i.insert(`rect`,`:first-child`);return u.attr(`class`,`text`).attr(`style`,r).attr(`rx`,0).attr(`ry`,0).attr(`x`,c).attr(`y`,l).attr(`width`,o).attr(`height`,s),Y(t,u),t.intersect=function(e){return Q.rect(t,e)},i}l(D_,`text`);var O_=l((e,t,n,r,i,a)=>`M${e},${t}
|
|
197
|
-
a${i},${a} 0,0,1 0,${-r}
|
|
198
|
-
l${n},0
|
|
199
|
-
a${i},${a} 0,0,1 0,${r}
|
|
200
|
-
M${n},${-r}
|
|
201
|
-
a${i},${a} 0,0,0 0,${r}
|
|
202
|
-
l${-n},0`,`createCylinderPathD`),k_=l((e,t,n,r,i,a)=>[`M${e},${t}`,`M${e+n},${t}`,`a${i},${a} 0,0,0 0,${-r}`,`l${-n},0`,`a${i},${a} 0,0,0 0,${r}`,`l${n},0`].join(` `),`createOuterCylinderPathD`),A_=l((e,t,n,r,i,a)=>[`M${e+n/2},${-r/2}`,`a${i},${a} 0,0,0 0,${r}`].join(` `),`createInnerCylinderPathD`),j_=5,M_=10;async function N_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?12:i/2;if(t.width||t.height){let e=t.height??0;t.height=(t.height??0)-a,t.height<j_&&(t.height=j_);let n=e/2/(2.5+e/50);t.width=(t.width??0)-a-n*3,t.width<M_&&(t.width=M_)}let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t.height?t.height:s.height)+a,u=l/2,d=u/(2.5+l/50),f=(t.width?t.width:s.width)+d+a,{cssStyles:p}=t,m;if(t.look===`handDrawn`){let e=q.svg(o),n=k_(0,0,f,l,d,u),r=A_(0,0,f,l,d,u),i=e.path(n,G(t,{})),a=e.path(r,G(t,{fill:`none`}));m=o.insert(()=>a,`:first-child`),m=o.insert(()=>i,`:first-child`),m.attr(`class`,`basic label-container`),p&&m.attr(`style`,p)}else{let e=O_(0,0,f,l,d,u);m=o.insert(`path`,`:first-child`).attr(`d`,e).attr(`class`,`basic label-container`).attr(`style`,qd(p)).attr(`style`,r),m.attr(`class`,`basic label-container outer-path`),p&&m.selectAll(`path`).attr(`style`,p),r&&m.selectAll(`path`).attr(`style`,r)}return m.attr(`label-offset-x`,d),m.attr(`transform`,`translate(${-f/2}, ${l/2} )`),c.attr(`transform`,`translate(${-(s.width/2)-d-(s.x-(s.left??0))}, ${-(s.height/2)-(s.y-(s.top??0))})`),Y(t,m),t.intersect=function(e){let n=Q.rect(t,e),r=n.y-(t.y??0);if(u!=0&&(Math.abs(r)<(t.height??0)/2||Math.abs(r)==(t.height??0)/2&&Math.abs(n.x-(t.x??0))>(t.width??0)/2-d)){let i=d*d*(1-r*r/(u*u));i!=0&&(i=Math.sqrt(Math.abs(i))),i=d-i,e.x-(t.x??0)>0&&(i=-i),n.x+=i}return n},o}l(N_,`tiltedCylinder`);async function P_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=(t.look,i),o=t.look===`neo`?i*2:i,{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.height??c.height)+a,u=(t?.width??c.width)+o,d=[{x:-3*l/6,y:0},{x:u+3*l/6,y:0},{x:u,y:-l},{x:0,y:-l}],f,{cssStyles:p}=t;if(t.look===`handDrawn`){let e=q.svg(s),n=G(t,{}),r=Z(d),i=e.path(r,n);f=s.insert(()=>i,`:first-child`).attr(`transform`,`translate(${-u/2}, ${l/2})`),p&&f.attr(`style`,p)}else f=ug(s,u,l,d);return r&&f.attr(`style`,r),t.width=u,t.height=l,Y(t,f),t.intersect=function(e){return Q.polygon(t,d,e)},s}l(P_,`trapezoid`);async function F_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i;(t.width||t.height)&&(t.height=(t.height??0)-o*2,t.height<5&&(t.height=5),t.width=(t.width??0)-a*2,t.width<15&&(t.width=15));let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o*2,{cssStyles:d}=t,f=q.svg(s),p=G(t,{});t.look!==`handDrawn`&&(p.roughness=0,p.fillStyle=`solid`);let m=[{x:-l/2*.8,y:-u/2},{x:l/2*.8,y:-u/2},{x:l/2,y:-u/2*.6},{x:l/2,y:u/2},{x:-l/2,y:u/2},{x:-l/2,y:-u/2*.6}],h=Z(m),g=f.path(h,p),_=s.insert(()=>g,`:first-child`);return _.attr(`class`,`basic label-container outer-path`),d&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,d),r&&t.look!==`handDrawn`&&_.selectChildren(`path`).attr(`style`,r),Y(t,_),t.intersect=function(e){return Q.polygon(t,m,e)},s}l(F_,`trapezoidalPentagon`);var I_=10,L_=10;async function R_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?i*2:i;(t.width||t.height)&&(t.width=((t?.width??0)-a)/2,t.width<L_&&(t.width=L_),t.height=t?.height??0,t.height<I_&&(t.height=I_));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=pn(z().flowchart?.htmlLabels),u=(t?.width?t?.width:s.width)+a,d=t?.height?t?.height:u+s.height,p=d,m=[{x:0,y:0},{x:p,y:0},{x:p/2,y:-d}],{cssStyles:h}=t,g=q.svg(o),_=G(t,{});t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let v=Z(m),y=g.path(v,_),b=o.insert(()=>y,`:first-child`).attr(`transform`,`translate(${-d/2}, ${d/2})`).attr(`class`,`outer-path`);return h&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&b.selectChildren(`path`).attr(`style`,r),t.width=u,t.height=d,Y(t,b),c.attr(`transform`,`translate(${-s.width/2-(s.x-(s.left??0))}, ${d/2-(s.height+(t.padding??0)/(l?2:1)-(s.y-(s.top??0)))})`),t.intersect=function(e){return f.info(`Triangle intersect`,t,m,e),Q.polygon(t,m,e)},o}l(R_,`triangle`);async function z_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?12:i,s=!0;(t.width||t.height)&&(s=!1,t.width=(t?.width??0)-a*2,t.width<10&&(t.width=10),t.height=(t?.height??0)-o*2,t.height<10&&(t.height=10));let{shapeSvg:c,bbox:l,label:u}=await J(e,t,X(t)),d=(t?.width?t?.width:l.width)+(a??0)*2,f=(t?.height?t?.height:l.height)+(o??0)*2,p=t.look===`neo`?f/4:f/8,m=f+(s?p:-p),{cssStyles:h}=t,g=14-d,_=g>0?g/2:0,v=q.svg(c),y=G(t,{});t.look!==`handDrawn`&&(y.roughness=0,y.fillStyle=`solid`);let b=[{x:-d/2-_,y:m/2},...zh(-d/2-_,m/2,d/2+_,m/2,p,.8),{x:d/2+_,y:-m/2},{x:-d/2-_,y:-m/2}],x=Z(b),S=v.path(x,y),C=c.insert(()=>S,`:first-child`);return C.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&C.selectAll(`path`).attr(`style`,r),C.attr(`transform`,`translate(0,${-p/2})`),u.attr(`transform`,`translate(${-d/2+(t.padding??0)-(l.x-(l.left??0))},${-f/2+(t.padding??0)-p-(l.y-(l.top??0))})`),Y(t,C),t.intersect=function(e){return Q.polygon(t,b,e)},c}l(z_,`waveEdgedRectangle`);async function B_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.padding??0,a=t.look===`neo`?16:i,o=t.look===`neo`?20:i;if(t.width||t.height){t.width=t?.width??0,t.width<20&&(t.width=20),t.height=t?.height??0,t.height<10&&(t.height=10);let e=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-o-20/9*e),t.width-=a*2}let{shapeSvg:s,bbox:c}=await J(e,t,X(t)),l=(t?.width?t?.width:c.width)+a*2,u=(t?.height?t?.height:c.height)+o,d=u/8,f=u+d*2,{cssStyles:p}=t,m=q.svg(s),h=G(t,{});t.look!==`handDrawn`&&(h.roughness=0,h.fillStyle=`solid`);let g=[{x:-l/2,y:f/2},...zh(-l/2,f/2,l/2,f/2,d,1),{x:l/2,y:-f/2},...zh(l/2,-f/2,-l/2,-f/2,d,-1)],_=Z(g),v=m.path(_,h),y=s.insert(()=>v,`:first-child`);return y.attr(`class`,`basic label-container`),p&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,p),r&&t.look!==`handDrawn`&&y.selectAll(`path`).attr(`style`,r),Y(t,y),t.intersect=function(e){return Q.polygon(t,g,e)},s}l(B_,`waveRectangle`);var V_=10;async function H_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t.look===`neo`?16:t.padding??0,a=t.look===`neo`?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max((t?.width??0)-i*2-V_,10),t.height=Math.max((t?.height??0)-a*2-V_,10));let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=(t?.width?t?.width:s.width)+i*2+V_,u=(t?.height?t?.height:s.height)+a*2+V_,d=l-V_,f=u-V_,p=-d/2,m=-f/2,{cssStyles:h}=t,g=q.svg(o),_=G(t,{}),v=[{x:p-V_,y:m-V_},{x:p-V_,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-V_}],y=`M${p-V_},${m-V_} L${p+d},${m-V_} L${p+d},${m+f} L${p-V_},${m+f} L${p-V_},${m-V_}
|
|
203
|
-
M${p-V_},${m} L${p+d},${m}
|
|
204
|
-
M${p},${m-V_} L${p},${m+f}`;t.look!==`handDrawn`&&(_.roughness=0,_.fillStyle=`solid`);let b=g.path(y,_),x=o.insert(()=>b,`:first-child`);return x.attr(`transform`,`translate(${V_/2}, ${V_/2})`),x.attr(`class`,`basic label-container outer-path`),h&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,h),r&&t.look!==`handDrawn`&&x.selectAll(`path`).attr(`style`,r),c.attr(`transform`,`translate(${-(s.width/2)+V_/2-(s.x-(s.left??0))}, ${-(s.height/2)+V_/2-(s.y-(s.top??0))})`),Y(t,x),t.intersect=function(e){return Q.polygon(t,v,e)},o}l(H_,`windowPane`);var U_=new Set([`redux-color`,`redux-dark-color`]),W_=new Set([`redux`,`redux-dark`,`redux-color`,`redux-dark-color`]);async function G_(e,t){let n=t;n.alias&&(t.label=n.alias);let{theme:r,themeVariables:i}=R(),{rowEven:a,rowOdd:o,nodeBorder:s,borderColorArray:c}=i;if(t.look===`handDrawn`){let{themeVariables:n}=R(),{background:r}=n;await G_(e,{...t,id:t.id+`-background`,domId:(t.domId||t.id)+`-background`,look:`default`,cssStyles:[`stroke: none`,`fill: ${r}`]})}let l=R();t.useHtmlLabels=l.htmlLabels;let u=l.er?.diagramPadding??10,d=l.er?.entityPadding??6,{cssStyles:f}=t,{labelStyles:p,nodeStyles:m}=W(t);if(n.attributes.length===0&&t.label){let i={rx:0,ry:0,labelPaddingX:u,labelPaddingY:u*1.5,classes:``};Pd(t.label,l)+i.labelPaddingX*2<l.er.minEntityWidth&&(t.width=l.er.minEntityWidth);let a=await Ag(e,t,i);if(r!=null&&U_.has(r)){let e=n.colorIndex??0;a.attr(`data-color-id`,`color-${e%c.length}`)}if(!pn(l.htmlLabels)){let e=a.select(`text`),t=e.node()?.getBBox();e.attr(`transform`,`translate(${-t.width/2}, 0)`)}return a}l.htmlLabels||(u*=1.25,d*=1.25);let h=X(t);h||=`node default`;let g=e.insert(`g`).attr(`class`,h).attr(`id`,t.domId||t.id),_=await K_(g,t.label??``,l,0,0,[`name`],p);_.height+=d;let v=0,y=[],b=[],x=0,S=0,C=0,w=0,T=!0,E=!0;for(let e of n.attributes){let t=await K_(g,e.type,l,0,v,[`attribute-type`],p);x=Math.max(x,t.width+u);let n=await K_(g,e.name,l,0,v,[`attribute-name`],p);S=Math.max(S,n.width+u);let r=await K_(g,e.keys.join(),l,0,v,[`attribute-keys`],p);C=Math.max(C,r.width+u);let i=await K_(g,e.comment,l,0,v,[`attribute-comment`],p);w=Math.max(w,i.width+u);let a=Math.max(t.height,n.height,r.height,i.height)+d;b.push({yOffset:v,rowHeight:a}),v+=a}let D=4;C<=u&&(T=!1,C=0,D--),w<=u&&(E=!1,w=0,D--);let ee=g.node().getBBox();if(_.width+u*2-(x+S+C+w)>0){let e=_.width+u*2-(x+S+C+w);x+=e/D,S+=e/D,C>0&&(C+=e/D),w>0&&(w+=e/D)}let te=x+S+C+w,O=q.svg(g),ne=G(t,{});t.look!==`handDrawn`&&(ne.roughness=0,ne.fillStyle=`solid`);let k=0;b.length>0&&(k=b.reduce((e,t)=>e+(t?.rowHeight??0),0));let A=Math.max(ee.width+u*2,t?.width||0,te),j=Math.max((k??0)+_.height,t?.height||0),re=-A/2,M=-j/2;if(g.selectAll(`g:not(:first-child)`).each((e,t,n)=>{let r=B(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]),r.attr(`class`).includes(`attribute-name`)?a+=x:r.attr(`class`).includes(`attribute-keys`)?a+=x+S:r.attr(`class`).includes(`attribute-comment`)&&(a+=x+S+C))}r.attr(`transform`,`translate(${re+u/2+a}, ${o+M+_.height+d/2})`)}),g.select(`.name`).attr(`transform`,`translate(`+-_.width/2+`, `+(M+d/2)+`)`),r!=null&&U_.has(r)){let e=n.colorIndex??0;g.attr(`data-color-id`,`color-${e%c.length}`)}let ie=O.rectangle(re,M,A,j,ne),ae=g.insert(()=>ie,`:first-child`).attr(`class`,`outer-path`).attr(`style`,f.join(``));y.push(0);for(let[e,t]of b.entries()){let n=(e+1)%2==0&&t.yOffset!==0,r=O.rectangle(re,_.height+M+t?.yOffset,A,t?.rowHeight,{...ne,fill:n?a:o,stroke:s});g.insert(()=>r,`g.label`).attr(`style`,f.join(``)).attr(`class`,`row-rect-${n?`even`:`odd`}`)}let oe=1e-4,se=q_(re,_.height+M,A+re,_.height+M,oe),ce=O.polygon(se.map(e=>[e.x,e.y]),ne);if(g.insert(()=>ce).attr(`class`,`divider`),se=q_(x+re,_.height+M,x+re,j+M,oe),ce=O.polygon(se.map(e=>[e.x,e.y]),ne),g.insert(()=>ce).attr(`class`,`divider`),T){let e=x+S+re;se=q_(e,_.height+M,e,j+M,oe),ce=O.polygon(se.map(e=>[e.x,e.y]),ne),g.insert(()=>ce).attr(`class`,`divider`)}if(E){let e=x+S+C+re;se=q_(e,_.height+M,e,j+M,oe),ce=O.polygon(se.map(e=>[e.x,e.y]),ne),g.insert(()=>ce).attr(`class`,`divider`)}for(let e of y){let t=_.height+M+e;se=q_(re,t,A+re,t,oe),ce=O.polygon(se.map(e=>[e.x,e.y]),ne),g.insert(()=>ce).attr(`class`,`divider`)}if(Y(t,ae),m&&t.look!==`handDrawn`)if(r!=null&&W_.has(r))g.selectAll(`path`).attr(`style`,m);else{let e=m.split(`;`)?.filter(e=>e.includes(`stroke`))?.map(e=>`${e}`).join(`; `);g.selectAll(`path`).attr(`style`,e??``),g.selectAll(`.row-rect-even path`).attr(`style`,m)}return t.intersect=function(e){return Q.rect(t,e)},g}l(G_,`erBox`);async function K_(e,t,n,r=0,i=0,a=[],o=``){let s=e.insert(`g`).attr(`class`,`label ${a.join(` `)}`).attr(`transform`,`translate(${r}, ${i})`).attr(`style`,o);t!==Jn(t)&&(t=Jn(t),t=t.replaceAll(`<`,`<`).replaceAll(`>`,`>`));let c=s.node().appendChild(await xm(s,t,{width:Pd(t,n)+100,style:o,useHtmlLabels:n.htmlLabels},n));if(t.includes(`<`)||t.includes(`>`)){let e=c.children[0];for(e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`);e.childNodes[0];)e=e.childNodes[0],e.textContent=e.textContent.replaceAll(`<`,`<`).replaceAll(`>`,`>`)}let l=c.getBBox();if(pn(n.htmlLabels)){let e=c.children[0];e.style.textAlign=`start`;let t=B(c);l=e.getBoundingClientRect(),t.attr(`width`,l.width),t.attr(`height`,l.height)}return l}l(K_,`addText`);function q_(e,t,n,r,i){return e===n?[{x:e-i/2,y:t},{x:e+i/2,y:t},{x:n+i/2,y:r},{x:n-i/2,y:r}]:[{x:e,y:t-i/2},{x:e,y:t+i/2},{x:n,y:r+i/2},{x:n,y:r-i/2}]}l(q_,`lineToPolygon`);async function J_(e,t,n,r,i=n.class.padding??12){let a=r?0:3,o=e.insert(`g`).attr(`class`,X(t)).attr(`id`,t.domId||t.id),s=null,c=null,l=null,u=null,d=0,f=0,p=0;if(s=o.insert(`g`).attr(`class`,`annotation-group text`),t.annotations.length>0){let e=t.annotations[0];await Y_(s,{text:`\xAB${e}\xBB`},0),d=s.node().getBBox().height}c=o.insert(`g`).attr(`class`,`label-group text`),await Y_(c,t,0,[`font-weight: bolder`]);let m=c.node().getBBox();f=m.height,l=o.insert(`g`).attr(`class`,`members-group text`);let h=0;for(let e of t.members){let t=await Y_(l,e,h,[e.parseClassifier()]);h+=t+a}p=l.node().getBBox().height,p<=0&&(p=i/2),u=o.insert(`g`).attr(`class`,`methods-group text`);let g=0;for(let e of t.methods){let t=await Y_(u,e,g,[e.parseClassifier()]);g+=t+a}let _=o.node().getBBox();if(s!==null){let e=s.node().getBBox();s.attr(`transform`,`translate(${-e.width/2})`)}return c.attr(`transform`,`translate(${-m.width/2}, ${d})`),_=o.node().getBBox(),l.attr(`transform`,`translate(0, ${d+f+i*2})`),_=o.node().getBBox(),u.attr(`transform`,`translate(0, ${d+f+(p?p+i*4:i*2)})`),_=o.node().getBBox(),{shapeSvg:o,bbox:_}}l(J_,`textHelper`);async function Y_(e,t,n,r=[]){let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r.join(`; `)),a=R(),o=`useHtmlLabels`in t?t.useHtmlLabels:pn(a.htmlLabels)??!0,s=``;s=`text`in t?t.text:t.label,!o&&s.startsWith(`\\`)&&(s=s.substring(1)),er(s)&&(o=!0);let c=await xm(i,Ar(Gd(s)),{width:Pd(s,a)+50,classes:`markdown-node-label`,useHtmlLabels:o},a),u,d=1;if(o){let e=c.children[0],t=B(c);d=e.innerHTML.split(`<br>`).length,e.innerHTML.includes(`</math>`)&&(d+=e.innerHTML.split(`<mrow>`).length-1);let n=e.getElementsByTagName(`img`);if(n){let e=s.replace(/<img[^>]*>/g,``).trim()===``;await Promise.all([...n].map(t=>new Promise(n=>{function r(){if(t.style.display=`flex`,t.style.flexDirection=`column`,e){let e=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,n=parseInt(e,10)*5+`px`;t.style.minWidth=n,t.style.maxWidth=n}else t.style.width=`100%`;n(t)}l(r,`setupImage`),setTimeout(()=>{t.complete&&r()}),t.addEventListener(`error`,r),t.addEventListener(`load`,r)})))}u=e.getBoundingClientRect(),t.attr(`width`,u.width),t.attr(`height`,u.height)}else{r.includes(`font-weight: bolder`)&&B(c).selectAll(`tspan`).attr(`font-weight`,``),d=c.children.length;let e=c.children[0];(c.textContent===``||c.textContent.includes(`>`))&&(e.textContent=s[0]+s.substring(1).replaceAll(`>`,`>`).replaceAll(`<`,`<`).trim(),s[1]===` `&&(e.textContent=e.textContent[0]+` `+e.textContent.substring(1))),e.textContent===`undefined`&&(e.textContent=``),u=c.getBBox()}return i.attr(`transform`,`translate(0,`+(-u.height/(2*d)+n)+`)`),u.height}l(Y_,`addText`);async function X_(e,t){let n=z(),{themeVariables:r}=n,{useGradient:i}=r,a=n.class.padding??12,o=a,s=t.useHtmlLabels??pn(n.htmlLabels)??!0,c=t;c.annotations=c.annotations??[],c.members=c.members??[],c.methods=c.methods??[];let{shapeSvg:l,bbox:u}=await J_(e,t,n,s,o),{labelStyles:d,nodeStyles:f}=W(t);t.labelStyle=d,t.cssStyles=c.styles||``;let p=c.styles?.join(`;`)||f||``;t.cssStyles||=p.replaceAll(`!important`,``).split(`;`);let m=c.members.length===0&&c.methods.length===0&&!n.class?.hideEmptyMembersBox,h=q.svg(l),g=G(t,{});t.look!==`handDrawn`&&(g.roughness=0,g.fillStyle=`solid`);let _=Math.max(t.width??0,u.width),v=Math.max(t.height??0,u.height),y=(t.height??0)>u.height;c.members.length===0&&c.methods.length===0?v+=o:c.members.length>0&&c.methods.length===0&&(v+=o*2);let b=-_/2,x=-v/2,S=m?a*2:c.members.length===0&&c.methods.length===0?-a:0;y&&(S=a*2);let C=h.rectangle(b-a,x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0),_+2*a,v+2*a+S,g),w=l.insert(()=>C,`:first-child`);w.attr(`class`,`basic label-container outer-path`);let T=w.node().getBBox(),E=l.select(`.annotation-group`).node().getBBox().height-(m?a/2:0)||0,D=l.select(`.label-group`).node().getBBox().height-(m?a/2:0)||0,ee=l.select(`.members-group`).node().getBBox().height-(m?a/2:0)||0,te=(E+D+x+a-(x-a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0)))/2;if(l.selectAll(`.text`).each((e,t,r)=>{let i=B(r[t]),u=i.attr(`transform`),d=0;if(u){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(u);e&&(d=parseFloat(e[2]))}let f=d+x+a-(m?a:c.members.length===0&&c.methods.length===0?-a/2:0);if(i.attr(`class`).includes(`methods-group`)){let e=Math.max(ee,o/2);f=y?Math.max(te,E+D+e+x+o*2+a)+o*2:E+D+e+x+o*4+a}c.members.length===0&&c.methods.length===0&&n.class?.hideEmptyMembersBox&&(f=c.annotations.length>0?d-o:d),s||(f-=4);let p=b;(i.attr(`class`).includes(`label-group`)||i.attr(`class`).includes(`annotation-group`))&&(p=-i.node()?.getBBox().width/2||0,l.selectAll(`text`).each(function(e,t,n){window.getComputedStyle(n[t]).textAnchor===`middle`&&(p=0)})),i.attr(`transform`,`translate(${p}, ${f})`)}),c.members.length>0||c.methods.length>0||m){let e=E+D+x+a,n=h.line(T.x,e,T.x+T.width,e+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(m||c.members.length>0||c.methods.length>0){let e=E+D+ee+x+o*2+a,n=h.line(T.x,y?Math.max(te,e):e,T.x+T.width,(y?Math.max(te,e):e)+.001,g);l.insert(()=>n).attr(`class`,`divider${t.look===`neo`&&!i?` neo-line`:``}`).attr(`style`,p)}if(c.look!==`handDrawn`&&l.selectAll(`path`).attr(`style`,p),w.select(`:nth-child(2)`).attr(`style`,p),l.selectAll(`.divider`).select(`path`).attr(`style`,p),t.labelStyle?l.selectAll(`span`).attr(`style`,t.labelStyle):l.selectAll(`span`).attr(`style`,p),!s){let e=RegExp(/color\s*:\s*([^;]*)/),t=e.exec(p);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}else if(d){let t=e.exec(d);if(t){let e=t[0].replace(`color`,`fill`);l.selectAll(`tspan`).attr(`style`,e)}}}return Y(t,w),t.intersect=function(e){return Q.rect(t,e)},l}l(X_,`classBox`);async function Z_(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let i=t,a=t,o=`verifyMethod`in t,s=X(t),{themeVariables:c}=z(),{borderColorArray:l,requirementEdgeLabelBackground:u}=c,d=e.insert(`g`).attr(`class`,s).attr(`id`,t.domId??t.id),f;f=o?await Q_(d,`<<${i.type}>>`,0,t.labelStyle):await Q_(d,`<<Element>>`,0,t.labelStyle);let p=f,m=await Q_(d,i.name,p,t.labelStyle+`; font-weight: bold;`);if(p+=m+20,o){let e=await Q_(d,`${i.requirementId?`ID: ${i.requirementId}`:``}`,p,t.labelStyle);p+=e;let n=await Q_(d,`${i.text?`Text: ${i.text}`:``}`,p,t.labelStyle);p+=n;let r=await Q_(d,`${i.risk?`Risk: ${i.risk}`:``}`,p,t.labelStyle);p+=r,await Q_(d,`${i.verifyMethod?`Verification: ${i.verifyMethod}`:``}`,p,t.labelStyle)}else{let e=await Q_(d,`${a.type?`Type: ${a.type}`:``}`,p,t.labelStyle);p+=e,await Q_(d,`${a.docRef?`Doc Ref: ${a.docRef}`:``}`,p,t.labelStyle)}let h=(d.node()?.getBBox().width??200)+20,g=(d.node()?.getBBox().height??200)+20,_=-h/2,v=-g/2,y=q.svg(d),b=G(t,{});t.look!==`handDrawn`&&(b.roughness=0,b.fillStyle=`solid`);let x=y.rectangle(_,v,h,g,b),S=d.insert(()=>x,`:first-child`);if(S.attr(`class`,`basic label-container outer-path`).attr(`style`,r),l?.length){let e=t.colorIndex??0;d.attr(`data-color-id`,`color-${e%l.length}`)}if(d.selectAll(`.label`).each((e,t,n)=>{let r=B(n[t]),i=r.attr(`transform`),a=0,o=0;if(i){let e=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);e&&(a=parseFloat(e[1]),o=parseFloat(e[2]))}let s=o-g/2,c=_+20/2;(t===0||t===1)&&(c=a),r.attr(`transform`,`translate(${c}, ${s+20})`)}),p>f+m+20){let e=v+f+m+20,n;if(t.look===`neo`){let t=.001,r=[[_,e],[_+h,e],[_+h,e+t],[_,e+t]];n=y.polygon(r,b)}else n=y.line(_,e,_+h,e,b);d.insert(()=>n).attr(`class`,`divider`)}return Y(t,S),t.intersect=function(e){return Q.rect(t,e)},r&&t.look!==`handDrawn`&&(u||l?.length)&&d.selectAll(`path`).attr(`style`,r),d}l(Z_,`requirementBox`);async function Q_(e,t,n,r=``){if(t===``)return 0;let i=e.insert(`g`).attr(`class`,`label`).attr(`style`,r),a=z(),o=a.htmlLabels??!0,s=await xm(i,Ar(Gd(t)),{width:Pd(t,a)+50,classes:`markdown-node-label`,useHtmlLabels:o,style:r},a),c;if(o){let e=s.children[0],t=B(s);c=e.getBoundingClientRect(),t.attr(`width`,c.width),t.attr(`height`,c.height)}else{let e=s.children[0];for(let t of e.children)r&&t.setAttribute(`style`,r);c=s.getBBox(),c.height+=6}return i.attr(`transform`,`translate(${-c.width/2},${-c.height/2+n})`),c.height}l(Q_,`addText`);var $_=l(e=>{switch(e){case`Very High`:return`red`;case`High`:return`orange`;case`Medium`:return null;case`Low`:return`blue`;case`Very Low`:return`lightblue`}},`colorFromPriority`);async function ev(e,t,{config:n}){let{labelStyles:r,nodeStyles:i}=W(t);t.labelStyle=r||``;let a=t.width;t.width=(t.width??200)-10;let{shapeSvg:o,bbox:s,label:c}=await J(e,t,X(t)),l=t.padding||10,u=``,d;`ticket`in t&&t.ticket&&n?.kanban?.ticketBaseUrl&&(u=n?.kanban?.ticketBaseUrl.replace(`#TICKET#`,t.ticket),d=o.insert(`svg:a`,`:first-child`).attr(`class`,`kanban-ticket-link`).attr(`xlink:href`,u).attr(`target`,`_blank`));let f={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||``,width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1},p,m;d?{label:p,bbox:m}=await Rh(d,`ticket`in t&&t.ticket||``,f):{label:p,bbox:m}=await Rh(o,`ticket`in t&&t.ticket||``,f);let{label:h,bbox:g}=await Rh(o,`assigned`in t&&t.assigned||``,f);t.width=a;let _=t?.width||0,v=Math.max(m.height,g.height)/2,y=Math.max(s.height+20,t?.height||0)+v,b=-_/2,x=-y/2;c.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v-s.height/2)+`)`),p.attr(`transform`,`translate(`+(l-_/2)+`, `+(-v+s.height/2)+`)`),h.attr(`transform`,`translate(`+(l+_/2-g.width-20)+`, `+(-v+s.height/2)+`)`);let S,{rx:C,ry:w}=t,{cssStyles:T}=t;if(t.look===`handDrawn`){let e=q.svg(o),n=G(t,{}),r=C||w?e.path(Wh(b,x,_,y,C||0),n):e.rectangle(b,x,_,y,n);S=o.insert(()=>r,`:first-child`),S.attr(`class`,`basic label-container`).attr(`style`,T||null)}else{S=o.insert(`rect`,`:first-child`),S.attr(`class`,`basic label-container __APA__`).attr(`style`,i).attr(`rx`,C??5).attr(`ry`,w??5).attr(`x`,b).attr(`y`,x).attr(`width`,_).attr(`height`,y);let e=`priority`in t&&t.priority;if(e){let t=o.append(`line`),n=b+2,r=x+Math.floor((C??0)/2),i=x+y-Math.floor((C??0)/2);t.attr(`x1`,n).attr(`y1`,r).attr(`x2`,n).attr(`y2`,i).attr(`stroke-width`,`4`).attr(`stroke`,$_(e))}}return Y(t,S),t.height=y,t.intersect=function(e){return Q.rect(t,e)},o}l(ev,`kanbanItem`);async function tv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+10*o,l=a.height+8*o,u=.15*c,{cssStyles:d}=t,p=a.width+20,m=a.height+20,h=Math.max(c,p),g=Math.max(l,m);s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`);let _,v=`M0 0
|
|
205
|
-
a${u},${u} 1 0,0 ${h*.25},${-1*g*.1}
|
|
206
|
-
a${u},${u} 1 0,0 ${h*.25},0
|
|
207
|
-
a${u},${u} 1 0,0 ${h*.25},0
|
|
208
|
-
a${u},${u} 1 0,0 ${h*.25},${g*.1}
|
|
209
|
-
|
|
210
|
-
a${u},${u} 1 0,0 ${h*.15},${g*.33}
|
|
211
|
-
a${u*.8},${u*.8} 1 0,0 0,${g*.34}
|
|
212
|
-
a${u},${u} 1 0,0 ${-1*h*.15},${g*.33}
|
|
213
|
-
|
|
214
|
-
a${u},${u} 1 0,0 ${-1*h*.25},${g*.15}
|
|
215
|
-
a${u},${u} 1 0,0 ${-1*h*.25},0
|
|
216
|
-
a${u},${u} 1 0,0 ${-1*h*.25},0
|
|
217
|
-
a${u},${u} 1 0,0 ${-1*h*.25},${-1*g*.15}
|
|
218
|
-
|
|
219
|
-
a${u},${u} 1 0,0 ${-1*h*.1},${-1*g*.33}
|
|
220
|
-
a${u*.8},${u*.8} 1 0,0 0,${-1*g*.34}
|
|
221
|
-
a${u},${u} 1 0,0 ${h*.1},${-1*g*.33}
|
|
222
|
-
H0 V0 Z`;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(v,n);_=i.insert(()=>r,`:first-child`),_.attr(`class`,`basic label-container`).attr(`style`,qd(d))}else _=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,v);return _.attr(`transform`,`translate(${-h/2}, ${-g/2})`),Y(t,_),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return f.info(`Bang intersect`,t,e),Q.rect(t,e)},i}l(tv,`bang`);async function nv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+2*o,l=a.height+2*o,u=.15*c,d=.25*c,p=.35*c,m=.2*c,{cssStyles:h}=t,g,_=`M0 0
|
|
223
|
-
a${u},${u} 0 0,1 ${c*.25},${-1*c*.1}
|
|
224
|
-
a${p},${p} 1 0,1 ${c*.4},${-1*c*.1}
|
|
225
|
-
a${d},${d} 1 0,1 ${c*.35},${c*.2}
|
|
226
|
-
|
|
227
|
-
a${u},${u} 1 0,1 ${c*.15},${l*.35}
|
|
228
|
-
a${m},${m} 1 0,1 ${-1*c*.15},${l*.65}
|
|
229
|
-
|
|
230
|
-
a${d},${u} 1 0,1 ${-1*c*.25},${c*.15}
|
|
231
|
-
a${p},${p} 1 0,1 ${-1*c*.5},0
|
|
232
|
-
a${u},${u} 1 0,1 ${-1*c*.25},${-1*c*.15}
|
|
233
|
-
|
|
234
|
-
a${u},${u} 1 0,1 ${-1*c*.1},${-1*l*.35}
|
|
235
|
-
a${m},${m} 1 0,1 ${c*.1},${-1*l*.65}
|
|
236
|
-
H0 V0 Z`;if(t.look===`handDrawn`){let e=q.svg(i),n=G(t,{}),r=e.path(_,n);g=i.insert(()=>r,`:first-child`),g.attr(`class`,`basic label-container`).attr(`style`,qd(h))}else g=i.insert(`path`,`:first-child`).attr(`class`,`basic label-container`).attr(`style`,r).attr(`d`,_);return s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),g.attr(`transform`,`translate(${-c/2}, ${-l/2})`),Y(t,g),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return f.info(`Cloud intersect`,t,e),Q.rect(t,e)},i}l(nv,`cloud`);async function rv(e,t){let{labelStyles:n,nodeStyles:r}=W(t);t.labelStyle=n;let{shapeSvg:i,bbox:a,halfPadding:o,label:s}=await J(e,t,X(t)),c=a.width+8*o,l=a.height+2*o,u=t.look===`neo`?`
|
|
237
|
-
M${-c/2} ${l/2-5}
|
|
238
|
-
v${-l+10}
|
|
239
|
-
q0,-5 5,-5
|
|
240
|
-
h${c-10}
|
|
241
|
-
q5,0 5,5
|
|
242
|
-
v${l-5}
|
|
243
|
-
H${-c/2}
|
|
244
|
-
Z
|
|
245
|
-
`:`
|
|
246
|
-
M${-c/2} ${l/2-5}
|
|
247
|
-
v${-l+10}
|
|
248
|
-
q0,-5 5,-5
|
|
249
|
-
h${c-10}
|
|
250
|
-
q5,0 5,5
|
|
251
|
-
v${l-10}
|
|
252
|
-
q0,5 -5,5
|
|
253
|
-
h${-(c-10)}
|
|
254
|
-
q-5,0 -5,-5
|
|
255
|
-
Z
|
|
256
|
-
`;if(!t.domId)throw Error(`defaultMindmapNode: node "${t.id}" is missing a domId \u2014 was render.ts domId prefixing skipped?`);let d=i.append(`path`).attr(`id`,t.domId).attr(`class`,`node-bkg node-`+t.type).attr(`style`,r).attr(`d`,u);return i.append(`line`).attr(`class`,`node-line-`).attr(`x1`,-c/2).attr(`y1`,l/2).attr(`x2`,c/2).attr(`y2`,l/2),s.attr(`transform`,`translate(${-a.width/2}, ${-a.height/2})`),i.append(()=>s.node()),Y(t,d),t.calcIntersect=function(e,t){return Q.rect(e,t)},t.intersect=function(e){return Q.rect(t,e)},i}l(rv,`defaultMindmapNode`);async function iv(e,t){return mg(e,t,{padding:t.padding??0})}l(iv,`mindmapCircle`);var av=[{semanticName:`Process`,name:`Rectangle`,shortName:`rect`,description:`Standard process shape`,aliases:[`proc`,`process`,`rectangle`],internalAliases:[`squareRect`],handler:__},{semanticName:`Event`,name:`Rounded Rectangle`,shortName:`rounded`,description:`Represents an event`,aliases:[`event`],internalAliases:[`roundedRect`],handler:p_},{semanticName:`Terminal Point`,name:`Stadium`,shortName:`stadium`,description:`Terminal point`,aliases:[`terminal`,`pill`],handler:v_},{semanticName:`Subprocess`,name:`Framed Rectangle`,shortName:`fr-rect`,description:`Subprocess`,aliases:[`subprocess`,`subproc`,`framed-rectangle`,`subroutine`],handler:C_},{semanticName:`Database`,name:`Cylinder`,shortName:`cyl`,description:`Database storage`,aliases:[`db`,`database`,`cylinder`],handler:kg},{semanticName:`Data Store`,name:`Data Store`,shortName:`datastore`,description:`Data flow diagram data store`,aliases:[`data-store`],handler:jg},{semanticName:`Start`,name:`Circle`,shortName:`circle`,description:`Starting point`,aliases:[`circ`],handler:mg},{semanticName:`Bang`,name:`Bang`,shortName:`bang`,description:`Bang`,aliases:[`bang`],handler:tv},{semanticName:`Cloud`,name:`Cloud`,shortName:`cloud`,description:`cloud`,aliases:[`cloud`],handler:nv},{semanticName:`Decision`,name:`Diamond`,shortName:`diam`,description:`Decision-making step`,aliases:[`decision`,`diamond`,`question`],handler:u_},{semanticName:`Prepare Conditional`,name:`Hexagon`,shortName:`hex`,description:`Preparation or condition step`,aliases:[`hexagon`,`prepare`],handler:Vg},{semanticName:`Data Input/Output`,name:`Lean Right`,shortName:`lean-r`,description:`Represents input or output`,aliases:[`lean-right`,`in-out`],internalAliases:[`lean_right`],handler:Zg},{semanticName:`Data Input/Output`,name:`Lean Left`,shortName:`lean-l`,description:`Represents output or input`,aliases:[`lean-left`,`out-in`],internalAliases:[`lean_left`],handler:Xg},{semanticName:`Priority Action`,name:`Trapezoid Base Bottom`,shortName:`trap-b`,description:`Priority action`,aliases:[`priority`,`trapezoid-bottom`,`trapezoid`],handler:P_},{semanticName:`Manual Operation`,name:`Trapezoid Base Top`,shortName:`trap-t`,description:`Represents a manual task`,aliases:[`manual`,`trapezoid-top`,`inv-trapezoid`],internalAliases:[`inv_trapezoid`],handler:Jg},{semanticName:`Stop`,name:`Double Circle`,shortName:`dbl-circ`,description:`Represents a stop point`,aliases:[`double-circle`],internalAliases:[`doublecircle`],handler:Ng},{semanticName:`Text Block`,name:`Text Block`,shortName:`text`,description:`Text block`,handler:D_},{semanticName:`Card`,name:`Notched Rectangle`,shortName:`notch-rect`,description:`Represents a card`,aliases:[`card`,`notched-rectangle`],handler:fg},{semanticName:`Lined/Shaded Process`,name:`Lined Rectangle`,shortName:`lin-rect`,description:`Lined process shape`,aliases:[`lined-rectangle`,`lined-process`,`lin-proc`,`shaded-process`],handler:h_},{semanticName:`Start`,name:`Small Circle`,shortName:`sm-circ`,description:`Small starting point`,aliases:[`start`,`small-circle`],internalAliases:[`stateStart`],handler:x_},{semanticName:`Stop`,name:`Framed Circle`,shortName:`fr-circ`,description:`Stop point`,aliases:[`stop`,`framed-circle`],internalAliases:[`stateEnd`],handler:b_},{semanticName:`Fork/Join`,name:`Filled Rectangle`,shortName:`fork`,description:`Fork or join in process flow`,aliases:[`join`],internalAliases:[`forkJoin`],handler:Rg},{semanticName:`Collate`,name:`Hourglass`,shortName:`hourglass`,description:`Represents a collate operation`,aliases:[`hourglass`,`collate`],handler:Hg},{semanticName:`Comment`,name:`Curly Brace`,shortName:`brace`,description:`Adds a comment`,aliases:[`comment`,`brace-l`],handler:vg},{semanticName:`Comment Right`,name:`Curly Brace`,shortName:`brace-r`,description:`Adds a comment`,handler:bg},{semanticName:`Comment with braces on both sides`,name:`Curly Braces`,shortName:`braces`,description:`Adds a comment`,handler:Sg},{semanticName:`Com Link`,name:`Lightning Bolt`,shortName:`bolt`,description:`Communication link`,aliases:[`com-link`,`lightning-bolt`],handler:Qg},{semanticName:`Document`,name:`Document`,shortName:`doc`,description:`Represents a document`,aliases:[`doc`,`document`],handler:z_},{semanticName:`Delay`,name:`Half-Rounded Rectangle`,shortName:`delay`,description:`Represents a delay`,aliases:[`half-rounded-rectangle`],handler:zg},{semanticName:`Direct Access Storage`,name:`Horizontal Cylinder`,shortName:`h-cyl`,description:`Direct access storage`,aliases:[`das`,`horizontal-cylinder`],handler:N_},{semanticName:`Disk Storage`,name:`Lined Cylinder`,shortName:`lin-cyl`,description:`Disk storage`,aliases:[`disk`,`lined-cylinder`],handler:i_},{semanticName:`Display`,name:`Curved Trapezoid`,shortName:`curv-trap`,description:`Represents a display`,aliases:[`curved-trapezoid`,`display`],handler:Cg},{semanticName:`Divided Process`,name:`Divided Rectangle`,shortName:`div-rect`,description:`Divided process shape`,aliases:[`div-proc`,`divided-rectangle`,`divided-process`],handler:Mg},{semanticName:`Extract`,name:`Triangle`,shortName:`tri`,description:`Extraction process`,aliases:[`extract`,`triangle`],handler:R_},{semanticName:`Internal Storage`,name:`Window Pane`,shortName:`win-pane`,description:`Internal storage`,aliases:[`internal-storage`,`window-pane`],handler:H_},{semanticName:`Junction`,name:`Filled Circle`,shortName:`f-circ`,description:`Junction point`,aliases:[`junction`,`filled-circle`],handler:Pg},{semanticName:`Loop Limit`,name:`Trapezoidal Pentagon`,shortName:`notch-pent`,description:`Loop limit step`,aliases:[`loop-limit`,`notched-pentagon`],handler:F_},{semanticName:`Manual File`,name:`Flipped Triangle`,shortName:`flip-tri`,description:`Manual file operation`,aliases:[`manual-file`,`flipped-triangle`],handler:Lg},{semanticName:`Manual Input`,name:`Sloped Rectangle`,shortName:`sl-rect`,description:`Manual input step`,aliases:[`manual-input`,`sloped-rectangle`],handler:g_},{semanticName:`Multi-Document`,name:`Stacked Document`,shortName:`docs`,description:`Multiple documents`,aliases:[`documents`,`st-doc`,`stacked-document`],handler:s_},{semanticName:`Multi-Process`,name:`Stacked Rectangle`,shortName:`st-rect`,description:`Multiple processes`,aliases:[`procs`,`processes`,`stacked-rectangle`],handler:o_},{semanticName:`Stored Data`,name:`Bow Tie Rectangle`,shortName:`bow-rect`,description:`Stored data`,aliases:[`stored-data`,`bow-tie-rectangle`],handler:lg},{semanticName:`Summary`,name:`Crossed Circle`,shortName:`cross-circ`,description:`Summary`,aliases:[`summary`,`crossed-circle`],handler:gg},{semanticName:`Tagged Document`,name:`Tagged Document`,shortName:`tag-doc`,description:`Tagged document`,aliases:[`tag-doc`,`tagged-document`],handler:E_},{semanticName:`Tagged Process`,name:`Tagged Rectangle`,shortName:`tag-rect`,description:`Tagged process`,aliases:[`tagged-rectangle`,`tag-proc`,`tagged-process`],handler:T_},{semanticName:`Paper Tape`,name:`Flag`,shortName:`flag`,description:`Paper tape`,aliases:[`paper-tape`],handler:B_},{semanticName:`Odd`,name:`Odd`,shortName:`odd`,description:`Odd shape`,internalAliases:[`rect_left_inv_arrow`],handler:d_},{semanticName:`Lined Document`,name:`Lined Document`,shortName:`lin-doc`,description:`Lined document`,aliases:[`lined-document`],handler:a_}],ov=l(()=>{let e=[...Object.entries({state:y_,choice:pg,note:c_,rectWithTitle:f_,labelRect:Yg,iconSquare:Kg,iconCircle:Wg,icon:Ug,iconRounded:Gg,imageSquare:qg,anchor:og,kanbanItem:ev,mindmapCircle:iv,defaultMindmapNode:rv,classBox:X_,erBox:G_,requirementBox:Z_}),...av.flatMap(e=>[e.shortName,...`aliases`in e?e.aliases:[],...`internalAliases`in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(e)},`generateShapeMap`)();function sv(e){return e in ov}l(sv,`isValidShape`);var cv=new Map;async function lv(e,t,n){let r,i;t.shape===`rect`&&(t.rx&&t.ry?t.shape=`roundedRect`:t.shape=`squareRect`);let a=t.shape?ov[t.shape]:void 0;if(!a)throw Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let o;n.config.securityLevel===`sandbox`?o=`_top`:t.linkTarget&&(o=t.linkTarget||`_blank`),r=e.insert(`svg:a`).attr(`xlink:href`,t.link).attr(`target`,o??null),i=await a(r,t,n)}else i=await a(e,t,n),r=i;return r.attr(`data-look`,qd(t.look)),t.tooltip&&i.attr(`title`,t.tooltip),cv.set(t.id,r),t.haveCallback&&r.attr(`class`,r.attr(`class`)+` clickable`),r}l(lv,`insertNode`);var uv=l((e,t)=>{cv.set(t.id,e)},`setNodeElem`),dv=l(()=>{cv.clear()},`clear`),fv=l(e=>{let t=cv.get(e.id);f.trace(`Transforming node`,e.diff,e,`translate(`+(e.x-e.width/2-5)+`, `+e.width/2+`)`);let n=e.diff||0;return e.clusterNode?t.attr(`transform`,`translate(`+(e.x+n-e.width/2)+`, `+(e.y-e.height/2-8)+`)`):t.attr(`transform`,`translate(`+e.x+`, `+e.y+`)`),n},`positionNode`),pv=l((e,t,n,r,i,a=!1,o)=>{t.arrowTypeStart&&gv(e,`start`,t.arrowTypeStart,n,r,i,a,o),t.arrowTypeEnd&&gv(e,`end`,t.arrowTypeEnd,n,r,i,a,o)},`addEdgeMarkers`),mv={arrow_cross:{type:`cross`,fill:!1},arrow_point:{type:`point`,fill:!0},arrow_barb:{type:`barb`,fill:!0},arrow_barb_neo:{type:`barb`,fill:!0},arrow_circle:{type:`circle`,fill:!1},aggregation:{type:`aggregation`,fill:!1},extension:{type:`extension`,fill:!1},composition:{type:`composition`,fill:!0},dependency:{type:`dependency`,fill:!0},lollipop:{type:`lollipop`,fill:!1},only_one:{type:`onlyOne`,fill:!1},zero_or_one:{type:`zeroOrOne`,fill:!1},one_or_more:{type:`oneOrMore`,fill:!1},zero_or_more:{type:`zeroOrMore`,fill:!1},requirement_arrow:{type:`requirement_arrow`,fill:!1},requirement_contains:{type:`requirement_contains`,fill:!1}},hv=[`cross`,`point`,`circle`,`lollipop`,`aggregation`,`extension`,`composition`,`dependency`,`barb`],gv=l((e,t,n,r,i,a,o=!1,s)=>{let c=mv[n],l=c&&hv.includes(c.type);if(!c){f.warn(`Unknown arrow type: ${n}`);return}let u=`${i}_${a}-${c.type}${t===`start`?`Start`:`End`}${o&&l?`-margin`:``}`;if(s&&s.trim()!==``){let n=`${u}_${s.replace(/[^\dA-Za-z]/g,`_`)}`;if(!document.getElementById(n)){let e=document.getElementById(u);if(e){let t=e.cloneNode(!0);t.id=n,t.querySelectorAll(`path, circle, line`).forEach(e=>{e.setAttribute(`stroke`,s),c.fill&&e.setAttribute(`fill`,s)}),e.parentNode?.appendChild(t)}}e.attr(`marker-${t}`,`url(${r}#${n})`)}else e.attr(`marker-${t}`,`url(${r}#${u})`)},`addEdgeMarker`),_v=l(e=>typeof e==`string`?e:z()?.flowchart?.curve,`resolveEdgeCurveType`),vv=new Map,yv=new Map,bv=l(()=>{vv.clear(),yv.clear()},`clear`),xv=l(e=>e?typeof e==`string`?e:e.reduce((e,t)=>e+`;`+t,``):``,`getLabelStyles`),Sv=l(async(e,t)=>{let n=z(),r=Mn(n),{labelStyles:i}=W(t);t.labelStyle=i;let a=e.insert(`g`).attr(`class`,`edgeLabel`),o=a.insert(`g`).attr(`class`,`label`).attr(`data-id`,t.id),s=t.labelType===`markdown`,c=await xm(e,t.label,{style:xv(t.labelStyle),useHtmlLabels:r,addSvgBackground:!0,isNode:!1,markdown:s,width:void 0},n);o.node().appendChild(c),f.info(`abc82`,t,t.labelType);let l=c.getBBox(),u=l;if(r){let e=c.children[0],t=B(c);l=e.getBoundingClientRect(),u=l,t.attr(`width`,l.width),t.attr(`height`,l.height)}else{let e=B(c).select(`text`).node();e&&typeof e.getBBox==`function`&&(u=e.getBBox())}o.attr(`transform`,Sm(u,r)),vv.set(t.id,a),t.width=l.width,t.height=l.height;let d;if(t.startLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Uh(i,t.startLabelLeft,xv(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=B(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sm(o,r)),yv.get(t.id)||yv.set(t.id,{}),yv.get(t.id).startLeft=n,Cv(d,t.startLabelLeft)}if(t.startLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Uh(i,t.startLabelRight,xv(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=B(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sm(o,r)),yv.get(t.id)||yv.set(t.id,{}),yv.get(t.id).startRight=n,Cv(d,t.startLabelRight)}if(t.endLabelLeft){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Uh(n,t.endLabelLeft,xv(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=B(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sm(o,r)),yv.get(t.id)||yv.set(t.id,{}),yv.get(t.id).endLeft=n,Cv(d,t.endLabelLeft)}if(t.endLabelRight){let n=e.insert(`g`).attr(`class`,`edgeTerminals`),i=n.insert(`g`).attr(`class`,`inner`),a=await Uh(n,t.endLabelRight,xv(t.labelStyle)||``,!1,!1);d=a;let o=a.getBBox();if(r){let e=a.children[0],t=B(a);o=e.getBoundingClientRect(),t.attr(`width`,o.width),t.attr(`height`,o.height)}i.attr(`transform`,Sm(o,r)),yv.get(t.id)||yv.set(t.id,{}),yv.get(t.id).endRight=n,Cv(d,t.endLabelRight)}return c},`insertEdgeLabel`);function Cv(e,t){Mn(z())&&e&&(e.style.width=t.length*9+`px`,e.style.height=`12px`)}l(Cv,`setTerminalWidth`);var wv=l((e,t)=>{f.debug(`Moving label abc88 `,e.id,e.label,vv.get(e.id),t);let n=t.updatedPath?t.updatedPath:t.originalPath,{subGraphTitleTotalMargin:r}=Dm(z());if(e.label){let i=vv.get(e.id),a=e.x,o=e.y;if(n){let r=Ud.calcLabelPosition(n);f.debug(`Moving label `+e.label+` from (`,a,`,`,o,`) to (`,r.x,`,`,r.y,`) abc88`),t.updatedPath&&(a=r.x,o=r.y)}i.attr(`transform`,`translate(${a}, ${o+r/2})`)}if(e.startLabelLeft){let t=yv.get(e.id).startLeft,r=e.x,i=e.y;if(n){let t=Ud.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.startLabelRight){let t=yv.get(e.id).startRight,r=e.x,i=e.y;if(n){let t=Ud.calcTerminalLabelPosition(e.arrowTypeStart?10:0,`start_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelLeft){let t=yv.get(e.id).endLeft,r=e.x,i=e.y;if(n){let t=Ud.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_left`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}if(e.endLabelRight){let t=yv.get(e.id).endRight,r=e.x,i=e.y;if(n){let t=Ud.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,`end_right`,n);r=t.x,i=t.y}t.attr(`transform`,`translate(${r}, ${i})`)}},`positionEdgeLabel`),Tv=l((e,t)=>{let n=e.x,r=e.y,i=Math.abs(t.x-n),a=Math.abs(t.y-r),o=e.width/2,s=e.height/2;return i>=o||a>=s},`outsideNode`),Ev=l((e,t,n)=>{f.debug(`intersection calc abc89:
|
|
257
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
258
|
-
insidePoint : ${JSON.stringify(n)}
|
|
259
|
-
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);let r=e.x,i=e.y,a=Math.abs(r-n.x),o=e.width/2,s=n.x<t.x?o-a:o+a,c=e.height/2,l=Math.abs(t.y-n.y),u=Math.abs(t.x-n.x);if(Math.abs(i-t.y)*o>Math.abs(r-t.x)*c){let e=n.y<t.y?t.y-c-i:i-c-t.y;s=u*e/l;let r={x:n.x<t.x?n.x+s:n.x-u+s,y:n.y<t.y?n.y+l-e:n.y-l+e};return s===0&&(r.x=t.x,r.y=t.y),u===0&&(r.x=t.x),l===0&&(r.y=t.y),f.debug(`abc89 top/bottom calc, Q ${l}, q ${e}, R ${u}, r ${s}`,r),r}else{s=n.x<t.x?t.x-o-r:r-o-t.x;let e=l*s/u,i=n.x<t.x?n.x+u-s:n.x-u+s,a=n.y<t.y?n.y+e:n.y-e;return f.debug(`sides calc abc89, Q ${l}, q ${e}, R ${u}, r ${s}`,{_x:i,_y:a}),s===0&&(i=t.x,a=t.y),u===0&&(i=t.x),l===0&&(a=t.y),{x:i,y:a}}},`intersection`),Dv=l((e,t)=>{f.warn(`abc88 cutPathAtIntersect`,e,t);let n=[],r=e[0],i=!1;return e.forEach(e=>{if(f.info(`abc88 checking point`,e,t),!Tv(t,e)&&!i){let a=Ev(t,r,e);f.debug(`abc88 inside`,e,r,a),f.debug(`abc88 intersection`,a,t);let o=!1;n.forEach(e=>{o||=e.x===a.x&&e.y===a.y}),n.some(e=>e.x===a.x&&e.y===a.y)?f.warn(`abc88 no intersect`,a,n):n.push(a),i=!0}else f.warn(`abc88 outside`,e,r),r=e,i||n.push(e)}),f.debug(`returning points`,n),n},`cutPathAtIntersect`);function Ov(e){let t=[],n=[];for(let r=1;r<e.length-1;r++){let i=e[r-1],a=e[r],o=e[r+1];(i.x===a.x&&a.y===o.y&&Math.abs(a.x-o.x)>5&&Math.abs(a.y-i.y)>5||i.y===a.y&&a.x===o.x&&Math.abs(a.x-i.x)>5&&Math.abs(a.y-o.y)>5)&&(t.push(a),n.push(r))}return{cornerPoints:t,cornerPointPositions:n}}l(Ov,`extractCornerPoints`);var kv=l(function(e,t,n){let r=t.x-e.x,i=t.y-e.y,a=n/Math.sqrt(r*r+i*i);return{x:t.x-a*r,y:t.y-a*i}},`findAdjacentPoint`),Av=l(function(e){let{cornerPointPositions:t}=Ov(e),n=[];for(let r=0;r<e.length;r++)if(t.includes(r)){let t=e[r-1],i=e[r+1],a=e[r],o=kv(t,a,5),s=kv(i,a,5),c=s.x-o.x,l=s.y-o.y;n.push(o);let u=Math.sqrt(2)*2,d={x:a.x,y:a.y};Math.abs(i.x-t.x)>10&&Math.abs(i.y-t.y)>=10?(f.debug(`Corner point fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),d=a.x===o.x?{x:c<0?o.x-5+u:o.x+5-u,y:l<0?o.y-u:o.y+u}:{x:c<0?o.x-u:o.x+u,y:l<0?o.y-5+u:o.y+5-u}):f.debug(`Corner point skipping fixing`,Math.abs(i.x-t.x),Math.abs(i.y-t.y)),n.push(d,s)}else n.push(e[r]);return n},`fixCorners`),jv=l((e,t,n)=>{let r=e-t-n,i=Math.floor(r/4);return`0 ${t} ${Array(i).fill(`2 2`).join(` `)} ${n}`},`generateDashArray`),Mv=l(function(e,t,n,r,i,a,o,s=!1){if(!o)throw Error(`insertEdge: missing diagramId for edge "${t.id}" \u2014 edge IDs require a diagram prefix for uniqueness`);let{handDrawnSeed:c}=z(),l=t.points,u=!1,d=i;var p=a;let m=[];for(let e in t.cssCompiledStyles)Mm(e)||m.push(t.cssCompiledStyles[e]);f.debug(`UIO intersect check`,t.points,p.x,d.x),p.intersect&&d.intersect&&!s&&(l=l.slice(1,t.points.length-1),l.unshift(d.intersect(l[0])),f.debug(`Last point UIO`,t.start,`-->`,t.end,l[l.length-1],p,p.intersect(l[l.length-1])),l.push(p.intersect(l[l.length-1])));let h=btoa(JSON.stringify(l));t.toCluster&&(f.info(`to cluster abc88`,n.get(t.toCluster)),l=Dv(t.points,n.get(t.toCluster).node),u=!0),t.fromCluster&&(f.debug(`from cluster abc88`,n.get(t.fromCluster),JSON.stringify(l,null,2)),l=Dv(l.reverse(),n.get(t.fromCluster).node).reverse(),u=!0);let g=l.filter(e=>!Number.isNaN(e.y)),_=_v(t.curve);_!==`rounded`&&(g=Av(g));let v=ul;switch(_){case`linear`:v=ul;break;case`basis`:v=bl;break;case`cardinal`:v=kl;break;case`bumpX`:v=hl;break;case`bumpY`:v=gl;break;case`catmullRom`:v=Il;break;case`monotoneX`:v=Xl;break;case`monotoneY`:v=Zl;break;case`natural`:v=eu;break;case`step`:v=nu;break;case`stepAfter`:v=iu;break;case`stepBefore`:v=ru;break;case`rounded`:v=ul;break;default:v=bl}let{x:y,y:b}=Em(t),x=pl().x(y).y(b).curve(v),S;switch(t.thickness){case`normal`:S=`edge-thickness-normal`;break;case`thick`:S=`edge-thickness-thick`;break;case`invisible`:S=`edge-thickness-invisible`;break;default:S=`edge-thickness-normal`}switch(t.pattern){case`solid`:S+=` edge-pattern-solid`;break;case`dotted`:S+=` edge-pattern-dotted`;break;case`dashed`:S+=` edge-pattern-dashed`;break;default:S+=` edge-pattern-solid`}let C,w=_===`rounded`?Nv(Fv(g,t),5):x(g),T=Array.isArray(t.style)?t.style:[t.style],E=T.find(e=>e?.startsWith(`stroke:`)),D=``;t.animate&&(D=`edge-animation-fast`),t.animation&&(D=`edge-animation-`+t.animation);let ee=!1;if(t.look===`handDrawn`){let n=q.svg(e);Object.assign([],g);let r=n.path(w,{roughness:.3,seed:c});S+=` transition`,C=B(r).select(`path`).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+S+(t.classes?` `+t.classes:``)+(D?` `+D:``)).attr(`style`,T?T.reduce((e,t)=>e+`;`+t,``):``);let i=C.attr(`d`);C.attr(`d`,i),e.node().appendChild(C.node())}else{let n=m.join(`;`),r=T?T.reduce((e,t)=>e+t+`;`,``):``,i=(n?n+`;`+r+`;`:r)+`;`+(T?T.reduce((e,t)=>e+`;`+t,``):``);C=e.append(`path`).attr(`d`,w).attr(`id`,`${o}-${t.id}`).attr(`class`,` `+S+(t.classes?` `+t.classes:``)+(D?` `+D:``)).attr(`style`,i),E=i.match(/stroke:([^;]+)/)?.[1],ee=t.animate===!0||!!t.animation||n.includes(`animation`);let a=C.node(),s=typeof a.getTotalLength==`function`?a.getTotalLength():0,c=wm[t.arrowTypeStart]||0,l=wm[t.arrowTypeEnd]||0;if(t.look===`neo`&&!ee){let e=`stroke-dasharray: ${t.pattern===`dotted`||t.pattern===`dashed`?jv(s,c,l):`0 ${c} ${s-c-l} ${l}`}; stroke-dashoffset: 0;`;C.attr(`style`,e+C.attr(`style`))}}C.attr(`data-edge`,!0),C.attr(`data-et`,`edge`),C.attr(`data-id`,t.id),C.attr(`data-points`,h),C.attr(`data-look`,qd(t.look)),t.showPoints&&g.forEach(t=>{e.append(`circle`).style(`stroke`,`red`).style(`fill`,`red`).attr(`r`,1).attr(`cx`,t.x).attr(`cy`,t.y)});let te=``;(z().flowchart.arrowMarkerAbsolute||z().state.arrowMarkerAbsolute)&&(te=window.location.protocol+`//`+window.location.host+window.location.pathname+window.location.search,te=te.replace(/\(/g,`\\(`).replace(/\)/g,`\\)`)),f.info(`arrowTypeStart`,t.arrowTypeStart),f.info(`arrowTypeEnd`,t.arrowTypeEnd);let O=!ee&&t?.look===`neo`;pv(C,t,te,o,r,O,E);let ne=Math.floor(l.length/2),k=l[ne];Ud.isLabelCoordinateInPath(k,C.attr(`d`))||(u=!0);let A={};return u&&(A.updatedPath=l),A.originalPath=t.points,A},`insertEdge`);function Nv(e,t){if(e.length<2)return``;let n=``,r=e.length,i=1e-5;for(let a=0;a<r;a++){let o=e[a],s=e[a-1],c=e[a+1];if(a===0)n+=`M${o.x},${o.y}`;else if(a===r-1)n+=`L${o.x},${o.y}`;else{let e=o.x-s.x,r=o.y-s.y,a=c.x-o.x,l=c.y-o.y,u=Math.hypot(e,r),d=Math.hypot(a,l);if(u<i||d<i){n+=`L${o.x},${o.y}`;continue}let f=e/u,p=r/u,m=a/d,h=l/d,g=f*m+p*h,_=Math.acos(Math.max(-1,Math.min(1,g)));if(_<i||Math.abs(Math.PI-_)<i){n+=`L${o.x},${o.y}`;continue}let v=Math.min(t/Math.sin(_/2),u/2,d/2),y=o.x-f*v,b=o.y-p*v,x=o.x+m*v,S=o.y+h*v;n+=`L${y},${b}`,n+=`Q${o.x},${o.y} ${x},${S}`}}return n}l(Nv,`generateRoundedPath`);function Pv(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};let n=t.x-e.x,r=t.y-e.y;return{angle:Math.atan2(r,n),deltaX:n,deltaY:r}}l(Pv,`calculateDeltaAndAngle`);function Fv(e,t){let n=e.map(e=>({...e}));if(e.length>=2&&Cm[t.arrowTypeStart]){let r=Cm[t.arrowTypeStart],i=e[0],a=e[1],{angle:o}=Pv(i,a),s=r*Math.cos(o),c=r*Math.sin(o);n[0].x=i.x+s,n[0].y=i.y+c}let r=e.length;if(r>=2&&Cm[t.arrowTypeEnd]){let i=Cm[t.arrowTypeEnd],a=e[r-1],o=e[r-2],{angle:s}=Pv(o,a),c=i*Math.cos(s),l=i*Math.sin(s);n[r-1].x=a.x-c,n[r-1].y=a.y-l}return n}l(Fv,`applyMarkerOffsetsToPoints`);var Iv=l((e,t,n,r)=>{t.forEach(t=>{Lv[t](e,n,r)})},`insertMarkers`),Lv={extension:l((e,t,n)=>{f.trace(`Making markers for `,n),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionStart`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M 1,7 L18,13 V 1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd`).attr(`class`,`marker extension `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-extensionStart-margin`).attr(`class`,`marker extension `+t).attr(`refX`,18).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,7 18,13 18,1`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-extensionEnd-margin`).attr(`class`,`marker extension `+t).attr(`refX`,9).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`viewBox`,`0 0 20 14`).append(`polygon`).attr(`points`,`10,1 10,13 18,7`).style(`stroke-width`,2).style(`stroke-dasharray`,`0`)},`extension`),composition:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart`).attr(`class`,`marker composition `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd`).attr(`class`,`marker composition `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionStart-margin`).attr(`class`,`marker composition `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`viewBox`,`0 0 15 15`).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-compositionEnd-margin`).attr(`class`,`marker composition `+t).attr(`refX`,3.5).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`composition`),aggregation:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart`).attr(`class`,`marker aggregation `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd`).attr(`class`,`marker aggregation `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationStart-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,15).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-aggregationEnd-margin`).attr(`class`,`marker aggregation `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,2).attr(`d`,`M 18,7 L9,13 L1,7 L9,1 Z`)},`aggregation`),dependency:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart`).attr(`class`,`marker dependency `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd`).attr(`class`,`marker dependency `+t).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`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyStart-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,4).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 5,7 L9,13 L1,7 L9,1 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-dependencyEnd-margin`).attr(`class`,`marker dependency `+t).attr(`refX`,16).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).style(`stroke-width`,0).attr(`d`,`M 18,7 L9,13 L14,7 L9,1 Z`)},`dependency`),lollipop:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopStart-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,13).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-lollipopEnd-margin`).attr(`class`,`marker lollipop `+t).attr(`refX`,1).attr(`refY`,7).attr(`markerWidth`,190).attr(`markerHeight`,240).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`circle`).attr(`fill`,`transparent`).attr(`cx`,7).attr(`cy`,7).attr(`r`,6).attr(`stroke-width`,2)},`lollipop`),point:l((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,4.5).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,8).attr(`markerHeight`,8).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,11.5).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,10.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 0 0 L 11.5 7 L 0 14 z`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-pointStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 11.5 14`).attr(`refX`,1).attr(`refY`,7).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,11.5).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`polygon`).attr(`points`,`0,7 11.5,14 11.5,0`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`point`),circle:l((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart`).attr(`class`,`marker `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleEnd-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refY`,5).attr(`refX`,12.25).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`),e.append(`marker`).attr(`id`,n+`_`+t+`-circleStart-margin`).attr(`class`,`marker `+t).attr(`viewBox`,`0 0 10 10`).attr(`refX`,-2).attr(`refY`,5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,14).attr(`markerHeight`,14).attr(`orient`,`auto`).append(`circle`).attr(`cx`,`5`).attr(`cy`,`5`).attr(`r`,`5`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,0).style(`stroke-dasharray`,`1,0`)},`circle`),cross:l((e,t,n)=>{e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd`).attr(`class`,`marker cross `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart`).attr(`class`,`marker cross `+t).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`),e.append(`marker`).attr(`id`,n+`_`+t+`-crossEnd-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,17.7).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5),e.append(`marker`).attr(`id`,n+`_`+t+`-crossStart-margin`).attr(`class`,`marker cross `+t).attr(`viewBox`,`0 0 15 15`).attr(`refX`,-3.5).attr(`refY`,7.5).attr(`markerUnits`,`userSpaceOnUse`).attr(`markerWidth`,12).attr(`markerHeight`,12).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 1,1 L 14,14 M 1,14 L 14,1`).attr(`class`,`arrowMarkerPath`).style(`stroke-width`,2.5).style(`stroke-dasharray`,`1,0`)},`cross`),barb:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`barb`),barbNeo:l((e,t,n)=>{let{themeVariables:r}=R(),{transitionColor:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-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 L11,14 L13,7 L11,0 Z`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-barbEnd-margin`).attr(`refX`,17).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,14).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L11,14 L13,7 L11,0 Z`).attr(`fill`,`${i}`)},`barbNeo`),only_one:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`)},`only_one`),zero_or_one:l((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,21).attr(`cy`,9).attr(`r`,6),r.append(`path`).attr(`d`,`M9,0 L9,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,9).attr(`r`,6),i.append(`path`).attr(`d`,`M21,0 L21,18`)},`zero_or_one`),one_or_more:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`)},`one_or_more`),zero_or_more:l((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);r.append(`circle`).attr(`fill`,`white`).attr(`cx`,48).attr(`cy`,18).attr(`r`,6),r.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`);let i=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`);i.append(`circle`).attr(`fill`,`white`).attr(`cx`,9).attr(`cy`,18).attr(`r`,6),i.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`)},`zero_or_more`),only_one_neo:l((e,t,n)=>{let{themeVariables:r}=R(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneStart`).attr(`class`,`marker onlyOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M9,0 L9,18 M15,0 L15,18`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-onlyOneEnd`).attr(`class`,`marker onlyOne `+t).attr(`refX`,18).attr(`refY`,9).attr(`markerWidth`,18).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M3,0 L3,18 M9,0 L9,18`).attr(`stroke-width`,`${i}`)},`only_one_neo`),zero_or_one_neo:l((e,t,n)=>{let{themeVariables:r}=R(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneStart`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,0).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,21).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),o.append(`path`).attr(`d`,`M9,0 L9,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrOneEnd`).attr(`class`,`marker zeroOrOne `+t).attr(`refX`,30).attr(`refY`,9).attr(`markerWidth`,30).attr(`markerHeight`,18).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,9).attr(`cy`,9).attr(`stroke-width`,`${i}`).attr(`r`,6),s.append(`path`).attr(`d`,`M21,0 L21,18`).attr(`stroke-width`,`${i}`)},`zero_or_one_neo`),one_or_more_neo:l((e,t,n)=>{let{themeVariables:r}=R(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreStart`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`path`).attr(`d`,`M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27`).attr(`stroke-width`,`${i}`),e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-oneOrMoreEnd`).attr(`class`,`marker oneOrMore `+t).attr(`refX`,27).attr(`refY`,18).attr(`markerWidth`,45).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`).append(`path`).attr(`d`,`M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18`).attr(`stroke-width`,`${i}`)},`one_or_more_neo`),zero_or_more_neo:l((e,t,n)=>{let{themeVariables:r}=R(),{strokeWidth:i,mainBkg:a}=r,o=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreStart`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,18).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`markerUnits`,`userSpaceOnUse`).attr(`orient`,`auto`);o.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,45.5).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),o.append(`path`).attr(`d`,`M0,18 Q18,0 36,18 Q18,36 0,18`).attr(`stroke-width`,`${i}`);let s=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-zeroOrMoreEnd`).attr(`class`,`marker zeroOrMore `+t).attr(`refX`,39).attr(`refY`,18).attr(`markerWidth`,57).attr(`markerHeight`,36).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`);s.append(`circle`).attr(`fill`,a??`white`).attr(`cx`,11).attr(`cy`,18).attr(`r`,6).attr(`stroke-width`,`${i}`),s.append(`path`).attr(`d`,`M21,18 Q39,0 57,18 Q39,36 21,18`).attr(`stroke-width`,`${i}`)},`zero_or_more_neo`),requirement_arrow:l((e,t,n)=>{e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`path`).attr(`d`,`M0,0
|
|
260
|
-
L20,10
|
|
261
|
-
M20,10
|
|
262
|
-
L0,20`)},`requirement_arrow`),requirement_contains:l((e,t,n)=>{let r=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).append(`g`);r.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),r.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),r.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10)},`requirement_contains`),requirement_arrow_neo:l((e,t,n)=>{let{themeVariables:r}=R(),{strokeWidth:i}=r;e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_arrowEnd`).attr(`refX`,20).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).attr(`stroke-width`,`${i}`).attr(`viewBox`,`0 0 25 20`).append(`path`).attr(`d`,`M0,0
|
|
263
|
-
L20,10
|
|
264
|
-
M20,10
|
|
265
|
-
L0,20`).attr(`stroke-linejoin`,`miter`)},`requirement_arrow_neo`),requirement_contains_neo:l((e,t,n)=>{let{themeVariables:r}=R(),{strokeWidth:i}=r,a=e.append(`defs`).append(`marker`).attr(`id`,n+`_`+t+`-requirement_containsStart`).attr(`refX`,0).attr(`refY`,10).attr(`markerWidth`,20).attr(`markerHeight`,20).attr(`orient`,`auto`).attr(`markerUnits`,`userSpaceOnUse`).append(`g`);a.append(`circle`).attr(`cx`,10).attr(`cy`,10).attr(`r`,9).attr(`fill`,`none`),a.append(`line`).attr(`x1`,1).attr(`x2`,19).attr(`y1`,10).attr(`y2`,10),a.append(`line`).attr(`y1`,1).attr(`y2`,19).attr(`x1`,10).attr(`x2`,10),a.selectAll(`*`).attr(`stroke-width`,`${i}`)},`requirement_contains_neo`)},Rv=Iv,zv={common:ir,getConfig:R,insertCluster:Jh,insertEdge:Mv,insertEdgeLabel:Sv,insertMarkers:Rv,insertNode:lv,interpolateToCurve:md,labelHelper:J,log:f,positionEdgeLabel:wv},Bv={},Vv=l(e=>{for(let t of e)Bv[t.name]=t},`registerLayoutLoaders`);l(()=>{Vv([{name:`dagre`,loader:l(async()=>await t(()=>import(`./dagre-BM42HDAG-C7TguAWo.js`),__vite__mapDeps([3,4,5]),import.meta.url),`loader`)},{name:`cose-bilkent`,loader:l(async()=>await t(()=>import(`./cose-bilkent-S5V4N54A-CX3yotHq.js`),__vite__mapDeps([6,1,2,7]),import.meta.url),`loader`)}])},`registerDefaultLayoutLoaders`)();var Hv=l(async(e,t)=>{if(!(e.layoutAlgorithm in Bv))throw Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(let t of e.nodes){let n=t.domId||t.id;t.domId=`${e.diagramId}-${n}`}let n=Bv[e.layoutAlgorithm],r=await n.loader(),{theme:i,themeVariables:a}=e.config,{useGradient:o,gradientStart:s,gradientStop:c}=a,l=t.attr(`id`);if(t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow`).attr(`height`,`130%`).attr(`width`,`130%`).append(`feDropShadow`).attr(`dx`,`4`).attr(`dy`,`4`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),t.append(`defs`).append(`filter`).attr(`id`,`${l}-drop-shadow-small`).attr(`height`,`150%`).attr(`width`,`150%`).append(`feDropShadow`).attr(`dx`,`2`).attr(`dy`,`2`).attr(`stdDeviation`,0).attr(`flood-opacity`,`0.06`).attr(`flood-color`,`${i?.includes(`dark`)?`#FFFFFF`:`#000000`}`),o){let e=t.append(`linearGradient`).attr(`id`,t.attr(`id`)+`-gradient`).attr(`gradientUnits`,`objectBoundingBox`).attr(`x1`,`0%`).attr(`y1`,`0%`).attr(`x2`,`100%`).attr(`y2`,`0%`);e.append(`svg:stop`).attr(`offset`,`0%`).attr(`stop-color`,s).attr(`stop-opacity`,1),e.append(`svg:stop`).attr(`offset`,`100%`).attr(`stop-color`,c).attr(`stop-opacity`,1)}return r.render(e,t,zv,{algorithm:n.algorithm})},`render`),Uv=l((e=``,{fallback:t=`dagre`}={})=>{if(e in Bv)return e;if(t in Bv)return f.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw Error(`Both layout algorithms ${e} and ${t} are not registered.`)},`getRegisteredLayoutAlgorithm`);function Wv(e){return e==null}l(Wv,`isNothing`);function Gv(e){return typeof e==`object`&&!!e}l(Gv,`isObject`);function Kv(e){return Array.isArray(e)?e:Wv(e)?[]:[e]}l(Kv,`toArray`);function qv(e,t){var n,r,i,a;if(t)for(a=Object.keys(t),n=0,r=a.length;n<r;n+=1)i=a[n],e[i]=t[i];return e}l(qv,`extend`);function Jv(e,t){var n=``,r;for(r=0;r<t;r+=1)n+=e;return n}l(Jv,`repeat`);function Yv(e){return e===0&&1/e==-1/0}l(Yv,`isNegativeZero`);var Xv={isNothing:Wv,isObject:Gv,toArray:Kv,repeat:Jv,isNegativeZero:Yv,extend:qv};function Zv(e,t){var n=``,r=e.reason||`(unknown reason)`;return e.mark?(e.mark.name&&(n+=`in "`+e.mark.name+`" `),n+=`(`+(e.mark.line+1)+`:`+(e.mark.column+1)+`)`,!t&&e.mark.snippet&&(n+=`
|
|
266
|
-
|
|
267
|
-
`+e.mark.snippet),r+` `+n):r}l(Zv,`formatError`);function Qv(e,t){Error.call(this),this.name=`YAMLException`,this.reason=e,this.mark=t,this.message=Zv(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=Error().stack||``}l(Qv,`YAMLException$1`),Qv.prototype=Object.create(Error.prototype),Qv.prototype.constructor=Qv,Qv.prototype.toString=l(function(e){return this.name+`: `+Zv(this,e)},`toString`);var $v=Qv;function ey(e,t,n,r,i){var a=``,o=``,s=Math.floor(i/2)-1;return r-t>s&&(a=` ... `,t=r-s+a.length),n-r>s&&(o=` ...`,n=r+s-o.length),{str:a+e.slice(t,n).replace(/\t/g,`→`)+o,pos:r-t+a.length}}l(ey,`getLine`);function ty(e,t){return Xv.repeat(` `,t-e.length)+e}l(ty,`padStart`);function ny(e,t){if(t=Object.create(t||null),!e.buffer)return null;t.maxLength||=79,typeof t.indent!=`number`&&(t.indent=1),typeof t.linesBefore!=`number`&&(t.linesBefore=3),typeof t.linesAfter!=`number`&&(t.linesAfter=2);for(var n=/\r?\n|\r|\0/g,r=[0],i=[],a,o=-1;a=n.exec(e.buffer);)i.push(a.index),r.push(a.index+a[0].length),e.position<=a.index&&o<0&&(o=r.length-2);o<0&&(o=r.length-1);var s=``,c,l,u=Math.min(e.line+t.linesAfter,i.length).toString().length,d=t.maxLength-(t.indent+u+3);for(c=1;c<=t.linesBefore&&!(o-c<0);c++)l=ey(e.buffer,r[o-c],i[o-c],e.position-(r[o]-r[o-c]),d),s=Xv.repeat(` `,t.indent)+ty((e.line-c+1).toString(),u)+` | `+l.str+`
|
|
268
|
-
`+s;for(l=ey(e.buffer,r[o],i[o],e.position,d),s+=Xv.repeat(` `,t.indent)+ty((e.line+1).toString(),u)+` | `+l.str+`
|
|
269
|
-
`,s+=Xv.repeat(`-`,t.indent+u+3+l.pos)+`^
|
|
270
|
-
`,c=1;c<=t.linesAfter&&!(o+c>=i.length);c++)l=ey(e.buffer,r[o+c],i[o+c],e.position-(r[o]-r[o+c]),d),s+=Xv.repeat(` `,t.indent)+ty((e.line+c+1).toString(),u)+` | `+l.str+`
|
|
271
|
-
`;return s.replace(/\n$/,``)}l(ny,`makeSnippet`);var ry=ny,iy=[`kind`,`multi`,`resolve`,`construct`,`instanceOf`,`predicate`,`represent`,`representName`,`defaultStyle`,`styleAliases`],ay=[`scalar`,`sequence`,`mapping`];function oy(e){var t={};return e!==null&&Object.keys(e).forEach(function(n){e[n].forEach(function(e){t[String(e)]=n})}),t}l(oy,`compileStyleAliases`);function sy(e,t){if(t||={},Object.keys(t).forEach(function(t){if(iy.indexOf(t)===-1)throw new $v(`Unknown option "`+t+`" is met in definition of "`+e+`" YAML type.`)}),this.options=t,this.tag=e,this.kind=t.kind||null,this.resolve=t.resolve||function(){return!0},this.construct=t.construct||function(e){return e},this.instanceOf=t.instanceOf||null,this.predicate=t.predicate||null,this.represent=t.represent||null,this.representName=t.representName||null,this.defaultStyle=t.defaultStyle||null,this.multi=t.multi||!1,this.styleAliases=oy(t.styleAliases||null),ay.indexOf(this.kind)===-1)throw new $v(`Unknown kind "`+this.kind+`" is specified for "`+e+`" YAML type.`)}l(sy,`Type$1`);var cy=sy;function ly(e,t){var n=[];return e[t].forEach(function(e){var t=n.length;n.forEach(function(n,r){n.tag===e.tag&&n.kind===e.kind&&n.multi===e.multi&&(t=r)}),n[t]=e}),n}l(ly,`compileList`);function uy(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},t,n;function r(t){t.multi?(e.multi[t.kind].push(t),e.multi.fallback.push(t)):e[t.kind][t.tag]=e.fallback[t.tag]=t}for(l(r,`collectType`),t=0,n=arguments.length;t<n;t+=1)arguments[t].forEach(r);return e}l(uy,`compileMap`);function dy(e){return this.extend(e)}l(dy,`Schema$1`),dy.prototype.extend=l(function(e){var t=[],n=[];if(e instanceof cy)n.push(e);else if(Array.isArray(e))n=n.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(t=t.concat(e.implicit)),e.explicit&&(n=n.concat(e.explicit));else throw new $v(`Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })`);t.forEach(function(e){if(!(e instanceof cy))throw new $v(`Specified list of YAML types (or a single Type object) contains a non-Type object.`);if(e.loadKind&&e.loadKind!==`scalar`)throw new $v(`There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.`);if(e.multi)throw new $v(`There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.`)}),n.forEach(function(e){if(!(e instanceof cy))throw new $v(`Specified list of YAML types (or a single Type object) contains a non-Type object.`)});var r=Object.create(dy.prototype);return r.implicit=(this.implicit||[]).concat(t),r.explicit=(this.explicit||[]).concat(n),r.compiledImplicit=ly(r,`implicit`),r.compiledExplicit=ly(r,`explicit`),r.compiledTypeMap=uy(r.compiledImplicit,r.compiledExplicit),r},`extend`);var fy=new dy({explicit:[new cy(`tag:yaml.org,2002:str`,{kind:`scalar`,construct:l(function(e){return e===null?``:e},`construct`)}),new cy(`tag:yaml.org,2002:seq`,{kind:`sequence`,construct:l(function(e){return e===null?[]:e},`construct`)}),new cy(`tag:yaml.org,2002:map`,{kind:`mapping`,construct:l(function(e){return e===null?{}:e},`construct`)})]});function py(e){if(e===null)return!0;var t=e.length;return t===1&&e===`~`||t===4&&(e===`null`||e===`Null`||e===`NULL`)}l(py,`resolveYamlNull`);function my(){return null}l(my,`constructYamlNull`);function hy(e){return e===null}l(hy,`isNull`);var gy=new cy(`tag:yaml.org,2002:null`,{kind:`scalar`,resolve:py,construct:my,predicate:hy,represent:{canonical:l(function(){return`~`},`canonical`),lowercase:l(function(){return`null`},`lowercase`),uppercase:l(function(){return`NULL`},`uppercase`),camelcase:l(function(){return`Null`},`camelcase`),empty:l(function(){return``},`empty`)},defaultStyle:`lowercase`});function _y(e){if(e===null)return!1;var t=e.length;return t===4&&(e===`true`||e===`True`||e===`TRUE`)||t===5&&(e===`false`||e===`False`||e===`FALSE`)}l(_y,`resolveYamlBoolean`);function vy(e){return e===`true`||e===`True`||e===`TRUE`}l(vy,`constructYamlBoolean`);function yy(e){return Object.prototype.toString.call(e)===`[object Boolean]`}l(yy,`isBoolean`);var by=new cy(`tag:yaml.org,2002:bool`,{kind:`scalar`,resolve:_y,construct:vy,predicate:yy,represent:{lowercase:l(function(e){return e?`true`:`false`},`lowercase`),uppercase:l(function(e){return e?`TRUE`:`FALSE`},`uppercase`),camelcase:l(function(e){return e?`True`:`False`},`camelcase`)},defaultStyle:`lowercase`});function xy(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}l(xy,`isHexCode`);function Sy(e){return 48<=e&&e<=55}l(Sy,`isOctCode`);function Cy(e){return 48<=e&&e<=57}l(Cy,`isDecCode`);function wy(e){if(e===null)return!1;var t=e.length,n=0,r=!1,i;if(!t)return!1;if(i=e[n],(i===`-`||i===`+`)&&(i=e[++n]),i===`0`){if(n+1===t)return!0;if(i=e[++n],i===`b`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(i!==`0`&&i!==`1`)return!1;r=!0}return r&&i!==`_`}if(i===`x`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!xy(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}if(i===`o`){for(n++;n<t;n++)if(i=e[n],i!==`_`){if(!Sy(e.charCodeAt(n)))return!1;r=!0}return r&&i!==`_`}}if(i===`_`)return!1;for(;n<t;n++)if(i=e[n],i!==`_`){if(!Cy(e.charCodeAt(n)))return!1;r=!0}return!(!r||i===`_`)}l(wy,`resolveYamlInteger`);function Ty(e){var t=e,n=1,r;if(t.indexOf(`_`)!==-1&&(t=t.replace(/_/g,``)),r=t[0],(r===`-`||r===`+`)&&(r===`-`&&(n=-1),t=t.slice(1),r=t[0]),t===`0`)return 0;if(r===`0`){if(t[1]===`b`)return n*parseInt(t.slice(2),2);if(t[1]===`x`)return n*parseInt(t.slice(2),16);if(t[1]===`o`)return n*parseInt(t.slice(2),8)}return n*parseInt(t,10)}l(Ty,`constructYamlInteger`);function Ey(e){return Object.prototype.toString.call(e)===`[object Number]`&&e%1==0&&!Xv.isNegativeZero(e)}l(Ey,`isInteger`);var Dy=new cy(`tag:yaml.org,2002:int`,{kind:`scalar`,resolve:wy,construct:Ty,predicate:Ey,represent:{binary:l(function(e){return e>=0?`0b`+e.toString(2):`-0b`+e.toString(2).slice(1)},`binary`),octal:l(function(e){return e>=0?`0o`+e.toString(8):`-0o`+e.toString(8).slice(1)},`octal`),decimal:l(function(e){return e.toString(10)},`decimal`),hexadecimal:l(function(e){return e>=0?`0x`+e.toString(16).toUpperCase():`-0x`+e.toString(16).toUpperCase().slice(1)},`hexadecimal`)},defaultStyle:`decimal`,styleAliases:{binary:[2,`bin`],octal:[8,`oct`],decimal:[10,`dec`],hexadecimal:[16,`hex`]}}),Oy=RegExp(`^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$`);function ky(e){return!(e===null||!Oy.test(e)||e[e.length-1]===`_`)}l(ky,`resolveYamlFloat`);function Ay(e){var t=e.replace(/_/g,``).toLowerCase(),n=t[0]===`-`?-1:1;return`+-`.indexOf(t[0])>=0&&(t=t.slice(1)),t===`.inf`?n===1?1/0:-1/0:t===`.nan`?NaN:n*parseFloat(t,10)}l(Ay,`constructYamlFloat`);var jy=/^[-+]?[0-9]+e/;function My(e,t){var n;if(isNaN(e))switch(t){case`lowercase`:return`.nan`;case`uppercase`:return`.NAN`;case`camelcase`:return`.NaN`}else if(e===1/0)switch(t){case`lowercase`:return`.inf`;case`uppercase`:return`.INF`;case`camelcase`:return`.Inf`}else if(e===-1/0)switch(t){case`lowercase`:return`-.inf`;case`uppercase`:return`-.INF`;case`camelcase`:return`-.Inf`}else if(Xv.isNegativeZero(e))return`-0.0`;return n=e.toString(10),jy.test(n)?n.replace(`e`,`.e`):n}l(My,`representYamlFloat`);function Ny(e){return Object.prototype.toString.call(e)===`[object Number]`&&(e%1!=0||Xv.isNegativeZero(e))}l(Ny,`isFloat`);var Py=new cy(`tag:yaml.org,2002:float`,{kind:`scalar`,resolve:ky,construct:Ay,predicate:Ny,represent:My,defaultStyle:`lowercase`}),Fy=fy.extend({implicit:[gy,by,Dy,Py]}),Iy=Fy,Ly=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$`),Ry=RegExp(`^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$`);function zy(e){return e===null?!1:Ly.exec(e)!==null||Ry.exec(e)!==null}l(zy,`resolveYamlTimestamp`);function By(e){var t,n,r,i,a,o,s,c=0,l=null,u,d,f;if(t=Ly.exec(e),t===null&&(t=Ry.exec(e)),t===null)throw Error(`Date resolve error`);if(n=+t[1],r=t[2]-1,i=+t[3],!t[4])return new Date(Date.UTC(n,r,i));if(a=+t[4],o=+t[5],s=+t[6],t[7]){for(c=t[7].slice(0,3);c.length<3;)c+=`0`;c=+c}return t[9]&&(u=+t[10],d=+(t[11]||0),l=(u*60+d)*6e4,t[9]===`-`&&(l=-l)),f=new Date(Date.UTC(n,r,i,a,o,s,c)),l&&f.setTime(f.getTime()-l),f}l(By,`constructYamlTimestamp`);function Vy(e){return e.toISOString()}l(Vy,`representYamlTimestamp`);var Hy=new cy(`tag:yaml.org,2002:timestamp`,{kind:`scalar`,resolve:zy,construct:By,instanceOf:Date,represent:Vy});function Uy(e){return e===`<<`||e===null}l(Uy,`resolveYamlMerge`);var Wy=new cy(`tag:yaml.org,2002:merge`,{kind:`scalar`,resolve:Uy}),Gy=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
272
|
-
\r`;function Ky(e){if(e===null)return!1;var t,n,r=0,i=e.length,a=Gy;for(n=0;n<i;n++)if(t=a.indexOf(e.charAt(n)),!(t>64)){if(t<0)return!1;r+=6}return r%8==0}l(Ky,`resolveYamlBinary`);function qy(e){var t,n,r=e.replace(/[\r\n=]/g,``),i=r.length,a=Gy,o=0,s=[];for(t=0;t<i;t++)t%4==0&&t&&(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)),o=o<<6|a.indexOf(r.charAt(t));return n=i%4*6,n===0?(s.push(o>>16&255),s.push(o>>8&255),s.push(o&255)):n===18?(s.push(o>>10&255),s.push(o>>2&255)):n===12&&s.push(o>>4&255),new Uint8Array(s)}l(qy,`constructYamlBinary`);function Jy(e){var t=``,n=0,r,i,a=e.length,o=Gy;for(r=0;r<a;r++)r%3==0&&r&&(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]),n=(n<<8)+e[r];return i=a%3,i===0?(t+=o[n>>18&63],t+=o[n>>12&63],t+=o[n>>6&63],t+=o[n&63]):i===2?(t+=o[n>>10&63],t+=o[n>>4&63],t+=o[n<<2&63],t+=o[64]):i===1&&(t+=o[n>>2&63],t+=o[n<<4&63],t+=o[64],t+=o[64]),t}l(Jy,`representYamlBinary`);function Yy(e){return Object.prototype.toString.call(e)===`[object Uint8Array]`}l(Yy,`isBinary`);var Xy=new cy(`tag:yaml.org,2002:binary`,{kind:`scalar`,resolve:Ky,construct:qy,predicate:Yy,represent:Jy}),Zy=Object.prototype.hasOwnProperty,Qy=Object.prototype.toString;function $y(e){if(e===null)return!0;var t=[],n,r,i,a,o,s=e;for(n=0,r=s.length;n<r;n+=1){if(i=s[n],o=!1,Qy.call(i)!==`[object Object]`)return!1;for(a in i)if(Zy.call(i,a))if(!o)o=!0;else return!1;if(!o)return!1;if(t.indexOf(a)===-1)t.push(a);else return!1}return!0}l($y,`resolveYamlOmap`);function eb(e){return e===null?[]:e}l(eb,`constructYamlOmap`);var tb=new cy(`tag:yaml.org,2002:omap`,{kind:`sequence`,resolve:$y,construct:eb}),nb=Object.prototype.toString;function rb(e){if(e===null)return!0;var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1){if(r=o[t],nb.call(r)!==`[object Object]`||(i=Object.keys(r),i.length!==1))return!1;a[t]=[i[0],r[i[0]]]}return!0}l(rb,`resolveYamlPairs`);function ib(e){if(e===null)return[];var t,n,r,i,a,o=e;for(a=Array(o.length),t=0,n=o.length;t<n;t+=1)r=o[t],i=Object.keys(r),a[t]=[i[0],r[i[0]]];return a}l(ib,`constructYamlPairs`);var ab=new cy(`tag:yaml.org,2002:pairs`,{kind:`sequence`,resolve:rb,construct:ib}),ob=Object.prototype.hasOwnProperty;function sb(e){if(e===null)return!0;var t,n=e;for(t in n)if(ob.call(n,t)&&n[t]!==null)return!1;return!0}l(sb,`resolveYamlSet`);function cb(e){return e===null?{}:e}l(cb,`constructYamlSet`);var lb=new cy(`tag:yaml.org,2002:set`,{kind:`mapping`,resolve:sb,construct:cb}),ub=Iy.extend({implicit:[Hy,Wy],explicit:[Xy,tb,ab,lb]}),db=Object.prototype.hasOwnProperty,fb=1,pb=2,mb=3,hb=4,gb=1,_b=2,vb=3,yb=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,bb=/[\x85\u2028\u2029]/,xb=/[,\[\]\{\}]/,Sb=/^(?:!|!!|![a-z\-]+!)$/i,Cb=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function wb(e){return Object.prototype.toString.call(e)}l(wb,`_class`);function Tb(e){return e===10||e===13}l(Tb,`is_EOL`);function Eb(e){return e===9||e===32}l(Eb,`is_WHITE_SPACE`);function Db(e){return e===9||e===32||e===10||e===13}l(Db,`is_WS_OR_EOL`);function Ob(e){return e===44||e===91||e===93||e===123||e===125}l(Ob,`is_FLOW_INDICATOR`);function kb(e){var t;return 48<=e&&e<=57?e-48:(t=e|32,97<=t&&t<=102?t-97+10:-1)}l(kb,`fromHexCode`);function Ab(e){return e===120?2:e===117?4:e===85?8:0}l(Ab,`escapedHexLen`);function jb(e){return 48<=e&&e<=57?e-48:-1}l(jb,`fromDecimalCode`);function Mb(e){return e===48?`\0`:e===97?`\x07`:e===98?`\b`:e===116||e===9?` `:e===110?`
|
|
273
|
-
`:e===118?`\v`:e===102?`\f`:e===114?`\r`:e===101?`\x1B`:e===32?` `:e===34?`"`:e===47?`/`:e===92?`\\`:e===78?`
`:e===95?`\xA0`:e===76?`\u2028`:e===80?`\u2029`:``}l(Mb,`simpleEscapeSequence`);function Nb(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}l(Nb,`charFromCodepoint`);function Pb(e,t,n){t===`__proto__`?Object.defineProperty(e,t,{configurable:!0,enumerable:!0,writable:!0,value:n}):e[t]=n}l(Pb,`setProperty`);var Fb=Array(256),Ib=Array(256);for(Lb=0;Lb<256;Lb++)Fb[Lb]=+!!Mb(Lb),Ib[Lb]=Mb(Lb);var Lb;function Rb(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ub,this.onWarning=t.onWarning||null,this.legacy=t.legacy||!1,this.json=t.json||!1,this.listener=t.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}l(Rb,`State$1`);function zb(e,t){var n={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return n.snippet=ry(n),new $v(t,n)}l(zb,`generateError`);function $(e,t){throw zb(e,t)}l($,`throwError`);function Bb(e,t){e.onWarning&&e.onWarning.call(null,zb(e,t))}l(Bb,`throwWarning`);var Vb={YAML:l(function(e,t,n){var r,i,a;e.version!==null&&$(e,`duplication of %YAML directive`),n.length!==1&&$(e,`YAML directive accepts exactly one argument`),r=/^([0-9]+)\.([0-9]+)$/.exec(n[0]),r===null&&$(e,`ill-formed argument of the YAML directive`),i=parseInt(r[1],10),a=parseInt(r[2],10),i!==1&&$(e,`unacceptable YAML version of the document`),e.version=n[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&Bb(e,`unsupported YAML version of the document`)},`handleYamlDirective`),TAG:l(function(e,t,n){var r,i;n.length!==2&&$(e,`TAG directive accepts exactly two arguments`),r=n[0],i=n[1],Sb.test(r)||$(e,`ill-formed tag handle (first argument) of the TAG directive`),db.call(e.tagMap,r)&&$(e,`there is a previously declared suffix for "`+r+`" tag handle`),Cb.test(i)||$(e,`ill-formed tag prefix (second argument) of the TAG directive`);try{i=decodeURIComponent(i)}catch{$(e,`tag prefix is malformed: `+i)}e.tagMap[r]=i},`handleTagDirective`)};function Hb(e,t,n,r){var i,a,o,s;if(t<n){if(s=e.input.slice(t,n),r)for(i=0,a=s.length;i<a;i+=1)o=s.charCodeAt(i),o===9||32<=o&&o<=1114111||$(e,`expected valid JSON character`);else yb.test(s)&&$(e,`the stream contains non-printable characters`);e.result+=s}}l(Hb,`captureSegment`);function Ub(e,t,n,r){var i,a,o,s;for(Xv.isObject(n)||$(e,`cannot merge mappings; the provided source object is unacceptable`),i=Object.keys(n),o=0,s=i.length;o<s;o+=1)a=i[o],db.call(t,a)||(Pb(t,a,n[a]),r[a]=!0)}l(Ub,`mergeMappings`);function Wb(e,t,n,r,i,a,o,s,c){var l,u;if(Array.isArray(i))for(i=Array.prototype.slice.call(i),l=0,u=i.length;l<u;l+=1)Array.isArray(i[l])&&$(e,`nested arrays are not supported inside keys`),typeof i==`object`&&wb(i[l])===`[object Object]`&&(i[l]=`[object Object]`);if(typeof i==`object`&&wb(i)===`[object Object]`&&(i=`[object Object]`),i=String(i),t===null&&(t={}),r===`tag:yaml.org,2002:merge`)if(Array.isArray(a))for(l=0,u=a.length;l<u;l+=1)Ub(e,t,a[l],n);else Ub(e,t,a,n);else !e.json&&!db.call(n,i)&&db.call(t,i)&&(e.line=o||e.line,e.lineStart=s||e.lineStart,e.position=c||e.position,$(e,`duplicated mapping key`)),Pb(t,i,a),delete n[i];return t}l(Wb,`storeMappingPair`);function Gb(e){var t=e.input.charCodeAt(e.position);t===10?e.position++:t===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):$(e,`a line break is expected`),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}l(Gb,`readLineBreak`);function Kb(e,t,n){for(var r=0,i=e.input.charCodeAt(e.position);i!==0;){for(;Eb(i);)i===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),i=e.input.charCodeAt(++e.position);if(t&&i===35)do i=e.input.charCodeAt(++e.position);while(i!==10&&i!==13&&i!==0);if(Tb(i))for(Gb(e),i=e.input.charCodeAt(e.position),r++,e.lineIndent=0;i===32;)e.lineIndent++,i=e.input.charCodeAt(++e.position);else break}return n!==-1&&r!==0&&e.lineIndent<n&&Bb(e,`deficient indentation`),r}l(Kb,`skipSeparationSpace`);function qb(e){var t=e.position,n=e.input.charCodeAt(t);return!!((n===45||n===46)&&n===e.input.charCodeAt(t+1)&&n===e.input.charCodeAt(t+2)&&(t+=3,n=e.input.charCodeAt(t),n===0||Db(n)))}l(qb,`testDocumentSeparator`);function Jb(e,t){t===1?e.result+=` `:t>1&&(e.result+=Xv.repeat(`
|
|
274
|
-
`,t-1))}l(Jb,`writeFoldedLines`);function Yb(e,t,n){var r,i,a,o,s,c,l,u,d=e.kind,f=e.result,p=e.input.charCodeAt(e.position);if(Db(p)||Ob(p)||p===35||p===38||p===42||p===33||p===124||p===62||p===39||p===34||p===37||p===64||p===96||(p===63||p===45)&&(i=e.input.charCodeAt(e.position+1),Db(i)||n&&Ob(i)))return!1;for(e.kind=`scalar`,e.result=``,a=o=e.position,s=!1;p!==0;){if(p===58){if(i=e.input.charCodeAt(e.position+1),Db(i)||n&&Ob(i))break}else if(p===35){if(r=e.input.charCodeAt(e.position-1),Db(r))break}else if(e.position===e.lineStart&&qb(e)||n&&Ob(p))break;else if(Tb(p))if(c=e.line,l=e.lineStart,u=e.lineIndent,Kb(e,!1,-1),e.lineIndent>=t){s=!0,p=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=c,e.lineStart=l,e.lineIndent=u;break}s&&=(Hb(e,a,o,!1),Jb(e,e.line-c),a=o=e.position,!1),Eb(p)||(o=e.position+1),p=e.input.charCodeAt(++e.position)}return Hb(e,a,o,!1),e.result?!0:(e.kind=d,e.result=f,!1)}l(Yb,`readPlainScalar`);function Xb(e,t){var n=e.input.charCodeAt(e.position),r,i;if(n!==39)return!1;for(e.kind=`scalar`,e.result=``,e.position++,r=i=e.position;(n=e.input.charCodeAt(e.position))!==0;)if(n===39)if(Hb(e,r,e.position,!0),n=e.input.charCodeAt(++e.position),n===39)r=e.position,e.position++,i=e.position;else return!0;else Tb(n)?(Hb(e,r,i,!0),Jb(e,Kb(e,!1,t)),r=i=e.position):e.position===e.lineStart&&qb(e)?$(e,`unexpected end of the document within a single quoted scalar`):(e.position++,i=e.position);$(e,`unexpected end of the stream within a single quoted scalar`)}l(Xb,`readSingleQuotedScalar`);function Zb(e,t){var n,r,i,a,o,s=e.input.charCodeAt(e.position);if(s!==34)return!1;for(e.kind=`scalar`,e.result=``,e.position++,n=r=e.position;(s=e.input.charCodeAt(e.position))!==0;)if(s===34)return Hb(e,n,e.position,!0),e.position++,!0;else if(s===92){if(Hb(e,n,e.position,!0),s=e.input.charCodeAt(++e.position),Tb(s))Kb(e,!1,t);else if(s<256&&Fb[s])e.result+=Ib[s],e.position++;else if((o=Ab(s))>0){for(i=o,a=0;i>0;i--)s=e.input.charCodeAt(++e.position),(o=kb(s))>=0?a=(a<<4)+o:$(e,`expected hexadecimal character`);e.result+=Nb(a),e.position++}else $(e,`unknown escape sequence`);n=r=e.position}else Tb(s)?(Hb(e,n,r,!0),Jb(e,Kb(e,!1,t)),n=r=e.position):e.position===e.lineStart&&qb(e)?$(e,`unexpected end of the document within a double quoted scalar`):(e.position++,r=e.position);$(e,`unexpected end of the stream within a double quoted scalar`)}l(Zb,`readDoubleQuotedScalar`);function Qb(e,t){var n=!0,r,i,a,o=e.tag,s,c=e.anchor,l,u,d,f,p,m=Object.create(null),h,g,_,v=e.input.charCodeAt(e.position);if(v===91)u=93,p=!1,s=[];else if(v===123)u=125,p=!0,s={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=s),v=e.input.charCodeAt(++e.position);v!==0;){if(Kb(e,!0,t),v=e.input.charCodeAt(e.position),v===u)return e.position++,e.tag=o,e.anchor=c,e.kind=p?`mapping`:`sequence`,e.result=s,!0;n?v===44&&$(e,`expected the node content, but found ','`):$(e,`missed comma between flow collection entries`),g=h=_=null,d=f=!1,v===63&&(l=e.input.charCodeAt(e.position+1),Db(l)&&(d=f=!0,e.position++,Kb(e,!0,t))),r=e.line,i=e.lineStart,a=e.position,ax(e,t,fb,!1,!0),g=e.tag,h=e.result,Kb(e,!0,t),v=e.input.charCodeAt(e.position),(f||e.line===r)&&v===58&&(d=!0,v=e.input.charCodeAt(++e.position),Kb(e,!0,t),ax(e,t,fb,!1,!0),_=e.result),p?Wb(e,s,m,g,h,_,r,i,a):d?s.push(Wb(e,null,m,g,h,_,r,i,a)):s.push(h),Kb(e,!0,t),v=e.input.charCodeAt(e.position),v===44?(n=!0,v=e.input.charCodeAt(++e.position)):n=!1}$(e,`unexpected end of the stream within a flow collection`)}l(Qb,`readFlowCollection`);function $b(e,t){var n,r,i=gb,a=!1,o=!1,s=t,c=0,l=!1,u,d=e.input.charCodeAt(e.position);if(d===124)r=!1;else if(d===62)r=!0;else return!1;for(e.kind=`scalar`,e.result=``;d!==0;)if(d=e.input.charCodeAt(++e.position),d===43||d===45)gb===i?i=d===43?vb:_b:$(e,`repeat of a chomping mode identifier`);else if((u=jb(d))>=0)u===0?$(e,`bad explicit indentation width of a block scalar; it cannot be less than one`):o?$(e,`repeat of an indentation width identifier`):(s=t+u-1,o=!0);else break;if(Eb(d)){do d=e.input.charCodeAt(++e.position);while(Eb(d));if(d===35)do d=e.input.charCodeAt(++e.position);while(!Tb(d)&&d!==0)}for(;d!==0;){for(Gb(e),e.lineIndent=0,d=e.input.charCodeAt(e.position);(!o||e.lineIndent<s)&&d===32;)e.lineIndent++,d=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>s&&(s=e.lineIndent),Tb(d)){c++;continue}if(e.lineIndent<s){i===vb?e.result+=Xv.repeat(`
|
|
275
|
-
`,a?1+c:c):i===gb&&a&&(e.result+=`
|
|
276
|
-
`);break}for(r?Eb(d)?(l=!0,e.result+=Xv.repeat(`
|
|
277
|
-
`,a?1+c:c)):l?(l=!1,e.result+=Xv.repeat(`
|
|
278
|
-
`,c+1)):c===0?a&&(e.result+=` `):e.result+=Xv.repeat(`
|
|
279
|
-
`,c):e.result+=Xv.repeat(`
|
|
280
|
-
`,a?1+c:c),a=!0,o=!0,c=0,n=e.position;!Tb(d)&&d!==0;)d=e.input.charCodeAt(++e.position);Hb(e,n,e.position,!1)}return!0}l($b,`readBlockScalar`);function ex(e,t){var n,r=e.tag,i=e.anchor,a=[],o,s=!1,c;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=a),c=e.input.charCodeAt(e.position);c!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$(e,`tab characters must not be used in indentation`)),!(c!==45||(o=e.input.charCodeAt(e.position+1),!Db(o))));){if(s=!0,e.position++,Kb(e,!0,-1)&&e.lineIndent<=t){a.push(null),c=e.input.charCodeAt(e.position);continue}if(n=e.line,ax(e,t,mb,!1,!0),a.push(e.result),Kb(e,!0,-1),c=e.input.charCodeAt(e.position),(e.line===n||e.lineIndent>t)&&c!==0)$(e,`bad indentation of a sequence entry`);else if(e.lineIndent<t)break}return s?(e.tag=r,e.anchor=i,e.kind=`sequence`,e.result=a,!0):!1}l(ex,`readBlockSequence`);function tx(e,t,n){var r,i,a,o,s,c,l=e.tag,u=e.anchor,d={},f=Object.create(null),p=null,m=null,h=null,g=!1,_=!1,v;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=d),v=e.input.charCodeAt(e.position);v!==0;){if(!g&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,$(e,`tab characters must not be used in indentation`)),r=e.input.charCodeAt(e.position+1),a=e.line,(v===63||v===58)&&Db(r))v===63?(g&&(Wb(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!0,i=!0):g?(g=!1,i=!0):$(e,`incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line`),e.position+=1,v=r;else{if(o=e.line,s=e.lineStart,c=e.position,!ax(e,n,pb,!1,!0))break;if(e.line===a){for(v=e.input.charCodeAt(e.position);Eb(v);)v=e.input.charCodeAt(++e.position);if(v===58)v=e.input.charCodeAt(++e.position),Db(v)||$(e,`a whitespace character is expected after the key-value separator within a block mapping`),g&&(Wb(e,d,f,p,m,null,o,s,c),p=m=h=null),_=!0,g=!1,i=!1,p=e.tag,m=e.result;else if(_)$(e,`can not read an implicit mapping pair; a colon is missed`);else return e.tag=l,e.anchor=u,!0}else if(_)$(e,`can not read a block mapping entry; a multiline key may not be an implicit key`);else return e.tag=l,e.anchor=u,!0}if((e.line===a||e.lineIndent>t)&&(g&&(o=e.line,s=e.lineStart,c=e.position),ax(e,t,hb,!0,i)&&(g?m=e.result:h=e.result),g||(Wb(e,d,f,p,m,h,o,s,c),p=m=h=null),Kb(e,!0,-1),v=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&v!==0)$(e,`bad indentation of a mapping entry`);else if(e.lineIndent<t)break}return g&&Wb(e,d,f,p,m,null,o,s,c),_&&(e.tag=l,e.anchor=u,e.kind=`mapping`,e.result=d),_}l(tx,`readBlockMapping`);function nx(e){var t,n=!1,r=!1,i,a,o=e.input.charCodeAt(e.position);if(o!==33)return!1;if(e.tag!==null&&$(e,`duplication of a tag property`),o=e.input.charCodeAt(++e.position),o===60?(n=!0,o=e.input.charCodeAt(++e.position)):o===33?(r=!0,i=`!!`,o=e.input.charCodeAt(++e.position)):i=`!`,t=e.position,n){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(a=e.input.slice(t,e.position),o=e.input.charCodeAt(++e.position)):$(e,`unexpected end of the stream within a verbatim tag`)}else{for(;o!==0&&!Db(o);)o===33&&(r?$(e,`tag suffix cannot contain exclamation marks`):(i=e.input.slice(t-1,e.position+1),Sb.test(i)||$(e,`named tag handle cannot contain such characters`),r=!0,t=e.position+1)),o=e.input.charCodeAt(++e.position);a=e.input.slice(t,e.position),xb.test(a)&&$(e,`tag suffix cannot contain flow indicator characters`)}a&&!Cb.test(a)&&$(e,`tag name cannot contain such characters: `+a);try{a=decodeURIComponent(a)}catch{$(e,`tag name is malformed: `+a)}return n?e.tag=a:db.call(e.tagMap,i)?e.tag=e.tagMap[i]+a:i===`!`?e.tag=`!`+a:i===`!!`?e.tag=`tag:yaml.org,2002:`+a:$(e,`undeclared tag handle "`+i+`"`),!0}l(nx,`readTagProperty`);function rx(e){var t,n=e.input.charCodeAt(e.position);if(n!==38)return!1;for(e.anchor!==null&&$(e,`duplication of an anchor property`),n=e.input.charCodeAt(++e.position),t=e.position;n!==0&&!Db(n)&&!Ob(n);)n=e.input.charCodeAt(++e.position);return e.position===t&&$(e,`name of an anchor node must contain at least one character`),e.anchor=e.input.slice(t,e.position),!0}l(rx,`readAnchorProperty`);function ix(e){var t,n,r=e.input.charCodeAt(e.position);if(r!==42)return!1;for(r=e.input.charCodeAt(++e.position),t=e.position;r!==0&&!Db(r)&&!Ob(r);)r=e.input.charCodeAt(++e.position);return e.position===t&&$(e,`name of an alias node must contain at least one character`),n=e.input.slice(t,e.position),db.call(e.anchorMap,n)||$(e,`unidentified alias "`+n+`"`),e.result=e.anchorMap[n],Kb(e,!0,-1),!0}l(ix,`readAlias`);function ax(e,t,n,r,i){var a,o,s,c=1,l=!1,u=!1,d,f,p,m,h,g;if(e.listener!==null&&e.listener(`open`,e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,a=o=s=hb===n||mb===n,r&&Kb(e,!0,-1)&&(l=!0,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)),c===1)for(;nx(e)||rx(e);)Kb(e,!0,-1)?(l=!0,s=a,e.lineIndent>t?c=1:e.lineIndent===t?c=0:e.lineIndent<t&&(c=-1)):s=!1;if(s&&=l||i,(c===1||hb===n)&&(h=fb===n||pb===n?t:t+1,g=e.position-e.lineStart,c===1?s&&(ex(e,g)||tx(e,g,h))||Qb(e,h)?u=!0:(o&&$b(e,h)||Xb(e,h)||Zb(e,h)?u=!0:ix(e)?(u=!0,(e.tag!==null||e.anchor!==null)&&$(e,`alias node should not have any properties`)):Yb(e,h,fb===n)&&(u=!0,e.tag===null&&(e.tag=`?`)),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):c===0&&(u=s&&ex(e,g))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag===`?`){for(e.result!==null&&e.kind!==`scalar`&&$(e,`unacceptable node kind for !<?> tag; it should be "scalar", not "`+e.kind+`"`),d=0,f=e.implicitTypes.length;d<f;d+=1)if(m=e.implicitTypes[d],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!==`!`){if(db.call(e.typeMap[e.kind||`fallback`],e.tag))m=e.typeMap[e.kind||`fallback`][e.tag];else for(m=null,p=e.typeMap.multi[e.kind||`fallback`],d=0,f=p.length;d<f;d+=1)if(e.tag.slice(0,p[d].tag.length)===p[d].tag){m=p[d];break}m||$(e,`unknown tag !<`+e.tag+`>`),e.result!==null&&m.kind!==e.kind&&$(e,`unacceptable node kind for !<`+e.tag+`> tag; it should be "`+m.kind+`", not "`+e.kind+`"`),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):$(e,`cannot resolve a node with !<`+e.tag+`> explicit tag`)}return e.listener!==null&&e.listener(`close`,e),e.tag!==null||e.anchor!==null||u}l(ax,`composeNode`);function ox(e){var t=e.position,n,r,i,a=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(Kb(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(a=!0,o=e.input.charCodeAt(++e.position),n=e.position;o!==0&&!Db(o);)o=e.input.charCodeAt(++e.position);for(r=e.input.slice(n,e.position),i=[],r.length<1&&$(e,`directive name must not be less than one character in length`);o!==0;){for(;Eb(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!Tb(o));break}if(Tb(o))break;for(n=e.position;o!==0&&!Db(o);)o=e.input.charCodeAt(++e.position);i.push(e.input.slice(n,e.position))}o!==0&&Gb(e),db.call(Vb,r)?Vb[r](e,r,i):Bb(e,`unknown document directive "`+r+`"`)}if(Kb(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,Kb(e,!0,-1)):a&&$(e,`directives end mark is expected`),ax(e,e.lineIndent-1,hb,!1,!0),Kb(e,!0,-1),e.checkLineBreaks&&bb.test(e.input.slice(t,e.position))&&Bb(e,`non-ASCII line breaks are interpreted as content`),e.documents.push(e.result),e.position===e.lineStart&&qb(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,Kb(e,!0,-1));return}if(e.position<e.length-1)$(e,`end of the stream or a document separator is expected`);else return}l(ox,`readDocument`);function sx(e,t){e=String(e),t||={},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
|
|
281
|
-
`),e.charCodeAt(0)===65279&&(e=e.slice(1)));var n=new Rb(e,t),r=e.indexOf(`\0`);for(r!==-1&&(n.position=r,$(n,`null byte is not allowed in input`)),n.input+=`\0`;n.input.charCodeAt(n.position)===32;)n.lineIndent+=1,n.position+=1;for(;n.position<n.length-1;)ox(n);return n.documents}l(sx,`loadDocuments`);function cx(e,t,n){typeof t==`object`&&t&&n===void 0&&(n=t,t=null);var r=sx(e,n);if(typeof t!=`function`)return r;for(var i=0,a=r.length;i<a;i+=1)t(r[i])}l(cx,`loadAll$1`);function lx(e,t){var n=sx(e,t);if(n.length!==0){if(n.length===1)return n[0];throw new $v(`expected a single document in the stream, but found more`)}}l(lx,`load$1`);var ux={loadAll:cx,load:lx},dx=Object.prototype.toString,fx=Object.prototype.hasOwnProperty,px=65279,mx=9,hx=10,gx=13,_x=32,vx=33,yx=34,bx=35,xx=37,Sx=38,Cx=39,wx=42,Tx=44,Ex=45,Dx=58,Ox=61,kx=62,Ax=63,jx=64,Mx=91,Nx=93,Px=96,Fx=123,Ix=124,Lx=125,Rx={};Rx[0]=`\\0`,Rx[7]=`\\a`,Rx[8]=`\\b`,Rx[9]=`\\t`,Rx[10]=`\\n`,Rx[11]=`\\v`,Rx[12]=`\\f`,Rx[13]=`\\r`,Rx[27]=`\\e`,Rx[34]=`\\"`,Rx[92]=`\\\\`,Rx[133]=`\\N`,Rx[160]=`\\_`,Rx[8232]=`\\L`,Rx[8233]=`\\P`;var zx=[`y`,`Y`,`yes`,`Yes`,`YES`,`on`,`On`,`ON`,`n`,`N`,`no`,`No`,`NO`,`off`,`Off`,`OFF`],Bx=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Vx(e,t){var n,r,i,a,o,s,c;if(t===null)return{};for(n={},r=Object.keys(t),i=0,a=r.length;i<a;i+=1)o=r[i],s=String(t[o]),o.slice(0,2)===`!!`&&(o=`tag:yaml.org,2002:`+o.slice(2)),c=e.compiledTypeMap.fallback[o],c&&fx.call(c.styleAliases,s)&&(s=c.styleAliases[s]),n[o]=s;return n}l(Vx,`compileStyleMap`);function Hx(e){var t=e.toString(16).toUpperCase(),n,r;if(e<=255)n=`x`,r=2;else if(e<=65535)n=`u`,r=4;else if(e<=4294967295)n=`U`,r=8;else throw new $v(`code point within a string may not be greater than 0xFFFFFFFF`);return`\\`+n+Xv.repeat(`0`,r-t.length)+t}l(Hx,`encodeHex`);var Ux=1,Wx=2;function Gx(e){this.schema=e.schema||ub,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=Xv.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=Vx(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType===`"`?Wx:Ux,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer==`function`?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result=``,this.duplicates=[],this.usedDuplicates=null}l(Gx,`State`);function Kx(e,t){for(var n=Xv.repeat(` `,t),r=0,i=-1,a=``,o,s=e.length;r<s;)i=e.indexOf(`
|
|
282
|
-
`,r),i===-1?(o=e.slice(r),r=s):(o=e.slice(r,i+1),r=i+1),o.length&&o!==`
|
|
283
|
-
`&&(a+=n),a+=o;return a}l(Kx,`indentString`);function qx(e,t){return`
|
|
284
|
-
`+Xv.repeat(` `,e.indent*t)}l(qx,`generateNextLine`);function Jx(e,t){var n,r,i;for(n=0,r=e.implicitTypes.length;n<r;n+=1)if(i=e.implicitTypes[n],i.resolve(t))return!0;return!1}l(Jx,`testImplicitResolving`);function Yx(e){return e===_x||e===mx}l(Yx,`isWhitespace`);function Xx(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==px||65536<=e&&e<=1114111}l(Xx,`isPrintable`);function Zx(e){return Xx(e)&&e!==px&&e!==gx&&e!==hx}l(Zx,`isNsCharOrWhitespace`);function Qx(e,t,n){var r=Zx(e),i=r&&!Yx(e);return(n?r:r&&e!==Tx&&e!==Mx&&e!==Nx&&e!==Fx&&e!==Lx)&&e!==bx&&!(t===Dx&&!i)||Zx(t)&&!Yx(t)&&e===bx||t===Dx&&i}l(Qx,`isPlainSafe`);function $x(e){return Xx(e)&&e!==px&&!Yx(e)&&e!==Ex&&e!==Ax&&e!==Dx&&e!==Tx&&e!==Mx&&e!==Nx&&e!==Fx&&e!==Lx&&e!==bx&&e!==Sx&&e!==wx&&e!==vx&&e!==Ix&&e!==Ox&&e!==kx&&e!==Cx&&e!==yx&&e!==xx&&e!==jx&&e!==Px}l($x,`isPlainSafeFirst`);function eS(e){return!Yx(e)&&e!==Dx}l(eS,`isPlainSafeLast`);function tS(e,t){var n=e.charCodeAt(t),r;return n>=55296&&n<=56319&&t+1<e.length&&(r=e.charCodeAt(t+1),r>=56320&&r<=57343)?(n-55296)*1024+r-56320+65536:n}l(tS,`codePointAt`);function nS(e){return/^\n* /.test(e)}l(nS,`needIndentIndicator`);var rS=1,iS=2,aS=3,oS=4,sS=5;function cS(e,t,n,r,i,a,o,s){var c,l=0,u=null,d=!1,f=!1,p=r!==-1,m=-1,h=$x(tS(e,0))&&eS(tS(e,e.length-1));if(t||o)for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=tS(e,c),!Xx(l))return sS;h&&=Qx(l,u,s),u=l}else{for(c=0;c<e.length;l>=65536?c+=2:c++){if(l=tS(e,c),l===hx)d=!0,p&&(f||=c-m-1>r&&e[m+1]!==` `,m=c);else if(!Xx(l))return sS;h&&=Qx(l,u,s),u=l}f||=p&&c-m-1>r&&e[m+1]!==` `}return!d&&!f?h&&!o&&!i(e)?rS:a===Wx?sS:iS:n>9&&nS(e)?sS:o?a===Wx?sS:iS:f?oS:aS}l(cS,`chooseScalarStyle`);function lS(e,t,n,r,i){e.dump=(function(){if(t.length===0)return e.quotingType===Wx?`""`:`''`;if(!e.noCompatMode&&(zx.indexOf(t)!==-1||Bx.test(t)))return e.quotingType===Wx?`"`+t+`"`:`'`+t+`'`;var a=e.indent*Math.max(1,n),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-a),s=r||e.flowLevel>-1&&n>=e.flowLevel;function c(t){return Jx(e,t)}switch(l(c,`testAmbiguity`),cS(t,s,e.indent,o,c,e.quotingType,e.forceQuotes&&!r,i)){case rS:return t;case iS:return`'`+t.replace(/'/g,`''`)+`'`;case aS:return`|`+uS(t,e.indent)+dS(Kx(t,a));case oS:return`>`+uS(t,e.indent)+dS(Kx(fS(t,o),a));case sS:return`"`+mS(t)+`"`;default:throw new $v(`impossible error: invalid scalar style`)}})()}l(lS,`writeScalar`);function uS(e,t){var n=nS(e)?String(t):``,r=e[e.length-1]===`
|
|
285
|
-
`;return n+(r&&(e[e.length-2]===`
|
|
286
|
-
`||e===`
|
|
287
|
-
`)?`+`:r?``:`-`)+`
|
|
288
|
-
`}l(uS,`blockHeader`);function dS(e){return e[e.length-1]===`
|
|
289
|
-
`?e.slice(0,-1):e}l(dS,`dropEndingNewline`);function fS(e,t){for(var n=/(\n+)([^\n]*)/g,r=(function(){var r=e.indexOf(`
|
|
290
|
-
`);return r=r===-1?e.length:r,n.lastIndex=r,pS(e.slice(0,r),t)})(),i=e[0]===`
|
|
291
|
-
`||e[0]===` `,a,o;o=n.exec(e);){var s=o[1],c=o[2];a=c[0]===` `,r+=s+(!i&&!a&&c!==``?`
|
|
292
|
-
`:``)+pS(c,t),i=a}return r}l(fS,`foldString`);function pS(e,t){if(e===``||e[0]===` `)return e;for(var n=/ [^ ]/g,r,i=0,a,o=0,s=0,c=``;r=n.exec(e);)s=r.index,s-i>t&&(a=o>i?o:s,c+=`
|
|
293
|
-
`+e.slice(i,a),i=a+1),o=s;return c+=`
|
|
294
|
-
`,e.length-i>t&&o>i?c+=e.slice(i,o)+`
|
|
295
|
-
`+e.slice(o+1):c+=e.slice(i),c.slice(1)}l(pS,`foldLine`);function mS(e){for(var t=``,n=0,r,i=0;i<e.length;n>=65536?i+=2:i++)n=tS(e,i),r=Rx[n],!r&&Xx(n)?(t+=e[i],n>=65536&&(t+=e[i+1])):t+=r||Hx(n);return t}l(mS,`escapeString`);function hS(e,t,n){var r=``,i=e.tag,a,o,s;for(a=0,o=n.length;a<o;a+=1)s=n[a],e.replacer&&(s=e.replacer.call(n,String(a),s)),(bS(e,t,s,!1,!1)||s===void 0&&bS(e,t,null,!1,!1))&&(r!==``&&(r+=`,`+(e.condenseFlow?``:` `)),r+=e.dump);e.tag=i,e.dump=`[`+r+`]`}l(hS,`writeFlowSequence`);function gS(e,t,n,r){var i=``,a=e.tag,o,s,c;for(o=0,s=n.length;o<s;o+=1)c=n[o],e.replacer&&(c=e.replacer.call(n,String(o),c)),(bS(e,t+1,c,!0,!0,!1,!0)||c===void 0&&bS(e,t+1,null,!0,!0,!1,!0))&&((!r||i!==``)&&(i+=qx(e,t)),e.dump&&hx===e.dump.charCodeAt(0)?i+=`-`:i+=`- `,i+=e.dump);e.tag=a,e.dump=i||`[]`}l(gS,`writeBlockSequence`);function _S(e,t,n){var r=``,i=e.tag,a=Object.keys(n),o,s,c,l,u;for(o=0,s=a.length;o<s;o+=1)u=``,r!==``&&(u+=`, `),e.condenseFlow&&(u+=`"`),c=a[o],l=n[c],e.replacer&&(l=e.replacer.call(n,c,l)),bS(e,t,c,!1,!1)&&(e.dump.length>1024&&(u+=`? `),u+=e.dump+(e.condenseFlow?`"`:``)+`:`+(e.condenseFlow?``:` `),bS(e,t,l,!1,!1)&&(u+=e.dump,r+=u));e.tag=i,e.dump=`{`+r+`}`}l(_S,`writeFlowMapping`);function vS(e,t,n,r){var i=``,a=e.tag,o=Object.keys(n),s,c,l,u,d,f;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys==`function`)o.sort(e.sortKeys);else if(e.sortKeys)throw new $v(`sortKeys must be a boolean or a function`);for(s=0,c=o.length;s<c;s+=1)f=``,(!r||i!==``)&&(f+=qx(e,t)),l=o[s],u=n[l],e.replacer&&(u=e.replacer.call(n,l,u)),bS(e,t+1,l,!0,!0,!0)&&(d=e.tag!==null&&e.tag!==`?`||e.dump&&e.dump.length>1024,d&&(e.dump&&hx===e.dump.charCodeAt(0)?f+=`?`:f+=`? `),f+=e.dump,d&&(f+=qx(e,t)),bS(e,t+1,u,!0,d)&&(e.dump&&hx===e.dump.charCodeAt(0)?f+=`:`:f+=`: `,f+=e.dump,i+=f));e.tag=a,e.dump=i||`{}`}l(vS,`writeBlockMapping`);function yS(e,t,n){var r,i=n?e.explicitTypes:e.implicitTypes,a,o,s,c;for(a=0,o=i.length;a<o;a+=1)if(s=i[a],(s.instanceOf||s.predicate)&&(!s.instanceOf||typeof t==`object`&&t instanceof s.instanceOf)&&(!s.predicate||s.predicate(t))){if(n?s.multi&&s.representName?e.tag=s.representName(t):e.tag=s.tag:e.tag=`?`,s.represent){if(c=e.styleMap[s.tag]||s.defaultStyle,dx.call(s.represent)===`[object Function]`)r=s.represent(t,c);else if(fx.call(s.represent,c))r=s.represent[c](t,c);else throw new $v(`!<`+s.tag+`> tag resolver accepts not "`+c+`" style`);e.dump=r}return!0}return!1}l(yS,`detectType`);function bS(e,t,n,r,i,a,o){e.tag=null,e.dump=n,yS(e,n,!1)||yS(e,n,!0);var s=dx.call(e.dump),c=r,l;r&&=e.flowLevel<0||e.flowLevel>t;var u=s===`[object Object]`||s===`[object Array]`,d,f;if(u&&(d=e.duplicates.indexOf(n),f=d!==-1),(e.tag!==null&&e.tag!==`?`||f||e.indent!==2&&t>0)&&(i=!1),f&&e.usedDuplicates[d])e.dump=`*ref_`+d;else{if(u&&f&&!e.usedDuplicates[d]&&(e.usedDuplicates[d]=!0),s===`[object Object]`)r&&Object.keys(e.dump).length!==0?(vS(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(_S(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object Array]`)r&&e.dump.length!==0?(e.noArrayIndent&&!o&&t>0?gS(e,t-1,e.dump,i):gS(e,t,e.dump,i),f&&(e.dump=`&ref_`+d+e.dump)):(hS(e,t,e.dump),f&&(e.dump=`&ref_`+d+` `+e.dump));else if(s===`[object String]`)e.tag!==`?`&&lS(e,e.dump,t,a,c);else if(s===`[object Undefined]`)return!1;else{if(e.skipInvalid)return!1;throw new $v(`unacceptable kind of an object to dump `+s)}e.tag!==null&&e.tag!==`?`&&(l=encodeURI(e.tag[0]===`!`?e.tag.slice(1):e.tag).replace(/!/g,`%21`),l=e.tag[0]===`!`?`!`+l:l.slice(0,18)===`tag:yaml.org,2002:`?`!!`+l.slice(18):`!<`+l+`>`,e.dump=l+` `+e.dump)}return!0}l(bS,`writeNode`);function xS(e,t){var n=[],r=[],i,a;for(SS(e,n,r),i=0,a=r.length;i<a;i+=1)t.duplicates.push(n[r[i]]);t.usedDuplicates=Array(a)}l(xS,`getDuplicateReferences`);function SS(e,t,n){var r,i,a;if(typeof e==`object`&&e)if(i=t.indexOf(e),i!==-1)n.indexOf(i)===-1&&n.push(i);else if(t.push(e),Array.isArray(e))for(i=0,a=e.length;i<a;i+=1)SS(e[i],t,n);else for(r=Object.keys(e),i=0,a=r.length;i<a;i+=1)SS(e[r[i]],t,n)}l(SS,`inspectNode`);function CS(e,t){t||={};var n=new Gx(t);n.noRefs||xS(e,n);var r=e;return n.replacer&&(r=n.replacer.call({"":r},``,r)),bS(n,0,r,!0,!0)?n.dump+`
|
|
296
|
-
`:``}l(CS,`dump$1`);var wS={dump:CS};function TS(e,t){return function(){throw Error(`Function yaml.`+e+` is removed in js-yaml 4. Use yaml.`+t+` instead, which is now safe by default.`)}}l(TS,`renamed`);var ES=Fy,DS=ux.load;ux.loadAll,wS.dump;var OS=`comm`,kS=`rule`,AS=`decl`,jS=`@import`,MS=`@namespace`,NS=`@keyframes`,PS=`@layer`,FS=Math.abs,IS=String.fromCharCode;function LS(e){return e.trim()}function RS(e,t,n){return e.replace(t,n)}function zS(e,t,n){return e.indexOf(t,n)}function BS(e,t){return e.charCodeAt(t)|0}function VS(e,t,n){return e.slice(t,n)}function HS(e){return e.length}function US(e){return e.length}function WS(e,t){return t.push(e),e}var GS=1,KS=1,qS=0,JS=0,YS=0,XS=``;function ZS(e,t,n,r,i,a,o,s){return{value:e,root:t,parent:n,type:r,props:i,children:a,line:GS,column:KS,length:o,return:``,siblings:s}}function QS(){return YS}function $S(){return YS=JS>0?BS(XS,--JS):0,KS--,YS===10&&(KS=1,GS--),YS}function eC(){return YS=JS<qS?BS(XS,JS++):0,KS++,YS===10&&(KS=1,GS++),YS}function tC(){return BS(XS,JS)}function nC(){return JS}function rC(e,t){return VS(XS,e,t)}function iC(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function aC(e){return GS=KS=1,qS=HS(XS=e),JS=0,[]}function oC(e){return XS=``,e}function sC(e){return LS(rC(JS-1,uC(e===91?e+2:e===40?e+1:e)))}function cC(e){for(;(YS=tC())&&YS<33;)eC();return iC(e)>2||iC(YS)>3?``:` `}function lC(e,t){for(;--t&&eC()&&!(YS<48||YS>102||YS>57&&YS<65||YS>70&&YS<97););return rC(e,nC()+(t<6&&tC()==32&&eC()==32))}function uC(e){for(;eC();)switch(YS){case e:return JS;case 34:case 39:e!==34&&e!==39&&uC(YS);break;case 40:e===41&&uC(e);break;case 92:eC();break}return JS}function dC(e,t){for(;eC()&&e+YS!==57&&!(e+YS===84&&tC()===47););return`/*`+rC(t,JS-1)+`*`+IS(e===47?e:eC())}function fC(e){for(;!iC(tC());)eC();return rC(e,JS)}function pC(e){return oC(mC(``,null,null,null,[``],e=aC(e),0,[0],e))}function mC(e,t,n,r,i,a,o,s,c){for(var l=0,u=0,d=o,f=0,p=0,m=0,h=1,g=1,_=1,v=0,y=``,b=i,x=a,S=r,C=y;g;)switch(m=v,v=eC()){case 40:if(m!=108&&BS(C,d-1)==58){zS(C+=RS(sC(v),`&`,`&\f`),`&\f`,FS(l?s[l-1]:0))!=-1&&(_=-1);break}case 34:case 39:case 91:C+=sC(v);break;case 9:case 10:case 13:case 32:C+=cC(m);break;case 92:C+=lC(nC()-1,7);continue;case 47:switch(tC()){case 42:case 47:WS(gC(dC(eC(),nC()),t,n,c),c),(iC(m||1)==5||iC(tC()||1)==5)&&HS(C)&&VS(C,-1,void 0)!==` `&&(C+=` `);break;default:C+=`/`}break;case 123*h:s[l++]=HS(C)*_;case 125*h:case 59:case 0:switch(v){case 0:case 125:g=0;case 59+u:_==-1&&(C=RS(C,/\f/g,``)),p>0&&(HS(C)-d||h===0&&m===47)&&WS(p>32?_C(C+`;`,r,n,d-1,c):_C(RS(C,` `,``)+`;`,r,n,d-2,c),c);break;case 59:C+=`;`;default:if(WS(S=hC(C,t,n,l,u,i,s,y,b=[],x=[],d,a),a),v===123)if(u===0)mC(C,t,S,S,b,a,d,s,x);else{switch(f){case 99:if(BS(C,3)===110)break;case 108:if(BS(C,2)===97)break;default:u=0;case 100:case 109:case 115:}u?mC(e,S,S,r&&WS(hC(e,S,S,0,0,i,s,y,i,b=[],d,x),x),i,x,d,s,r?b:x):mC(C,S,S,S,[``],x,0,s,x)}}l=u=p=0,h=_=1,y=C=``,d=o;break;case 58:d=1+HS(C),p=m;default:if(h<1){if(v==123)--h;else if(v==125&&h++==0&&$S()==125)continue}switch(C+=IS(v),v*h){case 38:_=u>0?1:(C+=`\f`,-1);break;case 44:s[l++]=(HS(C)-1)*_,_=1;break;case 64:tC()===45&&(C+=sC(eC())),f=tC(),u=d=HS(y=C+=fC(nC())),v++;break;case 45:m===45&&HS(C)==2&&(h=0)}}return a}function hC(e,t,n,r,i,a,o,s,c,l,u,d){for(var f=i-1,p=i===0?a:[``],m=US(p),h=0,g=0,_=0;h<r;++h)for(var v=0,y=VS(e,f+1,f=FS(g=o[h])),b=e;v<m;++v)(b=LS(g>0?p[v]+` `+y:RS(y,/&\f/g,p[v])))&&(c[_++]=b);return ZS(e,t,n,i===0?kS:s,c,l,u,d)}function gC(e,t,n,r){return ZS(e,t,n,OS,IS(QS()),VS(e,2,-2),0,r)}function _C(e,t,n,r,i){return ZS(e,t,n,AS,VS(e,0,r),VS(e,r+1,-1),r,i)}function vC(e,t){for(var n=``,r=0;r<e.length;r++)n+=t(e[r],r,e,t)||``;return n}function yC(e,t,n,r){switch(e.type){case PS:if(e.children.length)break;case jS:case MS:case AS:return e.return=e.return||e.value;case OS:return``;case NS:return e.return=e.value+`{`+vC(e.children,r)+`}`;case kS:if(!HS(e.value=e.props.join(`,`)))return``}return HS(n=vC(e.children,r))?e.return=e.value+`{`+n+`}`:``}function bC(e){var t=US(e);return function(n,r,i,a){for(var o=``,s=0;s<t;s++)o+=e[s](n,r,i,a)||``;return o}}var xC=`c4`,SC={id:xC,detector:l(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./c4Diagram-AAUBKEIU-9q7AUAKb.js`);return{diagram:e}},__vite__mapDeps([8,9]),import.meta.url);return{id:xC,diagram:e}},`loader`)},CC=`flowchart`,wC={id:CC,detector:l((e,t)=>t?.flowchart?.defaultRenderer===`dagre-wrapper`||t?.flowchart?.defaultRenderer===`elk`?!1:/^\s*graph/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-DGaJjGNJ.js`);return{diagram:e}},__vite__mapDeps([10,11,12,13,14,9]),import.meta.url);return{id:CC,diagram:e}},`loader`)},TC=`flowchart-v2`,EC={id:TC,detector:l((e,t)=>t?.flowchart?.defaultRenderer===`dagre-d3`?!1:(t?.flowchart?.defaultRenderer===`elk`&&(t.layout=`elk`),/^\s*graph/.test(e)&&t?.flowchart?.defaultRenderer===`dagre-wrapper`?!0:/^\s*flowchart/.test(e)),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-DGaJjGNJ.js`);return{diagram:e}},__vite__mapDeps([10,11,12,13,14,9]),import.meta.url);return{id:TC,diagram:e}},`loader`)},DC=`er`,OC={id:DC,detector:l(e=>/^\s*erDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./erDiagram-TEJ5UH35-CnfRcY2M.js`);return{diagram:e}},__vite__mapDeps([15,11,12,13]),import.meta.url);return{id:DC,diagram:e}},`loader`)},kC=`gitGraph`,AC={id:kC,detector:l(e=>/^\s*gitGraph/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./gitGraphDiagram-PVQCEYII-9IKVFBVT.js`);return{diagram:e}},__vite__mapDeps([16,17,1,2,18,19]),import.meta.url);return{id:kC,diagram:e}},`loader`)},jC=`gantt`,MC={id:jC,detector:l(e=>/^\s*gantt/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./ganttDiagram-6RSMTGT7-DpCoB2g9.js`);return{diagram:e}},__vite__mapDeps([20,1,2,21,22,23]),import.meta.url);return{id:jC,diagram:e}},`loader`)},NC=`info`,PC={id:NC,detector:l(e=>/^\s*info/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./infoDiagram-5YYISTIA-CYIIsb8y.js`);return{diagram:e}},__vite__mapDeps([24,17,1,2]),import.meta.url);return{id:NC,diagram:e}},`loader`)},FC=`pie`,IC={id:FC,detector:l(e=>/^\s*pie/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./pieDiagram-4H26LBE5-By-ra07M.js`);return{diagram:e}},__vite__mapDeps([25,17,1,2,26,23,27,18]),import.meta.url);return{id:FC,diagram:e}},`loader`)},LC=`quadrantChart`,RC={id:LC,detector:l(e=>/^\s*quadrantChart/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./quadrantDiagram-W4KKPZXB-CxIR4JXI.js`);return{diagram:e}},__vite__mapDeps([28,21,22,23]),import.meta.url);return{id:LC,diagram:e}},`loader`)},zC=`xychart`,BC={id:zC,detector:l(e=>/^\s*xychart(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./xychartDiagram-2RQKCTM6-SkiH8GsK.js`);return{diagram:e}},__vite__mapDeps([29,21,22,23,26]),import.meta.url);return{id:zC,diagram:e}},`loader`)},VC=`requirement`,HC={id:VC,detector:l(e=>/^\s*requirement(Diagram)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./requirementDiagram-4Y6WPE33-DpW90iu3.js`);return{diagram:e}},__vite__mapDeps([30,12,13]),import.meta.url);return{id:VC,diagram:e}},`loader`)},UC=`sequence`,WC={id:UC,detector:l(e=>/^\s*sequenceDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./sequenceDiagram-3UESZ5HK-NTKNGGe5.js`);return{diagram:e}},__vite__mapDeps([31,9,19]),import.meta.url);return{id:UC,diagram:e}},`loader`)},GC=`class`,KC={id:GC,detector:l((e,t)=>t?.class?.defaultRenderer===`dagre-wrapper`?!1:/^\s*classDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./classDiagram-4FO5ZUOK-CDAUuoXK.js`);return{diagram:e}},__vite__mapDeps([32,12,13,33,14,9]),import.meta.url);return{id:GC,diagram:e}},`loader`)},qC=`classDiagram`,JC={id:qC,detector:l((e,t)=>/^\s*classDiagram/.test(e)&&t?.class?.defaultRenderer===`dagre-wrapper`?!0:/^\s*classDiagram-v2/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./classDiagram-v2-Q7XG4LA2-CDAUuoXK.js`);return{diagram:e}},__vite__mapDeps([34,12,13,33,14,9]),import.meta.url);return{id:qC,diagram:e}},`loader`)},YC=`state`,XC={id:YC,detector:l((e,t)=>t?.state?.defaultRenderer===`dagre-wrapper`?!1:/^\s*stateDiagram/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./stateDiagram-AJRCARHV-DGpd9yFG.js`);return{diagram:e}},__vite__mapDeps([35,4,5,12,13,36]),import.meta.url);return{id:YC,diagram:e}},`loader`)},ZC=`stateDiagram`,QC={id:ZC,detector:l((e,t)=>!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&t?.state?.defaultRenderer===`dagre-wrapper`),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./stateDiagram-v2-BHNVJYJU-B3o579IQ.js`);return{diagram:e}},__vite__mapDeps([37,12,13,36]),import.meta.url);return{id:ZC,diagram:e}},`loader`)},$C=`journey`,ew={id:$C,detector:l(e=>/^\s*journey/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./journeyDiagram-JHISSGLW-BIzKeejT.js`);return{diagram:e}},__vite__mapDeps([38,27,14,9]),import.meta.url);return{id:$C,diagram:e}},`loader`)},tw={draw:l((e,t,n)=>{f.debug(`rendering svg for syntax error
|
|
297
|
-
`);let r=cu(t),i=r.append(`g`);r.attr(`viewBox`,`0 0 2412 512`),sr(r,100,512,!0),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z`),i.append(`path`).attr(`class`,`error-icon`).attr(`d`,`m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1440).attr(`y`,250).attr(`font-size`,`150px`).style(`text-anchor`,`middle`).text(`Syntax error in text`),i.append(`text`).attr(`class`,`error-text`).attr(`x`,1250).attr(`y`,400).attr(`font-size`,`100px`).style(`text-anchor`,`middle`).text(`mermaid version ${n}`)},`draw`)},nw=tw,rw={db:{},renderer:tw,parser:{parse:l(()=>{},`parse`)}},iw=`flowchart-elk`,aw={id:iw,detector:l((e,t={})=>/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&t?.flowchart?.defaultRenderer===`elk`?(t.layout=`elk`,!0):!1,`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./flowDiagram-I6XJVG4X-DGaJjGNJ.js`);return{diagram:e}},__vite__mapDeps([10,11,12,13,14,9]),import.meta.url);return{id:iw,diagram:e}},`loader`)},ow=`timeline`,sw={id:ow,detector:l(e=>/^\s*timeline/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./timeline-definition-PNZ67QCA-jqoYs3jQ.js`);return{diagram:e}},__vite__mapDeps([39,27]),import.meta.url);return{id:ow,diagram:e}},`loader`)},cw=`mindmap`,lw={id:cw,detector:l(e=>/^\s*mindmap/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./mindmap-definition-RKZ34NQL-CSAQxEAe.js`);return{diagram:e}},__vite__mapDeps([40,12,13]),import.meta.url);return{id:cw,diagram:e}},`loader`)},uw=`kanban`,dw={id:uw,detector:l(e=>/^\s*kanban/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./kanban-definition-UN3LZRKU-BWHoFSw2.js`);return{diagram:e}},__vite__mapDeps([41,14]),import.meta.url);return{id:uw,diagram:e}},`loader`)},fw=`sankey`,pw={id:fw,detector:l(e=>/^\s*sankey(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./sankeyDiagram-5OEKKPKP-DpGa6EAV.js`);return{diagram:e}},__vite__mapDeps([42,26,23]),import.meta.url);return{id:fw,diagram:e}},`loader`)},mw=`packet`,hw={id:mw,detector:l(e=>/^\s*packet(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./diagram-LMA3HP47-BhLk6ZtA.js`);return{diagram:e}},__vite__mapDeps([43,17,1,2,18]),import.meta.url);return{id:mw,diagram:e}},`loader`)},gw=`radar`,_w={id:gw,detector:l(e=>/^\s*radar-beta/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./diagram-2AECGRRQ-Dd17_kws.js`);return{diagram:e}},__vite__mapDeps([44,17,1,2,18]),import.meta.url);return{id:gw,diagram:e}},`loader`)},vw=`block`,yw={id:vw,detector:l(e=>/^\s*block(-beta)?/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./blockDiagram-GPEHLZMM-1F64jqvy.js`);return{diagram:e}},__vite__mapDeps([45,5,11,14]),import.meta.url);return{id:vw,diagram:e}},`loader`)},bw=`treeView`,xw={id:bw,detector:l(e=>/^\s*treeView-beta/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./diagram-5GNKFQAL-DVIClIil.js`);return{diagram:e}},__vite__mapDeps([46,17,1,2,18,19]),import.meta.url);return{id:bw,diagram:e}},`loader`)},Sw=`architecture`,Cw={id:Sw,detector:l(e=>/^\s*architecture/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./architectureDiagram-3BPJPVTR-Dej8jX8c.js`);return{diagram:e}},__vite__mapDeps([47,1,2,17,7,18]),import.meta.url);return{id:Sw,diagram:e}},`loader`)},ww=`eventmodeling`,Tw={id:ww,detector:l(e=>/^\s*eventmodeling/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./diagram-KO2AKTUF-Df_3gYQa.js`);return{diagram:e}},__vite__mapDeps([48,17,1,2,18]),import.meta.url);return{id:ww,diagram:e}},`loader`)},Ew=`ishikawa`,Dw={id:Ew,detector:l(e=>/^\s*ishikawa(-beta)?\b/i.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./ishikawaDiagram-YF4QCWOH-DLOHGvWw.js`);return{diagram:e}},[],import.meta.url);return{id:Ew,diagram:e}},`loader`)},Ow=`venn`,kw={id:Ow,detector:l(e=>/^\s*venn-beta/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./vennDiagram-CIIHVFJN-l3Z7-wbP.js`);return{diagram:e}},[],import.meta.url);return{id:Ow,diagram:e}},`loader`)},Aw=`treemap`,jw={id:Aw,detector:l(e=>/^\s*treemap/.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./diagram-OG6HWLK6-D4GNGvuu.js`);return{diagram:e}},__vite__mapDeps([49,17,1,2,22,26,23,12,18]),import.meta.url);return{id:Aw,diagram:e}},`loader`)},Mw=`wardley-beta`,Nw={id:Mw,detector:l(e=>/^\s*wardley-beta/i.test(e),`detector`),loader:l(async()=>{let{diagram:e}=await t(async()=>{let{diagram:e}=await import(`./wardleyDiagram-YWT4CUSO-BR54GPmr.js`);return{diagram:e}},__vite__mapDeps([50,17,1,2,18]),import.meta.url);return{id:Mw,diagram:e}},`loader`)},Pw=!1,Fw=l(()=>{Pw||(Pw=!0,Pr(`error`,rw,e=>e.toLowerCase().trim()===`error`),Pr(`---`,{db:{clear:l(()=>{},`clear`)},styles:{},renderer:{draw:l(()=>{},`draw`)},parser:{parse:l(()=>{throw Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},`parse`)},init:l(()=>null,`init`)},e=>e.toLowerCase().trimStart().startsWith(`---`)),At(aw,lw,Cw),At(SC,dw,JC,KC,OC,MC,PC,IC,HC,WC,EC,wC,sw,AC,QC,XC,ew,RC,pw,hw,BC,yw,Tw,xw,_w,Dw,jw,kw,Nw))},`addDiagrams`),Iw=l(async()=>{f.debug(`Loading registered diagrams`);let e=(await Promise.allSettled(Object.entries(Ot).map(async([e,{detector:t,loader:n}])=>{if(n)try{Fr(e)}catch{try{let{diagram:e,id:r}=await n();Pr(r,e,t)}catch(t){throw f.error(`Failed to load external diagram with key ${e}. Removing from detectors.`),delete Ot[e],t}}}))).filter(e=>e.status===`rejected`);if(e.length>0){f.error(`Failed to load ${e.length} external diagrams`);for(let t of e)f.error(t);throw Error(`Failed to load ${e.length} external diagrams`)}},`loadRegisteredDiagrams`),Lw=`graphics-document document`;function Rw(e,t){e.attr(`role`,Lw),t!==``&&e.attr(`aria-roledescription`,t)}l(Rw,`setA11yDiagramInfo`);function zw(e,t,n,r){if(e.insert!==void 0){if(n){let t=`chart-desc-${r}`;e.attr(`aria-describedby`,t),e.insert(`desc`,`:first-child`).attr(`id`,t).text(n)}if(t){let n=`chart-title-${r}`;e.attr(`aria-labelledby`,n),e.insert(`title`,`:first-child`).attr(`id`,n).text(t)}}}l(zw,`addSVGa11yTitleDescription`);var Bw=class e{constructor(e,t,n,r,i){this.type=e,this.text=t,this.db=n,this.parser=r,this.renderer=i}static{l(this,`Diagram`)}static async fromText(t,n={}){let r=R(),i=kt(t,r);t=Wd(t)+`
|
|
298
|
-
`;try{Fr(i)}catch{let e=Mt(i);if(!e)throw new Dt(`Diagram ${i} not found.`);let{id:t,diagram:n}=await e();Pr(t,n)}let{db:a,parser:o,renderer:s,init:c}=Fr(i);return o.parser&&(o.parser.yy=a),a.clear?.(),c?.(r),n.title&&a.setDiagramTitle?.(n.title),await o.parse(t),new e(i,t,a,o,s)}async render(e,t){await this.renderer.draw(this.text,e,t,this)}getParser(){return this.parser}getType(){return this.type}},Vw=[],Hw=l(()=>{Vw.forEach(e=>{e()}),Vw=[]},`attachFunctions`),Uw=l(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,``).trimStart(),`cleanupComments`);function Ww(e){let t=e.match(wt);if(!t)return{text:e,metadata:{}};let n=DS(t[1],{schema:ES})??{};n=typeof n==`object`&&!Array.isArray(n)?n:{};let r={};return n.displayMode&&(r.displayMode=n.displayMode.toString()),n.title&&(r.title=n.title.toString()),n.config&&(r.config=n.config),{text:e.slice(t[0].length),metadata:r}}l(Ww,`extractFrontMatter`);var Gw=l(e=>e.replace(/\r\n?/g,`
|
|
299
|
-
`).replace(/<(\w+)([^>]*)>/g,(e,t,n)=>`<`+t+n.replace(/="([^"]*)"/g,`='$1'`)+`>`),`cleanupText`),Kw=l(e=>{let{text:t,metadata:n}=Ww(e),{displayMode:r,title:i,config:a={}}=n;return r&&(a.gantt||={},a.gantt.displayMode=r),{title:i,config:a,text:t}},`processFrontmatter`),qw=l(e=>{let t=Ud.detectInit(e)??{},n=Ud.detectDirective(e,`wrap`);return Array.isArray(n)?t.wrap=n.some(({type:e})=>e===`wrap`):n?.type===`wrap`&&(t.wrap=!0),{text:fd(e),directive:t}},`processDirectives`);function Jw(e){let t=Kw(Gw(e)),n=qw(t.text),r=Hd(t.config,n.directive);return e=Uw(n.text),{code:e,title:t.title,config:r}}l(Jw,`preprocessDiagram`);function Yw(e){let t=new TextEncoder().encode(e),n=Array.from(t,e=>String.fromCodePoint(e)).join(``);return btoa(n)}l(Yw,`toBase64`);var Xw=5e4,Zw=`graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa`,Qw=`sandbox`,$w=`loose`,eT=`http://www.w3.org/2000/svg`,tT=`http://www.w3.org/1999/xlink`,nT=`http://www.w3.org/1999/xhtml`,rT=`100%`,iT=`100%`,aT=`border:0;margin:0;`,oT=`margin:0`,sT=`allow-top-navigation-by-user-activation allow-popups`,cT=`The "iframe" tag is not supported by your browser.`,lT=[`foreignobject`],uT=[`dominant-baseline`];function dT(e){let t=Jw(e);return En(),Tn(t.config??{}),t}l(dT,`processAndSetConfigs`);async function fT(e,t){Fw();try{let{code:t,config:n}=dT(e);return{diagramType:(await wT(t)).type,config:n}}catch(e){if(t?.suppressErrors)return!1;throw e}}l(fT,`parse`);var pT=l((e,t,n=[])=>`.${e} ${t} ${dn(`{ ${n.join(` !important; `)} !important; }`)}`,`cssImportantStyles`),mT=l((e,t=new Map)=>{let n=new CSSStyleSheet;if(e.fontFamily!==void 0&&n.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,n.cssRules.length),e.altFontFamily!==void 0&&n.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,n.cssRules.length),t instanceof Map){let r=Mn(e)?[`> *`,`span`]:[`rect`,`polygon`,`ellipse`,`circle`,`path`];t.forEach(e=>{od(e.styles)||r.forEach(t=>{n.insertRule(pT(e.id,t,e.styles),n.cssRules.length)}),od(e.textStyles)||n.insertRule(pT(e.id,`tspan`,(e?.textStyles||[]).map(e=>e.replace(`color`,`fill`))),n.cssRules.length)})}let r=``;if(e.themeCSS!==void 0)if(typeof n.replaceSync==`function`){let t=new CSSStyleSheet;t.replaceSync(e.themeCSS),r=ur(t)+`
|
|
300
|
-
`}else r+=`${e.themeCSS}
|
|
301
|
-
`;return r+ur(n)},`createCssStyles`),hT=l((e,t)=>vC(pC(`${e}{${t}}`),bC([l(function(t,n,r,i){if(t.type===`rule`&&Array.isArray(t.props)){if(t.parent&&t.parent.type===`@keyframes`)return;t.props=t.props.map(t=>t.startsWith(e)?t:`${e} ${t}`)}else t.type.startsWith(`@`)&&([`@media`,`@supports`,`@layer`,`@scope`,`@container`,`@starting-style`,`@keyframes`].includes(t.type)||(f.warn(`Removing unsupported at-rule ${t.type} from CSS`),t.type=OS))},`addNamespace`),yC])),`compileCSS`),gT=l((e,t,n,r)=>hT(r,pr(t,mT(e,n),{...e.themeVariables,theme:e.theme,look:e.look},r)),`createUserStyles`),_T=l((e=``,t,n)=>{let r=e;return!n&&!t&&(r=r.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,`marker-end="url(#`)),r=Gd(r),r=r.replace(/<br>/g,`<br/>`),r},`cleanUpSvgCode`),vT=l((e=``,t)=>`<iframe style="width:${rT};height:${t?.viewBox?.baseVal?.height?t.viewBox.baseVal.height+`px`:iT};${aT}" src="data:text/html;charset=UTF-8;base64,${Yw(`<body style="${oT}">${e}</body>`)}" sandbox="${sT}">
|
|
302
|
-
${cT}
|
|
303
|
-
</iframe>`,`putIntoIFrame`),yT=l((e,t,n,r,i)=>{let a=e.append(`div`);a.attr(`id`,n),r&&a.attr(`style`,r);let o=a.append(`svg`).attr(`id`,t).attr(`width`,`100%`).attr(`xmlns`,eT);return i&&o.attr(`xmlns:xlink`,i),o.append(`g`),e},`appendDivSvgG`);function bT(e,t){return e.append(`iframe`).attr(`id`,t).attr(`style`,`width: 100%; height: 100%;`).attr(`sandbox`,``)}l(bT,`sandboxedIframe`);var xT=l((e,t,n,r)=>{e.getElementById(t)?.remove(),e.getElementById(n)?.remove(),e.getElementById(r)?.remove()},`removeExistingElements`),ST=l(async function(e,t,n){Fw();let r=dT(t);t=r.code;let i=R();f.debug(i),t.length>(i?.maxTextSize??Xw)&&(t=Zw);let a=`#${e}`,o=`i`+e,s=`#`+o,c=`d`+e,u=`#`+c,d=l(()=>{let e=B(m?s:u).node();e&&`remove`in e&&e.remove()},`removeTempElements`),p=B(document.body),m=i.securityLevel===Qw,h=i.securityLevel===$w,g=i.fontFamily;n===void 0?(xT(document,e,c,o),m?(p=B(bT(B(document.body),o).nodes()[0].contentDocument.body),p.node().style.margin=`0`):p=B(`body`),yT(p,e,c)):(n&&(n.innerHTML=``),m?(p=B(bT(B(n),o).nodes()[0].contentDocument.body),p.node().style.margin=`0`):p=B(n),yT(p,e,c,`font-family: ${g}`,tT));let _,v;try{_=await Bw.fromText(t,{title:r.title})}catch(e){if(i.suppressErrorRendering)throw d(),e;_=await Bw.fromText(`error`),v=e}let y=p.select(u).node(),b=_.type,x=y.firstChild,S=x.firstChild,C=_.renderer.getClasses?.(t,_),w=gT(i,b,C,a),T=document.createElement(`style`);T.innerHTML=w,x.insertBefore(T,S);try{await _.renderer.draw(t,e,`11.15.0`,_)}catch(n){throw i.suppressErrorRendering?d():nw.draw(t,e,`11.15.0`),n}let E=p.select(`${u} svg`),D=_.db.getAccTitle?.(),ee=_.db.getAccDescription?.();TT(b,E,D,ee),p.select(`[id="${e}"]`).selectAll(`foreignobject > *`).attr(`xmlns`,nT);let te=p.select(u).node().innerHTML;if(f.debug(`config.arrowMarkerAbsolute`,i.arrowMarkerAbsolute),te=_T(te,m,pn(i.arrowMarkerAbsolute)),m){let e=p.select(u+` svg`).node();te=vT(te,e)}else h||(te=Ct.sanitize(te,{ADD_TAGS:lT,ADD_ATTR:uT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));if(Hw(),v)throw v;return d(),{diagramType:b,svg:te,bindFunctions:_.db.bindFunctions}},`render`);function CT(e={}){let t=Pt({},e);t?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||={},t.themeVariables.fontFamily=t.fontFamily),bn(t),t?.theme&&t.theme in L?t.themeVariables=L[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=L.default.getThemeVariables(t.themeVariables)),p((typeof t==`object`?yn(t):Sn()).logLevel),Fw()}l(CT,`initialize`);var wT=l((e,t={})=>{let{code:n}=Jw(e);return Bw.fromText(n,t)},`getDiagramFromText`);function TT(e,t,n,r){Rw(t,e),zw(t,n,r,t.attr(`id`))}l(TT,`addA11yInfo`);var ET=Object.freeze({render:ST,parse:fT,getDiagramFromText:wT,initialize:CT,getConfig:R,setConfig:Cn,getSiteConfig:Sn,updateSiteConfig:xn,reset:l(()=>{En()},`reset`),globalReset:l(()=>{En(fn)},`globalReset`),defaultConfig:fn});p(R().logLevel),En(R());var DT=l((e,t,n)=>{f.warn(e),zd(e)?(n&&n(e.str,e.hash),t.push({...e,message:e.str,error:e})):(n&&n(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},`handleError`),OT=l(async function(e={querySelector:`.mermaid`}){try{await kT(e)}catch(t){if(zd(t)&&f.error(t.str),BT.parseError&&BT.parseError(t),!e.suppressErrors)throw f.error(`Use the suppressErrors option to suppress these errors`),t}},`run`),kT=l(async function({postRenderCallback:e,querySelector:t,nodes:n}={querySelector:`.mermaid`}){let r=ET.getConfig();f.debug(`${e?``:`No `}Callback function found`);let i;if(n)i=n;else if(t)i=document.querySelectorAll(t);else throw Error(`Nodes and querySelector are both undefined`);f.debug(`Found ${i.length} diagrams`),r?.startOnLoad!==void 0&&(f.debug(`Start On Load: `+r?.startOnLoad),ET.updateSiteConfig({startOnLoad:r?.startOnLoad}));let a=new Ud.InitIDGenerator(r.deterministicIds,r.deterministicIDSeed),o,s=[];for(let t of Array.from(i)){if(f.info(`Rendering diagram: `+t.id),t.getAttribute(`data-processed`))continue;t.setAttribute(`data-processed`,`true`);let n=`mermaid-${a.next()}`;o=t.innerHTML,o=qp(Ud.entityDecode(o)).trim().replace(/<br\s*\/?>/gi,`<br/>`);let r=Ud.detectInit(o);r&&f.debug(`Detected early reinit: `,r);try{let{svg:r,bindFunctions:i}=await zT(n,o,t);t.innerHTML=r,e&&await e(n),i&&i(t)}catch(e){DT(e,s,BT.parseError)}}if(s.length>0)throw s[0]},`runThrowsErrors`),AT=l(function(e){ET.initialize(e)},`initialize`),jT=l(async function(e,t,n){f.warn(`mermaid.init is deprecated. Please use run instead.`),e&&AT(e);let r={postRenderCallback:n,querySelector:`.mermaid`};typeof t==`string`?r.querySelector=t:t&&(t instanceof HTMLElement?r.nodes=[t]:r.nodes=t),await OT(r)},`init`),MT=l(async(e,{lazyLoad:t=!0}={})=>{Fw(),At(...e),t===!1&&await Iw()},`registerExternalDiagrams`),NT=l(function(){if(BT.startOnLoad){let{startOnLoad:e}=ET.getConfig();e&&BT.run().catch(e=>f.error(`Mermaid failed to initialize`,e))}},`contentLoaded`);typeof document<`u`&&window.addEventListener(`load`,NT,!1);var PT=l(function(e){BT.parseError=e},`setParseErrorHandler`),FT=[],IT=!1,LT=l(async()=>{if(!IT){for(IT=!0;FT.length>0;){let e=FT.shift();if(e)try{await e()}catch(e){f.error(`Error executing queue`,e)}}IT=!1}},`executeQueue`),RT=l(async(e,t)=>new Promise((n,r)=>{let i=l(()=>new Promise((i,a)=>{ET.parse(e,t).then(e=>{i(e),n(e)},e=>{f.error(`Error parsing`,e),BT.parseError?.(e),a(e),r(e)})}),`performCall`);FT.push(i),LT().catch(r)}),`parse`),zT=l((e,t,n)=>new Promise((r,i)=>{let a=l(()=>new Promise((a,o)=>{ET.render(e,t,n).then(e=>{a(e),r(e)},e=>{f.error(`Error parsing`,e),BT.parseError?.(e),o(e),i(e)})}),`performCall`);FT.push(a),LT().catch(i)}),`render`),BT={startOnLoad:!0,mermaidAPI:ET,parse:RT,render:zT,init:jT,run:OT,registerExternalDiagrams:MT,registerLayoutLoaders:Vv,initialize:AT,parseError:void 0,contentLoaded:NT,setParseErrorHandler:PT,detectType:kt,registerIconPacks:Zp,getRegisteredDiagramsMetadata:l(()=>Object.keys(Ot).map(e=>({id:e})),`getRegisteredDiagramsMetadata`)},VT=BT,HT=i();VT.initialize({startOnLoad:!1,theme:`default`,securityLevel:`strict`});var UT=({chart:e})=>{let[t,n]=(0,o.useState)(``),[r,i]=(0,o.useState)(!1),a=(0,o.useId)().replace(/:/g,`-`);return(0,o.useEffect)(()=>{let t=!1;return(async()=>{try{let{svg:r}=await VT.render(a,e);t||(n(r),i(!1))}catch{t||i(!0)}})(),()=>{t=!0}},[e,a]),r?(0,HT.jsx)(`pre`,{className:`my-4 p-4 bg-slate-100 dark:bg-slate-800 rounded-lg overflow-x-auto text-sm text-red-500 border border-red-200 dark:border-red-800`,children:e}):(0,HT.jsx)(`div`,{className:`my-4 flex justify-center bg-white dark:bg-slate-800 p-4 rounded-lg border border-slate-200 dark:border-slate-700 overflow-x-auto`,dangerouslySetInnerHTML:{__html:t}})};export{Pu as $,ln as $t,Fd as A,f as An,el as At,Ud as B,po as Bt,Sm as C,ne as Cn,Xc as Ct,em as D,g as Dn,Qc as Dt,xm as E,T as En,Zc as Et,Ed as F,No as Ft,Tu as G,B as Gt,ed as H,uo as Ht,Kd as I,Ao as It,Du as J,yr as Jt,wu as K,Pt as Kt,wd as L,Mo as Lt,Pd as M,UT as MermaidBlock,qc as Mt,Hd as N,zo as Nt,Zp as O,u as On,nl as Ot,Gd as P,Po as Pt,Nu as Q,kr as Qt,Vd as R,Do as Rt,Dm as S,k as Sn,Yc as St,gm as T,D as Tn,rl as Tt,Hu as U,Va as Ut,jd as V,so as Vt,yu as W,Ha as Wt,Fu as X,ir as Xt,xu as Y,mr as Yt,Iu as Z,sr as Zt,Y as _,wr as _n,cl as _t,bv as a,Mn as an,Cu as at,W as b,Ct as bn,al as bt,Rv as c,jn as cn,Au as ct,dv as d,Jn as dn,ku as dt,Cr as en,Mu as et,Jh as f,rr as fn,mu as ft,uv as g,Or as gn,pl as gt,fv as h,br as hn,bl as ht,Hv as i,Tr as in,hu as it,Nd as j,a as jn,il as jt,Jp as k,l as kn,$c as kt,wv as l,er as ln,ju as lt,sv as m,Sr as mn,cu as mt,DS as n,R as nn,_u as nt,Mv as o,Ht as on,gu as ot,lv as p,zn as pn,uu as pt,vu as q,tr as qt,Uv as r,z as rn,Eu as rt,Sv as s,Gn as sn,bu as st,ES as t,xr as tn,Su as tt,Yh as u,Nn as un,Ou as ut,q as v,cr as vn,sl as vt,Em as w,O as wn,tl as wt,Om as x,A as xn,ol as xt,Mm as y,jr as yn,Jc as yt,Od as z,Ua as zt};
|