daigram 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +661 -0
- package/LICENSE-MIT +21 -0
- package/NOTICE +11 -0
- package/README.md +788 -2
- package/assets/fonts/CascadiaCode-Regular.ttf +0 -0
- package/assets/fonts/Excalifont-Regular.ttf +0 -0
- package/assets/fonts/LICENSES.md +63 -0
- package/assets/fonts/LiberationSans-Regular.ttf +0 -0
- package/assets/fonts/Virgil-Regular.ttf +0 -0
- package/dist/ai/config.d.ts +11 -0
- package/dist/ai/config.d.ts.map +1 -0
- package/dist/ai/config.js +59 -0
- package/dist/ai/config.js.map +1 -0
- package/dist/ai/providers/anthropic.d.ts +3 -0
- package/dist/ai/providers/anthropic.d.ts.map +1 -0
- package/dist/ai/providers/anthropic.js +71 -0
- package/dist/ai/providers/anthropic.js.map +1 -0
- package/dist/ai/providers/openai-compatible.d.ts +3 -0
- package/dist/ai/providers/openai-compatible.d.ts.map +1 -0
- package/dist/ai/providers/openai-compatible.js +95 -0
- package/dist/ai/providers/openai-compatible.js.map +1 -0
- package/dist/ai/request-settings.d.ts +9 -0
- package/dist/ai/request-settings.d.ts.map +1 -0
- package/dist/ai/request-settings.js +56 -0
- package/dist/ai/request-settings.js.map +1 -0
- package/dist/ai/routes.d.ts +7 -0
- package/dist/ai/routes.d.ts.map +1 -0
- package/dist/ai/routes.js +192 -0
- package/dist/ai/routes.js.map +1 -0
- package/dist/ai/runner.d.ts +19 -0
- package/dist/ai/runner.d.ts.map +1 -0
- package/dist/ai/runner.js +77 -0
- package/dist/ai/runner.js.map +1 -0
- package/dist/ai/sse.d.ts +4 -0
- package/dist/ai/sse.d.ts.map +1 -0
- package/dist/ai/sse.js +53 -0
- package/dist/ai/sse.js.map +1 -0
- package/dist/ai/system.d.ts +2 -0
- package/dist/ai/system.d.ts.map +1 -0
- package/dist/ai/system.js +17 -0
- package/dist/ai/system.js.map +1 -0
- package/dist/ai/tools.d.ts +10 -0
- package/dist/ai/tools.d.ts.map +1 -0
- package/dist/ai/tools.js +134 -0
- package/dist/ai/tools.js.map +1 -0
- package/dist/ai/types.d.ts +72 -0
- package/dist/ai/types.d.ts.map +1 -0
- package/dist/ai/types.js +2 -0
- package/dist/ai/types.js.map +1 -0
- package/dist/bin.d.ts +3 -0
- package/dist/bin.d.ts.map +1 -0
- package/dist/bin.js +52 -0
- package/dist/bin.js.map +1 -0
- package/dist/cli/args.d.ts +15 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +78 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/commands/ai.d.ts +2 -0
- package/dist/cli/commands/ai.d.ts.map +1 -0
- package/dist/cli/commands/ai.js +45 -0
- package/dist/cli/commands/ai.js.map +1 -0
- package/dist/cli/commands/arrange.d.ts +2 -0
- package/dist/cli/commands/arrange.d.ts.map +1 -0
- package/dist/cli/commands/arrange.js +103 -0
- package/dist/cli/commands/arrange.js.map +1 -0
- package/dist/cli/commands/canvases.d.ts +2 -0
- package/dist/cli/commands/canvases.d.ts.map +1 -0
- package/dist/cli/commands/canvases.js +38 -0
- package/dist/cli/commands/canvases.js.map +1 -0
- package/dist/cli/commands/check.d.ts +2 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +15 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/comment.d.ts +2 -0
- package/dist/cli/commands/comment.d.ts.map +1 -0
- package/dist/cli/commands/comment.js +76 -0
- package/dist/cli/commands/comment.js.map +1 -0
- package/dist/cli/commands/elements.d.ts +8 -0
- package/dist/cli/commands/elements.d.ts.map +1 -0
- package/dist/cli/commands/elements.js +285 -0
- package/dist/cli/commands/elements.js.map +1 -0
- package/dist/cli/commands/frame.d.ts +2 -0
- package/dist/cli/commands/frame.d.ts.map +1 -0
- package/dist/cli/commands/frame.js +58 -0
- package/dist/cli/commands/frame.js.map +1 -0
- package/dist/cli/commands/install-skill.d.ts +2 -0
- package/dist/cli/commands/install-skill.d.ts.map +1 -0
- package/dist/cli/commands/install-skill.js +108 -0
- package/dist/cli/commands/install-skill.js.map +1 -0
- package/dist/cli/commands/layout.d.ts +2 -0
- package/dist/cli/commands/layout.d.ts.map +1 -0
- package/dist/cli/commands/layout.js +15 -0
- package/dist/cli/commands/layout.js.map +1 -0
- package/dist/cli/commands/render.d.ts +2 -0
- package/dist/cli/commands/render.d.ts.map +1 -0
- package/dist/cli/commands/render.js +64 -0
- package/dist/cli/commands/render.js.map +1 -0
- package/dist/cli/commands/scene.d.ts +8 -0
- package/dist/cli/commands/scene.d.ts.map +1 -0
- package/dist/cli/commands/scene.js +147 -0
- package/dist/cli/commands/scene.js.map +1 -0
- package/dist/cli/commands/server.d.ts +4 -0
- package/dist/cli/commands/server.d.ts.map +1 -0
- package/dist/cli/commands/server.js +66 -0
- package/dist/cli/commands/server.js.map +1 -0
- package/dist/cli/commands/snapshot.d.ts +2 -0
- package/dist/cli/commands/snapshot.d.ts.map +1 -0
- package/dist/cli/commands/snapshot.js +41 -0
- package/dist/cli/commands/snapshot.js.map +1 -0
- package/dist/cli/image-options.d.ts +43 -0
- package/dist/cli/image-options.d.ts.map +1 -0
- package/dist/cli/image-options.js +71 -0
- package/dist/cli/image-options.js.map +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +115 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/util.d.ts +5 -0
- package/dist/cli/util.d.ts.map +1 -0
- package/dist/cli/util.js +35 -0
- package/dist/cli/util.js.map +1 -0
- package/dist/core/arrow-routing.d.ts +31 -0
- package/dist/core/arrow-routing.d.ts.map +1 -0
- package/dist/core/arrow-routing.js +244 -0
- package/dist/core/arrow-routing.js.map +1 -0
- package/dist/core/bulk-ops.d.ts +55 -0
- package/dist/core/bulk-ops.d.ts.map +1 -0
- package/dist/core/bulk-ops.js +181 -0
- package/dist/core/bulk-ops.js.map +1 -0
- package/dist/core/canvas-client.d.ts +110 -0
- package/dist/core/canvas-client.d.ts.map +1 -0
- package/dist/core/canvas-client.js +416 -0
- package/dist/core/canvas-client.js.map +1 -0
- package/dist/core/canvas-id.d.ts +4 -0
- package/dist/core/canvas-id.d.ts.map +1 -0
- package/dist/core/canvas-id.js +5 -0
- package/dist/core/canvas-id.js.map +1 -0
- package/dist/core/canvas-persistence.d.ts +30 -0
- package/dist/core/canvas-persistence.d.ts.map +1 -0
- package/dist/core/canvas-persistence.js +854 -0
- package/dist/core/canvas-persistence.js.map +1 -0
- package/dist/core/canvas-registry.d.ts +36 -0
- package/dist/core/canvas-registry.d.ts.map +1 -0
- package/dist/core/canvas-registry.js +161 -0
- package/dist/core/canvas-registry.js.map +1 -0
- package/dist/core/canvas-routes.d.ts +5 -0
- package/dist/core/canvas-routes.d.ts.map +1 -0
- package/dist/core/canvas-routes.js +29 -0
- package/dist/core/canvas-routes.js.map +1 -0
- package/dist/core/canvas-state.d.ts +14 -0
- package/dist/core/canvas-state.d.ts.map +1 -0
- package/dist/core/canvas-state.js +20 -0
- package/dist/core/canvas-state.js.map +1 -0
- package/dist/core/canvas.d.ts +13 -0
- package/dist/core/canvas.d.ts.map +1 -0
- package/dist/core/canvas.js +4 -0
- package/dist/core/canvas.js.map +1 -0
- package/dist/core/comment-ops.d.ts +3 -0
- package/dist/core/comment-ops.d.ts.map +1 -0
- package/dist/core/comment-ops.js +36 -0
- package/dist/core/comment-ops.js.map +1 -0
- package/dist/core/comments.d.ts +5 -0
- package/dist/core/comments.d.ts.map +1 -0
- package/dist/core/comments.js +137 -0
- package/dist/core/comments.js.map +1 -0
- package/dist/core/compact.d.ts +13 -0
- package/dist/core/compact.d.ts.map +1 -0
- package/dist/core/compact.js +20 -0
- package/dist/core/compact.js.map +1 -0
- package/dist/core/config.d.ts +8 -0
- package/dist/core/config.d.ts.map +1 -0
- package/dist/core/config.js +18 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/describe.d.ts +3 -0
- package/dist/core/describe.d.ts.map +1 -0
- package/dist/core/describe.js +94 -0
- package/dist/core/describe.js.map +1 -0
- package/dist/core/design-guide.d.ts +2 -0
- package/dist/core/design-guide.d.ts.map +1 -0
- package/dist/core/design-guide.js +115 -0
- package/dist/core/design-guide.js.map +1 -0
- package/dist/core/diagram-layout.d.ts +64 -0
- package/dist/core/diagram-layout.d.ts.map +1 -0
- package/dist/core/diagram-layout.js +238 -0
- package/dist/core/diagram-layout.js.map +1 -0
- package/dist/core/diagram-ops.d.ts +165 -0
- package/dist/core/diagram-ops.d.ts.map +1 -0
- package/dist/core/diagram-ops.js +46 -0
- package/dist/core/diagram-ops.js.map +1 -0
- package/dist/core/entry.d.ts +3 -0
- package/dist/core/entry.d.ts.map +1 -0
- package/dist/core/entry.js +35 -0
- package/dist/core/entry.js.map +1 -0
- package/dist/core/expand-elements.d.ts +9 -0
- package/dist/core/expand-elements.d.ts.map +1 -0
- package/dist/core/expand-elements.js +277 -0
- package/dist/core/expand-elements.js.map +1 -0
- package/dist/core/frame-ops.d.ts +60 -0
- package/dist/core/frame-ops.d.ts.map +1 -0
- package/dist/core/frame-ops.js +90 -0
- package/dist/core/frame-ops.js.map +1 -0
- package/dist/core/frames.d.ts +31 -0
- package/dist/core/frames.d.ts.map +1 -0
- package/dist/core/frames.js +95 -0
- package/dist/core/frames.js.map +1 -0
- package/dist/core/geometry.d.ts +30 -0
- package/dist/core/geometry.d.ts.map +1 -0
- package/dist/core/geometry.js +167 -0
- package/dist/core/geometry.js.map +1 -0
- package/dist/core/layout-check.d.ts +30 -0
- package/dist/core/layout-check.d.ts.map +1 -0
- package/dist/core/layout-check.js +181 -0
- package/dist/core/layout-check.js.map +1 -0
- package/dist/core/local-origin.d.ts +4 -0
- package/dist/core/local-origin.d.ts.map +1 -0
- package/dist/core/local-origin.js +27 -0
- package/dist/core/local-origin.js.map +1 -0
- package/dist/core/mcp-dispatch.d.ts +9 -0
- package/dist/core/mcp-dispatch.d.ts.map +1 -0
- package/dist/core/mcp-dispatch.js +741 -0
- package/dist/core/mcp-dispatch.js.map +1 -0
- package/dist/core/mcp-http.d.ts +3 -0
- package/dist/core/mcp-http.d.ts.map +1 -0
- package/dist/core/mcp-http.js +38 -0
- package/dist/core/mcp-http.js.map +1 -0
- package/dist/core/mcp-server.d.ts +19 -0
- package/dist/core/mcp-server.d.ts.map +1 -0
- package/dist/core/mcp-server.js +57 -0
- package/dist/core/mcp-server.js.map +1 -0
- package/dist/core/mcp-tools.d.ts +3 -0
- package/dist/core/mcp-tools.d.ts.map +1 -0
- package/dist/core/mcp-tools.js +723 -0
- package/dist/core/mcp-tools.js.map +1 -0
- package/dist/core/normalize.d.ts +26 -0
- package/dist/core/normalize.d.ts.map +1 -0
- package/dist/core/normalize.js +134 -0
- package/dist/core/normalize.js.map +1 -0
- package/dist/core/obsidian-md.d.ts +4 -0
- package/dist/core/obsidian-md.d.ts.map +1 -0
- package/dist/core/obsidian-md.js +227 -0
- package/dist/core/obsidian-md.js.map +1 -0
- package/dist/core/pidfile.d.ts +5 -0
- package/dist/core/pidfile.d.ts.map +1 -0
- package/dist/core/pidfile.js +51 -0
- package/dist/core/pidfile.js.map +1 -0
- package/dist/core/png-scene.d.ts +4 -0
- package/dist/core/png-scene.d.ts.map +1 -0
- package/dist/core/png-scene.js +176 -0
- package/dist/core/png-scene.js.map +1 -0
- package/dist/core/render/excalidraw-node/dom.d.ts +29 -0
- package/dist/core/render/excalidraw-node/dom.d.ts.map +1 -0
- package/dist/core/render/excalidraw-node/dom.js +132 -0
- package/dist/core/render/excalidraw-node/dom.js.map +1 -0
- package/dist/core/render/excalidraw-node/index.d.ts +11 -0
- package/dist/core/render/excalidraw-node/index.d.ts.map +1 -0
- package/dist/core/render/excalidraw-node/index.js +77 -0
- package/dist/core/render/excalidraw-node/index.js.map +1 -0
- package/dist/core/render/fonts.d.ts +34 -0
- package/dist/core/render/fonts.d.ts.map +1 -0
- package/dist/core/render/fonts.js +133 -0
- package/dist/core/render/fonts.js.map +1 -0
- package/dist/core/render/index.d.ts +40 -0
- package/dist/core/render/index.d.ts.map +1 -0
- package/dist/core/render/index.js +135 -0
- package/dist/core/render/index.js.map +1 -0
- package/dist/core/render/png-worker.d.ts +2 -0
- package/dist/core/render/png-worker.d.ts.map +1 -0
- package/dist/core/render/png-worker.js +65 -0
- package/dist/core/render/png-worker.js.map +1 -0
- package/dist/core/render/png.d.ts +15 -0
- package/dist/core/render/png.d.ts.map +1 -0
- package/dist/core/render/png.js +128 -0
- package/dist/core/render/png.js.map +1 -0
- package/dist/core/render/text-metrics.d.ts +2 -0
- package/dist/core/render/text-metrics.d.ts.map +1 -0
- package/dist/core/render/text-metrics.js +136 -0
- package/dist/core/render/text-metrics.js.map +1 -0
- package/dist/core/request-canvas.d.ts +9 -0
- package/dist/core/request-canvas.d.ts.map +1 -0
- package/dist/core/request-canvas.js +2 -0
- package/dist/core/request-canvas.js.map +1 -0
- package/dist/core/request-headers.d.ts +5 -0
- package/dist/core/request-headers.d.ts.map +1 -0
- package/dist/core/request-headers.js +80 -0
- package/dist/core/request-headers.js.map +1 -0
- package/dist/core/scene-input.d.ts +2 -0
- package/dist/core/scene-input.d.ts.map +1 -0
- package/dist/core/scene-input.js +11 -0
- package/dist/core/scene-input.js.map +1 -0
- package/dist/core/scene-io.d.ts +16 -0
- package/dist/core/scene-io.d.ts.map +1 -0
- package/dist/core/scene-io.js +95 -0
- package/dist/core/scene-io.js.map +1 -0
- package/dist/core/share-url.d.ts +3 -0
- package/dist/core/share-url.d.ts.map +1 -0
- package/dist/core/share-url.js +77 -0
- package/dist/core/share-url.js.map +1 -0
- package/dist/core/spawn.d.ts +41 -0
- package/dist/core/spawn.d.ts.map +1 -0
- package/dist/core/spawn.js +153 -0
- package/dist/core/spawn.js.map +1 -0
- package/dist/core/version.d.ts +2 -0
- package/dist/core/version.d.ts.map +1 -0
- package/dist/core/version.js +14 -0
- package/dist/core/version.js.map +1 -0
- package/dist/frontend/assets/Assistant-Bold-gm-uSS1B.woff2 +0 -0
- package/dist/frontend/assets/Assistant-Medium-DrcxCXg3.woff2 +0 -0
- package/dist/frontend/assets/Assistant-Regular-DVxZuzxb.woff2 +0 -0
- package/dist/frontend/assets/Assistant-SemiBold-SCI4bEL9.woff2 +0 -0
- package/dist/frontend/assets/Tableau10-CvOaoHrI.js +1 -0
- package/dist/frontend/assets/_commonjs-dynamic-modules-TDtrdbi3.js +1 -0
- package/dist/frontend/assets/abnfDiagram-VCTEODGH-CO_aNPe5.js +1 -0
- package/dist/frontend/assets/advancedFormat-DE2dNp0u.js +1 -0
- package/dist/frontend/assets/ar-SA-G6X2FPQ2-Bq4yiKbc.js +10 -0
- package/dist/frontend/assets/arc--vhPzIZC.js +1 -0
- package/dist/frontend/assets/architectureDiagram-5GKGNRK7-aHYJQElw.js +36 -0
- package/dist/frontend/assets/array-BKyUJesY.js +1 -0
- package/dist/frontend/assets/az-AZ-76LH7QW2-BB3yat67.js +1 -0
- package/dist/frontend/assets/band-dPffDWoQ.js +1 -0
- package/dist/frontend/assets/bg-BG-XCXSNQG7-DmC2FjQc.js +5 -0
- package/dist/frontend/assets/blockDiagram-68f4deed-Bn83vchM.js +118 -0
- package/dist/frontend/assets/blockDiagram-NRAW4CY4-CxaW-TzC.js +129 -0
- package/dist/frontend/assets/bn-BD-2XOGV67Q-DpCbZMS6.js +5 -0
- package/dist/frontend/assets/c4Diagram-15b5d702-Bq7Ko0Vs.js +10 -0
- package/dist/frontend/assets/c4Diagram-UCG6FXSJ-Dh883fAO.js +38 -0
- package/dist/frontend/assets/ca-ES-6MX7JW3Y-CBOshpbV.js +8 -0
- package/dist/frontend/assets/channel-DYvM7vRx.js +1 -0
- package/dist/frontend/assets/chunk-2Q5K7J3B-DaFhLtFc.js +1 -0
- package/dist/frontend/assets/chunk-5VM5RSS4-CyLfaWw7.js +15 -0
- package/dist/frontend/assets/chunk-F27PBJKO-BHNc-edD.js +1 -0
- package/dist/frontend/assets/chunk-G27WJ6UU-BBKiZxqf.js +231 -0
- package/dist/frontend/assets/chunk-JWPE2WC7-7twsn51D.js +1 -0
- package/dist/frontend/assets/chunk-LCL6LL3I-BTwZuXJ6.js +206 -0
- package/dist/frontend/assets/chunk-POPQ4Y6H-CaHDxqyV.js +1 -0
- package/dist/frontend/assets/chunk-SVP7TREG-B8-zByXy.js +88 -0
- package/dist/frontend/assets/chunk-XXDRQBXY-DQLro-7R.js +1 -0
- package/dist/frontend/assets/classDiagram-DTDB5LWJ-Dpwx6IJK.js +1 -0
- package/dist/frontend/assets/classDiagram-d40c83e7-BPxlcZuc.js +2 -0
- package/dist/frontend/assets/classDiagram-v2-JRS7N3AN-Dpwx6IJK.js +1 -0
- package/dist/frontend/assets/classDiagram-v2-d5a6b087-Cyz34qAK.js +2 -0
- package/dist/frontend/assets/clone-Iw0eB1Cb.js +1 -0
- package/dist/frontend/assets/cose-bilkent-JH36ORCC-C4ZX1Xvi.js +1 -0
- package/dist/frontend/assets/createText-d213de94-CDH1rzxH.js +7 -0
- package/dist/frontend/assets/cs-CZ-2BRQDIVT-CGAN69M4.js +11 -0
- package/dist/frontend/assets/cynefin-OW5HDTMX-B8XT9png.js +178 -0
- package/dist/frontend/assets/cynefinDiagram-5FMLGOSQ-COTZjqlj.js +62 -0
- package/dist/frontend/assets/cytoscape-cose-bilkent-D4yGolDn.js +1 -0
- package/dist/frontend/assets/cytoscape.esm-BjAbmLdb.js +331 -0
- package/dist/frontend/assets/da-DK-5WZEPLOC-FIDoeOAn.js +5 -0
- package/dist/frontend/assets/dagre-3AP2YEHR-v8EtxNwx.js +4 -0
- package/dist/frontend/assets/de-DE-XR44H4JA-Hquyrt1G.js +8 -0
- package/dist/frontend/assets/defaultLocale-C4B-KCzX.js +1 -0
- package/dist/frontend/assets/diagram-S7CK7UJ4-BiwOlZBI.js +30 -0
- package/dist/frontend/assets/diagram-UQ7AKVKN-DIfzNs7s.js +41 -0
- package/dist/frontend/assets/diagram-VSXAHHWV-kKkEHy5z.js +3 -0
- package/dist/frontend/assets/diagram-VX7I27RA-zTp2qGKo.js +24 -0
- package/dist/frontend/assets/diagram-Z3DM3KII-hUxSr-QT.js +24 -0
- package/dist/frontend/assets/directory-open-01563666-DWU9wJ6I.js +1 -0
- package/dist/frontend/assets/directory-open-4ed118d0-CunoC1EB.js +1 -0
- package/dist/frontend/assets/ebnfDiagram-PWID7BFC-CRwXBVzS.js +1 -0
- package/dist/frontend/assets/edges-332bd1c7-CbPhghy3.js +4 -0
- package/dist/frontend/assets/el-GR-BZB4AONW-CWRJJANX.js +10 -0
- package/dist/frontend/assets/erDiagram-880f2ed8-CY1dU-f9.js +51 -0
- package/dist/frontend/assets/erDiagram-SSCWMZ5O-BfDW8Lxf.js +99 -0
- package/dist/frontend/assets/es-ES-U4NZUMDT-BwZWIjT5.js +9 -0
- package/dist/frontend/assets/eu-ES-A7QVB2H4-B9suQ9BE.js +11 -0
- package/dist/frontend/assets/fa-IR-HGAKTJCU-tgrKvE4J.js +8 -0
- package/dist/frontend/assets/fi-FI-Z5N7JZ37-Ddoc7R-q.js +6 -0
- package/dist/frontend/assets/file-open-002ab408-DIuFHtCF.js +1 -0
- package/dist/frontend/assets/file-open-7c801643-684qeFg4.js +1 -0
- package/dist/frontend/assets/file-save-3189631c-C1wFhQhH.js +1 -0
- package/dist/frontend/assets/file-save-745eba88-Bb9F9Kg7.js +1 -0
- package/dist/frontend/assets/flowDb-7c981674-DkYacLUz.js +10 -0
- package/dist/frontend/assets/flowDiagram-A5DVABFB-CCBuG42p.js +168 -0
- package/dist/frontend/assets/flowDiagram-cbd28bf7-DhhBmCsw.js +4 -0
- package/dist/frontend/assets/flowDiagram-v2-ffc7f31a-BICbZ5-w.js +1 -0
- package/dist/frontend/assets/flowchart-elk-definition-36e2d292-BsyTsM2Q.js +139 -0
- package/dist/frontend/assets/fr-FR-RHASNOE6-Bzn_6dcd.js +9 -0
- package/dist/frontend/assets/ganttDiagram-04f9e578-CCKAlfpJ.js +257 -0
- package/dist/frontend/assets/ganttDiagram-EL5Y4UJY-B8CXkutd.js +292 -0
- package/dist/frontend/assets/gitGraphDiagram-21fc4d3e-DBAYEQql.js +70 -0
- package/dist/frontend/assets/gitGraphDiagram-WWUBYQGX-Ge5QWjv2.js +106 -0
- package/dist/frontend/assets/gl-ES-HMX3MZ6V-vcZHbFum.js +10 -0
- package/dist/frontend/assets/graph-87dI2d0Q.js +1 -0
- package/dist/frontend/assets/has-D7z5cd7K.js +1 -0
- package/dist/frontend/assets/he-IL-6SHJWFNN-CK07fY3l.js +10 -0
- package/dist/frontend/assets/hi-IN-IWLTKZ5I-CDZ0p7Jv.js +4 -0
- package/dist/frontend/assets/hu-HU-A5ZG7DT2-FH5SLnWy.js +7 -0
- package/dist/frontend/assets/id-ID-SAP4L64H-MjXIXb2f.js +10 -0
- package/dist/frontend/assets/image-blob-reduce.esm-HwCm7IZ0.js +7 -0
- package/dist/frontend/assets/index-6079d271-DiB2AL6F.js +1 -0
- package/dist/frontend/assets/index-BcAUh2Nm.css +1 -0
- package/dist/frontend/assets/index-Biw8Vgb3.js +320 -0
- package/dist/frontend/assets/index-fTyH8AV3.js +354 -0
- package/dist/frontend/assets/infoDiagram-4a4f5b27-BOdJmCUU.js +7 -0
- package/dist/frontend/assets/infoDiagram-RXCK75RN-CNm06Rxs.js +2 -0
- package/dist/frontend/assets/init-Gi6I4Gst.js +1 -0
- package/dist/frontend/assets/ishikawaDiagram-5VMMS53U-DoLWy3n2.js +70 -0
- package/dist/frontend/assets/it-IT-JPQ66NNP-D3n0iaPa.js +11 -0
- package/dist/frontend/assets/ja-JP-DBVTYXUO-ejSNO7M9.js +8 -0
- package/dist/frontend/assets/journeyDiagram-29694f62-Cm6qVjA9.js +139 -0
- package/dist/frontend/assets/journeyDiagram-EYS64GPL-ByZmvOcj.js +139 -0
- package/dist/frontend/assets/kaa-6HZHGXH3-D8l_gwno.js +1 -0
- package/dist/frontend/assets/kab-KAB-ZGHBKWFO-CCdAUgdW.js +8 -0
- package/dist/frontend/assets/kanban-definition-3QL26DDD-Y5ylzca9.js +89 -0
- package/dist/frontend/assets/katex-C5jXJg4s.js +257 -0
- package/dist/frontend/assets/kk-KZ-P5N5QNE5-DeuZqHeo.js +1 -0
- package/dist/frontend/assets/km-KH-HSX4SM5Z-CiG2k5fk.js +11 -0
- package/dist/frontend/assets/ko-KR-MTYHY66A-KQOGYf_l.js +9 -0
- package/dist/frontend/assets/ku-TR-6OUDTVRD-iPec9Wpx.js +9 -0
- package/dist/frontend/assets/layout-ChryVliD.js +1 -0
- package/dist/frontend/assets/layout-chXYHUIV.js +1 -0
- package/dist/frontend/assets/line-V0o6yOnB.js +1 -0
- package/dist/frontend/assets/linear-BvV3B0Vg.js +1 -0
- package/dist/frontend/assets/lt-LT-XHIRWOB4-CATjC2gQ.js +3 -0
- package/dist/frontend/assets/lv-LV-5QDEKY6T-BsDP-7Dd.js +7 -0
- package/dist/frontend/assets/mindmap-definition-FBJOCRG2-z4KcwRlx.js +96 -0
- package/dist/frontend/assets/mindmap-definition-ac74a2e8-C1QU2vBv.js +95 -0
- package/dist/frontend/assets/mr-IN-CRQNXWMA-DWJhwvxv.js +13 -0
- package/dist/frontend/assets/my-MM-5M5IBNSE-DckXEMN8.js +1 -0
- package/dist/frontend/assets/nb-NO-T6EIAALU-HaOR9ZeX.js +10 -0
- package/dist/frontend/assets/nl-NL-IS3SIHDZ-ef_ywpFu.js +8 -0
- package/dist/frontend/assets/nn-NO-6E72VCQL-Bg7QdVqf.js +8 -0
- package/dist/frontend/assets/oc-FR-POXYY2M6-D5HmBPnC.js +8 -0
- package/dist/frontend/assets/ordinal-Cboi1Yqb.js +1 -0
- package/dist/frontend/assets/pa-IN-N4M65BXN-BHYM0tZp.js +4 -0
- package/dist/frontend/assets/path-CbwjOpE9.js +1 -0
- package/dist/frontend/assets/pegDiagram-XKGWAZYB-BL0-JiYs.js +1 -0
- package/dist/frontend/assets/pica-CHpl3DYP.js +7 -0
- package/dist/frontend/assets/pie-b97pL0mM.js +1 -0
- package/dist/frontend/assets/pieDiagram-421022e6-DiRybrxD.js +35 -0
- package/dist/frontend/assets/pieDiagram-E7YTZNPT-VybkpWmu.js +39 -0
- package/dist/frontend/assets/pl-PL-T2D74RX3-uZIVDHgu.js +9 -0
- package/dist/frontend/assets/pt-BR-5N22H2LF-dJVfhAeV.js +9 -0
- package/dist/frontend/assets/pt-PT-UZXXM6DQ-DjJzcznP.js +9 -0
- package/dist/frontend/assets/quadrantDiagram-0957ecba-BHJpECv1.js +7 -0
- package/dist/frontend/assets/quadrantDiagram-AXDQQJYC-RAG8nSkZ.js +7 -0
- package/dist/frontend/assets/railroadDiagram-O6MQD6OU-lCMtporN.js +1 -0
- package/dist/frontend/assets/requirementDiagram-23d650b8-mSFTWSrD.js +52 -0
- package/dist/frontend/assets/requirementDiagram-EFPCY7ZU-B8YnTqPO.js +84 -0
- package/dist/frontend/assets/ro-RO-JPDTUUEW-B5X8VOmp.js +11 -0
- package/dist/frontend/assets/roundRect-0PYZxl1G.js +1 -0
- package/dist/frontend/assets/ru-RU-B4JR7IUQ-Czv9kfuz.js +9 -0
- package/dist/frontend/assets/sankeyDiagram-23345273-B3g3P-D1.js +8 -0
- package/dist/frontend/assets/sankeyDiagram-P5KCCOFB-DRm9HHoQ.js +40 -0
- package/dist/frontend/assets/sankeyLinkHorizontal-CgO6js3K.js +1 -0
- package/dist/frontend/assets/sequenceDiagram-17ac3bff-DzZiSttS.js +122 -0
- package/dist/frontend/assets/sequenceDiagram-WJ2MYXX4-BrSDYDx-.js +162 -0
- package/dist/frontend/assets/si-LK-N5RQ5JYF-DFWOZdgD.js +1 -0
- package/dist/frontend/assets/sizeCapture-X5ZJPWSS-CbaN7yeQ.js +1 -0
- package/dist/frontend/assets/sk-SK-C5VTKIMK-B8VlFn2Z.js +6 -0
- package/dist/frontend/assets/sl-SI-NN7IZMDC-CJeSgLEg.js +6 -0
- package/dist/frontend/assets/stateDiagram-9c5f0230-Dzm1fyzw.js +1 -0
- package/dist/frontend/assets/stateDiagram-HBIQ2CUA-B5Nv-PBX.js +1 -0
- package/dist/frontend/assets/stateDiagram-v2-4QOOHH4V-B72hUL6s.js +1 -0
- package/dist/frontend/assets/stateDiagram-v2-51a3dcff-DvLAYBjA.js +1 -0
- package/dist/frontend/assets/styles-2ab5d517-D6473lhT.js +116 -0
- package/dist/frontend/assets/styles-5f03d8d2-CZ5U9u1n.js +160 -0
- package/dist/frontend/assets/styles-edf9a4b0-DzQC88FF.js +207 -0
- package/dist/frontend/assets/subset-shared.chunk.js +84 -0
- package/dist/frontend/assets/subset-worker.chunk.js +1 -0
- package/dist/frontend/assets/sv-SE-XGPEYMSR-BKMKxZWF.js +10 -0
- package/dist/frontend/assets/svgDrawCommon-3ba9043b-CQsuw6x4.js +1 -0
- package/dist/frontend/assets/swimlanes-XN3QIQJK-D6c81JTS.js +1 -0
- package/dist/frontend/assets/swimlanesDiagram-VK2B7HYN-SMIGSMWR.js +8 -0
- package/dist/frontend/assets/ta-IN-2NMHFXQM-BtPPl3RQ.js +9 -0
- package/dist/frontend/assets/th-TH-HPSO5L25-CSjFGi1j.js +2 -0
- package/dist/frontend/assets/timeline-definition-24CTP7MA-DTBgPsOR.js +120 -0
- package/dist/frontend/assets/timeline-definition-7e6b55e7-D44e8lHF.js +61 -0
- package/dist/frontend/assets/tr-TR-DEFEU3FU-BS1kZ0-G.js +7 -0
- package/dist/frontend/assets/uk-UA-QMV73CPH--ucRdDwc.js +6 -0
- package/dist/frontend/assets/union-DI_iry4-.js +1 -0
- package/dist/frontend/assets/vennDiagram-4TSXK5OY-DDIUJU_f.js +34 -0
- package/dist/frontend/assets/vi-VN-M7AON7JQ-BcGYkPOn.js +5 -0
- package/dist/frontend/assets/wardleyDiagram-VM6X3IG4-TfvrOirV.js +78 -0
- package/dist/frontend/assets/xychartDiagram-S5SC5T6Z-DaSdOJbv.js +7 -0
- package/dist/frontend/assets/xychartDiagram-b6496bcd-VIsyqEG1.js +7 -0
- package/dist/frontend/assets/zh-CN-LNUGB5OW-RL4CyEYU.js +10 -0
- package/dist/frontend/assets/zh-HK-E62DVLB3-DKGVR3J1.js +1 -0
- package/dist/frontend/assets/zh-TW-RAJ6MFWO-C7djgh-M.js +9 -0
- package/dist/frontend/assets/zipObject-Bl99JdSU.js +1 -0
- package/dist/frontend/index.html +569 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +74 -0
- package/dist/index.js.map +1 -0
- package/dist/render/excalidraw-node.mjs +540 -0
- package/dist/server.d.ts +5 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +1684 -0
- package/dist/server.js.map +1 -0
- package/dist/types.d.ts +263 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +49 -0
- package/dist/types.js.map +1 -0
- package/dist/utils/logger.d.ts +4 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +63 -0
- package/dist/utils/logger.js.map +1 -0
- package/package.json +127 -4
- package/skills/excalidraw-skill/SKILL.md +331 -0
- package/skills/excalidraw-skill/evals/evals.json +35 -0
- package/skills/excalidraw-skill/references/cheatsheet.md +217 -0
- package/src/ai/config.ts +58 -0
- package/src/ai/providers/anthropic.ts +62 -0
- package/src/ai/providers/openai-compatible.ts +84 -0
- package/src/ai/request-settings.ts +50 -0
- package/src/ai/routes.ts +157 -0
- package/src/ai/runner.ts +80 -0
- package/src/ai/sse.ts +40 -0
- package/src/ai/system.ts +16 -0
- package/src/ai/tools.ts +130 -0
- package/src/ai/types.ts +48 -0
- package/src/bin.ts +56 -0
- package/src/cli/args.ts +97 -0
- package/src/cli/commands/ai.ts +40 -0
- package/src/cli/commands/arrange.ts +112 -0
- package/src/cli/commands/canvases.ts +37 -0
- package/src/cli/commands/check.ts +15 -0
- package/src/cli/commands/comment.ts +72 -0
- package/src/cli/commands/elements.ts +299 -0
- package/src/cli/commands/frame.ts +55 -0
- package/src/cli/commands/install-skill.ts +116 -0
- package/src/cli/commands/layout.ts +14 -0
- package/src/cli/commands/render.ts +68 -0
- package/src/cli/commands/scene.ts +168 -0
- package/src/cli/commands/server.ts +71 -0
- package/src/cli/commands/snapshot.ts +45 -0
- package/src/cli/image-options.ts +77 -0
- package/src/cli/run.ts +123 -0
- package/src/cli/util.ts +39 -0
- package/src/core/arrow-routing.ts +256 -0
- package/src/core/bulk-ops.ts +183 -0
- package/src/core/canvas-client.ts +525 -0
- package/src/core/canvas-id.ts +8 -0
- package/src/core/canvas-persistence.ts +1067 -0
- package/src/core/canvas-registry.ts +180 -0
- package/src/core/canvas-routes.ts +34 -0
- package/src/core/canvas-state.ts +37 -0
- package/src/core/canvas.ts +18 -0
- package/src/core/comment-ops.ts +36 -0
- package/src/core/comments.ts +142 -0
- package/src/core/compact.ts +21 -0
- package/src/core/config.ts +24 -0
- package/src/core/describe.ts +100 -0
- package/src/core/design-guide.ts +114 -0
- package/src/core/diagram-layout.ts +278 -0
- package/src/core/diagram-ops.ts +48 -0
- package/src/core/entry.ts +37 -0
- package/src/core/expand-elements.ts +316 -0
- package/src/core/frame-ops.ts +112 -0
- package/src/core/frames.ts +113 -0
- package/src/core/geometry.ts +213 -0
- package/src/core/layout-check.ts +200 -0
- package/src/core/local-origin.ts +27 -0
- package/src/core/mcp-dispatch.ts +858 -0
- package/src/core/mcp-http.ts +38 -0
- package/src/core/mcp-server.ts +72 -0
- package/src/core/mcp-tools.ts +725 -0
- package/src/core/normalize.ts +158 -0
- package/src/core/obsidian-md.ts +231 -0
- package/src/core/pidfile.ts +52 -0
- package/src/core/png-scene.ts +177 -0
- package/src/core/render/excalidraw-node/dom.ts +159 -0
- package/src/core/render/excalidraw-node/index.ts +100 -0
- package/src/core/render/fonts.ts +173 -0
- package/src/core/render/index.ts +198 -0
- package/src/core/render/png-worker.ts +75 -0
- package/src/core/render/png.ts +148 -0
- package/src/core/render/text-metrics.ts +141 -0
- package/src/core/request-canvas.ts +10 -0
- package/src/core/request-headers.ts +79 -0
- package/src/core/scene-input.ts +11 -0
- package/src/core/scene-io.ts +125 -0
- package/src/core/share-url.ts +99 -0
- package/src/core/spawn.ts +186 -0
- package/src/core/version.ts +13 -0
- package/src/index.ts +86 -0
- package/src/server.ts +1873 -0
- package/src/types.ts +384 -0
- package/src/utils/logger.ts +77 -0
|
@@ -0,0 +1,320 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/sizeCapture-X5ZJPWSS-CbaN7yeQ.js","assets/index-fTyH8AV3.js","assets/index-BcAUh2Nm.css","assets/line-V0o6yOnB.js","assets/array-BKyUJesY.js","assets/path-CbwjOpE9.js","assets/union-DI_iry4-.js","assets/dagre-3AP2YEHR-v8EtxNwx.js","assets/layout-chXYHUIV.js","assets/zipObject-Bl99JdSU.js","assets/has-D7z5cd7K.js","assets/swimlanes-XN3QIQJK-D6c81JTS.js","assets/cose-bilkent-JH36ORCC-C4ZX1Xvi.js","assets/cytoscape.esm-BjAbmLdb.js","assets/cytoscape-cose-bilkent-D4yGolDn.js","assets/c4Diagram-UCG6FXSJ-Dh883fAO.js","assets/chunk-F27PBJKO-BHNc-edD.js","assets/flowDiagram-A5DVABFB-CCBuG42p.js","assets/chunk-5VM5RSS4-CyLfaWw7.js","assets/chunk-XXDRQBXY-DQLro-7R.js","assets/chunk-POPQ4Y6H-CaHDxqyV.js","assets/channel-DYvM7vRx.js","assets/swimlanesDiagram-VK2B7HYN-SMIGSMWR.js","assets/erDiagram-SSCWMZ5O-BfDW8Lxf.js","assets/gitGraphDiagram-WWUBYQGX-Ge5QWjv2.js","assets/chunk-2Q5K7J3B-DaFhLtFc.js","assets/chunk-JWPE2WC7-7twsn51D.js","assets/cynefin-OW5HDTMX-B8XT9png.js","assets/ganttDiagram-EL5Y4UJY-B8CXkutd.js","assets/advancedFormat-DE2dNp0u.js","assets/linear-BvV3B0Vg.js","assets/init-Gi6I4Gst.js","assets/defaultLocale-C4B-KCzX.js","assets/infoDiagram-RXCK75RN-CNm06Rxs.js","assets/pieDiagram-E7YTZNPT-VybkpWmu.js","assets/arc--vhPzIZC.js","assets/ordinal-Cboi1Yqb.js","assets/pie-b97pL0mM.js","assets/quadrantDiagram-AXDQQJYC-RAG8nSkZ.js","assets/xychartDiagram-S5SC5T6Z-DaSdOJbv.js","assets/band-dPffDWoQ.js","assets/requirementDiagram-EFPCY7ZU-B8YnTqPO.js","assets/sequenceDiagram-WJ2MYXX4-BrSDYDx-.js","assets/classDiagram-DTDB5LWJ-Dpwx6IJK.js","assets/chunk-LCL6LL3I-BTwZuXJ6.js","assets/classDiagram-v2-JRS7N3AN-Dpwx6IJK.js","assets/stateDiagram-HBIQ2CUA-B5Nv-PBX.js","assets/chunk-G27WJ6UU-BBKiZxqf.js","assets/stateDiagram-v2-4QOOHH4V-B72hUL6s.js","assets/journeyDiagram-EYS64GPL-ByZmvOcj.js","assets/timeline-definition-24CTP7MA-DTBgPsOR.js","assets/mindmap-definition-FBJOCRG2-z4KcwRlx.js","assets/kanban-definition-3QL26DDD-Y5ylzca9.js","assets/sankeyDiagram-P5KCCOFB-DRm9HHoQ.js","assets/sankeyLinkHorizontal-CgO6js3K.js","assets/Tableau10-CvOaoHrI.js","assets/diagram-Z3DM3KII-hUxSr-QT.js","assets/diagram-UQ7AKVKN-DIfzNs7s.js","assets/blockDiagram-NRAW4CY4-CxaW-TzC.js","assets/diagram-S7CK7UJ4-BiwOlZBI.js","assets/architectureDiagram-5GKGNRK7-aHYJQElw.js","assets/diagram-VSXAHHWV-kKkEHy5z.js","assets/ishikawaDiagram-5VMMS53U-DoLWy3n2.js","assets/vennDiagram-4TSXK5OY-DDIUJU_f.js","assets/diagram-VX7I27RA-zTp2qGKo.js","assets/wardleyDiagram-VM6X3IG4-TfvrOirV.js","assets/cynefinDiagram-5FMLGOSQ-COTZjqlj.js","assets/railroadDiagram-O6MQD6OU-lCMtporN.js","assets/chunk-SVP7TREG-B8-zByXy.js","assets/ebnfDiagram-PWID7BFC-CRwXBVzS.js","assets/abnfDiagram-VCTEODGH-CO_aNPe5.js","assets/pegDiagram-XKGWAZYB-BL0-JiYs.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var im=Object.defineProperty;var sm=(e,t,r)=>t in e?im(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Kt=(e,t,r)=>sm(e,typeof t!="symbol"?t+"":t,r);import{b9 as om,ba as am,F as nm,bb as k,bc as _,ab as z,aa as W,a9 as Ge,ac as Dr,bd as Pt,d as Dt,be as zc,bf as Hc,bg as Yc,bh as jc,bi as Uc,bj as Xc,bk as lm,a6 as Ds,bl as Gc,bm as hm,bn as cm,bo as Vc,bp as dm,bq as um,br as gm,bs as Kc,bt as Zc,bu as pm,bv as fm,y as Sa,ad as Qc,aZ as Jc,t as bs,v as Al,x as El,bw as mm,bx as ym,by as Cm,bz as _l,bA as xm,bB as bm,bC as km,bD as Sm,bE as Tm}from"./index-fTyH8AV3.js";import{l as wm}from"./line-V0o6yOnB.js";import{k as Zr,f as ks,a as vr,i as ei,u as Bm,v as Ao,r as Lm}from"./union-DI_iry4-.js";function vm(e){var t=om(e);return function(r,i,s,o){for(var a="",n=0;n<t;n++)a+=e[n](r,i,s,o)||"";return a}}const as=20,Am={rect:"rectangle",circle:"ellipse"},Ss={startOnLoad:!1,flowchart:{curve:"linear"},themeVariables:{fontSize:`${as}px`},maxEdges:500,maxTextSize:5e4};class vi{constructor({converter:t}){this.convert=(r,i)=>this.converter(r,{...i,fontSize:i.fontSize||as}),this.converter=t}}var kr;(function(e){e.ROUND="round",e.STADIUM="stadium",e.DOUBLECIRCLE="doublecircle",e.CIRCLE="circle",e.DIAMOND="diamond",e.CYLINDER="cylinder"})(kr||(kr={}));var we;(function(e){e.COLOR="color"})(we||(we={}));var Ut;(function(e){e.FILL="fill",e.STROKE="stroke",e.STROKE_WIDTH="stroke-width",e.STROKE_DASHARRAY="stroke-dasharray"})(Ut||(Ut={}));const Em={arrow_circle:{endArrowhead:"circle"},arrow_cross:{endArrowhead:"bar"},arrow_open:{endArrowhead:null,startArrowhead:null},double_arrow_circle:{endArrowhead:"circle",startArrowhead:"circle"},double_arrow_cross:{endArrowhead:"bar",startArrowhead:"bar"},double_arrow_point:{endArrowhead:"arrow",startArrowhead:"arrow"}},_m=e=>Em[e],Eo=e=>{let t=e.text;return e.labelType==="markdown"&&(t=am.removeMarkdown(e.text)),Fm(t)},Fm=e=>{const t=/\s?(fa|fab):[a-zA-Z0-9-]+/g;return e.replace(t,"")},es=e=>{const t={};return Object.keys(e).forEach(r=>{var i;switch(r){case Ut.FILL:{t.backgroundColor=e[r],t.fillStyle="solid";break}case Ut.STROKE:{t.strokeColor=e[r];break}case Ut.STROKE_WIDTH:{t.strokeWidth=Number((i=e[r])==null?void 0:i.split("px")[0]);break}case Ut.STROKE_DASHARRAY:{t.strokeStyle="dashed";break}}}),t},Ta=e=>{const t={};return Object.keys(e).forEach(r=>{switch(r){case we.COLOR:{t.strokeColor=e[r];break}}}),t},Mm=(e,t)=>[e,t],Om=32,td=.62,Im=12,Dm=12,ed=(e,t)=>Math.max(20,Math.ceil(e.length*t*td)),Rm=(e,t,r,i)=>{const s=i||as;if(e!==kr.CYLINDER||!t||t.includes(`
|
|
3
|
+
`))return s;const o=Math.max(20,r-Im);return ed(t,s)<=o?s:Math.max(Dm,Math.floor(o/(t.length*td)))},Pm=e=>{const t={};e.subGraphs.map(i=>{i.nodeIds.forEach(s=>{t[i.id]={id:i.id,parent:null,isLeaf:!1},t[s]={id:s,parent:i.id,isLeaf:e.vertices[s]!==void 0}})});const r={};return[...Object.keys(e.vertices),...e.subGraphs.map(i=>i.id)].forEach(i=>{if(!t[i])return;let s=t[i];const o=[];for(s.isLeaf||o.push(`subgraph_group_${s.id}`);s.parent;)o.push(`subgraph_group_${s.parent}`),s=t[s.parent];r[i]=o}),{getGroupIds:i=>r[i]||[],getParentId:i=>t[i]?t[i].parent:null}},$m=new vi({converter:(e,t)=>{const r=[],i=t.fontSize,{getGroupIds:s,getParentId:o}=Pm(e);return e.subGraphs.reverse().forEach(a=>{const n=s(a.id),l=Eo(a),d=ed(l,i||16)+Om*2,u=Math.max(a.width,d),g=a.x-(u-a.width)/2,p=es(a.containerStyle),C=Ta(a.labelStyle),x={id:a.id,type:"rectangle",groupIds:n,x:g,y:a.y,width:u,height:a.height,label:{groupIds:n,text:l,fontSize:i,verticalAlign:"top",...C},...p};r.push(x)}),Object.values(e.vertices).forEach(a=>{if(!a)return;const n=s(a.id),l=Eo(a),c=Rm(a.type,l,a.width,i),h=es(a.containerStyle),d=Ta(a.labelStyle);let u={id:a.id,type:"rectangle",groupIds:n,x:a.x,y:a.y,width:a.width,height:a.height,strokeWidth:2,label:{groupIds:n,text:l,fontSize:c,...d},link:a.link||null,...h};switch(a.type){case kr.STADIUM:{u={...u,roundness:{type:3}};break}case kr.ROUND:{u={...u,roundness:{type:3}};break}case kr.DOUBLECIRCLE:{n.push(`doublecircle_${a.id}}`);const p={type:"ellipse",groupIds:n,x:a.x+5,y:a.y+5,width:a.width-10,height:a.height-10,strokeWidth:2,roundness:{type:3},label:{groupIds:n,text:l,fontSize:c,...d}};u={...u,groupIds:n,type:"ellipse"},r.push(p);break}case kr.CIRCLE:{u.type="ellipse";break}case kr.DIAMOND:{u.type="diamond";break}}r.push(u)}),e.edges.forEach(a=>{let n=[];const l=o(a.start),c=o(a.end);l&&l===c&&(n=s(l));const{startX:h,startY:d,reflectionPoints:u}=a,g=u.map(S=>Mm(S.x-u[0].x,S.y-u[0].y)),p=_m(a.type||"arrow_point"),C=r.find(S=>S.id===a.start),x=r.find(S=>S.id===a.end);if(!C||!x)return;const b={id:`${a.start}_${a.end}`,type:"arrow",groupIds:n,x:h,y:d,strokeWidth:a.stroke==="thick"?4:2,strokeStyle:a.stroke==="dotted"?"dashed":void 0,points:g,...a.text?{label:{text:Eo(a),fontSize:i,groupIds:n}}:{},roundness:{type:2},...p,start:{id:C.id||""},end:{id:x.id||""}};r.push(b)}),{elements:r}}});let $e=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");const qm=new vi({converter:e=>{const t=$e(),{width:r,height:i}=e,s={type:"image",x:0,y:0,width:r,height:i,status:"saved",fileId:t};return{files:{[t]:{id:t,mimeType:e.mimeType,dataURL:e.dataURL}},elements:[s]}}}),Zi=(e,t)=>[e,t],en=e=>e.replace(/\\n/g,`
|
|
4
|
+
`),Rr=e=>{const t={type:"line",x:e.startX,y:e.startY,points:[Zi(0,0),Zi(e.endX-e.startX,e.endY-e.startY)],width:e.endX-e.startX,height:e.endY-e.startY,strokeStyle:e.strokeStyle||"solid",strokeColor:e.strokeColor||"#000",strokeWidth:e.strokeWidth||1};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),e.id&&Object.assign(t,{id:e.id}),t},Pr=e=>{const t={type:"text",x:e.x,y:e.y,width:e.width,height:e.height,text:en(e.text)||"",fontSize:e.fontSize,verticalAlign:"top",strokeColor:e.color};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),e.id&&Object.assign(t,{id:e.id}),t},oi=e=>{var s,o,a,n,l;const t={text:en(((s=e==null?void 0:e.label)==null?void 0:s.text)||""),fontSize:(o=e==null?void 0:e.label)==null?void 0:o.fontSize,textAlign:(a=e.label)==null?void 0:a.textAlign,verticalAlign:((n=e.label)==null?void 0:n.verticalAlign)||"middle",strokeColor:((l=e.label)==null?void 0:l.color)||"#000",...e.groupId?{groupIds:[e.groupId]}:{}};let r={};e.type==="rectangle"&&e.subtype==="activation"&&(r={backgroundColor:"#e9ecef",fillStyle:"solid"});const i={id:e.id,type:e.type,x:e.x,y:e.y,width:e.width,height:e.height,label:t,strokeStyle:e==null?void 0:e.strokeStyle,strokeWidth:e==null?void 0:e.strokeWidth,strokeColor:e==null?void 0:e.strokeColor,backgroundColor:e==null?void 0:e.bgColor,fillStyle:"solid",...r};return e.groupId&&Object.assign(i,{groupIds:[e.groupId]}),i},rn=e=>{var r,i,s,o;const t={type:"arrow",x:e.startX,y:e.startY,points:((r=e.points)==null?void 0:r.map(([a,n])=>Zi(a,n)))||[Zi(0,0),Zi(e.endX-e.startX,e.endY-e.startY)],width:e.endX-e.startX,height:e.endY-e.startY,strokeStyle:(e==null?void 0:e.strokeStyle)||"solid",endArrowhead:(e==null?void 0:e.endArrowhead)||null,startArrowhead:(e==null?void 0:e.startArrowhead)||null,label:{text:en(((i=e==null?void 0:e.label)==null?void 0:i.text)||""),fontSize:16,textAlign:(s=e==null?void 0:e.label)==null?void 0:s.textAlign,verticalAlign:(o=e==null?void 0:e.label)==null?void 0:o.verticalAlign},roundness:{type:2},start:e.start,end:e.end};return e.groupId&&Object.assign(t,{groupIds:[e.groupId]}),t},Ts=10,_o=16,Nm=24,Wm=4,zm=e=>{if(!e)return!0;const t=e.trim().toLowerCase();return t==="transparent"||t==="none"||t==="rgba(0,0,0,0)"||t==="rgba(0, 0, 0, 0)"},Hm=(e,t)=>Math.max(20,Math.round(e.length*t*.6)),Fl=(e,t,r=!0)=>{const i=e,s=i.groupIds??[];if(s.includes(t)||(i.groupIds=[...s,t]),!r||!i.label)return;const o=i.label.groupIds??[];o.includes(t)||(i.label.groupIds=[...o,t])},Ym=new vi({converter:e=>{const t=[],r=[];if(Object.values(e.nodes).forEach(i=>{!i||!i.length||i.forEach(s=>{let o;switch(s.type){case"line":o=Rr(s);break;case"rectangle":case"ellipse":o=oi(s);break;case"text":o=Pr(s);break;default:throw`unknown type ${s.type}`}s.type==="rectangle"&&(s==null?void 0:s.subtype)==="activation"?r.push(o):t.push(o)})}),Object.values(e.lines).forEach(i=>{i&&t.push(Rr(i))}),Object.values(e.arrows).forEach(i=>{i&&(t.push(rn(i)),i.sequenceNumber&&t.push(oi(i.sequenceNumber)))}),t.push(...r),e.loops){const{lines:i,texts:s,nodes:o}=e.loops;i.forEach(a=>{t.push(Rr(a))}),s.forEach(a=>{t.push(Pr(a))}),o.forEach(a=>{t.push(oi(a))})}return e.groups&&e.groups.forEach(i=>{const{actorKeys:s,name:o}=i;let a=1/0,n=1/0,l=0,c=0;if(!s.length)return;const h=t.filter(b=>{if(b.id){const S=b.id.indexOf("-"),w=b.id.substring(0,S);return s.includes(w)}return!1});if(!h.length||(h.forEach(b=>{b.x===void 0||b.y===void 0||b.width===void 0||b.height===void 0||(a=Math.min(a,b.x),n=Math.min(n,b.y),l=Math.max(l,b.x+b.width),c=Math.max(c,b.y+b.height))}),!Number.isFinite(a)||!Number.isFinite(n)||!Number.isFinite(l)||!Number.isFinite(c)))return;const d=a-Ts,u=n-Ts,g=l-a+Ts*2,p=c-n+Ts*2,C=$e(),x=$e(),y=oi({type:"rectangle",x:d,y:u,width:g,height:p,bgColor:zm(i.fill)?void 0:i.fill,strokeColor:"#1f1f1f",strokeWidth:1,id:C,groupId:x});if(t.unshift(y),t.forEach(b=>{b.id!==C&&(b.x===void 0||b.y===void 0||b.width===void 0||b.height===void 0||b.x>=a&&b.x+b.width<=l&&b.y>=n&&b.y+b.height<=c&&Fl(b,x))}),o){const b=Pr({id:$e(),text:o,x:d+Wm,y:u-Nm,width:Hm(o,_o),height:_o+8,fontSize:_o,color:"#1f1f1f",groupId:x});Fl(b,x,!1),t.push(b)}}),{elements:t}}}),jm=new vi({converter:e=>{const t=[];return e.nodes.forEach(r=>{!r||!r.length||r.forEach(i=>{let s;switch(i.type){case"line":s=Rr(i);break;case"rectangle":case"ellipse":s=oi(i);break;case"text":s=Pr(i);break;default:throw`unknown type ${i.type}`}t.push(s)})}),Object.values(e.lines).forEach(r=>{r&&t.push(Rr(r))}),Object.values(e.arrows).forEach(r=>{if(!r)return;const i=rn(r);t.push(i)}),Object.values(e.text).forEach(r=>{const i=Pr(r);t.push(i)}),Object.values(e.namespaces).forEach(r=>{const i=Object.keys(r.classes),s=[...i],o=[...e.lines,...e.arrows,...e.text];i.forEach(n=>{const l=o.filter(c=>c.metadata&&c.metadata.classId===n).map(c=>c.id);l.length&&s.push(...l)});const a={type:"frame",id:$e(),name:r.id,children:s};t.push(a)}),{elements:t}}}),Um=new vi({converter:e=>{const t=[];return e.nodes.forEach(r=>{!r||!r.length||r.forEach(i=>{let s;switch(i.type){case"line":s=Rr(i);break;case"rectangle":case"ellipse":s=oi(i);break;case"text":s=Pr(i);break;default:throw`unknown type ${i.type}`}t.push(s)})}),e.lines.forEach(r=>{t.push(Rr(r))}),e.arrows.forEach(r=>{t.push(rn(r))}),e.text.forEach(r=>{t.push(Pr(r))}),{elements:t}}}),zs=(e,t)=>[e,t],Yi=16,rd=14,Xm=1,wa="#000000",id=5,Gm=id*2,Vm=id*2,Km=1.25,sd=new Set(["choice","fork","join","stateStart","stateEnd","divider"]),Ba=e=>e.shape==="stateEnd"?[`state_end_group_${e.id}`]:void 0,od=e=>e.shape==="rectWithTitle"&&e.description.length?[e.text,...e.description].join(`
|
|
5
|
+
`):e.text;let Ar;const Zm=()=>{if(Ar!==void 0)return Ar;if(typeof document>"u")return Ar=null,Ar;try{Ar=document.createElement("canvas").getContext("2d")}catch{Ar=null}return Ar},Ti=(e,t)=>{const r=Zm();return r?(r.font=`${t}px Excalifont, sans-serif`,r.measureText(e).width):e.length*t*.6},Qm=(e,t,r)=>{if(Ti(e,t)<=r)return[e];const i=[];let s="";for(const o of e){const a=`${s}${o}`;if(s&&Ti(a,t)>r){i.push(s),s=o;continue}s=a}return s&&i.push(s),i},Jm=(e,t,r)=>{if(!e.trim()||Ti(e,t)<=r)return e;const i=e.split(/\s+/).filter(Boolean),s=[];let o="";for(const a of i){const n=Qm(a,t,r);for(const[l,c]of n.entries()){const d=o?`${o}${o&&l===0?" ":""}${c}`:c;if(Ti(d,t)<=r){o=d;continue}o&&s.push(o),o=c}n.length>1}return s.push(o),s.join(`
|
|
6
|
+
`)},ty=(e,t,r)=>{const s=e.map(n=>Jm(n,t,r)).join(`
|
|
7
|
+
`).split(`
|
|
8
|
+
`),o=Math.max(...s.map(n=>Ti(n,t))),a=s.length*t*Km;return{width:o,height:a}},ey=(e,t,r,i)=>{const s=e.split(`
|
|
9
|
+
`);for(let o=Yi;o>=rd;o-=Xm){const{height:a}=ty(s,o,t);if(a<=r)return o}return i},ry=e=>{const t=od(e);if(!t||sd.has(e.shape))return Yi;const r=Math.max(1,e.width-Gm),i=Math.max(1,e.height-Vm),s=t.split(`
|
|
10
|
+
`);return s.length>1&&Math.max(...s.map(a=>Ti(a,Yi)))<=r?Yi:ey(t,r,i,s.length===1?Yi:rd)},iy=e=>{if(sd.has(e.shape))return;const t=od(e);if(t)return{text:t,fontSize:ry(e),verticalAlign:e.shape==="rectWithTitle"||e.shape==="roundedWithTitle"?"top":"middle",...Ta(e.labelStyle)}},sy=e=>{const t=es(e.containerStyle),r=iy(e),i=e.shape==="choice"?"diamond":e.shape==="stateStart"||e.shape==="stateEnd"?"ellipse":"rectangle",s=e.shape==="rect"||e.shape==="rectWithTitle"||e.shape==="roundedWithTitle",o=e.shape==="stateStart"||e.shape==="fork"||e.shape==="join",a=t.backgroundColor||t.strokeColor||wa,n=t.strokeColor||t.backgroundColor||wa;return{id:e.id,type:i,...Ba(e)?{groupIds:Ba(e)}:{},x:e.x,y:e.y,width:e.width,height:e.height,...r?{label:r}:{},...t,...s?{roundness:{type:3}}:{},...o?{backgroundColor:a,strokeColor:n,fillStyle:"solid"}:{}}},oy=e=>{if(!e.dividerLine)return null;const t=es(e.containerStyle);return{id:`${e.id}__divider`,type:"line",x:e.dividerLine.startX,y:e.dividerLine.startY,width:e.dividerLine.endX-e.dividerLine.startX,height:e.dividerLine.endY-e.dividerLine.startY,points:[zs(0,0),zs(e.dividerLine.endX-e.dividerLine.startX,e.dividerLine.endY-e.dividerLine.startY)],strokeColor:t.strokeColor||"#000",strokeWidth:t.strokeWidth||1}},ay=e=>{const t=es(e.containerStyle),r=Math.max(2,Math.min(e.width,e.height)*.32),i=e.endInnerColor||t.strokeColor||t.backgroundColor||wa;return{id:`${e.id}__inner`,type:"ellipse",groupIds:Ba(e),x:e.x+r,y:e.y+r,width:Math.max(1,e.width-r*2),height:Math.max(1,e.height-r*2),backgroundColor:i,strokeColor:i,fillStyle:"solid",strokeWidth:1}},ny=e=>{const t=e.reflectionPoints.map((r,i,s)=>{const o=s[0];return i===0?zs(0,0):zs(r.x-o.x,r.y-o.y)});return{id:e.id,type:"arrow",x:e.startX,y:e.startY,width:e.endX-e.startX,height:e.endY-e.startY,points:t,strokeColor:e.strokeColor||"#000",strokeWidth:e.strokeWidth||2,strokeStyle:e.strokeStyle||"solid",endArrowhead:e.isNoteEdge?null:"triangle",roundness:{type:2},start:{id:e.start},end:{id:e.end},...e.text?{label:{text:e.text,fontSize:16}}:{}}},ly=new vi({converter:e=>{const t=[];return e.nodes.forEach(r=>{if(!r.isRenderable)return;const i=sy(r);t.push(i);const s=oy(r);s&&t.push(s),r.shape==="stateEnd"&&t.push(ay(r))}),e.edges.forEach(r=>{t.push(ny(r))}),{elements:t}}}),Fe=e=>{e=cy(e);const t=e.replace(/#(\d+);/g,"&#$1;").replace(/#([a-z]+);/g,"&$1;"),r=document.createElement("textarea");return r.innerHTML=t,r.value},$r=e=>{const t=e.getAttribute("transform"),r=t==null?void 0:t.match(/translate\(([ \d.-]+),\s*([\d.-]+)\)/);let i=0,s=0;return r&&(i=Number(r[1]),s=Number(r[2])),{transformX:i,transformY:s}},hy=e=>{let t=e;return t=t.replace(/style.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),t=t.replace(/classDef.*:\S*#.*;/g,r=>r.substring(0,r.length-1)),t=t.replace(/#\w+;/g,r=>{const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?`fl°°${i}¶ß`:`fl°${i}¶ß`}),t},cy=function(e){return e.replace(/fl°°/g,"#").replace(/fl°/g,"&").replace(/¶ß/g,";")},dy=.5,sn=(e,t=dy)=>{const r=[];return e.forEach(i=>{const s=r[r.length-1];if(!s){r.push(i);return}Math.hypot(i[0]-s[0],i[1]-s[1])<=t||r.push(i)}),r},on=e=>{const t=e.getAttribute("d");if(!t)return null;const r=Array.from(t.matchAll(/-?\d*\.?\d+(?:e[-+]?\d+)?/gi),i=>Number(i[0]));return r.length<4?null:{startX:r[0],startY:r[1],endX:r[r.length-2],endY:r[r.length-1]}},ad=e=>{const t=e.getAttribute("data-points");if(!t){const r=on(e);return r?[{x:r.startX,y:r.startY},{x:r.endX,y:r.endY}]:[]}try{const r=atob(t),i=JSON.parse(r);return Array.isArray(i)?i.filter(s=>s&&typeof s.x=="number"&&typeof s.y=="number"&&Number.isFinite(s.x)&&Number.isFinite(s.y)):[]}catch{return[]}},nd=(e,t={x:0,y:0},r="LM")=>{if(e.tagName.toLowerCase()!=="path")throw new Error(`Invalid input: Expected an HTMLElement of tag "path", got ${e.tagName}`);const i=e.getAttribute("d");if(!i)throw new Error('Path element does not contain a "d" attribute');const s=i.split(new RegExp(`(?=[${r}])`)),o=s[0].substring(1).split(",").map(l=>parseFloat(l)),a=s[s.length-1].substring(1).split(",").map(l=>parseFloat(l)),n=s.map(l=>{const c=l[0],h=l.substring(1).split(",").map(d=>parseFloat(d));return c==="C"?{x:h[4],y:h[5],command:c}:{x:h[0],y:h[1],command:c}}).filter((l,c,h)=>{if(c===0||c===h.length-1)return!0;if(l.x===h[c-1].x&&l.y===h[c-1].y||c===h.length-2&&l.command==="C")return!1;if(c===h.length-2&&(h[c-1].x===l.x||h[c-1].y===l.y)){const d=h[h.length-1];return Math.hypot(d.x-l.x,d.y-l.y)>20}return l.x!==h[c-1].x||l.y!==h[c-1].y}).map(l=>({x:l.x+t.x,y:l.y+t.y}));return{startX:o[0]+t.x,startY:o[1]+t.y,endX:a[0]+t.x,endY:a[1]+t.y,reflectionPoints:n}},uy=e=>({...e,elements:e.elements.map(t=>{if(!("points"in t)||!Array.isArray(t.points))return t;const r=t.points;if(r.length<2)return t;const i=sn(r);return i.length===r.length?t:{...t,points:i}})}),gy=(e,t={})=>{const r=(()=>{switch(e.type){case"graphImage":return qm.convert(e,t);case"flowchart":return $m.convert(e,t);case"sequence":return Ym.convert(e,t);case"class":return jm.convert(e,t);case"erd":return Um.convert(e,t);case"state":return ly.convert(e,t);default:throw new Error(`graphToExcalidraw: unknown graph type "${e.type}, only flowcharts are supported!"`)}})();return uy(r)};var ld=Object.defineProperty,f=(e,t)=>ld(e,"name",{value:t,configurable:!0}),py=(e,t)=>{for(var r in t)ld(e,r,{get:t[r],enumerable:!0})},cr={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},R={trace:f((...e)=>{},"trace"),debug:f((...e)=>{},"debug"),info:f((...e)=>{},"info"),warn:f((...e)=>{},"warn"),error:f((...e)=>{},"error"),fatal:f((...e)=>{},"fatal")},an=f(function(e="fatal"){let t=cr.fatal;typeof e=="string"?e.toLowerCase()in cr&&(t=cr[e]):typeof e=="number"&&(t=e),R.trace=()=>{},R.debug=()=>{},R.info=()=>{},R.warn=()=>{},R.error=()=>{},R.fatal=()=>{},t<=cr.fatal&&(R.fatal=console.error?console.error.bind(console,Pe("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Pe("FATAL"))),t<=cr.error&&(R.error=console.error?console.error.bind(console,Pe("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Pe("ERROR"))),t<=cr.warn&&(R.warn=console.warn?console.warn.bind(console,Pe("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Pe("WARN"))),t<=cr.info&&(R.info=console.info?console.info.bind(console,Pe("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Pe("INFO"))),t<=cr.debug&&(R.debug=console.debug?console.debug.bind(console,Pe("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pe("DEBUG"))),t<=cr.trace&&(R.trace=console.debug?console.debug.bind(console,Pe("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Pe("TRACE")))},"setLogLevel"),Pe=f(e=>`%c${nm().format("ss.SSS")} : ${e} : `,"format");/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */function Ml(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,i=Array(t);r<t;r++)i[r]=e[r];return i}function fy(e){if(Array.isArray(e))return e}function my(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var i,s,o,a,n=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,t!==0)for(;!(l=(i=o.call(r)).done)&&(n.push(i.value),n.length!==t);l=!0);}catch(h){c=!0,s=h}finally{try{if(!l&&r.return!=null&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return n}}function yy(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
11
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Cy(e,t){return fy(e)||my(e,t)||xy(e,t)||yy()}function xy(e,t){if(e){if(typeof e=="string")return Ml(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ml(e,t):void 0}}const hd=Object.entries,Ol=Object.setPrototypeOf,by=Object.isFrozen,ky=Object.getPrototypeOf,Sy=Object.getOwnPropertyDescriptor;let le=Object.freeze,ce=Object.seal,ri=Object.create,cd=typeof Reflect<"u"&&Reflect,La=cd.apply,va=cd.construct;le||(le=function(t){return t});ce||(ce=function(t){return t});La||(La=function(t,r){for(var i=arguments.length,s=new Array(i>2?i-2:0),o=2;o<i;o++)s[o-2]=arguments[o];return t.apply(r,s)});va||(va=function(t){for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return new t(...i)});const Mr=ae(Array.prototype.forEach),Ty=ae(Array.prototype.lastIndexOf),Il=ae(Array.prototype.pop),Di=ae(Array.prototype.push),wy=ae(Array.prototype.splice),ni=Array.isArray,ji=ae(String.prototype.toLowerCase),Fo=ae(String.prototype.toString),Dl=ae(String.prototype.match),Ri=ae(String.prototype.replace),Rl=ae(String.prototype.indexOf),By=ae(String.prototype.trim),Ly=ae(Number.prototype.toString),vy=ae(Boolean.prototype.toString),Pl=typeof BigInt>"u"?null:ae(BigInt.prototype.toString),$l=typeof Symbol>"u"?null:ae(Symbol.prototype.toString),Ee=ae(Object.prototype.hasOwnProperty),Pi=ae(Object.prototype.toString),pe=ae(RegExp.prototype.test),Er=Ay(TypeError);function ae(e){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),s=1;s<r;s++)i[s-1]=arguments[s];return La(e,t,i)}}function Ay(e){return function(){for(var t=arguments.length,r=new Array(t),i=0;i<t;i++)r[i]=arguments[i];return va(e,r)}}function jt(e,t){let r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:ji;if(Ol&&Ol(e,null),!ni(t))return e;let i=t.length;for(;i--;){let s=t[i];if(typeof s=="string"){const o=r(s);o!==s&&(by(t)||(t[i]=o),s=o)}e[s]=!0}return e}function Ey(e){for(let t=0;t<e.length;t++)Ee(e,t)||(e[t]=null);return e}function De(e){const t=ri(null);for(const i of hd(e)){var r=Cy(i,2);const s=r[0],o=r[1];Ee(e,s)&&(ni(o)?t[s]=Ey(o):o&&typeof o=="object"&&o.constructor===Object?t[s]=De(o):t[s]=o)}return t}function _y(e){switch(typeof e){case"string":return e;case"number":return Ly(e);case"boolean":return vy(e);case"bigint":return Pl?Pl(e):"0";case"symbol":return $l?$l(e):"Symbol()";case"undefined":return Pi(e);case"function":case"object":{if(e===null)return Pi(e);const t=e,r=Ye(t,"toString");if(typeof r=="function"){const i=r(t);return typeof i=="string"?i:Pi(i)}return Pi(e)}default:return Pi(e)}}function Ye(e,t){for(;e!==null;){const i=Sy(e,t);if(i){if(i.get)return ae(i.get);if(typeof i.value=="function")return ae(i.value)}e=ky(e)}function r(){return null}return r}function Fy(e){try{return pe(e,""),!0}catch{return!1}}const ql=le(["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"]),Mo=le(["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"]),Oo=le(["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"]),My=le(["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"]),Io=le(["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"]),Oy=le(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Nl=le(["#text"]),Wl=le(["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"]),Do=le(["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","pointer-events","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","vector-effect","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"]),zl=le(["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"]),ws=le(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Iy=ce(/{{[\w\W]*|^[\w\W]*}}/g),Dy=ce(/<%[\w\W]*|^[\w\W]*%>/g),Ry=ce(/\${[\w\W]*/g),Py=ce(/^data-[\-\w.\u00B7-\uFFFF]+$/),$y=ce(/^aria-[\-\w]+$/),Hl=ce(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),qy=ce(/^(?:\w+script|data):/i),Ny=ce(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Wy=ce(/^html$/i),zy=ce(/^[a-z][.\w]*(-[.\w]+)+$/i),Yl=ce(/<[/\w!]/g),jl=ce(/<[/\w]/g),Hy=ce(/<\/no(script|embed|frames)/i),Yy=ce(/\/>/i),Oe={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,processingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},dd=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],jy=le(jt({},dd)),Uy=(function(){const e={};return Mr(dd,t=>{e[t]=ce(new RegExp("</"+t+"(?=[\\t\\n\\f\\r />])","i"))}),le(e)})(),Xy=function(){return typeof window>"u"?null:window},Gy=function(t,r){if(typeof t!="object"||typeof t.createPolicy!="function")return null;let i=null;const s="data-tt-policy-suffix";r&&r.hasAttribute(s)&&(i=r.getAttribute(s));const o="dompurify"+(i?"#"+i:"");try{return t.createPolicy(o,{createHTML(a){return a},createScriptURL(a){return a}})}catch{return console.warn("TrustedTypes policy "+o+" could not be created."),null}},Ul=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},xr=function(t,r,i,s){return Ee(t,r)&&ni(t[r])?jt(s.base?De(s.base):{},t[r],s.transform):i},Ro=function(t,r,i){const s=Ee(t,r)?t[r]:void 0;return s&&typeof s=="object"?De(s):i()};function ud(){let e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Xy();const t=ot=>ud(ot);if(t.version="3.4.14",t.removed=[],!e||!e.document||e.document.nodeType!==Oe.document||!e.Element)return t.isSupported=!1,t;let r=e.document;const i=r,s=i.currentScript;e.DocumentFragment;const o=e.HTMLTemplateElement,a=e.Node,n=e.Element,l=e.NodeFilter,c=e.NamedNodeMap;c===void 0&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const h=e.DOMParser,d=e.trustedTypes,u=n.prototype,g=Ye(u,"cloneNode"),p=Ye(u,"remove"),C=Ye(u,"nextSibling"),x=Ye(u,"childNodes"),y=Ye(u,"parentNode"),b=Ye(u,"shadowRoot"),S=Ye(u,"attributes"),w=a&&a.prototype?Ye(a.prototype,"nodeType"):null,L=a&&a.prototype?Ye(a.prototype,"nodeName"):null,A=a&&a.prototype?Ye(a.prototype,"ownerDocument"):null,v=function(B){return w?w(B):B.nodeType},E=function(B){return L?L(B):B.nodeName};if(typeof o=="function"){const ot=r.createElement("template");ot.content&&ot.content.ownerDocument&&(r=ot.content.ownerDocument)}let D,q="",U,st=!1,N=0;const H=function(){if(N>0)throw Er('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.')},G=function(B){H(),N++;try{return D.createHTML(B)}finally{N--}},F=function(B){H(),N++;try{return D.createScriptURL(B)}finally{N--}},Q=function(){return st||(U=Gy(d,s),st=!0),U},$=r,Y=$.implementation,at=$.createNodeIterator,wt=$.createDocumentFragment,bt=$.getElementsByTagName,Lt=i.importNode;let nt=Ul();t.isSupported=typeof hd=="function"&&typeof y=="function"&&Y&&Y.createHTMLDocument!==void 0;const Ct=Iy,Et=Dy,_t=Ry,zt=Py,It=$y,yt=qy,xt=Ny,Rt=zy;let Wt=Hl,At=null;const P=jt({},[...ql,...Mo,...Oo,...Io,...Nl]);let ut=null;const xe=jt({},[...Wl,...Do,...zl,...ws]);let re=Object.seal(ri(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}})),He=null,lr=null;const be=Object.seal(ri(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let mr=!0,ke=!0,yr=!1,hr=!0,Se=!1,Me=!0,m=!1,M=!1,X=null,K=null,j=!1,it=!1,T=!1,I=!1,et=!0,V=!1;const Z="user-content-";let rt=!0,J=!1,ct={},ht=null;const kt=jt({},["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"]);let vt=null;const qt=jt({},["audio","video","img","source","image","track"]);let Vt=null;const Mi=jt({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ke="http://www.w3.org/1998/Math/MathML",Ze="http://www.w3.org/2000/svg",Qe="http://www.w3.org/1999/xhtml";let Gr=Qe,bo=!1,ko=null;const Wf=jt({},[Ke,Ze,Qe],Fo),gl=le(["mi","mo","mn","ms","mtext"]);let So=jt({},gl);const pl=le(["annotation-xml"]);let To=jt({},pl);const zf=jt({},["title","style","font","a","script"]);let Oi=null;const Hf=["application/xhtml+xml","text/html"],Yf="text/html";let ie=null,Vr=null;const jf=r.createElement("form"),fl=function(B){return B instanceof RegExp||B instanceof Function},wo=function(){let B=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(Vr&&Vr===B)return;(!B||typeof B!="object")&&(B={}),B=De(B),Oi=Hf.indexOf(B.PARSER_MEDIA_TYPE)===-1?Yf:B.PARSER_MEDIA_TYPE,ie=Oi==="application/xhtml+xml"?Fo:ji,At=xr(B,"ALLOWED_TAGS",P,{transform:ie}),ut=xr(B,"ALLOWED_ATTR",xe,{transform:ie}),ko=xr(B,"ALLOWED_NAMESPACES",Wf,{transform:Fo}),Vt=xr(B,"ADD_URI_SAFE_ATTR",Mi,{transform:ie,base:Mi}),vt=xr(B,"ADD_DATA_URI_TAGS",qt,{transform:ie,base:qt}),ht=xr(B,"FORBID_CONTENTS",kt,{transform:ie}),He=xr(B,"FORBID_TAGS",De({}),{transform:ie}),lr=xr(B,"FORBID_ATTR",De({}),{transform:ie}),ct=Ee(B,"USE_PROFILES")?B.USE_PROFILES&&typeof B.USE_PROFILES=="object"?De(B.USE_PROFILES):B.USE_PROFILES:!1,mr=B.ALLOW_ARIA_ATTR!==!1,ke=B.ALLOW_DATA_ATTR!==!1,yr=B.ALLOW_UNKNOWN_PROTOCOLS||!1,hr=B.ALLOW_SELF_CLOSE_IN_ATTR!==!1,Se=B.SAFE_FOR_TEMPLATES||!1,Me=B.SAFE_FOR_XML!==!1,m=B.WHOLE_DOCUMENT||!1,it=B.RETURN_DOM||!1,T=B.RETURN_DOM_FRAGMENT||!1,I=B.RETURN_TRUSTED_TYPE||!1,j=B.FORCE_BODY||!1,et=B.SANITIZE_DOM!==!1,V=B.SANITIZE_NAMED_PROPS||!1,rt=B.KEEP_CONTENT!==!1,J=B.IN_PLACE||!1,Wt=Fy(B.ALLOWED_URI_REGEXP)?B.ALLOWED_URI_REGEXP:Hl,Gr=typeof B.NAMESPACE=="string"?B.NAMESPACE:Qe,So=Ro(B,"MATHML_TEXT_INTEGRATION_POINTS",()=>jt({},gl)),To=Ro(B,"HTML_INTEGRATION_POINTS",()=>jt({},pl));const O=Ro(B,"CUSTOM_ELEMENT_HANDLING",()=>ri(null));if(re=ri(null),Ee(O,"tagNameCheck")&&fl(O.tagNameCheck)&&(re.tagNameCheck=O.tagNameCheck),Ee(O,"attributeNameCheck")&&fl(O.attributeNameCheck)&&(re.attributeNameCheck=O.attributeNameCheck),Ee(O,"allowCustomizedBuiltInElements")&&typeof O.allowCustomizedBuiltInElements=="boolean"&&(re.allowCustomizedBuiltInElements=O.allowCustomizedBuiltInElements),ce(re),Se&&(ke=!1),T&&(it=!0),ct&&(At=jt({},Nl),ut=ri(null),ct.html===!0&&(jt(At,ql),jt(ut,Wl)),ct.svg===!0&&(jt(At,Mo),jt(ut,Do),jt(ut,ws)),ct.svgFilters===!0&&(jt(At,Oo),jt(ut,Do),jt(ut,ws)),ct.mathMl===!0&&(jt(At,Io),jt(ut,zl),jt(ut,ws))),be.tagCheck=null,be.attributeCheck=null,Ee(B,"ADD_TAGS")&&(typeof B.ADD_TAGS=="function"?be.tagCheck=B.ADD_TAGS:ni(B.ADD_TAGS)&&(At===P&&(At=De(At)),jt(At,B.ADD_TAGS,ie))),Ee(B,"ADD_ATTR")&&(typeof B.ADD_ATTR=="function"?be.attributeCheck=B.ADD_ATTR:ni(B.ADD_ATTR)&&(ut===xe&&(ut=De(ut)),jt(ut,B.ADD_ATTR,ie))),Ee(B,"ADD_FORBID_CONTENTS")&&ni(B.ADD_FORBID_CONTENTS)&&(ht===kt&&(ht=De(ht)),jt(ht,B.ADD_FORBID_CONTENTS,ie)),rt&&(At["#text"]=!0),m&&jt(At,["html","head","body"]),At.table&&(jt(At,["tbody"]),delete He.tbody),B.TRUSTED_TYPES_POLICY){if(typeof B.TRUSTED_TYPES_POLICY.createHTML!="function")throw Er('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if(typeof B.TRUSTED_TYPES_POLICY.createScriptURL!="function")throw Er('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const tt=D;D=B.TRUSTED_TYPES_POLICY;try{q=G("")}catch(pt){throw D=tt,pt}}else B.TRUSTED_TYPES_POLICY===null?(D=void 0,q=""):(D===void 0&&(D=Q()),D&&typeof q=="string"&&(q=G("")));le&&le(B),Vr=B},ml=jt({},[...Mo,...Oo,...My]),yl=jt({},[...Io,...Oy]),Uf=function(B,O,tt){return O.namespaceURI===Qe?B==="svg":O.namespaceURI===Ke?B==="svg"&&(tt==="annotation-xml"||So[tt]):!!ml[B]},Xf=function(B,O,tt){return O.namespaceURI===Qe?B==="math":O.namespaceURI===Ze?B==="math"&&To[tt]:!!yl[B]},Gf=function(B,O,tt){return O.namespaceURI===Ze&&!To[tt]||O.namespaceURI===Ke&&!So[tt]?!1:!yl[B]&&(zf[B]||!ml[B])},Vf=function(B){let O=y(B);(!O||!O.tagName)&&(O={namespaceURI:Gr,tagName:"template"});const tt=ji(B.tagName),pt=ji(O.tagName);return ko[B.namespaceURI]?B.namespaceURI===Ze?Uf(tt,O,pt):B.namespaceURI===Ke?Xf(tt,O,pt):B.namespaceURI===Qe?Gf(tt,O,pt):!!(Oi==="application/xhtml+xml"&&ko[B.namespaceURI]):!1},Cr=function(B){Di(t.removed,{element:B});try{y(B).removeChild(B)}catch{if(p(B),!y(B))throw Er("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},Cl=function(B,O,tt){try{B.removeAttributeNode(O)}catch{try{B.removeAttribute(tt)}catch{}}},ps=function(B){fs(B);const O=x(B);if(O){const pt=[];Mr(O,Bt=>{Di(pt,Bt)}),Mr(pt,Bt=>{try{p(Bt)}catch{}})}const tt=S(B);if(tt)for(let pt=tt.length-1;pt>=0;--pt){const Bt=tt[pt],Ot=Bt&&Bt.name;typeof Ot=="string"&&Cl(B,Bt,Ot)}},Lr=function(B,O,tt){if(!tt)try{tt=O.getAttributeNode(B)}catch{tt=null}Di(t.removed,{attribute:tt||null,from:O});try{tt?O.removeAttributeNode(tt):O.removeAttribute(B)}catch{try{O.removeAttribute(B)}catch{}}if(B==="is")if(it||T)try{Cr(O)}catch{}else try{O.setAttribute(B,"")}catch{}},Kf=function(B){const O=S(B);if(O)for(let tt=O.length-1;tt>=0;--tt){const pt=O[tt],Bt=pt&&pt.name;typeof Bt!="string"||ut[ie(Bt)]||Cl(B,pt,Bt)}},fs=function(B){const O=[B];for(;O.length>0;){const tt=O.pop();v(tt)===Oe.element&&Kf(tt);const Bt=x(tt);if(Bt)for(let Ot=Bt.length-1;Ot>=0;--Ot)O.push(Bt[Ot])}},xl=function(B,O){return Me?B==="patchsrc"?!0:B==="for"&&O!=="label"&&O!=="output":!1},Zf=function(B){if(!Me)return;const O=[B];for(;O.length>0;){const tt=O.pop(),pt=v(tt);if(pt===Oe.processingInstruction||pt===Oe.comment&&pe(jl,tt.data)){try{p(tt)}catch{}continue}if(pt===Oe.element){const Ot=tt,Zt=ie(E(tt));try{Ot.hasAttribute&&Ot.hasAttribute("patchsrc")&&Ot.removeAttribute("patchsrc"),Ot.hasAttribute&&Ot.hasAttribute("for")&&xl("for",Zt)&&Ot.removeAttribute("for")}catch{}}const Bt=x(tt);if(Bt)for(let Ot=Bt.length-1;Ot>=0;--Ot)O.push(Bt[Ot])}},bl=function(B){let O=null,tt=null;if(j)B="<remove></remove>"+B;else{const Ot=Dl(B,/^[\r\n\t ]+/);tt=Ot&&Ot[0]}Oi==="application/xhtml+xml"&&Gr===Qe&&(B='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+B+"</body></html>");const pt=D?G(B):B;if(Gr===Qe)try{O=new h().parseFromString(pt,Oi)}catch{}if(!O||!O.documentElement){O=Y.createDocument(Gr,"template",null);try{O.documentElement.innerHTML=bo?q:pt}catch{}}const Bt=O.body||O.documentElement;return B&&tt&&Bt.insertBefore(r.createTextNode(tt),Bt.childNodes[0]||null),Gr===Qe?bt.call(O,m?"html":"body")[0]:m?O.documentElement:Bt},kl=function(B){const O=A?A(B):B.ownerDocument;return at.call(O||B,B,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT|l.SHOW_PROCESSING_INSTRUCTION|l.SHOW_CDATA_SECTION,null)},ms=function(B){return B=Ri(B,Ct," "),B=Ri(B,Et," "),B=Ri(B,_t," "),B},Bo=function(B){var O;B.normalize();const tt=A?A(B):B.ownerDocument,pt=at.call(tt||B,B,l.SHOW_TEXT|l.SHOW_COMMENT|l.SHOW_CDATA_SECTION|l.SHOW_PROCESSING_INSTRUCTION,null);let Bt=pt.nextNode();for(;Bt;)Bt.data=ms(Bt.data),Bt=pt.nextNode();const Ot=(O=B.querySelectorAll)===null||O===void 0?void 0:O.call(B,"template");Ot&&Mr(Ot,Zt=>{Kr(Zt.content)&&Bo(Zt.content)})},ys=function(B){const O=L?L(B):null;return typeof O!="string"||ie(O)!=="form"?!1:typeof B.nodeName!="string"||typeof B.textContent!="string"||typeof B.removeChild!="function"||B.attributes!==S(B)||typeof B.removeAttribute!="function"||typeof B.setAttribute!="function"||typeof B.namespaceURI!="string"||typeof B.insertBefore!="function"||typeof B.hasChildNodes!="function"||B.nodeType!==w(B)||B.childNodes!==x(B)},Kr=function(B){if(!w||typeof B!="object"||B===null)return!1;try{return w(B)===Oe.documentFragment}catch{return!1}},Ii=function(B){if(!w||typeof B!="object"||B===null)return!1;try{return typeof w(B)=="number"}catch{return!1}};function Je(ot,B,O){ot.length!==0&&Mr(ot,tt=>{tt.call(t,B,O,Vr)})}const Qf=function(B,O){return!!(Me&&B.hasChildNodes()&&!Ii(B.firstElementChild)&&pe(Yl,B.textContent)&&pe(Yl,B.innerHTML)||Me&&B.namespaceURI===Qe&&jy[O]&&(Ii(B.firstElementChild)||typeof B.textContent=="string"&&pe(Uy[O],B.textContent))||B.nodeType===Oe.processingInstruction||Me&&B.nodeType===Oe.comment&&pe(jl,B.data))},Cs=function(B,O){if(B instanceof RegExp)return pe(B,O);if(B instanceof Function){for(var tt=arguments.length,pt=new Array(tt>2?tt-2:0),Bt=2;Bt<tt;Bt++)pt[Bt-2]=arguments[Bt];return!!B(O,...pt)}return!1},Jf=function(B,O,tt){if(!He[O]&&Ll(O)&&Cs(re.tagNameCheck,O))return!1;if(rt&&!ht[O]){const pt=y(B),Bt=x(B);if(Bt&&pt){const Ot=Bt.length;for(let Zt=Ot-1;Zt>=0;--Zt){const te=B===tt?g(Bt[Zt],!0):Bt[Zt];pt.insertBefore(te,C(B))}}}return Cr(B),!0},Sl=function(B,O,tt,pt){return B.length===0?O:O===tt||O===pt?De(O):O},Tl=function(B,O){return B===O||y(B)!==null?!1:(J&&fs(B),!0)},wl=function(B,O){if(Je(nt.beforeSanitizeElements,B,null),Tl(B,O))return!0;if(ys(B))return Cr(B),!0;const tt=ie(E(B));if(At=Sl(nt.uponSanitizeElement,At,P,X),Je(nt.uponSanitizeElement,B,{tagName:tt,allowedTags:At}),Tl(B,O))return!0;if(Qf(B,tt))return Cr(B),!0;if(He[tt]||!(be.tagCheck instanceof Function&&be.tagCheck(tt))&&!At[tt]){const Bt=Jf(B,tt,O);return Bt===!1&&Je(nt.afterSanitizeElements,B,null),Bt}if(v(B)===Oe.element&&!Vf(B)||(tt==="noscript"||tt==="noembed"||tt==="noframes")&&pe(Hy,B.innerHTML))return Cr(B),!0;if(Se&&B.nodeType===Oe.text){const Bt=ms(B.textContent);B.textContent!==Bt&&(Di(t.removed,{element:B.cloneNode()}),B.textContent=Bt)}return Je(nt.afterSanitizeElements,B,null),!1},Bl=function(B,O,tt){if(lr[O]||xl(O,B)||et&&(O==="id"||O==="name")&&(tt in r||tt in jf))return!1;const pt=ut[O]||be.attributeCheck instanceof Function&&be.attributeCheck(O,B);return ke&&pe(zt,O)||mr&&pe(It,O)?!0:pt?Vt[O]||pe(Wt,Ri(tt,xt,""))||(O==="src"||O==="xlink:href"||O==="href")&&B!=="script"&&Rl(tt,"data:")===0&&vt[B]||yr&&!pe(yt,Ri(tt,xt,""))?!0:!tt:Ll(B)&&Cs(re.tagNameCheck,B)&&Cs(re.attributeNameCheck,O,B)||O==="is"&&re.allowCustomizedBuiltInElements&&Cs(re.tagNameCheck,tt)},tm=jt({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Ll=function(B){return!tm[ji(B)]&&pe(Rt,B)},em=function(B,O,tt,pt){if(D&&typeof d=="object"&&typeof d.getAttributeType=="function"&&!tt)switch(d.getAttributeType(B,O)){case"TrustedHTML":return G(pt);case"TrustedScriptURL":return F(pt)}return pt},rm=function(B,O,tt,pt){try{tt?B.setAttributeNS(tt,O,pt):B.setAttribute(O,pt),ys(B)?Cr(B):Il(t.removed)}catch{Lr(O,B)}},vl=function(B){Je(nt.beforeSanitizeAttributes,B,null);const O=B.attributes;if(!O||ys(B))return;ut=Sl(nt.uponSanitizeAttribute,ut,xe,K);const tt={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut,forceKeepAttr:void 0};let pt=O.length;const Bt=ie(B.nodeName);for(;pt--;){const Ot=O[pt],Zt=Ot.name,te=Ot.namespaceURI,Le=Ot.value,ve=ie(Zt),vo=Le;let Te=Zt==="value"?vo:By(vo);if(tt.attrName=ve,tt.attrValue=Te,tt.keepAttr=!0,tt.forceKeepAttr=void 0,Je(nt.uponSanitizeAttribute,B,tt),Te=tt.attrValue,V&&(ve==="id"||ve==="name")&&Rl(Te,Z)!==0&&(Lr(Zt,B,Ot),Te=Z+Te),Me&&pe(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,Te)){Lr(Zt,B,Ot);continue}if(ve==="attributename"&&Dl(Te,"href")){Lr(Zt,B,Ot);continue}if(!tt.forceKeepAttr){if(!tt.keepAttr){Lr(Zt,B,Ot);continue}if(!hr&&pe(Yy,Te)){Lr(Zt,B,Ot);continue}if(Se&&(Te=ms(Te)),!Bl(Bt,ve,Te)){Lr(Zt,B,Ot);continue}Te=em(Bt,ve,te,Te),Te!==vo&&rm(B,Zt,te,Te)}}Je(nt.afterSanitizeAttributes,B,null)},xs=function(B){let O=null;const tt=kl(B);for(Je(nt.beforeSanitizeShadowDOM,B,null);O=tt.nextNode();)if(Je(nt.uponSanitizeShadowNode,O,null),wl(O,B),vl(O),Kr(O.content)&&xs(O.content),v(O)===Oe.element){const pt=b(O);Kr(pt)&&(Lo(pt),xs(pt))}Je(nt.afterSanitizeShadowDOM,B,null)},Lo=function(B){const O=[{node:B,shadow:null}];for(;O.length>0;){const tt=O.pop();if(tt.shadow){xs(tt.shadow);continue}const pt=tt.node,Ot=v(pt)===Oe.element,Zt=x(pt);if(Zt)for(let te=Zt.length-1;te>=0;--te)O.push({node:Zt[te],shadow:null});if(Ot){const te=L?L(pt):null;if(typeof te=="string"&&ie(te)==="template"){const Le=pt.content;Kr(Le)&&O.push({node:Le,shadow:null})}}if(Ot){const te=b(pt);Kr(te)&&O.push({node:null,shadow:te},{node:te,shadow:null})}}};return t.sanitize=function(ot){let B=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},O=null,tt=null,pt=null,Bt=null;if(bo=!ot,bo&&(ot="<!-->"),typeof ot!="string"&&!Ii(ot)&&(ot=_y(ot),typeof ot!="string"))throw Er("dirty is not a string, aborting");if(!t.isSupported)return ot;M?(At=X,ut=K):wo(B),(nt.uponSanitizeElement.length>0||nt.uponSanitizeAttribute.length>0)&&(At=De(At)),nt.uponSanitizeAttribute.length>0&&(ut=De(ut)),t.removed=[];const Ot=J&&typeof ot!="string"&&Ii(ot);if(Ot){Zf(ot);const Le=E(ot);if(typeof Le=="string"){const ve=ie(Le);if(!At[ve]||He[ve])throw ps(ot),Er("root node is forbidden and cannot be sanitized in-place")}if(ys(ot))throw ps(ot),Er("root node is clobbered and cannot be sanitized in-place");try{Lo(ot)}catch(ve){throw ps(ot),ve}}else if(Ii(ot))O=bl("<!---->"),tt=O.ownerDocument.importNode(ot,!0),tt.nodeType===Oe.element&&tt.nodeName==="BODY"||tt.nodeName==="HTML"?O=tt:O.appendChild(tt),Lo(tt);else{if(!it&&!Se&&!m&&ot.indexOf("<")===-1)return D&&I?G(ot):ot;if(O=bl(ot),!O)return it?null:I?q:""}O&&j&&Cr(O.firstChild);const Zt=Ot?ot:O;try{const Le=kl(Zt);for(;pt=Le.nextNode();)wl(pt,Zt),vl(pt),Kr(pt.content)&&xs(pt.content)}catch(Le){throw Ot&&(ps(ot),Mr(t.removed,ve=>{ve.element&&fs(ve.element)})),Le}if(Ot)return Mr(t.removed,Le=>{Le.element&&fs(Le.element)}),Se&&Bo(ot),ot;if(it){if(Se&&Bo(O),T)for(Bt=wt.call(O.ownerDocument);O.firstChild;)Bt.appendChild(O.firstChild);else Bt=O;return(ut.shadowroot||ut.shadowrootmode)&&(Bt=Lt.call(i,Bt,!0)),Bt}let te=m?O.outerHTML:O.innerHTML;return m&&At["!doctype"]&&O.ownerDocument&&O.ownerDocument.doctype&&O.ownerDocument.doctype.name&&pe(Wy,O.ownerDocument.doctype.name)&&(te="<!DOCTYPE "+O.ownerDocument.doctype.name+`>
|
|
12
|
+
`+te),Se&&(te=ms(te)),D&&I?G(te):te},t.setConfig=function(){let ot=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};wo(ot),M=!0,X=At,K=ut},t.clearConfig=function(){Vr=null,M=!1,X=null,K=null,D=U,q=""},t.isValidAttribute=function(ot,B,O){Vr||wo({});const tt=ie(ot),pt=ie(B);return Bl(tt,pt,O)},t.addHook=function(ot,B){typeof B=="function"&&Ee(nt,ot)&&Di(nt[ot],B)},t.removeHook=function(ot,B){if(Ee(nt,ot)){if(B!==void 0){const O=Ty(nt[ot],B);return O===-1?void 0:wy(nt[ot],O,1)[0]}return Il(nt[ot])}},t.removeHooks=function(ot){Ee(nt,ot)&&(nt[ot]=[])},t.removeAllHooks=function(){nt=Ul()},t}var wi=ud(),Aa=f((e,t,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(t)&&!Array.isArray(e))return t.forEach(s=>Aa(e,s,i)),e;if(Array.isArray(t)&&Array.isArray(e))return t.forEach(s=>{e.includes(s)||e.push(s)}),e;if(e==null||r<=0)return e!=null&&typeof e=="object"&&typeof t=="object"?Object.assign(e,t):t;if(t!=null&&typeof e=="object"&&typeof t=="object"){const s=e;Object.entries(t).forEach(([o,a])=>{if(typeof a=="object"){if(a===null)return;Object.hasOwn(e,o)||Object.defineProperty(e,o,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),s[o]===void 0&&(s[o]=Array.isArray(a)?[]:{}),typeof s[o]=="object"&&(s[o]=Aa(s[o],a,{depth:r-1}))}else typeof s[o]!="object"&&(Object.hasOwn(e,o)?s[o]=a:Object.defineProperty(e,o,{value:a,writable:!0,enumerable:!0,configurable:!0}))})}return e},"assignWithDepth"),he=Aa,sr="#ffffff",or="#f2f2f2",Mt=f((e,t)=>t?k(e,{s:-40,l:10}):k(e,{s:-40,l:-10}),"mkBorder"),li,Vy=(li=class{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(){var r,i,s,o,a,n,l,c,h,d,u,g,p,C,x,y,b,S,w,L,A,v,E,D,q,U,st,N,H,G,F,Q,$,Y,at,wt,bt,Lt,nt,Ct,Et,_t,zt,It,yt,xt,Rt,Wt,At,P;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||W(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||z(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(this.mainBkg,10)):(this.rowOdd=this.rowOdd||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let ut=0;ut<this.THEME_COLOR_LIMIT;ut++)this["cScale"+ut]=z(this["cScale"+ut],75);else for(let ut=0;ut<this.THEME_COLOR_LIMIT;ut++)this["cScale"+ut]=z(this["cScale"+ut],25);for(let ut=0;ut<this.THEME_COLOR_LIMIT;ut++)this["cScaleInv"+ut]=this["cScaleInv"+ut]||_(this["cScale"+ut]);for(let ut=0;ut<this.THEME_COLOR_LIMIT;ut++)this.darkMode?this["cScalePeer"+ut]=this["cScalePeer"+ut]||W(this["cScale"+ut],10):this["cScalePeer"+ut]=this["cScalePeer"+ut]||z(this["cScale"+ut],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let ut=0;ut<this.THEME_COLOR_LIMIT;ut++)this["cScaleLabel"+ut]=this["cScaleLabel"+ut]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let ut=0;ut<5;ut++)this["surface"+ut]=this["surface"+ut]||k(this.mainBkg,{h:180,s:-15,l:t*(5+ut*3)}),this["surfacePeer"+ut]=this["surfacePeer"+ut]||k(this.mainBkg,{h:180,s:-15,l:t*(8+ut*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((r=this.cynefin)==null?void 0:r.domainFontSize)||16,itemFontSize:((i=this.cynefin)==null?void 0:i.itemFontSize)||12,boundaryColor:((s=this.cynefin)==null?void 0:s.boundaryColor)||this.lineColor,boundaryWidth:((o=this.cynefin)==null?void 0:o.boundaryWidth)||2,cliffColor:((a=this.cynefin)==null?void 0:a.cliffColor)||"#8B0000",cliffWidth:((n=this.cynefin)==null?void 0:n.cliffWidth)||4,arrowColor:((l=this.cynefin)==null?void 0:l.arrowColor)||this.lineColor,arrowWidth:((c=this.cynefin)==null?void 0:c.arrowWidth)||2,complexBg:((h=this.cynefin)==null?void 0:h.complexBg)||"#E8F5E9",complicatedBg:((d=this.cynefin)==null?void 0:d.complicatedBg)||"#E3F2FD",chaoticBg:((u=this.cynefin)==null?void 0:u.chaoticBg)||"#FBE9E7",clearBg:((g=this.cynefin)==null?void 0:g.clearBg)||"#FFF8E1",confusionBg:((p=this.cynefin)==null?void 0:p.confusionBg)||"#F3E5F5",textColor:((C=this.cynefin)==null?void 0:C.textColor)||this.textColor,labelColor:((x=this.cynefin)==null?void 0:x.labelColor)||this.primaryTextColor},this.radar={axisColor:((y=this.radar)==null?void 0:y.axisColor)||this.lineColor,axisStrokeWidth:((b=this.radar)==null?void 0:b.axisStrokeWidth)||2,axisLabelFontSize:((S=this.radar)==null?void 0:S.axisLabelFontSize)||12,curveOpacity:((w=this.radar)==null?void 0:w.curveOpacity)||.5,curveStrokeWidth:((L=this.radar)==null?void 0:L.curveStrokeWidth)||2,graticuleColor:((A=this.radar)==null?void 0:A.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((v=this.radar)==null?void 0:v.graticuleStrokeWidth)||1,graticuleOpacity:((E=this.radar)==null?void 0:E.graticuleOpacity)||.3,legendBoxSize:((D=this.radar)==null?void 0:D.legendBoxSize)||12,legendFontSize:((q=this.radar)==null?void 0:q.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((U=this.wardley)==null?void 0:U.backgroundColor)||this.background,axisColor:((st=this.wardley)==null?void 0:st.axisColor)||this.lineColor,axisTextColor:((N=this.wardley)==null?void 0:N.axisTextColor)||this.primaryTextColor,gridColor:((H=this.wardley)==null?void 0:H.gridColor)||this.gridColor,componentFill:((G=this.wardley)==null?void 0:G.componentFill)||this.background,componentStroke:((F=this.wardley)==null?void 0:F.componentStroke)||this.lineColor,componentLabelColor:((Q=this.wardley)==null?void 0:Q.componentLabelColor)||this.primaryTextColor,linkStroke:(($=this.wardley)==null?void 0:$.linkStroke)||this.lineColor,evolutionStroke:((Y=this.wardley)==null?void 0:Y.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((at=this.wardley)==null?void 0:at.annotationStroke)||this.lineColor,annotationTextColor:((wt=this.wardley)==null?void 0:wt.annotationTextColor)||this.primaryTextColor,annotationFill:((bt=this.wardley)==null?void 0:bt.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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((Lt=this.xyChart)==null?void 0:Lt.backgroundColor)||this.background,titleColor:((nt=this.xyChart)==null?void 0:nt.titleColor)||this.primaryTextColor,dataLabelColor:((Ct=this.xyChart)==null?void 0:Ct.dataLabelColor)||this.primaryTextColor,legendTextColor:((Et=this.xyChart)==null?void 0:Et.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((_t=this.xyChart)==null?void 0:_t.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((zt=this.xyChart)==null?void 0:zt.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((It=this.xyChart)==null?void 0:It.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((yt=this.xyChart)==null?void 0:yt.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((xt=this.xyChart)==null?void 0:xt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Wt=this.xyChart)==null?void 0:Wt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((At=this.xyChart)==null?void 0:At.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((P=this.xyChart)==null?void 0:P.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?z(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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(li,"Theme"),li),Ky=f(e=>{const t=new Vy;return t.calculate(e),t},"getThemeVariables"),hi,Zy=(hi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(_("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Dr(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=z("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=z(this.sectionBkgColor,10),this.taskBorderColor=Dr(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Dr(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||W(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||z(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(){var t,r,i,s,o,a,n,l,c,h,d,u,g,p,C,x,y,b,S,w,L,A,v,E,D,q,U,st,N,H,G,F,Q,$,Y,at,wt,bt,Lt,nt,Ct,Et,_t,zt,It,yt,xt,Rt,Wt,At;this.secondBkg=W(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=W(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=W(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=_(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330});for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleInv"+P]=this["cScaleInv"+P]||_(this["cScale"+P]);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScalePeer"+P]=this["cScalePeer"+P]||W(this["cScale"+P],10);for(let P=0;P<5;P++)this["surface"+P]=this["surface"+P]||k(this.mainBkg,{h:30,s:-30,l:-(-10+P*4)}),this["surfacePeer"+P]=this["surfacePeer"+P]||k(this.mainBkg,{h:30,s:-30,l:-(-7+P*4)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleLabel"+P]=this["cScaleLabel"+P]||this.scaleLabelColor;for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["pie"+P]=this["cScale"+P];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 P=0;P<8;P++)this["venn"+(P+1)]=this["venn"+(P+1)]??W(this["cScale"+P],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#FF6B6B",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#1B5E20",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#0D47A1",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#BF360C",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#F57F17",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#4A148C",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((L=this.xyChart)==null?void 0:L.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((A=this.xyChart)==null?void 0:A.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((v=this.xyChart)==null?void 0:v.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((D=this.xyChart)==null?void 0:D.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((q=this.xyChart)==null?void 0:q.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((U=this.xyChart)==null?void 0:U.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((st=this.xyChart)==null?void 0:st.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:((N=this.radar)==null?void 0:N.axisColor)||this.lineColor,axisStrokeWidth:((H=this.radar)==null?void 0:H.axisStrokeWidth)||2,axisLabelFontSize:((G=this.radar)==null?void 0:G.axisLabelFontSize)||12,curveOpacity:((F=this.radar)==null?void 0:F.curveOpacity)||.5,curveStrokeWidth:((Q=this.radar)==null?void 0:Q.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((Y=this.radar)==null?void 0:Y.graticuleStrokeWidth)||1,graticuleOpacity:((at=this.radar)==null?void 0:at.graticuleOpacity)||.3,legendBoxSize:((wt=this.radar)==null?void 0:wt.legendBoxSize)||12,legendFontSize:((bt=this.radar)==null?void 0:bt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:((Lt=this.wardley)==null?void 0:Lt.backgroundColor)||this.background,axisColor:((nt=this.wardley)==null?void 0:nt.axisColor)||this.lineColor,axisTextColor:((Ct=this.wardley)==null?void 0:Ct.axisTextColor)||this.primaryTextColor,gridColor:((Et=this.wardley)==null?void 0:Et.gridColor)||this.gridColor,componentFill:((_t=this.wardley)==null?void 0:_t.componentFill)||this.mainBkg,componentStroke:((zt=this.wardley)==null?void 0:zt.componentStroke)||this.lineColor,componentLabelColor:((It=this.wardley)==null?void 0:It.componentLabelColor)||this.primaryTextColor,linkStroke:((yt=this.wardley)==null?void 0:yt.linkStroke)||this.lineColor,evolutionStroke:((xt=this.wardley)==null?void 0:xt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Rt=this.wardley)==null?void 0:Rt.annotationStroke)||this.lineColor,annotationTextColor:((Wt=this.wardley)==null?void 0:Wt.annotationTextColor)||this.primaryTextColor,annotationFill:((At=this.wardley)==null?void 0:At.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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=W(this.secondaryColor,20),this.git1=W(this.pie2||this.secondaryColor,20),this.git2=W(this.pie3||this.tertiaryColor,20),this.git3=W(this.pie4||k(this.primaryColor,{h:-30}),20),this.git4=W(this.pie5||k(this.primaryColor,{h:-60}),20),this.git5=W(this.pie6||k(this.primaryColor,{h:-90}),10),this.git6=W(this.pie7||k(this.primaryColor,{h:60}),10),this.git7=W(this.pie8||k(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||W("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||W("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||W("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||W("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||W(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||W(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||W(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||W(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(hi,"Theme"),hi),Qy=f(e=>{const t=new Zy;return t.calculate(e),t},"getThemeVariables"),ci,Jy=(ci=class{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=k(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=Mt(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=Dr(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(){var t,r,i,s,o,a,n,l,c,h,d,u,g,p,C,x,y,b,S,w,L,A,v,E,D,q,U,st,N,H,G,F,Q,$,Y,at,wt,bt,Lt,nt,Ct,Et,_t,zt,It,yt,xt,Rt,Wt,At;this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScale"+P]=z(this["cScale"+P],10),this["cScalePeer"+P]=this["cScalePeer"+P]||z(this["cScale"+P],25);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleInv"+P]=this["cScaleInv"+P]||k(this["cScale"+P],{h:180});for(let P=0;P<5;P++)this["surface"+P]=this["surface"+P]||k(this.mainBkg,{h:30,l:-(5+P*5)}),this["surfacePeer"+P]=this["surfacePeer"+P]||k(this.mainBkg,{h:30,l:-(7+P*5)});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||_(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||_(this.labelTextColor);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleLabel"+P]=this["cScaleLabel"+P]||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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||W(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||W(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||k(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||k(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((E=this.radar)==null?void 0:E.legendBoxSize)||12,legendFontSize:((D=this.radar)==null?void 0:D.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((st=this.wardley)==null?void 0:st.axisTextColor)||this.primaryTextColor,gridColor:((N=this.wardley)==null?void 0:N.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((G=this.wardley)==null?void 0:G.componentStroke)||this.lineColor,componentLabelColor:((F=this.wardley)==null?void 0:F.componentLabelColor)||this.primaryTextColor,linkStroke:((Q=this.wardley)==null?void 0:Q.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((at=this.wardley)==null?void 0:at.annotationTextColor)||this.primaryTextColor,annotationFill:((wt=this.wardley)==null?void 0:wt.annotationFill)||this.background},this.xyChart={backgroundColor:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((Lt=this.xyChart)==null?void 0:Lt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Ct=this.xyChart)==null?void 0:Ct.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Et=this.xyChart)==null?void 0:Et.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_t=this.xyChart)==null?void 0:_t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((zt=this.xyChart)==null?void 0:zt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((It=this.xyChart)==null?void 0:It.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((xt=this.xyChart)==null?void 0:xt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Wt=this.xyChart)==null?void 0:Wt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((At=this.xyChart)==null?void 0:At.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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||z(_(this.git0),25),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(Object.keys(this).forEach(i=>{this[i]==="calculated"&&(this[i]=void 0)}),typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ci,"Theme"),ci),tC=f(e=>{const t=new Jy;return t.calculate(e),t},"getThemeVariables"),di,eC=(di=class{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=W("#cde498",10),this.primaryBorderColor=Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.primaryColor),this.lineColor=_(this.background),this.textColor=_(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(){var t,r,i,s,o,a,n,l,c,h,d,u,g,p,C,x,y,b,S,w,L,A,v,E,D,q,U,st,N,H,G,F,Q,$,Y,at,wt,bt,Lt,nt,Ct,Et,_t,zt,It,yt,xt,Rt,Wt,At;this.actorBorder=z(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.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||z(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||z(this.tertiaryColor,40);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScale"+P]=z(this["cScale"+P],10),this["cScalePeer"+P]=this["cScalePeer"+P]||z(this["cScale"+P],25);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleInv"+P]=this["cScaleInv"+P]||k(this["cScale"+P],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleLabel"+P]=this["cScaleLabel"+P]||this.scaleLabelColor;for(let P=0;P<5;P++)this["surface"+P]=this["surface"+P]||k(this.mainBkg,{h:30,s:-30,l:-(5+P*5)}),this["surfacePeer"+P]=this["surfacePeer"+P]||k(this.mainBkg,{h:30,s:-30,l:-(8+P*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||W(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||W(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(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||k(this.primaryColor,{l:-30}),this.pie5=this.pie5||k(this.secondaryColor,{l:-30}),this.pie6=this.pie6||k(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||k(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??k(this.primaryColor,{l:-30}),this.venn2=this.venn2??k(this.secondaryColor,{l:-30}),this.venn3=this.venn3??k(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??k(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??k(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??k(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??k(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??k(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B4513",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#C8E6C9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#DCEDC8",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FFE0B2",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF9C4",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#D7CCC8",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((x=this.radar)==null?void 0:x.axisColor)||this.lineColor,axisStrokeWidth:((y=this.radar)==null?void 0:y.axisStrokeWidth)||2,axisLabelFontSize:((b=this.radar)==null?void 0:b.axisLabelFontSize)||12,curveOpacity:((S=this.radar)==null?void 0:S.curveOpacity)||.5,curveStrokeWidth:((w=this.radar)==null?void 0:w.curveStrokeWidth)||2,graticuleColor:((L=this.radar)==null?void 0:L.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((A=this.radar)==null?void 0:A.graticuleStrokeWidth)||1,graticuleOpacity:((v=this.radar)==null?void 0:v.graticuleOpacity)||.3,legendBoxSize:((E=this.radar)==null?void 0:E.legendBoxSize)||12,legendFontSize:((D=this.radar)==null?void 0:D.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((q=this.wardley)==null?void 0:q.backgroundColor)||this.background,axisColor:((U=this.wardley)==null?void 0:U.axisColor)||this.lineColor,axisTextColor:((st=this.wardley)==null?void 0:st.axisTextColor)||this.primaryTextColor,gridColor:((N=this.wardley)==null?void 0:N.gridColor)||this.gridColor,componentFill:((H=this.wardley)==null?void 0:H.componentFill)||this.background,componentStroke:((G=this.wardley)==null?void 0:G.componentStroke)||this.lineColor,componentLabelColor:((F=this.wardley)==null?void 0:F.componentLabelColor)||this.primaryTextColor,linkStroke:((Q=this.wardley)==null?void 0:Q.linkStroke)||this.lineColor,evolutionStroke:(($=this.wardley)==null?void 0:$.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Y=this.wardley)==null?void 0:Y.annotationStroke)||this.lineColor,annotationTextColor:((at=this.wardley)==null?void 0:at.annotationTextColor)||this.primaryTextColor,annotationFill:((wt=this.wardley)==null?void 0:wt.annotationFill)||this.background},this.xyChart={backgroundColor:((bt=this.xyChart)==null?void 0:bt.backgroundColor)||this.background,titleColor:((Lt=this.xyChart)==null?void 0:Lt.titleColor)||this.primaryTextColor,dataLabelColor:((nt=this.xyChart)==null?void 0:nt.dataLabelColor)||this.primaryTextColor,legendTextColor:((Ct=this.xyChart)==null?void 0:Ct.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((Et=this.xyChart)==null?void 0:Et.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((_t=this.xyChart)==null?void 0:_t.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((zt=this.xyChart)==null?void 0:zt.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((It=this.xyChart)==null?void 0:It.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((yt=this.xyChart)==null?void 0:yt.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((xt=this.xyChart)==null?void 0:xt.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((Rt=this.xyChart)==null?void 0:Rt.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((Wt=this.xyChart)==null?void 0:Wt.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((At=this.xyChart)==null?void 0:At.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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||_(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(di,"Theme"),di),rC=f(e=>{const t=new eC;return t.calculate(e),t},"getThemeVariables"),ui,iC=(ui=class{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=W(this.contrast,55),this.background="#ffffff",this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.lineColor=_(this.background),this.textColor=_(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||W(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(){var t,r,i,s,o,a,n,l,c,h,d,u,g,p,C,x,y,b,S,w,L,A,v,E,D,q,U,st,N,H,G,F,Q,$,Y,at,wt,bt,Lt,nt,Ct,Et,_t,zt,It,yt,xt,Rt,Wt,At;this.secondBkg=W(this.contrast,55),this.border2=this.contrast,this.actorBorder=W(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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 P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleInv"+P]=this["cScaleInv"+P]||_(this["cScale"+P]);for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this.darkMode?this["cScalePeer"+P]=this["cScalePeer"+P]||W(this["cScale"+P],10):this["cScalePeer"+P]=this["cScalePeer"+P]||z(this["cScale"+P],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["cScaleLabel"+P]=this["cScaleLabel"+P]||this.scaleLabelColor;for(let P=0;P<5;P++)this["surface"+P]=this["surface"+P]||k(this.mainBkg,{l:-(5+P*5)}),this["surfacePeer"+P]=this["surfacePeer"+P]||k(this.mainBkg,{l:-(8+P*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=W(this.contrast,30),this.sectionBkgColor2=W(this.contrast,30),this.taskBorderColor=z(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=W(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=z(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=k(this.primaryColor,{h:64}),this.fillType3=k(this.secondaryColor,{h:64}),this.fillType4=k(this.primaryColor,{h:-64}),this.fillType5=k(this.secondaryColor,{h:-64}),this.fillType6=k(this.primaryColor,{h:128}),this.fillType7=k(this.secondaryColor,{h:128});for(let P=0;P<this.THEME_COLOR_LIMIT;P++)this["pie"+P]=this["cScale"+P];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 P=0;P<8;P++)this["venn"+(P+1)]=this["venn"+(P+1)]??this["cScale"+P];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:((t=this.cynefin)==null?void 0:t.domainFontSize)||16,itemFontSize:((r=this.cynefin)==null?void 0:r.itemFontSize)||12,boundaryColor:((i=this.cynefin)==null?void 0:i.boundaryColor)||this.lineColor,boundaryWidth:((s=this.cynefin)==null?void 0:s.boundaryWidth)||2,cliffColor:((o=this.cynefin)==null?void 0:o.cliffColor)||"#8B0000",cliffWidth:((a=this.cynefin)==null?void 0:a.cliffWidth)||4,arrowColor:((n=this.cynefin)==null?void 0:n.arrowColor)||this.lineColor,arrowWidth:((l=this.cynefin)==null?void 0:l.arrowWidth)||2,complexBg:((c=this.cynefin)==null?void 0:c.complexBg)||"#E8F5E9",complicatedBg:((h=this.cynefin)==null?void 0:h.complicatedBg)||"#E3F2FD",chaoticBg:((d=this.cynefin)==null?void 0:d.chaoticBg)||"#FBE9E7",clearBg:((u=this.cynefin)==null?void 0:u.clearBg)||"#FFF8E1",confusionBg:((g=this.cynefin)==null?void 0:g.confusionBg)||"#F3E5F5",textColor:((p=this.cynefin)==null?void 0:p.textColor)||this.textColor,labelColor:((C=this.cynefin)==null?void 0:C.labelColor)||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((x=this.xyChart)==null?void 0:x.backgroundColor)||this.background,titleColor:((y=this.xyChart)==null?void 0:y.titleColor)||this.primaryTextColor,dataLabelColor:((b=this.xyChart)==null?void 0:b.dataLabelColor)||this.primaryTextColor,legendTextColor:((S=this.xyChart)==null?void 0:S.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((w=this.xyChart)==null?void 0:w.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((L=this.xyChart)==null?void 0:L.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((A=this.xyChart)==null?void 0:A.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((v=this.xyChart)==null?void 0:v.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((E=this.xyChart)==null?void 0:E.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((D=this.xyChart)==null?void 0:D.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((q=this.xyChart)==null?void 0:q.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((U=this.xyChart)==null?void 0:U.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((st=this.xyChart)==null?void 0:st.plotColorPalette)||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:((N=this.radar)==null?void 0:N.axisColor)||this.lineColor,axisStrokeWidth:((H=this.radar)==null?void 0:H.axisStrokeWidth)||2,axisLabelFontSize:((G=this.radar)==null?void 0:G.axisLabelFontSize)||12,curveOpacity:((F=this.radar)==null?void 0:F.curveOpacity)||.5,curveStrokeWidth:((Q=this.radar)==null?void 0:Q.curveStrokeWidth)||2,graticuleColor:(($=this.radar)==null?void 0:$.graticuleColor)||"#DEDEDE",graticuleStrokeWidth:((Y=this.radar)==null?void 0:Y.graticuleStrokeWidth)||1,graticuleOpacity:((at=this.radar)==null?void 0:at.graticuleOpacity)||.3,legendBoxSize:((wt=this.radar)==null?void 0:wt.legendBoxSize)||12,legendFontSize:((bt=this.radar)==null?void 0:bt.legendFontSize)||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:((Lt=this.wardley)==null?void 0:Lt.backgroundColor)||this.background,axisColor:((nt=this.wardley)==null?void 0:nt.axisColor)||this.lineColor,axisTextColor:((Ct=this.wardley)==null?void 0:Ct.axisTextColor)||this.primaryTextColor,gridColor:((Et=this.wardley)==null?void 0:Et.gridColor)||this.gridColor,componentFill:((_t=this.wardley)==null?void 0:_t.componentFill)||this.background,componentStroke:((zt=this.wardley)==null?void 0:zt.componentStroke)||this.lineColor,componentLabelColor:((It=this.wardley)==null?void 0:It.componentLabelColor)||this.primaryTextColor,linkStroke:((yt=this.wardley)==null?void 0:yt.linkStroke)||this.lineColor,evolutionStroke:((xt=this.wardley)==null?void 0:xt.evolutionStroke)||this.wardleyEvolutionColor,annotationStroke:((Rt=this.wardley)==null?void 0:Rt.annotationStroke)||this.lineColor,annotationTextColor:((Wt=this.wardley)==null?void 0:Wt.annotationTextColor)||this.primaryTextColor,annotationFill:((At=this.wardley)==null?void 0:At.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=z(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||k(this.primaryColor,{h:-30}),this.git4=this.pie5||k(this.primaryColor,{h:-60}),this.git5=this.pie6||k(this.primaryColor,{h:-90}),this.git6=this.pie7||k(this.primaryColor,{h:60}),this.git7=this.pie8||k(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(ui,"Theme"),ui),sC=f(e=>{const t=new iC;return t.calculate(e),t},"getThemeVariables"),gi,oC=(gi=class{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=Mt(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(){var o,a,n,l,c,h,d,u,g,p,C,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=k(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||W(t,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||t,this.cScale1=this.cScale1||r,this.cScale2=this.cScale2||i,this.cScale3=this.cScale3||k(t,{h:30}),this.cScale4=this.cScale4||k(t,{h:60}),this.cScale5=this.cScale5||k(t,{h:90}),this.cScale6=this.cScale6||k(t,{h:120}),this.cScale7=this.cScale7||k(t,{h:150}),this.cScale8=this.cScale8||k(t,{h:210,l:150}),this.cScale9=this.cScale9||k(t,{h:270}),this.cScale10=this.cScale10||k(t,{h:300}),this.cScale11=this.cScale11||k(t,{h:330}),this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=z(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=z(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||W(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||k(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||k(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(gi,"Theme"),gi),aC=f(e=>{const t=new oC;return t.calculate(e),t},"getThemeVariables"),pi,nC=(pi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(_("#323D47"),10),this.border1="#ccc",this.border2=Dr(255,255,255,.25),this.arrowheadColor=_(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(){var r,i,s,o,a,n,l,c,h,d,u,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||W(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=z(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=z(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||_(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||W(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||z(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?z(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=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(pi,"Theme"),pi),lC=f(e=>{const t=new nC;return t.calculate(e),t},"getThemeVariables"),fi,hC=(fi=class{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=Mt("#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(){var o,a,n,l,c,h,d,u,g,p,C,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=k(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||W(t,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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=this.mainBkg;if(this.darkMode)for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=z(this["cScale"+y],75);else for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScale"+y]=z(this["cScale"+y],25);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||W(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||k(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||k(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(fi,"Theme"),fi),cC=f(e=>{const t=new hC;return t.calculate(e),t},"getThemeVariables"),mi,dC=(mi=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(_("#323D47"),10),this.border1="#ccc",this.border2=Dr(255,255,255,.25),this.arrowheadColor=_(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(){var r,i,s,o,a,n,l,c,h,d,u,g;if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||W(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||k(this.primaryColor,{h:30}),this.cScale4=this.cScale4||k(this.primaryColor,{h:60}),this.cScale5=this.cScale5||k(this.primaryColor,{h:90}),this.cScale6=this.cScale6||k(this.primaryColor,{h:120}),this.cScale7=this.cScale7||k(this.primaryColor,{h:150}),this.cScale8=this.cScale8||k(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||k(this.primaryColor,{h:270}),this.cScale10=this.cScale10||k(this.primaryColor,{h:300}),this.cScale11=this.cScale11||k(this.primaryColor,{h:330}),this.darkMode)for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=z(this["cScale"+p],75);else for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScale"+p]=z(this["cScale"+p],25);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||_(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||W(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||z(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=this["cScaleLabel"+p]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?z(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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(mi,"Theme"),mi),uC=f(e=>{const t=new dC;return t.calculate(e),t},"getThemeVariables"),yi,gC=(yi=class{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=Mt(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(){var o,a,n,l,c,h,d,u,g,p,C,x;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",r="#E9E9F1",i=k(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||i,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||r,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||W(t,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 y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleInv"+y]=this["cScaleInv"+y]||_(this["cScale"+y]);for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this.darkMode?this["cScalePeer"+y]=this["cScalePeer"+y]||W(this["cScale"+y],10):this["cScalePeer"+y]=this["cScalePeer"+y]||z(this["cScale"+y],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let y=0;y<this.THEME_COLOR_LIMIT;y++)this["cScaleLabel"+y]=this["cScaleLabel"+y]||this.scaleLabelColor;const s=this.darkMode?-4:-1;for(let y=0;y<5;y++)this["surface"+y]=this["surface"+y]||k(this.mainBkg,{h:180,s:-15,l:s*(5+y*3)}),this["surfacePeer"+y]=this["surfacePeer"+y]||k(this.mainBkg,{h:180,s:-15,l:s*(8+y*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||r,this.fillType2=this.fillType2||k(t,{h:64}),this.fillType3=this.fillType3||k(r,{h:64}),this.fillType4=this.fillType4||k(t,{h:-64}),this.fillType5=this.fillType5||k(r,{h:-64}),this.fillType6=this.fillType6||k(t,{h:128}),this.fillType7=this.fillType7||k(r,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||r,this.pie3=this.pie3||i,this.pie4=this.pie4||k(t,{l:-10}),this.pie5=this.pie5||k(r,{l:-10}),this.pie6=this.pie6||k(i,{l:-10}),this.pie7=this.pie7||k(t,{h:60,l:-10}),this.pie8=this.pie8||k(t,{h:-60,l:-10}),this.pie9=this.pie9||k(t,{h:120,l:0}),this.pie10=this.pie10||k(t,{h:60,l:-20}),this.pie11=this.pie11||k(t,{h:-60,l:-20}),this.pie12=this.pie12||k(t,{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||t,this.quadrant2Fill=this.quadrant2Fill||k(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((o=this.xyChart)==null?void 0:o.backgroundColor)||this.background,titleColor:((a=this.xyChart)==null?void 0:a.titleColor)||this.primaryTextColor,legendTextColor:((n=this.xyChart)==null?void 0:n.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((l=this.xyChart)==null?void 0:l.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((c=this.xyChart)==null?void 0:c.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((h=this.xyChart)==null?void 0:h.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((d=this.xyChart)==null?void 0:d.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((u=this.xyChart)==null?void 0:u.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((g=this.xyChart)==null?void 0:g.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((p=this.xyChart)==null?void 0:p.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((C=this.xyChart)==null?void 0:C.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((x=this.xyChart)==null?void 0:x.plotColorPalette)||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,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?z(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||r,this.git2=this.git2||i,this.git3=this.git3||k(t,{h:-30}),this.git4=this.git4||k(t,{h:-60}),this.git5=this.git5||k(t,{h:-90}),this.git6=this.git6||k(t,{h:60}),this.git7=this.git7||k(t,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(yi,"Theme"),yi),pC=f(e=>{const t=new gC;return t.calculate(e),t},"getThemeVariables"),Ci,fC=(Ci=class{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=W(this.primaryColor,16),this.tertiaryColor=k(this.primaryColor,{h:-160}),this.primaryBorderColor=_(this.background),this.secondaryBorderColor=Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Mt(this.tertiaryColor,this.darkMode),this.primaryTextColor=_(this.primaryColor),this.secondaryTextColor=_(this.secondaryColor),this.tertiaryTextColor=_(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=W(_("#323D47"),10),this.border1="#ccc",this.border2=Dr(255,255,255,.25),this.arrowheadColor=_(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(){var r,i,s,o,a,n,l,c,h,d,u,g;this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||k(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||k(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Mt(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Mt(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Mt(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Mt(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||_(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||_(this.tertiaryColor),this.lineColor=this.lineColor||_(this.background),this.arrowheadColor=this.arrowheadColor||_(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?z(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||z(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||_(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||W(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 p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleInv"+p]=this["cScaleInv"+p]||_(this["cScale"+p]);for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this.darkMode?this["cScalePeer"+p]=this["cScalePeer"+p]||W(this["cScale"+p],10):this["cScalePeer"+p]=this["cScalePeer"+p]||z(this["cScale"+p],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let p=0;p<this.THEME_COLOR_LIMIT;p++)this["cScaleLabel"+p]=z(this["cScale"+p],75);const t=this.darkMode?-4:-1;for(let p=0;p<5;p++)this["surface"+p]=this["surface"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(5+p*3)}),this["surfacePeer"+p]=this["surfacePeer"+p]||k(this.mainBkg,{h:180,s:-15,l:t*(8+p*3)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||k(this.primaryColor,{h:64}),this.fillType3=this.fillType3||k(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||k(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||k(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||k(this.primaryColor,{h:128}),this.fillType7=this.fillType7||k(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||k(this.primaryColor,{l:-10}),this.pie5=this.pie5||k(this.secondaryColor,{l:-10}),this.pie6=this.pie6||k(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||k(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||k(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||k(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||k(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||k(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||k(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||k(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||k(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||k(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||k(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||k(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||k(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||Ge(this.quadrant1Fill)?W(this.quadrant1Fill):z(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:((r=this.xyChart)==null?void 0:r.backgroundColor)||this.background,titleColor:((i=this.xyChart)==null?void 0:i.titleColor)||this.primaryTextColor,legendTextColor:((s=this.xyChart)==null?void 0:s.legendTextColor)||this.primaryTextColor,xAxisTitleColor:((o=this.xyChart)==null?void 0:o.xAxisTitleColor)||this.primaryTextColor,xAxisLabelColor:((a=this.xyChart)==null?void 0:a.xAxisLabelColor)||this.primaryTextColor,xAxisTickColor:((n=this.xyChart)==null?void 0:n.xAxisTickColor)||this.primaryTextColor,xAxisLineColor:((l=this.xyChart)==null?void 0:l.xAxisLineColor)||this.primaryTextColor,yAxisTitleColor:((c=this.xyChart)==null?void 0:c.yAxisTitleColor)||this.primaryTextColor,yAxisLabelColor:((h=this.xyChart)==null?void 0:h.yAxisLabelColor)||this.primaryTextColor,yAxisTickColor:((d=this.xyChart)==null?void 0:d.yAxisTickColor)||this.primaryTextColor,yAxisLineColor:((u=this.xyChart)==null?void 0:u.yAxisLineColor)||this.primaryTextColor,plotColorPalette:((g=this.xyChart)==null?void 0:g.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?z(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||k(this.primaryColor,{h:-30}),this.git4=this.git4||k(this.primaryColor,{h:-60}),this.git5=this.git5||k(this.primaryColor,{h:-90}),this.git6=this.git6||k(this.primaryColor,{h:60}),this.git7=this.git7||k(this.primaryColor,{h:120}),this.darkMode?(this.git0=W(this.git0,25),this.git1=W(this.git1,25),this.git2=W(this.git2,25),this.git3=W(this.git3,25),this.git4=W(this.git4,25),this.git5=W(this.git5,25),this.git6=W(this.git6,25),this.git7=W(this.git7,25)):(this.git0=z(this.git0,25),this.git1=z(this.git1,25),this.git2=z(this.git2,25),this.git3=z(this.git3,25),this.git4=z(this.git4,25),this.git5=z(this.git5,25),this.git6=z(this.git6,25),this.git7=z(this.git7,25)),this.gitInv0=this.gitInv0||_(this.git0),this.gitInv1=this.gitInv1||_(this.git1),this.gitInv2=this.gitInv2||_(this.git2),this.gitInv3=this.gitInv3||_(this.git3),this.gitInv4=this.gitInv4||_(this.git4),this.gitInv5=this.gitInv5||_(this.git5),this.gitInv6=this.gitInv6||_(this.git6),this.gitInv7=this.gitInv7||_(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||sr,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||or}calculate(t){if(typeof t!="object"){this.updateColors();return}const r=Object.keys(t);r.forEach(i=>{this[i]=t[i]}),this.updateColors(),r.forEach(i=>{this[i]=t[i]})}},f(Ci,"Theme"),Ci),mC=f(e=>{const t=new fC;return t.calculate(e),t},"getThemeVariables"),gr={base:{getThemeVariables:Ky},dark:{getThemeVariables:Qy},default:{getThemeVariables:tC},forest:{getThemeVariables:rC},neutral:{getThemeVariables:sC},neo:{getThemeVariables:aC},"neo-dark":{getThemeVariables:lC},redux:{getThemeVariables:cC},"redux-dark":{getThemeVariables:uC},"redux-color":{getThemeVariables:pC},"redux-dark-color":{getThemeVariables:mC}},de={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},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!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,donutHole:0,legendPosition:"right",highlightSlice:""},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,showLegend:!0,legendFontSize:14,legendPadding:10,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,labelRotation:0},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,labelRotation:0},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,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},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},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},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},gd={...de,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:gr.default.getThemeVariables(),sequence:{...de.sequence,messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:f(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:f(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...de.gantt,tickInterval:void 0,useWidth:void 0},c4:{...de.c4,useWidth:void 0,personFont:f(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...de.flowchart,inheritDir:!1},external_personFont:f(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:f(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:f(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:f(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:f(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:f(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:f(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:f(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:f(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:f(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:f(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:f(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:f(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:f(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:f(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:f(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:f(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:f(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:f(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:f(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:f(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...de.pie,useWidth:984},xyChart:{...de.xyChart,useWidth:void 0},requirement:{...de.requirement,useWidth:void 0},packet:{...de.packet},eventmodeling:{...de.eventmodeling},treeView:{...de.treeView,useWidth:void 0},radar:{...de.radar},railroad:{...de.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...de.ishikawa},sankey:{...de.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:{...de.venn},cynefin:{...de.cynefin}},pd=f((e,t="")=>Object.keys(e).reduce((r,i)=>Array.isArray(e[i])?r:typeof e[i]=="object"&&e[i]!==null?[...r,t+i,...pd(e[i],"")]:[...r,t+i],[]),"keyify"),yC=new Set(pd(gd,"")),fd=gd,CC={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},xC=f((e,t)=>{for(const r of Object.keys(e)){const i=e[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||typeof i!="string"||!t.test(i))&&(R.debug("sanitize deleting dictionary entry:",r,i),delete e[r])}},"sanitizeDictionaryConfig"),Hs=f(e=>{if(R.debug("sanitizeDirective called with",e),!(typeof e!="object"||e==null)){if(Array.isArray(e)){e.forEach(t=>Hs(t));return}for(const t of Object.keys(e)){if(R.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!yC.has(t)||e[t]==null){R.debug("sanitize deleting key: ",t),delete e[t];continue}if(typeof e[t]=="object"){const i=CC[t];i?xC(e[t],i):(R.debug("sanitizing object",t),Hs(e[t]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const i of r)t.includes(i)&&(R.debug("sanitizing css option",t),e[t]=md(e[t]))}if(e.themeVariables)for(const t of Object.keys(e.themeVariables)){const r=e.themeVariables[t];r!=null&&r.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[t]="")}R.debug("After sanitization",e)}},"sanitizeDirective"),md=f(e=>{let t=0,r=0;for(const i of e){if(t<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?t++:i==="}"&&r++}return t!==r?"{ /* ERROR: Unbalanced CSS */ }":e},"sanitizeCss"),Bi=Object.freeze(fd),ar=f(e=>!(e===!1||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),_e=he({},Bi),Ys,Nr=[],Qi=he({},Bi),ns=f((e,t)=>{let r=he({},e),i={};for(const s of t)xd(s),i=he(i,s);if(r=he(r,i),i.theme&&i.theme in gr){const s=he({},Ys),o=he(s.themeVariables||{},i.themeVariables);r.theme&&r.theme in gr&&(r.themeVariables=gr[r.theme].getThemeVariables(o))}return Qi=r,BC(Qi),Qi},"updateCurrentConfig"),bC=f(e=>(_e=he({},Bi),_e=he(_e,e),e.theme&&gr[e.theme]&&(_e.themeVariables=gr[e.theme].getThemeVariables(e.themeVariables)),ns(_e,Nr),_e),"setSiteConfig"),kC=f(e=>{Ys=he({},e)},"saveConfigFromInitialize"),SC=f(e=>(_e=he(_e,e),ns(_e,Nr),_e),"updateSiteConfig"),yd=f(()=>he({},_e),"getSiteConfig"),Cd=f(e=>(ns(Qi,[e]),Jt()),"setConfig"),Jt=f(()=>he({},Qi),"getConfig"),xd=f(e=>{e&&(["secure",..._e.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(R.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"&&xd(e[t])}))},"sanitize"),TC=f(e=>{var t;Hs(e),e.fontFamily&&!((t=e.themeVariables)!=null&&t.fontFamily)&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Nr.push(e),ns(_e,Nr)},"addDirective"),js=f((e=_e)=>{Nr=[],ns(e,Nr)},"reset"),wC={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."},Xl={},bd=f(e=>{Xl[e]||(R.warn(wC[e]),Xl[e]=!0)},"issueWarning"),BC=f(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&bd("LAZY_LOAD_DEPRECATED")},"checkConfig"),Kw=f(()=>{let e={};Ys&&(e=he(e,Ys));for(const t of Nr)e=he(e,t);return e},"getUserDefinedConfig"),ye=f(e=>{var t,r;return((t=e.flowchart)==null?void 0:t.htmlLabels)!=null&&bd("FLOWCHART_HTML_LABELS_DEPRECATED"),ar(e.htmlLabels??((r=e.flowchart)==null?void 0:r.htmlLabels)??!0)},"getEffectiveHtmlLabels"),kd=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,Ji=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,LC=/\s*%%.*\n/gm,xi,Sd=(xi=class extends Error{constructor(t){super(t),this.name="UnknownDiagramError"}},f(xi,"UnknownDiagramError"),xi),Wr={},nn=f(function(e,t){e=e.replace(kd,"").replace(Ji,"").replace(LC,`
|
|
13
|
+
`);for(const[r,{detector:i}]of Object.entries(Wr))if(i(e,t))return r;throw new Sd(`No diagram type detected matching given configuration for text: ${e}`)},"detectType"),Ea=f((...e)=>{for(const{id:t,detector:r,loader:i}of e)Td(t,r,i)},"registerLazyLoadedDiagrams"),Td=f((e,t,r)=>{Wr[e]&&R.warn(`Detector with key ${e} already exists. Overwriting.`),Wr[e]={detector:t,loader:r},R.debug(`Detector with key ${e} added${r?" with loader":""}`)},"addDetector"),vC=f(e=>Wr[e].loader,"getDiagramLoader"),ls=/<br\s*\/?>/gi,AC=f(e=>e?Ld(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),EC=(()=>{let e=!1;return()=>{e||(wd(),e=!0)}})();function wd(){const e="data-temp-href-target";wi.addHook("beforeSanitizeAttributes",t=>{t.tagName==="A"&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),wi.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"))})}f(wd,"setupDompurifyHooks");var Bd=f(e=>(EC(),wi.sanitize(e)),"removeScript"),Gl=f((e,t)=>{if(ye(t)){const r=t.securityLevel;r==="antiscript"||r==="strict"||r==="sandbox"?e=Bd(e):r!=="loose"&&(e=Ld(e),e=e.replace(/</g,"<").replace(/>/g,">"),e=e.replace(/=/g,"="),e=OC(e))}return e},"sanitizeMore"),qe=f((e,t)=>e&&(t.dompurifyConfig?e=wi.sanitize(Gl(e,t),t.dompurifyConfig).toString():e=wi.sanitize(Gl(e,t),{FORBID_TAGS:["style"]}).toString(),e),"sanitizeText"),_C=f((e,t)=>typeof e=="string"?qe(e,t):e.flat().map(r=>qe(r,t)),"sanitizeTextOrArray"),FC=f(e=>ls.test(e),"hasBreaks"),MC=f(e=>e.split(ls),"splitBreaks"),OC=f(e=>e.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Ld=f(e=>e.replace(ls,"#br#"),"breakToPlaceholder"),IC=f(e=>{let t="";return e&&(t=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,t=CSS.escape(t)),t},"getUrl"),DC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.max(...t)},"getMax"),RC=f(function(...e){const t=e.filter(r=>!isNaN(r));return Math.min(...t)},"getMin"),Vl=f(function(e){const t=e.split(/(,)/),r=[];for(let i=0;i<t.length;i++){let s=t[i];if(s===","&&i>0&&i+1<t.length){const o=t[i-1],a=t[i+1];PC(o,a)&&(s=o+","+a,i++,r.pop())}r.push($C(s))}return r.join("")},"parseGenericTypes"),_a=f((e,t)=>Math.max(0,e.split(t).length-1),"countOccurrence"),PC=f((e,t)=>{const r=_a(e,"~"),i=_a(t,"~");return r===1&&i===1},"shouldCombineSets"),$C=f(e=>{const t=_a(e,"~");let r=!1;if(t<=1)return e;t%2!==0&&e.startsWith("~")&&(e=e.substring(1),r=!0);const i=[...e];let s=i.indexOf("~"),o=i.lastIndexOf("~");for(;s!==-1&&o!==-1&&s!==o;)i[s]="<",i[o]=">",s=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Kl=f(()=>window.MathMLElement!==void 0,"isMathMLSupported"),Fa=/\$\$(.*?)\$\$/g,rs=f(e=>{var t;return(((t=e.match(Fa))==null?void 0:t.length)??0)>0},"hasKatex"),Zw=f(async(e,t)=>{const r=document.createElement("div");r.innerHTML=await vd(e,t),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i==null||i.insertAdjacentElement("beforeend",r);const s={width:r.clientWidth,height:r.clientHeight};return r.remove(),s},"calculateMathMLDimensions"),qC=f(async(e,t)=>{if(!rs(e))return e;if(!(Kl()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Fa,"MathML is unsupported in this environment.");{const{default:r}=await Pt(async()=>{const{default:s}=await import("./katex-C5jXJg4s.js");return{default:s}},[]),i=t.forceLegacyMathML||!Kl()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(ls).map(s=>rs(s)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${s}</div>`:`<div>${s}</div>`).join("").replace(Fa,(s,o)=>r.renderToString(o,{throwOnError:!0,displayMode:!0,output:i}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),vd=f(async(e,t)=>qe(await qC(e,t),t),"renderKatexSanitized"),hs={getRows:AC,sanitizeText:qe,sanitizeTextOrArray:_C,hasBreaks:FC,splitBreaks:MC,lineBreakRegex:ls,removeScript:Bd,getUrl:IC,evaluate:ar,getMax:DC,getMin:RC},NC=f(function(e,t){for(let r of t)e.attr(r[0],r[1])},"d3Attrs"),WC=f(function(e,t,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${t}px;`)):(i.set("height",e),i.set("width",t)),i},"calculateSvgSizeAttrs"),Ad=f(function(e,t,r,i){const s=WC(t,r,i);NC(e,s)},"configureSvgSize"),zC=f(function(e,t,r,i){const s=t.node().getBBox(),o=s.width,a=s.height;R.info(`SVG bounds: ${o}x${a}`,s);let n=0,l=0;R.info(`Graph bounds: ${n}x${l}`,e),n=o+r*2,l=a+r*2,R.info(`Calculated bounds: ${n}x${l}`),Ad(t,l,n,i);const c=`${s.x-r} ${s.y-r} ${s.width+2*r} ${s.height+2*r}`;t.attr("viewBox",c)},"setupGraphViewbox"),Rs={};function Ma(e){return[...e.cssRules].map(t=>t.cssText).join(`
|
|
14
|
+
`)}f(Ma,"cssStyleSheetToString");var HC=f((e,t,r,i)=>{let s="";return e in Rs&&Rs[e]?s=Rs[e]({...r,svgId:i}):R.warn(`No theme found for ${e}`),`& {
|
|
15
|
+
font-family: ${r.fontFamily};
|
|
16
|
+
font-size: ${r.fontSize};
|
|
17
|
+
fill: ${r.textColor}
|
|
18
|
+
}
|
|
19
|
+
@keyframes edge-animation-frame {
|
|
20
|
+
from {
|
|
21
|
+
stroke-dashoffset: 0;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
@keyframes dash {
|
|
25
|
+
to {
|
|
26
|
+
stroke-dashoffset: 0;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
& .edge-animation-slow {
|
|
30
|
+
stroke-dasharray: 9,5 !important;
|
|
31
|
+
stroke-dashoffset: 900;
|
|
32
|
+
animation: dash 50s linear infinite;
|
|
33
|
+
stroke-linecap: round;
|
|
34
|
+
}
|
|
35
|
+
& .edge-animation-fast {
|
|
36
|
+
stroke-dasharray: 9,5 !important;
|
|
37
|
+
stroke-dashoffset: 900;
|
|
38
|
+
animation: dash 20s linear infinite;
|
|
39
|
+
stroke-linecap: round;
|
|
40
|
+
}
|
|
41
|
+
/* Classes common for multiple diagrams */
|
|
42
|
+
|
|
43
|
+
& .error-icon {
|
|
44
|
+
fill: ${r.errorBkgColor};
|
|
45
|
+
}
|
|
46
|
+
& .error-text {
|
|
47
|
+
fill: ${r.errorTextColor};
|
|
48
|
+
stroke: ${r.errorTextColor};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
& .edge-thickness-normal {
|
|
52
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
53
|
+
}
|
|
54
|
+
& .edge-thickness-thick {
|
|
55
|
+
stroke-width: 3.5px
|
|
56
|
+
}
|
|
57
|
+
& .edge-pattern-solid {
|
|
58
|
+
stroke-dasharray: 0;
|
|
59
|
+
}
|
|
60
|
+
& .edge-thickness-invisible {
|
|
61
|
+
stroke-width: 0;
|
|
62
|
+
fill: none;
|
|
63
|
+
}
|
|
64
|
+
& .edge-pattern-dashed{
|
|
65
|
+
stroke-dasharray: 3;
|
|
66
|
+
}
|
|
67
|
+
.edge-pattern-dotted {
|
|
68
|
+
stroke-dasharray: 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
& .marker {
|
|
72
|
+
fill: ${r.lineColor};
|
|
73
|
+
stroke: ${r.lineColor};
|
|
74
|
+
}
|
|
75
|
+
& .marker.cross {
|
|
76
|
+
stroke: ${r.lineColor};
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
& svg {
|
|
80
|
+
font-family: ${r.fontFamily};
|
|
81
|
+
font-size: ${r.fontSize};
|
|
82
|
+
}
|
|
83
|
+
& p {
|
|
84
|
+
margin: 0
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
${s}
|
|
88
|
+
.node .neo-node {
|
|
89
|
+
stroke: ${r.nodeBorder};
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {
|
|
93
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
94
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
95
|
+
}
|
|
96
|
+
[data-look="neo"].swimlane.cluster rect {
|
|
97
|
+
filter: none;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
[data-look="neo"].node path {
|
|
102
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
103
|
+
stroke-width: ${r.strokeWidth??1}px;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-look="neo"].node .outer-path {
|
|
107
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-look="neo"].node .neo-line path {
|
|
111
|
+
stroke: ${r.nodeBorder};
|
|
112
|
+
filter: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-look="neo"].node circle{
|
|
116
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
117
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
[data-look="neo"].node circle .state-start{
|
|
121
|
+
fill: #000000;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
[data-look="neo"].icon-shape .icon {
|
|
125
|
+
fill: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
126
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
[data-look="neo"].icon-shape .icon-neo path {
|
|
130
|
+
stroke: ${r.useGradient?"url("+i+"-gradient)":r.nodeBorder};
|
|
131
|
+
filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${i}-drop-shadow)`):"none"};
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
${t}
|
|
135
|
+
`},"getStyles"),YC=f((e,t)=>{t!==void 0&&(Rs[e]=t)},"addStylesForDiagram"),jC=HC,Ed={};py(Ed,{clear:()=>UC,getAccDescription:()=>KC,getAccTitle:()=>GC,getDiagramTitle:()=>QC,setAccDescription:()=>VC,setAccTitle:()=>XC,setDiagramTitle:()=>ZC});var ln="",hn="",cn="",dn=f(e=>qe(e,Jt()),"sanitizeText"),UC=f(()=>{ln="",cn="",hn=""},"clear"),XC=f(e=>{ln=dn(e).replace(/^\s+/g,"")},"setAccTitle"),GC=f(()=>ln,"getAccTitle"),VC=f(e=>{cn=dn(e).replace(/\n\s+/g,`
|
|
136
|
+
`)},"setAccDescription"),KC=f(()=>cn,"getAccDescription"),ZC=f(e=>{hn=dn(e)},"setDiagramTitle"),QC=f(()=>hn,"getDiagramTitle"),Zl=R,JC=an,Nt=Jt,Qw=Cd,Jw=Bi,un=f(e=>qe(e,Nt()),"sanitizeText"),tx=zC,ex=f(()=>Ed,"getCommonDb"),Us={},Xs=f((e,t,r)=>{var i;Us[e]&&Zl.warn(`Diagram with id ${e} already registered. Overwriting.`),Us[e]=t,r&&Td(e,r),YC(e,t.styles),(i=t.injectUtils)==null||i.call(t,Zl,JC,Nt,un,tx,ex(),()=>{})},"registerDiagram"),Oa=f(e=>{if(e in Us)return Us[e];throw new rx(e)},"getDiagram"),bi,rx=(bi=class extends Error{constructor(t){super(`Diagram ${t} not found.`)}},f(bi,"DiagramNotFoundError"),bi),ix=f(e=>{var s;const{securityLevel:t}=Nt();let r=Dt("body");if(t==="sandbox"){const a=((s=Dt(`#i${e}`).node())==null?void 0:s.contentDocument)??document;r=Dt(a.body)}return r.select(`#${e}`)},"selectSvgElement"),sx=f(e=>{const{handDrawnSeed:t}=Nt();return{fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:t}},"solidStateFill"),ox=f(e=>Array.isArray(e)?e:e?e.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),Ai=f(e=>{const t=ax([...e.cssCompiledStyles||[],...e.cssStyles||[],...ox(e.labelStyle)]);return{stylesMap:t,stylesArray:[...t]}},"compileStyles"),ax=f(e=>{const t=new Map;return e.forEach(r=>{const[i,s]=r.split(":");t.set(i.trim(),s==null?void 0:s.trim())}),t},"styles2Map"),_d=f(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"),mt=f(e=>{const{stylesArray:t}=Ai(e),r=[],i=[],s=[],o=[];return t.forEach(a=>{const n=a[0];_d(n)?r.push(a.join(":")+" !important"):(i.push(a.join(":")+" !important"),n.includes("stroke")&&s.push(a.join(":")+" !important"),n==="fill"&&o.push(a.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:t,borderStyles:s,backgroundStyles:o}},"styles2String"),dt=f((e,t)=>{var l;const{themeVariables:r,handDrawnSeed:i}=Nt(),{nodeBorder:s,mainBkg:o}=r,{stylesMap:a}=Ai(e);return Object.assign({roughness:.7,fill:a.get("fill")||o,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:a.get("stroke")||s,seed:i,strokeWidth:((l=a.get("stroke-width"))==null?void 0:l.replace("px",""))||1.3,fillLineDash:[0,0],strokeLineDash:nx(a.get("stroke-dasharray"))},t)},"userNodeOverrides"),nx=f(e=>{if(!e)return[0,0];const t=e.trim().split(/\s+/).map(Number);if(t.length===1){const s=isNaN(t[0])?0:t[0];return[s,s]}const r=isNaN(t[0])?0:t[0],i=isNaN(t[1])?0:t[1];return[r,i]},"getStrokeDashArray");const lx=Object.freeze({left:0,top:0,width:16,height:16}),Gs=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),Fd=Object.freeze({...lx,...Gs}),hx=Object.freeze({...Fd,body:"",hidden:!1}),cx=Object.freeze({width:null,height:null}),dx=Object.freeze({...cx,...Gs}),ux=(e,t,r,i="")=>{const s=e.split(":");if(e.slice(0,1)==="@"){if(s.length<2||s.length>3)return null;i=s.shift().slice(1)}if(s.length>3||!s.length)return null;if(s.length>1){const n=s.pop(),l=s.pop(),c={provider:s.length>0?s[0]:i,prefix:l,name:n};return Po(c)?c:null}const o=s[0],a=o.split("-");if(a.length>1){const n={provider:i,prefix:a.shift(),name:a.join("-")};return Po(n)?n:null}if(r&&i===""){const n={provider:i,prefix:"",name:o};return Po(n,r)?n:null}return null},Po=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1;function gx(e,t){const r={};!e.hFlip!=!t.hFlip&&(r.hFlip=!0),!e.vFlip!=!t.vFlip&&(r.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(r.rotate=i),r}function Ql(e,t){const r=gx(e,t);for(const i in hx)i in Gs?i in e&&!(i in r)&&(r[i]=Gs[i]):i in t?r[i]=t[i]:i in e&&(r[i]=e[i]);return r}function px(e,t){const r=e.icons,i=e.aliases||Object.create(null),s=Object.create(null);function o(a){if(r[a])return s[a]=[];if(!(a in s)){s[a]=null;const n=i[a]&&i[a].parent,l=n&&o(n);l&&(s[a]=[n].concat(l))}return s[a]}return(t||Object.keys(r).concat(Object.keys(i))).forEach(o),s}function Jl(e,t,r){const i=e.icons,s=e.aliases||Object.create(null);let o={};function a(n){o=Ql(i[n]||s[n],o)}return a(t),r.forEach(a),Ql(e,o)}function fx(e,t){if(e.icons[t])return Jl(e,t,[]);const r=px(e,[t])[t];return r?Jl(e,t,r):null}const mx=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yx=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function th(e,t,r){if(t===1)return e;if(r=r||100,typeof e=="number")return Math.ceil(e*t*r)/r;if(typeof e!="string")return e;const i=e.split(mx);if(i===null||!i.length)return e;const s=[];let o=i.shift(),a=yx.test(o);for(;;){if(a){const n=parseFloat(o);isNaN(n)?s.push(o):s.push(Math.ceil(n*t*r)/r)}else s.push(o);if(o=i.shift(),o===void 0)return s.join("");a=!a}}function Cx(e,t="defs"){let r="";const i=e.indexOf("<"+t);for(;i>=0;){const s=e.indexOf(">",i),o=e.indexOf("</"+t);if(s===-1||o===-1)break;const a=e.indexOf(">",o);if(a===-1)break;r+=e.slice(s+1,o).trim(),e=e.slice(0,i).trim()+e.slice(a+1)}return{defs:r,content:e}}function xx(e,t){return e?"<defs>"+e+"</defs>"+t:t}function bx(e,t,r){const i=Cx(e);return xx(i.defs,t+i.content+r)}const kx=e=>e==="unset"||e==="undefined"||e==="none";function Sx(e,t){const r={...Fd,...e},i={...dx,...t},s={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(C=>{const x=[],y=C.hFlip,b=C.vFlip;let S=C.rotate;y?b?S+=2:(x.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),x.push("scale(-1 1)"),s.top=s.left=0):b&&(x.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),x.push("scale(1 -1)"),s.top=s.left=0);let w;switch(S<0&&(S-=Math.floor(S/4)*4),S=S%4,S){case 1:w=s.height/2+s.top,x.unshift("rotate(90 "+w.toString()+" "+w.toString()+")");break;case 2:x.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:w=s.width/2+s.left,x.unshift("rotate(-90 "+w.toString()+" "+w.toString()+")");break}S%2===1&&(s.left!==s.top&&(w=s.left,s.left=s.top,s.top=w),s.width!==s.height&&(w=s.width,s.width=s.height,s.height=w)),x.length&&(o=bx(o,'<g transform="'+x.join(" ")+'">',"</g>"))});const a=i.width,n=i.height,l=s.width,c=s.height;let h,d;a===null?(d=n===null?"1em":n==="auto"?c:n,h=th(d,l/c)):(h=a==="auto"?l:a,d=n===null?th(h,c/l):n==="auto"?c:n);const u={},g=(C,x)=>{kx(x)||(u[C]=x.toString())};g("width",h),g("height",d);const p=[s.left,s.top,l,c];return u.viewBox=p.join(" "),{attributes:u,viewBox:p,body:o}}const Tx=/\sid="(\S+)"/g,wx="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Bx=0;function Lx(e,t=wx){const r=[];let i;for(;i=Tx.exec(e);)r.push(i[1]);if(!r.length)return e;const s="suffix"+(Math.random()*16777216|Date.now()).toString(16);return r.forEach(o=>{const a=typeof t=="function"?t(o):t+(Bx++).toString(),n=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+a+s+"$3")}),e=e.replace(new RegExp(s,"g"),""),e}function vx(e,t){let r=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)r+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+e+"</svg>"}var Ax={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},Ia=new Map,Md=new Map,Ex=f(e=>{for(const t of e){if(!t.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(R.debug("Registering icon pack:",t.name),"loader"in t)Md.set(t.name,t.loader);else if("icons"in t)Ia.set(t.name,t.icons);else throw R.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.')}},"registerIconPacks"),Od=f(async(e,t)=>{const r=ux(e,!0,t!==void 0);if(!r)throw new Error(`Invalid icon name: ${e}`);const i=r.prefix||t;if(!i)throw new Error(`Icon name must contain a prefix: ${e}`);let s=Ia.get(i);if(!s){const a=Md.get(i);if(!a)throw new Error(`Icon set not found: ${r.prefix}`);try{s={...await a(),prefix:i},Ia.set(i,s)}catch(n){throw R.error(n),new Error(`Failed to load icon set: ${r.prefix}`)}}const o=fx(s,r.name);if(!o)throw new Error(`Icon not found: ${e}`);return o},"getRegisteredIconData"),_x=f(async e=>{try{return await Od(e),!0}catch{return!1}},"isIconAvailable"),cs=f(async(e,t,r)=>{let i;try{i=await Od(e,t==null?void 0:t.fallbackPrefix)}catch(a){R.error(a),i=Ax}const s=Sx(i,t),o=vx(Lx(s.body),{...s.attributes,...r});return qe(o,Jt())},"getIconSVG"),Bs={},ne={},eh;function Fx(){return eh||(eh=1,Object.defineProperty(ne,"__esModule",{value:!0}),ne.BLANK_URL=ne.relativeFirstCharacters=ne.whitespaceEscapeCharsRegex=ne.urlSchemeRegex=ne.ctrlCharactersRegex=ne.htmlCtrlEntityRegex=ne.htmlEntitiesRegex=ne.invalidProtocolRegex=void 0,ne.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,ne.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,ne.htmlCtrlEntityRegex=/&(newline|tab);/gi,ne.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,ne.urlSchemeRegex=/^.+(:|:)/gim,ne.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,ne.relativeFirstCharacters=[".","/"],ne.BLANK_URL="about:blank"),ne}var rh;function Mx(){if(rh)return Bs;rh=1,Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.sanitizeUrl=o;var e=Fx();function t(a){return e.relativeFirstCharacters.indexOf(a[0])>-1}function r(a){var n=a.replace(e.ctrlCharactersRegex,"");return n.replace(e.htmlEntitiesRegex,function(l,c){return String.fromCharCode(c)})}function i(a){return URL.canParse(a)}function s(a){try{return decodeURIComponent(a)}catch{return a}}function o(a){if(!a)return e.BLANK_URL;var n,l=s(a.trim());do l=r(l).replace(e.htmlCtrlEntityRegex,"").replace(e.ctrlCharactersRegex,"").replace(e.whitespaceEscapeCharsRegex,"").trim(),l=s(l),n=l.match(e.ctrlCharactersRegex)||l.match(e.htmlEntitiesRegex)||l.match(e.htmlCtrlEntityRegex)||l.match(e.whitespaceEscapeCharsRegex);while(n&&n.length>0);var c=l;if(!c)return e.BLANK_URL;if(t(c))return c;var h=c.trimStart(),d=h.match(e.urlSchemeRegex);if(!d)return c;var u=d[0].toLowerCase().trim();if(e.invalidProtocolRegex.test(u))return e.BLANK_URL;var g=h.replace(/\\/g,"/");if(u==="mailto:"||u.includes("://"))return g;if(u==="http:"||u==="https:"){if(!i(g))return e.BLANK_URL;var p=new URL(g);return p.protocol=p.protocol.toLowerCase(),p.hostname=p.hostname.toLowerCase(),p.toString()}return g}return Bs}var Ox=Mx();function $o(e){var r;if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){const i=e[Symbol.toStringTag];return i==null||!((r=Object.getOwnPropertyDescriptor(e,Symbol.toStringTag))!=null&&r.writable)?!1:e.toString()===`[object ${i}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function Ix(){}function Id(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function gn(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}const Dx="[object RegExp]",Dd="[object String]",Rd="[object Number]",Pd="[object Boolean]",$d="[object Arguments]",Rx="[object Symbol]",Px="[object Date]",$x="[object Map]",qx="[object Set]",Nx="[object Array]",Wx="[object ArrayBuffer]",zx="[object Object]",Hx="[object DataView]",Yx="[object Uint8Array]",jx="[object Uint8ClampedArray]",Ux="[object Uint16Array]",Xx="[object Uint32Array]",Gx="[object Int8Array]",Vx="[object Int16Array]",Kx="[object Int32Array]",Zx="[object Float32Array]",Qx="[object Float64Array]",ih=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function pn(e){return typeof ih.Buffer<"u"&&ih.Buffer.isBuffer(e)}function Jx(e){return Number.isSafeInteger(e)&&e>=0}function qd(e){return e!=null&&typeof e!="function"&&Jx(e.length)}function tb(e){return e==="__proto__"}function fn(e){return e==null||typeof e!="object"&&typeof e!="function"}function mn(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function eb(e,t){return ai(e,void 0,e,new Map,t)}function ai(e,t,r,i=new Map,s=void 0){const o=s==null?void 0:s(e,t,r,i);if(o!==void 0)return o;if(fn(e))return e;if(i.has(e))return i.get(e);if(Array.isArray(e)){const a=new Array(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=ai(e[n],n,r,i,s);return Object.hasOwn(e,"index")&&(a.index=e.index),Object.hasOwn(e,"input")&&(a.input=e.input),a}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){const a=new RegExp(e.source,e.flags);return a.lastIndex=e.lastIndex,a}if(e instanceof Map){const a=new Map;i.set(e,a);for(const[n,l]of e)a.set(n,ai(l,n,r,i,s));return a}if(e instanceof Set){const a=new Set;i.set(e,a);for(const n of e)a.add(ai(n,void 0,r,i,s));return a}if(pn(e))return e.subarray();if(mn(e)){const a=new(Object.getPrototypeOf(e)).constructor(e.length);i.set(e,a);for(let n=0;n<e.length;n++)a[n]=ai(e[n],n,r,i,s);return a}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){const a=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return i.set(e,a),je(a,e,r,i,s),a}if(typeof File<"u"&&e instanceof File){const a=new File([e],e.name,{type:e.type});return i.set(e,a),je(a,e,r,i,s),a}if(typeof Blob<"u"&&e instanceof Blob){const a=new Blob([e],{type:e.type});return i.set(e,a),je(a,e,r,i,s),a}if(e instanceof Error){const a=structuredClone(e);return i.set(e,a),a.message=e.message,a.name=e.name,a.stack=e.stack,a.cause=e.cause,a.constructor=e.constructor,je(a,e,r,i,s),a}if(e instanceof Boolean){const a=new Boolean(e.valueOf());return i.set(e,a),je(a,e,r,i,s),a}if(e instanceof Number){const a=new Number(e.valueOf());return i.set(e,a),je(a,e,r,i,s),a}if(e instanceof String){const a=new String(e.valueOf());return i.set(e,a),je(a,e,r,i,s),a}if(typeof e=="object"&&rb(e)){const a=Object.create(Object.getPrototypeOf(e));return i.set(e,a),je(a,e,r,i,s),a}return e}function je(e,t,r=e,i,s){const o=[...Object.keys(t),...Id(t)];for(let a=0;a<o.length;a++){const n=o[a],l=Object.getOwnPropertyDescriptor(e,n);(l==null||l.writable)&&(e[n]=ai(t[n],n,r,i,s))}}function rb(e){switch(gn(e)){case $d:case Nx:case Wx:case Hx:case Pd:case Px:case Zx:case Qx:case Gx:case Vx:case Kx:case $x:case Rd:case zx:case Dx:case qx:case Dd:case Rx:case Yx:case jx:case Ux:case Xx:return!0;default:return!1}}function ib(e,t){return eb(e,(r,i,s,o)=>{if(typeof e=="object"){if(gn(e)==="[object Object]"&&typeof e.constructor!="function"){const a={};return o.set(e,a),je(a,e,s,o),a}switch(Object.prototype.toString.call(e)){case Rd:case Dd:case Pd:{const a=new e.constructor(e==null?void 0:e.valueOf());return je(a,e),a}case $d:{const a={};return je(a,e),a.length=e.length,a[Symbol.iterator]=e[Symbol.iterator],a}default:return}}})}function sh(e){return ib(e)}function Da(e){return e!==null&&typeof e=="object"&&gn(e)==="[object Arguments]"}function Ra(e){return typeof e=="object"&&e!==null}function sb(e){return Ra(e)&&qd(e)}function Ps(e){return mn(e)}function ob(e){const t=e==null?void 0:e.constructor;return e===(typeof t=="function"?t.prototype:Object.prototype)}function ds(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError("Expected a function");const r=function(...i){const s=t?t.apply(this,i):i[0],o=r.cache;if(o.has(s))return o.get(s);const a=e.apply(this,i);return r.cache=o.set(s,a)||o,a};return r.cache=new(ds.Cache||Map),r}ds.Cache=Map;function ab(e){if(fn(e))return e;if(Array.isArray(e)||mn(e)||e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);const t=Object.getPrototypeOf(e);if(t==null)return Object.assign(Object.create(t),e);const r=t.constructor;if(e instanceof Date||e instanceof Map||e instanceof Set)return new r(e);if(e instanceof RegExp){const i=new r(e);return i.lastIndex=e.lastIndex,i}if(e instanceof DataView)return new r(e.buffer.slice(0));if(e instanceof Error){let i;return e instanceof AggregateError?i=new r(e.errors,e.message,{cause:e.cause}):i=new r(e.message,{cause:e.cause}),i.stack=e.stack,Object.assign(i,e),i}return typeof File<"u"&&e instanceof File?new r([e],e.name,{type:e.type,lastModified:e.lastModified}):typeof e=="object"?Object.assign(Object.create(t),e):e}function nb(e,...t){const r=t.slice(0,-1),i=t[t.length-1];let s=e;for(let o=0;o<r.length;o++){const a=r[o];s=$s(s,a,i,new Map)}return s}function $s(e,t,r,i){if(fn(e)&&(e=Object(e)),t==null||typeof t!="object")return e;if(i.has(t))return ab(i.get(t));if(i.set(t,e),Array.isArray(t)){t=t.slice();for(let o=0;o<t.length;o++)t[o]=t[o]??void 0}const s=[...Object.keys(t),...Id(t)];for(let o=0;o<s.length;o++){const a=s[o];if(tb(a))continue;let n=t[a],l=e[a];if(Da(n)&&(n={...n}),Da(l)&&(l={...l}),pn(n)&&(n=sh(n)),Array.isArray(n))if(Array.isArray(l)){const h=[],d=Reflect.ownKeys(l);for(let u=0;u<d.length;u++){const g=d[u];h[g]=l[g]}l=h}else if(sb(l)){const h=[];for(let d=0;d<l.length;d++)h[d]=l[d];l=h}else l=[];const c=r(l,n,a,e,t,i);c!==void 0?e[a]=c:Array.isArray(n)||Ra(l)&&Ra(n)&&($o(l)||$o(n)||Ps(l)||Ps(n))?e[a]=$s(l,n,r,i):l==null&&$o(n)?e[a]=$s({},n,r,i):l==null&&Ps(n)?e[a]=sh(n):(l===void 0||n!==void 0)&&(e[a]=n)}return e}function lb(e,...t){return nb(e,...t,Ix)}function oh(e){if(e==null)return!0;if(qd(e))return typeof e.splice!="function"&&typeof e!="string"&&!pn(e)&&!Ps(e)&&!Da(e)?!1:e.length===0;if(typeof e=="object"||typeof e=="function"){if(e instanceof Map||e instanceof Set)return e.size===0;const t=Object.keys(e);return ob(e)?t.filter(r=>r!=="constructor").length===0:t.length===0}return!0}var hb="",cb={curveBasis:Sa,curveBasisClosed:fm,curveBasisOpen:pm,curveBumpX:Zc,curveBumpY:Kc,curveBundle:gm,curveCardinalClosed:um,curveCardinalOpen:dm,curveCardinal:Vc,curveCatmullRomClosed:cm,curveCatmullRomOpen:hm,curveCatmullRom:Gc,curveLinear:Ds,curveLinearClosed:lm,curveMonotoneX:Xc,curveMonotoneY:Uc,curveNatural:jc,curveStep:Yc,curveStepAfter:Hc,curveStepBefore:zc},db=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,ub=f(function(e,t){const r=Nd(e,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const a=r.map(n=>n.args);Hs(a),i=he(i,[...a])}else i=r.args;if(!i)return;let s=nn(e,t);const o="config";return i[o]!==void 0&&(s==="flowchart-v2"&&(s="flowchart"),i[s]=i[o],delete i[o]),i},"detectInit"),Nd=f(function(e,t=null){var r,i;try{const s=new RegExp(`[%]{2}(?![{]${db.source})(?=[}][%]{2}).*
|
|
137
|
+
`,"ig");e=e.trim().replace(s,"").replace(/'/gm,'"'),R.debug(`Detecting diagram directive${t!==null?" type:"+t:""} based on the text:${e}`);let o;const a=[];for(;(o=Ji.exec(e))!==null;)if(o.index===Ji.lastIndex&&Ji.lastIndex++,o&&!t||t&&((r=o[1])!=null&&r.match(t))||t&&((i=o[2])!=null&&i.match(t))){const n=o[1]?o[1]:o[2],l=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:n,args:l})}return a.length===0?{type:e,args:null}:a.length===1?a[0]:a}catch(s){return R.error(`ERROR: ${s.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),gb=f(function(e){return e.replace(Ji,"")},"removeDirectives"),pb=f(function(e,t){for(const[r,i]of t.entries())if(i.match(e))return r;return-1},"isSubstringInArray");function yn(e,t){if(!e)return t;const r=`curve${e.charAt(0).toUpperCase()+e.slice(1)}`;return cb[r]??t}f(yn,"interpolateToCurve");function Wd(e,t){const r=e.trim();if(r)return t.securityLevel!=="loose"?Ox.sanitizeUrl(r):r}f(Wd,"formatUrl");var fb=f((e,...t)=>{const r=e.split("."),i=r.length-1,s=r[i];let o=window;for(let a=0;a<i;a++)if(o=o[r[a]],!o){R.error(`Function name: ${e} not found in window`);return}o[s](...t)},"runFunc");function Cn(e,t){return!e||!t?0:Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))}f(Cn,"distance");function zd(e){let t,r=0;e.forEach(s=>{r+=Cn(s,t),t=s});const i=r/2;return xn(e,i)}f(zd,"traverseEdge");function Hd(e){return e.length===1?e[0]:zd(e)}f(Hd,"calcLabelPosition");var ah=f((e,t=2)=>{const r=Math.pow(10,t);return Math.round(e*r)/r},"roundNumber"),xn=f((e,t)=>{let r,i=t;for(const s of e){if(r){const o=Cn(s,r);if(o===0)return r;if(o<i)i-=o;else{const a=i/o;if(a<=0)return r;if(a>=1)return{x:s.x,y:s.y};if(a>0&&a<1)return{x:ah((1-a)*r.x+a*s.x,5),y:ah((1-a)*r.y+a*s.y,5)}}}r=s}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),mb=f((e,t,r)=>{R.info(`our points ${JSON.stringify(t)}`),t[0]!==r&&(t=t.reverse());const s=xn(t,25),o=e?10:5,a=Math.atan2(t[0].y-s.y,t[0].x-s.x),n={x:0,y:0};return n.x=Math.sin(a)*o+(t[0].x+s.x)/2,n.y=-Math.cos(a)*o+(t[0].y+s.y)/2,n},"calcCardinalityPosition");function Yd(e,t,r){const i=structuredClone(r);R.info("our points",i),t!=="start_left"&&t!=="start_right"&&i.reverse();const s=25+e,o=xn(i,s),a=10+e*.5,n=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return t==="start_left"?(l.x=Math.sin(n+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n+Math.PI)*a+(i[0].y+o.y)/2):t==="end_right"?(l.x=Math.sin(n-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n-Math.PI)*a+(i[0].y+o.y)/2-5):t==="end_left"?(l.x=Math.sin(n)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(n)*a+(i[0].x+o.x)/2,l.y=-Math.cos(n)*a+(i[0].y+o.y)/2),l}f(Yd,"calcTerminalLabelPosition");function jd(e){let t="",r="";for(const i of e)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":t=t+i+";");return{style:t,labelStyle:r}}f(jd,"getStylesFromArray");var nh=0,yb=f(()=>(nh++,"id-"+Math.random().toString(36).substr(2,12)+"-"+nh),"generateId");function Ud(e){let t="";const r="0123456789abcdef",i=r.length;for(let s=0;s<e;s++)t+=r.charAt(Math.floor(Math.random()*i));return t}f(Ud,"makeRandomHex");var Cb=f(e=>Ud(e.length),"random"),xb=f(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"),bb=f(function(e,t){const r=t.text.replace(hs.lineBreakRegex," "),[,i]=lo(t.fontSize),s=e.append("text");s.attr("x",t.x),s.attr("y",t.y),s.style("text-anchor",t.anchor),s.style("font-family",t.fontFamily),s.style("font-size",i),s.style("font-weight",t.fontWeight),s.attr("fill",t.fill),t.class!==void 0&&s.attr("class",t.class);const o=s.append("tspan");return o.attr("x",t.x+t.textMargin*2),o.attr("fill",t.fill),o.text(r),s},"drawSimpleText"),kb=ds((e,t,r)=>{if(!e||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),hs.lineBreakRegex.test(e)))return e;const i=e.split(" ").filter(Boolean),s=[];let o="";return i.forEach((a,n)=>{const l=pr(`${a} `,r),c=pr(o,r);if(l>t){const{hyphenatedStrings:u,remainingWord:g}=Sb(a,t,"-",r);s.push(o,...u),o=g}else c+l>=t?(s.push(o),o=a):o=[o,a].filter(Boolean).join(" ");n+1===i.length&&s.push(o)}),s.filter(a=>a!=="").join(r.joinWith)},(e,t,r)=>`${e}${t}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),Sb=ds((e,t,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const s=[...e],o=[];let a="";return s.forEach((n,l)=>{const c=`${a}${n}`;if(pr(c,i)>=t){const d=l+1,u=s.length===d,g=`${c}${r}`;o.push(u?c:g),a=""}else a=c}),{hyphenatedStrings:o,remainingWord:a}},(e,t,r="-",i)=>`${e}${t}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function Xd(e,t){return bn(e,t).height}f(Xd,"calculateTextHeight");function pr(e,t){return bn(e,t).width}f(pr,"calculateTextWidth");var bn=ds((e,t)=>{const{fontSize:r=12,fontFamily:i="Arial",fontWeight:s=400}=t;if(!e)return{width:0,height:0};const[,o]=lo(r),a=["sans-serif",i],n=e.split(hs.lineBreakRegex),l=[],c=Dt("body");if(!c.remove)return{width:0,height:0,lineHeight:0};const h=c.append("svg");for(const u of a){let g=0;const p={width:0,height:0,lineHeight:0};for(const C of n){const x=xb();x.text=C||hb;const y=bb(h,x).style("font-size",o).style("font-weight",s).style("font-family",u),b=(y._groups||y)[0][0].getBBox();if(b.width===0&&b.height===0)throw new Error("svg element not in render tree");p.width=Math.round(Math.max(p.width,b.width)),g=Math.round(b.height),p.height+=g,p.lineHeight=Math.round(Math.max(p.lineHeight,g))}l.push(p)}h.remove();const d=isNaN(l[1].height)||isNaN(l[1].width)||isNaN(l[1].lineHeight)||l[0].height>l[1].height&&l[0].width>l[1].width&&l[0].lineHeight>l[1].lineHeight?0:1;return l[d]},(e,t)=>`${e}${t.fontSize}${t.fontWeight}${t.fontFamily}`),ki,Tb=(ki=class{constructor(t=!1,r){this.count=0,this.count=r?r.length:0,this.next=t?()=>this.count++:()=>Date.now()}},f(ki,"InitIDGenerator"),ki),Ls,wb=f(function(e){return Ls=Ls||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Ls.innerHTML=e,unescape(Ls.textContent)},"entityDecode");function kn(e){return"str"in e}f(kn,"isDetailedError");var Bb=f((e,t,r,i)=>{var o;if(!i)return;const s=(o=e.node())==null?void 0:o.getBBox();s&&e.append("text").text(i).attr("text-anchor","middle").attr("x",s.x+s.width/2).attr("y",-r).attr("class",t)},"insertTitle"),lo=f(e=>{if(typeof e=="number")return[e,e+"px"];const t=parseInt(e??"",10);return Number.isNaN(t)?[void 0,void 0]:e===String(t)?[t,e+"px"]:[t,e]},"parseFontSize");function Sn(e,t){return lb({},e,t)}f(Sn,"cleanAndMerge");var me={assignWithDepth:he,wrapLabel:kb,calculateTextHeight:Xd,calculateTextWidth:pr,calculateTextDimensions:bn,cleanAndMerge:Sn,detectInit:ub,detectDirective:Nd,isSubstringInArray:pb,interpolateToCurve:yn,calcLabelPosition:Hd,calcCardinalityPosition:mb,calcTerminalLabelPosition:Yd,formatUrl:Wd,getStylesFromArray:jd,generateId:yb,random:Cb,runFunc:fb,entityDecode:wb,insertTitle:Bb,isLabelCoordinateInPath:Gd,parseFontSize:lo,InitIDGenerator:Tb},Lb=f(function(e){let t=e;return t=t.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),t=t.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),t},"encodeEntities"),Tr=f(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),tB=f((e,t,{counter:r=0,prefix:i,suffix:s},o)=>o||`${i?`${i}_`:""}${e}_${t}_${r}${s?`_${s}`:""}`,"getEdgeId");function oe(e){return e??null}f(oe,"handleUndefinedAttr");function Gd(e,t){const r=Math.round(e.x),i=Math.round(e.y),s=t.replace(/(\d+\.\d+)/g,o=>Math.round(parseFloat(o)).toString());return s.includes(r.toString())||s.includes(i.toString())}f(Gd,"isLabelCoordinateInPath");var qs={exports:{}},lh=qs.exports,hh;function vb(){return hh||(hh=1,(function(e){(function(t){var r=function(){},i=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(h){return setTimeout(h,16)};function s(){var h=this;h.reads=[],h.writes=[],h.raf=i.bind(t)}s.prototype={constructor:s,runTasks:function(h){for(var d;d=h.shift();)d()},measure:function(h,d){var u=d?h.bind(d):h;return this.reads.push(u),o(this),u},mutate:function(h,d){var u=d?h.bind(d):h;return this.writes.push(u),o(this),u},clear:function(h){return n(this.reads,h)||n(this.writes,h)},extend:function(h){if(typeof h!="object")throw new Error("expected object");var d=Object.create(this);return l(d,h),d.fastdom=this,d.initialize&&d.initialize(),d},catch:null};function o(h){h.scheduled||(h.scheduled=!0,h.raf(a.bind(null,h)))}function a(h){var d=h.writes,u=h.reads,g;try{r("flushing reads",u.length),h.runTasks(u),r("flushing writes",d.length),h.runTasks(d)}catch(p){g=p}if(h.scheduled=!1,(u.length||d.length)&&o(h),g)if(r("task errored",g.message),h.catch)h.catch(g);else throw g}function n(h,d){var u=h.indexOf(d);return!!~u&&!!h.splice(u,1)}function l(h,d){for(var u in d)d.hasOwnProperty(u)&&(h[u]=d[u])}var c=t.fastdom=t.fastdom||new s;e.exports=c})(typeof window<"u"?window:typeof lh<"u"?lh:globalThis)})(qs)),qs.exports}var Ab=vb();const Eb=Qc(Ab);var qo={exports:{}},ch;function _b(){return ch||(ch=1,(function(e){(function(){var t={initialize:function(){this._tasks=new Map},mutate:function(i,s){return r(this,"mutate",i,s)},measure:function(i,s){return r(this,"measure",i,s)},clear:function(i){var s=this._tasks,o=s.get(i);this.fastdom.clear(o),s.delete(i)}};function r(i,s,o,a){var n=i._tasks,l=i.fastdom,c,h=new Promise(function(d,u){c=l[s](function(){n.delete(h);try{d(a?o.call(a):o())}catch(g){u(g)}},a)});return n.set(h,c),h}e.exports=t})()})(qo)),qo.exports}var Fb=_b();const Mb=Qc(Fb);function Tn(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}var Ur=Tn();function Vd(e){Ur=e}var ts={exec:()=>null};function Xt(e,t=""){let r=typeof e=="string"?e:e.source,i={replace:(s,o)=>{let a=typeof o=="string"?o:o.source;return a=a.replace(Be.caret,"$1"),r=r.replace(s,a),i},getRegex:()=>new RegExp(r,t)};return i}var Be={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+));?/ig,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:e=>new RegExp(`^( {0,3}${e})((?:[ ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),hrRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}#`),htmlBeginRegex:e=>new RegExp(`^ {0,${Math.min(3,e-1)}}<(?:[a-z].*>|!--)`,"i")},Ob=/^(?:[ \t]*(?:\n|$))+/,Ib=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,Db=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,us=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,Rb=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,wn=/(?:[*+-]|\d{1,9}[.)])/,Kd=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,Zd=Xt(Kd).replace(/bull/g,wn).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(),Pb=Xt(Kd).replace(/bull/g,wn).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(),Bn=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,$b=/^[^\n]+/,Ln=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,qb=Xt(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",Ln).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),Nb=Xt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,wn).getRegex(),ho="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",vn=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,Wb=Xt("^ {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",vn).replace("tag",ho).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),Qd=Xt(Bn).replace("hr",us).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",ho).getRegex(),zb=Xt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",Qd).getRegex(),An={blockquote:zb,code:Ib,def:qb,fences:Db,heading:Rb,hr:us,html:Wb,lheading:Zd,list:Nb,newline:Ob,paragraph:Qd,table:ts,text:$b},dh=Xt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",us).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",ho).getRegex(),Hb={...An,lheading:Pb,table:dh,paragraph:Xt(Bn).replace("hr",us).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",dh).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",ho).getRegex()},Yb={...An,html:Xt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:"[^"]*"|'[^']*'|\\s[^'"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",vn).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:ts,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:Xt(Bn).replace("hr",us).replace("heading",` *#{1,6} *[^
|
|
138
|
+
]`).replace("lheading",Zd).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},jb=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,Ub=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,Jd=/^( {2,}|\\)\n(?!\s*$)/,Xb=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,co=/[\p{P}\p{S}]/u,En=/[\s\p{P}\p{S}]/u,tu=/[^\s\p{P}\p{S}]/u,Gb=Xt(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,En).getRegex(),eu=/(?!~)[\p{P}\p{S}]/u,Vb=/(?!~)[\s\p{P}\p{S}]/u,Kb=/(?:[^\s\p{P}\p{S}]|~)/u,Zb=Xt(/link|code|html/,"g").replace("link",new RegExp("\\[(?:[^\\[\\]`]|(?<!`)(?<a>`+)[^`]+\\k<a>(?!`))*?\\]\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)]|\\((?:\\\\[\\s\\S]|[^\\\\\\(\\)])*\\))*\\)")).replace("code",new RegExp("(?<!`)(?<b>`+)[^`]+\\k<b>(?!`)")).replace("html",/<(?! )[^<>]*?>/).getRegex(),ru=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,Qb=Xt(ru,"u").replace(/punct/g,co).getRegex(),Jb=Xt(ru,"u").replace(/punct/g,eu).getRegex(),iu="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",t0=Xt(iu,"gu").replace(/notPunctSpace/g,tu).replace(/punctSpace/g,En).replace(/punct/g,co).getRegex(),e0=Xt(iu,"gu").replace(/notPunctSpace/g,Kb).replace(/punctSpace/g,Vb).replace(/punct/g,eu).getRegex(),r0=Xt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,tu).replace(/punctSpace/g,En).replace(/punct/g,co).getRegex(),i0=Xt(/\\(punct)/,"gu").replace(/punct/g,co).getRegex(),s0=Xt(/^<(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(),o0=Xt(vn).replace("(?:-->|$)","-->").getRegex(),a0=Xt("^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",o0).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),Vs=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,n0=Xt(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",Vs).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),su=Xt(/^!?\[(label)\]\[(ref)\]/).replace("label",Vs).replace("ref",Ln).getRegex(),ou=Xt(/^!?\[(ref)\](?:\[\])?/).replace("ref",Ln).getRegex(),l0=Xt("reflink|nolink(?!\\()","g").replace("reflink",su).replace("nolink",ou).getRegex(),uh=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,_n={_backpedal:ts,anyPunctuation:i0,autolink:s0,blockSkip:Zb,br:Jd,code:Ub,del:ts,emStrongLDelim:Qb,emStrongRDelimAst:t0,emStrongRDelimUnd:r0,escape:jb,link:n0,nolink:ou,punctuation:Gb,reflink:su,reflinkSearch:l0,tag:a0,text:Xb,url:ts},h0={..._n,link:Xt(/^!?\[(label)\]\((.*?)\)/).replace("label",Vs).getRegex(),reflink:Xt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",Vs).getRegex()},Pa={..._n,emStrongRDelimAst:e0,emStrongLDelim:Jb,url:Xt(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",uh).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:Xt(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",uh).getRegex()},c0={...Pa,br:Xt(Jd).replace("{2,}","*").getRegex(),text:Xt(Pa.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},vs={normal:An,gfm:Hb,pedantic:Yb},$i={normal:_n,gfm:Pa,breaks:c0,pedantic:h0},d0={"&":"&","<":"<",">":">",'"':""","'":"'"},gh=e=>d0[e];function tr(e,t){if(t){if(Be.escapeTest.test(e))return e.replace(Be.escapeReplace,gh)}else if(Be.escapeTestNoEncode.test(e))return e.replace(Be.escapeReplaceNoEncode,gh);return e}function ph(e){try{e=encodeURI(e).replace(Be.percentDecode,"%")}catch{return null}return e}function fh(e,t){var o;let r=e.replace(Be.findPipe,(a,n,l)=>{let c=!1,h=n;for(;--h>=0&&l[h]==="\\";)c=!c;return c?"|":" |"}),i=r.split(Be.splitPipe),s=0;if(i[0].trim()||i.shift(),i.length>0&&!((o=i.at(-1))!=null&&o.trim())&&i.pop(),t)if(i.length>t)i.splice(t);else for(;i.length<t;)i.push("");for(;s<i.length;s++)i[s]=i[s].trim().replace(Be.slashPipe,"|");return i}function qi(e,t,r){let i=e.length;if(i===0)return"";let s=0;for(;s<i&&e.charAt(i-s-1)===t;)s++;return e.slice(0,i-s)}function u0(e,t){if(e.indexOf(t[1])===-1)return-1;let r=0;for(let i=0;i<e.length;i++)if(e[i]==="\\")i++;else if(e[i]===t[0])r++;else if(e[i]===t[1]&&(r--,r<0))return i;return r>0?-2:-1}function mh(e,t,r,i,s){let o=t.href,a=t.title||null,n=e[1].replace(s.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:e[0].charAt(0)==="!"?"image":"link",raw:r,href:o,title:a,text:n,tokens:i.inlineTokens(n)};return i.state.inLink=!1,l}function g0(e,t,r){let i=e.match(r.other.indentCodeCompensation);if(i===null)return t;let s=i[1];return t.split(`
|
|
139
|
+
`).map(o=>{let a=o.match(r.other.beginningSpace);if(a===null)return o;let[n]=a;return n.length>=s.length?o.slice(s.length):o}).join(`
|
|
140
|
+
`)}var Ks=class{constructor(t){Kt(this,"options");Kt(this,"rules");Kt(this,"lexer");this.options=t||Ur}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let i=r[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?i:qi(i,`
|
|
141
|
+
`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let i=r[0],s=g0(i,r[3]||"",this.rules);return{type:"code",raw:i,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:s}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let i=r[2].trim();if(this.rules.other.endingHash.test(i)){let s=qi(i,"#");(this.options.pedantic||!s||this.rules.other.endingSpaceChar.test(s))&&(i=s.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:i,tokens:this.lexer.inline(i)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:qi(r[0],`
|
|
142
|
+
`)}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let i=qi(r[0],`
|
|
143
|
+
`).split(`
|
|
144
|
+
`),s="",o="",a=[];for(;i.length>0;){let n=!1,l=[],c;for(c=0;c<i.length;c++)if(this.rules.other.blockquoteStart.test(i[c]))l.push(i[c]),n=!0;else if(!n)l.push(i[c]);else break;i=i.slice(c);let h=l.join(`
|
|
145
|
+
`),d=h.replace(this.rules.other.blockquoteSetextReplace,`
|
|
146
|
+
$1`).replace(this.rules.other.blockquoteSetextReplace2,"");s=s?`${s}
|
|
147
|
+
${h}`:h,o=o?`${o}
|
|
148
|
+
${d}`:d;let u=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(d,a,!0),this.lexer.state.top=u,i.length===0)break;let g=a.at(-1);if((g==null?void 0:g.type)==="code")break;if((g==null?void 0:g.type)==="blockquote"){let p=g,C=p.raw+`
|
|
149
|
+
`+i.join(`
|
|
150
|
+
`),x=this.blockquote(C);a[a.length-1]=x,s=s.substring(0,s.length-p.raw.length)+x.raw,o=o.substring(0,o.length-p.text.length)+x.text;break}else if((g==null?void 0:g.type)==="list"){let p=g,C=p.raw+`
|
|
151
|
+
`+i.join(`
|
|
152
|
+
`),x=this.list(C);a[a.length-1]=x,s=s.substring(0,s.length-g.raw.length)+x.raw,o=o.substring(0,o.length-p.raw.length)+x.raw,i=C.substring(a.at(-1).raw.length).split(`
|
|
153
|
+
`);continue}}return{type:"blockquote",raw:s,tokens:a,text:o}}}list(t){let r=this.rules.block.list.exec(t);if(r){let i=r[1].trim(),s=i.length>1,o={type:"list",raw:"",ordered:s,start:s?+i.slice(0,-1):"",loose:!1,items:[]};i=s?`\\d{1,9}\\${i.slice(-1)}`:`\\${i}`,this.options.pedantic&&(i=s?i:"[*+-]");let a=this.rules.other.listItemRegex(i),n=!1;for(;t;){let c=!1,h="",d="";if(!(r=a.exec(t))||this.rules.block.hr.test(t))break;h=r[0],t=t.substring(h.length);let u=r[2].split(`
|
|
154
|
+
`,1)[0].replace(this.rules.other.listReplaceTabs,b=>" ".repeat(3*b.length)),g=t.split(`
|
|
155
|
+
`,1)[0],p=!u.trim(),C=0;if(this.options.pedantic?(C=2,d=u.trimStart()):p?C=r[1].length+1:(C=r[2].search(this.rules.other.nonSpaceChar),C=C>4?1:C,d=u.slice(C),C+=r[1].length),p&&this.rules.other.blankLine.test(g)&&(h+=g+`
|
|
156
|
+
`,t=t.substring(g.length+1),c=!0),!c){let b=this.rules.other.nextBulletRegex(C),S=this.rules.other.hrRegex(C),w=this.rules.other.fencesBeginRegex(C),L=this.rules.other.headingBeginRegex(C),A=this.rules.other.htmlBeginRegex(C);for(;t;){let v=t.split(`
|
|
157
|
+
`,1)[0],E;if(g=v,this.options.pedantic?(g=g.replace(this.rules.other.listReplaceNesting," "),E=g):E=g.replace(this.rules.other.tabCharGlobal," "),w.test(g)||L.test(g)||A.test(g)||b.test(g)||S.test(g))break;if(E.search(this.rules.other.nonSpaceChar)>=C||!g.trim())d+=`
|
|
158
|
+
`+E.slice(C);else{if(p||u.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||w.test(u)||L.test(u)||S.test(u))break;d+=`
|
|
159
|
+
`+g}!p&&!g.trim()&&(p=!0),h+=v+`
|
|
160
|
+
`,t=t.substring(v.length+1),u=E.slice(C)}}o.loose||(n?o.loose=!0:this.rules.other.doubleBlankLine.test(h)&&(n=!0));let x=null,y;this.options.gfm&&(x=this.rules.other.listIsTask.exec(d),x&&(y=x[0]!=="[ ] ",d=d.replace(this.rules.other.listReplaceTask,""))),o.items.push({type:"list_item",raw:h,task:!!x,checked:y,loose:!1,text:d,tokens:[]}),o.raw+=h}let l=o.items.at(-1);if(l)l.raw=l.raw.trimEnd(),l.text=l.text.trimEnd();else return;o.raw=o.raw.trimEnd();for(let c=0;c<o.items.length;c++)if(this.lexer.state.top=!1,o.items[c].tokens=this.lexer.blockTokens(o.items[c].text,[]),!o.loose){let h=o.items[c].tokens.filter(u=>u.type==="space"),d=h.length>0&&h.some(u=>this.rules.other.anyLine.test(u.raw));o.loose=d}if(o.loose)for(let c=0;c<o.items.length;c++)o.items[c].loose=!0;return o}}html(t){let r=this.rules.block.html.exec(t);if(r)return{type:"html",block:!0,raw:r[0],pre:r[1]==="pre"||r[1]==="script"||r[1]==="style",text:r[0]}}def(t){let r=this.rules.block.def.exec(t);if(r){let i=r[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),s=r[2]?r[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",o=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:i,raw:r[0],href:s,title:o}}}table(t){var n;let r=this.rules.block.table.exec(t);if(!r||!this.rules.other.tableDelimiter.test(r[2]))return;let i=fh(r[1]),s=r[2].replace(this.rules.other.tableAlignChars,"").split("|"),o=(n=r[3])!=null&&n.trim()?r[3].replace(this.rules.other.tableRowBlankLine,"").split(`
|
|
161
|
+
`):[],a={type:"table",raw:r[0],header:[],align:[],rows:[]};if(i.length===s.length){for(let l of s)this.rules.other.tableAlignRight.test(l)?a.align.push("right"):this.rules.other.tableAlignCenter.test(l)?a.align.push("center"):this.rules.other.tableAlignLeft.test(l)?a.align.push("left"):a.align.push(null);for(let l=0;l<i.length;l++)a.header.push({text:i[l],tokens:this.lexer.inline(i[l]),header:!0,align:a.align[l]});for(let l of o)a.rows.push(fh(l,a.header.length).map((c,h)=>({text:c,tokens:this.lexer.inline(c),header:!1,align:a.align[h]})));return a}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let i=r[1].charAt(r[1].length-1)===`
|
|
162
|
+
`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:i,tokens:this.lexer.inline(i)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:r[1]}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&this.rules.other.startATag.test(r[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;let a=qi(i.slice(0,-1),"\\");if((i.length-a.length)%2===0)return}else{let a=u0(r[2],"()");if(a===-2)return;if(a>-1){let n=(r[0].indexOf("!")===0?5:4)+r[1].length+a;r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]=""}}let s=r[2],o="";if(this.options.pedantic){let a=this.rules.other.pedanticHrefTitle.exec(s);a&&(s=a[1],o=a[3])}else o=r[3]?r[3].slice(1,-1):"";return s=s.trim(),this.rules.other.startAngleBracket.test(s)&&(this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?s=s.slice(1):s=s.slice(1,-1)),mh(r,{href:s&&s.replace(this.rules.inline.anyPunctuation,"$1"),title:o&&o.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,r){let i;if((i=this.rules.inline.reflink.exec(t))||(i=this.rules.inline.nolink.exec(t))){let s=(i[2]||i[1]).replace(this.rules.other.multipleSpaceGlobal," "),o=r[s.toLowerCase()];if(!o){let a=i[0].charAt(0);return{type:"text",raw:a,text:a}}return mh(i,o,i[0],this.lexer,this.rules)}}emStrong(t,r,i=""){let s=this.rules.inline.emStrongLDelim.exec(t);if(!(!s||s[3]&&i.match(this.rules.other.unicodeAlphaNumeric))&&(!(s[1]||s[2])||!i||this.rules.inline.punctuation.exec(i))){let o=[...s[0]].length-1,a,n,l=o,c=0,h=s[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(h.lastIndex=0,r=r.slice(-1*t.length+o);(s=h.exec(r))!=null;){if(a=s[1]||s[2]||s[3]||s[4]||s[5]||s[6],!a)continue;if(n=[...a].length,s[3]||s[4]){l+=n;continue}else if((s[5]||s[6])&&o%3&&!((o+n)%3)){c+=n;continue}if(l-=n,l>0)continue;n=Math.min(n,n+l+c);let d=[...s[0]][0].length,u=t.slice(0,o+s.index+d+n);if(Math.min(o,n)%2){let p=u.slice(1,-1);return{type:"em",raw:u,text:p,tokens:this.lexer.inlineTokens(p)}}let g=u.slice(2,-2);return{type:"strong",raw:u,text:g,tokens:this.lexer.inlineTokens(g)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let i=r[2].replace(this.rules.other.newLineCharGlobal," "),s=this.rules.other.nonSpaceChar.test(i),o=this.rules.other.startingSpaceChar.test(i)&&this.rules.other.endingSpaceChar.test(i);return s&&o&&(i=i.substring(1,i.length-1)),{type:"codespan",raw:r[0],text:i}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let i,s;return r[2]==="@"?(i=r[1],s="mailto:"+i):(i=r[1],s=i),{type:"link",raw:r[0],text:i,href:s,tokens:[{type:"text",raw:i,text:i}]}}}url(t){var i;let r;if(r=this.rules.inline.url.exec(t)){let s,o;if(r[2]==="@")s=r[0],o="mailto:"+s;else{let a;do a=r[0],r[0]=((i=this.rules.inline._backpedal.exec(r[0]))==null?void 0:i[0])??"";while(a!==r[0]);s=r[0],r[1]==="www."?o="http://"+r[0]:o=r[0]}return{type:"link",raw:r[0],text:s,href:o,tokens:[{type:"text",raw:s,text:s}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let i=this.lexer.state.inRawBlock;return{type:"text",raw:r[0],text:r[0],escaped:i}}}},Ue=class $a{constructor(t){Kt(this,"tokens");Kt(this,"options");Kt(this,"state");Kt(this,"tokenizer");Kt(this,"inlineQueue");this.tokens=[],this.tokens.links=Object.create(null),this.options=t||Ur,this.options.tokenizer=this.options.tokenizer||new Ks,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 r={other:Be,block:vs.normal,inline:$i.normal};this.options.pedantic?(r.block=vs.pedantic,r.inline=$i.pedantic):this.options.gfm&&(r.block=vs.gfm,this.options.breaks?r.inline=$i.breaks:r.inline=$i.gfm),this.tokenizer.rules=r}static get rules(){return{block:vs,inline:$i}}static lex(t,r){return new $a(r).lex(t)}static lexInline(t,r){return new $a(r).inlineTokens(t)}lex(t){t=t.replace(Be.carriageReturn,`
|
|
163
|
+
`),this.blockTokens(t,this.tokens);for(let r=0;r<this.inlineQueue.length;r++){let i=this.inlineQueue[r];this.inlineTokens(i.src,i.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,r=[],i=!1){var s,o,a;for(this.options.pedantic&&(t=t.replace(Be.tabCharGlobal," ").replace(Be.spaceLine,""));t;){let n;if((o=(s=this.options.extensions)==null?void 0:s.block)!=null&&o.some(c=>(n=c.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))continue;if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length);let c=r.at(-1);n.raw.length===1&&c!==void 0?c.raw+=`
|
|
164
|
+
`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
165
|
+
`)?"":`
|
|
166
|
+
`)+n.raw,c.text+=`
|
|
167
|
+
`+n.text,this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="paragraph"||(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
168
|
+
`)?"":`
|
|
169
|
+
`)+n.raw,c.text+=`
|
|
170
|
+
`+n.raw,this.inlineQueue.at(-1).src=c.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title},r.push(n));continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}let l=t;if((a=this.options.extensions)!=null&&a.startBlock){let c=1/0,h=t.slice(1),d;this.options.extensions.startBlock.forEach(u=>{d=u.call({lexer:this},h),typeof d=="number"&&d>=0&&(c=Math.min(c,d))}),c<1/0&&c>=0&&(l=t.substring(0,c+1))}if(this.state.top&&(n=this.tokenizer.paragraph(l))){let c=r.at(-1);i&&(c==null?void 0:c.type)==="paragraph"?(c.raw+=(c.raw.endsWith(`
|
|
171
|
+
`)?"":`
|
|
172
|
+
`)+n.raw,c.text+=`
|
|
173
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n),i=l.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length);let c=r.at(-1);(c==null?void 0:c.type)==="text"?(c.raw+=(c.raw.endsWith(`
|
|
174
|
+
`)?"":`
|
|
175
|
+
`)+n.raw,c.text+=`
|
|
176
|
+
`+n.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=c.text):r.push(n);continue}if(t){let c="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(c);break}else throw new Error(c)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){var n,l,c,h,d;let i=t,s=null;if(this.tokens.links){let u=Object.keys(this.tokens.links);if(u.length>0)for(;(s=this.tokenizer.rules.inline.reflinkSearch.exec(i))!=null;)u.includes(s[0].slice(s[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(s=this.tokenizer.rules.inline.anyPunctuation.exec(i))!=null;)i=i.slice(0,s.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;(s=this.tokenizer.rules.inline.blockSkip.exec(i))!=null;)i=i.slice(0,s.index)+"["+"a".repeat(s[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=((l=(n=this.options.hooks)==null?void 0:n.emStrongMask)==null?void 0:l.call({lexer:this},i))??i;let o=!1,a="";for(;t;){o||(a=""),o=!1;let u;if((h=(c=this.options.extensions)==null?void 0:c.inline)!=null&&h.some(p=>(u=p.call({lexer:this},t,r))?(t=t.substring(u.raw.length),r.push(u),!0):!1))continue;if(u=this.tokenizer.escape(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.tag(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.link(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(u.raw.length);let p=r.at(-1);u.type==="text"&&(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):r.push(u);continue}if(u=this.tokenizer.emStrong(t,i,a)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.codespan(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.br(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.del(t)){t=t.substring(u.raw.length),r.push(u);continue}if(u=this.tokenizer.autolink(t)){t=t.substring(u.raw.length),r.push(u);continue}if(!this.state.inLink&&(u=this.tokenizer.url(t))){t=t.substring(u.raw.length),r.push(u);continue}let g=t;if((d=this.options.extensions)!=null&&d.startInline){let p=1/0,C=t.slice(1),x;this.options.extensions.startInline.forEach(y=>{x=y.call({lexer:this},C),typeof x=="number"&&x>=0&&(p=Math.min(p,x))}),p<1/0&&p>=0&&(g=t.substring(0,p+1))}if(u=this.tokenizer.inlineText(g)){t=t.substring(u.raw.length),u.raw.slice(-1)!=="_"&&(a=u.raw.slice(-1)),o=!0;let p=r.at(-1);(p==null?void 0:p.type)==="text"?(p.raw+=u.raw,p.text+=u.text):r.push(u);continue}if(t){let p="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(p);break}else throw new Error(p)}}return r}},Zs=class{constructor(t){Kt(this,"options");Kt(this,"parser");this.options=t||Ur}space(t){return""}code({text:t,lang:r,escaped:i}){var a;let s=(a=(r||"").match(Be.notSpaceStart))==null?void 0:a[0],o=t.replace(Be.endingNewline,"")+`
|
|
177
|
+
`;return s?'<pre><code class="language-'+tr(s)+'">'+(i?o:tr(o,!0))+`</code></pre>
|
|
178
|
+
`:"<pre><code>"+(i?o:tr(o,!0))+`</code></pre>
|
|
179
|
+
`}blockquote({tokens:t}){return`<blockquote>
|
|
180
|
+
${this.parser.parse(t)}</blockquote>
|
|
181
|
+
`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:r}){return`<h${r}>${this.parser.parseInline(t)}</h${r}>
|
|
182
|
+
`}hr(t){return`<hr>
|
|
183
|
+
`}list(t){let r=t.ordered,i=t.start,s="";for(let n=0;n<t.items.length;n++){let l=t.items[n];s+=this.listitem(l)}let o=r?"ol":"ul",a=r&&i!==1?' start="'+i+'"':"";return"<"+o+a+`>
|
|
184
|
+
`+s+"</"+o+`>
|
|
185
|
+
`}listitem(t){var i;let r="";if(t.task){let s=this.checkbox({checked:!!t.checked});t.loose?((i=t.tokens[0])==null?void 0:i.type)==="paragraph"?(t.tokens[0].text=s+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&t.tokens[0].tokens[0].type==="text"&&(t.tokens[0].tokens[0].text=s+" "+tr(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:s+" ",text:s+" ",escaped:!0}):r+=s+" "}return r+=this.parser.parse(t.tokens,!!t.loose),`<li>${r}</li>
|
|
186
|
+
`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>
|
|
187
|
+
`}table(t){let r="",i="";for(let o=0;o<t.header.length;o++)i+=this.tablecell(t.header[o]);r+=this.tablerow({text:i});let s="";for(let o=0;o<t.rows.length;o++){let a=t.rows[o];i="";for(let n=0;n<a.length;n++)i+=this.tablecell(a[n]);s+=this.tablerow({text:i})}return s&&(s=`<tbody>${s}</tbody>`),`<table>
|
|
188
|
+
<thead>
|
|
189
|
+
`+r+`</thead>
|
|
190
|
+
`+s+`</table>
|
|
191
|
+
`}tablerow({text:t}){return`<tr>
|
|
192
|
+
${t}</tr>
|
|
193
|
+
`}tablecell(t){let r=this.parser.parseInline(t.tokens),i=t.header?"th":"td";return(t.align?`<${i} align="${t.align}">`:`<${i}>`)+r+`</${i}>
|
|
194
|
+
`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${tr(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:r,tokens:i}){let s=this.parser.parseInline(i),o=ph(t);if(o===null)return s;t=o;let a='<a href="'+t+'"';return r&&(a+=' title="'+tr(r)+'"'),a+=">"+s+"</a>",a}image({href:t,title:r,text:i,tokens:s}){s&&(i=this.parser.parseInline(s,this.parser.textRenderer));let o=ph(t);if(o===null)return tr(i);t=o;let a=`<img src="${t}" alt="${i}"`;return r&&(a+=` title="${tr(r)}"`),a+=">",a}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:tr(t.text)}},Fn=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Xe=class qa{constructor(t){Kt(this,"options");Kt(this,"renderer");Kt(this,"textRenderer");this.options=t||Ur,this.options.renderer=this.options.renderer||new Zs,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new Fn}static parse(t,r){return new qa(r).parse(t)}static parseInline(t,r){return new qa(r).parseInline(t)}parse(t,r=!0){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let c=n,h=this.options.extensions.renderers[c.type].call({parser:this},c);if(h!==!1||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(c.type)){i+=h||"";continue}}let l=n;switch(l.type){case"space":{i+=this.renderer.space(l);continue}case"hr":{i+=this.renderer.hr(l);continue}case"heading":{i+=this.renderer.heading(l);continue}case"code":{i+=this.renderer.code(l);continue}case"table":{i+=this.renderer.table(l);continue}case"blockquote":{i+=this.renderer.blockquote(l);continue}case"list":{i+=this.renderer.list(l);continue}case"html":{i+=this.renderer.html(l);continue}case"def":{i+=this.renderer.def(l);continue}case"paragraph":{i+=this.renderer.paragraph(l);continue}case"text":{let c=l,h=this.renderer.text(c);for(;a+1<t.length&&t[a+1].type==="text";)c=t[++a],h+=`
|
|
195
|
+
`+this.renderer.text(c);r?i+=this.renderer.paragraph({type:"paragraph",raw:h,text:h,tokens:[{type:"text",raw:h,text:h,escaped:!0}]}):i+=h;continue}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}parseInline(t,r=this.renderer){var s,o;let i="";for(let a=0;a<t.length;a++){let n=t[a];if((o=(s=this.options.extensions)==null?void 0:s.renderers)!=null&&o[n.type]){let c=this.options.extensions.renderers[n.type].call({parser:this},n);if(c!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){i+=c||"";continue}}let l=n;switch(l.type){case"escape":{i+=r.text(l);break}case"html":{i+=r.html(l);break}case"link":{i+=r.link(l);break}case"image":{i+=r.image(l);break}case"strong":{i+=r.strong(l);break}case"em":{i+=r.em(l);break}case"codespan":{i+=r.codespan(l);break}case"br":{i+=r.br(l);break}case"del":{i+=r.del(l);break}case"text":{i+=r.text(l);break}default:{let c='Token with "'+l.type+'" type was not found.';if(this.options.silent)return console.error(c),"";throw new Error(c)}}}return i}},Is,Ui=(Is=class{constructor(t){Kt(this,"options");Kt(this,"block");this.options=t||Ur}preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?Ue.lex:Ue.lexInline}provideParser(){return this.block?Xe.parse:Xe.parseInline}},Kt(Is,"passThroughHooks",new Set(["preprocess","postprocess","processAllTokens","emStrongMask"])),Kt(Is,"passThroughHooksRespectAsync",new Set(["preprocess","postprocess","processAllTokens"])),Is),p0=class{constructor(...t){Kt(this,"defaults",Tn());Kt(this,"options",this.setOptions);Kt(this,"parse",this.parseMarkdown(!0));Kt(this,"parseInline",this.parseMarkdown(!1));Kt(this,"Parser",Xe);Kt(this,"Renderer",Zs);Kt(this,"TextRenderer",Fn);Kt(this,"Lexer",Ue);Kt(this,"Tokenizer",Ks);Kt(this,"Hooks",Ui);this.use(...t)}walkTokens(t,r){var s,o;let i=[];for(let a of t)switch(i=i.concat(r.call(this,a)),a.type){case"table":{let n=a;for(let l of n.header)i=i.concat(this.walkTokens(l.tokens,r));for(let l of n.rows)for(let c of l)i=i.concat(this.walkTokens(c.tokens,r));break}case"list":{let n=a;i=i.concat(this.walkTokens(n.items,r));break}default:{let n=a;(o=(s=this.defaults.extensions)==null?void 0:s.childTokens)!=null&&o[n.type]?this.defaults.extensions.childTokens[n.type].forEach(l=>{let c=n[l].flat(1/0);i=i.concat(this.walkTokens(c,r))}):n.tokens&&(i=i.concat(this.walkTokens(n.tokens,r)))}}return i}use(...t){let r=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(i=>{let s={...i};if(s.async=this.defaults.async||s.async||!1,i.extensions&&(i.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if("renderer"in o){let a=r.renderers[o.name];a?r.renderers[o.name]=function(...n){let l=o.renderer.apply(this,n);return l===!1&&(l=a.apply(this,n)),l}:r.renderers[o.name]=o.renderer}if("tokenizer"in o){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");let a=r[o.level];a?a.unshift(o.tokenizer):r[o.level]=[o.tokenizer],o.start&&(o.level==="block"?r.startBlock?r.startBlock.push(o.start):r.startBlock=[o.start]:o.level==="inline"&&(r.startInline?r.startInline.push(o.start):r.startInline=[o.start]))}"childTokens"in o&&o.childTokens&&(r.childTokens[o.name]=o.childTokens)}),s.extensions=r),i.renderer){let o=this.defaults.renderer||new Zs(this.defaults);for(let a in i.renderer){if(!(a in o))throw new Error(`renderer '${a}' does not exist`);if(["options","parser"].includes(a))continue;let n=a,l=i.renderer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d||""}}s.renderer=o}if(i.tokenizer){let o=this.defaults.tokenizer||new Ks(this.defaults);for(let a in i.tokenizer){if(!(a in o))throw new Error(`tokenizer '${a}' does not exist`);if(["options","rules","lexer"].includes(a))continue;let n=a,l=i.tokenizer[n],c=o[n];o[n]=(...h)=>{let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.tokenizer=o}if(i.hooks){let o=this.defaults.hooks||new Ui;for(let a in i.hooks){if(!(a in o))throw new Error(`hook '${a}' does not exist`);if(["options","block"].includes(a))continue;let n=a,l=i.hooks[n],c=o[n];Ui.passThroughHooks.has(a)?o[n]=h=>{if(this.defaults.async&&Ui.passThroughHooksRespectAsync.has(a))return(async()=>{let u=await l.call(o,h);return c.call(o,u)})();let d=l.call(o,h);return c.call(o,d)}:o[n]=(...h)=>{if(this.defaults.async)return(async()=>{let u=await l.apply(o,h);return u===!1&&(u=await c.apply(o,h)),u})();let d=l.apply(o,h);return d===!1&&(d=c.apply(o,h)),d}}s.hooks=o}if(i.walkTokens){let o=this.defaults.walkTokens,a=i.walkTokens;s.walkTokens=function(n){let l=[];return l.push(a.call(this,n)),o&&(l=l.concat(o.call(this,n))),l}}this.defaults={...this.defaults,...s}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,r){return Ue.lex(t,r??this.defaults)}parser(t,r){return Xe.parse(t,r??this.defaults)}parseMarkdown(t){return(r,i)=>{let s={...i},o={...this.defaults,...s},a=this.onError(!!o.silent,!!o.async);if(this.defaults.async===!0&&s.async===!1)return a(new 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 r>"u"||r===null)return a(new Error("marked(): input parameter is undefined or null"));if(typeof r!="string")return a(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(r)+", string expected"));if(o.hooks&&(o.hooks.options=o,o.hooks.block=t),o.async)return(async()=>{let n=o.hooks?await o.hooks.preprocess(r):r,l=await(o.hooks?await o.hooks.provideLexer():t?Ue.lex:Ue.lexInline)(n,o),c=o.hooks?await o.hooks.processAllTokens(l):l;o.walkTokens&&await Promise.all(this.walkTokens(c,o.walkTokens));let h=await(o.hooks?await o.hooks.provideParser():t?Xe.parse:Xe.parseInline)(c,o);return o.hooks?await o.hooks.postprocess(h):h})().catch(a);try{o.hooks&&(r=o.hooks.preprocess(r));let n=(o.hooks?o.hooks.provideLexer():t?Ue.lex:Ue.lexInline)(r,o);o.hooks&&(n=o.hooks.processAllTokens(n)),o.walkTokens&&this.walkTokens(n,o.walkTokens);let l=(o.hooks?o.hooks.provideParser():t?Xe.parse:Xe.parseInline)(n,o);return o.hooks&&(l=o.hooks.postprocess(l)),l}catch(n){return a(n)}}}onError(t,r){return i=>{if(i.message+=`
|
|
196
|
+
Please report this to https://github.com/markedjs/marked.`,t){let s="<p>An error occurred:</p><pre>"+tr(i.message+"",!0)+"</pre>";return r?Promise.resolve(s):s}if(r)return Promise.reject(i);throw i}}},zr=new p0;function Gt(e,t){return zr.parse(e,t)}Gt.options=Gt.setOptions=function(e){return zr.setOptions(e),Gt.defaults=zr.defaults,Vd(Gt.defaults),Gt};Gt.getDefaults=Tn;Gt.defaults=Ur;Gt.use=function(...e){return zr.use(...e),Gt.defaults=zr.defaults,Vd(Gt.defaults),Gt};Gt.walkTokens=function(e,t){return zr.walkTokens(e,t)};Gt.parseInline=zr.parseInline;Gt.Parser=Xe;Gt.parser=Xe.parse;Gt.Renderer=Zs;Gt.TextRenderer=Fn;Gt.Lexer=Ue;Gt.lexer=Ue.lex;Gt.Tokenizer=Ks;Gt.Hooks=Ui;Gt.parse=Gt;Gt.options;Gt.setOptions;Gt.use;Gt.walkTokens;Gt.parseInline;Xe.parse;Ue.lex;var Na=typeof performance<"u"&&typeof performance.now=="function",Qr=f(()=>Na?performance.now():0,"now"),No="🧜 ",f0="Mermaid render",m0="Mermaid",y0={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"},Si;Si=class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,r){if(!this.enabled)return r();const i=Qr();try{return r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Qr()-i)}}async tick(t,r){if(!this.enabled)return r();const i=Qr();try{return await r()}finally{this.buckets[t]=(this.buckets[t]??0)+(Qr()-i)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),r=this.runLabel??(t==null?void 0:t.name);return t&&(this.records.push({label:r??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,r)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const r={name:t,start:Qr(),duration:-1,children:[]},i=this.stack.at(-1);if(i?i.children.push(r):this.roots.push(r),this.stack.push(r),Na&&typeof performance.mark=="function")try{performance.mark(`${No}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const r=Qr();if(t.duration=r-t.start,Na&&typeof performance.measure=="function")try{performance.measure(`${No}${t.name}`,{start:t.start,end:r,detail:{devtools:{dataType:"track-entry",track:f0,trackGroup:m0,color:y0[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,r){if(!this.enabled)return r();this.begin(t);try{return await r()}finally{this.end()}}report(){var t;return((t=this.records.at(-1))==null?void 0:t.tree)??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),r){if(!t)return;const i=t.duration,s=r&&r!==t.name?`${t.name} [${r}]`:t.name,o=["ms % phase"],a=f((l,c)=>{const h=" ".repeat(c),d=l.duration.toFixed(1).padStart(8),u=i>0?`${(l.duration/i*100).toFixed(0).padStart(3)}%`:" -";o.push(`${d} ${u} ${h}${l.name}`);for(const g of l.children)a(g,c+1);if(l.children.length>0){const g=l.children.reduce((C,x)=>C+x.duration,0),p=l.duration-g;if(p>.5){const C=p.toFixed(1).padStart(8);o.push(`${C} ${h} (self)`)}}},"walk");a(t,0);const n=Object.keys(this.buckets);if(n.length>0){o.push("—— buckets (summed) ——");for(const l of n)o.push(`${this.buckets[l].toFixed(1).padStart(8)} ${l}`)}console.log(`${No}mermaid render profile · ${s}
|
|
197
|
+
${o.join(`
|
|
198
|
+
`)}`)}},f(Si,"Profiler");globalThis.injected??(globalThis.injected={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"});var C0=Eb.extend({raf(e){typeof queueMicrotask=="function"?queueMicrotask(e):setTimeout(e,0)}}).extend(Mb),Hr=C0;function au(e,{markdownAutoWrap:t}){const i=e.replace(/<br\/>/g,`
|
|
199
|
+
`).replace(/\n{2,}/g,`
|
|
200
|
+
`);return Jc(i)}f(au,"preprocessMarkdown");function nu(e){return e.split(/\\n|\n|<br\s*\/?>/gi).map(t=>{var r;return((r=t.trim().match(/<[^>]+>|[^\s<>]+/g))==null?void 0:r.map(i=>({content:i,type:"normal"})))??[]})}f(nu,"nonMarkdownToLines");function lu(e,t={}){const r=au(e,t),i=Gt.lexer(r),s=[[]];let o=0;function a(n,l="normal"){n.type==="text"?n.text.split(`
|
|
201
|
+
`).forEach((h,d)=>{d!==0&&(o++,s.push([])),h.split(" ").forEach(u=>{u=u.replace(/'/g,"'"),u&&s[o].push({content:u,type:l})})}):n.type==="strong"||n.type==="em"?n.tokens.forEach(c=>{a(c,n.type)}):n.type==="html"&&s[o].push({content:n.text,type:"normal"})}return f(a,"processNode"),i.forEach(n=>{var l;n.type==="paragraph"?(l=n.tokens)==null||l.forEach(c=>{a(c)}):n.type==="html"?s[o].push({content:n.text,type:"normal"}):s[o].push({content:n.raw,type:"normal"})}),s}f(lu,"markdownToLines");function hu(e){return e?`<p>${e.replace(/\\n|\n/g,"<br />")}</p>`:""}f(hu,"nonMarkdownToHTML");function cu(e,{markdownAutoWrap:t}={}){const r=Gt.lexer(e);function i(s){var o,a,n;return s.type==="text"?t===!1?s.text.replace(/\n */g,"<br/>").replace(/ /g," "):s.text.replace(/\n */g,"<br/>"):s.type==="strong"?`<strong>${(o=s.tokens)==null?void 0:o.map(i).join("")}</strong>`:s.type==="em"?`<em>${(a=s.tokens)==null?void 0:a.map(i).join("")}</em>`:s.type==="paragraph"?`<p>${(n=s.tokens)==null?void 0:n.map(i).join("")}</p>`:s.type==="space"?"":s.type==="html"?`${s.text}`:s.type==="escape"?s.text:(R.warn(`Unsupported markdown: ${s.type}`),s.raw)}return f(i,"output"),r.map(i).join("")}f(cu,"markdownToHTML");function du(e){return Intl.Segmenter?[...new Intl.Segmenter().segment(e)].map(t=>t.segment):[...e]}f(du,"splitTextToChars");function uu(e,t){const r=du(t.content);return Mn(e,[],r,t.type)}f(uu,"splitWordToFitWidth");function Mn(e,t,r,i){if(r.length===0)return[{content:t.join(""),type:i},{content:"",type:i}];const[s,...o]=r,a=[...t,s];return e([{content:a.join(""),type:i}])?Mn(e,a,o,i):(t.length===0&&s&&(t.push(s),r.shift()),[{content:t.join(""),type:i},{content:r.join(""),type:i}])}f(Mn,"splitWordToFitWidthRecursion");function gu(e,t){if(e.some(({content:r})=>r.includes(`
|
|
202
|
+
`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return Qs(e,t)}f(gu,"splitLineToFitWidth");function Qs(e,t,r=[],i=[]){if(e.length===0)return i.length>0&&r.push(i),r.length>0?r:[];let s="";e[0].content===" "&&(s=" ",e.shift());const o=e.shift()??{content:" ",type:"normal"},a=[...i];if(s!==""&&a.push({content:s,type:"normal"}),a.push(o),t(a))return Qs(e,t,r,a);if(i.length>0)r.push(i),e.unshift(o);else if(o.content){const[n,l]=uu(t,o);r.push([n]),l.content&&e.unshift(l)}return Qs(e,t,r)}f(Qs,"splitLineToFitWidthRecursion");function Wa(e,t){t&&e.attr("style",t)}f(Wa,"applyStyle");var yh=16384;async function pu(e,t,r,i,s=!1,o=Jt()){const a=e.append("foreignObject");a.attr("width",`${Math.min(10*r,yh)}px`),a.attr("height",`${Math.min(10*r,yh)}px`);const n=a.append("xhtml:div"),l=rs(t.label)?await vd(t.label.replace(hs.lineBreakRegex,`
|
|
203
|
+
`),o):qe(t.label,o),c=t.isNode?"nodeLabel":"edgeLabel",h=n.append("span");return h.html(l),Wa(h,t.labelStyle),h.attr("class",`${c} ${i}`),Wa(n,t.labelStyle),n.style("display","table-cell"),n.style("white-space","nowrap"),n.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(n.style("max-width",r+"px"),n.style("text-align","center")),n.attr("xmlns","http://www.w3.org/1999/xhtml"),s&&n.attr("class","labelBkg"),(await Hr.measure(()=>n.node().getBoundingClientRect())).width===r&&(n.style("display","table"),n.style("white-space","break-spaces"),n.style("width",r+"px")),a.node()}f(pu,"addHtmlSpan");function uo(e,t,r,i=!1){const s=e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em");return i&&s.attr("text-anchor","middle"),s}f(uo,"createTspan");function fu(e,t,r){const i=e.append("text"),s=uo(i,1,t);go(s,r);const o=s.node().getComputedTextLength();return i.remove(),o}f(fu,"computeWidthOfText");function x0(e,t,r){var a;const i=e.append("text"),s=uo(i,1,t);go(s,[{content:r,type:"normal"}]);const o=(a=s.node())==null?void 0:a.getBoundingClientRect();return o&&i.remove(),o}f(x0,"computeDimensionOfText");function mu(e,t,r,i=!1,s=!1){const a=t.append("g"),n=a.insert("rect").attr("class","background").attr("style","stroke: none"),l=a.append("text").attr("y","-10.1");s&&l.attr("text-anchor","middle");let c=0;for(const h of r){const d=f(g=>fu(a,1.1,g)<=e,"checkWidth"),u=d(h)?[h]:gu(h,d);for(const g of u){const p=uo(l,c,1.1,s);go(p,g),c++}}if(i){const h=l.node().getBBox(),d=2;return n.attr("x",h.x-d).attr("y",h.y-d).attr("width",h.width+2*d).attr("height",h.height+2*d),a.node()}else return l.node()}f(mu,"createFormattedText");function za(e){const t=/&(amp|lt|gt);/g;return e.replace(t,(r,i)=>{switch(i){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return r}})}f(za,"decodeHTMLEntities");function go(e,t){e.text(""),t.forEach((r,i)=>{const s=e.append("tspan").attr("font-style",r.type==="em"?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight",r.type==="strong"?"bold":"normal");i===0?s.text(za(r.content)):s.text(" "+za(r.content))})}f(go,"updateTextContentAndStyles");async function yu(e,t={}){const r=[];e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(s,o,a)=>(r.push((async()=>{const n=`${o}:${a}`;return await _x(n)?await cs(n,void 0,{class:"label-icon"}):`<i class='${qe(s,t).replace(":"," ")}'></i>`})()),s));const i=await Promise.all(r);return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>i.shift()??"")}f(yu,"replaceIconSubstring");var Ve=f(async(e,t="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:o=!0,markdown:a=!0,isNode:n=!0,width:l=200,addSvgBackground:c=!1}={},h)=>{if(R.debug("XYZ createText",t,r,i,s,o,n,"addSvgBackground: ",c),o){const d=a?cu(t,h):hu(t),u=await yu(Tr(d),h),g=t.replace(/\\\\/g,"\\"),p={isNode:n,label:rs(t)?g:u,labelStyle:r.replace("fill:","color:")};return await pu(e,p,l,s,c,h)}else{const d=Tr(t.replace(/<br\s*\/?>/g,"<br/>")),u=a?lu(d.replace("<br>","<br/>"),h):nu(d),g=mu(l,e,u,t?c:!1,!n);if(n){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Dt(g).attr("style",p)}else{const p=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");Dt(g).select("rect").attr("style",p.replace(/background:/g,"fill:"));const C=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");Dt(g).select("text").attr("style",C)}return i?Dt(g).selectAll("tspan.text-outer-tspan").classed("title-row",!0):Dt(g).selectAll("tspan.text-outer-tspan").classed("row",!0),g}},"createText");function Wo(e,t,r){if(e&&e.length){const[i,s]=t,o=Math.PI/180*r,a=Math.cos(o),n=Math.sin(o);for(const l of e){const[c,h]=l;l[0]=(c-i)*a-(h-s)*n+i,l[1]=(c-i)*n+(h-s)*a+s}}}function b0(e,t){return e[0]===t[0]&&e[1]===t[1]}function k0(e,t,r,i=1){const s=r,o=Math.max(t,.1),a=e[0]&&e[0][0]&&typeof e[0][0]=="number"?[e]:e,n=[0,0];if(s)for(const c of a)Wo(c,n,s);const l=(function(c,h,d){const u=[];for(const b of c){const S=[...b];b0(S[0],S[S.length-1])||S.push([S[0][0],S[0][1]]),S.length>2&&u.push(S)}const g=[];h=Math.max(h,.1);const p=[];for(const b of u)for(let S=0;S<b.length-1;S++){const w=b[S],L=b[S+1];if(w[1]!==L[1]){const A=Math.min(w[1],L[1]);p.push({ymin:A,ymax:Math.max(w[1],L[1]),x:A===w[1]?w[0]:L[0],islope:(L[0]-w[0])/(L[1]-w[1])})}}if(p.sort(((b,S)=>b.ymin<S.ymin?-1:b.ymin>S.ymin?1:b.x<S.x?-1:b.x>S.x?1:b.ymax===S.ymax?0:(b.ymax-S.ymax)/Math.abs(b.ymax-S.ymax))),!p.length)return g;let C=[],x=p[0].ymin,y=0;for(;C.length||p.length;){if(p.length){let b=-1;for(let S=0;S<p.length&&!(p[S].ymin>x);S++)b=S;p.splice(0,b+1).forEach((S=>{C.push({s:x,edge:S})}))}if(C=C.filter((b=>!(b.edge.ymax<=x))),C.sort(((b,S)=>b.edge.x===S.edge.x?0:(b.edge.x-S.edge.x)/Math.abs(b.edge.x-S.edge.x))),(d!==1||y%h==0)&&C.length>1)for(let b=0;b<C.length;b+=2){const S=b+1;if(S>=C.length)break;const w=C[b].edge,L=C[S].edge;g.push([[Math.round(w.x),x],[Math.round(L.x),x]])}x+=d,C.forEach((b=>{b.edge.x=b.edge.x+d*b.edge.islope})),y++}return g})(a,o,i);if(s){for(const c of a)Wo(c,n,-s);(function(c,h,d){const u=[];c.forEach((g=>u.push(...g))),Wo(u,h,d)})(l,n,-s)}return l}function gs(e,t){var r;const i=t.hachureAngle+90;let s=t.hachureGap;s<0&&(s=4*t.strokeWidth),s=Math.round(Math.max(s,.1));let o=1;return t.roughness>=1&&(((r=t.randomizer)===null||r===void 0?void 0:r.next())||Math.random())>.7&&(o=s),k0(e,s,i,o||1)}class On{constructor(t){this.helper=t}fillPolygons(t,r){return this._fillPolygons(t,r)}_fillPolygons(t,r){const i=gs(t,r);return{type:"fillSketch",ops:this.renderLines(i,r)}}renderLines(t,r){const i=[];for(const s of t)i.push(...this.helper.doubleLineOps(s[0][0],s[0][1],s[1][0],s[1][1],r));return i}}function po(e){const t=e[0],r=e[1];return Math.sqrt(Math.pow(t[0]-r[0],2)+Math.pow(t[1]-r[1],2))}class S0 extends On{fillPolygons(t,r){let i=r.hachureGap;i<0&&(i=4*r.strokeWidth),i=Math.max(i,.1);const s=gs(t,Object.assign({},r,{hachureGap:i})),o=Math.PI/180*r.hachureAngle,a=[],n=.5*i*Math.cos(o),l=.5*i*Math.sin(o);for(const[c,h]of s)po([c,h])&&a.push([[c[0]-n,c[1]+l],[...h]],[[c[0]+n,c[1]-l],[...h]]);return{type:"fillSketch",ops:this.renderLines(a,r)}}}class T0 extends On{fillPolygons(t,r){const i=this._fillPolygons(t,r),s=Object.assign({},r,{hachureAngle:r.hachureAngle+90}),o=this._fillPolygons(t,s);return i.ops=i.ops.concat(o.ops),i}}class w0{constructor(t){this.helper=t}fillPolygons(t,r){const i=gs(t,r=Object.assign({},r,{hachureAngle:0}));return this.dotsOnLines(i,r)}dotsOnLines(t,r){const i=[];let s=r.hachureGap;s<0&&(s=4*r.strokeWidth),s=Math.max(s,.1);let o=r.fillWeight;o<0&&(o=r.strokeWidth/2);const a=s/4;for(const n of t){const l=po(n),c=l/s,h=Math.ceil(c)-1,d=l-h*s,u=(n[0][0]+n[1][0])/2-s/4,g=Math.min(n[0][1],n[1][1]);for(let p=0;p<h;p++){const C=g+d+p*s,x=u-a+2*Math.random()*a,y=C-a+2*Math.random()*a,b=this.helper.ellipse(x,y,o,o,r);i.push(...b.ops)}}return{type:"fillSketch",ops:i}}}class B0{constructor(t){this.helper=t}fillPolygons(t,r){const i=gs(t,r);return{type:"fillSketch",ops:this.dashedLine(i,r)}}dashedLine(t,r){const i=r.dashOffset<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashOffset,s=r.dashGap<0?r.hachureGap<0?4*r.strokeWidth:r.hachureGap:r.dashGap,o=[];return t.forEach((a=>{const n=po(a),l=Math.floor(n/(i+s)),c=(n+s-l*(i+s))/2;let h=a[0],d=a[1];h[0]>d[0]&&(h=a[1],d=a[0]);const u=Math.atan((d[1]-h[1])/(d[0]-h[0]));for(let g=0;g<l;g++){const p=g*(i+s),C=p+i,x=[h[0]+p*Math.cos(u)+c*Math.cos(u),h[1]+p*Math.sin(u)+c*Math.sin(u)],y=[h[0]+C*Math.cos(u)+c*Math.cos(u),h[1]+C*Math.sin(u)+c*Math.sin(u)];o.push(...this.helper.doubleLineOps(x[0],x[1],y[0],y[1],r))}})),o}}class L0{constructor(t){this.helper=t}fillPolygons(t,r){const i=r.hachureGap<0?4*r.strokeWidth:r.hachureGap,s=r.zigzagOffset<0?i:r.zigzagOffset,o=gs(t,r=Object.assign({},r,{hachureGap:i+s}));return{type:"fillSketch",ops:this.zigzagLines(o,s,r)}}zigzagLines(t,r,i){const s=[];return t.forEach((o=>{const a=po(o),n=Math.round(a/(2*r));let l=o[0],c=o[1];l[0]>c[0]&&(l=o[1],c=o[0]);const h=Math.atan((c[1]-l[1])/(c[0]-l[0]));for(let d=0;d<n;d++){const u=2*d*r,g=2*(d+1)*r,p=Math.sqrt(2*Math.pow(r,2)),C=[l[0]+u*Math.cos(h),l[1]+u*Math.sin(h)],x=[l[0]+g*Math.cos(h),l[1]+g*Math.sin(h)],y=[C[0]+p*Math.cos(h+Math.PI/4),C[1]+p*Math.sin(h+Math.PI/4)];s.push(...this.helper.doubleLineOps(C[0],C[1],y[0],y[1],i),...this.helper.doubleLineOps(y[0],y[1],x[0],x[1],i))}})),s}}const Ae={};class v0{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const A0=0,zo=1,Ch=2,As={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 Ho(e,t){return e.type===t}function In(e){const t=[],r=(function(a){const n=new Array;for(;a!=="";)if(a.match(/^([ \t\r\n,]+)/))a=a.substr(RegExp.$1.length);else if(a.match(/^([aAcChHlLmMqQsStTvVzZ])/))n[n.length]={type:A0,text:RegExp.$1},a=a.substr(RegExp.$1.length);else{if(!a.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];n[n.length]={type:zo,text:`${parseFloat(RegExp.$1)}`},a=a.substr(RegExp.$1.length)}return n[n.length]={type:Ch,text:""},n})(e);let i="BOD",s=0,o=r[s];for(;!Ho(o,Ch);){let a=0;const n=[];if(i==="BOD"){if(o.text!=="M"&&o.text!=="m")return In("M0,0"+e);s++,a=As[o.text],i=o.text}else Ho(o,zo)?a=As[i]:(s++,a=As[o.text],i=o.text);if(!(s+a<r.length))throw new Error("Path data ended short");for(let l=s;l<s+a;l++){const c=r[l];if(!Ho(c,zo))throw new Error("Param not a number: "+i+","+c.text);n[n.length]=+c.text}if(typeof As[i]!="number")throw new Error("Bad segment: "+i);{const l={key:i,data:n};t.push(l),s+=a,o=r[s],i==="M"&&(i="L"),i==="m"&&(i="l")}}return t}function Cu(e){let t=0,r=0,i=0,s=0;const o=[];for(const{key:a,data:n}of e)switch(a){case"M":o.push({key:"M",data:[...n]}),[t,r]=n,[i,s]=n;break;case"m":t+=n[0],r+=n[1],o.push({key:"M",data:[t,r]}),i=t,s=r;break;case"L":o.push({key:"L",data:[...n]}),[t,r]=n;break;case"l":t+=n[0],r+=n[1],o.push({key:"L",data:[t,r]});break;case"C":o.push({key:"C",data:[...n]}),t=n[4],r=n[5];break;case"c":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"C",data:l}),t=l[4],r=l[5];break}case"Q":o.push({key:"Q",data:[...n]}),t=n[2],r=n[3];break;case"q":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"Q",data:l}),t=l[2],r=l[3];break}case"A":o.push({key:"A",data:[...n]}),t=n[5],r=n[6];break;case"a":t+=n[5],r+=n[6],o.push({key:"A",data:[n[0],n[1],n[2],n[3],n[4],t,r]});break;case"H":o.push({key:"H",data:[...n]}),t=n[0];break;case"h":t+=n[0],o.push({key:"H",data:[t]});break;case"V":o.push({key:"V",data:[...n]}),r=n[0];break;case"v":r+=n[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...n]}),t=n[2],r=n[3];break;case"s":{const l=n.map(((c,h)=>h%2?c+r:c+t));o.push({key:"S",data:l}),t=l[2],r=l[3];break}case"T":o.push({key:"T",data:[...n]}),t=n[0],r=n[1];break;case"t":t+=n[0],r+=n[1],o.push({key:"T",data:[t,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),t=i,r=s}return o}function xu(e){const t=[];let r="",i=0,s=0,o=0,a=0,n=0,l=0;for(const{key:c,data:h}of e){switch(c){case"M":t.push({key:"M",data:[...h]}),[i,s]=h,[o,a]=h;break;case"C":t.push({key:"C",data:[...h]}),i=h[4],s=h[5],n=h[2],l=h[3];break;case"L":t.push({key:"L",data:[...h]}),[i,s]=h;break;case"H":i=h[0],t.push({key:"L",data:[i,s]});break;case"V":s=h[0],t.push({key:"L",data:[i,s]});break;case"S":{let d=0,u=0;r==="C"||r==="S"?(d=i+(i-n),u=s+(s-l)):(d=i,u=s),t.push({key:"C",data:[d,u,...h]}),n=h[0],l=h[1],i=h[2],s=h[3];break}case"T":{const[d,u]=h;let g=0,p=0;r==="Q"||r==="T"?(g=i+(i-n),p=s+(s-l)):(g=i,p=s);const C=i+2*(g-i)/3,x=s+2*(p-s)/3,y=d+2*(g-d)/3,b=u+2*(p-u)/3;t.push({key:"C",data:[C,x,y,b,d,u]}),n=g,l=p,i=d,s=u;break}case"Q":{const[d,u,g,p]=h,C=i+2*(d-i)/3,x=s+2*(u-s)/3,y=g+2*(d-g)/3,b=p+2*(u-p)/3;t.push({key:"C",data:[C,x,y,b,g,p]}),n=d,l=u,i=g,s=p;break}case"A":{const d=Math.abs(h[0]),u=Math.abs(h[1]),g=h[2],p=h[3],C=h[4],x=h[5],y=h[6];d===0||u===0?(t.push({key:"C",data:[i,s,x,y,x,y]}),i=x,s=y):(i!==x||s!==y)&&(bu(i,s,x,y,d,u,g,p,C).forEach((function(b){t.push({key:"C",data:b})})),i=x,s=y);break}case"Z":t.push({key:"Z",data:[]}),i=o,s=a}r=c}return t}function Ni(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function bu(e,t,r,i,s,o,a,n,l,c){const h=(d=a,Math.PI*d/180);var d;let u=[],g=0,p=0,C=0,x=0;if(c)[g,p,C,x]=c;else{[e,t]=Ni(e,t,-h),[r,i]=Ni(r,i,-h);const N=(e-r)/2,H=(t-i)/2;let G=N*N/(s*s)+H*H/(o*o);G>1&&(G=Math.sqrt(G),s*=G,o*=G);const F=s*s,Q=o*o,$=F*Q-F*H*H-Q*N*N,Y=F*H*H+Q*N*N,at=(n===l?-1:1)*Math.sqrt(Math.abs($/Y));C=at*s*H/o+(e+r)/2,x=at*-o*N/s+(t+i)/2,g=Math.asin(parseFloat(((t-x)/o).toFixed(9))),p=Math.asin(parseFloat(((i-x)/o).toFixed(9))),e<C&&(g=Math.PI-g),r<C&&(p=Math.PI-p),g<0&&(g=2*Math.PI+g),p<0&&(p=2*Math.PI+p),l&&g>p&&(g-=2*Math.PI),!l&&p>g&&(p-=2*Math.PI)}let y=p-g;if(Math.abs(y)>120*Math.PI/180){const N=p,H=r,G=i;p=l&&p>g?g+120*Math.PI/180*1:g+120*Math.PI/180*-1,u=bu(r=C+s*Math.cos(p),i=x+o*Math.sin(p),H,G,s,o,a,0,l,[p,N,C,x])}y=p-g;const b=Math.cos(g),S=Math.sin(g),w=Math.cos(p),L=Math.sin(p),A=Math.tan(y/4),v=4/3*s*A,E=4/3*o*A,D=[e,t],q=[e+v*S,t-E*b],U=[r+v*L,i-E*w],st=[r,i];if(q[0]=2*D[0]-q[0],q[1]=2*D[1]-q[1],c)return[q,U,st].concat(u);{u=[q,U,st].concat(u);const N=[];for(let H=0;H<u.length;H+=3){const G=Ni(u[H][0],u[H][1],h),F=Ni(u[H+1][0],u[H+1][1],h),Q=Ni(u[H+2][0],u[H+2][1],h);N.push([G[0],G[1],F[0],F[1],Q[0],Q[1]])}return N}}const E0={randOffset:function(e,t){return Ft(e,t)},randOffsetWithRange:function(e,t,r){return Js(e,t,r)},ellipse:function(e,t,r,i,s){const o=Su(r,i,s);return Ha(e,t,s,o).opset},doubleLineOps:function(e,t,r,i,s){return wr(e,t,r,i,s,!0)}};function ku(e,t,r,i,s){return{type:"path",ops:wr(e,t,r,i,s)}}function Ns(e,t,r){const i=(e||[]).length;if(i>2){const s=[];for(let o=0;o<i-1;o++)s.push(...wr(e[o][0],e[o][1],e[o+1][0],e[o+1][1],r));return t&&s.push(...wr(e[i-1][0],e[i-1][1],e[0][0],e[0][1],r)),{type:"path",ops:s}}return i===2?ku(e[0][0],e[0][1],e[1][0],e[1][1],r):{type:"path",ops:[]}}function _0(e,t,r,i,s){return(function(o,a){return Ns(o,!0,a)})([[e,t],[e+r,t],[e+r,t+i],[e,t+i]],s)}function xh(e,t){if(e.length){const r=typeof e[0][0]=="number"?[e]:e,i=Es(r[0],1*(1+.2*t.roughness),t),s=t.disableMultiStroke?[]:Es(r[0],1.5*(1+.22*t.roughness),Sh(t));for(let o=1;o<r.length;o++){const a=r[o];if(a.length){const n=Es(a,1*(1+.2*t.roughness),t),l=t.disableMultiStroke?[]:Es(a,1.5*(1+.22*t.roughness),Sh(t));for(const c of n)c.op!=="move"&&i.push(c);for(const c of l)c.op!=="move"&&s.push(c)}}return{type:"path",ops:i.concat(s)}}return{type:"path",ops:[]}}function Su(e,t,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(e/2,2)+Math.pow(t/2,2))/2)),s=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/s;let a=Math.abs(e/2),n=Math.abs(t/2);const l=1-r.curveFitting;return a+=Ft(a*l,r),n+=Ft(n*l,r),{increment:o,rx:a,ry:n}}function Ha(e,t,r,i){const[s,o]=Th(i.increment,e,t,i.rx,i.ry,1,i.increment*Js(.1,Js(.4,1,r),r),r);let a=to(s,null,r);if(!r.disableMultiStroke&&r.roughness!==0){const[n]=Th(i.increment,e,t,i.rx,i.ry,1.5,0,r),l=to(n,null,r);a=a.concat(l)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function bh(e,t,r,i,s,o,a,n,l){const c=e,h=t;let d=Math.abs(r/2),u=Math.abs(i/2);d+=Ft(.01*d,l),u+=Ft(.01*u,l);let g=s,p=o;for(;g<0;)g+=2*Math.PI,p+=2*Math.PI;p-g>2*Math.PI&&(g=0,p=2*Math.PI);const C=2*Math.PI/l.curveStepCount,x=Math.min(C/2,(p-g)/2),y=wh(x,c,h,d,u,g,p,1,l);if(!l.disableMultiStroke){const b=wh(x,c,h,d,u,g,p,1.5,l);y.push(...b)}return a&&(n?y.push(...wr(c,h,c+d*Math.cos(g),h+u*Math.sin(g),l),...wr(c,h,c+d*Math.cos(p),h+u*Math.sin(p),l)):y.push({op:"lineTo",data:[c,h]},{op:"lineTo",data:[c+d*Math.cos(g),h+u*Math.sin(g)]})),{type:"path",ops:y}}function kh(e,t){const r=xu(Cu(In(e))),i=[];let s=[0,0],o=[0,0];for(const{key:a,data:n}of r)switch(a){case"M":o=[n[0],n[1]],s=[n[0],n[1]];break;case"L":i.push(...wr(o[0],o[1],n[0],n[1],t)),o=[n[0],n[1]];break;case"C":{const[l,c,h,d,u,g]=n;i.push(...F0(l,c,h,d,u,g,o,t)),o=[u,g];break}case"Z":i.push(...wr(o[0],o[1],s[0],s[1],t)),o=[s[0],s[1]]}return{type:"path",ops:i}}function Yo(e,t){const r=[];for(const i of e)if(i.length){const s=t.maxRandomnessOffset||0,o=i.length;if(o>2){r.push({op:"move",data:[i[0][0]+Ft(s,t),i[0][1]+Ft(s,t)]});for(let a=1;a<o;a++)r.push({op:"lineTo",data:[i[a][0]+Ft(s,t),i[a][1]+Ft(s,t)]})}}return{type:"fillPath",ops:r}}function Jr(e,t){return(function(r,i){let s=r.fillStyle||"hachure";if(!Ae[s])switch(s){case"zigzag":Ae[s]||(Ae[s]=new S0(i));break;case"cross-hatch":Ae[s]||(Ae[s]=new T0(i));break;case"dots":Ae[s]||(Ae[s]=new w0(i));break;case"dashed":Ae[s]||(Ae[s]=new B0(i));break;case"zigzag-line":Ae[s]||(Ae[s]=new L0(i));break;default:s="hachure",Ae[s]||(Ae[s]=new On(i))}return Ae[s]})(t,E0).fillPolygons(e,t)}function Sh(e){const t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function Tu(e){return e.randomizer||(e.randomizer=new v0(e.seed||0)),e.randomizer.next()}function Js(e,t,r,i=1){return r.roughness*i*(Tu(r)*(t-e)+e)}function Ft(e,t,r=1){return Js(-e,e,t,r)}function wr(e,t,r,i,s,o=!1){const a=o?s.disableMultiStrokeFill:s.disableMultiStroke,n=Ya(e,t,r,i,s,!0,!1);if(a)return n;const l=Ya(e,t,r,i,s,!0,!0);return n.concat(l)}function Ya(e,t,r,i,s,o,a){const n=Math.pow(e-r,2)+Math.pow(t-i,2),l=Math.sqrt(n);let c=1;c=l<200?1:l>500?.4:-.0016668*l+1.233334;let h=s.maxRandomnessOffset||0;h*h*100>n&&(h=l/10);const d=h/2,u=.2+.2*Tu(s);let g=s.bowing*s.maxRandomnessOffset*(i-t)/200,p=s.bowing*s.maxRandomnessOffset*(e-r)/200;g=Ft(g,s,c),p=Ft(p,s,c);const C=[],x=()=>Ft(d,s,c),y=()=>Ft(h,s,c),b=s.preserveVertices;return a?C.push({op:"move",data:[e+(b?0:x()),t+(b?0:x())]}):C.push({op:"move",data:[e+(b?0:Ft(h,s,c)),t+(b?0:Ft(h,s,c))]}),a?C.push({op:"bcurveTo",data:[g+e+(r-e)*u+x(),p+t+(i-t)*u+x(),g+e+2*(r-e)*u+x(),p+t+2*(i-t)*u+x(),r+(b?0:x()),i+(b?0:x())]}):C.push({op:"bcurveTo",data:[g+e+(r-e)*u+y(),p+t+(i-t)*u+y(),g+e+2*(r-e)*u+y(),p+t+2*(i-t)*u+y(),r+(b?0:y()),i+(b?0:y())]}),C}function Es(e,t,r){if(!e.length)return[];const i=[];i.push([e[0][0]+Ft(t,r),e[0][1]+Ft(t,r)]),i.push([e[0][0]+Ft(t,r),e[0][1]+Ft(t,r)]);for(let s=1;s<e.length;s++)i.push([e[s][0]+Ft(t,r),e[s][1]+Ft(t,r)]),s===e.length-1&&i.push([e[s][0]+Ft(t,r),e[s][1]+Ft(t,r)]);return to(i,null,r)}function to(e,t,r){const i=e.length,s=[];if(i>3){const o=[],a=1-r.curveTightness;s.push({op:"move",data:[e[1][0],e[1][1]]});for(let n=1;n+2<i;n++){const l=e[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*e[n+1][0]-a*e[n-1][0])/6,l[1]+(a*e[n+1][1]-a*e[n-1][1])/6],o[2]=[e[n+1][0]+(a*e[n][0]-a*e[n+2][0])/6,e[n+1][1]+(a*e[n][1]-a*e[n+2][1])/6],o[3]=[e[n+1][0],e[n+1][1]],s.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}}else i===3?(s.push({op:"move",data:[e[1][0],e[1][1]]}),s.push({op:"bcurveTo",data:[e[1][0],e[1][1],e[2][0],e[2][1],e[2][0],e[2][1]]})):i===2&&s.push(...Ya(e[0][0],e[0][1],e[1][0],e[1][1],r,!0,!0));return s}function Th(e,t,r,i,s,o,a,n){const l=[],c=[];if(n.roughness===0){e/=4,c.push([t+i*Math.cos(-e),r+s*Math.sin(-e)]);for(let h=0;h<=2*Math.PI;h+=e){const d=[t+i*Math.cos(h),r+s*Math.sin(h)];l.push(d),c.push(d)}c.push([t+i*Math.cos(0),r+s*Math.sin(0)]),c.push([t+i*Math.cos(e),r+s*Math.sin(e)])}else{const h=Ft(.5,n)-Math.PI/2;c.push([Ft(o,n)+t+.9*i*Math.cos(h-e),Ft(o,n)+r+.9*s*Math.sin(h-e)]);const d=2*Math.PI+h-.01;for(let u=h;u<d;u+=e){const g=[Ft(o,n)+t+i*Math.cos(u),Ft(o,n)+r+s*Math.sin(u)];l.push(g),c.push(g)}c.push([Ft(o,n)+t+i*Math.cos(h+2*Math.PI+.5*a),Ft(o,n)+r+s*Math.sin(h+2*Math.PI+.5*a)]),c.push([Ft(o,n)+t+.98*i*Math.cos(h+a),Ft(o,n)+r+.98*s*Math.sin(h+a)]),c.push([Ft(o,n)+t+.9*i*Math.cos(h+.5*a),Ft(o,n)+r+.9*s*Math.sin(h+.5*a)])}return[c,l]}function wh(e,t,r,i,s,o,a,n,l){const c=o+Ft(.1,l),h=[];h.push([Ft(n,l)+t+.9*i*Math.cos(c-e),Ft(n,l)+r+.9*s*Math.sin(c-e)]);for(let d=c;d<=a;d+=e)h.push([Ft(n,l)+t+i*Math.cos(d),Ft(n,l)+r+s*Math.sin(d)]);return h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),h.push([t+i*Math.cos(a),r+s*Math.sin(a)]),to(h,null,l)}function F0(e,t,r,i,s,o,a,n){const l=[],c=[n.maxRandomnessOffset||1,(n.maxRandomnessOffset||1)+.3];let h=[0,0];const d=n.disableMultiStroke?1:2,u=n.preserveVertices;for(let g=0;g<d;g++)g===0?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(u?0:Ft(c[0],n)),a[1]+(u?0:Ft(c[0],n))]}),h=u?[s,o]:[s+Ft(c[g],n),o+Ft(c[g],n)],l.push({op:"bcurveTo",data:[e+Ft(c[g],n),t+Ft(c[g],n),r+Ft(c[g],n),i+Ft(c[g],n),h[0],h[1]]});return l}function Wi(e){return[...e]}function Bh(e,t=0){const r=e.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(r===3)i.push(Wi(e[0]),Wi(e[1]),Wi(e[2]),Wi(e[2]));else{const s=[];s.push(e[0],e[0]);for(let n=1;n<e.length;n++)s.push(e[n]),n===e.length-1&&s.push(e[n]);const o=[],a=1-t;i.push(Wi(s[0]));for(let n=1;n+2<s.length;n++){const l=s[n];o[0]=[l[0],l[1]],o[1]=[l[0]+(a*s[n+1][0]-a*s[n-1][0])/6,l[1]+(a*s[n+1][1]-a*s[n-1][1])/6],o[2]=[s[n+1][0]+(a*s[n][0]-a*s[n+2][0])/6,s[n+1][1]+(a*s[n][1]-a*s[n+2][1])/6],o[3]=[s[n+1][0],s[n+1][1]],i.push(o[1],o[2],o[3])}}return i}function Ws(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function M0(e,t,r){const i=Ws(t,r);if(i===0)return Ws(e,t);let s=((e[0]-t[0])*(r[0]-t[0])+(e[1]-t[1])*(r[1]-t[1]))/i;return s=Math.max(0,Math.min(1,s)),Ws(e,Or(t,r,s))}function Or(e,t,r){return[e[0]+(t[0]-e[0])*r,e[1]+(t[1]-e[1])*r]}function ja(e,t,r,i){const s=i||[];if((function(n,l){const c=n[l+0],h=n[l+1],d=n[l+2],u=n[l+3];let g=3*h[0]-2*c[0]-u[0];g*=g;let p=3*h[1]-2*c[1]-u[1];p*=p;let C=3*d[0]-2*u[0]-c[0];C*=C;let x=3*d[1]-2*u[1]-c[1];return x*=x,g<C&&(g=C),p<x&&(p=x),g+p})(e,t)<r){const n=e[t+0];s.length?(o=s[s.length-1],a=n,Math.sqrt(Ws(o,a))>1&&s.push(n)):s.push(n),s.push(e[t+3])}else{const l=e[t+0],c=e[t+1],h=e[t+2],d=e[t+3],u=Or(l,c,.5),g=Or(c,h,.5),p=Or(h,d,.5),C=Or(u,g,.5),x=Or(g,p,.5),y=Or(C,x,.5);ja([l,u,C,y],0,r,s),ja([y,x,p,d],0,r,s)}var o,a;return s}function O0(e,t){return eo(e,0,e.length,t)}function eo(e,t,r,i,s){const o=s||[],a=e[t],n=e[r-1];let l=0,c=1;for(let h=t+1;h<r-1;++h){const d=M0(e[h],a,n);d>l&&(l=d,c=h)}return Math.sqrt(l)>i?(eo(e,t,c+1,i,o),eo(e,c,r,i,o)):(o.length||o.push(a),o.push(n)),o}function jo(e,t=.15,r){const i=[],s=(e.length-1)/3;for(let o=0;o<s;o++)ja(e,3*o,t,i);return r&&r>0?eo(i,0,i.length,r):i}const Ie="none";class ro{constructor(t){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=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,r,i){return{shape:t,sets:r||[],options:i||this.defaultOptions}}line(t,r,i,s,o){const a=this._o(o);return this._d("line",[ku(t,r,i,s,a)],a)}rectangle(t,r,i,s,o){const a=this._o(o),n=[],l=_0(t,r,i,s,a);if(a.fill){const c=[[t,r],[t+i,r],[t+i,r+s],[t,r+s]];a.fillStyle==="solid"?n.push(Yo([c],a)):n.push(Jr([c],a))}return a.stroke!==Ie&&n.push(l),this._d("rectangle",n,a)}ellipse(t,r,i,s,o){const a=this._o(o),n=[],l=Su(i,s,a),c=Ha(t,r,a,l);if(a.fill)if(a.fillStyle==="solid"){const h=Ha(t,r,a,l).opset;h.type="fillPath",n.push(h)}else n.push(Jr([c.estimatedPoints],a));return a.stroke!==Ie&&n.push(c.opset),this._d("ellipse",n,a)}circle(t,r,i,s){const o=this.ellipse(t,r,i,i,s);return o.shape="circle",o}linearPath(t,r){const i=this._o(r);return this._d("linearPath",[Ns(t,!1,i)],i)}arc(t,r,i,s,o,a,n=!1,l){const c=this._o(l),h=[],d=bh(t,r,i,s,o,a,n,!0,c);if(n&&c.fill)if(c.fillStyle==="solid"){const u=Object.assign({},c);u.disableMultiStroke=!0;const g=bh(t,r,i,s,o,a,!0,!1,u);g.type="fillPath",h.push(g)}else h.push((function(u,g,p,C,x,y,b){const S=u,w=g;let L=Math.abs(p/2),A=Math.abs(C/2);L+=Ft(.01*L,b),A+=Ft(.01*A,b);let v=x,E=y;for(;v<0;)v+=2*Math.PI,E+=2*Math.PI;E-v>2*Math.PI&&(v=0,E=2*Math.PI);const D=(E-v)/b.curveStepCount,q=[];for(let U=v;U<=E;U+=D)q.push([S+L*Math.cos(U),w+A*Math.sin(U)]);return q.push([S+L*Math.cos(E),w+A*Math.sin(E)]),q.push([S,w]),Jr([q],b)})(t,r,i,s,o,a,c));return c.stroke!==Ie&&h.push(d),this._d("arc",h,c)}curve(t,r){const i=this._o(r),s=[],o=xh(t,i);if(i.fill&&i.fill!==Ie)if(i.fillStyle==="solid"){const a=xh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(a.ops)})}else{const a=[],n=t;if(n.length){const l=typeof n[0][0]=="number"?[n]:n;for(const c of l)c.length<3?a.push(...c):c.length===3?a.push(...jo(Bh([c[0],c[0],c[1],c[2]]),10,(1+i.roughness)/2)):a.push(...jo(Bh(c),10,(1+i.roughness)/2))}a.length&&s.push(Jr([a],i))}return i.stroke!==Ie&&s.push(o),this._d("curve",s,i)}polygon(t,r){const i=this._o(r),s=[],o=Ns(t,!0,i);return i.fill&&(i.fillStyle==="solid"?s.push(Yo([t],i)):s.push(Jr([t],i))),i.stroke!==Ie&&s.push(o),this._d("polygon",s,i)}path(t,r){const i=this._o(r),s=[];if(!t)return this._d("path",s,i);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const o=i.fill&&i.fill!=="transparent"&&i.fill!==Ie,a=i.stroke!==Ie,n=!!(i.simplification&&i.simplification<1),l=(function(h,d,u){const g=xu(Cu(In(h))),p=[];let C=[],x=[0,0],y=[];const b=()=>{y.length>=4&&C.push(...jo(y,d)),y=[]},S=()=>{b(),C.length&&(p.push(C),C=[])};for(const{key:L,data:A}of g)switch(L){case"M":S(),x=[A[0],A[1]],C.push(x);break;case"L":b(),C.push([A[0],A[1]]);break;case"C":if(!y.length){const v=C.length?C[C.length-1]:x;y.push([v[0],v[1]])}y.push([A[0],A[1]]),y.push([A[2],A[3]]),y.push([A[4],A[5]]);break;case"Z":b(),C.push([x[0],x[1]])}if(S(),!u)return p;const w=[];for(const L of p){const A=O0(L,u);A.length&&w.push(A)}return w})(t,1,n?4-4*(i.simplification||1):(1+i.roughness)/2),c=kh(t,i);if(o)if(i.fillStyle==="solid")if(l.length===1){const h=kh(t,Object.assign(Object.assign({},i),{disableMultiStroke:!0,roughness:i.roughness?i.roughness+i.fillShapeRoughnessGain:0}));s.push({type:"fillPath",ops:this._mergedShape(h.ops)})}else s.push(Yo(l,i));else s.push(Jr(l,i));return a&&(n?l.forEach((h=>{s.push(Ns(h,!1,i))})):s.push(c)),this._d("path",s,i)}opsToPath(t,r){let i="";for(const s of t.ops){const o=typeof r=="number"&&r>=0?s.data.map((a=>+a.toFixed(r))):s.data;switch(s.op){case"move":i+=`M${o[0]} ${o[1]} `;break;case"bcurveTo":i+=`C${o[0]} ${o[1]}, ${o[2]} ${o[3]}, ${o[4]} ${o[5]} `;break;case"lineTo":i+=`L${o[0]} ${o[1]} `}}return i.trim()}toPaths(t){const r=t.sets||[],i=t.options||this.defaultOptions,s=[];for(const o of r){let a=null;switch(o.type){case"path":a={d:this.opsToPath(o),stroke:i.stroke,strokeWidth:i.strokeWidth,fill:Ie};break;case"fillPath":a={d:this.opsToPath(o),stroke:Ie,strokeWidth:0,fill:i.fill||Ie};break;case"fillSketch":a=this.fillSketch(o,i)}a&&s.push(a)}return s}fillSketch(t,r){let i=r.fillWeight;return i<0&&(i=r.strokeWidth/2),{d:this.opsToPath(t),stroke:r.fill||Ie,strokeWidth:i,fill:Ie}}_mergedShape(t){return t.filter(((r,i)=>i===0||r.op!=="move"))}}class I0{constructor(t,r){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new ro(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.ctx,o=t.options.fixedDecimalPlaceDigits;for(const a of r)switch(a.type){case"path":s.save(),s.strokeStyle=i.stroke==="none"?"transparent":i.stroke,s.lineWidth=i.strokeWidth,i.strokeLineDash&&s.setLineDash(i.strokeLineDash),i.strokeLineDashOffset&&(s.lineDashOffset=i.strokeLineDashOffset),this._drawToContext(s,a,o),s.restore();break;case"fillPath":{s.save(),s.fillStyle=i.fill||"";const n=t.shape==="curve"||t.shape==="polygon"||t.shape==="path"?"evenodd":"nonzero";this._drawToContext(s,a,o,n),s.restore();break}case"fillSketch":this.fillSketch(s,a,i)}}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2),t.save(),i.fillLineDash&&t.setLineDash(i.fillLineDash),i.fillLineDashOffset&&(t.lineDashOffset=i.fillLineDashOffset),t.strokeStyle=i.fill||"",t.lineWidth=s,this._drawToContext(t,r,i.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,r,i,s="nonzero"){t.beginPath();for(const o of r.ops){const a=typeof i=="number"&&i>=0?o.data.map((n=>+n.toFixed(i))):o.data;switch(o.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}r.type==="fillPath"?t.fill(s):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a),a}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a),a}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a),a}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o),o}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i),i}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i),i}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c),c}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i),i}path(t,r){const i=this.gen.path(t,r);return this.draw(i),i}}const _s="http://www.w3.org/2000/svg";class D0{constructor(t,r){this.svg=t,this.gen=new ro(r)}draw(t){const r=t.sets||[],i=t.options||this.getDefaultOptions(),s=this.svg.ownerDocument||window.document,o=s.createElementNS(_s,"g"),a=t.options.fixedDecimalPlaceDigits;for(const n of r){let l=null;switch(n.type){case"path":l=s.createElementNS(_s,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke",i.stroke),l.setAttribute("stroke-width",i.strokeWidth+""),l.setAttribute("fill","none"),i.strokeLineDash&&l.setAttribute("stroke-dasharray",i.strokeLineDash.join(" ").trim()),i.strokeLineDashOffset&&l.setAttribute("stroke-dashoffset",`${i.strokeLineDashOffset}`);break;case"fillPath":l=s.createElementNS(_s,"path"),l.setAttribute("d",this.opsToPath(n,a)),l.setAttribute("stroke","none"),l.setAttribute("stroke-width","0"),l.setAttribute("fill",i.fill||""),t.shape!=="curve"&&t.shape!=="polygon"||l.setAttribute("fill-rule","evenodd");break;case"fillSketch":l=this.fillSketch(s,n,i)}l&&o.appendChild(l)}return o}fillSketch(t,r,i){let s=i.fillWeight;s<0&&(s=i.strokeWidth/2);const o=t.createElementNS(_s,"path");return o.setAttribute("d",this.opsToPath(r,i.fixedDecimalPlaceDigits)),o.setAttribute("stroke",i.fill||""),o.setAttribute("stroke-width",s+""),o.setAttribute("fill","none"),i.fillLineDash&&o.setAttribute("stroke-dasharray",i.fillLineDash.join(" ").trim()),i.fillLineDashOffset&&o.setAttribute("stroke-dashoffset",`${i.fillLineDashOffset}`),o}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,r){return this.gen.opsToPath(t,r)}line(t,r,i,s,o){const a=this.gen.line(t,r,i,s,o);return this.draw(a)}rectangle(t,r,i,s,o){const a=this.gen.rectangle(t,r,i,s,o);return this.draw(a)}ellipse(t,r,i,s,o){const a=this.gen.ellipse(t,r,i,s,o);return this.draw(a)}circle(t,r,i,s){const o=this.gen.circle(t,r,i,s);return this.draw(o)}linearPath(t,r){const i=this.gen.linearPath(t,r);return this.draw(i)}polygon(t,r){const i=this.gen.polygon(t,r);return this.draw(i)}arc(t,r,i,s,o,a,n=!1,l){const c=this.gen.arc(t,r,i,s,o,a,n,l);return this.draw(c)}curve(t,r){const i=this.gen.curve(t,r);return this.draw(i)}path(t,r){const i=this.gen.path(t,r);return this.draw(i)}}var gt={canvas:(e,t)=>new I0(e,t),svg:(e,t)=>new D0(e,t),generator:e=>new ro(e),newSeed:()=>ro.newSeed()},R0=1,P0=3;async function Dn(e){const t=e.getElementsByTagName("img");if(!t||t.length===0)return;const r=!Rn(e);await Promise.all([...t].map(i=>new Promise(s=>{function o(){if(i.style.display="flex",i.style.flexDirection="column",r){const a=Nt().fontSize?Nt().fontSize:window.getComputedStyle(document.body).fontSize,n=5,[l=fd.fontSize]=lo(a),c=l*n+"px";i.style.minWidth=c,i.style.maxWidth=c}else i.style.width="100%";s(i)}f(o,"setupImage"),setTimeout(()=>{i.complete&&o()}),i.addEventListener("error",o),i.addEventListener("load",o)})))}f(Dn,"configureLabelImages");function Rn(e){var r;return e.nodeType===P0?((r=e.textContent)==null?void 0:r.trim())!=="":e.nodeType!==R0||e.tagName.toLowerCase()==="img"?!1:[...e.childNodes].some(Rn)}f(Rn,"hasTextBesidesImages");var Lh=3,$0=32,q0=f(async(e,t,r)=>{var x,y;const i=Nt(),s=e.insert("g").attr("class",r??"node default").attr("id",t.domId||t.id),o=s.insert("g").attr("class","label").attr("style",oe(t.labelStyle)),n=[{text:typeof t.label=="string"?t.label:((x=t.label)==null?void 0:x[0])??"",cssClass:"c4-name"},{text:t.stereotype,cssClass:"c4-type"},...(t.description??[]).map(b=>({text:b,cssClass:"c4-descr"}))].filter(b=>b.text),l=t.width?Math.max(t.width-2*(t.padding??0),$0):((y=Nt().flowchart)==null?void 0:y.wrappingWidth)??200,c=i.wrap?l:Number.POSITIVE_INFINITY,h=await Promise.all(n.map(async b=>{const S=o.append("g").attr("class",b.cssClass),w=await Ve(S,qe(Tr(b.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:c,style:t.labelStyle},i);return Dt(w).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),Dt(w).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:S,box:S.node().getBBox()}})),d=Math.max(...h.map(({box:b})=>b.width),0);let u=0;for(const{el:b,box:S}of h)b.attr("transform",`translate(${d/2-S.x-S.width/2}, ${u-S.y})`),u+=S.height+Lh;const g=h.length>0?u-Lh:0;o.insert("rect",":first-child"),o.attr("transform",`translate(${-d/2}, ${-g/2})`);const p=o.node().getBBox(),C=(t.padding??0)/2;return{shapeSvg:s,bbox:p,halfPadding:C,label:o}},"c4LabelHelper"),St=f(async(e,t,r)=>{var g,p;if(t.stereotype!==void 0)return q0(e,t,r);let i;const s=t.useHtmlLabels||ar((g=Nt())==null?void 0:g.htmlLabels);r?i=r:i="node default";const o=e.insert("g").attr("class",i).attr("id",t.domId||t.id),a=o.insert("g").attr("class","label").attr("style",oe(t.labelStyle));let n;t.label===void 0?n="":n=typeof t.label=="string"?t.label:t.label[0];const l=!!t.icon||!!t.img,c=t.labelType==="markdown",h=await Ve(a,qe(Tr(n),Nt()),{useHtmlLabels:s,width:t.width||t.wrappingWidth||((p=Nt().flowchart)==null?void 0:p.wrappingWidth),classes:c?"markdown-node-label":"",style:t.labelStyle,addSvgBackground:l,markdown:c},Nt()),d=((t==null?void 0:t.padding)??0)/2;let u;if(s){const C=h.children[0],x=Dt(h);await Dn(C),u=await Hr.measure(()=>C.getBoundingClientRect()),x.attr("width",u.width),x.attr("height",u.height)}else u=await Hr.measure(()=>h.getBBox());return s?a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):a.attr("transform","translate(0, "+-u.height/2+")"),t.centerLabel&&a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),a.insert("rect",":first-child"),{shapeSvg:o,bbox:u,halfPadding:d,label:a}},"labelHelper"),Uo=f(async(e,t,r)=>{var l,c;const i=r.useHtmlLabels??ye(Nt()),s=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),o=await Ve(s,qe(Tr(t),Nt()),{useHtmlLabels:i,width:r.width||((c=(l=Nt())==null?void 0:l.flowchart)==null?void 0:c.wrappingWidth),style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),a=r.padding/2;let n;if(ye(Nt())){const h=o.children[0],d=Dt(o);n=await Hr.measure(()=>h.getBoundingClientRect()),d.attr("width",n.width),d.attr("height",n.height)}else n=await Hr.measure(()=>o.getBBox());return i?s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"):s.attr("transform","translate(0, "+-n.height/2+")"),r.centerLabel&&s.attr("transform","translate("+-n.width/2+", "+-n.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:e,bbox:n,halfPadding:a,label:s}},"insertLabel"),ft=f((e,t,r)=>{if(r){e.width=r.width,e.height=r.height;return}const i=t.node().getBBox();e.width=i.width,e.height=i.height},"updateNodeBounds"),Tt=f((e,t)=>(e.look==="handDrawn"?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses");function Yt(e){const t=e.map((r,i)=>`${i===0?"M":"L"}${r.x},${r.y}`);return t.push("Z"),t.join(" ")}f(Yt,"createPathFromPoints");function Br(e,t,r,i,s,o){const a=[],l=r-e,c=i-t,h=l/o,d=2*Math.PI/h,u=t+c/2;for(let g=0;g<=50;g++){const p=g/50,C=e+p*l,x=u+s*Math.sin(d*(C-e));a.push({x:C,y:x})}return a}f(Br,"generateFullSineWavePoints");function ir(e,t,r,i,s,o){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),p=t+r*Math.sin(u);a.push({x:-g,y:-p})}return a}f(ir,"generateCirclePoints");function Ua(e){const t=Array.from(e.childNodes).filter(l=>l.tagName==="path"),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=t.map(l=>l.getAttribute("d")).filter(l=>l!==null).join(" ");r.setAttribute("d",i);const s=t.find(l=>l.getAttribute("fill")!=="none"),o=t.find(l=>l.getAttribute("stroke")!=="none"),a=f((l,c)=>(l==null?void 0:l.getAttribute(c))??void 0,"getAttr");if(s){const l={fill:a(s,"fill"),"fill-opacity":a(s,"fill-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}if(o){const l={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(l).forEach(([c,h])=>{h&&r.setAttribute(c,h)})}const n=document.createElementNS("http://www.w3.org/2000/svg","g");return n.appendChild(r),n}f(Ua,"mergePaths");var N0=f((e,t)=>{var r=e.x,i=e.y,s=t.x-r,o=t.y-i,a=e.width/2,n=e.height/2,l,c;return Math.abs(o)*a>Math.abs(s)*n?(o<0&&(n=-n),l=o===0?0:n*s/o,c=n):(s<0&&(a=-a),l=a,c=s===0?0:a*o/s),{x:r+l,y:i+c}},"intersectRect"),Xr=N0,ze=f((e,t,r,i,s)=>["M",e+s,t,"H",e+r-s,"A",s,s,0,0,1,e+r,t+s,"V",t+i-s,"A",s,s,0,0,1,e+r-s,t+i,"H",e+s,"A",s,s,0,0,1,e,t+i-s,"V",t+s,"A",s,s,0,0,1,e+s,t,"Z"].join(" "),"createRoundedRectPathD"),W0=f(async(e,t,r,i=!1,s=!1)=>{let o=t||"";typeof o=="object"&&(o=o[0]);const a=Nt(),n=ye(a);return await Ve(e,o,{style:r,isTitle:i,useHtmlLabels:n,markdown:!1,isNode:s,width:Number.POSITIVE_INFINITY},a)},"createLabel"),Sr=W0;function wu(e,t){return e.intersect(t)}f(wu,"intersectNode");var z0=wu;function Bu(e,t,r,i){var s=e.x,o=e.y,a=s-i.x,n=o-i.y,l=Math.sqrt(t*t*n*n+r*r*a*a),c=Math.abs(t*r*a/l);i.x<s&&(c=-c);var h=Math.abs(t*r*n/l);return i.y<o&&(h=-h),{x:s+c,y:o+h}}f(Bu,"intersectEllipse");var Lu=Bu;function vu(e,t,r){return Lu(e,t,t,r)}f(vu,"intersectCircle");var H0=vu;function Au(e,t,r,i){{const s=t.y-e.y,o=e.x-t.x,a=t.x*e.y-e.x*t.y,n=s*r.x+o*r.y+a,l=s*i.x+o*i.y+a,c=1e-6;if(n!==0&&l!==0&&Xa(n,l))return;const h=i.y-r.y,d=r.x-i.x,u=i.x*r.y-r.x*i.y,g=h*e.x+d*e.y+u,p=h*t.x+d*t.y+u;if(Math.abs(g)<c&&Math.abs(p)<c&&Xa(g,p))return;const C=s*d-h*o;if(C===0)return;const x=Math.abs(C/2);let y=o*u-d*a;const b=y<0?(y-x)/C:(y+x)/C;y=h*a-s*u;const S=y<0?(y-x)/C:(y+x)/C;return{x:b,y:S}}}f(Au,"intersectLine");function Xa(e,t){return e*t>0}f(Xa,"sameSign");var Y0=Au;function Eu(e,t,r){let i=e.x,s=e.y,o=[],a=Number.POSITIVE_INFINITY,n=Number.POSITIVE_INFINITY;typeof t.forEach=="function"?t.forEach(function(h){a=Math.min(a,h.x),n=Math.min(n,h.y)}):(a=Math.min(a,t.x),n=Math.min(n,t.y));let l=i-e.width/2-a,c=s-e.height/2-n;for(let h=0;h<t.length;h++){let d=t[h],u=t[h<t.length-1?h+1:0],g=Y0(e,r,{x:l+d.x,y:c+d.y},{x:l+u.x,y:c+u.y});g&&o.push(g)}return o.length?(o.length>1&&o.sort(function(h,d){let u=h.x-r.x,g=h.y-r.y,p=Math.sqrt(u*u+g*g),C=d.x-r.x,x=d.y-r.y,y=Math.sqrt(C*C+x*x);return p<y?-1:p===y?0:1}),o[0]):e}f(Eu,"intersectPolygon");var j0=Eu,lt={node:z0,circle:H0,ellipse:Lu,polygon:j0,rect:Xr};function _u(e,t){const{labelStyles:r}=mt(t);t.labelStyle=r;const i=Tt(t);let s=i;i||(s="anchor");const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=1,{cssStyles:n}=t,l=gt.svg(o),c=dt(t,{fill:"black",stroke:"none",fillStyle:"solid"});t.look!=="handDrawn"&&(c.roughness=0);const h=l.circle(0,0,a*2,c),d=o.insert(()=>h,":first-child");return d.attr("class","anchor").attr("style",oe(n)),ft(t,d),t.intersect=function(u){return R.info("Circle intersect",t,a,u),lt.circle(t,a,u)},o}f(_u,"anchor");function Ga(e,t,r,i,s,o,a){const l=(e+r)/2,c=(t+i)/2,h=Math.atan2(i-t,r-e),d=(r-e)/2,u=(i-t)/2,g=d/s,p=u/o,C=Math.sqrt(g**2+p**2);if(C>1)throw new Error("The given radii are too small to create an arc between the points.");const x=Math.sqrt(1-C**2),y=l+x*o*Math.sin(h)*(a?-1:1),b=c-x*s*Math.cos(h)*(a?-1:1),S=Math.atan2((t-b)/o,(e-y)/s);let L=Math.atan2((i-b)/o,(r-y)/s)-S;a&&L<0&&(L+=2*Math.PI),!a&&L>0&&(L-=2*Math.PI);const A=[];for(let v=0;v<20;v++){const E=v/19,D=S+E*L,q=y+s*Math.cos(D),U=b+o*Math.sin(D);A.push({x:q,y:U})}return A}f(Ga,"generateArcPoints");function Fu(e,t,r){const[i,s]=[t,r].sort((o,a)=>a-o);return s*(1-Math.sqrt(1-(e/i/2)**2))}f(Fu,"calculateArcSagitta");async function Mu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=f(D=>D+a,"calcTotalHeight"),l=f(D=>{const q=D/2;return[q/(2.5+D/50),q]},"calcEllipseRadius"),{shapeSvg:c,bbox:h}=await St(e,t,Tt(t)),d=n(t!=null&&t.height?t==null?void 0:t.height:h.height),[u,g]=l(d),p=Fu(d,u,g),x=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2+p-p,y=d,{cssStyles:b}=t,S=[{x:x/2,y:-y/2},{x:-x/2,y:-y/2},...Ga(-x/2,-y/2,-x/2,y/2,u,g,!1),{x:x/2,y:y/2},...Ga(x/2,y/2,x/2,-y/2,u,g,!0)],w=gt.svg(c),L=dt(t,{});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=Yt(S),v=w.path(A,L),E=c.insert(()=>v,":first-child");return E.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(${u/2}, 0)`),ft(t,E),t.intersect=function(D){return lt.polygon(t,S,D)},c}f(Mu,"bowTieRect");async function Ou(e,t,{config:{themeVariables:r}}){var v;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await St(e,t,Tt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=Math.max(a.width+c*2,t.width??0,80),d=Math.max(Math.min(h*.08,12),5),u=Math.max(a.height+c*2+d,t.height??0),g=-u/2+d,p=u/2,C=h*.72,x=[`M${-h/2},${g}`,`L${-C/2},${p}`,`A${C/2},${d} 0 0 0 ${C/2},${p}`,`L${h/2},${g}`,`A${h/2},${d} 0 0 0 ${-h/2},${g}`,"Z"].join(" "),{cssStyles:y}=t,b=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const D=gt.svg(o).path(x,dt(t,{}));(v=b.node())==null||v.appendChild(D),y&&b.attr("style",y)}else b.append("path").attr("d",x).attr("style",s);b.append("ellipse").attr("cx",0).attr("cy",g).attr("rx",h/2).attr("ry",d).attr("style",`fill:none;stroke:${l};stroke-width:1px`),ft(t,b);const S=g+(p-g)/2;n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const w=12,L=f((E,D,q)=>Array.from({length:w+1},(U,st)=>{const N=Math.PI-st*Math.PI/w;return{x:E*Math.cos(N),y:D+q*d*Math.sin(N)}}),"arc"),A=[...L(h/2,g,-1),...L(C/2,p,1).reverse()];return t.intersect=function(E){return lt.polygon(t,A,E)},o}f(Ou,"bucket");var vh=20,Ah=8,U0=80,Xo=8;async function Iu(e,t){const{themeVariables:r}=Nt(),i=r.clusterBkg,s=r.clusterBorder,{nodeStyles:o}=mt(t),{shapeSvg:a,bbox:n}=await St(e,t,Tt(t)),l=t.padding??8,c=n.height,h=Math.max(n.width+l*2,U0,(t==null?void 0:t.width)??0),d=Math.max(c+Ah+vh+l*2,(t==null?void 0:t.height)??0),u=-h/2,g=-d/2,p=-28/2,C=a.select(".label");C&&(t.useHtmlLabels??ye(Nt())?C.attr("transform",`translate(${-n.width/2}, ${-n.height/2+p})`):C.attr("transform",`translate(0, ${-n.height/2+p})`));let x;if(t.look==="handDrawn"){const L=gt.svg(a),A=dt(t,{fill:i,stroke:s,fillStyle:"solid"}),v=L.path(ze(u,g,h,d,Xo),A);x=a.insert(()=>v,":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",oe(t.cssStyles))}else x=a.insert("rect",":first-child"),x.attr("class","basic label-container collapsed-group").attr("style",o).attr("rx",Xo).attr("ry",Xo).attr("x",u).attr("y",g).attr("width",h).attr("height",d).attr("fill",i).attr("stroke",s);const y=g+l+c+Ah;a.append("line").attr("class","collapsed-separator").attr("x1",u+8).attr("y1",y).attr("x2",u+h-8).attr("y2",y).attr("stroke",s).attr("stroke-dasharray","3, 3");const b=y+vh/2,S=2.5,w=10;for(let L=-1;L<=1;L++)a.append("circle").attr("class","collapsed-indicator").attr("cx",L*w).attr("cy",b).attr("r",S).attr("fill",s);return ft(t,x),t.calcIntersect=function(L,A){return lt.rect(L,A)},t.intersect=function(L){return lt.rect(t,L)},a}f(Iu,"collapsedGroup");function nr(e,t,r,i){return e.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}f(nr,"insertPolygonShape");var X0=["right","left","up","down"],Pn="point",G0=f(e=>{const t=new Set;for(const r of e)switch(r){case"x":t.add("right"),t.add("left");break;case"y":t.add("up"),t.add("down");break;default:t.add(r);break}return t},"expandAndDeduplicateDirections"),V0=f(e=>X0.filter(t=>e.has(t)).join("|")||Pn,"getDirectionKey"),Eh={"right|left|up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:0,y:0},{x:t,y:0},{x:i/2,y:2*r},{x:i-t,y:0},{x:i,y:0},{x:i,y:-e/3},{x:i+2*r,y:-e/2},{x:i,y:-2*e/3},{x:i,y:-e},{x:i-t,y:-e},{x:i/2,y:-e-2*r},{x:t,y:-e},{x:0,y:-e},{x:0,y:-2*e/3},{x:-2*r,y:-e/2},{x:0,y:-e/3}],"right|left|up|down"),"right|left|up":f(({height:e,midpoint:t,width:r})=>[{x:t,y:0},{x:r-t,y:0},{x:r,y:-e/2},{x:r-t,y:-e},{x:t,y:-e},{x:0,y:-e/2}],"right|left|up"),"right|left|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:t,y:-e},{x:r-t,y:-e},{x:r,y:0}],"right|left|down"),"right|up|down":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:r,y:-e+t},{x:0,y:-e}],"right|up|down"),"left|up|down":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:0,y:-e+t},{x:r,y:-e}],"left|up|down"),"right|left":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"right|left"),"up|down":f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"up|down"),"right|up":f(({height:e,midpoint:t,width:r})=>[{x:0,y:0},{x:r,y:-t},{x:0,y:-e}],"right|up"),"right|down":f(({height:e,width:t})=>[{x:0,y:0},{x:t,y:0},{x:0,y:-e}],"right|down"),"left|up":f(({height:e,midpoint:t,width:r})=>[{x:r,y:0},{x:0,y:-t},{x:r,y:-e}],"left|up"),"left|down":f(({height:e,width:t})=>[{x:t,y:0},{x:0,y:0},{x:t,y:-e}],"left|down"),right:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:0},{x:i,y:-e/2},{x:i-t,y:-e},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e+r}],"right"),left:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:0},{x:t,y:-r},{x:i-t,y:-r},{x:i-t,y:-e+r},{x:t,y:-e+r},{x:t,y:-e},{x:0,y:-e/2}],"left"),up:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:t,y:-r},{x:t,y:-e+r},{x:0,y:-e+r},{x:i/2,y:-e},{x:i,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r}],"up"),down:f(({height:e,midpoint:t,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:t,y:-r},{x:t,y:-e+r},{x:i-t,y:-e+r},{x:i-t,y:-r},{x:i,y:-r}],"down"),[Pn]:()=>[{x:0,y:0}]},K0=f((e,t,r,i)=>{const s=G0(e),o=(r.padding??0)/2,a=t.height+4*o,n=a/2,l=i??t.width+2*n+2*o,c=V0(s);return(Eh[c]??Eh[Pn])({height:a,midpoint:n,padding:o,width:l})},"getArrowPoints");async function Du(e,t){const r=t,{shapeSvg:i,bbox:s}=await St(e,r,Tt(r)),o=r.padding??0,a=s.height+2*o,n=a/2,l=s.width+2*n+o,c=r.width??0,d=r.positioned&&(r.widthInColumns??1)>1&&c>l?c:l,u=K0(r.directions??[],s,r,d),g=nr(i,d,a,u);return g.attr("style",r.style??null),ft(r,g),r.intersect=function(p){return lt.polygon(r,u,p)},i}f(Du,"block_arrow");async function Ru(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await St(e,t,Tt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=18,d=12,u=Math.max(a.width+c*2,t.width??0,90),g=Math.max(a.height+c*2+h,t.height??0),p=-g/2,{cssStyles:C}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=gt.svg(o).path(ze(-u/2,p,u,g,d),dt(t,{}));(b=x.node())==null||b.appendChild(w),C&&x.attr("style",C)}else x.append("rect").attr("x",-u/2).attr("y",p).attr("width",u).attr("height",g).attr("rx",d).attr("ry",d).attr("style",s);x.append("line").attr("x1",-u/2).attr("y1",p+h).attr("x2",u/2).attr("y2",p+h).attr("style",`stroke:${l};stroke-width:1px`);for(let S=0;S<3;S++)x.append("circle").attr("cx",-u/2+12+S*9).attr("cy",p+h/2).attr("r",2.5).attr("style",`fill:${l};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-u/2+44).attr("y",p+4).attr("width",Math.max(u-56,10)).attr("height",h-8).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${l};stroke-width:1px;opacity:0.6`),ft(t,x);const y=p+h+(g-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(S){return lt.rect(t,S)},o}f(Ru,"browser");var Fs=12;async function Pu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?28:s,a=t.look==="neo"?24:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=((t==null?void 0:t.width)??l.width)+(t.look==="neo"?o*2:o+Fs),h=((t==null?void 0:t.height)??l.height)+(t.look==="neo"?a*2:a),d=0,u=c,g=-h,p=0,C=[{x:d+Fs,y:g},{x:u,y:g},{x:u,y:p},{x:d,y:p},{x:d,y:g+Fs},{x:d+Fs,y:g}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const b=gt.svg(n),S=dt(t,{}),w=Yt(C),L=b.path(w,S);x=n.insert(()=>L,":first-child").attr("transform",`translate(${-c/2}, ${h/2})`),y&&x.attr("style",y)}else x=nr(n,c,h,C);return i&&x.attr("style",i),ft(t,x),t.intersect=function(b){return lt.polygon(t,C,b)},n}f(Pu,"card");function $u(e,t){const{nodeStyles:r}=mt(t);t.label="";const i=e.insert("g").attr("class",Tt(t)).attr("id",t.domId??t.id),{cssStyles:s}=t,o=Math.max(28,t.width??0),a=[{x:0,y:o/2},{x:o/2,y:0},{x:0,y:-o/2},{x:-o/2,y:0}],n=gt.svg(i),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=Yt(a),h=n.path(c,l),d=i.insert(()=>h,":first-child");return s&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",s),r&&t.look!=="handDrawn"&&d.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(u){return lt.polygon(t,a,u)},i}f($u,"choice");async function $n(e,t,r){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,halfPadding:n}=await St(e,t,Tt(t)),l=16,c=(r==null?void 0:r.padding)??n,h=t.look==="neo"?a.width/2+l*2:a.width/2+c;let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=gt.svg(o),p=dt(t,{}),C=g.circle(0,0,h*2,p);d=o.insert(()=>C,":first-child"),d.attr("class","basic label-container").attr("style",oe(u))}else d=o.insert("circle",":first-child").attr("class","basic label-container").attr("style",s).attr("r",h).attr("cx",0).attr("cy",0);return ft(t,d),t.calcIntersect=function(g,p){const C=g.width/2;return lt.circle(g,C,p)},t.intersect=function(g){return R.info("Circle intersect",t,h,g),lt.circle(t,h,g)},o}f($n,"circle");async function qu(e,t){const r=t,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:s,bbox:o,halfPadding:a}=await St(e,r,i),n=s.insert("rect",":first-child"),l=r.padding??0,c=r.positioned?r.width??0:o.width+l,h=r.positioned?r.height??0:o.height+l,d=r.positioned?-c/2:-o.width/2-a,u=r.positioned?-h/2:-o.height/2-a;return n.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",d).attr("y",u).attr("width",c).attr("height",h),ft(r,n),r.intersect=function(g){return lt.rect(r,g)},s}f(qu,"composite");async function Nu(e,t,{config:{themeVariables:r}}){var b;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a,label:n}=await St(e,t,Tt(t)),l=(r==null?void 0:r.nodeBorder)??(r==null?void 0:r.lineColor)??"currentColor",c=t.padding??12,h=20,d=12,u=Math.max(a.width+c*2,t.width??0,90),g=Math.max(a.height+c*2+h,t.height??0),p=-g/2,{cssStyles:C}=t,x=o.insert("g",":first-child").attr("class","basic label-container");if(t.look==="handDrawn"){const w=gt.svg(o).path(ze(-u/2,p,u,g,d),dt(t,{}));(b=x.node())==null||b.appendChild(w),C&&x.attr("style",C)}else x.append("rect").attr("x",-u/2).attr("y",p).attr("width",u).attr("height",g).attr("rx",d).attr("ry",d).attr("style",s);x.append("text").attr("x",-u/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${l}`).text(">_"),ft(t,x);const y=p+h+(g-h)/2;return n.attr("transform",`translate(${-(a.width/2)-(a.x-(a.left??0))}, ${y-a.height/2-(a.y-(a.top??0))})`),t.intersect=function(S){return lt.rect(t,S)},o}f(Nu,"consoleWindow");function Wu(e){const t=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=e*2,s={x:i/2*t,y:i/2*r},o={x:-(i/2)*t,y:i/2*r},a={x:-(i/2)*t,y:-(i/2)*r},n={x:i/2*t,y:-(i/2)*r};return`M ${o.x},${o.y} L ${n.x},${n.y}
|
|
204
|
+
M ${s.x},${s.y} L ${a.x},${a.y}`}f(Wu,"createLine");function zu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r,t.label="";const s=e.insert("g").attr("class",Tt(t)).attr("id",t.domId??t.id),o=Math.max(30,(t==null?void 0:t.width)??0),{cssStyles:a}=t,n=gt.svg(s),l=dt(t,{});t.look!=="handDrawn"&&(l.roughness=0,l.fillStyle="solid");const c=n.circle(0,0,o*2,l),h=Wu(o),d=n.path(h,l),u=s.insert(()=>c,":first-child");return u.insert(()=>d),u.attr("class","outer-path"),a&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",a),i&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",i),ft(t,u),t.intersect=function(g){return R.info("crossedCircle intersect",t,{radius:o,point:g}),lt.circle(t,o,g)},s}f(zu,"crossedCircle");function dr(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),p=t+r*Math.sin(u);a.push({x:-g,y:-p})}return a}f(dr,"generateCirclePoints");async function Hu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+n,h=o.height+l,d=Math.max(5,h*.1),{cssStyles:u}=t,g=[...dr(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...dr(c/2+d*2,-d,d,20,-180,-270),...dr(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...dr(c/2,h/2,d,20,0,90)],p=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...dr(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...dr(c/2+c*.1,-d,d,20,-180,-270),...dr(c/2+c*.1,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...dr(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2,y:h/2+d}],C=gt.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Yt(g).replace("Z",""),S=C.path(b,x),w=Yt(p),L=C.path(w,{...x}),A=s.insert("g",":first-child");return A.insert(()=>L,":first-child").attr("stroke-opacity",0),A.insert(()=>S,":first-child"),A.attr("class","text"),u&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${d}, 0)`),a.attr("transform",`translate(${-c/2+d-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ft(t,A),t.intersect=function(v){return lt.polygon(t,p,v)},s}f(Hu,"curlyBraceLeft");function ur(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),p=t+r*Math.sin(u);a.push({x:g,y:p})}return a}f(ur,"generateCirclePoints");async function Yu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:u}=t,g=[...ur(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ur(c/2+d*2,-d,d,20,-180,-270),...ur(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ur(c/2,h/2,d,20,0,90)],p=[{x:-c/2,y:-h/2-d},{x:c/2,y:-h/2-d},...ur(c/2,-h/2,d,20,-90,0),{x:c/2+d,y:-d},...ur(c/2+d*2,-d,d,20,-180,-270),...ur(c/2+d*2,d,d,20,-90,-180),{x:c/2+d,y:h/2},...ur(c/2,h/2,d,20,0,90),{x:c/2,y:h/2+d},{x:-c/2,y:h/2+d}],C=gt.svg(s),x=dt(t,{fill:"none"});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const b=Yt(g).replace("Z",""),S=C.path(b,x),w=Yt(p),L=C.path(w,{...x}),A=s.insert("g",":first-child");return A.insert(()=>L,":first-child").attr("stroke-opacity",0),A.insert(()=>S,":first-child"),A.attr("class","text"),u&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&A.selectAll("path").attr("style",i),A.attr("transform",`translate(${-d}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ft(t,A),t.intersect=function(v){return lt.polygon(t,p,v)},s}f(Yu,"curlyBraceRight");function ue(e,t,r,i=100,s=0,o=180){const a=[],n=s*Math.PI/180,h=(o*Math.PI/180-n)/(i-1);for(let d=0;d<i;d++){const u=n+d*h,g=e+r*Math.cos(u),p=t+r*Math.sin(u);a.push({x:-g,y:-p})}return a}f(ue,"generateCirclePoints");async function ju(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=t.look==="neo"?18:t.padding??0,l=t.look==="neo"?12:t.padding??0,c=o.width+(t.look==="neo"?n*2:n),h=o.height+(t.look==="neo"?l*2:l),d=Math.max(5,h*.1),{cssStyles:u}=t,g=[...ue(c/2,-h/2,d,30,-90,0),{x:-c/2-d,y:d},...ue(c/2+d*2,-d,d,20,-180,-270),...ue(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:-h/2},...ue(c/2,h/2,d,20,0,90)],p=[...ue(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...ue(-c/2-d/2,-d,d,20,0,90),...ue(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...ue(-c/2+d+d/2,h/2,d,30,-180,-270)],C=[{x:c/2,y:-h/2-d},{x:-c/2,y:-h/2-d},...ue(c/2,-h/2,d,20,-90,0),{x:-c/2-d,y:-d},...ue(c/2+d*2,-d,d,20,-180,-270),...ue(c/2+d*2,d,d,20,-90,-180),{x:-c/2-d,y:h/2},...ue(c/2,h/2,d,20,0,90),{x:-c/2,y:h/2+d},{x:c/2-d-d/2,y:h/2+d},...ue(-c/2+d+d/2,-h/2,d,20,-90,-180),{x:c/2-d/2,y:d},...ue(-c/2-d/2,-d,d,20,0,90),...ue(-c/2-d/2,d,d,20,-90,0),{x:c/2-d/2,y:-d},...ue(-c/2+d+d/2,h/2,d,30,-180,-270)],x=gt.svg(s),y=dt(t,{fill:"none"});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const S=Yt(g).replace("Z",""),w=x.path(S,y),A=Yt(p).replace("Z",""),v=x.path(A,y),E=Yt(C),D=x.path(E,{...y}),q=s.insert("g",":first-child");return q.insert(()=>D,":first-child").attr("stroke-opacity",0),q.insert(()=>w,":first-child"),q.insert(()=>v,":first-child"),q.attr("class","text"),u&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",u),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),q.attr("transform",`translate(${d-d/4}, 0)`),a.attr("transform",`translate(${-c/2+(t.padding??0)/2-(o.x-(o.left??0))},${-h/2+(t.padding??0)/2-(o.y-(o.top??0))})`),ft(t,q),t.intersect=function(U){return lt.polygon(t,C,U)},s}f(ju,"curlyBraces");async function Uu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=20,l=5,{shapeSvg:c,bbox:h}=await St(e,t,Tt(t)),d=Math.max(n,(h.width+o*2)*1.25,(t==null?void 0:t.width)??0),u=Math.max(l,h.height+a*2,(t==null?void 0:t.height)??0),g=u/2,{cssStyles:p}=t,C=gt.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=d,b=u,S=y-g,w=b/4,L=[{x:S,y:0},{x:w,y:0},{x:0,y:b/2},{x:w,y:b},{x:S,y:b},...ir(-S,-b/2,g,50,270,90)],A=Yt(L),v=C.path(A,x),E=c.insert(()=>v,":first-child");return E.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&E.selectChildren("path").attr("style",i),E.attr("transform",`translate(${-d/2}, ${-u/2})`),ft(t,E),t.intersect=function(D){return lt.polygon(t,L,D)},c}f(Uu,"curvedTrapezoid");async function Xu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=t.padding??20,l=Math.max(o.width+n*2,t.width??0,100),c=Math.min(Math.max(l*.23,16),56),h=c*.27,d=Math.max(o.height+n*2,t.height?t.height-(2*c-h):0),u=Math.min(l*.177,d*.45),g=d+2*c-h,p=-g/2,C=p+2*c-h,x=s.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:y}=t;if(t.look==="handDrawn"){const E=gt.svg(s),D=dt(t,{}),q=E.path(ze(-l/2,C,l,d,u),D),U=E.circle(0,p+c,c*2,D);x.insert(()=>U,":first-child"),x.insert(()=>q,":first-child"),y&&x.attr("style",y)}else x.append("rect").attr("x",-l/2).attr("y",C).attr("width",l).attr("height",d).attr("rx",u).attr("ry",u).attr("style",i),x.append("circle").attr("cx",0).attr("cy",p+c).attr("r",c).attr("style",i);ft(t,x);const b=C+d/2;a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${b-o.height/2-(o.y-(o.top??0))})`);const S=p+c,w=Math.asin(Math.min(1,(C-S)/c))*180/Math.PI,v=[...ir(0,-S,c,24,180+w,-w),...ir(-(-l/2+u),-(C+u),u,12,90,0),...ir(-(-l/2+u),-(g/2-u),u,12,360,270),...ir(-(l/2-u),-(g/2-u),u,12,270,180),...ir(-(l/2-u),-(C+u),u,12,180,90)];return t.intersect=function(E){return lt.polygon(t,v,E)},s}f(Xu,"person");var Z0=f((e,t,r,i,s,o)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createCylinderPathD"),Q0=f((e,t,r,i,s,o)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`].join(" "),"createOuterCylinderPathD"),J0=f((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),_h=8,Fh=8;async function Gu(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?24:s,a=t.look==="neo"?24:s,n=t.width??0;if(t.width&&(t.width=t.width-a,t.width<Fh&&(t.width=Fh)),t.height){const b=n/2/(2.5+n/50);t.height=t.height-o-b*3,t.height<_h&&(t.height=_h)}const{shapeSvg:l,bbox:c,label:h}=await St(e,t,Tt(t)),d=Math.max(t.width??0,c.width)+a,u=d/2,g=u/(2.5+d/50),p=Math.max(t.height??0,c.height)+o+g;let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=gt.svg(l),b=Q0(0,0,d,p,u,g),S=J0(0,g,d,p,u,g),w=dt(t,{}),L=y.path(b,w),A=y.path(S,dt(t,{fill:"none"}));C=l.insert(()=>A,":first-child"),C=l.insert(()=>L,":first-child"),C.attr("class","basic label-container"),x&&C.attr("style",x)}else{const y=Z0(0,0,d,p,u,g);C=l.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return C.attr("label-offset-y",g),C.attr("transform",`translate(${-d/2}, ${-(p/2+g)})`),ft(t,C),h.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(y){const b=lt.rect(t,y),S=b.x-(t.x??0);if(u!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-g)){let w=g*g*(1-S*S/(u*u));w>0&&(w=Math.sqrt(w)),w=g-w,y.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},l}f(Gu,"cylinder");async function Ei(e,t,r){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{shapeSvg:o,bbox:a}=await St(e,t,Tt(t)),n=Math.max(a.width+r.labelPaddingX*2,(t==null?void 0:t.width)||0),l=Math.max(a.height+r.labelPaddingY*2,(t==null?void 0:t.height)||0),c=-n/2,h=-l/2;let d,{rx:u,ry:g}=t;const{cssStyles:p}=t;if(r!=null&&r.rx&&r.ry&&(u=r.rx,g=r.ry),t.look==="handDrawn"){const C=gt.svg(o),x=dt(t,{}),y=u||g?C.path(ze(c,h,n,l,u||0),x):C.rectangle(c,h,n,l,x);d=o.insert(()=>y,":first-child"),d.attr("class","basic label-container").attr("style",oe(p))}else d=o.insert("rect",":first-child"),d.attr("class","basic label-container").attr("style",s).attr("rx",oe(u)).attr("ry",oe(g)).attr("x",c).attr("y",h).attr("width",n).attr("height",l);return ft(t,d,t.look==="handDrawn"?void 0:{width:n,height:l}),t.calcIntersect=function(C,x){return lt.rect(C,x)},t.intersect=function(C){return lt.rect(t,C)},o}f(Ei,"drawRect");async function Vu(e,t){const{cssClasses:r,labelPaddingX:i,labelPaddingY:s,padding:o,width:a,height:n}=t,l={rx:0,ry:0,labelPaddingX:i??(o??0)*2,labelPaddingY:s??o??0},c=await Ei(e,t,l);if(t.look==="handDrawn"){const g=gt.svg(c),p=dt(t,{}),C=c.select(".basic.label-container > path:nth-child(2)"),x=C.node();if(!x)return c;let y=null;if(x instanceof SVGGraphicsElement)y=x.getBBox();else return c;return c.insert(()=>g.line(y.x,y.y,y.x+y.width,y.y,p),".basic.label-container g.label"),c.insert(()=>g.line(y.x,y.y+y.height,y.x+y.width,y.y+y.height,p),".basic.label-container g.label"),C.remove(),c}const h=c.select(".basic.label-container"),d=(Number(h.attr("width"))||a)??0,u=(Number(h.attr("height"))||n)??0;return d>0&&u>0&&h.attr("stroke-dasharray",`${d} ${u}`),c}f(Vu,"datastore");async function Ku(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?16:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await St(e,t,Tt(t)),c=n.width+s,h=n.height+o,d=h*.2,u=-c/2,g=-h/2-d/2,{cssStyles:p}=t,C=gt.svg(a),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:u,y:g+d},{x:-u,y:g+d},{x:-u,y:-g},{x:u,y:-g},{x:u,y:g},{x:-u,y:g},{x:-u,y:g+d}],b=C.polygon(y.map(w=>[w.x,w.y]),x),S=a.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),l.attr("transform",`translate(${u+(t.padding??0)/2-(n.x-(n.left??0))}, ${g+d+(t.padding??0)/2-(n.y-(n.top??0))})`),ft(t,S),t.intersect=function(w){return lt.rect(t,w)},a}f(Ku,"dividedRectangle");async function Zu(e,t){var g,p;const{labelStyles:r,nodeStyles:i}=mt(t),s=t.look==="neo"?12:5;t.labelStyle=r;const o=t.padding??0,a=t.look==="neo"?16:o,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=(t!=null&&t.width?(t==null?void 0:t.width)/2:l.width/2)+(a??0),h=c-s;let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const C=gt.svg(n),x=dt(t,{roughness:.2,strokeWidth:2.5}),y=dt(t,{roughness:.2,strokeWidth:1.5}),b=C.circle(0,0,c*2,x),S=C.circle(0,0,h*2,y);d=n.insert("g",":first-child"),d.attr("class",oe(t.cssClasses)).attr("style",oe(u)),(g=d.node())==null||g.appendChild(b),(p=d.node())==null||p.appendChild(S)}else{d=n.insert("g",":first-child");const C=d.insert("circle",":first-child"),x=d.insert("circle");d.attr("class","basic label-container").attr("style",i),C.attr("class","outer-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0),x.attr("class","inner-circle").attr("style",i).attr("r",h).attr("cx",0).attr("cy",0)}return ft(t,d),t.intersect=function(C){return R.info("DoubleCircle intersect",t,c,C),lt.circle(t,c,C)},n}f(Zu,"doublecircle");function Qu(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=mt(t);t.label="",t.labelStyle=i;const o=e.insert("g").attr("class",Tt(t)).attr("id",t.domId??t.id),a=7,{cssStyles:n}=t,l=gt.svg(o),{nodeBorder:c}=r,h=dt(t,{fillStyle:"solid"});t.look!=="handDrawn"&&(h.roughness=0);const d=l.circle(0,0,a*2,h),u=o.insert(()=>d,":first-child");return u.selectAll("path").attr("style",`fill: ${c} !important;`),n&&n.length>0&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",n),s&&t.look!=="handDrawn"&&u.selectAll("path").attr("style",s),ft(t,u),t.intersect=function(g){return R.info("filledCircle intersect",t,{radius:a,point:g}),lt.circle(t,a,g)},o}f(Qu,"filledCircle");var Mh=10,Oh=10;async function Ju(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.height=(t==null?void 0:t.height)??0,t.height<Mh&&(t.height=Mh),t.width=((t==null?void 0:t.width)??0)-o-o/2,t.width<Oh&&(t.width=Oh));const{shapeSvg:a,bbox:n,label:l}=await St(e,t,Tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+(o??0),h=t!=null&&t.height?t==null?void 0:t.height:c+n.height,d=h,u=[{x:0,y:-h},{x:d,y:-h},{x:d/2,y:0}],{cssStyles:g}=t,p=gt.svg(a),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=Yt(u),y=p.path(x,C),b=a.insert(()=>y,":first-child").attr("transform",`translate(${-h/2}, ${h/2})`).attr("class","outer-path");return g&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),t.width=c,t.height=h,ft(t,b),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-h/2+(t.padding??0)/2+(n.y-(n.top??0))})`),t.intersect=function(S){return R.info("Triangle intersect",t,u,S),lt.polygon(t,u,S)},a}f(Ju,"flippedTriangle");async function tg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=t.padding??12,l=Math.max(o.width+n*2,t.width??0,90),c=o.height+n*2,h=Math.max(Math.min(c*.16,14),8),d=Math.max(c+h,t.height??0),u=d-h,g=Math.max(l*.38,28),p=-d/2,C=[{x:-l/2,y:p},{x:-l/2+g,y:p},{x:-l/2+g,y:p+h},{x:l/2,y:p+h},{x:l/2,y:d/2},{x:-l/2,y:d/2}],x=[`M${C[0].x},${C[0].y}`,...C.slice(1).map(w=>`L${w.x},${w.y}`),"Z"].join(" "),{cssStyles:y}=t;let b;if(t.look==="handDrawn"){const L=gt.svg(s).path(x,dt(t,{}));b=s.insert(()=>L,":first-child").attr("class","basic label-container"),y&&b.attr("style",y)}else b=s.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",i);t.look==="handDrawn"?ft(t,b):ft(t,b,{width:l,height:d});const S=p+h+u/2;return a.attr("transform",`translate(${-(o.width/2)-(o.x-(o.left??0))}, ${S-o.height/2-(o.y-(o.top??0))})`),t.intersect=function(w){return lt.polygon(t,C,w)},s}f(tg,"folder");function eg(e,t,{dir:r,config:{state:i,themeVariables:s}}){const{nodeStyles:o}=mt(t);t.label="";const a=e.insert("g").attr("class",Tt(t)).attr("id",t.domId??t.id),{cssStyles:n}=t;let l=Math.max(70,(t==null?void 0:t.width)??0),c=Math.max(10,(t==null?void 0:t.height)??0);r==="LR"&&(l=Math.max(10,(t==null?void 0:t.width)??0),c=Math.max(70,(t==null?void 0:t.height)??0));const h=-1*l/2,d=-1*c/2,u=gt.svg(a),g=dt(t,{stroke:s.lineColor,fill:s.lineColor});t.look!=="handDrawn"&&(g.roughness=0,g.fillStyle="solid");const p=u.rectangle(h,d,l,c,g),C=a.insert(()=>p,":first-child");n&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",n),o&&t.look!=="handDrawn"&&C.selectAll("path").attr("style",o),ft(t,C);const x=(i==null?void 0:i.padding)??0;return t.width&&t.height&&(t.width+=x/2||0,t.height+=x/2||0),t.intersect=function(y){return lt.rect(t,y)},a}f(eg,"forkJoin");async function rg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=15,o=10,a=t.look==="neo"?16:t.padding??0,n=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.height=((t==null?void 0:t.height)??0)-n*2,t.height<o&&(t.height=o),t.width=((t==null?void 0:t.width)??0)-a*2,t.width<s&&(t.width=s));const{shapeSvg:l,bbox:c}=await St(e,t,Tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:Math.max(s,c.width))+a*2,d=(t!=null&&t.height?t==null?void 0:t.height:Math.max(o,c.height))+n*2,u=d/2,{cssStyles:g}=t,p=gt.svg(l),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-h/2,y:-d/2},{x:h/2-u,y:-d/2},...ir(-h/2+u,0,u,50,90,270),{x:h/2-u,y:d/2},{x:-h/2,y:d/2}],y=Yt(x),b=p.path(y,C),S=l.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),ft(t,S),t.intersect=function(w){return R.info("Pill intersect",t,{radius:u,point:w}),lt.polygon(t,x,w)},l}f(rg,"halfRoundedRectangle");var tk=f((e,t,r,i,s)=>[`M${e+s},${t}`,`L${e+r-s},${t}`,`L${e+r},${t-i/2}`,`L${e+r-s},${t-i}`,`L${e+s},${t-i}`,`L${e},${t-i/2}`,"Z"].join(" "),"createHexagonPathD");async function ig(e,t){const{labelStyles:r,nodeStyles:i}=mt(t),s=t.look==="neo"?3.5:4;t.labelStyle=r;const o=t.padding??0,a=70,n=32,l=t.look==="neo"?a:o,c=t.look==="neo"?n:o;if(t.width||t.height){const S=(t.height??0)/s;t.width=((t==null?void 0:t.width)??0)-2*S-c,t.height=(t.height??0)-l}const{shapeSvg:h,bbox:d}=await St(e,t,Tt(t)),u=(t!=null&&t.height?t==null?void 0:t.height:d.height)+l,g=u/s,p=(t!=null&&t.width?t==null?void 0:t.width:d.width)+2*g+c,C=[{x:g,y:0},{x:p-g,y:0},{x:p,y:-u/2},{x:p-g,y:-u},{x:g,y:-u},{x:0,y:-u/2}];let x;const{cssStyles:y}=t;if(t.look==="handDrawn"){const b=gt.svg(h),S=dt(t,{}),w=tk(0,0,p,u,g),L=b.path(w,S);x=h.insert(()=>L,":first-child").attr("transform",`translate(${-p/2}, ${u/2})`),y&&x.attr("style",y)}else x=nr(h,p,u,C);return i&&x.attr("style",i),t.width=p,t.height=u,ft(t,x),t.intersect=function(b){return lt.polygon(t,C,b)},h}f(ig,"hexagon");async function sg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.label="",t.labelStyle=r;const{shapeSvg:s}=await St(e,t,Tt(t)),o=Math.max(30,(t==null?void 0:t.width)??0),a=Math.max(30,(t==null?void 0:t.height)??0),{cssStyles:n}=t,l=gt.svg(s),c=dt(t,{});t.look!=="handDrawn"&&(c.roughness=0,c.fillStyle="solid");const h=[{x:0,y:0},{x:o,y:0},{x:0,y:a},{x:o,y:a}],d=Yt(h),u=l.path(d,c),g=s.insert(()=>u,":first-child");return g.attr("class","basic label-container outer-path"),n&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",n),i&&t.look!=="handDrawn"&&g.selectChildren("path").attr("style",i),g.attr("transform",`translate(${-o/2}, ${-a/2})`),ft(t,g),t.intersect=function(p){return R.info("Pill intersect",t,{points:h}),lt.polygon(t,h,p)},s}f(sg,"hourglass");async function og(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await St(e,t,"icon-shape default"),u=t.pos==="t",g=n,p=n,{nodeBorder:C}=r,{stylesMap:x}=Ai(t),y=-p/2,b=-g/2,S=t.label?8:0,w=gt.svg(c),L=dt(t,{stroke:"none",fill:"none"});t.look!=="handDrawn"&&(L.roughness=0,L.fillStyle="solid");const A=w.rectangle(y,b,p,g,L),v=Math.max(p,h.width),E=g+h.height+S,D=w.rectangle(-v/2,-E/2,v,E,{...L,fill:"transparent",stroke:"none"}),q=c.insert(()=>A,":first-child"),U=c.insert(()=>D);if(t.icon){const st=c.append("g");st.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const N=st.node().getBBox(),H=N.width,G=N.height,F=N.x,Q=N.y;st.attr("transform",`translate(${-H/2-F},${u?h.height/2+S/2-G/2-Q:-h.height/2-S/2-G/2-Q})`),st.attr("style",`color: ${x.get("stroke")??C};`)}return d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${u?-E/2:E/2-h.height})`),q.attr("transform",`translate(0,${u?h.height/2+S/2:-h.height/2-S/2})`),ft(t,U),t.intersect=function(st){if(R.info("iconSquare intersect",t,st),!t.label)return lt.rect(t,st);const N=t.x??0,H=t.y??0,G=t.height??0;let F=[];return u?F=[{x:N-h.width/2,y:H-G/2},{x:N+h.width/2,y:H-G/2},{x:N+h.width/2,y:H-G/2+h.height+S},{x:N+p/2,y:H-G/2+h.height+S},{x:N+p/2,y:H+G/2},{x:N-p/2,y:H+G/2},{x:N-p/2,y:H-G/2+h.height+S},{x:N-h.width/2,y:H-G/2+h.height+S}]:F=[{x:N-p/2,y:H-G/2},{x:N+p/2,y:H-G/2},{x:N+p/2,y:H-G/2+g},{x:N+h.width/2,y:H-G/2+g},{x:N+h.width/2/2,y:H+G/2},{x:N-h.width/2,y:H+G/2},{x:N-h.width/2,y:H-G/2+g},{x:N-p/2,y:H-G/2+g}],lt.polygon(t,F,st)},c}f(og,"icon");async function ag(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,label:d}=await St(e,t,"icon-shape default"),u=20,g=t.label?8:0,p=t.pos==="t",{nodeBorder:C,mainBkg:x}=r,{stylesMap:y}=Ai(t),b=gt.svg(c),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=y.get("fill");S.stroke=w??x;const L=c.append("g");t.icon&&L.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const A=L.node().getBBox(),v=A.width,E=A.height,D=A.x,q=A.y,U=Math.max(v,E)*Math.SQRT2+u*2,st=b.circle(0,0,U,S),N=Math.max(U,h.width),H=U+h.height+g,G=b.rectangle(-N/2,-H/2,N,H,{...S,fill:"transparent",stroke:"none"}),F=c.insert(()=>st,":first-child"),Q=c.insert(()=>G);return L.attr("transform",`translate(${-v/2-D},${p?h.height/2+g/2-E/2-q:-h.height/2-g/2-E/2-q})`),L.attr("style",`color: ${y.get("stroke")??C};`),d.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${p?-H/2:H/2-h.height})`),F.attr("transform",`translate(0,${p?h.height/2+g/2:-h.height/2-g/2})`),ft(t,Q),t.intersect=function($){return R.info("iconSquare intersect",t,$),lt.rect(t,$)},c}f(ag,"iconCircle");async function ng(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:u}=await St(e,t,"icon-shape default"),g=t.pos==="t",p=n+d*2,C=n+d*2,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Ai(t),S=-C/2,w=-p/2,L=t.label?8:0,A=gt.svg(c),v=dt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=b.get("fill");v.stroke=E??y;const D=A.path(ze(S,w,C,p,5),v),q=Math.max(C,h.width),U=p+h.height+L,st=A.rectangle(-q/2,-U/2,q,U,{...v,fill:"transparent",stroke:"none"}),N=c.insert(()=>D,":first-child").attr("class","icon-shape2"),H=c.insert(()=>st);if(t.icon){const G=c.append("g");G.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=G.node().getBBox(),Q=F.width,$=F.height,Y=F.x,at=F.y;G.attr("transform",`translate(${-Q/2-Y},${g?h.height/2+L/2-$/2-at:-h.height/2-L/2-$/2-at})`),G.attr("style",`color: ${b.get("stroke")??x};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-U/2:U/2-h.height})`),N.attr("transform",`translate(0,${g?h.height/2+L/2:-h.height/2-L/2})`),ft(t,H),t.intersect=function(G){if(R.info("iconSquare intersect",t,G),!t.label)return lt.rect(t,G);const F=t.x??0,Q=t.y??0,$=t.height??0;let Y=[];return g?Y=[{x:F-h.width/2,y:Q-$/2},{x:F+h.width/2,y:Q-$/2},{x:F+h.width/2,y:Q-$/2+h.height+L},{x:F+C/2,y:Q-$/2+h.height+L},{x:F+C/2,y:Q+$/2},{x:F-C/2,y:Q+$/2},{x:F-C/2,y:Q-$/2+h.height+L},{x:F-h.width/2,y:Q-$/2+h.height+L}]:Y=[{x:F-C/2,y:Q-$/2},{x:F+C/2,y:Q-$/2},{x:F+C/2,y:Q-$/2+p},{x:F+h.width/2,y:Q-$/2+p},{x:F+h.width/2/2,y:Q+$/2},{x:F-h.width/2,y:Q+$/2},{x:F-h.width/2,y:Q-$/2+p},{x:F-C/2,y:Q-$/2+p}],lt.polygon(t,Y,G)},c}f(ng,"iconRounded");async function lg(e,t,{config:{themeVariables:r,flowchart:i}}){const{labelStyles:s}=mt(t);t.labelStyle=s;const o=t.assetHeight??48,a=t.assetWidth??48,n=Math.max(o,a),l=i==null?void 0:i.wrappingWidth;t.width=Math.max(n,l??0);const{shapeSvg:c,bbox:h,halfPadding:d,label:u}=await St(e,t,"icon-shape default"),g=t.pos==="t",p=n+d*2,C=n+d*2,{nodeBorder:x,mainBkg:y}=r,{stylesMap:b}=Ai(t),S=-C/2,w=-p/2,L=t.label?8:0,A=gt.svg(c),v=dt(t,{});t.look!=="handDrawn"&&(v.roughness=0,v.fillStyle="solid");const E=b.get("fill");v.stroke=E??y;const D=A.path(ze(S,w,C,p,.1),v),q=Math.max(C,h.width),U=p+h.height+L,st=A.rectangle(-q/2,-U/2,q,U,{...v,fill:"transparent",stroke:"none"}),N=c.insert(()=>D,":first-child"),H=c.insert(()=>st);if(t.icon){const G=c.append("g");G.html(`<g>${await cs(t.icon,{height:n,width:n,fallbackPrefix:""})}</g>`);const F=G.node().getBBox(),Q=F.width,$=F.height,Y=F.x,at=F.y;G.attr("transform",`translate(${-Q/2-Y},${g?h.height/2+L/2-$/2-at:-h.height/2-L/2-$/2-at})`),G.attr("style",`color: ${b.get("stroke")??x};`)}return u.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))},${g?-U/2:U/2-h.height})`),N.attr("transform",`translate(0,${g?h.height/2+L/2:-h.height/2-L/2})`),ft(t,H),t.intersect=function(G){if(R.info("iconSquare intersect",t,G),!t.label)return lt.rect(t,G);const F=t.x??0,Q=t.y??0,$=t.height??0;let Y=[];return g?Y=[{x:F-h.width/2,y:Q-$/2},{x:F+h.width/2,y:Q-$/2},{x:F+h.width/2,y:Q-$/2+h.height+L},{x:F+C/2,y:Q-$/2+h.height+L},{x:F+C/2,y:Q+$/2},{x:F-C/2,y:Q+$/2},{x:F-C/2,y:Q-$/2+h.height+L},{x:F-h.width/2,y:Q-$/2+h.height+L}]:Y=[{x:F-C/2,y:Q-$/2},{x:F+C/2,y:Q-$/2},{x:F+C/2,y:Q-$/2+p},{x:F+h.width/2,y:Q-$/2+p},{x:F+h.width/2/2,y:Q+$/2},{x:F-h.width/2,y:Q+$/2},{x:F-h.width/2,y:Q-$/2+p},{x:F-C/2,y:Q-$/2+p}],lt.polygon(t,Y,G)},c}f(lg,"iconSquare");async function hg(e,t,{config:{flowchart:r}}){const i=new Image;i.src=(t==null?void 0:t.img)??"",await i.decode();const s=Number(i.naturalWidth.toString().replace("px","")),o=Number(i.naturalHeight.toString().replace("px",""));t.imageAspectRatio=s/o;const{labelStyles:a}=mt(t);t.labelStyle=a;const n=r==null?void 0:r.wrappingWidth;t.defaultWidth=r==null?void 0:r.wrappingWidth;const l=Math.max(t.label?n??0:0,(t==null?void 0:t.assetWidth)??s),c=t.constraint==="on"&&t!=null&&t.assetHeight?t.assetHeight*t.imageAspectRatio:l,h=t.constraint==="on"?c/t.imageAspectRatio:(t==null?void 0:t.assetHeight)??o;t.width=Math.max(c,n??0);const{shapeSvg:d,bbox:u,label:g}=await St(e,t,"image-shape default"),p=t.pos==="t",C=-c/2,x=-h/2,y=t.label?8:0,b=gt.svg(d),S=dt(t,{});t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const w=b.rectangle(C,x,c,h,S),L=Math.max(c,u.width),A=h+u.height+y,v=b.rectangle(-L/2,-A/2,L,A,{...S,fill:"none",stroke:"none"}),E=d.insert(()=>w,":first-child"),D=d.insert(()=>v);if(t.img){const q=d.append("image");q.attr("href",t.img),q.attr("width",c),q.attr("height",h),q.attr("preserveAspectRatio","none"),q.attr("transform",`translate(${-c/2},${p?A/2-h:-A/2})`)}return g.attr("transform",`translate(${-u.width/2-(u.x-(u.left??0))},${p?-h/2-u.height/2-y/2:h/2-u.height/2+y/2})`),E.attr("transform",`translate(0,${p?u.height/2+y/2:-u.height/2-y/2})`),ft(t,D),t.intersect=function(q){if(R.info("iconSquare intersect",t,q),!t.label)return lt.rect(t,q);const U=t.x??0,st=t.y??0,N=t.height??0;let H=[];return p?H=[{x:U-u.width/2,y:st-N/2},{x:U+u.width/2,y:st-N/2},{x:U+u.width/2,y:st-N/2+u.height+y},{x:U+c/2,y:st-N/2+u.height+y},{x:U+c/2,y:st+N/2},{x:U-c/2,y:st+N/2},{x:U-c/2,y:st-N/2+u.height+y},{x:U-u.width/2,y:st-N/2+u.height+y}]:H=[{x:U-c/2,y:st-N/2},{x:U+c/2,y:st-N/2},{x:U+c/2,y:st-N/2+h},{x:U+u.width/2,y:st-N/2+h},{x:U+u.width/2/2,y:st+N/2},{x:U-u.width/2,y:st+N/2},{x:U-u.width/2,y:st-N/2+h},{x:U-c/2,y:st-N/2+h}],lt.polygon(t,H,q)},d}f(hg,"imageSquare");async function cg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=Math.max(l.height+o*2,t.height??0),h=Math.max(l.width+a*2,(t.width??0)-c),d=[{x:0,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:-3*c/6,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const p=gt.svg(n),C=dt(t,{}),x=Yt(d),y=p.path(x,C);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=nr(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,ft(t,u),t.intersect=function(p){return lt.polygon(t,d,p)},n}f(cg,"inv_trapezoid");async function dg(e,t){const{shapeSvg:r,bbox:i,label:s}=await St(e,t,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),s.attr("transform",`translate(${-(i.width/2)-(i.x-(i.left??0))}, ${-(i.height/2)-(i.y-(i.top??0))})`),ft(t,o),t.intersect=function(l){return lt.rect(t,l)},r}f(dg,"labelRect");async function ug(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:0,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:-(3*c)/6,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const p=gt.svg(n),C=dt(t,{}),x=Yt(d),y=p.path(x,C);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=nr(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,ft(t,u),t.intersect=function(p){return lt.polygon(t,d,p)},n}f(ug,"lean_left");async function gg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=s,a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h,y:0},{x:h+3*c/6,y:-c},{x:0,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const p=gt.svg(n),C=dt(t,{}),x=Yt(d),y=p.path(x,C);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=nr(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,ft(t,u),t.intersect=function(p){return lt.polygon(t,d,p)},n}f(gg,"lean_right");function pg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.label="",t.labelStyle=r;const s=e.insert("g").attr("class",Tt(t)).attr("id",t.domId??t.id),{cssStyles:o}=t,a=Math.max(35,(t==null?void 0:t.width)??0),n=Math.max(35,(t==null?void 0:t.height)??0),l=7,c=[{x:a,y:0},{x:0,y:n+l/2},{x:a-2*l,y:n+l/2},{x:0,y:2*n},{x:a,y:n-l/2},{x:2*l,y:n-l/2}],h=gt.svg(s),d=dt(t,{});t.look!=="handDrawn"&&(d.roughness=0,d.fillStyle="solid");const u=Yt(c),g=h.path(u,d),p=s.insert(()=>g,":first-child");return p.attr("class","outer-path"),o&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",o),i&&t.look!=="handDrawn"&&p.selectAll("path").attr("style",i),p.attr("transform",`translate(-${a/2},${-n})`),ft(t,p),t.intersect=function(C){return R.info("lightningBolt intersect",t,C),lt.polygon(t,c,C)},s}f(pg,"lightningBolt");var ek=f((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`a${s},${o} 0,0,0 ${r},0`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),rk=f((e,t,r,i,s,o,a)=>[`M${e},${t+o}`,`M${e+r},${t+o}`,`a${s},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${s},${o} 0,0,0 ${r},0`,`l0,${-i}`,`M${e},${t+o+a}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),ik=f((e,t,r,i,s,o)=>[`M${e-r/2},${-i/2}`,`a${s},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),Ih=10,Dh=10;async function fg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?24:s;if(t.width||t.height){const y=t.width??0;t.width=(t.width??0)-o,t.width<Dh&&(t.width=Dh);const S=y/2/(2.5+y/50);t.height=(t.height??0)-a-S*3,t.height<Ih&&(t.height=Ih)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,Tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,d=h/2,u=d/(2.5+h/50),g=(t!=null&&t.height?t==null?void 0:t.height:l.height)+u+a*2,p=g*.1;let C;const{cssStyles:x}=t;if(t.look==="handDrawn"){const y=gt.svg(n),b=rk(0,0,h,g,d,u,p),S=ik(0,u,h,g,d,u),w=dt(t,{}),L=y.path(b,w),A=y.path(S,w);n.insert(()=>A,":first-child").attr("class","line"),C=n.insert(()=>L,":first-child"),C.attr("class","basic label-container"),x&&C.attr("style",x)}else{const y=ek(0,0,h,g,d,u,p);C=n.insert("path",":first-child").attr("d",y).attr("class","basic label-container outer-path").attr("style",oe(x)).attr("style",i)}return C.attr("label-offset-y",u),C.attr("transform",`translate(${-h/2}, ${-(g/2+u)})`),ft(t,C),c.attr("transform",`translate(${-(l.width/2)-(l.x-(l.left??0))}, ${-(l.height/2)+u-(l.y-(l.top??0))})`),t.intersect=function(y){const b=lt.rect(t,y),S=b.x-(t.x??0);if(d!=0&&(Math.abs(S)<(t.width??0)/2||Math.abs(S)==(t.width??0)/2&&Math.abs(b.y-(t.y??0))>(t.height??0)/2-u)){let w=u*u*(1-S*S/(d*d));w>0&&(w=Math.sqrt(w)),w=u-w,y.y-(t.y??0)>0&&(w=-w),b.y+=w}return b},n}f(fg,"linedCylinder");async function mg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;if(t.width||t.height){const w=t.width;t.width=(w??0)*10/11-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,Tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+(o??0)*2,d=(t!=null&&t.height?t==null?void 0:t.height:l.height)+(a??0)*2,u=t.look==="neo"?d/4:d/8,g=d+u,{cssStyles:p}=t,C=gt.svg(n),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=[{x:-h/2-h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:g/2},...Br(-h/2-h/2*.1,g/2,h/2+h/2*.1,g/2,u,.8),{x:h/2+h/2*.1,y:-g/2},{x:-h/2-h/2*.1,y:-g/2},{x:-h/2,y:-g/2},{x:-h/2,y:g/2*1.1},{x:-h/2,y:-g/2}],b=C.polygon(y.map(w=>[w.x,w.y]),x),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),p&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),S.attr("transform",`translate(0,${-u/2})`),c.attr("transform",`translate(${-h/2+(t.padding??0)+h/2*.1/2-(l.x-(l.left??0))},${-d/2+(t.padding??0)-u/2-(l.y-(l.top??0))})`),ft(t,S),t.intersect=function(w){return lt.polygon(t,y,w)},n}f(mg,"linedWaveEdgedRect");async function yg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=t.look==="neo"?10:5;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-2*n,10),t.height=Math.max(((t==null?void 0:t.height)??0)-a*2-2*n,10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,Tt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+o*2+2*n,u=(t!=null&&t.height?t==null?void 0:t.height:c.height)+a*2+2*n,g=d-2*n,p=u-2*n,C=-g/2,x=-p/2,{cssStyles:y}=t,b=gt.svg(l),S=dt(t,{}),w=[{x:C-n,y:x+n},{x:C-n,y:x+p+n},{x:C+g-n,y:x+p+n},{x:C+g-n,y:x+p},{x:C+g,y:x+p},{x:C+g,y:x+p-n},{x:C+g+n,y:x+p-n},{x:C+g+n,y:x-n},{x:C+n,y:x-n},{x:C+n,y:x},{x:C,y:x},{x:C,y:x+n}],L=[{x:C,y:x+n},{x:C+g-n,y:x+n},{x:C+g-n,y:x+p},{x:C+g,y:x+p},{x:C+g,y:x},{x:C,y:x}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const A=Yt(w);let v=b.path(A,S);const E=Yt(L);let D=b.path(E,S);t.look!=="handDrawn"&&(v=Ua(v),D=Ua(D));const q=l.insert("g",":first-child");return q.insert(()=>v),q.insert(()=>D),q.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),h.attr("transform",`translate(${-(c.width/2)-n-(c.x-(c.left??0))}, ${-(c.height/2)+n-(c.y-(c.top??0))})`),ft(t,q),t.intersect=function(U){return lt.polygon(t,w,U)},l}f(yg,"multiRect");async function Cg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=t.padding??0,l=t.look==="neo"?16:n,c=t.look==="neo"?12:n;let h=!0;(t.width||t.height)&&(h=!1,t.width=((t==null?void 0:t.width)??0)-l*2,t.height=((t==null?void 0:t.height)??0)-c*3);const d=Math.max(o.width,(t==null?void 0:t.width)??0)+l*2,u=Math.max(o.height,(t==null?void 0:t.height)??0)+c*3,g=t.look==="neo"?u/4:u/8,p=u+(h?g/2:-g/2),C=-d/2,x=-p/2,y=10,{cssStyles:b}=t,S=Br(C-y,x+p+y,C+d-y,x+p+y,g,.8),w=S==null?void 0:S[S.length-1],L=[{x:C-y,y:x+y},{x:C-y,y:x+p+y},...S,{x:C+d-y,y:w.y-y},{x:C+d,y:w.y-y},{x:C+d,y:w.y-2*y},{x:C+d+y,y:w.y-2*y},{x:C+d+y,y:x-y},{x:C+y,y:x-y},{x:C+y,y:x},{x:C,y:x},{x:C,y:x+y}],A=[{x:C,y:x+y},{x:C+d-y,y:x+y},{x:C+d-y,y:w.y-y},{x:C+d,y:w.y-y},{x:C+d,y:x},{x:C,y:x}],v=gt.svg(s),E=dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const D=Yt(L),q=v.path(D,E),U=Yt(A),st=v.path(U,E),N=s.insert(()=>q,":first-child");return N.insert(()=>st),N.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&N.selectAll("path").attr("style",i),N.attr("transform",`translate(0,${-g/2})`),a.attr("transform",`translate(${-(o.width/2)-y-(o.x-(o.left??0))}, ${-(o.height/2)+y-g/2-(o.y-(o.top??0))})`),ft(t,N),t.intersect=function(H){return lt.polygon(t,L,H)},s}f(Cg,"multiWaveEdgedRectangle");async function xg(e,t,{config:{themeVariables:r}}){const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i,t.useHtmlLabels||ye(Jt())||(t.centerLabel=!0);const{shapeSvg:a,bbox:n,label:l}=await St(e,t,Tt(t)),c=Math.max(n.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),h=Math.max(n.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),d=-c/2,u=-h/2,{cssStyles:g}=t,p=gt.svg(a),C=dt(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=p.rectangle(d,u,c,h,C),y=a.insert(()=>x,":first-child");return y.attr("class","basic label-container outer-path"),l.attr("class","label noteLabel"),g&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",g),s&&t.look!=="handDrawn"&&y.selectAll("path").attr("style",s),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ft(t,y),t.intersect=function(b){return lt.rect(t,b)},a}f(xg,"note");var sk=f((e,t,r)=>[`M${e+r/2},${t}`,`L${e+r},${t-r/2}`,`L${e+r/2},${t-r}`,`L${e},${t-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function bg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await St(e,t,Tt(t)),a=o.width+(t.padding??0),n=o.height+(t.padding??0),l=a+n,c=.5,h=[{x:l/2,y:0},{x:l,y:-l/2},{x:l/2,y:-l},{x:0,y:-l/2}];let d;const{cssStyles:u}=t;if(t.look==="handDrawn"){const g=gt.svg(s),p=dt(t,{}),C=sk(0,0,l),x=g.path(C,p);d=s.insert(()=>x,":first-child").attr("transform",`translate(${-l/2+c}, ${l/2})`),u&&d.attr("style",u)}else d=nr(s,l,l,h),d.attr("transform",`translate(${-l/2+c}, ${l/2})`);return i&&d.attr("style",i),ft(t,d),t.calcIntersect=function(g,p){const C=g.width,x=[{x:C/2,y:0},{x:C,y:-C/2},{x:C/2,y:-C},{x:0,y:-C/2}],y=lt.polygon(g,x,p);return{x:y.x-.5,y:y.y-.5}},t.intersect=function(g){return this.calcIntersect(t,g)},s}f(bg,"question");async function kg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?21:s??0,a=t.look==="neo"?12:s??0,{shapeSvg:n,bbox:l,label:c}=await St(e,t,Tt(t)),h=l.width+(t.look==="neo"?o*2:o),d=Math.max(l.height+(t.look==="neo"?a*2:a),t.height??0),u=d/4,p=-Math.max(h,(t.width??0)-u)/2,C=-d/2,x=C/2,y=[{x:p+x,y:C},{x:p,y:0},{x:p+x,y:-C},{x:-p,y:-C},{x:-p,y:C}],{cssStyles:b}=t,S=gt.svg(n),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=Yt(y),A=S.path(L,w),v=n.insert(()=>A,":first-child");return v.attr("class","basic label-container outer-path"),b&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",b),i&&t.look!=="handDrawn"&&v.selectAll("path").attr("style",i),v.attr("transform",`translate(${-x/2},0)`),c.attr("transform",`translate(${-x/2-l.width/2-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ft(t,v),t.intersect=function(E){return lt.polygon(t,y,E)},n}f(kg,"rect_left_inv_arrow");async function Sg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;let s;t.cssClasses?s="node "+t.cssClasses:s="node default";const o=e.insert("g").attr("class",s).attr("id",t.domId||t.id),a=o.insert("g"),n=o.insert("g").attr("class","label").attr("style",i),l=t.description,c=t.label,h=await Sr(n,c,t.labelStyle,!0,!0);let d={width:0,height:0};if(ye(Nt())){const E=h.children[0],D=Dt(h);d=E.getBoundingClientRect(),D.attr("width",d.width),D.attr("height",d.height)}R.info("Text 2",l);const u=l||[],g=h.getBBox(),p=await Sr(n,Array.isArray(u)?u.join("<br/>"):u,t.labelStyle,!0,!0),C=p.children[0],x=Dt(p);d=C.getBoundingClientRect(),x.attr("width",d.width),x.attr("height",d.height);const y=(t.padding||0)/2;Dt(p).attr("transform","translate( "+(d.width>g.width?0:(g.width-d.width)/2)+", "+(g.height+y+5)+")"),Dt(h).attr("transform","translate( "+(d.width<g.width?0:-(g.width-d.width)/2)+", 0)"),d=n.node().getBBox(),n.attr("transform","translate("+-d.width/2+", "+(-d.height/2-y+3)+")");const b=d.width+(t.padding||0),S=d.height+(t.padding||0),w=-d.width/2-y,L=-d.height/2-y;let A,v;if(t.look==="handDrawn"){const E=gt.svg(o),D=dt(t,{}),q=E.path(ze(w,L,b,S,t.rx||0),D),U=E.line(-d.width/2-y,-d.height/2-y+g.height+y,d.width/2+y,-d.height/2-y+g.height+y,D);v=o.insert(()=>(R.debug("Rough node insert CXC",q),U),":first-child"),A=o.insert(()=>(R.debug("Rough node insert CXC",q),q),":first-child")}else A=a.insert("rect",":first-child"),v=a.insert("line"),A.attr("class","outer title-state").attr("style",i).attr("x",-d.width/2-y).attr("y",-d.height/2-y).attr("width",d.width+(t.padding||0)).attr("height",d.height+(t.padding||0)),v.attr("class","divider").attr("x1",-d.width/2-y).attr("x2",d.width/2+y).attr("y1",-d.height/2-y+g.height+y).attr("y2",-d.height/2-y+g.height+y);return ft(t,A),t.intersect=function(E){return lt.rect(t,E)},o}f(Sg,"rectWithTitle");async function Tg(e,t,{config:{themeVariables:r}}){const i=(r==null?void 0:r.radius)??5,s={rx:i,ry:i,labelPaddingX:((t==null?void 0:t.padding)??0)*1,labelPaddingY:((t==null?void 0:t.padding)??0)*1};return Ei(e,t,s)}f(Tg,"roundedRect");var _r=8;async function wg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0,{shapeSvg:a,bbox:n,label:l}=await St(e,t,Tt(t)),c=((t==null?void 0:t.width)??n.width)+s*2+(t.look==="neo"?_r:_r*2),h=((t==null?void 0:t.height)??n.height)+o*2,d=c-_r,u=h,g=_r-c/2,p=-h/2,{cssStyles:C}=t,x=gt.svg(a),y=dt(t,{});t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const b=[{x:g,y:p},{x:g+d,y:p},{x:g+d,y:p+u},{x:g-_r,y:p+u},{x:g-_r,y:p},{x:g,y:p},{x:g,y:p+u}],S=x.polygon(b.map(L=>[L.x,L.y]),y),w=a.insert(()=>S,":first-child");return w.attr("class","basic label-container outer-path").attr("style",oe(C)),i&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),C&&t.look!=="handDrawn"&&w.selectAll("path").attr("style",i),l.attr("transform",`translate(${_r/2-n.width/2-(n.x-(n.left??0))}, ${-(n.height/2)-(n.y-(n.top??0))})`),ft(t,w),t.intersect=function(L){return lt.rect(t,L)},a}f(wg,"shadedProcess");async function Bg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-o*2,10),t.height=Math.max(((t==null?void 0:t.height)??0)/1.5-a*2,10));const{shapeSvg:n,bbox:l,label:c}=await St(e,t,Tt(t)),h=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,d=((t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2)*1.5,u=h,g=d/1.5,p=-u/2,C=-g/2,{cssStyles:x}=t,y=gt.svg(n),b=dt(t,{});t.look!=="handDrawn"&&(b.roughness=0,b.fillStyle="solid");const S=[{x:p,y:C},{x:p,y:C+g},{x:p+u,y:C+g},{x:p+u,y:C-g/2}],w=Yt(S),L=y.path(w,b),A=n.insert(()=>L,":first-child");return A.attr("class","basic label-container outer-path"),x&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",x),i&&t.look!=="handDrawn"&&A.selectChildren("path").attr("style",i),A.attr("transform",`translate(0, ${g/4})`),c.attr("transform",`translate(${-u/2+(t.padding??0)-(l.x-(l.left??0))}, ${-g/4+(t.padding??0)-(l.y-(l.top??0))})`),ft(t,A),t.intersect=function(v){return lt.polygon(t,S,v)},n}f(Bg,"slopedRect");async function Lg(e,t){const r=t.padding??0,i=t.look==="neo"?16:r*2,s=t.look==="neo"?12:r,o={rx:0,ry:0,labelPaddingX:t.labelPaddingX??i,labelPaddingY:s};return Ei(e,t,o)}f(Lg,"squareRect");async function vg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?20:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=l.height+(t.look==="neo"?a*2:a),h=l.width+c/4+(t.look==="neo"?o*2:o),d=c/2,{cssStyles:u}=t,g=gt.svg(n),p=dt(t,{});t.look!=="handDrawn"&&(p.roughness=0,p.fillStyle="solid");const C=[{x:-h/2+d,y:-c/2},{x:h/2-d,y:-c/2},...ir(-h/2+d,0,d,50,90,270),{x:h/2-d,y:c/2},...ir(h/2-d,0,d,50,270,450)],x=Yt(C),y=g.path(x,p),b=n.insert(()=>y,":first-child");return b.attr("class","basic label-container outer-path"),u&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",u),i&&t.look!=="handDrawn"&&b.selectChildren("path").attr("style",i),ft(t,b),t.intersect=function(S){return lt.polygon(t,C,S)},n}f(vg,"stadium");async function Ag(e,t){const r={rx:t.look==="neo"?3:5,ry:t.look==="neo"?3:5};return Ei(e,t,r)}f(Ag,"state");function Eg(e,t,{config:{themeVariables:r}}){var b,S;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i;const{cssStyles:o}=t,{lineColor:a,stateBorder:n,nodeBorder:l,nodeShadow:c}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const h=e.insert("g").attr("class","node default").attr("id",t.domId??t.id),d=gt.svg(h),u=dt(t,{});t.look!=="handDrawn"&&(u.roughness=0,u.fillStyle="solid");const g=d.circle(0,0,t.width,{...u,stroke:a,strokeWidth:2}),p=n??l,C=(t.width??0)*5/14,x=d.circle(0,0,C,{...u,fill:p,stroke:p,strokeWidth:2,fillStyle:"solid"}),y=h.insert(()=>g,":first-child");if(y.insert(()=>x),t.look!=="handDrawn"&&y.attr("class","outer-path"),o&&y.selectAll("path").attr("style",o),s&&y.selectAll("path").attr("style",s),t.width<25&&c&&t.look!=="handDrawn"){const w=((S=(b=e.node())==null?void 0:b.ownerSVGElement)==null?void 0:S.id)??"",L=w?`${w}-drop-shadow-small`:"drop-shadow-small";y.attr("style",`filter:url(#${L})`)}return ft(t,y),t.intersect=function(w){return lt.circle(t,(t.width??0)/2,w)},h}f(Eg,"stateEnd");function _g(e,t,{config:{themeVariables:r}}){var n,l;const{lineColor:i,nodeShadow:s}=r;(t.width||t.height)&&((t.width??0)<14&&(t.width=14),(t.height??0)<14&&(t.height=14)),t.width||(t.width=14),t.height||(t.height=14);const o=e.insert("g").attr("class","node default").attr("id",t.domId||t.id);let a;if(t.look==="handDrawn"){const h=gt.svg(o).circle(0,0,t.width,sx(i));a=o.insert(()=>h),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14)}else a=o.insert("circle",":first-child"),a.attr("class","state-start").attr("r",(t.width??7)/2).attr("width",t.width??14).attr("height",t.height??14);if(t.width<25&&s&&t.look!=="handDrawn"){const c=((l=(n=e.node())==null?void 0:n.ownerSVGElement)==null?void 0:l.id)??"",h=c?`${c}-drop-shadow-small`:"drop-shadow-small";a.attr("style",`filter:url(#${h})`)}return ft(t,a),t.intersect=function(c){return lt.circle(t,(t.width??7)/2,c)},o}f(_g,"stateStart");var ti=8;async function Fg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=(t==null?void 0:t.padding)??8,o=t.look==="neo"?28:s,a=t.look==="neo"?12:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=Math.max(l.width+2*ti+o,t.width??0),h=Math.max(l.height+a,t.height??0),d=c-2*ti,u=h,g=-c/2,p=-h/2,C=[{x:0,y:0},{x:d,y:0},{x:d,y:-u},{x:0,y:-u},{x:0,y:0},{x:-8,y:0},{x:d+8,y:0},{x:d+8,y:-u},{x:-8,y:-u},{x:-8,y:0}];if(t.look==="handDrawn"){const x=gt.svg(n),y=dt(t,{}),b=x.rectangle(g,p,d+16,u,y),S=x.line(g+ti,p,g+ti,p+u,y),w=x.line(g+ti+d,p,g+ti+d,p+u,y);n.insert(()=>S,":first-child"),n.insert(()=>w,":first-child");const L=n.insert(()=>b,":first-child"),{cssStyles:A}=t;L.attr("class","basic label-container").attr("style",oe(A)),ft(t,L)}else{const x=nr(n,d,u,C);i&&x.attr("style",i),ft(t,x)}return t.intersect=function(x){return lt.polygon(t,C,x)},n}f(Fg,"subroutine");var Go=.2;async function Mg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;(t.width||t.height)&&(t.height=Math.max(((t==null?void 0:t.height)??0)-a*2,10),t.width=Math.max(((t==null?void 0:t.width)??0)-o*2-Go*(t.height+a*2),10));const{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a*2,h=Go*c,d=Go*c,g=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2+h-h,p=c,C=-g/2,x=-p/2,{cssStyles:y}=t,b=gt.svg(n),S=dt(t,{}),w=[{x:C-h/2,y:x},{x:C+g+h/2,y:x},{x:C+g+h/2,y:x+p},{x:C-h/2,y:x+p}],L=[{x:C+g-h/2,y:x+p},{x:C+g+h/2,y:x+p},{x:C+g+h/2,y:x+p-d}];t.look!=="handDrawn"&&(S.roughness=0,S.fillStyle="solid");const A=Yt(w),v=b.path(A,S),E=Yt(L),D=b.path(E,{...S,fillStyle:"solid"}),q=n.insert(()=>D,":first-child");return q.insert(()=>v,":first-child"),q.attr("class","basic label-container outer-path"),y&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",y),i&&t.look!=="handDrawn"&&q.selectAll("path").attr("style",i),ft(t,q),t.intersect=function(U){return lt.polygon(t,w,U)},n}f(Mg,"taggedRect");async function Og(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,label:a}=await St(e,t,Tt(t)),n=Math.max(o.width+(t.padding??0)*2,(t==null?void 0:t.width)??0),l=Math.max(o.height+(t.padding??0)*2,(t==null?void 0:t.height)??0),c=l/8,h=.2*n,d=.2*l,u=l+c,{cssStyles:g}=t,p=gt.svg(s),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-n/2-n/2*.1,y:u/2},...Br(-n/2-n/2*.1,u/2,n/2+n/2*.1,u/2,c,.8),{x:n/2+n/2*.1,y:-u/2},{x:-n/2-n/2*.1,y:-u/2}],y=-n/2+n/2*.1,b=-u/2-d*.4,S=[{x:y+n-h,y:(b+l)*1.3},{x:y+n,y:b+l-d},{x:y+n,y:(b+l)*.9},...Br(y+n,(b+l)*1.25,y+n-h,(b+l)*1.3,-l*.02,.5)],w=Yt(x),L=p.path(w,C),A=Yt(S),v=p.path(A,{...C,fillStyle:"solid"}),E=s.insert(()=>v,":first-child");return E.insert(()=>L,":first-child"),E.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-c/2})`),a.attr("transform",`translate(${-n/2+(t.padding??0)-(o.x-(o.left??0))},${-l/2+(t.padding??0)-c/2-(o.y-(o.top??0))})`),ft(t,E),t.intersect=function(D){return lt.polygon(t,x,D)},s}f(Og,"taggedWaveEdgedRectangle");async function Ig(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o}=await St(e,t,Tt(t)),a=Math.max(o.width+(t.padding??0),(t==null?void 0:t.width)||0),n=Math.max(o.height+(t.padding??0),(t==null?void 0:t.height)||0),l=-a/2,c=-n/2,h=s.insert("rect",":first-child");return h.attr("class","text").attr("style",i).attr("rx",0).attr("ry",0).attr("x",l).attr("y",c).attr("width",a).attr("height",n),ft(t,h),t.intersect=function(d){return lt.rect(t,d)},s}f(Ig,"text");var ok=f((e,t,r,i,s,o)=>`M${e},${t}
|
|
205
|
+
a${s},${o} 0,0,1 0,${-i}
|
|
206
|
+
l${r},0
|
|
207
|
+
a${s},${o} 0,0,1 0,${i}
|
|
208
|
+
M${r},${-i}
|
|
209
|
+
a${s},${o} 0,0,0 0,${i}
|
|
210
|
+
l${-r},0`,"createCylinderPathD"),ak=f((e,t,r,i,s,o)=>[`M${e},${t}`,`M${e+r},${t}`,`a${s},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${s},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),nk=f((e,t,r,i,s,o)=>[`M${e+r/2},${-i/2}`,`a${s},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD"),Rh=5,Ph=10;async function Dg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?12:s/2,a=t.height??0;if(t.height&&(t.height=t.height-o,t.height<Rh&&(t.height=Rh)),t.width){const y=a/2/(2.5+a/50);t.width=t.width-o-y*3,t.width<Ph&&(t.width=Ph)}const{shapeSvg:n,bbox:l,label:c}=await St(e,t,Tt(t)),h=Math.max(t.height??0,l.height)+o,d=h/2,u=d/(2.5+h/50),g=Math.max(t.width??0,l.width)+u+o,{cssStyles:p}=t;let C;if(t.look==="handDrawn"){const x=gt.svg(n),y=ak(0,0,g,h,u,d),b=nk(0,0,g,h,u,d),S=x.path(y,dt(t,{})),w=x.path(b,dt(t,{fill:"none"}));C=n.insert(()=>w,":first-child"),C=n.insert(()=>S,":first-child"),C.attr("class","basic label-container"),p&&C.attr("style",p)}else{const x=ok(0,0,g,h,u,d);C=n.insert("path",":first-child").attr("d",x).attr("class","basic label-container").attr("style",oe(p)).attr("style",i),C.attr("class","basic label-container outer-path"),p&&C.selectAll("path").attr("style",p),i&&C.selectAll("path").attr("style",i)}return C.attr("label-offset-x",u),C.attr("transform",`translate(${-g/2}, ${h/2} )`),c.attr("transform",`translate(${-(l.width/2)-u-(l.x-(l.left??0))}, ${-(l.height/2)-(l.y-(l.top??0))})`),ft(t,C),t.intersect=function(x){const y=lt.rect(t,x),b=y.y-(t.y??0);if(d!=0&&(Math.abs(b)<(t.height??0)/2||Math.abs(b)==(t.height??0)/2&&Math.abs(y.x-(t.x??0))>(t.width??0)/2-u)){let S=u*u*(1-b*b/(d*d));S!=0&&(S=Math.sqrt(Math.abs(S))),S=u-S,x.x-(t.x??0)>0&&(S=-S),y.x+=S}return y},n}f(Dg,"tiltedCylinder");async function Rg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=(t.look==="neo",s),a=t.look==="neo"?s*2:s,{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=Math.max(l.height+o,t.height??0),h=Math.max(l.width+a,(t.width??0)-c),d=[{x:-3*c/6,y:0},{x:h+3*c/6,y:0},{x:h,y:-c},{x:0,y:-c}];let u;const{cssStyles:g}=t;if(t.look==="handDrawn"){const p=gt.svg(n),C=dt(t,{}),x=Yt(d),y=p.path(x,C);u=n.insert(()=>y,":first-child").attr("transform",`translate(${-h/2}, ${c/2})`),g&&u.attr("style",g)}else u=nr(n,h,c,d);return i&&u.attr("style",i),t.width=h,t.height=c,ft(t,u),t.intersect=function(p){return lt.polygon(t,d,p)},n}f(Rg,"trapezoid");async function Pg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s,n=15,l=5;(t.width||t.height)&&(t.height=(t.height??0)-a*2,t.height<l&&(t.height=l),t.width=(t.width??0)-o*2,t.width<n&&(t.width=n));const{shapeSvg:c,bbox:h}=await St(e,t,Tt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:h.width)+o*2,u=(t!=null&&t.height?t==null?void 0:t.height:h.height)+a*2,{cssStyles:g}=t,p=gt.svg(c),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-d/2*.8,y:-u/2},{x:d/2*.8,y:-u/2},{x:d/2,y:-u/2*.6},{x:d/2,y:u/2},{x:-d/2,y:u/2},{x:-d/2,y:-u/2*.6}],y=Yt(x),b=p.path(y,C),S=c.insert(()=>b,":first-child");return S.attr("class","basic label-container outer-path"),g&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),ft(t,S),t.intersect=function(w){return lt.polygon(t,x,w)},c}f(Pg,"trapezoidalPentagon");var $h=10,qh=10;async function $g(e,t){var w;const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?s*2:s;(t.width||t.height)&&(t.width=(((t==null?void 0:t.width)??0)-o)/2,t.width<qh&&(t.width=qh),t.height=(t==null?void 0:t.height)??0,t.height<$h&&(t.height=$h));const{shapeSvg:a,bbox:n,label:l}=await St(e,t,Tt(t)),c=ar((w=Nt().flowchart)==null?void 0:w.htmlLabels),h=(t!=null&&t.width?t==null?void 0:t.width:n.width)+o,d=t!=null&&t.height?t==null?void 0:t.height:h+n.height,u=d,g=[{x:0,y:0},{x:u,y:0},{x:u/2,y:-d}],{cssStyles:p}=t,C=gt.svg(a),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=Yt(g),b=C.path(y,x),S=a.insert(()=>b,":first-child").attr("transform",`translate(${-d/2}, ${d/2})`).attr("class","outer-path");return p&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",p),i&&t.look!=="handDrawn"&&S.selectChildren("path").attr("style",i),t.width=h,t.height=d,ft(t,S),l.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${d/2-(n.height+(t.padding??0)/(c?2:1)-(n.y-(n.top??0)))})`),t.intersect=function(L){return R.info("Triangle intersect",t,g,L),lt.polygon(t,g,L)},a}f($g,"triangle");async function qg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?12:s;let n=!0;(t.width||t.height)&&(n=!1,t.width=((t==null?void 0:t.width)??0)-o*2,t.width<10&&(t.width=10),t.height=((t==null?void 0:t.height)??0)-a*2,t.height<10&&(t.height=10));const{shapeSvg:l,bbox:c,label:h}=await St(e,t,Tt(t)),d=(t!=null&&t.width?t==null?void 0:t.width:c.width)+(o??0)*2,u=(t!=null&&t.height?t==null?void 0:t.height:c.height)+(a??0)*2,g=t.look==="neo"?u/4:u/8,p=u+(n?g:-g),{cssStyles:C}=t,y=14-d,b=y>0?y/2:0,S=gt.svg(l),w=dt(t,{});t.look!=="handDrawn"&&(w.roughness=0,w.fillStyle="solid");const L=[{x:-d/2-b,y:p/2},...Br(-d/2-b,p/2,d/2+b,p/2,g,.8),{x:d/2+b,y:-p/2},{x:-d/2-b,y:-p/2}],A=Yt(L),v=S.path(A,w),E=l.insert(()=>v,":first-child");return E.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&E.selectAll("path").attr("style",i),E.attr("transform",`translate(0,${-g/2})`),h.attr("transform",`translate(${-d/2+(t.padding??0)-(c.x-(c.left??0))},${-u/2+(t.padding??0)-g-(c.y-(c.top??0))})`),ft(t,E),t.intersect=function(D){return lt.polygon(t,L,D)},l}f(qg,"waveEdgedRectangle");async function Ng(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.padding??0,o=t.look==="neo"?16:s,a=t.look==="neo"?20:s;if(t.width||t.height){t.width=(t==null?void 0:t.width)??0,t.width<20&&(t.width=20),t.height=(t==null?void 0:t.height)??0,t.height<10&&(t.height=10);const w=Math.min(t.height*.2,t.height/4);t.height=Math.ceil(t.height-a-w*(20/9)),t.width=t.width-o*2}const{shapeSvg:n,bbox:l}=await St(e,t,Tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:l.width)+o*2,h=(t!=null&&t.height?t==null?void 0:t.height:l.height)+a,d=h/8,u=h+d*2,{cssStyles:g}=t,p=gt.svg(n),C=dt(t,{});t.look!=="handDrawn"&&(C.roughness=0,C.fillStyle="solid");const x=[{x:-c/2,y:u/2},...Br(-c/2,u/2,c/2,u/2,d,1),{x:c/2,y:-u/2},...Br(c/2,-u/2,-c/2,-u/2,d,-1)],y=Yt(x),b=p.path(y,C),S=n.insert(()=>b,":first-child");return S.attr("class","basic label-container"),g&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",g),i&&t.look!=="handDrawn"&&S.selectAll("path").attr("style",i),ft(t,S),t.intersect=function(w){return lt.polygon(t,x,w)},n}f(Ng,"waveRectangle");var ee=10;async function Wg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t.look==="neo"?16:t.padding??0,o=t.look==="neo"?12:t.padding??0;(t.width||t.height)&&(t.width=Math.max(((t==null?void 0:t.width)??0)-s*2-ee,10),t.height=Math.max(((t==null?void 0:t.height)??0)-o*2-ee,10));const{shapeSvg:a,bbox:n,label:l}=await St(e,t,Tt(t)),c=(t!=null&&t.width?t==null?void 0:t.width:n.width)+s*2+ee,h=(t!=null&&t.height?t==null?void 0:t.height:n.height)+o*2+ee,d=c-ee,u=h-ee,g=-d/2,p=-u/2,{cssStyles:C}=t,x=gt.svg(a),y=dt(t,{}),b=[{x:g-ee,y:p-ee},{x:g-ee,y:p+u},{x:g+d,y:p+u},{x:g+d,y:p-ee}],S=`M${g-ee},${p-ee} L${g+d},${p-ee} L${g+d},${p+u} L${g-ee},${p+u} L${g-ee},${p-ee}
|
|
211
|
+
M${g-ee},${p} L${g+d},${p}
|
|
212
|
+
M${g},${p-ee} L${g},${p+u}`;t.look!=="handDrawn"&&(y.roughness=0,y.fillStyle="solid");const w=x.path(S,y),L=a.insert(()=>w,":first-child");return L.attr("transform",`translate(${ee/2}, ${ee/2})`),L.attr("class","basic label-container outer-path"),C&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",C),i&&t.look!=="handDrawn"&&L.selectAll("path").attr("style",i),l.attr("transform",`translate(${-(n.width/2)+ee/2-(n.x-(n.left??0))}, ${-(n.height/2)+ee/2-(n.y-(n.top??0))})`),ft(t,L),t.intersect=function(A){return lt.polygon(t,b,A)},a}f(Wg,"windowPane");var Nh=new Set(["redux-color","redux-dark-color"]),lk=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function qn(e,t){var Et,_t,zt,It;const r=t;r.alias&&(t.label=r.alias);const{theme:i,themeVariables:s}=Jt(),{rowEven:o,rowOdd:a,nodeBorder:n,borderColorArray:l}=s;if(t.look==="handDrawn"){const{themeVariables:yt}=Jt(),{background:xt}=yt,Rt={...t,id:t.id+"-background",domId:(t.domId||t.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${xt}`]};await qn(e,Rt)}const c=Jt();t.useHtmlLabels=c.htmlLabels;let h=((Et=c.er)==null?void 0:Et.diagramPadding)??10,d=((_t=c.er)==null?void 0:_t.entityPadding)??6;const{cssStyles:u}=t,{labelStyles:g,nodeStyles:p}=mt(t);if(r.attributes.length===0&&t.label){const yt={rx:0,ry:0,labelPaddingX:h,labelPaddingY:h*1.5};pr(t.label,c)+yt.labelPaddingX*2<c.er.minEntityWidth&&(t.width=c.er.minEntityWidth);const xt=await Ei(e,t,yt);if(i!=null&&Nh.has(i)){const Rt=r.colorIndex??0;xt.attr("data-color-id",`color-${Rt%l.length}`)}if(!ar(c.htmlLabels)){const Rt=xt.select("text"),Wt=(zt=Rt.node())==null?void 0:zt.getBBox();Rt.attr("transform",`translate(${-Wt.width/2}, 0)`)}return xt}c.htmlLabels||(h*=1.25,d*=1.25);let C=Tt(t);C||(C="node default");const x=e.insert("g").attr("class",C).attr("id",t.domId||t.id),y=await ii(x,t.label??"",c,0,0,["name"],g);y.height+=d;let b=0;const S=[],w=[];let L=0,A=0,v=0,E=0,D=!0,q=!0;for(const yt of r.attributes){const xt=await ii(x,yt.type,c,0,b,["attribute-type"],g);L=Math.max(L,xt.width+h);const Rt=await ii(x,yt.name,c,0,b,["attribute-name"],g);A=Math.max(A,Rt.width+h);const Wt=await ii(x,yt.keys.join(),c,0,b,["attribute-keys"],g);v=Math.max(v,Wt.width+h);const At=await ii(x,yt.comment,c,0,b,["attribute-comment"],g);E=Math.max(E,At.width+h);const P=Math.max(xt.height,Rt.height,Wt.height,At.height)+d;w.push({yOffset:b,rowHeight:P}),b+=P}let U=4;v<=h&&(D=!1,v=0,U--),E<=h&&(q=!1,E=0,U--);const st=x.node().getBBox();if(y.width+h*2-(L+A+v+E)>0){const yt=y.width+h*2-(L+A+v+E);L+=yt/U,A+=yt/U,v>0&&(v+=yt/U),E>0&&(E+=yt/U)}const N=L+A+v+E,H=gt.svg(x),G=dt(t,{});t.look!=="handDrawn"&&(G.roughness=0,G.fillStyle="solid");let F=0;w.length>0&&(F=w.reduce((yt,xt)=>yt+((xt==null?void 0:xt.rowHeight)??0),0));const Q=Math.max(st.width+h*2,(t==null?void 0:t.width)||0,N),$=Math.max((F??0)+y.height,(t==null?void 0:t.height)||0),Y=-Q/2,at=-$/2;if(x.selectAll("g:not(:first-child)").each((yt,xt,Rt)=>{const Wt=Dt(Rt[xt]),At=Wt.attr("transform");let P=0,ut=0;if(At){const re=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(At);re&&(P=parseFloat(re[1]),ut=parseFloat(re[2]),Wt.attr("class").includes("attribute-name")?P+=L:Wt.attr("class").includes("attribute-keys")?P+=L+A:Wt.attr("class").includes("attribute-comment")&&(P+=L+A+v))}Wt.attr("transform",`translate(${Y+h/2+P}, ${ut+at+y.height+d/2})`)}),x.select(".name").attr("transform","translate("+-y.width/2+", "+(at+d/2)+")"),i!=null&&Nh.has(i)){const yt=r.colorIndex??0;x.attr("data-color-id",`color-${yt%l.length}`)}const wt=H.rectangle(Y,at,Q,$,G),bt=x.insert(()=>wt,":first-child").attr("class","outer-path").attr("style",u.join(""));S.push(0);for(const[yt,xt]of w.entries()){const Wt=(yt+1)%2===0&&xt.yOffset!==0,At=H.rectangle(Y,y.height+at+(xt==null?void 0:xt.yOffset),Q,xt==null?void 0:xt.rowHeight,{...G,fill:Wt?o:a,stroke:n});x.insert(()=>At,"g.label").attr("style",u.join("")).attr("class",`row-rect-${Wt?"even":"odd"}`)}const Lt=1e-4;let nt=si(Y,y.height+at,Q+Y,y.height+at,Lt),Ct=H.polygon(nt.map(yt=>[yt.x,yt.y]),G);if(x.insert(()=>Ct).attr("class","divider"),nt=si(L+Y,y.height+at,L+Y,$+at,Lt),Ct=H.polygon(nt.map(yt=>[yt.x,yt.y]),G),x.insert(()=>Ct).attr("class","divider"),D){const yt=L+A+Y;nt=si(yt,y.height+at,yt,$+at,Lt),Ct=H.polygon(nt.map(xt=>[xt.x,xt.y]),G),x.insert(()=>Ct).attr("class","divider")}if(q){const yt=L+A+v+Y;nt=si(yt,y.height+at,yt,$+at,Lt),Ct=H.polygon(nt.map(xt=>[xt.x,xt.y]),G),x.insert(()=>Ct).attr("class","divider")}for(const yt of S){const xt=y.height+at+yt;nt=si(Y,xt,Q+Y,xt,Lt),Ct=H.polygon(nt.map(Rt=>[Rt.x,Rt.y]),G),x.insert(()=>Ct).attr("class","divider")}if(ft(t,bt),p&&t.look!=="handDrawn")if(i!=null&&lk.has(i))x.selectAll("path").attr("style",p);else{const yt=p.split(";"),xt=(It=yt==null?void 0:yt.filter(Rt=>Rt.includes("stroke")))==null?void 0:It.map(Rt=>`${Rt}`).join("; ");x.selectAll("path").attr("style",xt??""),x.selectAll(".row-rect-even path").attr("style",p)}return t.intersect=function(yt){return lt.rect(t,yt)},x}f(qn,"erBox");async function ii(e,t,r,i=0,s=0,o=[],a=""){const n=e.insert("g").attr("class",`label ${o.join(" ")}`).attr("transform",`translate(${i}, ${s})`).attr("style",a);t!==Vl(t)&&(t=Vl(t),t=t.replaceAll("<","<").replaceAll(">",">"));const l=n.node().appendChild(await Ve(n,t,{width:pr(t,r)+100,style:a,useHtmlLabels:r.htmlLabels},r));if(t.includes("<")||t.includes(">")){let h=l.children[0];for(h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">");h.childNodes[0];)h=h.childNodes[0],h.textContent=h.textContent.replaceAll("<","<").replaceAll(">",">")}let c=l.getBBox();if(ar(r.htmlLabels)){const h=l.children[0];h.style.textAlign="start";const d=Dt(l);c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}return c}f(ii,"addText");function si(e,t,r,i,s){return e===r?[{x:e-s/2,y:t},{x:e+s/2,y:t},{x:r+s/2,y:i},{x:r-s/2,y:i}]:[{x:e,y:t-s/2},{x:e,y:t+s/2},{x:r,y:i+s/2},{x:r,y:i-s/2}]}f(si,"lineToPolygon");async function zg(e,t,r,i,s=r.class.padding??12){const o=i?0:3,a=e.insert("g").attr("class",Tt(t)).attr("id",t.domId||t.id);let n=null,l=null,c=null,h=null,d=0,u=0,g=0;if(n=a.insert("g").attr("class","annotation-group text"),t.annotations.length>0){const b=t.annotations[0];await Xi(n,{text:`«${b}»`},0),d=n.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Xi(l,t,0,["font-weight: bolder"]);const p=l.node().getBBox();u=p.height,c=a.insert("g").attr("class","members-group text");let C=0;for(const b of t.members){const S=await Xi(c,b,C,[b.parseClassifier()]);C+=S+o}g=c.node().getBBox().height,g<=0&&(g=s/2),h=a.insert("g").attr("class","methods-group text");let x=0;for(const b of t.methods){const S=await Xi(h,b,x,[b.parseClassifier()]);x+=S+o}let y=a.node().getBBox();if(n!==null){const b=n.node().getBBox();n.attr("transform",`translate(${-b.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${d})`),y=a.node().getBBox(),c.attr("transform",`translate(0, ${d+u+s*2})`),y=a.node().getBBox(),h.attr("transform",`translate(0, ${d+u+(g?g+s*4:s*2)})`),y=a.node().getBBox(),{shapeSvg:a,bbox:y}}f(zg,"textHelper");async function Xi(e,t,r,i=[]){const s=e.insert("g").attr("class","label").attr("style",i.join("; ")),o=Jt();let a="useHtmlLabels"in t?t.useHtmlLabels:ar(o.htmlLabels)??!0,n="";"text"in t?n=t.text:n=t.label,!a&&n.startsWith("\\")&&(n=n.substring(1)),rs(n)&&(a=!0);const l=await Ve(s,un(Tr(n)),{width:pr(n,o)+50,classes:"markdown-node-label",useHtmlLabels:a},o);let c,h=1;if(a){const d=l.children[0],u=Dt(l);h=d.innerHTML.split("<br>").length,d.innerHTML.includes("</math>")&&(h+=d.innerHTML.split("<mrow>").length-1),await Dn(d),c=d.getBoundingClientRect(),u.attr("width",c.width),u.attr("height",c.height)}else{i.includes("font-weight: bolder")&&Dt(l).selectAll("tspan").attr("font-weight",""),h=l.children.length;const d=l.children[0];(l.textContent===""||l.textContent.includes(">"))&&(d.textContent=n[0]+n.substring(1).replaceAll(">",">").replaceAll("<","<").trim(),n[1]===" "&&(d.textContent=d.textContent[0]+" "+d.textContent.substring(1))),d.textContent==="undefined"&&(d.textContent=""),c=l.getBBox()}return s.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}f(Xi,"addText");async function Hg(e,t){var H,G;const r=Nt(),{themeVariables:i}=r,{useGradient:s}=i,o=r.class.padding??12,a=o,n=t.useHtmlLabels??ar(r.htmlLabels)??!0,l=t;l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[];const{shapeSvg:c,bbox:h}=await zg(e,t,r,n,a),{labelStyles:d,nodeStyles:u}=mt(t);t.labelStyle=d,t.cssStyles=l.styles||"";const g=((H=l.styles)==null?void 0:H.join(";"))||u||"";t.cssStyles||(t.cssStyles=g.replaceAll("!important","").split(";"));const p=l.members.length===0&&l.methods.length===0&&!((G=r.class)!=null&&G.hideEmptyMembersBox),C=gt.svg(c),x=dt(t,{});t.look!=="handDrawn"&&(x.roughness=0,x.fillStyle="solid");const y=Math.max(t.width??0,h.width);let b=Math.max(t.height??0,h.height);const S=(t.height??0)>h.height;l.members.length===0&&l.methods.length===0?b+=a:l.members.length>0&&l.methods.length===0&&(b+=a*2);const w=-y/2,L=-b/2;let A=p?o*2:l.members.length===0&&l.methods.length===0?-o:0;S&&(A=o*2);const v=C.rectangle(w-o,L-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0),y+2*o,b+2*o+A,x),E=c.insert(()=>v,":first-child");E.attr("class","basic label-container outer-path");const D=E.node().getBBox(),q=c.select(".annotation-group").node().getBBox().height-(p?o/2:0)||0,U=c.select(".label-group").node().getBBox().height-(p?o/2:0)||0,st=c.select(".members-group").node().getBBox().height-(p?o/2:0)||0,N=(q+U+L+o-(L-o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0)))/2;if(c.selectAll(".text").each((F,Q,$)=>{var nt,Ct;const Y=Dt($[Q]),at=Y.attr("transform");let wt=0;if(at){const _t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(at);_t&&(wt=parseFloat(_t[2]))}let bt=wt+L+o-(p?o:l.members.length===0&&l.methods.length===0?-o/2:0);if(Y.attr("class").includes("methods-group")){const Et=Math.max(st,a/2);S?bt=Math.max(N,q+U+Et+L+a*2+o)+a*2:bt=q+U+Et+L+a*4+o}l.members.length===0&&l.methods.length===0&&((nt=r.class)!=null&&nt.hideEmptyMembersBox)&&(l.annotations.length>0?bt=wt-a:bt=wt),n||(bt-=4);let Lt=w;(Y.attr("class").includes("label-group")||Y.attr("class").includes("annotation-group"))&&(Lt=-((Ct=Y.node())==null?void 0:Ct.getBBox().width)/2||0,c.selectAll("text").each(function(Et,_t,zt){window.getComputedStyle(zt[_t]).textAnchor==="middle"&&(Lt=0)})),Y.attr("transform",`translate(${Lt}, ${bt})`)}),l.members.length>0||l.methods.length>0||p){const F=q+U+L+o,Q=C.line(D.x,F,D.x+D.width,F+.001,x);c.insert(()=>Q).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",g)}if(p||l.members.length>0||l.methods.length>0){const F=q+U+st+L+a*2+o,Q=C.line(D.x,S?Math.max(N,F):F,D.x+D.width,(S?Math.max(N,F):F)+.001,x);c.insert(()=>Q).attr("class",`divider${t.look==="neo"&&!s?" neo-line":""}`).attr("style",g)}if(l.look!=="handDrawn"&&c.selectAll("path").attr("style",g),E.select(":nth-child(2)").attr("style",g),c.selectAll(".divider").select("path").attr("style",g),t.labelStyle?c.selectAll("span").attr("style",t.labelStyle):c.selectAll("span").attr("style",g),!n){const F=RegExp(/color\s*:\s*([^;]*)/),Q=F.exec(g);if(Q){const $=Q[0].replace("color","fill");c.selectAll("tspan").attr("style",$)}else if(d){const $=F.exec(d);if($){const Y=$[0].replace("color","fill");c.selectAll("tspan").attr("style",Y)}}}return ft(t,E),t.intersect=function(F){return lt.rect(t,F)},c}f(Hg,"classBox");async function Yg(e,t){var U,st;const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const s=t,o=t,a=20,n=20,l="verifyMethod"in t,c=Tt(t),h=Nt(),{themeVariables:d}=h,{borderColorArray:u,requirementEdgeLabelBackground:g}=d,p=h.layout==="elk"?"start":"center",C=e.insert("g").attr("class",c).attr("id",t.domId??t.id);let x;l?x=await er(C,`<<${s.type}>>`,0,t.labelStyle):x=await er(C,"<<Element>>",0,t.labelStyle);let y=x;const b=await er(C,s.name,y,t.labelStyle+"; font-weight: bold;");if(y+=b+n,l){const N=await er(C,`${s.requirementId?`ID: ${s.requirementId}`:""}`,y,t.labelStyle,p);y+=N;const H=await er(C,`${s.text?`Text: ${s.text}`:""}`,y,t.labelStyle,p);y+=H;const G=await er(C,`${s.risk?`Risk: ${s.risk}`:""}`,y,t.labelStyle,p);y+=G,await er(C,`${s.verifyMethod?`Verification: ${s.verifyMethod}`:""}`,y,t.labelStyle,p)}else{const N=await er(C,`${o.type?`Type: ${o.type}`:""}`,y,t.labelStyle,p);y+=N,await er(C,`${o.docRef?`Doc Ref: ${o.docRef}`:""}`,y,t.labelStyle,p)}const S=(((U=C.node())==null?void 0:U.getBBox().width)??200)+a,w=(((st=C.node())==null?void 0:st.getBBox().height)??200)+a,L=-S/2,A=-w/2,v=gt.svg(C),E=dt(t,{});t.look!=="handDrawn"&&(E.roughness=0,E.fillStyle="solid");const D=v.rectangle(L,A,S,w,E),q=C.insert(()=>D,":first-child");if(q.attr("class","basic label-container outer-path").attr("style",i),u!=null&&u.length){const N=t.colorIndex??0;C.attr("data-color-id",`color-${N%u.length}`)}if(C.selectAll(".label").each((N,H,G)=>{const F=Dt(G[H]),Q=F.attr("transform");let $=0,Y=0;if(Q){const Lt=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(Q);Lt&&($=parseFloat(Lt[1]),Y=parseFloat(Lt[2]))}const at=Y-w/2;let wt=L+a/2;(H===0||H===1)&&(wt=$),F.attr("transform",`translate(${wt}, ${at+a})`)}),y>x+b+n){const N=A+x+b+n;let H;if(t.look==="neo"){const Q=[[L,N],[L+S,N],[L+S,N+.001],[L,N+.001]];H=v.polygon(Q,E)}else H=v.line(L,N,L+S,N,E);C.insert(()=>H).attr("class","divider")}return ft(t,q),t.intersect=function(N){return lt.rect(t,N)},i&&t.look!=="handDrawn"&&(g||u!=null&&u.length)&&C.selectAll("path").attr("style",i),C}f(Yg,"requirementBox");async function er(e,t,r,i="",s="center"){if(t==="")return 0;const o=e.insert("g").attr("class","label").attr("style",i),a=Nt(),n=a.htmlLabels??!0,l=await Ve(o,un(Tr(t)),{width:pr(t,a)+50,classes:"markdown-node-label",useHtmlLabels:n,style:i},a);let c;if(n){const h=l.children[0],d=Dt(l);s==="start"&&Dt(h).style("text-align","left"),c=h.getBoundingClientRect(),d.attr("width",c.width),d.attr("height",c.height)}else{const h=l.children[0];for(const d of h.children)i&&d.setAttribute("style",i);if(s==="start"){h.setAttribute("text-anchor","start");for(const d of h.children)d.setAttribute("text-anchor","start")}c=l.getBBox(),c.height+=6}return o.attr("transform",`translate(${-c.width/2},${-c.height/2+r})`),c.height}f(er,"addText");var hk=f(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 jg(e,t,{config:r}){var st,N;const{labelStyles:i,nodeStyles:s}=mt(t);t.labelStyle=i||"";const o=10,a=t.width;t.width=(t.width??200)-10;const{shapeSvg:n,bbox:l,label:c}=await St(e,t,Tt(t)),h=t.padding||10;let d="",u;"ticket"in t&&t.ticket&&((st=r==null?void 0:r.kanban)!=null&&st.ticketBaseUrl)&&(d=(N=r==null?void 0:r.kanban)==null?void 0:N.ticketBaseUrl.replace("#TICKET#",t.ticket),u=n.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",d).attr("target","_blank"));const g={useHtmlLabels:t.useHtmlLabels,labelStyle:t.labelStyle||"",width:t.width,img:t.img,padding:t.padding||8,centerLabel:!1};let p,C;u?{label:p,bbox:C}=await Uo(u,"ticket"in t&&t.ticket||"",g):{label:p,bbox:C}=await Uo(n,"ticket"in t&&t.ticket||"",g);const{label:x,bbox:y}=await Uo(n,"assigned"in t&&t.assigned||"",g);t.width=a;const b=10,S=(t==null?void 0:t.width)||0,w=Math.max(C.height,y.height)/2,L=Math.max(l.height+b*2,(t==null?void 0:t.height)||0)+w,A=-S/2,v=-L/2;c.attr("transform","translate("+(h-S/2)+", "+(-w-l.height/2)+")"),p.attr("transform","translate("+(h-S/2)+", "+(-w+l.height/2)+")"),x.attr("transform","translate("+(h+S/2-y.width-2*o)+", "+(-w+l.height/2)+")");let E;const{rx:D,ry:q}=t,{cssStyles:U}=t;if(t.look==="handDrawn"){const H=gt.svg(n),G=dt(t,{}),F=D||q?H.path(ze(A,v,S,L,D||0),G):H.rectangle(A,v,S,L,G);E=n.insert(()=>F,":first-child"),E.attr("class","basic label-container").attr("style",U||null)}else{E=n.insert("rect",":first-child"),E.attr("class","basic label-container __APA__").attr("style",s).attr("rx",D??5).attr("ry",q??5).attr("x",A).attr("y",v).attr("width",S).attr("height",L);const H="priority"in t&&t.priority;if(H){const G=n.append("line"),F=A+2,Q=v+Math.floor((D??0)/2),$=v+L-Math.floor((D??0)/2);G.attr("x1",F).attr("y1",Q).attr("x2",F).attr("y2",$).attr("stroke-width","4").attr("stroke",hk(H))}}return ft(t,E),t.height=L,t.intersect=function(H){return lt.rect(t,H)},n}f(jg,"kanbanItem");async function Ug(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await St(e,t,Tt(t)),l=o.width+10*a,c=o.height+8*a,h=.15*l,{cssStyles:d}=t,u=o.width+20,g=o.height+20,p=Math.max(l,u),C=Math.max(c,g);n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`);let x;const y=`M0 0
|
|
213
|
+
a${h},${h} 1 0,0 ${p*.25},${-1*C*.1}
|
|
214
|
+
a${h},${h} 1 0,0 ${p*.25},0
|
|
215
|
+
a${h},${h} 1 0,0 ${p*.25},0
|
|
216
|
+
a${h},${h} 1 0,0 ${p*.25},${C*.1}
|
|
217
|
+
|
|
218
|
+
a${h},${h} 1 0,0 ${p*.15},${C*.33}
|
|
219
|
+
a${h*.8},${h*.8} 1 0,0 0,${C*.34}
|
|
220
|
+
a${h},${h} 1 0,0 ${-1*p*.15},${C*.33}
|
|
221
|
+
|
|
222
|
+
a${h},${h} 1 0,0 ${-1*p*.25},${C*.15}
|
|
223
|
+
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
224
|
+
a${h},${h} 1 0,0 ${-1*p*.25},0
|
|
225
|
+
a${h},${h} 1 0,0 ${-1*p*.25},${-1*C*.15}
|
|
226
|
+
|
|
227
|
+
a${h},${h} 1 0,0 ${-1*p*.1},${-1*C*.33}
|
|
228
|
+
a${h*.8},${h*.8} 1 0,0 0,${-1*C*.34}
|
|
229
|
+
a${h},${h} 1 0,0 ${p*.1},${-1*C*.33}
|
|
230
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const b=gt.svg(s),S=dt(t,{}),w=b.path(y,S);x=s.insert(()=>w,":first-child"),x.attr("class","basic label-container").attr("style",oe(d))}else x=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",y);return x.attr("transform",`translate(${-p/2}, ${-C/2})`),ft(t,x),t.calcIntersect=function(b,S){return lt.rect(b,S)},t.intersect=function(b){return R.info("Bang intersect",t,b),lt.rect(t,b)},s}f(Ug,"bang");async function Xg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await St(e,t,Tt(t)),l=o.width+2*a,c=o.height+2*a,h=.15*l,d=.25*l,u=.35*l,g=.2*l,{cssStyles:p}=t;let C;const x=`M0 0
|
|
231
|
+
a${h},${h} 0 0,1 ${l*.25},${-1*l*.1}
|
|
232
|
+
a${u},${u} 1 0,1 ${l*.4},${-1*l*.1}
|
|
233
|
+
a${d},${d} 1 0,1 ${l*.35},${l*.2}
|
|
234
|
+
|
|
235
|
+
a${h},${h} 1 0,1 ${l*.15},${c*.35}
|
|
236
|
+
a${g},${g} 1 0,1 ${-1*l*.15},${c*.65}
|
|
237
|
+
|
|
238
|
+
a${d},${h} 1 0,1 ${-1*l*.25},${l*.15}
|
|
239
|
+
a${u},${u} 1 0,1 ${-1*l*.5},0
|
|
240
|
+
a${h},${h} 1 0,1 ${-1*l*.25},${-1*l*.15}
|
|
241
|
+
|
|
242
|
+
a${h},${h} 1 0,1 ${-1*l*.1},${-1*c*.35}
|
|
243
|
+
a${g},${g} 1 0,1 ${l*.1},${-1*c*.65}
|
|
244
|
+
H0 V0 Z`;if(t.look==="handDrawn"){const y=gt.svg(s),b=dt(t,{}),S=y.path(x,b);C=s.insert(()=>S,":first-child"),C.attr("class","basic label-container").attr("style",oe(p))}else C=s.insert("path",":first-child").attr("class","basic label-container").attr("style",i).attr("d",x);return n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),C.attr("transform",`translate(${-l/2}, ${-c/2})`),ft(t,C),t.calcIntersect=function(y,b){return lt.rect(y,b)},t.intersect=function(y){return R.info("Cloud intersect",t,y),lt.rect(t,y)},s}f(Xg,"cloud");async function Gg(e,t){const{labelStyles:r,nodeStyles:i}=mt(t);t.labelStyle=r;const{shapeSvg:s,bbox:o,halfPadding:a,label:n}=await St(e,t,Tt(t)),l=o.width+8*a,c=o.height+2*a,h=5,d=t.look==="neo"?`
|
|
245
|
+
M${-l/2} ${c/2-h}
|
|
246
|
+
v${-c+2*h}
|
|
247
|
+
q0,-${h} ${h},-${h}
|
|
248
|
+
h${l-2*h}
|
|
249
|
+
q${h},0 ${h},${h}
|
|
250
|
+
v${c-h}
|
|
251
|
+
H${-l/2}
|
|
252
|
+
Z
|
|
253
|
+
`:`
|
|
254
|
+
M${-l/2} ${c/2-h}
|
|
255
|
+
v${-c+2*h}
|
|
256
|
+
q0,-${h} ${h},-${h}
|
|
257
|
+
h${l-2*h}
|
|
258
|
+
q${h},0 ${h},${h}
|
|
259
|
+
v${c-2*h}
|
|
260
|
+
q0,${h} ${-h},${h}
|
|
261
|
+
h${-(l-2*h)}
|
|
262
|
+
q${-h},0 ${-h},${-h}
|
|
263
|
+
Z
|
|
264
|
+
`;if(!t.domId)throw new Error(`defaultMindmapNode: node "${t.id}" is missing a domId — was render.ts domId prefixing skipped?`);const u=s.append("path").attr("id",t.domId).attr("class","node-bkg node-"+t.type).attr("style",i).attr("d",d);return s.append("line").attr("class","node-line-").attr("x1",-l/2).attr("y1",c/2).attr("x2",l/2).attr("y2",c/2),n.attr("transform",`translate(${-o.width/2}, ${-o.height/2})`),s.append(()=>n.node()),ft(t,u),t.calcIntersect=function(g,p){return lt.rect(g,p)},t.intersect=function(g){return lt.rect(t,g)},s}f(Gg,"defaultMindmapNode");async function Vg(e,t){const r={padding:t.padding??0};return $n(e,t,r)}f(Vg,"mindmapCircle");var ck=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:Lg},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Tg},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:vg},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:Fg},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:Gu},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:Vu},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:tg},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:Ou},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:Nu},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Ru},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:Xu},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:$n},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ug},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:Xg},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:bg},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:ig},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:gg},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:ug},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:Rg},{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:cg},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Zu},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:Ig},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:Pu},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:wg},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:_g},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:Eg},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:eg},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:sg},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:Hu},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:Yu},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ju},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:pg},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:qg},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:rg},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:Dg},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:fg},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:Uu},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:Ku},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:$g},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:Wg},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:Qu},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:Pg},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:Ju},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Bg},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Cg},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:yg},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:Mu},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:zu},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:Og},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:Mg},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:Ng},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:kg},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:mg}],dk=f(()=>{const t=[...Object.entries({state:Ag,choice:$u,note:xg,composite:qu,rectWithTitle:Sg,labelRect:dg,block_arrow:Du,collapsedGroup:Iu,iconSquare:lg,iconCircle:ag,icon:og,iconRounded:ng,imageSquare:hg,anchor:_u,kanbanItem:jg,mindmapCircle:Vg,defaultMindmapNode:Gg,classBox:Hg,erBox:qn,requirementBox:Yg}),...ck.flatMap(r=>[r.shortName,..."aliases"in r?r.aliases:[],..."internalAliases"in r?r.internalAliases:[]].map(s=>[s,r.handler]))];return Object.fromEntries(t)},"generateShapeMap"),Kg=dk();function uk(e){return e in Kg}f(uk,"isValidShape");var fo=f(({flowchart:e})=>{var s,o;const t=((s=e==null?void 0:e.subGraphTitleMargin)==null?void 0:s.top)??0,r=((o=e==null?void 0:e.subGraphTitleMargin)==null?void 0:o.bottom)??0,i=t+r;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:i}},"getSubGraphTitleMargins"),mo=new Map;async function Nn(e,t,r){let i,s;t.shape==="rect"&&(t.rx&&t.ry?t.shape="roundedRect":t.shape="squareRect");const o=t.shape?Kg[t.shape]:void 0;if(!o)throw new Error(`No such shape: ${t.shape}. Please check your syntax.`);if(t.link){let a;r.config.securityLevel==="sandbox"?a="_top":t.linkTarget&&(a=t.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",t.link).attr("target",a??null),s=await o(i,t,r)}else s=await o(e,t,r),i=s;return i.attr("data-look",oe(t.look)),t.tooltip&&s.attr("title",t.tooltip),mo.set(t.id,i),t.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}f(Nn,"insertNode");var aB=f((e,t)=>{mo.set(t.id,e)},"setNodeElem"),gk=f(()=>{mo.clear()},"clear"),Wh=f(e=>{const t=mo.get(e.id);R.trace("Transforming node",e.diff,e,"translate("+(e.x-e.width/2-5)+", "+e.width/2+")");const r=8,i=e.diff||0;return e.clusterNode?t.attr("transform","translate("+(e.x+i-e.width/2)+", "+(e.y-e.height/2-r)+")"):t.attr("transform","translate("+e.x+", "+e.y+")"),i},"positionNode"),pk=f(async(e,t)=>{const r=Nt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,n=a,{labelStyles:l,nodeStyles:c,borderStyles:h,backgroundStyles:d}=mt(t),u=e.insert("g").attr("class","cluster swimlane "+(t.cssClasses||"")).attr("id",t.id).attr("data-id",t.id).attr("data-et","cluster").attr("data-look",t.look),g=ar(r.flowchart.htmlLabels),p=t.direction==="LR",C=u.insert("g").attr("class","cluster-label swimlane-label"),x=await Ve(C,t.label,{style:t.labelStyle,useHtmlLabels:g,isNode:!0,width:t.width});let y=x.getBBox();if(g){const N=x.children[0],H=Dt(x);y=N.getBoundingClientRect(),H.attr("width",y.width),H.attr("height",y.height)}const b=t.padding??0,S=t.width<=y.width+b?y.width+b:t.width;t.width<=y.width+b?t.diff=(S-t.width)/2-b:t.diff=-b;const w=t.height,L=t.y-w/2,A=t.y+w/2,v=t.x-S/2,E=t.swimlaneContentTop!==void 0?t.swimlaneContentTop:L+w/3,D=p?4:0,q=y.height+2*D;let U,st;if(p){const N=Math.max(q,y.height+2*D),H=v+N,G=Math.max(0,S-N);if(t.look==="handDrawn"){const $=gt.svg(u),Y=dt(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),at=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),wt=$.rectangle(v,L,N,w,Y);U=u.insert(()=>wt,":first-child");const bt=$.rectangle(H,L,G,w,at);st=u.insert(()=>bt,":first-child"),U.select("path:nth-child(2)").attr("style",h.join(";")),U.select("path").attr("style",d.join(";").replace("fill","stroke"))}else U=u.insert("rect",":first-child"),st=u.insert("rect",":first-child"),U.attr("class","swimlane-title").attr("style",c).attr("x",v).attr("y",L).attr("width",N).attr("height",w).attr("fill",o).attr("stroke",n),st.attr("class","swimlane-body").attr("style",c).attr("x",H).attr("y",L).attr("width",G).attr("height",w).attr("fill","none").attr("stroke",n);const F=v+N/2,Q=t.y;C.attr("transform",`translate(${F}, ${Q}) rotate(-90) translate(${-y.width/2}, ${-y.height/2})`)}else{const N=Math.max(0,E-L),H=Math.min(q,N),G=L+H,F=Math.max(0,A-G),Q=t.x-S/2;if(t.look==="handDrawn"){const at=gt.svg(u),wt=dt(t,{roughness:.7,fill:o,stroke:n,fillWeight:3,seed:s}),bt=dt(t,{roughness:.7,fill:"none",stroke:n,seed:s}),Lt=at.rectangle(Q,L,S,H,wt);U=u.insert(()=>Lt,":first-child");const nt=at.rectangle(Q,G,S,F,bt);st=u.insert(()=>nt,":first-child"),U.select("path:nth-child(2)").attr("style",h.join(";")),U.select("path").attr("style",d.join(";").replace("fill","stroke"))}else U=u.insert("rect",":first-child"),st=u.insert("rect",":first-child"),U.attr("class","swimlane-title").attr("style",c).attr("x",Q).attr("y",L).attr("width",S).attr("height",H).attr("fill",o).attr("stroke",n),st.attr("class","swimlane-body").attr("style",c).attr("x",Q).attr("y",G).attr("width",S).attr("height",F).attr("fill","none").attr("stroke",n);const $=t.x-y.width/2,Y=L+(H-y.height)/2;C.attr("transform",`translate(${$}, ${Y})`)}if(R.trace("Swimlane data ",t,JSON.stringify(t)),l){const N=C.select("span");N&&N.attr("style",l)}return t.offsetX=0,t.width=S,t.height=w,t.offsetY=y.height-b/2,t.intersect=function(N){return Xr(t,N)},{cluster:u,labelBBox:y}},"swimlane"),Zg=f(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=Nt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=mt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=ye(r),g=d.insert("g").attr("class","cluster-label ");let p;t.labelType==="markdown"?p=await Ve(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width}):p=await Sr(g,t.label,t.labelStyle||"",!1,!0);let C=p.getBBox();if(ye(r)){const v=p.children[0],E=Dt(p);C=v.getBoundingClientRect(),E.attr("width",C.width),E.attr("height",C.height)}const x=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-x/2,S=t.y-y/2;R.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=gt.svg(d),E=dt(t,{roughness:.7,fill:o,stroke:a,fillWeight:3,seed:s}),D=v.path(ze(b,S,x,y,0),E);w=d.insert(()=>(R.debug("Rough node insert CXC",D),D),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:L}=fo(r);if(g.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+L})`),n){const v=g.select("span");v&&v.attr("style",n)}const A=w.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=C.height-t.padding/2,t.intersect=function(v){return Xr(t,v)},{cluster:d,labelBBox:C}},"rect"),fk=f((e,t)=>{const r=e.insert("g").attr("class","note-cluster").attr("id",t.domId),i=r.insert("rect",":first-child"),s=0*t.padding,o=s/2;i.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-o).attr("y",t.y-t.height/2-o).attr("width",t.width+s).attr("height",t.height+s).attr("fill","none");const a=i.node().getBBox();return t.width=a.width,t.height=a.height,t.intersect=function(n){return Xr(t,n)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),mk=f(async(e,t)=>{const r=Nt(),{themeVariables:i,handDrawnSeed:s}=r,{altBackground:o,compositeBackground:a,compositeTitleBackground:n,nodeBorder:l}=i,c=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-id",t.id).attr("data-look",t.look),h=c.insert("g",":first-child"),d=c.insert("g").attr("class","cluster-label");let u=c.append("rect");const g=await Sr(d,t.label,t.labelStyle,void 0,!0);let p=g.getBBox();if(ye(r)){const D=g.children[0],q=Dt(g);p=D.getBoundingClientRect(),q.attr("width",p.width),q.attr("height",p.height)}const C=0*t.padding,x=C/2,y=(t.width<=p.width+t.padding?p.width+t.padding:t.width)+C;t.width<=p.width+t.padding?t.diff=(y-t.width)/2-t.padding:t.diff=-t.padding;const b=t.height+C,S=t.height+C-p.height-6,w=t.x-y/2,L=t.y-b/2;t.width=y;const A=t.y-t.height/2-x+p.height+2;let v;if(t.look==="handDrawn"){const D=t.cssClasses.includes("statediagram-cluster-alt"),q=gt.svg(c),U=t.rx||t.ry?q.path(ze(w,L,y,b,10),{roughness:.7,fill:n,fillStyle:"solid",stroke:l,seed:s}):q.rectangle(w,L,y,b,{seed:s});v=c.insert(()=>U,":first-child");const st=q.rectangle(w,A,y,S,{fill:D?o:a,fillStyle:D?"hachure":"solid",stroke:l,seed:s});v=c.insert(()=>U,":first-child"),u=c.insert(()=>st)}else v=h.insert("rect",":first-child"),v.attr("class","outer").attr("x",w).attr("y",L).attr("width",y).attr("height",b).attr("data-look",t.look),u.attr("class","inner").attr("x",w).attr("y",A).attr("width",y).attr("height",S);d.attr("transform",`translate(${t.x-p.width/2}, ${L+1-(ye(r)?0:3)})`);const E=v.node().getBBox();return t.height=E.height,t.offsetX=0,t.offsetY=p.height-t.padding/2,t.labelBBox=p,t.intersect=function(D){return Xr(t,D)},{cluster:c,labelBBox:p}},"roundedWithTitle"),yk=f(async(e,t)=>{R.info("Creating subgraph rect for ",t.id,t);const r=Nt(),{themeVariables:i,handDrawnSeed:s}=r,{clusterBkg:o,clusterBorder:a}=i,{labelStyles:n,nodeStyles:l,borderStyles:c,backgroundStyles:h}=mt(t),d=e.insert("g").attr("class","cluster "+t.cssClasses).attr("id",t.domId).attr("data-look",t.look),u=ye(r),g=d.insert("g").attr("class","cluster-label "),p=await Ve(g,t.label,{style:t.labelStyle,useHtmlLabels:u,isNode:!0,width:t.width});let C=p.getBBox();if(ye(r)){const v=p.children[0],E=Dt(p);C=v.getBoundingClientRect(),E.attr("width",C.width),E.attr("height",C.height)}const x=t.width<=C.width+t.padding?C.width+t.padding:t.width;t.width<=C.width+t.padding?t.diff=(x-t.width)/2-t.padding:t.diff=-t.padding;const y=t.height,b=t.x-x/2,S=t.y-y/2;R.trace("Data ",t,JSON.stringify(t));let w;if(t.look==="handDrawn"){const v=gt.svg(d),E=dt(t,{roughness:.7,fill:o,stroke:a,fillWeight:4,seed:s}),D=v.path(ze(b,S,x,y,t.rx),E);w=d.insert(()=>(R.debug("Rough node insert CXC",D),D),":first-child"),w.select("path:nth-child(2)").attr("style",c.join(";")),w.select("path").attr("style",h.join(";").replace("fill","stroke"))}else w=d.insert("rect",":first-child"),w.attr("style",l).attr("rx",t.rx).attr("ry",t.ry).attr("x",b).attr("y",S).attr("width",x).attr("height",y);const{subGraphTitleTopMargin:L}=fo(r);if(g.attr("transform",`translate(${t.x-C.width/2}, ${t.y-t.height/2+L})`),n){const v=g.select("span");v&&v.attr("style",n)}const A=w.node().getBBox();return t.offsetX=0,t.width=A.width,t.height=A.height,t.offsetY=C.height-t.padding/2,t.intersect=function(v){return Xr(t,v)},{cluster:d,labelBBox:C}},"kanbanSection"),Ck=f((e,t)=>{const r=Nt(),{themeVariables:i,handDrawnSeed:s}=r,{nodeBorder:o}=i,a=e.insert("g").attr("class",t.cssClasses).attr("id",t.domId).attr("data-look",t.look),n=a.insert("g",":first-child"),l=0*t.padding,c=t.width+l;t.diff=-t.padding;const h=t.height+l,d=t.x-c/2,u=t.y-h/2;t.width=c;let g;if(t.look==="handDrawn"){const x=gt.svg(a).rectangle(d,u,c,h,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:o,seed:s});g=a.insert(()=>x,":first-child")}else{g=n.insert("rect",":first-child");let C="outer";t.look,C="divider",g.attr("class",C).attr("x",d).attr("y",u).attr("width",c).attr("height",h).attr("data-look",t.look)}const p=g.node().getBBox();return t.height=p.height,t.offsetX=0,t.offsetY=0,t.intersect=function(C){return Xr(t,C)},{cluster:a,labelBBox:{}}},"divider"),xk=Zg,bk={rect:Zg,squareRect:xk,roundedWithTitle:mk,noteGroup:fk,divider:Ck,kanbanSection:yk,swimlane:pk},Qg=new Map,Jg=f(async(e,t)=>{const r=t.shape||"rect",i=await bk[r](e,t);return Qg.set(t.id,i),i},"insertCluster"),kk=f(()=>{Qg=new Map},"clear"),zi=f((e,t)=>{if(t)return"translate("+-e.width/2+", "+-e.height/2+")";const r=e.x??0,i=e.y??0;return"translate("+-(r+e.width/2)+", "+-(i+e.height/2)+")"},"computeLabelTransform"),fe={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},zh={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function Gi(e,t){if(e===void 0||t===void 0)return{angle:0,deltaX:0,deltaY:0};e=Qt(e),t=Qt(t);const[r,i]=[e.x,e.y],[s,o]=[t.x,t.y],a=s-r,n=o-i;return{angle:Math.atan(n/a),deltaX:a,deltaY:n}}f(Gi,"calculateDeltaAndAngle");var Qt=f(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),Sk=f(e=>({x:f(function(t,r,i){let s=0;const o=Qt(i[0]).x<Qt(i[i.length-1]).x?"left":"right";if(r===0&&Object.hasOwn(fe,e.arrowTypeStart)){const{angle:g,deltaX:p}=Gi(i[0],i[1]);s=fe[e.arrowTypeStart]*Math.cos(g)*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(fe,e.arrowTypeEnd)){const{angle:g,deltaX:p}=Gi(i[i.length-1],i[i.length-2]);s=fe[e.arrowTypeEnd]*Math.cos(g)*(p>=0?1:-1)}const a=Math.abs(Qt(t).x-Qt(i[i.length-1]).x),n=Math.abs(Qt(t).y-Qt(i[i.length-1]).y),l=Math.abs(Qt(t).x-Qt(i[0]).x),c=Math.abs(Qt(t).y-Qt(i[0]).y),h=fe[e.arrowTypeStart],d=fe[e.arrowTypeEnd],u=1;if(a<d&&a>0&&n<d){let g=d+u-a;g*=o==="right"?-1:1,s-=g}if(l<h&&l>0&&c<h){let g=h+u-l;g*=o==="right"?-1:1,s+=g}return Qt(t).x+s},"x"),y:f(function(t,r,i){let s=0;const o=Qt(i[0]).y<Qt(i[i.length-1]).y?"down":"up";if(r===0&&Object.hasOwn(fe,e.arrowTypeStart)){const{angle:g,deltaY:p}=Gi(i[0],i[1]);s=fe[e.arrowTypeStart]*Math.abs(Math.sin(g))*(p>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(fe,e.arrowTypeEnd)){const{angle:g,deltaY:p}=Gi(i[i.length-1],i[i.length-2]);s=fe[e.arrowTypeEnd]*Math.abs(Math.sin(g))*(p>=0?1:-1)}const a=Math.abs(Qt(t).y-Qt(i[i.length-1]).y),n=Math.abs(Qt(t).x-Qt(i[i.length-1]).x),l=Math.abs(Qt(t).y-Qt(i[0]).y),c=Math.abs(Qt(t).x-Qt(i[0]).x),h=fe[e.arrowTypeStart],d=fe[e.arrowTypeEnd],u=1;if(a<d&&a>0&&n<d){let g=d+u-a;g*=o==="up"?-1:1,s-=g}if(l<h&&l>0&&c<h){let g=h+u-l;g*=o==="up"?-1:1,s+=g}return Qt(t).y+s},"y")}),"getLineFunctionsWithOffset"),Tk=f((e,t,r,i,s,o=!1,a)=>{t.arrowTypeStart&&Hh(e,"start",t.arrowTypeStart,r,i,s,o,a),t.arrowTypeEnd&&Hh(e,"end",t.arrowTypeEnd,r,i,s,o,a)},"addEdgeMarkers"),wk={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}},Bk=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],Hh=f((e,t,r,i,s,o,a=!1,n)=>{var p;if(!r||r==="none")return;const l=wk[r],c=l&&Bk.includes(l.type);if(!l){R.warn(`Unknown arrow type: ${r}`);return}const h=l.type,g=`${s}_${o}-${h}${t==="start"?"Start":"End"}${a&&c?"-margin":""}`;if(n&&n.trim()!==""){const C=n.replace(/[^\dA-Za-z]/g,"_"),x=`${g}_${C}`;if(!document.getElementById(x)){const y=document.getElementById(g);if(y){const b=y.cloneNode(!0);b.id=x,b.querySelectorAll("path, circle, line").forEach(w=>{w.setAttribute("stroke",n),l.fill&&w.setAttribute("fill",n)}),(p=y.parentNode)==null||p.appendChild(b)}}e.attr(`marker-${t}`,`url(${i}#${x})`)}else e.attr(`marker-${t}`,`url(${i}#${g})`)},"addEdgeMarker"),Lk=f(e=>{var t,r;return typeof e=="string"?e:(r=(t=Nt())==null?void 0:t.flowchart)==null?void 0:r.curve},"resolveEdgeCurveType"),Li=new Map,se=new Map,vk=f(()=>{Li.clear(),se.clear()},"clear"),tp=f(e=>!!(e.label||e.startLabelLeft||e.startLabelRight||e.endLabelLeft||e.endLabelRight),"hasEdgeLabel"),Hi=f(e=>e?typeof e=="string"?e:e.reduce((t,r)=>t+";"+r,""):"","getLabelStyles"),Wn=f(async(e,t)=>{const r=Nt();let i=ye(r);const{labelStyles:s}=mt(t);t.labelStyle=s;const o=e.insert("g").attr("class","edgeLabel"),a=o.insert("g").attr("class","label").attr("data-id",t.id),n=t.labelType==="markdown",c=await Ve(e,t.label,{style:Hi(t.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:n,width:n?void 0:void 0},r);a.node().appendChild(c),R.info("abc82",t,t.labelType);let h,d;if(i){const g=c.children[0],p=Dt(c);h=await Hr.measure(()=>g.getBoundingClientRect()),d=h,p.attr("width",h.width),p.attr("height",h.height)}else{const g=Dt(c).select("text").node();await Hr.measure(()=>{h=c.getBBox(),g&&typeof g.getBBox=="function"?d=g.getBBox():d=h})}a.attr("transform",zi(d,i)),Li.set(t.id,o),t.width=h.width,t.height=h.height;let u;if(t.startLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),C=await Sr(p,t.startLabelLeft,Hi(t.labelStyle)||"",!1,!1);u=C;let x=C.getBBox();if(i){const y=C.children[0],b=Dt(C);x=y.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",zi(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startLeft=g,Vi(u,t.startLabelLeft)}if(t.startLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),C=await Sr(p,t.startLabelRight,Hi(t.labelStyle)||"",!1,!1);u=C;let x=C.getBBox();if(i){const y=C.children[0],b=Dt(C);x=y.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",zi(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).startRight=g,Vi(u,t.startLabelRight)}if(t.endLabelLeft){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),C=await Sr(g,t.endLabelLeft,Hi(t.labelStyle)||"",!1,!1);u=C;let x=C.getBBox();if(i){const y=C.children[0],b=Dt(C);x=y.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",zi(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endLeft=g,Vi(u,t.endLabelLeft)}if(t.endLabelRight){const g=e.insert("g").attr("class","edgeTerminals"),p=g.insert("g").attr("class","inner"),C=await Sr(g,t.endLabelRight,Hi(t.labelStyle)||"",!1,!1);u=C;let x=C.getBBox();if(i){const y=C.children[0],b=Dt(C);x=y.getBoundingClientRect(),b.attr("width",x.width),b.attr("height",x.height)}p.attr("transform",zi(x,i)),se.get(t.id)||se.set(t.id,{}),se.get(t.id).endRight=g,Vi(u,t.endLabelRight)}return c},"insertEdgeLabel");function Vi(e,t){ye(Nt())&&e&&(e.style.width=t.length*9+"px",e.style.height="12px")}f(Vi,"setTerminalWidth");var Ak=f((e,t)=>{R.debug("Moving label abc88 ",e.id,e.label,Li.get(e.id),t);let r=t.updatedPath?t.updatedPath:t.originalPath;const i=Nt(),{subGraphTitleTotalMargin:s}=fo(i);if(e.label){const o=Li.get(e.id);let a=e.x,n=e.y;if(r){const l=me.calcLabelPosition(r);R.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e.startLabelLeft){const o=se.get(e.id).startLeft;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=se.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=se.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=se.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}},"positionEdgeLabel"),Ek=f((e,t)=>{var a;if(!(e!=null&&e.isLabelEdge)||!((a=e==null?void 0:e.id)!=null&&a.endsWith("-to-label"))||!Array.isArray(t)||t.length!==2)return t;const[r,i]=t,s=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return s<.001||o<.001?t:o>=s?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),_k=f((e,t)=>{const r=e.x,i=e.y,s=Math.abs(t.x-r),o=Math.abs(t.y-i),a=e.width/2,n=e.height/2;return s>=a||o>=n},"outsideNode"),Fk=f((e,t,r)=>{R.debug(`intersection calc abc89:
|
|
265
|
+
outsidePoint: ${JSON.stringify(t)}
|
|
266
|
+
insidePoint : ${JSON.stringify(r)}
|
|
267
|
+
node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);const i=e.x,s=e.y,o=Math.abs(i-r.x),a=e.width/2;let n=r.x<t.x?a-o:a+o;const l=e.height/2,c=Math.abs(t.y-r.y),h=Math.abs(t.x-r.x);if(Math.abs(s-t.y)*a>Math.abs(i-t.x)*l){let d=r.y<t.y?t.y-l-s:s-l-t.y;n=h*d/c;const u={x:r.x<t.x?r.x+n:r.x-h+n,y:r.y<t.y?r.y+c-d:r.y-c+d};return n===0&&(u.x=t.x,u.y=t.y),h===0&&(u.x=t.x),c===0&&(u.y=t.y),R.debug(`abc89 top/bottom calc, Q ${c}, q ${d}, R ${h}, r ${n}`,u),u}else{r.x<t.x?n=t.x-a-i:n=i-a-t.x;let d=c*n/h,u=r.x<t.x?r.x+h-n:r.x-h+n,g=r.y<t.y?r.y+d:r.y-d;return R.debug(`sides calc abc89, Q ${c}, q ${d}, R ${h}, r ${n}`,{_x:u,_y:g}),n===0&&(u=t.x,g=t.y),h===0&&(u=t.x),c===0&&(g=t.y),{x:u,y:g}}},"intersection"),Yh=f((e,t)=>{R.warn("abc88 cutPathAtIntersect",e,t);let r=[],i=e[0],s=!1;return e.forEach(o=>{if(R.info("abc88 checking point",o,t),!_k(t,o)&&!s){const a=Fk(t,i,o);R.debug("abc88 inside",o,i,a),R.debug("abc88 intersection",a,t);let n=!1;r.forEach(l=>{n=n||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?R.warn("abc88 no intersect",a,r):r.push(a),s=!0}else R.warn("abc88 outside",o,i),i=o,s||r.push(o)}),R.debug("returning points",r),r},"cutPathAtIntersect");function ep(e){const t=[],r=[];for(let i=1;i<e.length-1;i++){const s=e[i-1],o=e[i],a=e[i+1];(s.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-s.y)>5||s.y===o.y&&o.x===a.x&&Math.abs(o.x-s.x)>5&&Math.abs(o.y-a.y)>5)&&(t.push(o),r.push(i))}return{cornerPoints:t,cornerPointPositions:r}}f(ep,"extractCornerPoints");var jh=f(function(e,t,r){const i=t.x-e.x,s=t.y-e.y,o=Math.sqrt(i*i+s*s),a=r/o;return{x:t.x-a*i,y:t.y-a*s}},"findAdjacentPoint"),Mk=f(function(e){const{cornerPointPositions:t}=ep(e),r=[];for(let i=0;i<e.length;i++)if(t.includes(i)){const s=e[i-1],o=e[i+1],a=e[i],n=jh(s,a,5),l=jh(o,a,5),c=l.x-n.x,h=l.y-n.y;r.push(n);const d=Math.sqrt(2)*2;let u={x:a.x,y:a.y};if(Math.abs(o.x-s.x)>10&&Math.abs(o.y-s.y)>=10){R.debug("Corner point fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));const g=5;a.x===n.x?u={x:c<0?n.x-g+d:n.x+g-d,y:h<0?n.y-d:n.y+d}:u={x:c<0?n.x-d:n.x+d,y:h<0?n.y-g+d:n.y+g-d}}else R.debug("Corner point skipping fixing",Math.abs(o.x-s.x),Math.abs(o.y-s.y));r.push(u,l)}else r.push(e[i]);return r},"fixCorners"),Ok=f((e,t,r)=>{const i=e-t-r,s=2,o=2,a=s+o,n=Math.floor(i/a),l=Number.isFinite(n)?Math.max(0,n):0,c=Array(l).fill(`${s} ${o}`).join(" ");return`0 ${t} ${c} ${r}`},"generateDashArray"),rp=f(function(e,t,r,i,s,o,a,n=!1){var $;if(!a)throw new Error(`insertEdge: missing diagramId for edge "${t.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:l,layout:c}=Nt();let h=t.points,d=!1;const u=s;var g=o;const p=[];for(const Y in t.cssCompiledStyles)_d(Y)||p.push(t.cssCompiledStyles[Y]);if(c==="swimlane"){if(g.intersect&&u.intersect&&Array.isArray(h)&&h.length>=2)if(h.length===2)h=[u.intersect(h[0]),g.intersect(h[1])];else{const Y=h.slice(1,-1),at=Y[0],wt=Y[Y.length-1],bt=.5,Lt=Math.abs(h[h.length-1].x-wt.x)<bt&&Math.abs(h[h.length-1].y-wt.y)<bt,nt=u.intersect(at),Ct=Lt?wt:g.intersect(wt),Et=Math.abs(Ct.x-wt.x)<bt&&Math.abs(Ct.y-wt.y)<bt,zt=Math.abs(nt.x-at.x)<bt&&Math.abs(nt.y-at.y)<bt?[]:[nt],It=Et?[]:[Ct];h=[...zt,...Y,...It]}h=Ek(t,h)}else g.intersect&&u.intersect&&!n&&(h=h.slice(1,t.points.length-1),h.unshift(u.intersect(h[0])),h.push(g.intersect(h[h.length-1])));const C=btoa(JSON.stringify(h));t.toCluster&&(R.info("to cluster abc88",r.get(t.toCluster)),h=Yh(t.points,r.get(t.toCluster).node),d=!0),t.fromCluster&&(R.debug("from cluster abc88",r.get(t.fromCluster),JSON.stringify(h,null,2)),h=Yh(h.reverse(),r.get(t.fromCluster).node).reverse(),d=!0);let x=h.filter(Y=>!Number.isNaN(Y.y));const y=Lk(t.curve);y!=="rounded"&&(x=Mk(x));let b=Ds;switch(y){case"linear":b=Ds;break;case"basis":b=Sa;break;case"cardinal":b=Vc;break;case"bumpX":b=Zc;break;case"bumpY":b=Kc;break;case"catmullRom":b=Gc;break;case"monotoneX":b=Xc;break;case"monotoneY":b=Uc;break;case"natural":b=jc;break;case"step":b=Yc;break;case"stepAfter":b=Hc;break;case"stepBefore":b=zc;break;case"rounded":b=Ds;break;default:b=Sa}const{x:S,y:w}=Sk(t),L=wm().x(S).y(w).curve(b);let A;switch(t.thickness){case"normal":A="edge-thickness-normal";break;case"thick":A="edge-thickness-thick";break;case"invisible":A="edge-thickness-invisible";break;default:A="edge-thickness-normal"}switch(t.pattern){case"solid":A+=" edge-pattern-solid";break;case"dotted":A+=" edge-pattern-dotted";break;case"dashed":A+=" edge-pattern-dashed";break;default:A+=" edge-pattern-solid"}let v,E=y==="rounded"?ip(sp(x,t),5):L(x);const D=Array.isArray(t.style)?t.style:[t.style];let q=D.find(Y=>Y==null?void 0:Y.startsWith("stroke:")),U="";t.animate&&(U="edge-animation-fast"),t.animation&&(U="edge-animation-"+t.animation);let st=!1;if(t.look==="handDrawn"){const Y=gt.svg(e);Object.assign([],x);const at=Y.path(E,{roughness:.3,seed:l});A+=" transition",v=Dt(at).select("path").attr("id",`${a}-${t.id}`).attr("class"," "+A+(t.classes?" "+t.classes:"")+(U?" "+U:"")).attr("style",D?D.reduce((bt,Lt)=>bt+";"+Lt,""):"");let wt=v.attr("d");v.attr("d",wt),e.node().appendChild(v.node())}else{const Y=p.join(";"),at=D?D.reduce((Et,_t)=>Et+_t+";",""):"",wt=(Y?Y+";"+at+";":at)+";"+(D?D.reduce((Et,_t)=>Et+";"+_t,""):"");v=e.append("path").attr("d",E).attr("id",`${a}-${t.id}`).attr("class"," "+A+(t.classes?" "+t.classes:"")+(U?" "+U:"")).attr("style",wt),q=($=wt.match(/stroke:([^;]+)/))==null?void 0:$[1],st=t.animate===!0||!!t.animation||Y.includes("animation");const bt=v.node(),Lt=typeof bt.getTotalLength=="function"?bt.getTotalLength():0,nt=zh[t.arrowTypeStart]||0,Ct=zh[t.arrowTypeEnd]||0;if(t.look==="neo"&&!st){const _t=`stroke-dasharray: ${t.pattern==="dotted"||t.pattern==="dashed"?Ok(Lt,nt,Ct):`0 ${nt} ${Lt-nt-Ct} ${Ct}`}; stroke-dashoffset: 0;`;v.attr("style",_t+v.attr("style"))}}v.attr("data-edge",!0),v.attr("data-et","edge"),v.attr("data-id",t.id),v.attr("data-points",C),v.attr("data-look",oe(t.look)),t.showPoints&&x.forEach(Y=>{e.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",Y.x).attr("cy",Y.y)});let N="";(Nt().flowchart.arrowMarkerAbsolute||Nt().state.arrowMarkerAbsolute)&&(N=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,N=N.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),R.info("arrowTypeStart",t.arrowTypeStart),R.info("arrowTypeEnd",t.arrowTypeEnd);const H=!st&&(t==null?void 0:t.look)==="neo";Tk(v,t,N,a,i,H,q);const G=Math.floor(h.length/2),F=h[G];me.isLabelCoordinateInPath(F,v.attr("d"))||(d=!0);let Q={};return d&&(Q.updatedPath=h),Q.originalPath=t.points,Q},"insertEdge");function ip(e,t){if(e.length<2)return"";let r="";const i=e.length,s=1e-5;for(let o=0;o<i;o++){const a=e[o],n=e[o-1],l=e[o+1];if(o===0)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const c=a.x-n.x,h=a.y-n.y,d=l.x-a.x,u=l.y-a.y,g=Math.hypot(c,h),p=Math.hypot(d,u);if(g<s||p<s){r+=`L${a.x},${a.y}`;continue}const C=c/g,x=h/g,y=d/p,b=u/p,S=C*y+x*b,w=Math.max(-1,Math.min(1,S)),L=Math.acos(w);if(L<s||Math.abs(Math.PI-L)<s){r+=`L${a.x},${a.y}`;continue}const A=Math.min(t/Math.sin(L/2),g/2,p/2),v=a.x-C*A,E=a.y-x*A,D=a.x+y*A,q=a.y+b*A;r+=`L${v},${E}`,r+=`Q${a.x},${a.y} ${D},${q}`}}return r}f(ip,"generateRoundedPath");function Va(e,t){if(!e||!t)return{angle:0,deltaX:0,deltaY:0};const r=t.x-e.x,i=t.y-e.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}f(Va,"calculateDeltaAndAngle");function sp(e,t){const r=e.map(s=>({...s}));if(e.length>=2&&fe[t.arrowTypeStart]){const s=fe[t.arrowTypeStart],o=e[0],a=e[1],{angle:n}=Va(o,a),l=s*Math.cos(n),c=s*Math.sin(n);r[0].x=o.x+l,r[0].y=o.y+c}const i=e.length;if(i>=2&&fe[t.arrowTypeEnd]){const s=fe[t.arrowTypeEnd],o=e[i-1],a=e[i-2],{angle:n}=Va(a,o),l=s*Math.cos(n),c=s*Math.sin(n);r[i-1].x=o.x-l,r[i-1].y=o.y-c}return r}f(sp,"applyMarkerOffsetsToPoints");var Ik=f((e,t,r,i)=>{t.forEach(s=>{i1[s](e,r,i)})},"insertMarkers"),Dk=f((e,t,r)=>{R.trace("Making markers for ",r),e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Rk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Pk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),$k=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),qk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Nk=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Wk=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),zk=f((e,t,r)=>{e.append("marker").attr("id",r+"_"+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",r+"_"+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",r+"_"+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",r+"_"+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"),Hk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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"),Yk=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{transitionColor:o}=s;e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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",`${o}`)},"barbNeo"),jk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Uk=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+t).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),s.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),Xk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+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",r+"_"+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"),Gk=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const s=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+t).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");s.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),s.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),Vk=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+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",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+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",`${o}`)},"only_one_neo"),Kk=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+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");n.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),n.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+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");l.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),l.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),Zk=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+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",`${o}`),e.append("defs").append("marker").attr("id",r+"_"+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",`${o}`)},"one_or_more_neo"),Qk=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{strokeWidth:o,mainBkg:a}=s,n=e.append("defs").append("marker").attr("id",r+"_"+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");n.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const l=e.append("defs").append("marker").attr("id",r+"_"+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");l.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),l.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),Jk=f((e,t,r)=>{e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0
|
|
268
|
+
L20,10
|
|
269
|
+
M20,10
|
|
270
|
+
L0,20`)},"requirement_arrow"),t1=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{strokeWidth:o}=s;e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d",`M0,0
|
|
271
|
+
L20,10
|
|
272
|
+
M20,10
|
|
273
|
+
L0,20`).attr("stroke-linejoin","miter")},"requirement_arrow_neo"),e1=f((e,t,r)=>{const i=e.append("defs").append("marker").attr("id",r+"_"+t+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),r1=f((e,t,r)=>{const i=Jt(),{themeVariables:s}=i,{strokeWidth:o}=s,a=e.append("defs").append("marker").attr("id",r+"_"+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",`${o}`)},"requirement_contains_neo"),i1={extension:Dk,composition:Rk,aggregation:Pk,dependency:$k,lollipop:qk,point:Nk,circle:Wk,cross:zk,barb:Hk,barbNeo:Yk,only_one:jk,zero_or_one:Uk,one_or_more:Xk,zero_or_more:Gk,only_one_neo:Vk,zero_or_one_neo:Kk,one_or_more_neo:Zk,zero_or_more_neo:Qk,requirement_arrow:Jk,requirement_contains:e1,requirement_arrow_neo:t1,requirement_contains_neo:r1},op=Ik,s1="\0",Fr="\0",Uh="";class yo{constructor(t={}){this._isDirected=Object.prototype.hasOwnProperty.call(t,"directed")?t.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(t,"multigraph")?t.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=bs(void 0),this._defaultEdgeLabelFn=bs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Fr]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return Al(t)||(t=bs(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return Zr(this._nodes)}sources(){var t=this;return ks(this.nodes(),function(r){return El(t._in[r])})}sinks(){var t=this;return ks(this.nodes(),function(r){return El(t._out[r])})}setNodes(t,r){var i=arguments,s=this;return vr(t,function(o){i.length>1?s.setNode(o,r):s.setNode(o)}),this}setNode(t,r){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=r),this):(this._nodes[t]=arguments.length>1?r:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=Fr,this._children[t]={},this._children[Fr][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var r=i=>this.removeEdge(this._edgeObjs[i]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],vr(this.children(t),i=>{this.setParent(i)}),delete this._children[t]),vr(Zr(this._in[t]),r),delete this._in[t],delete this._preds[t],vr(Zr(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ei(r))r=Fr;else{r+="";for(var i=r;!ei(i);i=this.parent(i))if(i===t)throw new Error("Setting "+r+" as parent of "+t+" would create a cycle");this.setNode(r)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=r,this._children[r][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var r=this._parent[t];if(r!==Fr)return r}}children(t){if(ei(t)&&(t=Fr),this._isCompound){var r=this._children[t];if(r)return Zr(r)}else{if(t===Fr)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var r=this._preds[t];if(r)return Zr(r)}successors(t){var r=this._sucs[t];if(r)return Zr(r)}neighbors(t){var r=this.predecessors(t);if(r)return Bm(r,this.successors(t))}isLeaf(t){var r;return this.isDirected()?r=this.successors(t):r=this.neighbors(t),r.length===0}filterNodes(t){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;vr(this._nodes,function(a,n){t(n)&&r.setNode(n,a)}),vr(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var s={};function o(a){var n=i.parent(a);return n===void 0||r.hasNode(n)?(s[a]=n,n):n in s?s[n]:o(n)}return this._isCompound&&vr(r.nodes(),function(a){r.setParent(a,o(a))}),r}setDefaultEdgeLabel(t){return Al(t)||(t=bs(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return Ao(this._edgeObjs)}setPath(t,r){var i=this,s=arguments;return Lm(t,function(o,a){return s.length>1?i.setEdge(o,a,r):i.setEdge(o,a),a}),this}setEdge(){var t,r,i,s,o=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,r=a.w,i=a.name,arguments.length===2&&(s=arguments[1],o=!0)):(t=a,r=arguments[1],i=arguments[3],arguments.length>2&&(s=arguments[2],o=!0)),t=""+t,r=""+r,ei(i)||(i=""+i);var n=Ki(this._isDirected,t,r,i);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,n))return o&&(this._edgeLabels[n]=s),this;if(!ei(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(r),this._edgeLabels[n]=o?s:this._defaultEdgeLabelFn(t,r,i);var l=o1(this._isDirected,t,r,i);return t=l.v,r=l.w,Object.freeze(l),this._edgeObjs[n]=l,Xh(this._preds[r],t),Xh(this._sucs[t],r),this._in[r][n]=l,this._out[t][n]=l,this._edgeCount++,this}edge(t,r,i){var s=arguments.length===1?Vo(this._isDirected,arguments[0]):Ki(this._isDirected,t,r,i);return this._edgeLabels[s]}hasEdge(t,r,i){var s=arguments.length===1?Vo(this._isDirected,arguments[0]):Ki(this._isDirected,t,r,i);return Object.prototype.hasOwnProperty.call(this._edgeLabels,s)}removeEdge(t,r,i){var s=arguments.length===1?Vo(this._isDirected,arguments[0]):Ki(this._isDirected,t,r,i),o=this._edgeObjs[s];return o&&(t=o.v,r=o.w,delete this._edgeLabels[s],delete this._edgeObjs[s],Gh(this._preds[r],t),Gh(this._sucs[t],r),delete this._in[r][s],delete this._out[t][s],this._edgeCount--),this}inEdges(t,r){var i=this._in[t];if(i){var s=Ao(i);return r?ks(s,function(o){return o.v===r}):s}}outEdges(t,r){var i=this._out[t];if(i){var s=Ao(i);return r?ks(s,function(o){return o.w===r}):s}}nodeEdges(t,r){var i=this.inEdges(t,r);if(i)return i.concat(this.outEdges(t,r))}}yo.prototype._nodeCount=0;yo.prototype._edgeCount=0;function Xh(e,t){e[t]?e[t]++:e[t]=1}function Gh(e,t){--e[t]||delete e[t]}function Ki(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}return s+Uh+o+Uh+(ei(i)?s1:i)}function o1(e,t,r,i){var s=""+t,o=""+r;if(!e&&s>o){var a=s;s=o,o=a}var n={v:s,w:o};return i&&(n.name=i),n}function Vo(e,t){return Ki(e,t.v,t.w,t.name)}function ap(e,{edgePathsClass:t="edges edgePath"}={}){const r=e.insert("g").attr("class","root"),i=r.insert("g").attr("class","clusters"),s=r.insert("g").attr("class",t),o=r.insert("g").attr("class","edgeLabels"),a=r.insert("g").attr("class","nodes");return{clusters:i,edgePaths:s,edgeLabels:o,nodes:a,rootGroups:r}}f(ap,"createLayoutElementGroups");async function np(e,t){if(t.label){const{shapeSvg:r,bbox:i}=await St(e,t);t.labelBBox={width:i.width,height:i.height},r.remove()}else t.labelBBox={width:0,height:0}}f(np,"measureGroupLabel");async function lp(e,t,r){var o;const i=await Nn(e,t,r),s=((o=i.node())==null?void 0:o.getBBox())??{width:0,height:0};return t.width=s.width,t.height=s.height,i}f(lp,"insertMeasuredNode");async function hp(e,t){const r=new yo({multigraph:!0,compound:!0}),i=[...t.edges],s=Nt(),o=ap(e),{edgeLabels:a,nodes:n}=o,l=new Map,c=e.node()!=null;await Promise.all(t.nodes.map(async h=>{if(h.isGroup)c&&await np(n,h),r.setNode(h.id,{...h});else{if(c){const d=await lp(n,h,{config:s,dir:h.dir});l.set(h.id,d)}r.setNode(h.id,{...h})}}));for(const h of i)c&&tp(h)&&await Wn(a,h),r.setEdge(h.start,h.end,{...h},h.id),t.edges.some(u=>u.id===h.id)||t.edges.push(h);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:h}=await Pt(async()=>{const{captureNodeSizes:d}=await import("./sizeCapture-X5ZJPWSS-CbaN7yeQ.js");return{captureNodeSizes:d}},__vite__mapDeps([0,1,2,3,4,5,6]));h(e,t)}return{graph:r,groups:o,nodeElements:l}}f(hp,"createGraphWithElements");var Ht=new Map,Ir=new Map,cp=new Map,a1=f(()=>{Ir.clear(),cp.clear(),Ht.clear()},"clear"),is=f((e,t)=>{const r=Ir.get(t)||[];return R.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),n1=f((e,t)=>{const r=Ir.get(t)||[];return R.info("Descendants of ",t," is ",r),R.info("Edge is ",e),e.v===t||e.w===t?!1:r?r.includes(e.v)||is(e.v,t)||is(e.w,t)||r.includes(e.w):(R.debug("Tilt, ",t,",not in descendants"),!1)},"edgeInCluster"),dp=f((e,t,r,i)=>{R.debug("Copying children of ",e,"root",i,"data",t.node(e),i);const s=t.children(e)||[];e!==i&&s.push(e),R.debug("Copying (nodes) clusterId",e,"nodes",s),s.forEach(o=>{if(t.children(o).length>0)dp(o,t,r,i);else{const a=t.node(o);R.info("cp ",o," to ",i," with parent ",e),r.setNode(o,a),i!==t.parent(o)&&(R.debug("Setting parent",o,t.parent(o)),r.setParent(o,t.parent(o))),e!==i&&o!==e?(R.debug("Setting parent",o,e),r.setParent(o,e)):(R.info("In copy ",e,"root",i,"data",t.node(e),i),R.debug("Not Setting parent for node=",o,"cluster!==rootId",e!==i,"node!==clusterId",o!==e));const n=t.edges(o);R.debug("Copying Edges",n),n.forEach(l=>{R.info("Edge",l);const c=t.edge(l.v,l.w,l.name);R.info("Edge data",c,i);try{n1(l,i)?(R.info("Copying as ",l.v,l.w,c,l.name),r.setEdge(l.v,l.w,c,l.name),R.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):R.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",e)}catch(h){R.error(h)}})}R.debug("Removing node",o),t.removeNode(o)})},"copy"),up=f((e,t)=>{const r=t.children(e);let i=[...r];for(const s of r)cp.set(s,e),i=[...i,...up(s,t)];return i},"extractDescendants"),l1=f((e,t,r)=>{const i=e.edges().filter(l=>l.v===t||l.w===t),s=e.edges().filter(l=>l.v===r||l.w===r),o=i.map(l=>({v:l.v===t?r:l.v,w:l.w===t?t:l.w})),a=s.map(l=>({v:l.v,w:l.w}));return o.filter(l=>a.some(c=>l.v===c.v&&l.w===c.w))},"findCommonEdges"),io=f((e,t,r)=>{const i=t.children(e);if(R.trace("Searching children of id ",e,i),i.length<1)return e;let s;for(const o of i){const a=io(o,t,r),n=l1(t,r,a);if(a)if(n.length>0)s=a;else return a}return s},"findNonClusterChild"),Vh=f(e=>!Ht.has(e)||!Ht.get(e).externalConnections?e:Ht.has(e)?Ht.get(e).id:e,"getAnchorId"),nB=f((e,t)=>{var r;if(!e||t>10){R.debug("Opting out, no graph ");return}else R.debug("Opting in, graph ");e.nodes().forEach(function(i){e.children(i).length>0&&(R.debug("Cluster identified",i," Replacement id in edges: ",io(i,e,i)),Ir.set(i,up(i,e)),Ht.set(i,{id:io(i,e,i),clusterData:e.node(i)}))}),e.nodes().forEach(function(i){const s=e.children(i),o=e.edges();s.length>0?(R.debug("Cluster identified",i,Ir),o.forEach(a=>{const n=is(a.v,i),l=is(a.w,i);n^l&&(R.debug("Edge: ",a," leaves cluster ",i),R.debug("Descendants of XXX ",i,": ",Ir.get(i)),Ht.get(i).externalConnections=!0)})):R.debug("Not a cluster ",i,Ir)});for(let i of Ht.keys()){const s=Ht.get(i).id,o=e.parent(s);o!==i&&Ht.has(o)&&!Ht.get(o).externalConnections&&(Ht.get(i).id=o);const a=e.edges().some(n=>n.v===i);if(s&&((r=Ht.get(i))!=null&&r.externalConnections)&&a&&fp(e,s,i)){const n=h1(e,i,e.parent(s));n&&(Ht.get(i).id=n)}}e.edges().forEach(function(i){const s=e.edge(i);R.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(i)),R.debug("Edge "+i.v+" -> "+i.w+": "+JSON.stringify(e.edge(i)));let o=i.v,a=i.w;if(R.debug("Fix XXX",Ht,"ids:",i.v,i.w,"Translating: ",Ht.get(i.v)," --- ",Ht.get(i.w)),Ht.get(i.v)||Ht.get(i.w)){if(R.debug("Fixing and trying - removing XXX",i.v,i.w,i.name),o=Vh(i.v),a=Vh(i.w),e.removeEdge(i.v,i.w,i.name),o!==i.v){const n=e.parent(o);Ht.get(n).externalConnections=!0,s.fromCluster=i.v}if(a!==i.w){const n=e.parent(a);Ht.get(n).externalConnections=!0,s.toCluster=i.w}R.debug("Fix Replacing with XXX",o,a,i.name),e.setEdge(o,a,s,i.name)}}),gp(e,0),R.trace(Ht)},"adjustClustersAndEdges"),gp=f((e,t)=>{var s,o;if(t>10){R.error("Bailing out");return}let r=e.nodes(),i=!1;for(const a of r){const n=e.children(a);i=i||n.length>0}if(!i){R.debug("Done, no node has children",e.nodes());return}R.debug("Nodes = ",r,t);for(const a of r)if(R.debug("Extracting node",a,Ht,Ht.has(a)&&!Ht.get(a).externalConnections,!e.parent(a),e.node(a),e.children("D")," Depth ",t),!Ht.has(a))R.debug("Not a cluster",a,t);else if(!Ht.get(a).externalConnections&&e.children(a)&&e.children(a).length>0){R.debug("Cluster without external connections, without a parent and with children",a,t);let l=e.graph().rankdir==="TB"?"LR":"TB";(o=(s=Ht.get(a))==null?void 0:s.clusterData)!=null&&o.dir&&(l=Ht.get(a).clusterData.dir,R.debug("Fixing dir",Ht.get(a).clusterData.dir,l));const c=new yo({multigraph:!0,compound:!0}).setGraph({rankdir:l,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});dp(a,e,c,a),e.setNode(a,{clusterNode:!0,id:a,clusterData:Ht.get(a).clusterData,label:Ht.get(a).label,graph:c})}else R.debug("Cluster ** ",a," **not meeting the criteria !externalConnections:",!Ht.get(a).externalConnections," no parent: ",!e.parent(a)," children ",e.children(a)&&e.children(a).length>0,e.children("D"),t),R.debug(Ht);r=e.nodes(),R.debug("New list of nodes",r);for(const a of r){const n=e.node(a);R.debug(" Now next level",a,n),n!=null&&n.clusterNode&&gp(n.graph,t+1)}},"extractor"),pp=f((e,t)=>{if(t.length===0)return[];let r=Object.assign([],t);return t.forEach(i=>{const s=e.children(i),o=pp(e,s);r=[...r,...o]}),r},"sorter"),lB=f(e=>pp(e,e.children()),"sortNodesByHierarchy"),fp=f((e,t,r)=>{let i=e.parent(t);for(;i&&i!==r;){const s=Ht.get(i);if(s&&!s.externalConnections)return!0;i=e.parent(i)}return!1},"isNodeInExtractableCluster"),h1=f((e,t,r)=>{const i=e.children(t)??[];for(const s of i){if(s===r||is(s,r))continue;const o=io(s,e,t);if(o&&!fp(e,o,t))return o}return null},"findSafeAnchorNode");function c1({prepareLayout:e,measureLayout:t,runLayoutCore:r,paintLayout:i,afterPaint:s,paintOptions:o}){const a=t??yp;return f(async function(l,c,h,d){const u=c.select("g");op(u,l.markers,l.type,l.diagramId),mp();const g={element:u,helpers:h,options:d};g.preparedLayout=await(e==null?void 0:e(l,g));const p=await a(l,g),C=await r(l,g),x={...g,measure:p};i?await i(l,x,C):await Cp(l,x,o),await(s==null?void 0:s(l,x,C))},"render")}f(c1,"createCommonLayoutRenderer");function mp(){gk(),vk(),kk(),a1()}f(mp,"clearLayoutRenderState");async function yp(e,{element:t}){return await hp(t,e)}f(yp,"defaultMeasureLayout");async function Cp(e,t,r={}){var a,n;const{measure:i}=t,{groups:s}=i;for(const l of((a=r.getNodes)==null?void 0:a.call(r,e,t))??e.nodes)(n=r.skipNode)!=null&&n.call(r,l,t)||await xp(s,l,t,r);const o=kp(e.nodes);for(const l of e.edges)Sp(l,r)||await Tp(s,l,o,e,r,t)}f(Cp,"paintLayoutData");async function xp(e,t,r,i){t.clusterNode?Wh(t):bp(t,r,i)?await Jg(e.clusters,t):Wh(t)}f(xp,"paintLayoutNode");function bp(e,t,r){var i;return e.isGroup===!0&&(((i=r.isCluster)==null?void 0:i.call(r,e,t))??!0)}f(bp,"shouldPaintAsCluster");function kp(e){const t=new Map;for(const r of e)r!=null&&r.id&&t.set(r.id,r);return t}f(kp,"buildNodeLookup");function Sp(e,t){var r;return e.isLayoutOnly||!!((r=t.skipEdge)!=null&&r.call(t,e))}f(Sp,"shouldSkipPaintEdge");async function Tp(e,t,r,i,s,o){const a=rp(e.edgePaths,{...t},s.clusterDb??new Map,i.type,Ka(t.start,t,r,o,s),Ka(t.end,t,r,o,s),i.diagramId,wp(t,s));tp(t)&&(Li.has(t.id)||await Wn(e.edgeLabels,t),Bp(t,a))}f(Tp,"paintLayoutEdge");function Ka(e,t,r,i,s){var o;return((o=s.getEdgeNode)==null?void 0:o.call(s,e,t,i))??(e?r.get(e)??{}:{})}f(Ka,"getRenderedNode");function wp(e,t){return typeof t.skipIntersect=="function"?t.skipIntersect(e):t.skipIntersect??!1}f(wp,"shouldSkipIntersect");function Bp(e,t){const r=(t==null?void 0:t.updatedPath)??(t==null?void 0:t.originalPath),i=Jt(),{subGraphTitleTotalMargin:s}=fo({flowchart:i.flowchart??{}});if(e.label){const o=Li.get(e.id);let a=e.x,n=e.y;if(r){const l=me.calcLabelPosition(r);R.debug("Moving label "+e.label+" from (",a,",",n,") to (",l.x,",",l.y,") abc88"),t!=null&&t.updatedPath&&(a=l.x,n=l.y)}o.attr("transform",`translate(${a}, ${n+s/2})`)}if(e!=null&&e.startLabelLeft){const o=se.get(e.id).startLeft;let a=e==null?void 0:e.x,n=e==null?void 0:e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.startLabelRight){const o=se.get(e.id).startRight;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeStart?10:0,"start_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelLeft){const o=se.get(e.id).endLeft;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_left",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}if(e.endLabelRight){const o=se.get(e.id).endRight;let a=e.x,n=e.y;if(r){const l=me.calcTerminalLabelPosition(e.arrowTypeEnd?10:0,"end_right",r);a=l.x,n=l.y}o.attr("transform",`translate(${a}, ${n})`)}}f(Bp,"positionRenderedEdgeLabel");function Lp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}f(Lp,"getDefaultExportFromCjs");var ge={},Ms={},br={},Kh;function _i(){if(Kh)return br;Kh=1;function e(a){return typeof a>"u"||a===null}f(e,"isNothing");function t(a){return typeof a=="object"&&a!==null}f(t,"isObject");function r(a){return Array.isArray(a)?a:e(a)?[]:[a]}f(r,"toArray");function i(a,n){if(n){const l=Object.keys(n);for(let c=0,h=l.length;c<h;c+=1){const d=l[c];a[d]=n[d]}}return a}f(i,"extend");function s(a,n){let l="";for(let c=0;c<n;c+=1)l+=a;return l}f(s,"repeat");function o(a){return a===0&&Number.NEGATIVE_INFINITY===1/a}return f(o,"isNegativeZero"),br.isNothing=e,br.isObject=t,br.toArray=r,br.repeat=s,br.isNegativeZero=o,br.extend=i,br}f(_i,"requireCommon");var Ko,Zh;function Fi(){if(Zh)return Ko;Zh=1;function e(r,i){let s="";const o=r.reason||"(unknown reason)";return r.mark?(r.mark.name&&(s+='in "'+r.mark.name+'" '),s+="("+(r.mark.line+1)+":"+(r.mark.column+1)+")",!i&&r.mark.snippet&&(s+=`
|
|
274
|
+
|
|
275
|
+
`+r.mark.snippet),o+" "+s):o}f(e,"formatError");function t(r,i){Error.call(this),this.name="YAMLException",this.reason=r,this.mark=i,this.message=e(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}return f(t,"YAMLException2"),t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t.prototype.toString=f(function(i){return this.name+": "+e(this,i)},"toString"),Ko=t,Ko}f(Fi,"requireException");var Zo,Qh;function vp(){if(Qh)return Zo;Qh=1;const e=_i();function t(s,o,a,n,l){let c="",h="";const d=Math.floor(l/2)-1;return n-o>d&&(c=" ... ",o=n-d+c.length),a-n>d&&(h=" ...",a=n+d-h.length),{str:c+s.slice(o,a).replace(/\t/g,"→")+h,pos:n-o+c.length}}f(t,"getLine");function r(s,o){return e.repeat(" ",o-s.length)+s}f(r,"padStart");function i(s,o){if(o=Object.create(o||null),!s.buffer)return null;o.maxLength||(o.maxLength=79),typeof o.indent!="number"&&(o.indent=1),typeof o.linesBefore!="number"&&(o.linesBefore=3),typeof o.linesAfter!="number"&&(o.linesAfter=2);const a=/\r?\n|\r|\0/g,n=[0],l=[];let c,h=-1;for(;c=a.exec(s.buffer);)l.push(c.index),n.push(c.index+c[0].length),s.position<=c.index&&h<0&&(h=n.length-2);h<0&&(h=n.length-1);let d="";const u=Math.min(s.line+o.linesAfter,l.length).toString().length,g=o.maxLength-(o.indent+u+3);for(let C=1;C<=o.linesBefore&&!(h-C<0);C++){const x=t(s.buffer,n[h-C],l[h-C],s.position-(n[h]-n[h-C]),g);d=e.repeat(" ",o.indent)+r((s.line-C+1).toString(),u)+" | "+x.str+`
|
|
276
|
+
`+d}const p=t(s.buffer,n[h],l[h],s.position,g);d+=e.repeat(" ",o.indent)+r((s.line+1).toString(),u)+" | "+p.str+`
|
|
277
|
+
`,d+=e.repeat("-",o.indent+u+3+p.pos)+`^
|
|
278
|
+
`;for(let C=1;C<=o.linesAfter&&!(h+C>=l.length);C++){const x=t(s.buffer,n[h+C],l[h+C],s.position-(n[h]-n[h+C]),g);d+=e.repeat(" ",o.indent)+r((s.line+C+1).toString(),u)+" | "+x.str+`
|
|
279
|
+
`}return d.replace(/\n$/,"")}return f(i,"makeSnippet"),Zo=i,Zo}f(vp,"requireSnippet");var Qo,Jh;function Ce(){if(Jh)return Qo;Jh=1;const e=Fi(),t=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function i(o){const a={};return o!==null&&Object.keys(o).forEach(function(n){o[n].forEach(function(l){a[String(l)]=n})}),a}f(i,"compileStyleAliases");function s(o,a){if(a=a||{},Object.keys(a).forEach(function(n){if(t.indexOf(n)===-1)throw new e('Unknown option "'+n+'" is met in definition of "'+o+'" YAML type.')}),this.options=a,this.tag=o,this.kind=a.kind||null,this.resolve=a.resolve||function(){return!0},this.construct=a.construct||function(n){return n},this.instanceOf=a.instanceOf||null,this.predicate=a.predicate||null,this.represent=a.represent||null,this.representName=a.representName||null,this.defaultStyle=a.defaultStyle||null,this.multi=a.multi||!1,this.styleAliases=i(a.styleAliases||null),r.indexOf(this.kind)===-1)throw new e('Unknown kind "'+this.kind+'" is specified for "'+o+'" YAML type.')}return f(s,"Type2"),Qo=s,Qo}f(Ce,"requireType");var Jo,tc;function zn(){if(tc)return Jo;tc=1;const e=Fi(),t=Ce();function r(o,a){const n=[];return o[a].forEach(function(l){let c=n.length;n.forEach(function(h,d){h.tag===l.tag&&h.kind===l.kind&&h.multi===l.multi&&(c=d)}),n[c]=l}),n}f(r,"compileList");function i(){const o={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function a(n){n.multi?(o.multi[n.kind].push(n),o.multi.fallback.push(n)):o[n.kind][n.tag]=o.fallback[n.tag]=n}f(a,"collectType");for(let n=0,l=arguments.length;n<l;n+=1)arguments[n].forEach(a);return o}f(i,"compileMap");function s(o){return this.extend(o)}return f(s,"Schema2"),s.prototype.extend=f(function(a){let n=[],l=[];if(a instanceof t)l.push(a);else if(Array.isArray(a))l=l.concat(a);else if(a&&(Array.isArray(a.implicit)||Array.isArray(a.explicit)))a.implicit&&(n=n.concat(a.implicit)),a.explicit&&(l=l.concat(a.explicit));else throw new e("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");n.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(h.loadKind&&h.loadKind!=="scalar")throw new e("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(h.multi)throw new e("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(h){if(!(h instanceof t))throw new e("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const c=Object.create(s.prototype);return c.implicit=(this.implicit||[]).concat(n),c.explicit=(this.explicit||[]).concat(l),c.compiledImplicit=r(c,"implicit"),c.compiledExplicit=r(c,"explicit"),c.compiledTypeMap=i(c.compiledImplicit,c.compiledExplicit),c},"extend"),Jo=s,Jo}f(zn,"requireSchema");var ta,ec;function Hn(){if(ec)return ta;ec=1;const e=Ce();return ta=new e("tag:yaml.org,2002:str",{kind:"scalar",construct:f(function(t){return t!==null?t:""},"construct")}),ta}f(Hn,"requireStr");var ea,rc;function Yn(){if(rc)return ea;rc=1;const e=Ce();return ea=new e("tag:yaml.org,2002:seq",{kind:"sequence",construct:f(function(t){return t!==null?t:[]},"construct")}),ea}f(Yn,"requireSeq");var ra,ic;function jn(){if(ic)return ra;ic=1;const e=Ce();return ra=new e("tag:yaml.org,2002:map",{kind:"mapping",construct:f(function(t){return t!==null?t:{}},"construct")}),ra}f(jn,"requireMap");var ia,sc;function Un(){if(sc)return ia;sc=1;const e=zn();return ia=new e({explicit:[Hn(),Yn(),jn()]}),ia}f(Un,"requireFailsafe");var sa,oc;function Xn(){if(oc)return sa;oc=1;const e=Ce();function t(s){if(s===null)return!0;const o=s.length;return o===1&&s==="~"||o===4&&(s==="null"||s==="Null"||s==="NULL")}f(t,"resolveYamlNull");function r(){return null}f(r,"constructYamlNull");function i(s){return s===null}return f(i,"isNull"),sa=new e("tag:yaml.org,2002:null",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{canonical:f(function(){return"~"},"canonical"),lowercase:f(function(){return"null"},"lowercase"),uppercase:f(function(){return"NULL"},"uppercase"),camelcase:f(function(){return"Null"},"camelcase"),empty:f(function(){return""},"empty")},defaultStyle:"lowercase"}),sa}f(Xn,"require_null");var oa,ac;function Gn(){if(ac)return oa;ac=1;const e=Ce();function t(s){if(s===null)return!1;const o=s.length;return o===4&&(s==="true"||s==="True"||s==="TRUE")||o===5&&(s==="false"||s==="False"||s==="FALSE")}f(t,"resolveYamlBoolean");function r(s){return s==="true"||s==="True"||s==="TRUE"}f(r,"constructYamlBoolean");function i(s){return Object.prototype.toString.call(s)==="[object Boolean]"}return f(i,"isBoolean"),oa=new e("tag:yaml.org,2002:bool",{kind:"scalar",resolve:t,construct:r,predicate:i,represent:{lowercase:f(function(s){return s?"true":"false"},"lowercase"),uppercase:f(function(s){return s?"TRUE":"FALSE"},"uppercase"),camelcase:f(function(s){return s?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),oa}f(Gn,"requireBool");var aa,nc;function Vn(){if(nc)return aa;nc=1;const e=_i(),t=Ce();function r(c){return c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102}f(r,"isHexCode");function i(c){return c>=48&&c<=55}f(i,"isOctCode");function s(c){return c>=48&&c<=57}f(s,"isDecCode");function o(c){if(c===null)return!1;const h=c.length;let d=0,u=!1;if(!h)return!1;let g=c[d];if((g==="-"||g==="+")&&(g=c[++d]),g==="0"){if(d+1===h)return!0;if(g=c[++d],g==="b"){for(d++;d<h;d++){if(g=c[d],g!=="0"&&g!=="1")return!1;u=!0}return u&&isFinite(a(c))}if(g==="x"){for(d++;d<h;d++){if(!r(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(a(c))}if(g==="o"){for(d++;d<h;d++){if(!i(c.charCodeAt(d)))return!1;u=!0}return u&&isFinite(a(c))}}for(;d<h;d++){if(!s(c.charCodeAt(d)))return!1;u=!0}return u?isFinite(a(c)):!1}f(o,"resolveYamlInteger");function a(c){let h=c,d=1,u=h[0];if((u==="-"||u==="+")&&(u==="-"&&(d=-1),h=h.slice(1),u=h[0]),h==="0")return 0;if(u==="0"){if(h[1]==="b")return d*parseInt(h.slice(2),2);if(h[1]==="x")return d*parseInt(h.slice(2),16);if(h[1]==="o")return d*parseInt(h.slice(2),8)}return d*parseInt(h,10)}f(a,"parseYamlInteger");function n(c){return a(c)}f(n,"constructYamlInteger");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&c%1===0&&!e.isNegativeZero(c)}return f(l,"isInteger"),aa=new t("tag:yaml.org,2002:int",{kind:"scalar",resolve:o,construct:n,predicate:l,represent:{binary:f(function(c){return c>=0?"0b"+c.toString(2):"-0b"+c.toString(2).slice(1)},"binary"),octal:f(function(c){return c>=0?"0o"+c.toString(8):"-0o"+c.toString(8).slice(1)},"octal"),decimal:f(function(c){return c.toString(10)},"decimal"),hexadecimal:f(function(c){return c>=0?"0x"+c.toString(16).toUpperCase():"-0x"+c.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),aa}f(Vn,"requireInt");var na,lc;function Kn(){if(lc)return na;lc=1;const e=_i(),t=Ce(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),i=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function s(c){return c===null||!r.test(c)?!1:isFinite(parseFloat(c,10))?!0:i.test(c)}f(s,"resolveYamlFloat");function o(c){let h=c.toLowerCase();const d=h[0]==="-"?-1:1;return"+-".indexOf(h[0])>=0&&(h=h.slice(1)),h===".inf"?d===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:h===".nan"?NaN:d*parseFloat(h,10)}f(o,"constructYamlFloat");const a=/^[-+]?[0-9]+e/;function n(c,h){if(isNaN(c))switch(h){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===c)switch(h){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===c)switch(h){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(e.isNegativeZero(c))return"-0.0";const d=c.toString(10);return a.test(d)?d.replace("e",".e"):d}f(n,"representYamlFloat");function l(c){return Object.prototype.toString.call(c)==="[object Number]"&&(c%1!==0||e.isNegativeZero(c))}return f(l,"isFloat"),na=new t("tag:yaml.org,2002:float",{kind:"scalar",resolve:s,construct:o,predicate:l,represent:n,defaultStyle:"lowercase"}),na}f(Kn,"requireFloat");var la,hc;function Zn(){return hc||(hc=1,la=Un().extend({implicit:[Xn(),Gn(),Vn(),Kn()]})),la}f(Zn,"requireJson");var ha,cc;function Qn(){return cc||(cc=1,ha=Zn()),ha}f(Qn,"requireCore");var ca,dc;function Jn(){if(dc)return ca;dc=1;const e=Ce(),t=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=new 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 i(a){return a===null?!1:t.exec(a)!==null||r.exec(a)!==null}f(i,"resolveYamlTimestamp");function s(a){let n=0,l=null,c=t.exec(a);if(c===null&&(c=r.exec(a)),c===null)throw new Error("Date resolve error");const h=+c[1],d=+c[2]-1,u=+c[3];if(!c[4])return new Date(Date.UTC(h,d,u));const g=+c[4],p=+c[5],C=+c[6];if(c[7]){for(n=c[7].slice(0,3);n.length<3;)n+="0";n=+n}if(c[9]){const y=+c[10],b=+(c[11]||0);l=(y*60+b)*6e4,c[9]==="-"&&(l=-l)}const x=new Date(Date.UTC(h,d,u,g,p,C,n));return l&&x.setTime(x.getTime()-l),x}f(s,"constructYamlTimestamp");function o(a){return a.toISOString()}return f(o,"representYamlTimestamp"),ca=new e("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:i,construct:s,instanceOf:Date,represent:o}),ca}f(Jn,"requireTimestamp");var da,uc;function tl(){if(uc)return da;uc=1;const e=Ce();function t(r){return r==="<<"||r===null}return f(t,"resolveYamlMerge"),da=new e("tag:yaml.org,2002:merge",{kind:"scalar",resolve:t}),da}f(tl,"requireMerge");var ua,gc;function el(){if(gc)return ua;gc=1;const e=Ce(),t=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
280
|
+
\r`;function r(a){if(a===null)return!1;let n=0;const l=a.length,c=t;for(let h=0;h<l;h++){const d=c.indexOf(a.charAt(h));if(!(d>64)){if(d<0)return!1;n+=6}}return n%8===0}f(r,"resolveYamlBinary");function i(a){const n=a.replace(/[\r\n=]/g,""),l=n.length,c=t;let h=0;const d=[];for(let g=0;g<l;g++)g%4===0&&g&&(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)),h=h<<6|c.indexOf(n.charAt(g));const u=l%4*6;return u===0?(d.push(h>>16&255),d.push(h>>8&255),d.push(h&255)):u===18?(d.push(h>>10&255),d.push(h>>2&255)):u===12&&d.push(h>>4&255),new Uint8Array(d)}f(i,"constructYamlBinary");function s(a){let n="",l=0;const c=a.length,h=t;for(let u=0;u<c;u++)u%3===0&&u&&(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]),l=(l<<8)+a[u];const d=c%3;return d===0?(n+=h[l>>18&63],n+=h[l>>12&63],n+=h[l>>6&63],n+=h[l&63]):d===2?(n+=h[l>>10&63],n+=h[l>>4&63],n+=h[l<<2&63],n+=h[64]):d===1&&(n+=h[l>>2&63],n+=h[l<<4&63],n+=h[64],n+=h[64]),n}f(s,"representYamlBinary");function o(a){return Object.prototype.toString.call(a)==="[object Uint8Array]"}return f(o,"isBinary"),ua=new e("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:i,predicate:o,represent:s}),ua}f(el,"requireBinary");var ga,pc;function rl(){if(pc)return ga;pc=1;const e=Ce(),t=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function i(o){if(o===null)return!0;const a=[],n=o;for(let l=0,c=n.length;l<c;l+=1){const h=n[l];let d=!1;if(r.call(h)!=="[object Object]")return!1;let u;for(u in h)if(t.call(h,u))if(!d)d=!0;else return!1;if(!d)return!1;if(a.indexOf(u)===-1)a.push(u);else return!1}return!0}f(i,"resolveYamlOmap");function s(o){return o!==null?o:[]}return f(s,"constructYamlOmap"),ga=new e("tag:yaml.org,2002:omap",{kind:"sequence",resolve:i,construct:s}),ga}f(rl,"requireOmap");var pa,fc;function il(){if(fc)return pa;fc=1;const e=Ce(),t=Object.prototype.toString;function r(s){if(s===null)return!0;const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n];if(t.call(c)!=="[object Object]")return!1;const h=Object.keys(c);if(h.length!==1)return!1;a[n]=[h[0],c[h[0]]]}return!0}f(r,"resolveYamlPairs");function i(s){if(s===null)return[];const o=s,a=new Array(o.length);for(let n=0,l=o.length;n<l;n+=1){const c=o[n],h=Object.keys(c);a[n]=[h[0],c[h[0]]]}return a}return f(i,"constructYamlPairs"),pa=new e("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:i}),pa}f(il,"requirePairs");var fa,mc;function sl(){if(mc)return fa;mc=1;const e=Ce(),t=Object.prototype.hasOwnProperty;function r(s){if(s===null)return!0;const o=s;for(const a in o)if(t.call(o,a)&&o[a]!==null)return!1;return!0}f(r,"resolveYamlSet");function i(s){return s!==null?s:{}}return f(i,"constructYamlSet"),fa=new e("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:i}),fa}f(sl,"requireSet");var ma,yc;function Co(){return yc||(yc=1,ma=Qn().extend({implicit:[Jn(),tl()],explicit:[el(),rl(),il(),sl()]})),ma}f(Co,"require_default");var Cc;function Ap(){if(Cc)return Ms;Cc=1;const e=_i(),t=Fi(),r=vp(),i=Co(),s=Object.prototype.hasOwnProperty,o=1,a=2,n=3,l=4,c=1,h=2,d=3,u=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,g=/[\x85\u2028\u2029]/,p=/[,\[\]{}]/,C=/^(?:!|!!|![0-9A-Za-z-]+!)$/,x=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function y(m){return Object.prototype.toString.call(m)}f(y,"_class");function b(m){return m===10||m===13}f(b,"isEol");function S(m){return m===9||m===32}f(S,"isWhiteSpace");function w(m){return m===9||m===32||m===10||m===13}f(w,"isWsOrEol");function L(m){return m===44||m===91||m===93||m===123||m===125}f(L,"isFlowIndicator");function A(m){if(m>=48&&m<=57)return m-48;const M=m|32;return M>=97&&M<=102?M-97+10:-1}f(A,"fromHexCode");function v(m){return m===120?2:m===117?4:m===85?8:0}f(v,"escapedHexLen");function E(m){return m>=48&&m<=57?m-48:-1}f(E,"fromDecimalCode");function D(m){switch(m){case 48:return"\0";case 97:return"\x07";case 98:return"\b";case 116:return" ";case 9:return" ";case 110:return`
|
|
281
|
+
`;case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"\x1B";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}f(D,"simpleEscapeSequence");function q(m){return m<=65535?String.fromCharCode(m):String.fromCharCode((m-65536>>10)+55296,(m-65536&1023)+56320)}f(q,"charFromCodepoint");function U(m,M,X){M==="__proto__"?Object.defineProperty(m,M,{configurable:!0,enumerable:!0,writable:!0,value:X}):m[M]=X}f(U,"setProperty");const st=new Array(256),N=new Array(256);for(let m=0;m<256;m++)st[m]=D(m)?1:0,N[m]=D(m);function H(m,M){this.input=m,this.filename=M.filename||null,this.schema=M.schema||i,this.onWarning=M.onWarning||null,this.legacy=M.legacy||!1,this.json=M.json||!1,this.listener=M.listener||null,this.maxDepth=typeof M.maxDepth=="number"?M.maxDepth:100,this.maxTotalMergeKeys=typeof M.maxTotalMergeKeys=="number"?M.maxTotalMergeKeys:1e4,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=m.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}f(H,"State");function G(m,M){const X={name:m.filename,buffer:m.input.slice(0,-1),position:m.position,line:m.line,column:m.position-m.lineStart};return X.snippet=r(X),new t(M,X)}f(G,"generateError");function F(m,M){throw G(m,M)}f(F,"throwError");function Q(m,M){m.onWarning&&m.onWarning.call(null,G(m,M))}f(Q,"throwWarning");function $(m,M,X){const K=m.anchorMapTransactions;if(K.length!==0){const j=K[K.length-1];s.call(j,M)||(j[M]={existed:s.call(m.anchorMap,M),value:m.anchorMap[M]})}m.anchorMap[M]=X}f($,"storeAnchor");function Y(m){m.anchorMapTransactions.push(Object.create(null))}f(Y,"beginAnchorTransaction");function at(m){const M=m.anchorMapTransactions.pop(),X=m.anchorMapTransactions;if(X.length===0)return;const K=X[X.length-1],j=Object.keys(M);for(let it=0,T=j.length;it<T;it+=1){const I=j[it];s.call(K,I)||(K[I]=M[I])}}f(at,"commitAnchorTransaction");function wt(m){const M=m.anchorMapTransactions.pop(),X=Object.keys(M);for(let K=X.length-1;K>=0;K-=1){const j=M[X[K]];j.existed?m.anchorMap[X[K]]=j.value:delete m.anchorMap[X[K]]}}f(wt,"rollbackAnchorTransaction");function bt(m){return{position:m.position,line:m.line,lineStart:m.lineStart,lineIndent:m.lineIndent,firstTabInLine:m.firstTabInLine,tag:m.tag,anchor:m.anchor,kind:m.kind,result:m.result}}f(bt,"snapshotState");function Lt(m,M){m.position=M.position,m.line=M.line,m.lineStart=M.lineStart,m.lineIndent=M.lineIndent,m.firstTabInLine=M.firstTabInLine,m.tag=M.tag,m.anchor=M.anchor,m.kind=M.kind,m.result=M.result}f(Lt,"restoreState");const nt={YAML:f(function(M,X,K){M.version!==null&&F(M,"duplication of %YAML directive"),K.length!==1&&F(M,"YAML directive accepts exactly one argument");const j=/^([0-9]+)\.([0-9]+)$/.exec(K[0]);j===null&&F(M,"ill-formed argument of the YAML directive");const it=parseInt(j[1],10),T=parseInt(j[2],10);it!==1&&F(M,"unacceptable YAML version of the document"),M.version=K[0],M.checkLineBreaks=T<2,T!==1&&T!==2&&Q(M,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:f(function(M,X,K){let j;K.length!==2&&F(M,"TAG directive accepts exactly two arguments");const it=K[0];j=K[1],C.test(it)||F(M,"ill-formed tag handle (first argument) of the TAG directive"),s.call(M.tagMap,it)&&F(M,'there is a previously declared suffix for "'+it+'" tag handle'),x.test(j)||F(M,"ill-formed tag prefix (second argument) of the TAG directive");try{j=decodeURIComponent(j)}catch{F(M,"tag prefix is malformed: "+j)}M.tagMap[it]=j},"handleTagDirective")};function Ct(m,M,X,K){if(M<X){const j=m.input.slice(M,X);if(K)for(let it=0,T=j.length;it<T;it+=1){const I=j.charCodeAt(it);I===9||I>=32&&I<=1114111||F(m,"expected valid JSON character")}else u.test(j)&&F(m,"the stream contains non-printable characters");m.result+=j}}f(Ct,"captureSegment");function Et(m,M,X,K){e.isObject(X)||F(m,"cannot merge mappings; the provided source object is unacceptable");const j=Object.keys(X);for(let it=0,T=j.length;it<T;it+=1){const I=j[it];m.maxTotalMergeKeys!==-1&&++m.totalMergeKeys>m.maxTotalMergeKeys&&F(m,"merge keys exceeded maxTotalMergeKeys ("+m.maxTotalMergeKeys+")"),s.call(M,I)||(U(M,I,X[I]),K[I]=!0)}}f(Et,"mergeMappings");function _t(m,M,X,K,j,it,T,I,et){if(Array.isArray(j)){j=Array.prototype.slice.call(j);for(let V=0,Z=j.length;V<Z;V+=1)Array.isArray(j[V])&&F(m,"nested arrays are not supported inside keys"),typeof j=="object"&&y(j[V])==="[object Object]"&&(j[V]="[object Object]")}if(typeof j=="object"&&y(j)==="[object Object]"&&(j="[object Object]"),j=String(j),M===null&&(M={}),K==="tag:yaml.org,2002:merge")if(Array.isArray(it))for(let V=0,Z=it.length;V<Z;V+=1)Et(m,M,it[V],X);else Et(m,M,it,X);else!m.json&&!s.call(X,j)&&s.call(M,j)&&(m.line=T||m.line,m.lineStart=I||m.lineStart,m.position=et||m.position,F(m,"duplicated mapping key")),U(M,j,it),delete X[j];return M}f(_t,"storeMappingPair");function zt(m){const M=m.input.charCodeAt(m.position);M===10?m.position++:M===13?(m.position++,m.input.charCodeAt(m.position)===10&&m.position++):F(m,"a line break is expected"),m.line+=1,m.lineStart=m.position,m.firstTabInLine=-1}f(zt,"readLineBreak");function It(m,M,X){let K=0,j=m.input.charCodeAt(m.position);for(;j!==0;){for(;S(j);)j===9&&m.firstTabInLine===-1&&(m.firstTabInLine=m.position),j=m.input.charCodeAt(++m.position);if(M&&j===35)do j=m.input.charCodeAt(++m.position);while(j!==10&&j!==13&&j!==0);if(b(j))for(zt(m),j=m.input.charCodeAt(m.position),K++,m.lineIndent=0;j===32;)m.lineIndent++,j=m.input.charCodeAt(++m.position);else break}return X!==-1&&K!==0&&m.lineIndent<X&&Q(m,"deficient indentation"),K}f(It,"skipSeparationSpace");function yt(m){let M=m.position,X=m.input.charCodeAt(M);return!!((X===45||X===46)&&X===m.input.charCodeAt(M+1)&&X===m.input.charCodeAt(M+2)&&(M+=3,X=m.input.charCodeAt(M),X===0||w(X)))}f(yt,"testDocumentSeparator");function xt(m,M){M===1?m.result+=" ":M>1&&(m.result+=e.repeat(`
|
|
282
|
+
`,M-1))}f(xt,"writeFoldedLines");function Rt(m,M,X){let K,j,it,T,I,et;const V=m.kind,Z=m.result;let rt=m.input.charCodeAt(m.position);if(w(rt)||L(rt)||rt===35||rt===38||rt===42||rt===33||rt===124||rt===62||rt===39||rt===34||rt===37||rt===64||rt===96)return!1;if(rt===63||rt===45){const J=m.input.charCodeAt(m.position+1);if(w(J)||X&&L(J))return!1}for(m.kind="scalar",m.result="",K=j=m.position,it=!1;rt!==0;){if(rt===58){const J=m.input.charCodeAt(m.position+1);if(w(J)||X&&L(J))break}else if(rt===35){const J=m.input.charCodeAt(m.position-1);if(w(J))break}else{if(m.position===m.lineStart&&yt(m)||X&&L(rt))break;if(b(rt))if(T=m.line,I=m.lineStart,et=m.lineIndent,It(m,!1,-1),m.lineIndent>=M){it=!0,rt=m.input.charCodeAt(m.position);continue}else{m.position=j,m.line=T,m.lineStart=I,m.lineIndent=et;break}}it&&(Ct(m,K,j,!1),xt(m,m.line-T),K=j=m.position,it=!1),S(rt)||(j=m.position+1),rt=m.input.charCodeAt(++m.position)}return Ct(m,K,j,!1),m.result?!0:(m.kind=V,m.result=Z,!1)}f(Rt,"readPlainScalar");function Wt(m,M){let X,K,j=m.input.charCodeAt(m.position);if(j!==39)return!1;for(m.kind="scalar",m.result="",m.position++,X=K=m.position;(j=m.input.charCodeAt(m.position))!==0;)if(j===39)if(Ct(m,X,m.position,!0),j=m.input.charCodeAt(++m.position),j===39)X=m.position,m.position++,K=m.position;else return!0;else b(j)?(Ct(m,X,K,!0),xt(m,It(m,!1,M)),X=K=m.position):m.position===m.lineStart&&yt(m)?F(m,"unexpected end of the document within a single quoted scalar"):(m.position++,S(j)||(K=m.position));F(m,"unexpected end of the stream within a single quoted scalar")}f(Wt,"readSingleQuotedScalar");function At(m,M){let X,K,j,it=m.input.charCodeAt(m.position);if(it!==34)return!1;for(m.kind="scalar",m.result="",m.position++,X=K=m.position;(it=m.input.charCodeAt(m.position))!==0;){if(it===34)return Ct(m,X,m.position,!0),m.position++,!0;if(it===92){if(Ct(m,X,m.position,!0),it=m.input.charCodeAt(++m.position),b(it))It(m,!1,M);else if(it<256&&st[it])m.result+=N[it],m.position++;else if((j=v(it))>0){let T=j,I=0;for(;T>0;T--)it=m.input.charCodeAt(++m.position),(j=A(it))>=0?I=(I<<4)+j:F(m,"expected hexadecimal character");m.result+=q(I),m.position++}else F(m,"unknown escape sequence");X=K=m.position}else b(it)?(Ct(m,X,K,!0),xt(m,It(m,!1,M)),X=K=m.position):m.position===m.lineStart&&yt(m)?F(m,"unexpected end of the document within a double quoted scalar"):(m.position++,S(it)||(K=m.position))}F(m,"unexpected end of the stream within a double quoted scalar")}f(At,"readDoubleQuotedScalar");function P(m,M){let X=!0,K,j,it;const T=m.tag;let I;const et=m.anchor;let V,Z,rt,J;const ct=Object.create(null);let ht,kt,vt,qt=m.input.charCodeAt(m.position);if(qt===91)V=93,J=!1,I=[];else if(qt===123)V=125,J=!0,I={};else return!1;for(m.anchor!==null&&$(m,m.anchor,I),qt=m.input.charCodeAt(++m.position);qt!==0;){if(It(m,!0,M),qt=m.input.charCodeAt(m.position),qt===V)return m.position++,m.tag=T,m.anchor=et,m.kind=J?"mapping":"sequence",m.result=I,!0;if(X?qt===44&&F(m,"expected the node content, but found ','"):F(m,"missed comma between flow collection entries"),kt=ht=vt=null,Z=rt=!1,qt===63){const Vt=m.input.charCodeAt(m.position+1);w(Vt)&&(Z=rt=!0,m.position++,It(m,!0,M))}K=m.line,j=m.lineStart,it=m.position,ke(m,M,o,!1,!0),kt=m.tag,ht=m.result,It(m,!0,M),qt=m.input.charCodeAt(m.position),(rt||m.line===K)&&qt===58&&(Z=!0,qt=m.input.charCodeAt(++m.position),It(m,!0,M),ke(m,M,o,!1,!0),vt=m.result),J?_t(m,I,ct,kt,ht,vt,K,j,it):Z?I.push(_t(m,null,ct,kt,ht,vt,K,j,it)):I.push(ht),It(m,!0,M),qt=m.input.charCodeAt(m.position),qt===44?(X=!0,qt=m.input.charCodeAt(++m.position)):X=!1}F(m,"unexpected end of the stream within a flow collection")}f(P,"readFlowCollection");function ut(m,M){let X,K=c,j=!1,it=!1,T=M,I=0,et=!1,V,Z=m.input.charCodeAt(m.position);if(Z===124)X=!1;else if(Z===62)X=!0;else return!1;for(m.kind="scalar",m.result="";Z!==0;)if(Z=m.input.charCodeAt(++m.position),Z===43||Z===45)c===K?K=Z===43?d:h:F(m,"repeat of a chomping mode identifier");else if((V=E(Z))>=0)V===0?F(m,"bad explicit indentation width of a block scalar; it cannot be less than one"):it?F(m,"repeat of an indentation width identifier"):(T=M+V-1,it=!0);else break;if(S(Z)){do Z=m.input.charCodeAt(++m.position);while(S(Z));if(Z===35)do Z=m.input.charCodeAt(++m.position);while(!b(Z)&&Z!==0)}for(;Z!==0;){for(zt(m),m.lineIndent=0,Z=m.input.charCodeAt(m.position);(!it||m.lineIndent<T)&&Z===32;)m.lineIndent++,Z=m.input.charCodeAt(++m.position);if(!it&&m.lineIndent>T&&(T=m.lineIndent),b(Z)){I++;continue}if(!it&&T===0&&F(m,"missing indentation for block scalar"),m.lineIndent<T){K===d?m.result+=e.repeat(`
|
|
283
|
+
`,j?1+I:I):K===c&&j&&(m.result+=`
|
|
284
|
+
`);break}X?S(Z)?(et=!0,m.result+=e.repeat(`
|
|
285
|
+
`,j?1+I:I)):et?(et=!1,m.result+=e.repeat(`
|
|
286
|
+
`,I+1)):I===0?j&&(m.result+=" "):m.result+=e.repeat(`
|
|
287
|
+
`,I):m.result+=e.repeat(`
|
|
288
|
+
`,j?1+I:I),j=!0,it=!0,I=0;const rt=m.position;for(;!b(Z)&&Z!==0;)Z=m.input.charCodeAt(++m.position);Ct(m,rt,m.position,!1)}return!0}f(ut,"readBlockScalar");function xe(m,M){const X=m.tag,K=m.anchor,j=[];let it=!1;if(m.firstTabInLine!==-1)return!1;m.anchor!==null&&$(m,m.anchor,j);let T=m.input.charCodeAt(m.position);for(;T!==0&&(m.firstTabInLine!==-1&&(m.position=m.firstTabInLine,F(m,"tab characters must not be used in indentation")),T===45);){const I=m.input.charCodeAt(m.position+1);if(!w(I))break;if(it=!0,m.position++,It(m,!0,-1)&&m.lineIndent<=M){j.push(null),T=m.input.charCodeAt(m.position);continue}const et=m.line;if(ke(m,M,n,!1,!0),j.push(m.result),It(m,!0,-1),T=m.input.charCodeAt(m.position),(m.line===et||m.lineIndent>M)&&T!==0)F(m,"bad indentation of a sequence entry");else if(m.lineIndent<M)break}return it?(m.tag=X,m.anchor=K,m.kind="sequence",m.result=j,!0):!1}f(xe,"readBlockSequence");function re(m,M,X){let K,j,it,T;const I=m.tag,et=m.anchor,V={},Z=Object.create(null);let rt=null,J=null,ct=null,ht=!1,kt=!1;if(m.firstTabInLine!==-1)return!1;m.anchor!==null&&$(m,m.anchor,V);let vt=m.input.charCodeAt(m.position);for(;vt!==0;){!ht&&m.firstTabInLine!==-1&&(m.position=m.firstTabInLine,F(m,"tab characters must not be used in indentation"));const qt=m.input.charCodeAt(m.position+1),Vt=m.line;if((vt===63||vt===58)&&w(qt))vt===63?(ht&&(_t(m,V,Z,rt,J,null,j,it,T),rt=J=ct=null),kt=!0,ht=!0,K=!0):ht?(ht=!1,K=!0):F(m,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),m.position+=1,vt=qt;else{if(j=m.line,it=m.lineStart,T=m.position,!ke(m,X,a,!1,!0))break;if(m.line===Vt){for(vt=m.input.charCodeAt(m.position);S(vt);)vt=m.input.charCodeAt(++m.position);if(vt===58)vt=m.input.charCodeAt(++m.position),w(vt)||F(m,"a whitespace character is expected after the key-value separator within a block mapping"),ht&&(_t(m,V,Z,rt,J,null,j,it,T),rt=J=ct=null),kt=!0,ht=!1,K=!1,rt=m.tag,J=m.result;else if(kt)F(m,"can not read an implicit mapping pair; a colon is missed");else return m.tag=I,m.anchor=et,!0}else if(kt)F(m,"can not read a block mapping entry; a multiline key may not be an implicit key");else return m.tag=I,m.anchor=et,!0}if((m.line===Vt||m.lineIndent>M)&&(ht&&(j=m.line,it=m.lineStart,T=m.position),ke(m,M,l,!0,K)&&(ht?J=m.result:ct=m.result),ht||(_t(m,V,Z,rt,J,ct,j,it,T),rt=J=ct=null),It(m,!0,-1),vt=m.input.charCodeAt(m.position)),(m.line===Vt||m.lineIndent>M)&&vt!==0)F(m,"bad indentation of a mapping entry");else if(m.lineIndent<M)break}return ht&&_t(m,V,Z,rt,J,null,j,it,T),kt&&(m.tag=I,m.anchor=et,m.kind="mapping",m.result=V),kt}f(re,"readBlockMapping");function He(m){let M=!1,X=!1,K,j,it=m.input.charCodeAt(m.position);if(it!==33)return!1;m.tag!==null&&F(m,"duplication of a tag property"),it=m.input.charCodeAt(++m.position),it===60?(M=!0,it=m.input.charCodeAt(++m.position)):it===33?(X=!0,K="!!",it=m.input.charCodeAt(++m.position)):K="!";let T=m.position;if(M){do it=m.input.charCodeAt(++m.position);while(it!==0&&it!==62);m.position<m.length?(j=m.input.slice(T,m.position),it=m.input.charCodeAt(++m.position)):F(m,"unexpected end of the stream within a verbatim tag")}else{for(;it!==0&&!w(it);)it===33&&(X?F(m,"tag suffix cannot contain exclamation marks"):(K=m.input.slice(T-1,m.position+1),C.test(K)||F(m,"named tag handle cannot contain such characters"),X=!0,T=m.position+1)),it=m.input.charCodeAt(++m.position);j=m.input.slice(T,m.position),p.test(j)&&F(m,"tag suffix cannot contain flow indicator characters")}j&&!x.test(j)&&F(m,"tag name cannot contain such characters: "+j);try{j=decodeURIComponent(j)}catch{F(m,"tag name is malformed: "+j)}return M?m.tag=j:s.call(m.tagMap,K)?m.tag=m.tagMap[K]+j:K==="!"?m.tag="!"+j:K==="!!"?m.tag="tag:yaml.org,2002:"+j:F(m,'undeclared tag handle "'+K+'"'),!0}f(He,"readTagProperty");function lr(m){let M=m.input.charCodeAt(m.position);if(M!==38)return!1;m.anchor!==null&&F(m,"duplication of an anchor property"),M=m.input.charCodeAt(++m.position);const X=m.position;for(;M!==0&&!w(M)&&!L(M);)M=m.input.charCodeAt(++m.position);return m.position===X&&F(m,"name of an anchor node must contain at least one character"),m.anchor=m.input.slice(X,m.position),!0}f(lr,"readAnchorProperty");function be(m){let M=m.input.charCodeAt(m.position);if(M!==42)return!1;M=m.input.charCodeAt(++m.position);const X=m.position;for(;M!==0&&!w(M)&&!L(M);)M=m.input.charCodeAt(++m.position);m.position===X&&F(m,"name of an alias node must contain at least one character");const K=m.input.slice(X,m.position);return s.call(m.anchorMap,K)||F(m,'unidentified alias "'+K+'"'),m.result=m.anchorMap[K],It(m,!0,-1),!0}f(be,"readAlias");function mr(m,M,X,K){const j=bt(m);return Y(m),Lt(m,M),m.tag=null,m.anchor=null,m.kind=null,m.result=null,re(m,X,K)&&m.kind==="mapping"?(at(m),!0):(wt(m),Lt(m,j),!1)}f(mr,"tryReadBlockMappingFromProperty");function ke(m,M,X,K,j){let it,T,I=1,et=!1,V=!1,Z=null,rt,J,ct;m.depth>=m.maxDepth&&F(m,"nesting exceeded maxDepth ("+m.maxDepth+")"),m.depth+=1,m.listener!==null&&m.listener("open",m),m.tag=null,m.anchor=null,m.kind=null,m.result=null;const ht=it=T=l===X||n===X;if(K&&It(m,!0,-1)&&(et=!0,m.lineIndent>M?I=1:m.lineIndent===M?I=0:m.lineIndent<M&&(I=-1)),I===1)for(;;){const kt=m.input.charCodeAt(m.position),vt=bt(m);if(et&&(kt===33&&m.tag!==null||kt===38&&m.anchor!==null)||!He(m)&&!lr(m))break;Z===null&&(Z=vt),It(m,!0,-1)?(et=!0,T=ht,m.lineIndent>M?I=1:m.lineIndent===M?I=0:m.lineIndent<M&&(I=-1)):T=!1}if(T&&(T=et||j),I===1||l===X)if(o===X||a===X?J=M:J=M+1,ct=m.position-m.lineStart,I===1)if(T&&(xe(m,ct)||re(m,ct,J))||P(m,J))V=!0;else{const kt=m.input.charCodeAt(m.position);Z!==null&&ht&&!T&&kt!==124&&kt!==62&&mr(m,Z,Z.position-Z.lineStart,J)||it&&ut(m,J)||Wt(m,J)||At(m,J)?V=!0:be(m)?(V=!0,(m.tag!==null||m.anchor!==null)&&F(m,"alias node should not have any properties")):Rt(m,J,o===X)&&(V=!0,m.tag===null&&(m.tag="?")),m.anchor!==null&&$(m,m.anchor,m.result)}else I===0&&(V=T&&xe(m,ct));if(m.tag===null)m.anchor!==null&&$(m,m.anchor,m.result);else if(m.tag==="?"){m.result!==null&&m.kind!=="scalar"&&F(m,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+m.kind+'"');for(let kt=0,vt=m.implicitTypes.length;kt<vt;kt+=1)if(rt=m.implicitTypes[kt],rt.resolve(m.result)){m.result=rt.construct(m.result),m.tag=rt.tag,m.anchor!==null&&$(m,m.anchor,m.result);break}}else if(m.tag!=="!"){if(s.call(m.typeMap[m.kind||"fallback"],m.tag))rt=m.typeMap[m.kind||"fallback"][m.tag];else{rt=null;const kt=m.typeMap.multi[m.kind||"fallback"];for(let vt=0,qt=kt.length;vt<qt;vt+=1)if(m.tag.slice(0,kt[vt].tag.length)===kt[vt].tag){rt=kt[vt];break}}rt||F(m,"unknown tag !<"+m.tag+">"),m.result!==null&&rt.kind!==m.kind&&F(m,"unacceptable node kind for !<"+m.tag+'> tag; it should be "'+rt.kind+'", not "'+m.kind+'"'),rt.resolve(m.result,m.tag)?(m.result=rt.construct(m.result,m.tag),m.anchor!==null&&$(m,m.anchor,m.result)):F(m,"cannot resolve a node with !<"+m.tag+"> explicit tag")}return m.listener!==null&&m.listener("close",m),m.depth-=1,m.tag!==null||m.anchor!==null||V}f(ke,"composeNode");function yr(m){const M=m.position;let X=!1,K;for(m.version=null,m.checkLineBreaks=m.legacy,m.tagMap=Object.create(null),m.anchorMap=Object.create(null);(K=m.input.charCodeAt(m.position))!==0&&(It(m,!0,-1),K=m.input.charCodeAt(m.position),!(m.lineIndent>0||K!==37));){X=!0,K=m.input.charCodeAt(++m.position);let j=m.position;for(;K!==0&&!w(K);)K=m.input.charCodeAt(++m.position);const it=m.input.slice(j,m.position),T=[];for(it.length<1&&F(m,"directive name must not be less than one character in length");K!==0;){for(;S(K);)K=m.input.charCodeAt(++m.position);if(K===35){do K=m.input.charCodeAt(++m.position);while(K!==0&&!b(K));break}if(b(K))break;for(j=m.position;K!==0&&!w(K);)K=m.input.charCodeAt(++m.position);T.push(m.input.slice(j,m.position))}K!==0&&zt(m),s.call(nt,it)?nt[it](m,it,T):Q(m,'unknown document directive "'+it+'"')}if(It(m,!0,-1),m.lineIndent===0&&m.input.charCodeAt(m.position)===45&&m.input.charCodeAt(m.position+1)===45&&m.input.charCodeAt(m.position+2)===45?(m.position+=3,It(m,!0,-1)):X&&F(m,"directives end mark is expected"),ke(m,m.lineIndent-1,l,!1,!0),It(m,!0,-1),m.checkLineBreaks&&g.test(m.input.slice(M,m.position))&&Q(m,"non-ASCII line breaks are interpreted as content"),m.documents.push(m.result),m.position===m.lineStart&&yt(m)){m.input.charCodeAt(m.position)===46&&(m.position+=3,It(m,!0,-1));return}m.position<m.length-1&&F(m,"end of the stream or a document separator is expected")}f(yr,"readDocument");function hr(m,M){m=String(m),M=M||{},m.length!==0&&(m.charCodeAt(m.length-1)!==10&&m.charCodeAt(m.length-1)!==13&&(m+=`
|
|
289
|
+
`),m.charCodeAt(0)===65279&&(m=m.slice(1)));const X=new H(m,M),K=m.indexOf("\0");for(K!==-1&&(X.position=K,F(X,"null byte is not allowed in input")),X.input+="\0";X.input.charCodeAt(X.position)===32;)X.lineIndent+=1,X.position+=1;for(;X.position<X.length-1;)yr(X);return X.documents}f(hr,"loadDocuments");function Se(m,M,X){M!==null&&typeof M=="object"&&typeof X>"u"&&(X=M,M=null);const K=hr(m,X);if(typeof M!="function")return K;for(let j=0,it=K.length;j<it;j+=1)M(K[j])}f(Se,"loadAll2");function Me(m,M){const X=hr(m,M);if(X.length!==0){if(X.length===1)return X[0];throw new t("expected a single document in the stream, but found more")}}return f(Me,"load2"),Ms.loadAll=Se,Ms.load=Me,Ms}f(Ap,"requireLoader");var ya={},xc;function Ep(){if(xc)return ya;xc=1;const e=_i(),t=Fi(),r=Co(),i=Object.prototype.toString,s=Object.prototype.hasOwnProperty,o=65279,a=9,n=10,l=13,c=32,h=33,d=34,u=35,g=37,p=38,C=39,x=42,y=44,b=45,S=58,w=61,L=62,A=63,v=64,E=91,D=93,q=96,U=123,st=124,N=125,H={};H[0]="\\0",H[7]="\\a",H[8]="\\b",H[9]="\\t",H[10]="\\n",H[11]="\\v",H[12]="\\f",H[13]="\\r",H[27]="\\e",H[34]='\\"',H[92]="\\\\",H[133]="\\N",H[160]="\\_",H[8232]="\\L",H[8233]="\\P";const G=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],F=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function Q(T,I){if(I===null)return{};const et={},V=Object.keys(I);for(let Z=0,rt=V.length;Z<rt;Z+=1){let J=V[Z],ct=String(I[J]);J.slice(0,2)==="!!"&&(J="tag:yaml.org,2002:"+J.slice(2));const ht=T.compiledTypeMap.fallback[J];ht&&s.call(ht.styleAliases,ct)&&(ct=ht.styleAliases[ct]),et[J]=ct}return et}f(Q,"compileStyleMap");function $(T){let I,et;const V=T.toString(16).toUpperCase();if(T<=255)I="x",et=2;else if(T<=65535)I="u",et=4;else if(T<=4294967295)I="U",et=8;else throw new t("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+I+e.repeat("0",et-V.length)+V}f($,"encodeHex");const Y=1,at=2;function wt(T){this.schema=T.schema||r,this.indent=Math.max(1,T.indent||2),this.noArrayIndent=T.noArrayIndent||!1,this.skipInvalid=T.skipInvalid||!1,this.flowLevel=e.isNothing(T.flowLevel)?-1:T.flowLevel,this.styleMap=Q(this.schema,T.styles||null),this.sortKeys=T.sortKeys||!1,this.lineWidth=T.lineWidth||80,this.noRefs=T.noRefs||!1,this.noCompatMode=T.noCompatMode||!1,this.condenseFlow=T.condenseFlow||!1,this.quotingType=T.quotingType==='"'?at:Y,this.forceQuotes=T.forceQuotes||!1,this.replacer=typeof T.replacer=="function"?T.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}f(wt,"State");function bt(T,I){const et=e.repeat(" ",I);let V=0,Z="";const rt=T.length;for(;V<rt;){let J;const ct=T.indexOf(`
|
|
290
|
+
`,V);ct===-1?(J=T.slice(V),V=rt):(J=T.slice(V,ct+1),V=ct+1),J.length&&J!==`
|
|
291
|
+
`&&(Z+=et),Z+=J}return Z}f(bt,"indentString");function Lt(T,I){return`
|
|
292
|
+
`+e.repeat(" ",T.indent*I)}f(Lt,"generateNextLine");function nt(T,I){for(let et=0,V=T.implicitTypes.length;et<V;et+=1)if(T.implicitTypes[et].resolve(I))return!0;return!1}f(nt,"testImplicitResolving");function Ct(T){return T===c||T===a}f(Ct,"isWhitespace");function Et(T){return T>=32&&T<=126||T>=161&&T<=55295&&T!==8232&&T!==8233||T>=57344&&T<=65533&&T!==o||T>=65536&&T<=1114111}f(Et,"isPrintable");function _t(T){return Et(T)&&T!==o&&T!==l&&T!==n}f(_t,"isNsCharOrWhitespace");function zt(T,I,et){const V=_t(T),Z=V&&!Ct(T);return(et?V:V&&T!==y&&T!==E&&T!==D&&T!==U&&T!==N)&&T!==u&&!(I===S&&!Z)||_t(I)&&!Ct(I)&&T===u||I===S&&Z}f(zt,"isPlainSafe");function It(T){return Et(T)&&T!==o&&!Ct(T)&&T!==b&&T!==A&&T!==S&&T!==y&&T!==E&&T!==D&&T!==U&&T!==N&&T!==u&&T!==p&&T!==x&&T!==h&&T!==st&&T!==w&&T!==L&&T!==C&&T!==d&&T!==g&&T!==v&&T!==q}f(It,"isPlainSafeFirst");function yt(T){return!Ct(T)&&T!==S}f(yt,"isPlainSafeLast");function xt(T,I){const et=T.charCodeAt(I);let V;return et>=55296&&et<=56319&&I+1<T.length&&(V=T.charCodeAt(I+1),V>=56320&&V<=57343)?(et-55296)*1024+V-56320+65536:et}f(xt,"codePointAt");function Rt(T){return/^\n* /.test(T)}f(Rt,"needIndentIndicator");const Wt=1,At=2,P=3,ut=4,xe=5;function re(T,I,et,V,Z,rt,J,ct){let ht,kt=0,vt=null,qt=!1,Vt=!1;const Mi=V!==-1;let Ke=-1,Ze=It(xt(T,0))&&yt(xt(T,T.length-1));if(I||J)for(ht=0;ht<T.length;kt>=65536?ht+=2:ht++){if(kt=xt(T,ht),!Et(kt))return xe;Ze=Ze&&zt(kt,vt,ct),vt=kt}else{for(ht=0;ht<T.length;kt>=65536?ht+=2:ht++){if(kt=xt(T,ht),kt===n)qt=!0,Mi&&(Vt=Vt||ht-Ke-1>V&&T[Ke+1]!==" ",Ke=ht);else if(!Et(kt))return xe;Ze=Ze&&zt(kt,vt,ct),vt=kt}Vt=Vt||Mi&&ht-Ke-1>V&&T[Ke+1]!==" "}return!qt&&!Vt?Ze&&!J&&!Z(T)?Wt:rt===at?xe:At:et>9&&Rt(T)?xe:J?rt===at?xe:At:Vt?ut:P}f(re,"chooseScalarStyle");function He(T,I,et,V,Z){T.dump=(function(){if(I.length===0)return T.quotingType===at?'""':"''";if(!T.noCompatMode&&(G.indexOf(I)!==-1||F.test(I)))return T.quotingType===at?'"'+I+'"':"'"+I+"'";const rt=T.indent*Math.max(1,et),J=T.lineWidth===-1?-1:Math.max(Math.min(T.lineWidth,40),T.lineWidth-rt),ct=V||T.flowLevel>-1&&et>=T.flowLevel;function ht(kt){return nt(T,kt)}switch(f(ht,"testAmbiguity"),re(I,ct,T.indent,J,ht,T.quotingType,T.forceQuotes&&!V,Z)){case Wt:return I;case At:return"'"+I.replace(/'/g,"''")+"'";case P:return"|"+lr(I,T.indent)+be(bt(I,rt));case ut:return">"+lr(I,T.indent)+be(bt(mr(I,J),rt));case xe:return'"'+yr(I)+'"';default:throw new t("impossible error: invalid scalar style")}})()}f(He,"writeScalar");function lr(T,I){const et=Rt(T)?String(I):"",V=T[T.length-1]===`
|
|
293
|
+
`,rt=V&&(T[T.length-2]===`
|
|
294
|
+
`||T===`
|
|
295
|
+
`)?"+":V?"":"-";return et+rt+`
|
|
296
|
+
`}f(lr,"blockHeader");function be(T){return T[T.length-1]===`
|
|
297
|
+
`?T.slice(0,-1):T}f(be,"dropEndingNewline");function mr(T,I){const et=/(\n+)([^\n]*)/g;let V=(function(){let ct=T.indexOf(`
|
|
298
|
+
`);return ct=ct!==-1?ct:T.length,et.lastIndex=ct,ke(T.slice(0,ct),I)})(),Z=T[0]===`
|
|
299
|
+
`||T[0]===" ",rt,J;for(;J=et.exec(T);){const ct=J[1],ht=J[2];rt=ht[0]===" ",V+=ct+(!Z&&!rt&&ht!==""?`
|
|
300
|
+
`:"")+ke(ht,I),Z=rt}return V}f(mr,"foldString");function ke(T,I){if(T===""||T[0]===" ")return T;const et=/ [^ ]/g;let V,Z=0,rt,J=0,ct=0,ht="";for(;V=et.exec(T);)ct=V.index,ct-Z>I&&(rt=J>Z?J:ct,ht+=`
|
|
301
|
+
`+T.slice(Z,rt),Z=rt+1),J=ct;return ht+=`
|
|
302
|
+
`,T.length-Z>I&&J>Z?ht+=T.slice(Z,J)+`
|
|
303
|
+
`+T.slice(J+1):ht+=T.slice(Z),ht.slice(1)}f(ke,"foldLine");function yr(T){let I="",et=0;for(let V=0;V<T.length;et>=65536?V+=2:V++){et=xt(T,V);const Z=H[et];!Z&&Et(et)?(I+=T[V],et>=65536&&(I+=T[V+1])):I+=Z||$(et)}return I}f(yr,"escapeString");function hr(T,I,et){let V="";const Z=T.tag;for(let rt=0,J=et.length;rt<J;rt+=1){let ct=et[rt];T.replacer&&(ct=T.replacer.call(et,String(rt),ct)),(X(T,I,ct,!1,!1)||typeof ct>"u"&&X(T,I,null,!1,!1))&&(V!==""&&(V+=","+(T.condenseFlow?"":" ")),V+=T.dump)}T.tag=Z,T.dump="["+V+"]"}f(hr,"writeFlowSequence");function Se(T,I,et,V){let Z="";const rt=T.tag;for(let J=0,ct=et.length;J<ct;J+=1){let ht=et[J];T.replacer&&(ht=T.replacer.call(et,String(J),ht)),(X(T,I+1,ht,!0,!0,!1,!0)||typeof ht>"u"&&X(T,I+1,null,!0,!0,!1,!0))&&((!V||Z!=="")&&(Z+=Lt(T,I)),T.dump&&n===T.dump.charCodeAt(0)?Z+="-":Z+="- ",Z+=T.dump)}T.tag=rt,T.dump=Z||"[]"}f(Se,"writeBlockSequence");function Me(T,I,et){let V="";const Z=T.tag,rt=Object.keys(et);for(let J=0,ct=rt.length;J<ct;J+=1){let ht="";V!==""&&(ht+=", "),T.condenseFlow&&(ht+='"');const kt=rt[J];let vt=et[kt];T.replacer&&(vt=T.replacer.call(et,kt,vt)),X(T,I,kt,!1,!1)&&(T.dump.length>1024&&(ht+="? "),ht+=T.dump+(T.condenseFlow?'"':"")+":"+(T.condenseFlow?"":" "),X(T,I,vt,!1,!1)&&(ht+=T.dump,V+=ht))}T.tag=Z,T.dump="{"+V+"}"}f(Me,"writeFlowMapping");function m(T,I,et,V){let Z="";const rt=T.tag,J=Object.keys(et);if(T.sortKeys===!0)J.sort();else if(typeof T.sortKeys=="function")J.sort(T.sortKeys);else if(T.sortKeys)throw new t("sortKeys must be a boolean or a function");for(let ct=0,ht=J.length;ct<ht;ct+=1){let kt="";(!V||Z!=="")&&(kt+=Lt(T,I));const vt=J[ct];let qt=et[vt];if(T.replacer&&(qt=T.replacer.call(et,vt,qt)),!X(T,I+1,vt,!0,!0,!0))continue;const Vt=T.tag!==null&&T.tag!=="?"||T.dump&&T.dump.length>1024;Vt&&(T.dump&&n===T.dump.charCodeAt(0)?kt+="?":kt+="? "),kt+=T.dump,Vt&&(kt+=Lt(T,I)),X(T,I+1,qt,!0,Vt)&&(T.dump&&n===T.dump.charCodeAt(0)?kt+=":":kt+=": ",kt+=T.dump,Z+=kt)}T.tag=rt,T.dump=Z||"{}"}f(m,"writeBlockMapping");function M(T,I,et){const V=et?T.explicitTypes:T.implicitTypes;for(let Z=0,rt=V.length;Z<rt;Z+=1){const J=V[Z];if((J.instanceOf||J.predicate)&&(!J.instanceOf||typeof I=="object"&&I instanceof J.instanceOf)&&(!J.predicate||J.predicate(I))){if(et?J.multi&&J.representName?T.tag=J.representName(I):T.tag=J.tag:T.tag="?",J.represent){const ct=T.styleMap[J.tag]||J.defaultStyle;let ht;if(i.call(J.represent)==="[object Function]")ht=J.represent(I,ct);else if(s.call(J.represent,ct))ht=J.represent[ct](I,ct);else throw new t("!<"+J.tag+'> tag resolver accepts not "'+ct+'" style');T.dump=ht}return!0}}return!1}f(M,"detectType");function X(T,I,et,V,Z,rt,J){T.tag=null,T.dump=et,M(T,et,!1)||M(T,et,!0);const ct=i.call(T.dump),ht=V;V&&(V=T.flowLevel<0||T.flowLevel>I);const kt=ct==="[object Object]"||ct==="[object Array]";let vt,qt;if(kt&&(vt=T.duplicates.indexOf(et),qt=vt!==-1),(T.tag!==null&&T.tag!=="?"||qt||T.indent!==2&&I>0)&&(Z=!1),qt&&T.usedDuplicates[vt])T.dump="*ref_"+vt;else{if(kt&&qt&&!T.usedDuplicates[vt]&&(T.usedDuplicates[vt]=!0),ct==="[object Object]")V&&Object.keys(T.dump).length!==0?(m(T,I,T.dump,Z),qt&&(T.dump="&ref_"+vt+T.dump)):(Me(T,I,T.dump),qt&&(T.dump="&ref_"+vt+" "+T.dump));else if(ct==="[object Array]")V&&T.dump.length!==0?(T.noArrayIndent&&!J&&I>0?Se(T,I-1,T.dump,Z):Se(T,I,T.dump,Z),qt&&(T.dump="&ref_"+vt+T.dump)):(hr(T,I,T.dump),qt&&(T.dump="&ref_"+vt+" "+T.dump));else if(ct==="[object String]")T.tag!=="?"&&He(T,T.dump,I,rt,ht);else{if(ct==="[object Undefined]")return!1;if(T.skipInvalid)return!1;throw new t("unacceptable kind of an object to dump "+ct)}if(T.tag!==null&&T.tag!=="?"){let Vt=encodeURI(T.tag[0]==="!"?T.tag.slice(1):T.tag).replace(/!/g,"%21");T.tag[0]==="!"?Vt="!"+Vt:Vt.slice(0,18)==="tag:yaml.org,2002:"?Vt="!!"+Vt.slice(18):Vt="!<"+Vt+">",T.dump=Vt+" "+T.dump}}return!0}f(X,"writeNode");function K(T,I){const et=[],V=[];j(T,et,V);const Z=V.length;for(let rt=0;rt<Z;rt+=1)I.duplicates.push(et[V[rt]]);I.usedDuplicates=new Array(Z)}f(K,"getDuplicateReferences");function j(T,I,et){if(T!==null&&typeof T=="object"){const V=I.indexOf(T);if(V!==-1)et.indexOf(V)===-1&&et.push(V);else if(I.push(T),Array.isArray(T))for(let Z=0,rt=T.length;Z<rt;Z+=1)j(T[Z],I,et);else{const Z=Object.keys(T);for(let rt=0,J=Z.length;rt<J;rt+=1)j(T[Z[rt]],I,et)}}}f(j,"inspectNode");function it(T,I){I=I||{};const et=new wt(I);et.noRefs||K(T,et);let V=T;return et.replacer&&(V=et.replacer.call({"":V},"",V)),X(et,0,V,!0,!0)?et.dump+`
|
|
304
|
+
`:""}return f(it,"dump2"),ya.dump=it,ya}f(Ep,"requireDumper");var bc;function _p(){if(bc)return ge;bc=1;const e=Ap(),t=Ep();function r(i,s){return function(){throw new Error("Function yaml."+i+" is removed in js-yaml 4. Use yaml."+s+" instead, which is now safe by default.")}}return f(r,"renamed"),ge.Type=Ce(),ge.Schema=zn(),ge.FAILSAFE_SCHEMA=Un(),ge.JSON_SCHEMA=Zn(),ge.CORE_SCHEMA=Qn(),ge.DEFAULT_SCHEMA=Co(),ge.load=e.load,ge.loadAll=e.loadAll,ge.dump=t.dump,ge.YAMLException=Fi(),ge.types={binary:el(),float:Kn(),map:jn(),null:Xn(),pairs:il(),set:sl(),timestamp:Jn(),bool:Gn(),int:Vn(),merge:tl(),omap:rl(),seq:Yn(),str:Hn()},ge.safeLoad=r("safeLoad","load"),ge.safeLoadAll=r("safeLoadAll","loadAll"),ge.safeDump=r("safeDump","dump"),ge}f(_p,"requireJsYaml");var d1=_p(),u1=Lp(d1),{Type:hB,Schema:cB,FAILSAFE_SCHEMA:dB,JSON_SCHEMA:g1,CORE_SCHEMA:uB,DEFAULT_SCHEMA:gB,load:p1,loadAll:pB,dump:fB,YAMLException:mB,types:yB,safeLoad:CB,safeLoadAll:xB,safeDump:bB}=u1,f1={common:hs,getConfig:Jt,insertCluster:Jg,insertEdge:rp,insertEdgeLabel:Wn,insertMarkers:op,insertNode:Nn,interpolateToCurve:yn,labelHelper:St,log:R,positionEdgeLabel:Ak},ss={},Fp=f(e=>{for(const t of e)ss[t.name]=t},"registerLayoutLoaders"),m1=f(()=>{Fp([{name:"dagre",loader:f(async()=>await Pt(()=>import("./dagre-3AP2YEHR-v8EtxNwx.js"),__vite__mapDeps([7,8,6,1,2,9,10,3,4,5])),"loader")},{name:"swimlane",loader:f(async()=>await Pt(()=>import("./swimlanes-XN3QIQJK-D6c81JTS.js"),__vite__mapDeps([11,1,2,3,4,5,6])),"loader")},{name:"cose-bilkent",loader:f(async()=>await Pt(()=>import("./cose-bilkent-JH36ORCC-C4ZX1Xvi.js"),__vite__mapDeps([12,13,14,1,2,3,4,5,6])),"loader")}])},"registerDefaultLayoutLoaders");m1();var kB=f(async(e,t)=>{if(!(e.layoutAlgorithm in ss))throw new Error(`Unknown layout algorithm: ${e.layoutAlgorithm}`);if(e.diagramId)for(const h of e.nodes){const d=h.domId||h.id;h.domId=`${e.diagramId}-${d}`}const r=ss[e.layoutAlgorithm],i=await r.loader(),{theme:s,themeVariables:o}=e.config,{useGradient:a,gradientStart:n,gradientStop:l}=o,c=t.attr("id");if(t.append("defs").append("filter").attr("id",`${c}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),t.append("defs").append("filter").attr("id",`${c}-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",`${s!=null&&s.includes("dark")?"#FFFFFF":"#000000"}`),a){const h=t.append("linearGradient").attr("id",t.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");h.append("svg:stop").attr("offset","0%").attr("stop-color",n).attr("stop-opacity",1),h.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(e,t,f1,{algorithm:r.algorithm})},"render"),SB=f((e="",{fallback:t="dagre"}={})=>{if(e in ss)return e;if(t in ss)return R.warn(`Layout algorithm ${e} is not registered. Using ${t} as fallback.`),t;throw new Error(`Both layout algorithms ${e} and ${t} are not registered.`)},"getRegisteredLayoutAlgorithm"),Mp="c4",y1=f(e=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(e),"detector"),C1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./c4Diagram-UCG6FXSJ-Dh883fAO.js");return{diagram:t}},__vite__mapDeps([15,16,1,2,3,4,5,6]));return{id:Mp,diagram:e}},"loader"),x1={id:Mp,detector:y1,loader:C1},b1=x1,Op="flowchart",k1=f((e,t)=>{var r,i;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"||((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"?!1:/^\s*graph/.test(e)},"detector"),S1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-CCBuG42p.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([17,18,19,1,2,20,16,21]));return{id:Op,diagram:e}},"loader"),T1={id:Op,detector:k1,loader:S1},w1=T1,Ip="flowchart-v2",B1=f((e,t)=>{var r,i,s;return((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="dagre-d3"?!1:(((i=t==null?void 0:t.flowchart)==null?void 0:i.defaultRenderer)==="elk"&&(t.layout="elk"),/^\s*graph/.test(e)&&((s=t==null?void 0:t.flowchart)==null?void 0:s.defaultRenderer)==="dagre-wrapper"?!0:/^\s*flowchart/.test(e))},"detector"),L1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-CCBuG42p.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([17,18,19,1,2,20,16,21]));return{id:Ip,diagram:e}},"loader"),v1={id:Ip,detector:B1,loader:L1},A1=v1,Dp="swimlane",E1=f(e=>/^\s*swimlane-beta\b/.test(e),"detector"),_1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./swimlanesDiagram-VK2B7HYN-SMIGSMWR.js");return{diagram:t}},__vite__mapDeps([22,17,18,19,1,2,20,16,21,3,4,5,6]));return{id:Dp,diagram:e}},"loader"),F1={id:Dp,detector:E1,loader:_1},M1=F1,Rp="er",O1=f(e=>/^\s*erDiagram/.test(e),"detector"),I1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./erDiagram-SSCWMZ5O-BfDW8Lxf.js");return{diagram:t}},__vite__mapDeps([23,19,1,2,20,21,3,4,5,6]));return{id:Rp,diagram:e}},"loader"),D1={id:Rp,detector:O1,loader:I1},R1=D1,Pp="gitGraph",P1=f(e=>/^\s*gitGraph/.test(e),"detector"),$1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./gitGraphDiagram-WWUBYQGX-Ge5QWjv2.js");return{diagram:t}},__vite__mapDeps([24,25,26,27,1,2,3,4,5,6]));return{id:Pp,diagram:e}},"loader"),q1={id:Pp,detector:P1,loader:$1},N1=q1,$p="gantt",W1=f(e=>/^\s*gantt/.test(e),"detector"),z1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ganttDiagram-EL5Y4UJY-B8CXkutd.js");return{diagram:t}},__vite__mapDeps([28,1,2,29,30,31,32,3,4,5,6]));return{id:$p,diagram:e}},"loader"),H1={id:$p,detector:W1,loader:z1},Y1=H1,qp="info",j1=f(e=>/^\s*info/.test(e),"detector"),U1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./infoDiagram-RXCK75RN-CNm06Rxs.js");return{diagram:t}},__vite__mapDeps([33,27,1,2,3,4,5,6]));return{id:qp,diagram:e}},"loader"),X1={id:qp,detector:j1,loader:U1},Np="pie",G1=f(e=>/^\s*pie/.test(e),"detector"),V1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./pieDiagram-E7YTZNPT-VybkpWmu.js");return{diagram:t}},__vite__mapDeps([34,26,27,1,2,35,5,36,31,37,4,3,6]));return{id:Np,diagram:e}},"loader"),K1={id:Np,detector:G1,loader:V1},Wp="quadrantChart",Z1=f(e=>/^\s*quadrantChart/.test(e),"detector"),Q1=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./quadrantDiagram-AXDQQJYC-RAG8nSkZ.js");return{diagram:t}},__vite__mapDeps([38,1,2,30,31,32,3,4,5,6]));return{id:Wp,diagram:e}},"loader"),J1={id:Wp,detector:Z1,loader:Q1},tS=J1,zp="xychart",eS=f(e=>/^\s*xychart(-beta)?/.test(e),"detector"),rS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./xychartDiagram-S5SC5T6Z-DaSdOJbv.js");return{diagram:t}},__vite__mapDeps([39,1,2,40,31,36,30,32,3,4,5,6]));return{id:zp,diagram:e}},"loader"),iS={id:zp,detector:eS,loader:rS},sS=iS,Hp="requirement",oS=f(e=>/^\s*requirement(Diagram)?/.test(e),"detector"),aS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./requirementDiagram-EFPCY7ZU-B8YnTqPO.js");return{diagram:t}},__vite__mapDeps([41,19,1,2,20,3,4,5,6]));return{id:Hp,diagram:e}},"loader"),nS={id:Hp,detector:oS,loader:aS},lS=nS,Yp="sequence",hS=f(e=>/^\s*sequenceDiagram/.test(e),"detector"),cS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./sequenceDiagram-WJ2MYXX4-BrSDYDx-.js");return{diagram:t}},__vite__mapDeps([42,25,16,1,2,3,4,5,6]));return{id:Yp,diagram:e}},"loader"),dS={id:Yp,detector:hS,loader:cS},uS=dS,jp="class",gS=f((e,t)=>{var r;return((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*classDiagram/.test(e)},"detector"),pS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./classDiagram-DTDB5LWJ-Dpwx6IJK.js");return{diagram:t}},__vite__mapDeps([43,44,18,19,1,2,20,16,3,4,5,6]));return{id:jp,diagram:e}},"loader"),fS={id:jp,detector:gS,loader:pS},mS=fS,Up="classDiagram",yS=f((e,t)=>{var r;return/^\s*classDiagram/.test(e)&&((r=t==null?void 0:t.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:/^\s*classDiagram-v2/.test(e)},"detector"),CS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./classDiagram-v2-JRS7N3AN-Dpwx6IJK.js");return{diagram:t}},__vite__mapDeps([45,44,18,19,1,2,20,16,3,4,5,6]));return{id:Up,diagram:e}},"loader"),xS={id:Up,detector:yS,loader:CS},bS=xS,Xp="state",kS=f((e,t)=>{var r;return((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:/^\s*stateDiagram/.test(e)},"detector"),SS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./stateDiagram-HBIQ2CUA-B5Nv-PBX.js");return{diagram:t}},__vite__mapDeps([46,47,19,1,2,20,16,8,6,9,10,3,4,5]));return{id:Xp,diagram:e}},"loader"),TS={id:Xp,detector:kS,loader:SS},wS=TS,Gp="stateDiagram",BS=f((e,t)=>{var r;return!!(/^\s*stateDiagram-v2/.test(e)||/^\s*stateDiagram/.test(e)&&((r=t==null?void 0:t.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},"detector"),LS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./stateDiagram-v2-4QOOHH4V-B72hUL6s.js");return{diagram:t}},__vite__mapDeps([48,47,19,1,2,20,16,3,4,5,6]));return{id:Gp,diagram:e}},"loader"),vS={id:Gp,detector:BS,loader:LS},AS=vS,Vp="journey",ES=f(e=>/^\s*journey/.test(e),"detector"),_S=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./journeyDiagram-EYS64GPL-ByZmvOcj.js");return{diagram:t}},__vite__mapDeps([49,18,16,1,2,35,5,3,4,6]));return{id:Vp,diagram:e}},"loader"),FS={id:Vp,detector:ES,loader:_S},MS=FS,OS=f((e,t,r)=>{R.debug(`rendering svg for syntax error
|
|
305
|
+
`);const i=ix(t),s=i.append("g");i.attr("viewBox","0 0 2412 512"),Ad(i,100,512,!0),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.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"),s.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw"),Kp={draw:OS},IS=Kp,DS={db:{},renderer:Kp,parser:{parse:f(()=>{},"parse")}},RS=DS,Zp="flowchart-elk",PS=f((e,t={})=>{var r;return/^\s*flowchart-elk/.test(e)||/^\s*(flowchart|graph)/.test(e)&&((r=t==null?void 0:t.flowchart)==null?void 0:r.defaultRenderer)==="elk"?(t.layout="elk",!0):!1},"detector"),$S=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./flowDiagram-A5DVABFB-CCBuG42p.js").then(r=>r.f);return{diagram:t}},__vite__mapDeps([17,18,19,1,2,20,16,21]));return{id:Zp,diagram:e}},"loader"),qS={id:Zp,detector:PS,loader:$S},NS=qS,Qp="timeline",WS=f(e=>/^\s*timeline/.test(e),"detector"),zS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./timeline-definition-24CTP7MA-DTBgPsOR.js");return{diagram:t}},__vite__mapDeps([50,1,2,35,5,3,4,6]));return{id:Qp,diagram:e}},"loader"),HS={id:Qp,detector:WS,loader:zS},YS=HS,Jp="mindmap",jS=f(e=>/^\s*mindmap/.test(e),"detector"),US=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./mindmap-definition-FBJOCRG2-z4KcwRlx.js");return{diagram:t}},__vite__mapDeps([51,19,1,2,20,3,4,5,6]));return{id:Jp,diagram:e}},"loader"),XS={id:Jp,detector:jS,loader:US},GS=XS,tf="kanban",VS=f(e=>/^\s*kanban/.test(e),"detector"),KS=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./kanban-definition-3QL26DDD-Y5ylzca9.js");return{diagram:t}},__vite__mapDeps([52,18,1,2,3,4,5,6]));return{id:tf,diagram:e}},"loader"),ZS={id:tf,detector:VS,loader:KS},QS=ZS,ef="sankey",JS=f(e=>/^\s*sankey(-beta)?/.test(e),"detector"),t2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./sankeyDiagram-P5KCCOFB-DRm9HHoQ.js");return{diagram:t}},__vite__mapDeps([53,1,2,54,36,31,55,3,4,5,6]));return{id:ef,diagram:e}},"loader"),e2={id:ef,detector:JS,loader:t2},r2=e2,rf="packet",i2=f(e=>/^\s*packet(-beta)?/.test(e),"detector"),s2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-Z3DM3KII-hUxSr-QT.js");return{diagram:t}},__vite__mapDeps([56,26,27,1,2,3,4,5,6]));return{id:rf,diagram:e}},"loader"),o2={id:rf,detector:i2,loader:s2},sf="radar",a2=f(e=>/^\s*radar-beta/.test(e),"detector"),n2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-UQ7AKVKN-DIfzNs7s.js");return{diagram:t}},__vite__mapDeps([57,26,27,1,2,3,4,5,6]));return{id:sf,diagram:e}},"loader"),l2={id:sf,detector:a2,loader:n2},of="block",h2=f(e=>/^\s*block(-beta)?/.test(e),"detector"),c2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./blockDiagram-NRAW4CY4-CxaW-TzC.js");return{diagram:t}},__vite__mapDeps([58,18,1,2,21,3,4,5,6]));return{id:of,diagram:e}},"loader"),d2={id:of,detector:h2,loader:c2},u2=d2,af="treeView",g2=f(e=>/^\s*treeView-beta/.test(e),"detector"),p2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-S7CK7UJ4-BiwOlZBI.js");return{diagram:t}},__vite__mapDeps([59,25,26,27,1,2,3,4,5,6]));return{id:af,diagram:e}},"loader"),f2={id:af,detector:g2,loader:p2},m2=f2,nf="architecture",y2=f(e=>/^\s*architecture/.test(e),"detector"),C2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./architectureDiagram-5GKGNRK7-aHYJQElw.js");return{diagram:t}},__vite__mapDeps([60,26,27,1,2,13,3,4,5,6]));return{id:nf,diagram:e}},"loader"),x2={id:nf,detector:y2,loader:C2},b2=x2,lf="eventmodeling",k2=f(e=>/^\s*eventmodeling/.test(e),"detector"),S2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-VSXAHHWV-kKkEHy5z.js");return{diagram:t}},__vite__mapDeps([61,26,27,1,2,3,4,5,6]));return{id:lf,diagram:e}},"loader"),T2={id:lf,detector:k2,loader:S2},w2=T2,hf="ishikawa",B2=f(e=>/^\s*ishikawa(-beta)?\b/i.test(e),"detector"),L2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ishikawaDiagram-5VMMS53U-DoLWy3n2.js");return{diagram:t}},__vite__mapDeps([62,1,2,3,4,5,6]));return{id:hf,diagram:e}},"loader"),v2={id:hf,detector:B2,loader:L2},cf="venn",A2=f(e=>/^\s*venn-beta/.test(e),"detector"),E2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./vennDiagram-4TSXK5OY-DDIUJU_f.js");return{diagram:t}},__vite__mapDeps([63,1,2,3,4,5,6]));return{id:cf,diagram:e}},"loader"),_2={id:cf,detector:A2,loader:E2},F2=_2,df="treemap",M2=f(e=>/^\s*treemap/.test(e),"detector"),O2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./diagram-VX7I27RA-zTp2qGKo.js");return{diagram:t}},__vite__mapDeps([64,26,20,27,1,2,32,36,31,3,4,5,6]));return{id:df,diagram:e}},"loader"),I2={id:df,detector:M2,loader:O2},uf="wardley",D2=f(e=>/^\s*wardley-beta/i.test(e),"detector"),R2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./wardleyDiagram-VM6X3IG4-TfvrOirV.js");return{diagram:t}},__vite__mapDeps([65,26,27,1,2,3,4,5,6]));return{id:uf,diagram:e}},"loader"),P2={id:uf,detector:D2,loader:R2},$2=P2,gf="cynefin",q2=f(e=>/^\s*cynefin-beta(?:[\s:]|$)/.test(e),"detector"),N2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./cynefinDiagram-5FMLGOSQ-COTZjqlj.js");return{diagram:t}},__vite__mapDeps([66,26,27,1,2,3,4,5,6]));return{id:gf,diagram:e}},"loader"),W2={id:gf,detector:q2,loader:N2},pf="railroad",z2=f(e=>/^\s*railroad-beta/i.test(e),"detector"),H2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./railroadDiagram-O6MQD6OU-lCMtporN.js");return{diagram:t}},__vite__mapDeps([67,68,26,1,2,27,3,4,5,6]));return{id:pf,diagram:e}},"loader"),Y2={id:pf,detector:z2,loader:H2},ff="railroadEbnf",j2=f(e=>/^\s*railroad-ebnf-beta/i.test(e),"detector"),U2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./ebnfDiagram-PWID7BFC-CRwXBVzS.js");return{diagram:t}},__vite__mapDeps([69,68,26,1,2,27,3,4,5,6]));return{id:ff,diagram:e}},"loader"),X2={id:ff,detector:j2,loader:U2},mf="railroadAbnf",G2=f(e=>/^\s*railroad-abnf-beta/i.test(e),"detector"),V2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./abnfDiagram-VCTEODGH-CO_aNPe5.js");return{diagram:t}},__vite__mapDeps([70,68,26,1,2,27,3,4,5,6]));return{id:mf,diagram:e}},"loader"),K2={id:mf,detector:G2,loader:V2},yf="railroadPeg",Z2=f(e=>/^\s*railroad-peg-beta/i.test(e),"detector"),Q2=f(async()=>{const{diagram:e}=await Pt(async()=>{const{diagram:t}=await import("./pegDiagram-XKGWAZYB-BL0-JiYs.js");return{diagram:t}},__vite__mapDeps([71,68,26,1,2,27,3,4,5,6]));return{id:yf,diagram:e}},"loader"),J2={id:yf,detector:Z2,loader:Q2},kc=!1,xo=f(()=>{kc||(kc=!0,Xs("error",RS,e=>e.toLowerCase().trim()==="error"),Xs("---",{db:{clear:f(()=>{},"clear")},styles:{},renderer:{draw:f(()=>{},"draw")},parser:{parse:f(()=>{throw new 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:f(()=>null,"init")},e=>e.toLowerCase().trimStart().startsWith("---")),Ea(NS,GS,b2),Ea(b1,QS,bS,mS,R1,Y1,X1,K1,lS,uS,M1,A1,w1,YS,N1,AS,wS,MS,tS,r2,o2,sS,u2,w2,m2,l2,v2,I2,Y2,X2,K2,J2,F2,$2,W2))},"addDiagrams"),tT=f(async()=>{R.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(Wr).map(async([r,{detector:i,loader:s}])=>{if(s)try{Oa(r)}catch{try{const{diagram:o,id:a}=await s();Xs(a,o,i)}catch(o){throw R.error(`Failed to load external diagram with key ${r}. Removing from detectors.`),delete Wr[r],o}}}))).filter(r=>r.status==="rejected");if(t.length>0){R.error(`Failed to load ${t.length} external diagrams`);for(const r of t)R.error(r);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams"),eT="graphics-document document";function Cf(e,t){e.attr("role",eT),t!==""&&e.attr("aria-roledescription",t)}f(Cf,"setA11yDiagramInfo");function xf(e,t,r,i){if(e.insert!==void 0){if(r){const s=`chart-desc-${i}`;e.attr("aria-describedby",s),e.insert("desc",":first-child").attr("id",s).text(r)}if(t){const s=`chart-title-${i}`;e.attr("aria-labelledby",s),e.insert("title",":first-child").attr("id",s).text(t)}}}f(xf,"addSVGa11yTitleDescription");var qr,Za=(qr=class{constructor(t,r,i,s,o){this.type=t,this.text=r,this.db=i,this.parser=s,this.renderer=o}static async fromText(t,r={}){var c,h;const i=Jt(),s=nn(t,i);t=Lb(t)+`
|
|
306
|
+
`;try{Oa(s)}catch{const d=vC(s);if(!d)throw new Sd(`Diagram ${s} not found.`);const{id:u,diagram:g}=await d();Xs(u,g)}const{db:o,parser:a,renderer:n,init:l}=Oa(s);return a.parser&&(a.parser.yy=o),(c=o.clear)==null||c.call(o),l==null||l(i),r.title&&((h=o.setDiagramTitle)==null||h.call(o,r.title)),await a.parse(t),new qr(s,t,o,a,n)}async render(t,r){await this.renderer.draw(this.text,t,r,this)}getParser(){return this.parser}getType(){return this.type}},f(qr,"Diagram"),qr),Sc=[],rT=f(()=>{Sc.forEach(e=>{e()}),Sc=[]},"attachFunctions"),iT=f(e=>e.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function bf(e){const t=e.match(kd);if(!t)return{text:e,metadata:{}};const r=t[1],i=r?t[2].split(`
|
|
307
|
+
`).map(a=>a.startsWith(r)?a.slice(r.length):a).join(`
|
|
308
|
+
`):t[2];let s=p1(i,{schema:g1})??{};s=typeof s=="object"&&!Array.isArray(s)?s:{};const o={};return s.displayMode&&(o.displayMode=s.displayMode.toString()),s.title&&(o.title=s.title.toString()),s.config&&(o.config=s.config),{text:e.slice(t[0].length),metadata:o}}f(bf,"extractFrontMatter");var sT=f(e=>e.replace(/\r\n?/g,`
|
|
309
|
+
`).replace(/<(\w+)([^>]*)>/g,(t,r,i)=>"<"+r+i.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),oT=f(e=>{const{text:t,metadata:r}=bf(e),{displayMode:i,title:s,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:s,config:o,text:t}},"processFrontmatter"),aT=f(e=>{const t=me.detectInit(e)??{},r=me.detectDirective(e,"wrap");return Array.isArray(r)?t.wrap=r.some(({type:i})=>i==="wrap"):(r==null?void 0:r.type)==="wrap"&&(t.wrap=!0),{text:gb(e),directive:t}},"processDirectives");function ol(e){const t=sT(e),r=oT(t),i=aT(r.text),s=Sn(r.config,i.directive);return e=iT(i.text),{code:e,title:r.title,config:s}}f(ol,"preprocessDiagram");function kf(e){const t=new TextEncoder().encode(e),r=Array.from(t,i=>String.fromCodePoint(i)).join("");return btoa(r)}f(kf,"toBase64");var nT=5e4,lT="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",hT="sandbox",cT="loose",dT="http://www.w3.org/2000/svg",uT="http://www.w3.org/1999/xlink",gT="http://www.w3.org/1999/xhtml",pT="100%",fT="100%",mT="border:0;margin:0;",yT="margin:0",CT="allow-top-navigation-by-user-activation allow-popups",xT='The "iframe" tag is not supported by your browser.',bT=["foreignobject"],kT=["dominant-baseline"];function al(e){const t=ol(e);return js(),TC(t.config??{}),t}f(al,"processAndSetConfigs");async function Sf(e,t){xo();try{const{code:r,config:i}=al(e);return{diagramType:(await wf(r)).type,config:i}}catch(r){if(t!=null&&t.suppressErrors)return!1;throw r}}f(Sf,"parse");var Tc=f((e,t,r=[])=>{const i=md(`{ ${r.join(" !important; ")} !important; }`);return`.${e} ${t} ${i}`},"cssImportantStyles"),ST=f((e,t=new Map)=>{const r=new CSSStyleSheet;if(e.fontFamily!==void 0&&r.insertRule(`:root { --mermaid-font-family: ${e.fontFamily}}`,r.cssRules.length),e.altFontFamily!==void 0&&r.insertRule(`:root { --mermaid-alt-font-family: ${e.altFontFamily}}`,r.cssRules.length),t instanceof Map){const n=ye(e)?["> *","span"]:["rect","polygon","ellipse","circle","path"];t.forEach(l=>{oh(l.styles)||n.forEach(c=>{r.insertRule(Tc(l.id,c,l.styles),r.cssRules.length)}),oh(l.textStyles)||r.insertRule(Tc(l.id,"tspan",((l==null?void 0:l.textStyles)||[]).map(c=>c.replace("color","fill"))),r.cssRules.length)})}let i="";if(e.themeCSS!==void 0)if(typeof r.replaceSync=="function"){const s=new CSSStyleSheet;s.replaceSync(e.themeCSS),i=Ma(s)+`
|
|
310
|
+
`}else i+=`${e.themeCSS}
|
|
311
|
+
`;return i+Ma(r)},"createCssStyles"),TT=f((e,t)=>mm(ym(`${e}{${t}}`),vm([f(function(i,s,o,a){if(i.type==="rule"&&Array.isArray(i.props)){if(i.parent&&i.parent.type===_l)return;i.props=i.props.map(n=>n===e&&Array.isArray(i.children)&&i.children.every(c=>c.type!=="decl"?!1:new Set(["font-family","font-size","fill"]).has(c.props))||(n.startsWith(`${e} `)||n.startsWith(`${e}>`))&&!n.startsWith(`${e} ||`)?n:`${e} ${n}`)}else i.type.startsWith("@")&&([...[xm,bm,km,Sm,"@container","@starting-style"],_l].includes(i.type)||(R.warn(`Removing unsupported at-rule ${i.type} from CSS`),i.type=Tm))},"addNamespace"),Cm])),"compileCSS"),wT=f((e,t,r,i)=>{const s=ST(e,r),o=jC(t,s,{...e.themeVariables,theme:e.theme,look:e.look},i);return TT(i,o)},"createUserStyles"),BT=f((e="",t,r)=>{let i=e;return!r&&!t&&(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=Tr(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),LT=f((e="",t)=>{var s,o;const r=(o=(s=t==null?void 0:t.viewBox)==null?void 0:s.baseVal)!=null&&o.height?t.viewBox.baseVal.height+"px":fT,i=kf(`<body style="${yT}">${e}</body>`);return`<iframe style="width:${pT};height:${r};${mT}" src="data:text/html;charset=UTF-8;base64,${i}" sandbox="${CT}">
|
|
312
|
+
${xT}
|
|
313
|
+
</iframe>`},"putIntoIFrame"),wc=f((e,t,r,i,s)=>{const o=e.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",t).attr("width","100%").attr("xmlns",dT);return s&&a.attr("xmlns:xlink",s),a.append("g"),e},"appendDivSvgG");function Qa(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}f(Qa,"sandboxedIframe");var vT=f((e,t,r,i)=>{var s,o,a;(s=e.getElementById(t))==null||s.remove(),(o=e.getElementById(r))==null||o.remove(),(a=e.getElementById(i))==null||a.remove()},"removeExistingElements"),AT=f(async function(e,t,r){var N,H,G,F,Q,$;xo();const i=al(t);t=i.code;const s=Jt();R.debug(s),t.length>((s==null?void 0:s.maxTextSize)??nT)&&(t=lT);const o=`#${e}`,a="i"+e,n="#"+a,l="d"+e,c="#"+l,h=f(()=>{const at=Dt(u?n:c).node();at&&"remove"in at&&at.remove()},"removeTempElements");let d=Dt(document.body);const u=s.securityLevel===hT,g=s.securityLevel===cT,p=s.fontFamily;if(r!==void 0){if(r&&(r.innerHTML=""),u){const Y=Qa(Dt(r),a);d=Dt(Y.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Dt(r);wc(d,e,l,`font-family: ${p}`,uT)}else{if(vT(document,e,l,a),u){const Y=Qa(Dt(document.body),a);d=Dt(Y.nodes()[0].contentDocument.body),d.node().style.margin="0"}else d=Dt("body");wc(d,e,l)}let C,x;try{C=await Za.fromText(t,{title:i.title})}catch(Y){if(s.suppressErrorRendering)throw h(),Y;C=await Za.fromText("error"),x=Y}const y=d.select(c).node(),b=C.type,S=y.firstChild,w=S.firstChild,L=(H=(N=C.renderer).getClasses)==null?void 0:H.call(N,t,C),A=wT(s,b,L,o),v=document.createElement("style");v.innerHTML=A,S.insertBefore(v,w);try{await C.renderer.draw(t,e,"11.17.0",C)}catch(Y){throw s.suppressErrorRendering?h():IS.draw(t,e,"11.17.0"),Y}const E=d.select(`${c} svg`),D=(F=(G=C.db).getAccTitle)==null?void 0:F.call(G),q=($=(Q=C.db).getAccDescription)==null?void 0:$.call(Q);Bf(b,E,D,q);const st=f(()=>{d.select(`[id="${e}"]`).selectAll("foreignobject > *").attr("xmlns",gT);let Y=d.select(c).node().innerHTML;if(R.debug("config.arrowMarkerAbsolute",s.arrowMarkerAbsolute),Y=BT(Y,u,ar(s.arrowMarkerAbsolute)),u){const at=d.select(c+" svg").node();Y=LT(Y,at)}else g||(Y=wi.sanitize(Y,{ADD_TAGS:bT,ADD_ATTR:kT,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return rT(),Y},"serializeSvg")();if(x)throw x;return h(),{diagramType:b,svg:st,bindFunctions:C.db.bindFunctions}},"render");function Tf(e={}){var i;const t=he({},e);t!=null&&t.fontFamily&&!((i=t.themeVariables)!=null&&i.fontFamily)&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),kC(t),t!=null&&t.theme&&t.theme in gr?t.themeVariables=gr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=gr.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?bC(t):yd();an(r.logLevel),xo()}f(Tf,"initialize");var wf=f((e,t={})=>{const{code:r}=ol(e);return Za.fromText(r,t)},"getDiagramFromText");function Bf(e,t,r,i){Cf(t,e),xf(t,r,i,t.attr("id"))}f(Bf,"addA11yInfo");var Yr=Object.freeze({render:AT,parse:Sf,getDiagramFromText:wf,initialize:Tf,getConfig:Jt,setConfig:Cd,getSiteConfig:yd,updateSiteConfig:SC,reset:f(()=>{js()},"reset"),globalReset:f(()=>{js(Bi)},"globalReset"),defaultConfig:Bi});an(Jt().logLevel);js(Jt());var ET=f((e,t,r)=>{R.warn(e),kn(e)?(r&&r(e.str,e.hash),t.push({...e,message:e.str,error:e})):(r&&r(e),e instanceof Error&&t.push({str:e.message,message:e.message,hash:e.name,error:e}))},"handleError"),Lf=f(async function(e={querySelector:".mermaid"}){try{await _T(e)}catch(t){if(kn(t)&&R.error(t.str),Re.parseError&&Re.parseError(t),!e.suppressErrors)throw R.error("Use the suppressErrors option to suppress these errors"),t}},"run"),_T=f(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){const i=Yr.getConfig();R.debug(`${e?"":"No "}Callback function found`);let s;if(r)s=r;else if(t)s=document.querySelectorAll(t);else throw new Error("Nodes and querySelector are both undefined");R.debug(`Found ${s.length} diagrams`),(i==null?void 0:i.startOnLoad)!==void 0&&(R.debug("Start On Load: "+(i==null?void 0:i.startOnLoad)),Yr.updateSiteConfig({startOnLoad:i==null?void 0:i.startOnLoad}));const o=new me.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const n=[];for(const l of Array.from(s)){if(R.info("Rendering diagram: "+l.id),l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const c=`mermaid-${o.next()}`;a=l.innerHTML,a=Jc(me.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=me.detectInit(a);h&&R.debug("Detected early reinit: ",h);try{const{svg:d,bindFunctions:u}=await _f(c,a,l);l.innerHTML=d,e&&await e(c),u&&u(l)}catch(d){ET(d,n,Re.parseError)}}if(n.length>0)throw n[0]},"runThrowsErrors"),vf=f(function(e){Yr.initialize(e)},"initialize"),FT=f(async function(e,t,r){R.warn("mermaid.init is deprecated. Please use run instead."),e&&vf(e);const i={postRenderCallback:r,querySelector:".mermaid"};typeof t=="string"?i.querySelector=t:t&&(t instanceof HTMLElement?i.nodes=[t]:i.nodes=t),await Lf(i)},"init"),MT=f(async(e,{lazyLoad:t=!0}={})=>{xo(),Ea(...e),t===!1&&await tT()},"registerExternalDiagrams"),Af=f(function(){if(Re.startOnLoad){const{startOnLoad:e}=Yr.getConfig();e&&Re.run().catch(t=>R.error("Mermaid failed to initialize",t))}},"contentLoaded");typeof document<"u"&&window.addEventListener("load",Af,!1);var OT=f(function(e){Re.parseError=e},"setParseErrorHandler"),so=[],Ca=!1,Ef=f(async()=>{if(!Ca){for(Ca=!0;so.length>0;){const e=so.shift();if(e)try{await e()}catch(t){R.error("Error executing queue",t)}}Ca=!1}},"executeQueue"),IT=f(async(e,t)=>new Promise((r,i)=>{const s=f(()=>new Promise((o,a)=>{Yr.parse(e,t).then(n=>{o(n),r(n)},n=>{var l;R.error("Error parsing",n),(l=Re.parseError)==null||l.call(Re,n),a(n),i(n)})}),"performCall");so.push(s),Ef().catch(i)}),"parse"),_f=f((e,t,r)=>new Promise((i,s)=>{const o=f(()=>new Promise((a,n)=>{Yr.render(e,t,r).then(l=>{a(l),i(l)},l=>{var c;R.error("Error parsing",l),(c=Re.parseError)==null||c.call(Re,l),n(l),s(l)})}),"performCall");so.push(o),Ef().catch(s)}),"render"),DT=f(()=>Object.keys(Wr).map(e=>({id:e})),"getRegisteredDiagramsMetadata"),Re={startOnLoad:!0,mermaidAPI:Yr,parse:IT,render:_f,init:FT,run:Lf,registerExternalDiagrams:MT,registerLayoutLoaders:Fp,initialize:vf,parseError:void 0,contentLoaded:Af,setParseErrorHandler:OT,detectType:nn,registerIconPacks:Ex,getRegisteredDiagramsMetadata:DT},xa=Re;/*! Check if previously processed *//*!
|
|
314
|
+
* Wait for document loaded before starting the execution
|
|
315
|
+
*/const $t=e=>e.replace(/\s*!important\s*$/i,"").trim(),RT=(e,t)=>{let r=t;for(;r<e.length&&/\s/.test(e[r]);)r+=1;const i=r;for(;r<e.length&&/[a-z-]/i.test(e[r]);)r+=1;if(r===i)return!1;for(;r<e.length&&/\s/.test(e[r]);)r+=1;return e[r]===":"},Ne=e=>{const t=[];let r=0;for(;r<e.length;){for(;r<e.length&&/[\s;,]/.test(e[r]);)r+=1;if(r>=e.length)break;const i=r;for(;r<e.length&&e[r]!==":"&&!(e[r]===";"||e[r]===",");)r+=1;if(r>=e.length||e[r]!==":")break;const s=e.substring(i,r).trim().toLowerCase();r+=1;const o=r;let a=0,n=null;for(;r<e.length;){const c=e[r];if(n){c===n&&e[r-1]!=="\\"&&(n=null),r+=1;continue}if(c==='"'||c==="'"){n=c,r+=1;continue}if(c==="("){a+=1,r+=1;continue}if(c===")"){a=Math.max(0,a-1),r+=1;continue}if(a===0&&(c===";"||c===","||/\s/.test(c)&&RT(e,r)))break;r+=1}const l=$t(e.substring(o,r));s&&l&&t.push({property:s,value:l}),r<e.length&&(e[r]===";"||e[r]===",")&&(r+=1)}return t},We=e=>{const t=$t(e);if(!t)return!1;if(typeof CSS<"u"&&typeof CSS.supports=="function")return CSS.supports("color",t);if(typeof document<"u"){const r=document.createElement("div");return r.style.color="",r.style.color=t,r.style.color!==""}return!1},Bc=(e,t)=>{var i;const r=e.getAttribute("style");return r&&((i=Ne(r).find(s=>s.property===t))==null?void 0:i.value)||""},ba=(...e)=>{for(const t of e){const r=$t(t||"");if(We(r))return r}},nl=(e,t)=>{var a,n,l,c;const r=e.querySelector("text, foreignObject, div, span, p")||e,i=ba((a=r.getAttribute)==null?void 0:a.call(r,"fill"),Bc(r,"fill"),(n=r.style)==null?void 0:n.fill);if(i)return i;const s=ba((l=r.getAttribute)==null?void 0:l.call(r,"color"),Bc(r,"color"),(c=r.style)==null?void 0:c.color);if(s)return s;const o=ba(t);if(o)return o},ll=(e,t,r)=>{switch(t){case Ut.FILL:case Ut.STROKE:We(r)&&(e[t]=r);break;case Ut.STROKE_WIDTH:case Ut.STROKE_DASHARRAY:e[t]=r;break}},oo=(e,t,r)=>{t===we.COLOR&&We(r)&&(e[we.COLOR]=r)},ao=(e,t,r)=>{e&&Ne(e).forEach(({property:i,value:s})=>{ll(t,i,s),oo(r,i,s)})},Ff=(e,t)=>{e&&Ne(e).forEach(({property:r,value:i})=>{if(r==="fill"&&We(i)){t[we.COLOR]=i;return}oo(t,r,i)})},Mf=(e,t)=>{if(!e)return;[[Ut.FILL,e.getAttribute("fill")],[Ut.STROKE,e.getAttribute("stroke")],[Ut.STROKE_WIDTH,e.getAttribute("stroke-width")],[Ut.STROKE_DASHARRAY,e.getAttribute("stroke-dasharray")]].forEach(([i,s])=>{const o=$t(s||"");o&&ll(t,i,o)})},Of=(e,t)=>{if(!e)return;const r=e.getAttribute("fill")||e.getAttribute("color"),i=$t(r||"");We(i)&&(t[we.COLOR]=i)},Ja=(e,t,r,i)=>{var o,a;if(!(t instanceof Map))return;const s=t.get(e);s&&((o=s.styles)==null||o.forEach(n=>{Ne(n).forEach(({property:l,value:c})=>{ll(r,l,c),oo(i,l,c)})}),(a=s.textStyles)==null||a.forEach(n=>{Ne(n).forEach(({property:l,value:c})=>{oo(i,l,c)})}))},PT=(e,t,r)=>{var u;const i=e.nodes.map(g=>g.startsWith("flowchart-")?g.split("-")[1]:g),s=t.querySelector(`[id='${e.id}']`);if(!s)throw new Error("SubGraph element not found");const o=hl(s,t),a=s.getBBox(),n={width:a.width,height:a.height},l={},c={},h=s.querySelector(":scope > rect, :scope > path, :scope > polygon, :scope > ellipse")||s.querySelector(".cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse")||s.querySelector("rect, path, polygon, ellipse");ao(s.getAttribute("style"),l,c),ao(h==null?void 0:h.getAttribute("style"),l,c),Mf(h,l);const d=s.querySelector(".cluster-label text, .cluster-label tspan")||s.querySelector("text");return Ff(d==null?void 0:d.getAttribute("style"),c),Of(d,c),Ja(e.id,r,l,c),(u=e.classes)==null||u.forEach(g=>{Ja(g,r,l,c)}),{id:e.id,nodeIds:i,text:Fe(e.title),labelType:"text",...o,...n,containerStyle:l,labelStyle:c}},Lc=(e,t,r)=>{var u,g;const i=t.querySelector(`[id*="${e.domId}"]`);if(!i)return;let s;((u=i.parentElement)==null?void 0:u.tagName.toLowerCase())==="a"&&(s=i.parentElement.getAttribute("xlink:href"));const o=hl(s?i.parentElement:i,t),a=i.getBBox(),n={width:a.width,height:a.height},l={},c={};e.classes&&r instanceof Map&&(Array.isArray(e.classes)?e.classes:[e.classes]).forEach(p=>{Ja(p,r,l,c)}),(g=e.styles)==null||g.forEach(p=>{ao(p,l,c)});const h=i.querySelector(".label-container");return ao(h==null?void 0:h.getAttribute("style"),l,c),Mf(h,l),Array.from(i.querySelectorAll(".label, .nodeLabel, .label text, .label tspan, .label span, .label div")).forEach(p=>{Ff(p.getAttribute("style"),c),Of(p,c)}),{id:e.id,labelType:e.labelType,text:Fe(e.text||""),type:e.type,link:s||void 0,...o,...n,containerStyle:l,labelStyle:c}},$T=(e,t,r)=>{const i=r.querySelector(`[id*="${e.id}"]`);if(!i)throw new Error("Edge element not found");const s=hl(i,r),o=nd(i,s);return e.length=void 0,{...e,...o,text:Fe(e.text)}},hl=(e,t)=>{var l;if(!e)throw new Error("Element not found");let r=(l=e.parentElement)==null?void 0:l.parentElement;const i=e.childNodes[0];let s={x:0,y:0};if(i){const{transformX:c,transformY:h}=$r(i),d=i.getBBox();s={x:Number(i.getAttribute("x"))||c+d.x||0,y:Number(i.getAttribute("y"))||h+d.y||0}}const{transformX:o,transformY:a}=$r(e),n={x:o+s.x,y:a+s.y};for(;r&&r.id!==t.id;){if(r.classList.value==="root"&&r.hasAttribute("transform")){const{transformX:c,transformY:h}=$r(r);n.x+=c,n.y+=h}r=r.parentElement}return n},qT=(e,t)=>{const r=e.getVertices(),i=e.getEdges(),s=e.getSubGraphs(),o=e.getClasses(),a={},n=o instanceof Map?o:{};r instanceof Map?r.forEach((d,u)=>{a[u]=Lc(d,t,n)}):typeof r=="object"&&r!==null&&Object.entries(r).forEach(([d,u])=>{a[d]=Lc(u,t,n)});const l=new Map,c=(Array.isArray(i)?i:[]).map(d=>{if(!t.querySelector(`[id*="${d.id}"]`))return null;const u=`${d.start}-${d.end}`,g=l.get(u)||0;return l.set(u,g+1),$T(d,g,t)}).filter(d=>d!==null&&d.reflectionPoints.length>1);return{type:"flowchart",subGraphs:(Array.isArray(s)?s:[]).map(d=>PT(d,t,n)),vertices:a,edges:c}},NT=(e,t)=>{const r={};t!=null&&t.label&&(r.label={text:Fe(t.label),fontSize:16});const i=e.tagName;if(i==="line")r.startX=Number(e.getAttribute("x1")),r.startY=Number(e.getAttribute("y1")),r.endX=Number(e.getAttribute("x2")),r.endY=Number(e.getAttribute("y2"));else if(i==="path"){const a=e.getAttribute("d");if(!a)throw new Error('Path element does not contain a "d" attribute');const n=a.split(/(?=[LC])/),l=n[0].substring(1).split(",").map(d=>parseFloat(d)),c=[];n.forEach(d=>{const u=d.substring(1).trim().split(" ").map(g=>{const[p,C]=g.split(",");return[parseFloat(p)-l[0],parseFloat(C)-l[1]]});c.push(...u)});const h=c[c.length-1];r.startX=l[0],r.startY=l[1],r.endX=h[0],r.endY=h[1],r.points=c}t!=null&&t.label&&(r.startY=r.startY-10,r.endY=r.endY-10);const s=e.getAttribute("stroke"),o=(s&&s!=="none"?s:"")||getComputedStyle(e).stroke||"";return r.strokeColor=o?$t(o):null,r.strokeWidth=Number(e.getAttribute("stroke-width")),r.type="arrow",r.strokeStyle=(t==null?void 0:t.strokeStyle)||"solid",r.startArrowhead=(t==null?void 0:t.startArrowhead)||null,r.endArrowhead=(t==null?void 0:t.endArrowhead)||null,r},cl=(e,t,r,i,s)=>{const o={};return o.type="arrow",o.startX=e,o.startY=t,o.endX=r,o.endY=i,Object.assign(o,{...s}),o},no=(e,t,r,i)=>({type:"text",x:e,y:t,text:r,width:(i==null?void 0:i.width)||20,height:(i==null?void 0:i.height)||20,fontSize:(i==null?void 0:i.fontSize)||as,id:i==null?void 0:i.id,color:i==null?void 0:i.color,groupId:i==null?void 0:i.groupId,metadata:i==null?void 0:i.metadata}),If=(e,t,r)=>{const i={},s=Number(e.getAttribute("x")),o=Number(e.getAttribute("y"));i.type="text",i.text=Fe(t),r!=null&&r.id&&(i.id=r.id),r!=null&&r.groupId&&(i.groupId=r.groupId);const a=e.getBBox();i.width=a.width,i.height=a.height,i.x=s-a.width/2,i.y=o;const n=parseInt(getComputedStyle(e).fontSize);return i.fontSize=n,i.color=nl(e),i},fr=(e,t,r={})=>{const i={};i.type=t;const{label:s,subtype:o,id:a,groupId:n}=r;i.id=a,n&&(i.groupId=n),s&&(i.label={text:Fe(s.text),fontSize:16,textAlign:s==null?void 0:s.textAlign,verticalAlign:s==null?void 0:s.verticalAlign});const l=e.getBBox();switch(i.x=l.x,i.y=l.y,i.width=l.width,i.height=l.height,i.subtype=o,o){case"highlight":const c=e.getAttribute("fill");c&&(i.bgColor=$t(c));break;case"note":i.strokeStyle="dashed";break}return i},os=(e,t,r,i,s,o)=>{const a={};a.startX=t,a.startY=r,a.endX=i,o!=null&&o.groupId&&(a.groupId=o.groupId),o!=null&&o.id&&(a.id=o.id),a.endY=s;const n=e.getAttribute("stroke");return a.strokeColor=n?$t(n):null,a.strokeWidth=Number(e.getAttribute("stroke-width")),a.type="line",a},vc={0:"SOLID",1:"DOTTED",3:"SOLID_CROSS",4:"DOTTED_CROSS",5:"SOLID_OPEN",6:"DOTTED_OPEN",24:"SOLID_POINT",25:"DOTTED_POINT"},rr={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,SOLID_POINT:24,DOTTED_POINT:25,CRITICAL_START:27},WT=e=>{let t;switch(e){case rr.SOLID:case rr.SOLID_CROSS:case rr.SOLID_OPEN:case rr.SOLID_POINT:t="solid";break;case rr.DOTTED:case rr.DOTTED_CROSS:case rr.DOTTED_OPEN:case rr.DOTTED_POINT:t="dotted";break;default:t="solid";break}return t},zT=(e,t)=>{var i,s;if(!!((i=e.nextElementSibling)!=null&&i.classList.contains("sequenceNumber"))){const o=(s=e.nextElementSibling)==null?void 0:s.textContent;if(!o)throw new Error("sequence number not present");const a=30,n=a/2,c={type:"rectangle",x:t.startX-10,y:t.startY-n,label:{text:o,fontSize:14},bgColor:"#e9ecef",height:a,subtype:"sequence"};Object.assign(t,{sequenceNumber:c})}},Ac=(e,t,r)=>{if(!e)throw"root node not found";const i=$e(),s=Array.from(e.children),o=[];return s.forEach((a,n)=>{const l=`${r==null?void 0:r.id}-${n}`;let c;switch(a.tagName){case"line":const h=Number(a.getAttribute("x1")),d=Number(a.getAttribute("y1")),u=Number(a.getAttribute("x2")),g=Number(a.getAttribute("y2"));c=os(a,h,d,u,g,{groupId:i,id:l});break;case"text":c=If(a,t,{groupId:i,id:l});break;case"circle":c=fr(a,"ellipse",{label:a.textContent?{text:a.textContent}:void 0,groupId:i,id:l});default:c=fr(a,Am[a.tagName],{label:a.textContent?{text:a.textContent}:void 0,groupId:i,id:l})}o.push(c)}),o},Ec=(e,t)=>{const r=t.getAttribute("fill"),i=t.getAttribute("stroke"),s=t.getAttribute("stroke-width"),o=t.getAttribute("stroke-dasharray");r&&r!=="none"&&(e.bgColor=$t(r)),i&&i!=="none"&&(e.strokeColor=$t(i)),s&&(e.strokeWidth=Number(s)),o&&o.trim()&&(e.strokeStyle="dashed")},HT=(e,t)=>{const r=Array.from(t.querySelectorAll(".actor-top")),i=Array.from(t.querySelectorAll(".actor-bottom")),s=[],o=[],a={},n=e instanceof Map?Array.from(e.values()):Object.values(e),l=Array.from(t.querySelectorAll(".actor-line")),c=(h,d)=>{var C;const u=h.name,g=l.find(x=>x.getAttribute("name")===u);if(g)return g;const p=h.type==="participant"?(C=d.parentElement)==null?void 0:C.previousElementSibling:d.previousElementSibling;return p?p.tagName==="line"?p:p.querySelector("line"):null};return n.forEach(h=>{const d=r.find(p=>p.getAttribute("name")===h.name),u=i.find(p=>p.getAttribute("name")===h.name);if(!d||!u)throw"root not found";const g=h.description;if(h.type==="participant"){const p=fr(d,"rectangle",{id:`${h.name}-top`,label:{text:g},subtype:"actor"});if(Ec(p,d),!p)throw"Top Node element not found!";s.push([p]);const C=fr(u,"rectangle",{id:`${h.name}-bottom`,label:{text:g},subtype:"actor"});a[h.name]={topId:`${h.name}-top`,bottomId:`${h.name}-bottom`,bindType:"rectangle"},Ec(C,u),s.push([C]);const x=c(h,d);if((x==null?void 0:x.tagName)!=="line")throw"Line not found";const y=Number(x.getAttribute("x1"));if(!p.height)throw"Top node element height is null";const b=p.y+p.height,S=C.y,w=Number(x.getAttribute("x2")),L=os(x,y,b,w,S);o.push(L)}else if(h.type==="actor"){const p=Ac(d,g,{id:`${h.name}-top`});s.push(p);const C=Ac(u,g,{id:`${h.name}-bottom`});s.push(C);const x=c(h,d);if((x==null?void 0:x.tagName)!=="line")throw"Line not found";const y=Number(x.getAttribute("x1")),b=Number(x.getAttribute("y1")),S=Number(x.getAttribute("x2")),w=C.find(v=>v.type==="ellipse");if(w){const v=w.y,E=os(x,y,b,S,v);o.push(E)}const L=p.find(v=>v.type==="ellipse"),A=C.find(v=>v.type==="ellipse");L!=null&&L.id&&(A!=null&&A.id)&&(a[h.name]={topId:L.id,bottomId:A.id,bindType:"ellipse"})}}),{nodes:s,lines:o,actorMap:a}},YT=(e,t,r)=>{const i=[],s=Array.from(t.querySelectorAll('[class*="messageLine"]')),o=Object.keys(vc),a=e.filter(n=>o.includes(n.type.toString()));return s.forEach((n,l)=>{const c=a[l],h=vc[c.type],d=NT(n,{label:c==null?void 0:c.message,strokeStyle:WT(c.type),endArrowhead:h==="SOLID_OPEN"||h==="DOTTED_OPEN"?null:"arrow"}),u=r[c.from],g=r[c.to];u!=null&&u.topId&&(g!=null&&g.topId)&&(d.start={type:u.bindType||"rectangle",id:u.topId},d.end={type:g.bindType||"rectangle",id:g.topId}),zT(n,d),i.push(d)}),i},jT=(e,t)=>{const r=Array.from(t.querySelectorAll(".note")).map(o=>o.parentElement),i=e.filter(o=>o.type===rr.NOTE),s=[];return r.forEach((o,a)=>{if(!o)return;const n=o.firstChild,l=i[a].message,c=fr(n,"rectangle",{label:{text:l},subtype:"note"}),h=n.getAttribute("fill"),d=n.getAttribute("stroke"),u=n.getAttribute("stroke-width"),g=n.getAttribute("stroke-dasharray");h&&h!=="none"&&(c.bgColor=$t(h)),d&&d!=="none"&&(c.strokeColor=$t(d)),u&&(c.strokeWidth=Number(u)),g&&g.trim()&&(c.strokeStyle="dashed"),s.push(c)}),s},UT=e=>{const t=Array.from(e.querySelectorAll("[class*=activation]")),r=[];return t.forEach(i=>{const s=fr(i,"rectangle",{label:{text:""},subtype:"activation"});(()=>{const a=i.getAttribute("fill"),n=i.getAttribute("stroke"),l=i.getAttribute("stroke-width"),c=i.getAttribute("stroke-dasharray");a&&a!=="none"&&(s.bgColor=$t(a)),n&&n!=="none"&&(s.strokeColor=$t(n)),l&&(s.strokeWidth=Number(l)),c&&c.trim()&&(s.strokeStyle="dashed")})(),r.push(s)}),r},XT=(e,t)=>{const r=Array.from(t.querySelectorAll(".loopLine")),i=[],s=[],o=[];r.forEach(h=>{const d=Number(h.getAttribute("x1")),u=Number(h.getAttribute("y1")),g=Number(h.getAttribute("x2")),p=Number(h.getAttribute("y2")),C=os(h,d,u,g,p);C.strokeStyle="dotted",C.strokeColor="#adb5bd",C.strokeWidth=2,i.push(C)});const a=Array.from(t.querySelectorAll(".loopText")),n=e.filter(h=>h.type===rr.CRITICAL_START).map(h=>h.message);a.forEach(h=>{var C;const d=h.textContent||"",u=If(h,d),g=((C=d.match(/\[(.*?)\]/))==null?void 0:C[1])||"";n.includes(g)&&(u.x+=16),s.push(u)});const l=Array.from(t==null?void 0:t.querySelectorAll(".labelBox")),c=Array.from(t==null?void 0:t.querySelectorAll(".labelText"));return l.forEach((h,d)=>{var p;const u=((p=c[d])==null?void 0:p.textContent)||"",g=fr(h,"rectangle",{label:{text:u}});g.strokeColor="#adb5bd",g.bgColor="#e9ecef",g.width=void 0,o.push(g)}),{lines:i,texts:s,nodes:o}},GT=e=>{const t=Array.from(e.querySelectorAll(".rect")).filter(i=>{var s;return((s=i.parentElement)==null?void 0:s.tagName)!=="g"}),r=[];return t.forEach(i=>{const s=fr(i,"rectangle",{label:{text:""},subtype:"highlight"});r.push(s)}),r},VT=(e,t)=>{const r=e.db,i=[],o=r.getBoxes().map(x=>({...x,fill:$t(x.fill||"")})),a=GT(t),n=r.getActors(),{nodes:l,lines:c,actorMap:h}=HT(n,t),d=r.getMessages(),u=YT(d,t,h),g=jT(d,t),p=UT(t),C=XT(d,t);return i.push(a),i.push(...l),i.push(g),i.push(p),{type:"sequence",lines:c,arrows:u,nodes:i,loops:C,groups:o}},KT=e=>{const t={};return e&&e.forEach(r=>{Ne(r).forEach(({property:i,value:s})=>{i&&s&&(t[i]=$t(s))})}),t},Os={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},_c={LINE:0,DOTTED_LINE:1},Fc=16,ZT=e=>{let t;switch(e){case _c.LINE:t="solid";break;case _c.DOTTED_LINE:t="dotted";break;default:t="solid"}return t},Mc=e=>{let t;switch(e){case Os.AGGREGATION:t="diamond_outline";break;case Os.COMPOSITION:t="diamond";break;case Os.EXTENSION:t="triangle_outline";break;case"none":t=null;break;case Os.DEPENDENCY:default:t="arrow";break}return t},ka=(e,t)=>{let r=0,i=0,s=e;for(;s&&s!==t;){const{transformX:o,transformY:a}=$r(s);r+=o,i+=a,s=s.parentElement}return{tx:r,ty:i}},Oc=new Set(["triangle_outline","diamond","diamond_outline"]),Df=(e,t=.5)=>{if(e.length<=2)return[...e];const r=[e[0]];for(let i=1;i<e.length-1;i++){const s=r[r.length-1],o=e[i],a=e[i+1],n=a.x-s.x,l=a.y-s.y,c=Math.hypot(n,l);if(!c)continue;const d=Math.abs(n*(o.y-s.y)-l*(o.x-s.x))/c,u=((o.x-s.x)*n+(o.y-s.y)*l)/(c*c);d<=t&&u>=-t&&u<=1+t||r.push(o)}return r.push(e[e.length-1]),r},Rf=e=>{const t=sn(ad(e).map(i=>[i.x,i.y])).map(([i,s])=>({x:i,y:s})),r=on(e);return r&&t.length>=2&&(t[0]={x:r.startX,y:r.startY},t[t.length-1]={x:r.endX,y:r.endY}),Df(t)},Ic=(e,t,r)=>{const i=e.x-t.x,s=e.y-t.y,o=Math.hypot(i,s);return o?{x:e.x+i/o*r,y:e.y+s/o*r}:e},QT=(e,t)=>{const r=sn(t.map(o=>[o.x,o.y])).map(([o,a])=>({x:o,y:a}));if(r.length<2)throw new Error("Arrow route must contain at least two points");const i=r[0],s=r[r.length-1];e.startX=i.x,e.startY=i.y,e.endX=s.x,e.endY=s.y,e.points=r.map(o=>[o.x-i.x,o.y-i.y])},JT=e=>{var o;const t=(o=e.points)==null?void 0:o.map(([a,n])=>({x:e.startX+a,y:e.startY+n})).filter(a=>Number.isFinite(a.x)&&Number.isFinite(a.y));if(!t||t.length<2)return e;const r=[...t],i=!!e.startArrowhead&&Oc.has(e.startArrowhead),s=!!e.endArrowhead&&Oc.has(e.endArrowhead);if(!i&&!s)return e;if(i&&(r[0]=Ic(r[0],r[1],Fc)),s){const a=r.length-1;r[a]=Ic(r[a],r[a-1],Fc)}return QT(e,r),e},tw=(e,t)=>{const r=$t(e.getAttribute("stroke")||getComputedStyle(e).stroke||""),i=parseFloat(e.getAttribute("stroke-width")||getComputedStyle(e).strokeWidth||"1");We(r)&&r!=="none"&&(t.strokeColor=r),Number.isFinite(i)&&i>0&&(t.strokeWidth=i)},ew=e=>{const t=[];return e.forEach(r=>{Rf(r).forEach(i=>{const s=t[t.length-1];s&&s.x===i.x&&s.y===i.y||t.push(i)})}),Df(t)},Pf=(e,t,r)=>{if(e.length<2)throw new Error(`Class diagram edge ${(t==null?void 0:t.id)||"<unknown>"} is missing usable path points`);const i=e[0],s=e[e.length-1],o=cl(i.x,i.y,s.x,s.y,{id:(t==null?void 0:t.getAttribute("data-id"))||(t==null?void 0:t.id)||void 0,...r,points:e.map(a=>[a.x-i.x,a.y-i.y])});return t&&tw(t,o),JT(o)},$f=(e,t)=>Pf(ew(e),e[0],t),rw=(e,t)=>{const r=Rf(e);return Pf([r[0],r[r.length-1]],e,t)},iw=(e,t)=>$f([e],t),sw=(e,t)=>[`${e}-cyclic-special-1`,`${e}-cyclic-special-mid`,`${e}-cyclic-special-2`].map(i=>t.querySelector(`path[id="${i}"][data-edge="true"]`)).filter(i=>i!==null),ow=e=>{var t;return((t=e.points)==null?void 0:t.map(([r,i])=>({x:e.startX+r,y:e.startY+i})).filter(r=>Number.isFinite(r.x)&&Number.isFinite(r.y)))||[]},Dc=(e,t)=>{const r=ow(e);if(r.length<2)return null;const i=t==="start",s=i?r[0]:r[r.length-1],o=i?r[1]:r[r.length-2],a=o.x===s.x?i?-1:1:Math.sign(o.x-s.x),n=o.y===s.y?1:Math.sign(o.y-s.y);return{x:s.x+a*20,y:s.y+(n>=0?12:-28)}},aw=(e,t)=>{let r=e;for(;r&&r!==t;){if(r.classList.contains("annotation-group")||r.classList.contains("label-group"))return"header";if(r.classList.contains("members-group"))return"members";if(r.classList.contains("methods-group"))return"methods";r=r.parentElement}return"other"},nw=(e,t,r)=>{const i=[],s=[],o=[];return Object.values(e).forEach(a=>{var Q;const{domId:n,id:l}=a,c=$e(),h=KT(a.styles||a.cssStyles);let d;try{d=r?r(l):void 0}catch{d=void 0}const u=$=>{const Y=new RegExp(`^classId-${$}(?:-|$)`);return Array.from(t.querySelectorAll("[id]")).filter(wt=>Y.test(wt.id))[0]},g=d&&t.querySelector(`#${d}`)||t.querySelector(`#${n}`)||t.querySelector(`[data-id='${l}']`)||u(l);if(!g)throw Error(`DOM Node with id ${n} not found`);const p=g.querySelector("rect")||g,C=p.getBBox(),{tx:x,ty:y}=ka(p,t),b={type:"rectangle",id:l,groupId:c,x:C.x+x,y:C.y+y,width:C.width,height:C.height,metadata:{classId:l}},S=p.getAttribute("fill"),w=p.getAttribute("stroke"),L=p.getAttribute("stroke-width"),A=p.getAttribute("stroke-dasharray"),v=getComputedStyle(p),E=$t(S||h.fill||(S?v.fill:"")),D=$t(w||h.stroke||(w?v.stroke:"")),q=L||h["stroke-width"]||(L?v.strokeWidth:""),U=A||h["stroke-dasharray"]||(A?v.strokeDasharray==="none"?"":v.strokeDasharray:""),st=$=>{if(!$||!We($))return!1;const Y=$.toLowerCase();return!(Y==="none"||Y==="transparent"||Y==="rgba(0, 0, 0, 0)"||Y==="black"||Y==="#000"||Y==="#000000"||Y==="rgb(0, 0, 0)"||Y==="rgba(0, 0, 0, 1)")};st(E)?b.bgColor=E:b.bgColor=void 0,st(D)?b.strokeColor=D:b.strokeColor=void 0,q?b.strokeWidth=Number(q):b.strokeWidth=void 0,U&&U.trim().length>0?b.strokeStyle="dashed":b.strokeStyle=void 0,i.push(b),[...Array.from(g.querySelectorAll("line")),...Array.from(g.querySelectorAll("g.divider path"))].forEach($=>{const{tx:Y,ty:at}=ka($,t);let wt,bt,Lt,nt;if($.tagName.toLowerCase()==="line")wt=Number($.getAttribute("x1"))+Y,bt=Number($.getAttribute("y1"))+at,Lt=Number($.getAttribute("x2"))+Y,nt=Number($.getAttribute("y2"))+at;else{const Et=$.getBBox();wt=Et.x+Y,Lt=Et.x+Et.width+Y;const _t=Et.y+Et.height/2+at;bt=_t,nt=_t}if(wt===Lt&&bt===nt)return;const Ct=os($,wt,bt,Lt,nt,{groupId:c,id:$e()});b.strokeColor?Ct.strokeColor=b.strokeColor:Ct.strokeColor=void 0,b.strokeWidth!==void 0?Ct.strokeWidth=b.strokeWidth:Ct.strokeWidth=void 0,b.strokeStyle?Ct.strokeStyle=b.strokeStyle:Ct.strokeStyle=void 0,Ct.metadata={classId:l},s.push(Ct)});const H=Array.from(g.querySelectorAll("text, foreignObject")),G=[];H.forEach($=>{var Et;const Y=$.tagName.toLowerCase()==="foreignobject",at=Y?[]:Array.from($.querySelectorAll("tspan")),wt=at.length?at.map(_t=>{var zt;return(zt=_t.textContent)==null?void 0:zt.trim()}).filter(Boolean).join(`
|
|
316
|
+
`):((Et=$.textContent)==null?void 0:Et.trim())||"";if(!wt)return;const bt=$.getBBox(),{ty:Lt}=ka($,t);let nt=parseFloat(getComputedStyle($).fontSize||"");if(Y&&(!Number.isFinite(nt)||!nt)){const _t=$.querySelector("div, span, p");_t&&(nt=parseFloat(getComputedStyle(_t).fontSize||""))}(!Number.isFinite(nt)||nt<=0)&&(nt=Math.max(12,bt.height*.6)),nt=nt*.9;const Ct=nl($,h.color);G.push({section:aw($,g),text:Fe(wt),x:bt.x,y:bt.y+Lt,width:b&&b.width?Math.max(b.width-8,bt.width):bt.width,height:bt.height,fontSize:nt,color:Ct})});const F=G.filter($=>$.section==="header").sort(($,Y)=>$.y-Y.y||$.x-Y.x);if(!b.label){const $=F.length===0&&G.length===1?G:F;$.length>0&&(b.label={text:$.map(Y=>Y.text).join(`
|
|
317
|
+
`),fontSize:Math.max(...$.map(Y=>Y.fontSize)),color:(Q=$.find(Y=>Y.color))==null?void 0:Q.color,verticalAlign:"top"})}G.filter($=>F.length>0?$.section!=="header":!(b.label&&G.length===1)).forEach($=>{const Y=no(((b==null?void 0:b.x)||0)+4,$.y,$.text,{width:$.width,height:$.height,fontSize:$.fontSize,color:$.color,id:$e(),groupId:c,metadata:{classId:l}});o.push(Y)})}),{nodes:i,lines:s,text:o}},lw=(e,t,r,i)=>{const s=Array.from(r.querySelectorAll('.edgePaths path[data-edge="true"]:not([id^="edgeNote"]):not([id*="-cyclic-special-"])'));if(e.length===0)return{arrows:[],text:[]};const o=[],a=[];let n=0;return e.forEach(l=>{const{id1:c,id2:h,relation:d}=l,u=t.find(q=>q.id===c),g=t.find(q=>q.id===h);if(!u)throw new Error(`parseRelations: Cannot find node with id ${c}`);if(!g)throw new Error(`parseRelations: Cannot find node with id ${h}`);const p=ZT(d.lineType),C=Mc(d.type1),x=Mc(d.type2);let y;if(c===h){const q=sw(c,r);if(!q.length)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${h}`);y=$f(q,{strokeStyle:p,startArrowhead:C,endArrowhead:x,label:l.title?{text:l.title}:void 0,start:{type:"rectangle",id:u.id},end:{type:"rectangle",id:g.id}})}else{const q=s[n];if(!q)throw new Error(`parseRelations: Cannot find rendered SVG edge for relation ${c} -> ${h}`);n+=1,y=rw(q,{strokeStyle:p,startArrowhead:C,endArrowhead:x,label:l.title?{text:l.title}:void 0,start:{type:"rectangle",id:u.id},end:{type:"rectangle",id:g.id}})}o.push(y);const{relationTitle1:b,relationTitle2:S}=l,w=c===h,L=20,A=15,v=15;let E,D;if(b&&b!=="none"){if(w){const U=Dc(y,"start");U&&(E=U.x,D=U.y)}else switch(i){case"TB":E=y.startX-L,y.endX<y.startX&&(E-=v),D=y.startY+A;break;case"BT":E=y.startX+L,y.endX>y.startX&&(E+=v),D=y.startY-A;break;case"LR":E=y.startX+L,D=y.startY+A,y.endY>y.startY&&(D+=v);break;case"RL":E=y.startX-L,D=y.startY-A,y.startY>y.endY&&(D-=v);break;default:E=y.startX-L,D=y.startY+A}E??(E=y.startX-L),D??(D=y.startY+A);const q=no(E,D,b,{fontSize:16});a.push(q)}if(S&&S!=="none"){if(w){const U=Dc(y,"end");U&&(E=U.x,D=U.y)}else switch(i){case"TB":E=y.endX+L,y.endX<y.startX&&(E+=v),D=y.endY-A;break;case"BT":E=y.endX-L,y.endX>y.startX&&(E-=v),D=y.endY+A;break;case"LR":E=y.endX-L,D=y.endY-A,y.endY>y.startY&&(D-=v);break;case"RL":E=y.endX+L,D=y.endY+A,y.startY>y.endY&&(D+=v);break;default:E=y.endX+L,D=y.endY-A}E??(E=y.endX+L),D??(D=y.endY+A);const q=no(E,D,S,{fontSize:16});a.push(q)}}),{arrows:o,text:a}},hw=(e,t,r)=>{const i=[],s=[];return e.forEach((o,a)=>{const{id:n,text:l,class:c}=o,h=t.querySelector(`#${n}`);if(!h)throw new Error(`Node with id ${n} not found!`);const{transformX:d,transformY:u}=$r(h),g=h.firstChild,p=fr(g,"rectangle",{id:n,subtype:"note",label:{text:l}});if(Object.assign(p,{x:p.x+d,y:p.y+u}),i.push(p),c){const C=r.find(A=>A.id===c);if(!C)throw new Error(`class node with id ${c} not found!`);const x=t.querySelector(`path[id="edgeNote${a+1}"][data-edge="true"]`);if(x){s.push(iw(x,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:C.id,type:"rectangle"}}));return}const y=p.x+(p.width||0)/2,b=p.y+(p.height||0),S=y,w=C.y,L=cl(y,b,S,w,{strokeStyle:"dotted",startArrowhead:null,endArrowhead:null,start:{id:p.id,type:"rectangle"},end:{id:C.id,type:"rectangle"}});s.push(L)}}),{notes:i,connectors:s}},cw=(e,t)=>{var y,b,S,w,L;const r=e.db,i=((y=r.getDirection)==null?void 0:y.call(r))||"TB",s=[],o=[],a=[],n=[],l=((b=r.getNamespaces)==null?void 0:b.call(r))||[],c=((S=r.getClasses)==null?void 0:S.call(r))||{},h=c instanceof Map?Object.fromEntries(c):c;if(h&&Object.keys(h).length){const A=typeof r.lookUpDomId=="function"?r.lookUpDomId.bind(r):void 0,v=nw(h,t,A);s.push(v.nodes),o.push(...v.lines),a.push(...v.text),n.push(...v.nodes)}const d=((w=r.getRelations)==null?void 0:w.call(r))||[],{arrows:u,text:g}=lw(d,n,t,i),p=((L=r.getNotes)==null?void 0:L.call(r))||[],{notes:C,connectors:x}=hw(p,t,n);return s.push(C),u.push(...x),a.push(...g),{type:"class",nodes:s,lines:o,arrows:u,text:a,namespaces:l}},Rc=18,dw=e=>{const t={};return e&&e.forEach(r=>{Ne(r).forEach(({property:i,value:s})=>{i&&s&&(t[i]=$t(s))})}),t},uw=e=>{if(e==null||e==="")return;const t=typeof e=="number"?e:parseFloat($t(e));if(!(!Number.isFinite(t)||t<=0))return t},dl=(e,t)=>{let r=0,i=0,s=e;for(;s&&s!==t;){const{transformX:o,transformY:a}=$r(s);r+=o,i+=a,s=s.parentElement}return{tx:r,ty:i}},gw=e=>{var i;const t=Array.from(e.querySelectorAll("tspan")),r=t.length?t.map(s=>{var o;return(o=s.textContent)==null?void 0:o.trim()}).filter(Boolean).join(`
|
|
318
|
+
`):((i=e.textContent)==null?void 0:i.trim())||"";return Fe(r)},pw=e=>{const t=e.querySelector("text, foreignObject, div, span, p")||e;let r=parseFloat(getComputedStyle(t).fontSize||"");return(!Number.isFinite(r)||r<=0)&&(r=Math.max(12,e.getBBox().height*.75)),r},fw=(e,t,r)=>{const i=gw(e);if(!i)return null;const s=e.getBBox(),{tx:o,ty:a}=dl(e,t);return{className:e.getAttribute("class")||"",text:i,x:s.x+o,y:s.y+a,width:s.width,height:s.height,fontSize:pw(e),color:nl(e,r)}},mw=(e,t,r,i,s,o,a)=>{const{tx:n,ty:l}=dl(e,t);let c=0,h=0,d=0,u=0;if(e.tagName.toLowerCase()==="line")c=Number(e.getAttribute("x1"))+n,h=Number(e.getAttribute("y1"))+l,d=Number(e.getAttribute("x2"))+n,u=Number(e.getAttribute("y2"))+l;else{const p=on(e);if(!p)return null;c=p.startX+n,h=p.startY+l,d=p.endX+n,u=p.endY+l}const g={type:"line",id:$e(),groupId:r,startX:c,startY:h,endX:d,endY:u,metadata:{entityId:i}};return s&&We(s)&&s!=="none"&&(g.strokeColor=s),o!==void 0&&(g.strokeWidth=o),a&&(g.strokeStyle=a),g},Pc=e=>{switch(e==null?void 0:e.toLowerCase()){case"one":return"cardinality_one";case"many":return"cardinality_many";case"only_one":return"cardinality_exactly_one";case"one_or_more":return"cardinality_one_or_many";case"zero_or_one":return"cardinality_zero_or_one";case"zero_or_more":return"cardinality_zero_or_many";default:return null}},yw=e=>{switch(e){case"dotted":return"dotted";case"dashed":return"dashed";default:return"solid"}},Cw=(e,t)=>{const r=t.querySelector(`path[id="${e.id}"][data-edge="true"]`);return r?[r]:e.start!==e.end?[]:[`${e.start}-cyclic-special-1`,`${e.start}-cyclic-special-mid`,`${e.start}-cyclic-special-2`].map(s=>t.querySelector(`path[id="${s}"][data-edge="true"]`)).filter(s=>s!==null)},xw=e=>{const t=[];return e.forEach(r=>{ad(r).forEach(i=>{const s=t[t.length-1];s&&s.x===i.x&&s.y===i.y||t.push(i)})}),t},bw=(e,t)=>{const r=t.querySelector(`[id="${e.id}"]`);if(!r)throw new Error(`ER entity ${e.id} not found in rendered SVG`);const i=e.attributes.length?$e():void 0,s=r.getBBox(),{tx:o,ty:a}=dl(r,t),n=dw([...e.cssStyles||[],...e.cssCompiledStyles||[]]),l=$t(n.fill||""),c=$t(n.stroke||""),h=uw(n["stroke-width"]),d=$t(n["stroke-dasharray"]||""),u=Array.from(r.querySelectorAll("g.label")).map(S=>fw(S,t,n.color)).filter(S=>S!==null),g=u.find(S=>S.className.includes("name"))||u[0],p=u.filter(S=>S!==g),C=(g==null?void 0:g.text)||Fe(e.alias||e.label||""),x={type:"rectangle",id:e.id,groupId:i,x:s.x+o,y:s.y+a,width:s.width,height:s.height,label:{text:C,fontSize:e.attributes.length?Rc:(g==null?void 0:g.fontSize)||16,color:g==null?void 0:g.color,textAlign:"center",verticalAlign:e.attributes.length?"top":"middle"},metadata:{entityId:e.id,entityLabel:e.label,entityAlias:e.alias}};We(l)&&l!=="none"&&(x.bgColor=l),We(c)&&c!=="none"&&(x.strokeColor=c),h&&Number.isFinite(h)&&h>0&&(x.strokeWidth=h),d&&d!=="none"&&(x.strokeStyle="dashed");const y=Array.from(r.querySelectorAll(".divider path, path.divider, line.divider")).map(S=>mw(S,t,i,e.id,x.strokeColor,x.strokeWidth,x.strokeStyle)).filter(S=>S!==null),b=p.map(S=>no(S.x,S.y,S.text,{id:$e(),groupId:i,width:S.width,height:S.height,fontSize:Rc,color:S.color,metadata:{entityId:e.id}}));return{container:x,lines:y,text:b}},kw=(e,t)=>{const r=Cw(e,t);if(!r.length)throw new Error(`ER relationship ${e.id} not found in rendered SVG`);const i=xw(r);if(i.length<2)throw new Error(`ER relationship ${e.id} is missing usable path points`);const s=i[0],o=i[i.length-1],a=r[0],n=$t(a.getAttribute("stroke")||getComputedStyle(a).stroke||""),l=Number(a.getAttribute("stroke-width")||getComputedStyle(a).strokeWidth||1),c=cl(s.x,s.y,o.x,o.y,{id:e.id,label:e.label?{text:Fe(e.label),fontSize:16,textAlign:"center"}:void 0,strokeStyle:yw(e.pattern),startArrowhead:Pc(e.arrowTypeStart),endArrowhead:Pc(e.arrowTypeEnd),start:{type:"rectangle",id:e.start},end:{type:"rectangle",id:e.end},points:i.map(h=>[h.x-s.x,h.y-s.y])});return We(n)&&n!=="none"&&(c.strokeColor=n),Number.isFinite(l)&&l>0&&(c.strokeWidth=l),c},Sw=(e,t)=>{const r=e.getData(),i=r.nodes,s=r.edges,o=[],a=[],n=[];i.forEach(c=>{const h=bw(c,t);o.push(h.container),a.push(...h.lines),n.push(...h.text)});const l=s.map(c=>kw(c,t));return{type:"erd",nodes:[o],lines:a,arrows:l,text:n}},jr=e=>{const t=$t(e||"");return!t||t==="none"||t==="transparent"||t==="rgba(0, 0, 0, 0)"||t==="rgba(0,0,0,0)"?!1:We(t)},qf=(e,t,r)=>{switch(t){case Ut.FILL:case Ut.STROKE:jr(r)&&(e[t]=$t(r));break;case Ut.STROKE_WIDTH:case Ut.STROKE_DASHARRAY:$t(r)&&(e[t]=$t(r));break}},Nf=(e,t,r)=>{t===we.COLOR&&jr(r)&&(e[we.COLOR]=$t(r))},Tw=(e,t,r)=>{e&&Ne(e).forEach(({property:i,value:s})=>{qf(t,i,s),Nf(r,i,s)})},ww=(e,t)=>{e&&Ne(e).forEach(({property:r,value:i})=>{if(r===Ut.FILL&&jr(i)){t[we.COLOR]=$t(i);return}Nf(t,r,i)})},Bw=e=>{const t=new Set;return e.filter(Boolean).forEach(r=>{Ne(r||"").forEach(({property:i})=>{t.add(i)})}),t},Lw=(e,t,r)=>{if(!e)return;[[Ut.FILL,e.getAttribute("fill")],[Ut.STROKE,e.getAttribute("stroke")],[Ut.STROKE_WIDTH,e.getAttribute("stroke-width")],[Ut.STROKE_DASHARRAY,e.getAttribute("stroke-dasharray")]].forEach(([s,o])=>{if(!r.has(s)||t[s])return;const a=$t(o||"");a&&qf(t,s,a)})},vw=(e,t,r)=>{if(!e)return;const i=[e,...Array.from(e.querySelectorAll("text, foreignObject, div, span, p"))];for(const s of i){if(t[we.COLOR]||(r.has(we.COLOR)||r.has(Ut.FILL))&&(ww(s.getAttribute("style"),t),t[we.COLOR]))break;const o=$t(s.getAttribute("fill")||s.getAttribute("color")||"");(r.has(we.COLOR)||r.has(Ut.FILL))&&jr(o)&&(t[we.COLOR]=o)}},ul=(e,t)=>{let r=0,i=0,s=e;for(;s&&s!==t;){const{transformX:o,transformY:a}=$r(s);r+=o,i+=a,s=s.parentElement}return{tx:r,ty:i}},Aw=(e,t)=>{const r=e.getBBox(),{tx:i,ty:s}=ul(e,t);return{x:r.x+i,y:r.y+s,width:r.width,height:r.height}},Ew=(e,t)=>{const r=e.querySelector("line.divider");if(!r)return;const{tx:i,ty:s}=ul(r,t);return{startX:Number(r.getAttribute("x1"))+i,startY:Number(r.getAttribute("y1"))+s,endX:Number(r.getAttribute("x2"))+i,endY:Number(r.getAttribute("y2"))+s}},_w=e=>{const t=e.getBBox();return Math.abs(t.width*t.height)},$c=(e,t)=>{const r=e.getAttribute("style");if(!r)return;const i=Ne(r).find(s=>s.property===t);if(i)return $t(i.value)},tn=(e,t)=>{const r=e.map(s=>({element:s,area:_w(s)})).filter(({area:s})=>Number.isFinite(s)&&s>0);return r.length===0?null:r.sort((s,o)=>t==="largest"?o.area-s.area:s.area-o.area)[0].element},Fw=(e,t)=>{if(!e||!t.has(Ut.FILL)&&!t.has(Ut.STROKE))return;const r=$t(e.getAttribute("fill")||$c(e,Ut.FILL)||""),i=$t(e.getAttribute("stroke")||$c(e,Ut.STROKE)||"");if(jr(r))return r;if(jr(i))return i},Mw=(e,t)=>{const r=Array.from(e.querySelectorAll("circle, ellipse, path")),i=tn(r,"smallest");return Fw(i,t)},Ow=e=>{if(e.length<2)return e;const t=e.slice(1),r=t.filter(i=>i.trim().length>0).reduce((i,s)=>{var a;const o=((a=s.match(/^\s*/))==null?void 0:a[0].length)??0;return Math.min(i,o)},Number.POSITIVE_INFINITY);return!Number.isFinite(r)||r<=0?e.map(i=>i.trimEnd()):[e[0].trimEnd(),...t.map(i=>i.replace(new RegExp(`^\\s{0,${r}}`),"").trimEnd())]},Iw=e=>{const t=Array.isArray(e.label)?e.label.map(i=>Fe(i)):Fe(e.label||"").split(`
|
|
319
|
+
`);return Ow(t).join(`
|
|
320
|
+
`)},Dw=e=>e.description?(Array.isArray(e.description)?e.description:[e.description]).map(r=>Fe(r)).filter(r=>r.length>0):[],Rw=e=>{const t=new Set,r=s=>(s&&t.add(s),s),i=s=>{const o=s.find(a=>!t.has(a));return r(o||null)};return s=>{const o=[`[id='${s.domId}']`,`[id='${s.id}']`,`[data-id='${s.id}']`];for(const a of o){const n=e.querySelector(a);if(n)return r(n)}switch(s.shape){case"divider":return i(Array.from(e.querySelectorAll("g.statediagram-cluster-alt")));case"stateStart":return i(Array.from(e.querySelectorAll("g.node.default")).filter(a=>a.querySelector("circle.state-start")));case"stateEnd":return i(Array.from(e.querySelectorAll("g.node.default")).filter(a=>!a.querySelector("circle.state-start")));default:return null}}},Pw=(e,t)=>{switch(t){case"roundedWithTitle":return e.querySelector("rect.outer")||e.querySelector("rect")||e;case"divider":return e.querySelector("rect.divider")||e.querySelector("rect")||e;case"rectWithTitle":return e.querySelector("rect.outer")||e.querySelector("rect")||e;case"stateStart":return tn(Array.from(e.querySelectorAll("circle, ellipse, path")),"largest")||e;case"stateEnd":return tn(Array.from(e.querySelectorAll("circle, ellipse, path")),"largest")||e;case"choice":case"fork":case"join":case"note":case"rect":default:return e.querySelector("rect, path, circle, ellipse, polygon")||e}},$w=(e,t,r)=>{const i=r(e);if(!i)throw new Error(`State node element not found for "${e.id}"`);const s=Pw(i,e.shape),o={},a={},n=[e.labelStyle,...e.cssCompiledStyles||[],...e.cssStyles||[]],l=Bw(n);n.filter(Boolean).forEach(h=>{Tw(h,o,a)}),Lw(s,o,l),vw(i,a,l);const c=Aw(s,t);return{id:e.id,shape:e.shape,text:Iw(e),description:Dw(e),x:c.x,y:c.y,width:c.width,height:c.height,parentId:e.parentId,position:e.position,containerStyle:o,labelStyle:a,dividerLine:e.shape==="rectWithTitle"?Ew(i,t):void 0,endInnerColor:e.shape==="stateEnd"?Mw(i,l):void 0,isRenderable:e.shape!=="noteGroup"}},qw=(e,t)=>{var c;const r=t.querySelector(`[id='${e.id}']`);if(!r)return null;const{tx:i,ty:s}=ul(r,t),o=nd(r,{x:i,y:s},"MCL");if(o.reflectionPoints.length<2)return null;const a={},n=(h,d)=>{switch(h){case Ut.STROKE:jr(d)&&(a.strokeColor=$t(d));break;case Ut.STROKE_WIDTH:{const u=parseFloat($t(d));Number.isFinite(u)&&u>0&&(a.strokeWidth=u);break}case Ut.STROKE_DASHARRAY:$t(d)&&(a.strokeStyle="dashed");break}};[e.style].filter(Boolean).forEach(h=>{Ne(h||"").forEach(({property:d,value:u})=>{n(d,u)})});const l=e.arrowhead==="none"||((c=e.classes)==null?void 0:c.includes("note-edge"));return{id:e.id,start:e.start,end:e.end,text:Fe(e.label||""),...o,strokeColor:a.strokeColor,strokeWidth:a.strokeWidth,strokeStyle:l?"dashed":a.strokeStyle,isNoteEdge:l}},Nw=(e,t)=>{const{nodes:r,edges:i}=e.getData(),s=Rw(t);return{type:"state",nodes:r.map(o=>$w(o,t,s)),edges:i.map(o=>qw(o,t)).filter(o=>o!==null)}};let qc=Promise.resolve();const Ww=e=>{const t=qc.then(e,e);return qc=t.then(()=>{},()=>{}),t};let Nc=null,zw=0;const Hw=e=>JSON.stringify(e),Wc=e=>{const t=e.querySelector("svg");if(!t)throw new Error("SVG element not found");const r=t.getBoundingClientRect(),i=r.width,s=r.height;t.setAttribute("width",`${i}`),t.setAttribute("height",`${s}`);const o="image/svg+xml",a=unescape(encodeURIComponent(t.outerHTML)),l=`data:image/svg+xml;base64,${btoa(a)}`;return{type:"graphImage",mimeType:o,dataURL:l,width:i,height:s}},Yw=async(e,t=Ss)=>Ww(async()=>{var c,h;const r=((c=t.themeVariables)==null?void 0:c.fontSize)??Ss.themeVariables.fontSize,i={...Ss,...t,fontSize:r,themeVariables:{...Ss.themeVariables,...t.themeVariables,fontSize:r}},s=Hw(i);s!==Nc&&(xa.initialize(i),Nc=s);const o=await xa.mermaidAPI.getDiagramFromText(hy(e)),a=`mermaid-to-excalidraw-${zw++}`,n=document.createElement("div");n.setAttribute("style","opacity: 0; position: fixed; z-index: -1; left: -99999px; top: -99999px;");const l=`${a}-container`;n.id=l,(h=document.getElementById(l))==null||h.remove(),document.body.appendChild(n);try{const{svg:d}=await xa.render(a,e,n);n.innerHTML=d;let u;try{switch(o.type){case"flowchart-v2":case"graph":{u=qT(o.db,n);break}case"sequence":{u=VT(o,n);break}case"class":case"classDiagram":{u=cw(o,n);break}case"er":{u=Sw(o.db,n);break}case"state":case"stateDiagram":{u=Nw(o.db,n);break}default:u=Wc(n)}}catch(g){console.error("Error processing Mermaid diagram:",g),u=Wc(n)}return u}finally{n.remove()}}),jw=async(e,t)=>{var a;const r=t||{},i=parseInt(((a=r.themeVariables)==null?void 0:a.fontSize)??"")||as,s=await Yw(e,{...r,themeVariables:{...r.themeVariables}});return gy(s,{fontSize:i})},TB=Object.freeze(Object.defineProperty({__proto__:null,parseMermaidToExcalidraw:jw},Symbol.toStringTag,{value:"Module"}));export{Ex as $,Sn as A,fd as B,Cb as C,ix as D,lo as E,tC as F,x0 as G,Qw as H,p1 as I,g1 as J,rs as K,Zw as L,IC as M,vd as N,wi as O,Vl as P,yo as Q,yb as R,zC as S,Ed as T,Jg as U,Nn as V,Wh as W,Jw as X,cs as Y,hb as Z,f as _,GC as a,bn as a0,gt as a1,lB as a2,nB as a3,c1 as a4,Ht as a5,ap as a6,ft as a7,aB as a8,io as a9,Pd as aA,Hx as aB,Wx as aC,Nx as aD,$d as aE,op as aF,jd as aG,Kw as aH,Ve as aI,Ax as aJ,mt as aK,_d as aL,uk as aM,TB as aN,lp as aa,fo as ab,Wn as ac,rp as ad,Ak as ae,fe as af,fn as ag,gn as ah,Ps as ai,Xx as aj,Ux as ak,jx as al,Yx as am,Rx as an,Dd as ao,qx as ap,Dx as aq,zx as ar,Rd as as,$x as at,Kx as au,Vx as av,Gx as aw,Qx as ax,Zx as ay,Px as az,XC as b,Nt as c,Ad as d,he as e,pr as f,KC as g,Kg as h,qe as i,hs as j,Xd as k,R as l,ls as m,Ox as n,ZC as o,QC as p,UC as q,tB as r,VC as s,py as t,SB as u,kB as v,kb as w,me as x,Jt as y,tx as z};
|